Browse Source

sync: 同步供应链项目

Howie 1 year ago
parent
commit
1ed1d30c76

File diff suppressed because it is too large
+ 283 - 10
package-lock.json


+ 1 - 1
package.json

@@ -15,7 +15,7 @@
     "test:ci": "npm run lint && npm run test:unit"
   },
   "dependencies": {
-    "@zjlib/element-plugins": "^2.7.1",
+    "@zjlib/element-plugins": "^2.8.6",
     "axios": "0.18.1",
     "clipboard": "^2.0.8",
     "concurrent-tasks": "^1.0.7",

+ 11 - 4
src/api/setting.js

@@ -1,4 +1,4 @@
-import request from '@/utils/request'
+import request, { getBlob } from '@/utils/request'
 
 // 获取个人信息
 export function getUserInfo(params) {
@@ -493,7 +493,7 @@ export function getRoleChecked(params) {
   })
 }
 
- // 切换账号权限
+// 切换账号权限
 export function setUserChanging(params) {
   return request({
     url: '/admin/user/changing',
@@ -502,7 +502,6 @@ export function setUserChanging(params) {
   })
 }
 
-
 // 嘉贤子帐号列表
 export function getJiaXianUserList(params) {
   return request({
@@ -512,7 +511,6 @@ export function getJiaXianUserList(params) {
   })
 }
 
-
 // 新建嘉贤经销商子账号
 export function addJiaXianUser(params) {
   return request({
@@ -565,3 +563,12 @@ export function delUserGongCheng(params) {
     params
   })
 }
+
+// 导出
+export function exportListGongCheng(data, name) {
+  return getBlob({
+    url: '/admin/user/listGongCheng/export',
+    data,
+    name
+  })
+}

+ 78 - 0
src/styles/element-ui.scss

@@ -75,3 +75,81 @@
 .el-table th {
   background-color: #eef2f8;
 }
+
+// cover some element-ui styles
+
+.el-breadcrumb__inner,
+.el-breadcrumb__inner a {
+  font-weight: 400 !important;
+}
+
+.el-upload {
+  input[type='file'] {
+    display: none !important;
+  }
+}
+
+.el-upload__input {
+  display: none;
+}
+
+// to fixed https://github.com/ElemeFE/element/issues/2461
+.el-dialog {
+  transform: none;
+  left: 0;
+  position: relative;
+  margin: 0 auto;
+}
+
+// refine element ui upload
+.upload-container {
+  .el-upload {
+    width: 100%;
+
+    .el-upload-dragger {
+      width: 100%;
+      height: 200px;
+    }
+  }
+}
+//  防止浏览器缩放搜索模块布局错位
+.el-range-editor--mini.el-input__inner {
+  display: -webkit-inline-box;
+  display: -ms-inline-flexbox;
+  display: inline-flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  padding: 0 10px !important;
+}
+.el-range-editor--mini.el-input__inner {
+  height: 28px !important;
+}
+// 隐藏滚动条样式
+.scrollbar-wrapper::-webkit-scrollbar {
+  display: none;
+}
+.collapse {
+  .el-form-item__content {
+    line-height: 0 !important;
+  }
+  .el-range-editor--mini .el-range-separator {
+    line-height: 28px !important;
+  }
+}
+// dropdown
+.el-dropdown-menu {
+  a {
+    display: block;
+  }
+}
+
+// to fix el-date-picker css style
+.el-range-separator {
+  box-sizing: content-box;
+}
+
+// 全局设置表格表头背景
+.el-table th {
+  background-color: #eef2f8;
+}

+ 481 - 0
src/styles/index.scss

@@ -479,3 +479,484 @@ input[type='number']::-webkit-outer-spin-button {
     text-overflow: ellipsis;
   }
 }
+@import './variables.scss';
+@import './mixin.scss';
+@import './transition.scss';
+@import './element-ui.scss';
+@import './sidebar.scss';
+
+body {
+  height: 100%;
+  -moz-osx-font-smoothing: grayscale;
+  -webkit-font-smoothing: antialiased;
+  text-rendering: optimizeLegibility;
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+}
+
+label {
+  font-weight: 700;
+}
+
+html {
+  height: 100%;
+  box-sizing: border-box;
+}
+
+#app {
+  height: 100%;
+}
+
+*,
+*:before,
+*:after {
+  box-sizing: inherit;
+}
+
+a:focus,
+a:active {
+  outline: none;
+}
+
+a,
+a:focus,
+a:hover {
+  cursor: pointer;
+  color: inherit;
+  text-decoration: none;
+}
+
+div:focus {
+  outline: none;
+}
+
+.clearfix {
+  &:after {
+    visibility: hidden;
+    display: block;
+    font-size: 0;
+    content: ' ';
+    clear: both;
+    height: 0;
+  }
+}
+
+// main-container global css
+.app-container {
+  padding: 20px;
+}
+
+.fl {
+  float: left;
+}
+.fr {
+  float: right;
+}
+.tl {
+  text-align: left;
+}
+.tr {
+  text-align: right;
+}
+
+.ellipsis {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.ellipsis-2 {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+
+//多选框未选中样式
+.el-checkbox__inner {
+  border: 1px solid #409eff;
+}
+// 筛选区域样式
+.screen-container {
+  background: #ffffff;
+  .el-form-item {
+    margin-bottom: 10px;
+  }
+  .top {
+    height: 40px;
+    .title {
+      font-size: 16px;
+      color: #333;
+      font-weight: 600;
+    }
+    .control {
+      font-size: 14px;
+      color: #4e73df;
+      cursor: pointer;
+    }
+  }
+  // 选择器
+  .el-select {
+    width: 100%;
+  }
+  // 时间选择器
+  .el-date-editor.el-input,
+  .el-date-editor.el-input__inner {
+    width: 100%;
+    height: 29px;
+  }
+  .el-range-editor--small .el-range-separator {
+    line-height: 28px;
+  }
+
+  //.el-col:last-child .el-form-item__content {
+  //  margin-left: 0 !important;
+  //}
+
+  // .el-form-item__label {
+  //   font-size: 13px;
+  // }
+}
+
+.table {
+  margin: 15px 0;
+  // .el-button {
+  //   padding: 0;
+  // }
+  .el-button--mini {
+    padding: 7px 10px;
+  }
+  .el-button--text {
+    padding: 0;
+    font-size: 13px;
+  }
+  .el-table {
+    font-size: 13px;
+  }
+  .el-table td,
+  .el-table th {
+    padding: 5px 0;
+  }
+  input[type='number'] {
+    text-align: right;
+  }
+}
+
+// 主要内容区域样式
+.mymain-container {
+  margin-top: 15px;
+  margin-bottom: 20px;
+  .btn-group {
+    .text {
+      font-size: 16px;
+      color: #666;
+      line-height: 32px;
+    }
+  }
+  // 导入
+  .import-btn {
+    position: relative;
+  }
+  .el-upload-list {
+    position: absolute;
+    top: 20px;
+    left: 0;
+  }
+}
+
+// 抽屉样式
+.el-drawer {
+  // 整体
+  .el-drawer__body {
+    overflow-y: scroll;
+  }
+  .drawer__content {
+    padding: 0 20px;
+  }
+  .drawer__footer {
+    position: sticky;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    background: #fff;
+    padding: 20px;
+  }
+  .drawer__content .el-date-editor {
+    width: 100%;
+  }
+
+  // 选择器
+  .el-select {
+    width: 100%;
+  }
+
+  // 图片墙
+  .el-upload-list--picture-card .el-upload-list__item {
+    width: 100px;
+    height: 100px;
+  }
+  .el-upload--picture-card {
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    .avatar-uploader-icon {
+      font-size: 28px;
+      color: #8c939d;
+      width: 100px;
+      height: 100px;
+      line-height: 100px;
+      text-align: center;
+    }
+  }
+}
+.el-popover-left {
+  margin-left: 10px;
+}
+// 上传照片样式
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader .el-upload-list {
+  position: relative;
+  top: unset;
+  left: unset;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 120px;
+  height: 120px;
+  line-height: 120px;
+  text-align: center;
+}
+.avatar {
+  width: 120px;
+  height: 120px;
+  display: block;
+}
+
+// 系统设置
+.setting_title {
+  font-size: 18px;
+  padding-left: 15px;
+  font-weight: 600;
+}
+
+.el-menu-item,
+.el-submenu__title {
+  height: 44px;
+  line-height: 44px;
+  font-weight: 600 !important;
+}
+
+.el-submenu .el-menu-item {
+  height: 44px;
+  line-height: 44px;
+}
+
+.page-footer {
+  height: 70px;
+  .footer {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    z-index: 9;
+    width: 100%;
+    background: #fff;
+    padding: 15px 40px;
+    box-sizing: border-box;
+    transition: all 0.28s;
+    text-align: right;
+    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
+    &.hideSidebar {
+      margin-left: 54px;
+      width: calc(100vw - 54px);
+    }
+    &.openSidebar {
+      margin-left: 210px;
+      width: calc(100vw - 210px);
+    }
+  }
+}
+
+.diy-table-1 {
+  border: 1px solid #ebeef5;
+  border-right: none;
+  border-bottom: none;
+  .item {
+    display: flex;
+    border-bottom: 1px solid #ebeef5;
+    &.file {
+      .label {
+        height: 100px;
+      }
+      .value {
+        height: 100px;
+      }
+      .file-list {
+        display: flex;
+        .file-item {
+          // margin-top: 10px;
+          margin-right: 10px;
+        }
+      }
+      .img {
+        width: 70px;
+        height: 70px;
+        display: block;
+        border: 1px solid #e4e7ed;
+      }
+      .box2 {
+        flex: 1;
+        display: flex;
+        padding: 10px;
+        align-items: center;
+        border: 1px solid #e4e7ed;
+        width: 240px;
+        height: 70px;
+        cursor: pointer;
+        img {
+          width: 40px;
+          height: 40px;
+          display: block;
+        }
+        .name {
+          flex: 1;
+          color: #222;
+          font-weight: 600;
+          margin-left: 10px;
+        }
+      }
+    }
+    .label {
+      width: 120px;
+      height: 34px;
+      display: flex;
+      align-items: center;
+      padding: 0 10px;
+      box-sizing: border-box;
+      background: #f5f7fa;
+      border-right: 1px solid #ebeef5;
+      font-size: 14px;
+      color: #333333;
+    }
+    .value {
+      flex: 1;
+      height: 34px;
+      display: flex;
+      align-items: center;
+      padding: 0 10px;
+      box-sizing: border-box;
+      border-right: 1px solid #ebeef5;
+      font-size: 14px;
+      color: #333333;
+      input {
+        border: none;
+        padding: 0;
+        height: 34px;
+      }
+    }
+  }
+}
+.diy-table-2 {
+  font-size: 14px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  .el-row {
+    margin-left: 0 !important;
+    margin-right: 0 !important;
+    border: 1px solid #ebeef5;
+    border-right: none;
+  }
+  .el-col {
+    padding-top: 14px;
+    padding-bottom: 14px;
+    border-right: 1px solid #ebeef5;
+  }
+  .head {
+    color: #909399;
+    font-weight: bold;
+    background: #f5f7fa;
+  }
+  .body {
+    color: #333333;
+    .el-row {
+      border-top: none;
+    }
+  }
+  .foot {
+    color: #333333;
+    .el-row {
+      border-top: none;
+    }
+  }
+}
+
+.diy-form-1 {
+  .item {
+    display: flex;
+    height: 34px;
+    .label {
+      width: 100px;
+      display: flex;
+      align-items: center;
+      padding-right: 10px;
+      box-sizing: border-box;
+      font-size: 14px;
+      color: #606266;
+      font-weight: 700;
+    }
+    .value {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      box-sizing: border-box;
+      font-size: 14px;
+      color: #333333;
+      input {
+        border: none;
+        padding: 0;
+      }
+    }
+  }
+}
+
+input[type='number']::-webkit-inner-spin-button,
+input[type='number']::-webkit-outer-spin-button {
+  -webkit-appearance: none;
+  margin: 0;
+}
+
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 50px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
+  }
+}
+.hiprint-printElement-text-content {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+@media print {
+  .hiprint-printElement-text-content {
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+}

+ 1135 - 0
src/views/commercialEngineering/components/base.vue

@@ -150,6 +150,1141 @@
               placeholder="请选择"
               clearable
               filterable
+              remote
+              reserve-keyword
+              :remote-method="remoteMethod"
+              :loading="loading"
+              @change="handleCustomer"
+            >
+              <el-option
+                v-for="item in commonData.customerList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+            <CopyButton v-if="module !== 'add' && isTradeExaminer" :copyText="getCopyText(commonData.customerList, formData.customerId)" />
+            <CopyButton v-if="module !== 'add' && !isTradeExaminer" :copyText="formData.customerName" />
+
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" class="item">
+          <div class="label">经销商联系人*:</div>
+          <div class="value">
+            <el-input v-model="formData.customerLinkName" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.customerLinkName" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" class="item">
+          <div class="label">经销商联系电话*:</div>
+          <div class="value">
+            <el-input v-model="formData.customerLinkMobile" maxlength="11" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.customerLinkMobile" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" class="item">
+          <div class="label">经销商办公地址*:</div>
+          <div class="value">
+            <el-input v-model="formData.customerAddress" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.customerAddress" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" class="item">
+          <div class="label">跟进经销商*:</div>
+          <div class="value">
+            <el-input v-model="formData.followCustomer" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.followCustomer" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" class="item">
+          <div class="label">跟进经销商电话*:</div>
+          <div class="value">
+            <el-input v-model="formData.followCustomerMobile" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.followCustomerMobile" />
+          </div>
+        </el-col>
+        <el-col
+          v-if="['frock', 'cross'].includes(pageType) && formData.orderType !== 'HOME'"
+          :xs="24"
+          :sm="24"
+          :lg="8"
+          class="item"
+        >
+          <div class="label">工程项目名称*:</div>
+          <div class="value">
+            <el-input v-model="formData.projectName" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.projectName" />
+          </div>
+        </el-col>
+        <el-col
+          :xs="24"
+          :sm="12"
+          :lg="['home'].includes(pageType) || module === 'edit' || formData.orderType === 'HOME' ? 12 : 8"
+          class="item"
+        >
+          <div class="label">工程联系人*:</div>
+          <div class="value">
+            <el-input v-model="formData.enginLinkName" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.enginLinkName" />
+          </div>
+        </el-col>
+        <el-col
+          :xs="24"
+          :sm="12"
+          :lg="['home'].includes(pageType) || module === 'edit' || formData.orderType === 'HOME' ? 12 : 8"
+          class="item"
+        >
+          <div class="label">电话*:</div>
+          <div class="value">
+            <el-input v-model="formData.enginLinkMobile" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.enginLinkMobile" />
+          </div>
+        </el-col>
+        <el-col
+          v-if="['home'].includes(pageType) || formData.orderType === 'HOME'"
+          :xs="24"
+          :sm="24"
+          :lg="24"
+          class="item"
+        >
+          <div class="label" style="height: auto">工程项目名称*:</div>
+          <div class="value my-center" style="height: 100%">
+            <el-radio-group v-model="formData.homeProjectNameRadio"  >
+              <el-radio label="AREA">
+                <el-input
+                  v-model="formData.homeProjectNameArea"
+                  class="my-width"
+                  placeholder="请填写"
+
+                  clearable
+                />小区
+                <el-input
+                  v-model="formData.homeProjectNameSeat"
+                  class="my-width"
+                  placeholder="请填写"
+
+                  clearable
+                />座
+                <el-input
+                  v-model="formData.homeProjectNameNumber"
+                  class="my-width"
+                  placeholder="请填写"
+
+                  clearable
+                />号
+                <CopyButton
+                  v-if="module !== 'add'"
+                  :copyText="
+                    formData.homeProjectNameArea +
+                    '小区' +
+                    formData.homeProjectNameSeat +
+                    '座' +
+                    formData.homeProjectNameNumber +
+                    '号'
+                  "
+                />
+              </el-radio>
+              <el-radio label="SELF">
+                <el-input
+                  v-model="formData.homeProjectNameArea2"
+                  class="my-width"
+                  placeholder="请填写"
+
+                  clearable
+                />(业主名称)自建房
+                <CopyButton v-if="module !== 'add'" :copyText="formData.homeProjectNameArea2 + '(业主名称)自建房'" />
+              </el-radio>
+              <el-radio label="VILLA">
+                <el-input
+                  v-model="formData.homeProjectNameArea3"
+                  class="my-width"
+                  placeholder="请填写"
+
+                  clearable
+                />小区
+                <el-input
+                  v-model="formData.homeProjectNameNumber3"
+                  class="my-width"
+                  placeholder="请填写"
+
+                  clearable
+                />号别墅
+                <CopyButton
+                  v-if="module !== 'add'"
+                  :copyText="formData.homeProjectNameArea3 + '小区' + formData.homeProjectNameNumber3 + '号'"
+                />
+              </el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">工程(建筑)地址*:</div>
+          <div class="value">
+            <el-select v-model="formData.provinceId" placeholder="请选择省" class="my-width" @change="changeProvince">
+              <el-option v-for="item in provinceList" :key="item.lbsId" :label="item.name" :value="item.lbsId" />
+            </el-select>
+
+            <el-select v-model="formData.cityId" placeholder="请选择市" class="my-width" @change="changeCity">
+              <el-option v-for="item in cityList" :key="item.lbsId" :label="item.name" :value="item.lbsId" />
+            </el-select>
+
+            <el-select v-model="formData.areaId" placeholder="请选择区" class="my-width" @change="changeArea">
+              <el-option v-for="item in areaList" :key="item.lbsId" :label="item.name" :value="item.lbsId" />
+            </el-select>
+
+            <el-select v-model="formData.streetId" placeholder="请选择街道" class="my-width" @change="changeStreet">
+              <el-option v-for="item in streetList" :key="item.lbsId" :label="item.name" :value="item.lbsId" />
+            </el-select>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">详细地址*:</div>
+          <div class="value">
+            <!-- <el-input v-model="formData.positionAddress" placeholder="定位地址"   clearable disabled /> -->
+            <geographicalPosi
+              style="margin: 0 20px 0 0"
+              v-if="module !== 'detail' && !['cross'].includes(pageType)"
+              :form-data="formData"
+              @selectPosi="handleSelectPosi"
+            />
+            <el-input v-model="formData.address" placeholder="请填写详细地址"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.address" />
+
+            <i
+              v-if="formData.positionAddress && !['cross'].includes(pageType)"
+              class="el-icon-s-promotion"
+              style="color: #409eff; font-size: 16px"
+            />
+          </div>
+        </el-col>
+        <template>
+          <el-col v-if="module !== 'add'" :xs="24" :sm="24" :lg="24" class="item" style="height: 400px">
+            <div class="label" style="height: auto">地图位置</div>
+            <div class="value" style="height: auto; padding: 0">
+              <zj-amap-polygon
+                eid="bMap"
+                :zoom="zoom"
+                :center="center"
+                :isWheel="true"
+                :markers="markers"
+                :electronic-fence="electronicFence"
+                @getPolygons="getPolygons"
+              >
+                <template #marker="{ marker }">
+                  <i class="el-icon-location-outline IP_font" />
+                  <div class="IP">
+                    <div>项目编号:{{ marker.no }}</div>
+                    <div>工程项目名称:{{ marker.name }}</div>
+                    <div>地址:{{ marker.address }}</div>
+                  </div>
+                </template>
+              </zj-amap-polygon>
+            </div>
+          </el-col>
+        </template>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">项目类别*:</div>
+          <div class="value">
+            <el-radio-group v-model="formData.projectCategory"  >
+              <el-radio v-for="item in commonData.dict['TRADE_LOGIN_CATEGORY']" :key="item.value" :label="item.value">
+                {{ item.label }}
+              </el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">图纸上传:</div>
+          <div class="value" style="justify-content: flex-end; position: relative">
+            <FileUpload v-if="module !== 'detail'" :file-list="formData.fileList"   :limit="1" class="file" />
+            <el-link
+              v-if="module == 'detail' && formData.fileList && formData.fileList.length"
+              style="position: absolute; left: 5px"
+              type="primary"
+              :underline="false"
+              @click="openPdf(formData.fileList[0])"
+              >{{ formData.fileList[0].name }}下载</el-link
+            >
+            <!-- <el-input v-model="formData.drawUpload"    clearable /> -->
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">类型</div>
+          <div class="value">
+            <el-radio-group v-model="formData.type"  >
+              <el-radio v-for="item in commonData.dict['TRADE_LOGIN_TYPE']" :key="item.value" :label="item.value">
+                {{ item.label }}
+              </el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">建筑面积㎡*:</div>
+          <div class="value">
+            <el-input v-model="formData.extent" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.extent" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">空调使用面积㎡*:</div>
+          <div class="value">
+            <el-input v-model="formData.useExtent" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.useExtent" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">项目所在行业分类*:</div>
+          <div class="value">
+            <el-select
+              v-model="formData.tradeParentId"
+              placeholder="请选择"
+              clearable
+              filterable
+              :disabled="pageType === 'home' || formData.orderType === 'HOME'"
+              @change="handleTradeParent"
+            >
+              <el-option v-for="item in tradeParentList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <CopyButton v-if="module !== 'add'" :copyText="formData.tradeParentName" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">行业细分*:</div>
+          <div class="value">
+            <el-select
+              v-model="formData.tradeId"
+              :disabled="pageType === 'home' || formData.orderType === 'HOME'"
+              placeholder="请选择"
+              clearable
+              filterable
+              @change="handleTrade"
+            >
+              <el-option v-for="item in tradeList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <CopyButton v-if="module !== 'add'" :copyText="formData.tradeName" />
+          </div>
+        </el-col>
+        <el-col v-if="['frock', 'home'].includes(pageType)" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">项目性质*:</div>
+          <div class="value">
+            {{ pageType === 'frock' ? '工程' : '家装' }}
+            <CopyButton v-if="module !== 'add'" :copyText="pageType === 'frock' ? '工程' : '家装'" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">机组类型*:</div>
+          <div class="value">
+            <el-select v-model="formData.machineType" placeholder="请选择" clearable filterable>
+              <el-option
+                v-for="item in commonData.dict['LOGIN_MACHINE_TYPE']"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+            <CopyButton v-if="module !== 'add'" :copyText="getCopyText(commonData.dict['LOGIN_MACHINE_TYPE'], formData.machineType)" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">成功机率*:</div>
+          <div class="value">
+            <el-radio-group v-model="formData.successRate"  >
+              <el-radio v-for="item in commonData.dict['SUCCESS_RATE']" :key="item.value" :label="item.value">
+                {{ item.label }}
+              </el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">预计签定合同日期*:</div>
+          <div class="value">
+            <el-date-picker
+              v-model="formData.preSignDate"
+              class="date"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              default-time="00:00:00"
+              style="width: 100%"
+              placeholder="选择日期"
+            />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.preSignDate" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">预计设备金额*:</div>
+          <div class="value">
+            <el-input type="number" v-model.number="formData.preDeviceAmount" placeholder="请填写"   clearable />万
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">工程跟进状态*:</div>
+          <div class="value">
+            <el-radio-group v-model="formData.status"  >
+              <el-radio v-for="item in commonData.dict['FOLLOW_STATUS']" :key="item.value" :label="item.value">
+                {{ item.label }}
+              </el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col v-if="['detail', 'examine'].includes(module)" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">订单状态:</div>
+          <div class="value">
+            <el-input :value="orderTypeEume[formData.orderStatus]" placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="orderTypeEume[formData.orderStatus]" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label" style="height: auto">备注:</div>
+          <div class="value" style="height: 100%">
+            <el-input
+              v-model="formData.remark"
+              style="margin: 5px 0"
+              type="textarea"
+              :rows="4"
+              placeholder="请输入备注"
+            />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.remark" />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label" style="height: auto">
+            工程概况及此工程相关的社会关系以及其他相关信息{{ ['cross'].includes(pageType) ? '*' : '' }}:
+          </div>
+          <div class="value" style="height: 100%">
+            <el-input
+              v-model="formData.otherInfo"
+              style="margin: 5px 0"
+              type="textarea"
+              :rows="3"
+              placeholder="请输入内容"
+            />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.otherInfo" />
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import { findElem } from '@/utils/util'
+import { getAutonaviRegion } from '@/api/common'
+import { getTradeConfigList } from '@/api/basic_data/sectorAllocation'
+import GeographicalPosi from './geographicalPosi.vue'
+import FileUpload from '@/components/Common/file-upload.vue'
+import { mapGetters } from 'vuex'
+import { getPositionProject, getHistory } from '@/api/frock'
+import { getDealerListV2 } from '@/api/basic_data/dealer'
+
+export default {
+  components: {
+    FileUpload,
+    GeographicalPosi
+  },
+  props: {
+    // 标题
+    title: {
+      type: String,
+      default: '登录信息'
+    },
+    // 数据源
+    formData: {
+      type: Object,
+      default: () => ({})
+    },
+    // 页面类型
+    pageType: {
+      type: String,
+      default: 'frock'
+    },
+    // 功能类型
+    module: {
+      type: String,
+      default: 'add'
+    },
+    commonData: {
+      type: Object,
+      default: () => {}
+    }
+  },
+  data() {
+    return {
+      fileList: [],
+      // 地图缩放比例
+      zoom: 16,
+      // 地图默认中心
+      center: [113.36242, 23.1368425],
+      markers: [],
+      // 是否启用电子围栏
+      electronicFence: false,
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      streetList: [],
+      tradeParentList: [],
+      tradeList: [],
+      orderTypeEume: {
+        SAVE: '保存',
+        WAIT: '待审核',
+        OK: '登录成功',
+        FAIL: '登录不成功',
+        RETURN: '返回'
+      },
+      region: {
+        G: ['广州市', '清远市', '韶关市'],
+        F: ['佛山市', '肇庆市', '云浮市']
+      },
+      // 特殊处理市区
+      specialCity: {
+        '1608754035946549250': '东莞市',
+        '1608754032574328834': '中山市',
+        '1608756901402767362': '儋州市',
+        '1608756898412228610': '三沙市',
+        '1608757977963163649': '嘉峪关市'
+      },
+      loading: false
+    }
+  },
+  computed: {
+    ...mapGetters(['isTradeExaminer', 'isCustomer', 'customerNumber', 'customerId', 'customerName']),
+    getCopyText(){
+      return(arr = [], id = '')=>{
+          if (id && arr.length) {
+            return String(arr.find(k=>k.value===id)?.label || id)
+          }
+          return String(id)
+      }
+    }
+  },
+  watch: {
+    async 'formData.id'(newValue, oldValue) {
+      if (newValue) {
+
+        if (this.isTradeExaminer) {
+          this.getPositionProject()
+        } else {
+          this.markers = [
+            {
+              name: this.formData.projectName,
+              center: [this.formData.lnt, this.formData.lat],
+              address: this.formData.address,
+              no: this.formData.projectNo
+            }
+          ]
+        }
+        this.center = [this.formData.lnt, this.formData.lat]
+        if (this.module === 'examine' && !this.formData.loginStatus) {
+          this.formData.loginStatus = 'OK'
+        }
+        if (this.module === 'examine' && this.formData.files.length) {
+          const item = this.formData.files
+          this.formData.files = item.map(k => {
+            return {
+              ...k,
+              name: k.fileName,
+              url: k.fileUrl,
+              hover: true
+            }
+          })
+        }
+        if (this.formData.homeProjectNameRadio === 'SELF') {
+          this.formData.homeProjectNameArea2 = this.formData.homeProjectNameArea
+        }
+        if (this.formData.homeProjectNameRadio === 'VILLA') {
+          this.formData.homeProjectNameNumber3 = this.formData.homeProjectNameNumber
+          this.formData.homeProjectNameArea3 = this.formData.homeProjectNameArea
+        }
+        if (this.formData.homeProjectNameRadio === 'SELF' || this.formData.homeProjectNameRadio === 'VILLA') {
+          this.formData.homeProjectNameArea = ''
+          this.formData.homeProjectNameSeat = ''
+          this.formData.homeProjectNameNumber = ''
+        }
+        await this.getCallbackPosition(null, this.formData.provinceId, 'province', 'lbsId')
+        await this.getCallbackPosition(this.formData.provinceId, this.formData.cityId, 'city', 'lbsId')
+        await this.getCallbackPosition(this.formData.cityId, this.formData.areaId, 'area', 'lbsId')
+        const temp = this.areaList.find(k => this.formData.cityId == k.value)
+        if (!temp && !temp?.parentLbsId && !Object.keys(this.specialCity).includes(temp?.parentLbsId)) {
+          await this.getCallbackPosition(this.formData.areaId, this.formData.streetId, 'street', 'lbsId')
+        }
+        if (this.module !== 'add' && this.isTradeExaminer && this.formData.customerId && this.formData.customerName) {
+          this.getDealerListV2(this.formData.customerName)
+        }
+      }
+    }
+  },
+  mounted() {
+    if (this.module === 'add') {
+      this.getAutonaviRegion()
+      if (this.isCustomer) {
+        this.formData.customerId = this.customerId
+        this.formData.customerNumber = this.customerNumber
+        this.formData.customerName = this.customerName
+      }
+      if (!this.isCustomer && !this.isTradeExaminer) {
+        this.formData.customerId = '269184'
+        this.formData.customerNumber = '100503'
+        this.formData.customerName = '韶关弘格贸易有限公司'
+      }
+      if (!this.isTradeExaminer) {
+        this.getHistory(this.formData.customerId)
+      }
+    }
+    if (this.pageType === 'home' || this.formData.orderType === 'HOME') {
+      this.initTradeData('HOME')
+    } else {
+      this.getTradeConfigList()
+    }
+  },
+  methods: {
+    initTradeData(e) {
+      if (e === 'HOME') {
+        this.getTradeConfigList()
+        this.formData.tradeParentId = '1689529426267607042'
+        this.formData.tradeId = '1689529478943870978'
+      } else {
+        this.formData.tradeParentId = ''
+        this.formData.tradeId = ''
+      }
+    },
+    // 获取省市区街道
+    getAutonaviRegion(level = 0, id = null) {
+      getAutonaviRegion({ parentLbsId: id }).then(res => {
+        if (level === 0) {
+          if (['frock', 'home'].includes(this.pageType)) {
+            this.provinceList = res.data.filter(k => {
+              return k.name === '广东省'
+            })
+            this.getPosition(this.provinceList, 'provinceId', 'province')
+          } else {
+            this.provinceList = res.data
+          }
+        } else if (level === 1) {
+          if (this.formData.province === '广东省' && ['frock', 'home'].includes(this.pageType)) {
+            this.cityList = res.data.filter(k => {
+              if (this.formData.projectArea) {
+                return this.region[this.formData.projectArea].includes(k.name)
+              }
+              return k
+            })
+          } else {
+            this.cityList = res.data
+          }
+        } else if (level === 2) {
+          this.areaList = res.data
+        } else if (level === 3) {
+          this.streetList = res.data
+        }
+      })
+    },
+    handleProjectArea(e) {
+      if (
+        ['frock', 'home'].includes(this.pageType) &&
+        this.formData.provinceId &&
+        this.formData.province === '广东省'
+      ) {
+        this.getAutonaviRegion(1, this.formData.provinceId)
+      }
+    },
+    getPosition(data, id, name) {
+      if (this.module === 'add') {
+        const item = data.find(k => k.name === this.$IpAdd[name])
+        this.formData[id] = item.lbsId
+        this.formData[name] = item.name
+        // if (name === 'province') {
+        this.getAutonaviRegion(1, item.lbsId)
+        // }
+        //  else {
+        //   this.getAutonaviRegion(2, item.lbsId)
+        // }
+      }
+    },
+    getPositionProject() {
+      getPositionProject({ id: this.formData.id }).then(res => {
+        this.commonData.vicinityMarkers = res.data
+        this.markers = this.commonData.vicinityMarkers.map(k => {
+          return {
+            id: '',
+            name: k.projectName,
+            center: [k.lnt, k.lat],
+            address: k.address,
+            no: k.projectNo
+          }
+        })
+        this.markers.push({
+          name: this.formData.projectName,
+          center: [this.formData.lnt, this.formData.lat],
+          address: this.formData.address,
+          no: this.formData.projectNo
+        })
+      })
+    },
+    handleArea(value, type) {
+      this.formData[type] = this[type + 'List'].find(k => k.lbsId === value).name
+    },
+    // 切换省
+    changeProvince(value) {
+      this.formData.cityId = ''
+      this.formData.areaId = ''
+      this.formData.streetId = ''
+      this.cityList = []
+      this.areaList = []
+      this.streetList = []
+      this.getAutonaviRegion(1, value)
+      this.handleArea(value, 'province')
+    },
+
+    // 切换市
+    changeCity(value) {
+      this.formData.areaId = ''
+      this.formData.streetId = ''
+      this.areaList = []
+      this.streetList = []
+      this.getAutonaviRegion(2, value)
+      this.handleArea(value, 'city')
+    },
+
+    // 切换区
+    changeArea(value) {
+      this.areaValue = value
+      this.formData.streetId = ''
+      this.streetList = []
+      // 特殊处理市
+      const temps = this.areaList.filter(k => {
+        return k.lbsId === value
+      })
+      if (
+        value &&
+        this.areaList.length &&
+        temps.length &&
+        temps[0]?.parentLbsId &&
+        Object.keys(this.specialCity).includes(temps[0]?.parentLbsId)
+      ) {
+        this.streetList = temps
+        this.formData.streetId = value
+        this.handleArea(value, 'street')
+        return
+      }
+      this.getAutonaviRegion(3, value)
+      this.handleArea(value, 'area')
+    },
+
+    // 切换街道
+    changeStreet(value) {
+      this.getAutonaviRegion(3, this.areaValue)
+      this.handleArea(value, 'street')
+    },
+
+    // 初始化省市区街道
+    initRegion(level, item, id = 0) {
+      const { province, city, area, street } = item
+      let nextId = null
+      getAutonaviRegion({ pid: id }).then(res => {
+        if (level === 0) {
+          this.provinceList = res.data
+          nextId = this.formData.provinceId = this.provinceList[findElem(this.provinceList, 'name', province)].id
+        } else if (level === 1) {
+          this.cityList = res.data
+          nextId = this.formData.cityId = this.cityList[findElem(this.cityList, 'name', city)].id
+        } else if (level === 2) {
+          this.areaList = res.data
+          nextId = this.formData.areaId = this.areaList[findElem(this.areaList, 'name', area)].id
+        } else if (level === 3) {
+          this.streetList = res.data
+          nextId = this.formData.streetId = this.streetList[findElem(this.streetList, 'name', street)].id
+        }
+        if (level < 3) {
+          level = level + 1
+          this.initRegion(level, item, nextId)
+        }
+      })
+    },
+    handleTradeParent(e) {
+      if (e) {
+        const item = this.tradeParentList.find(k => k.id === e)
+        this.formData.tradeParentName = item.name
+        this.tradeList = item.childList
+        return
+      }
+      this.formData.tradeId = ''
+    },
+    handleTrade(e) {
+      if (e) {
+        const item = this.tradeList.find(k => k.id === e)
+        this.formData.tradeName = item.name
+      } else {
+        this.formData.tradeId = ''
+        this.formData.tradeName = ''
+      }
+    },
+    getTradeConfigList(parentId = '') {
+      getTradeConfigList({
+        pageNum: 1,
+        pageSize: -1,
+        parentId: parentId
+      }).then(res => {
+        if (parentId) {
+          this.tradeList = res.data
+          return
+        }
+        this.tradeParentList = res.data
+        const item = this.tradeParentList.find(k => k.id === this.formData.tradeParentId)
+        if (item && item.childList) {
+          this.tradeList = item.childList
+        }
+      })
+    },
+    handleService(e) {
+      if (e) {
+        const item = this.commonData.salesmanList.find(k => k.value === e)
+        this.formData.serviceNumber = item.userName
+        this.formData.serviceName = item.label
+      } else {
+        this.formData.serviceName = ''
+        this.formData.serviceNumber = ''
+      }
+    },
+    handlePartyA(e) {
+      if (e) {
+        const item = this.commonData.PartyAList.find(k => k.value === e)
+        this.formData.partyA = item.label
+      } else {
+        this.formData.partyA = ''
+      }
+    },
+    handleCustomer(e) {
+      if (e) {
+        const item = this.commonData.customerList.find(k => k.value === e)
+        this.formData.customerName = item.label
+        this.formData.customerNumber = item.number
+        this.getHistory(this.formData.customerId)
+      } else {
+        this.formData.customerName = ''
+        this.formData.customerNumber = ''
+        this.formData.customerLinkName = ''
+        this.formData.customerLinkMobile = ''
+        this.formData.customerAddress = ''
+      }
+    },
+    onSbumit() {},
+    getPolygons(data) {
+      console.log(data)
+    },
+    async handleSelectPosi(data) {
+      this.formData.lnt = data.center[0]
+      this.formData.lat = data.center[1]
+      this.formData.positionAddress = data.name
+      // this.formData.address = data.name
+      var { province, city, district, township } = data.data.addressComponent
+      console.log(province, city, district, township)
+      const area = district
+      const street = township
+      await this.getCallbackPosition(null, province, 'province')
+      await this.getCallbackPosition(this.formData.provinceId, city, 'city')
+      await this.getCallbackPosition(this.formData.cityId, area, 'area')
+      const temp = this.areaList.find(k => this.formData.cityId == k.value)
+      if (!temp && !temp?.parentLbsId && !Object.keys(this.specialCity).includes(temp?.parentLbsId)) {
+        await this.getCallbackPosition(this.formData.areaId, street, 'street')
+      }
+    },
+
+    /**
+     * @param {*} id // 父级id
+     * @param {*} value // 值
+     * @param {*} name // 字段名称
+     * @param {*} way // 筛选属性,默认name
+     */
+    async getCallbackPosition(id = 0, value = '', name, way = 'name') {
+      const { data } = await getAutonaviRegion({ parentLbsId: id })
+      this[name + 'List'] = data
+      const temp = data.find(k => k[way] == value)
+      // 特殊处理市
+      if (name === 'area' && Object.keys(this.specialCity).includes(temp.parentLbsId)) {
+        this.streetList = [temp]
+        this.formData.streetId = temp.lbsId
+        this.handleArea(temp.lbsId, 'street')
+        return
+      }
+      this.formData[name] = temp && temp.name
+      this.formData[name + 'Id'] = temp && temp.lbsId
+    },
+    openPdf(item) {
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = this.$imageUrl + item.url
+      link.download = item.name
+      document.body.appendChild(link)
+      link.click()
+      document.body.removeChild(link)
+    },
+    getHistory(id) {
+      getHistory({ customerId: id }).then(res => {
+        this.formData.customerLinkName = res.data.linkName || ''
+        this.formData.customerLinkMobile = res.data.linkMobile || ''
+        this.formData.customerAddress = res.data.address || ''
+      })
+    },
+    remoteMethod(e){
+      this.loading = false
+      this.getDealerListV2(e)
+    },
+    getDealerListV2(e){
+      getDealerListV2({
+        pageNum: 1,
+        pageSize: 100,
+        params:[
+          {
+            "param": "a.name",
+            "compare": "like",
+            "value": e
+          }
+        ]
+      }).then(res => {
+        this.commonData.customerList = res.data.records.map(k => {
+          return {
+            number: k.number,
+            label: k.name,
+            value: k.id
+          }
+        })
+      }).finally(()=>{
+        this.loading = false
+
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.diy-table-1 {
+  border: 1px solid #cccc;
+  border-right: none;
+  border-bottom: none;
+}
+.diy-table-1 .item {
+  border-bottom: 1px solid #ccc;
+}
+.diy-table-1 .item .label {
+  width: 180px;
+  padding: 10px;
+  border-right: 1px solid #ccc;
+}
+.diy-table-1 .item .value {
+  border-right: 1px solid #ccc;
+  justify-content: space-between;
+}
+::v-deep .el-select {
+  width: 100% !important;
+}
+::v-deep .date .el-input__icon,
+::v-deep .date .el-input__prefix {
+  right: 50px !important;
+  left: auto;
+}
+::v-deep .el-textarea__inner {
+  padding: 0;
+  border: none;
+}
+::v-deep .file:first-child > div {
+  display: flex !important;
+  align-items: center;
+  flex-direction: row-reverse;
+}
+::v-deep .file .is-success {
+  margin-top: 0;
+}
+.my-width {
+  width: 150px;
+}
+.title {
+  display: flex;
+  justify-content: space-between;
+  .title-right {
+    font-size: 16px;
+    font-weight: 300;
+  }
+}
+::v-deep .my-center {
+  input {
+    text-align: center !important;
+  }
+}
+::v-deep .el-upload-list__item-name {
+  width: 200px !important;
+}
+.IP_font {
+  font-size: 28px;
+  color: #409eff;
+  position: absolute;
+  left: -13px;
+  top: -25px;
+}
+.IP {
+  width: 15vw;
+  background-color: #fff;
+  padding: 6px 0 6px 6px;
+}
+::v-deep .el-radio__inner {
+  border: 2px solid #ccc;
+  border-radius: 100%;
+  width: 14px;
+  height: 14px;
+  background-color: #fff;
+  cursor: pointer;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+</style>
+<!-- eslint-disable vue/valid-v-on -->
+<template>
+  <div>
+    <h3 class="title">
+      <div>{{ title }}</div>
+      <div class="title-right">格力商用空调登录表提示:带*的为必填项</div>
+    </h3>
+    <el-divider />
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col v-if="['cross'].includes(pageType)" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">项目性质*:</div>
+          <div class="value">
+            <el-radio-group v-model="formData.orderType"   style="width: 100%" @change="initTradeData">
+              <el-radio
+                v-for="item in [
+                  { label: '工装', value: 'WORK' },
+                  { label: '家装', value: 'HOME' }
+                ]"
+                :key="item.value"
+                :label="item.value"
+              >
+                {{ item.label }}
+              </el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="['add'].includes(module) ? 12 : 24" :lg="['add'].includes(module) ? 12 : 24" class="item">
+          <div class="label">销售公司名称:</div>
+          <div class="value">
+            <el-input v-model="formData.salesCompanyName" disabled placeholder="请填写"   clearable />
+            <CopyButton v-if="module !== 'add'" :copyText="formData.salesCompanyName" />
+          </div>
+        </el-col>
+        <template v-if="!['add'].includes(module)">
+          <el-col :xs="24" :sm="12" :lg="8" class="item">
+            <div class="label">工程登录类型:</div>
+            <div class="value">
+              <el-input
+                :value="formData.orderType === 'WORK' ? '工装' : '家装'"
+                placeholder="请填写"
+
+                clearable
+              />
+              <CopyButton v-if="module !== 'add'" :copyText="formData.orderType" />
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="8" class="item">
+            <div class="label">项目编号:</div>
+            <div class="value">
+              <el-input v-model="formData.projectNo" placeholder="请填写"   clearable />
+              <CopyButton v-if="module !== 'add'" :copyText="formData.projectNo" />
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="8" class="item">
+            <div class="label">登录时间:</div>
+            <div class="value">
+              <el-input v-model="formData.createTime" placeholder="请填写"   clearable />
+              <CopyButton v-if="module !== 'add'" :copyText="formData.createTime" />
+            </div>
+          </el-col>
+        </template>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">{{ ['cross'].includes(pageType) ? '业务所在区域' : '项目所在区域' }}*:</div>
+          <div class="value">
+            <el-select
+              v-model="formData.projectArea"
+              placeholder="请选择"
+              clearable
+              filterable
+              @change="handleProjectArea"
+            >
+              <el-option
+                v-for="item in commonData.dict['TRADE_PROJECT_AREA']"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+            <CopyButton v-if="module !== 'add'" :copyText="getCopyText(commonData.dict['TRADE_PROJECT_AREA'], formData.projectArea)" />
+
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" class="item">
+          <div class="label">跟进业务*:</div>
+          <div class="value">
+            <el-select v-model="formData.serviceId" placeholder="请选择" clearable filterable @change="handleService">
+              <el-option
+                v-for="item in commonData.salesmanList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+            <CopyButton v-if="module !== 'add'" :copyText="getCopyText(commonData.salesmanList, formData.serviceId)" />
+          </div>
+        </el-col>
+        <el-col
+          v-if="pageType === 'frock' || (pageType === 'cross' && formData.orderType === 'WORK')"
+          :xs="24"
+          :sm="!['add', 'edit'].includes(module)  ? 24 : 12"
+          :lg="!['add', 'edit'].includes(module)  ? 24 : 12"
+          class="item"
+        >
+          <div class="label">甲方名称*:</div>
+          <div class="value">
+            <el-select v-model="formData.partyAId" placeholder="请选择" clearable filterable @change="handlePartyA">
+              <el-option
+                v-for="item in commonData.PartyAList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+            <CopyButton v-if="module !== 'add'" :copyText="getCopyText(commonData.PartyAList, formData.partyAId)" />
+          </div>
+        </el-col>
+        <el-col
+          v-if="['add', 'edit'].includes(module)  && (pageType === 'home' || formData.orderType === 'HOME')"
+          :xs="24"
+          :sm="12"
+          :lg="12"
+          class="item"
+        >
+          <div class="label" />
+          <div class="value" />
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="module === 'edit' ? 12 : 8" class="item">
+          <div class="label">经销商*:</div>
+          <div class="value">
+            <el-input
+              v-if="isCustomer"
+              v-model="formData.customerName"
+              disabled
+              placeholder="请填写"
+
+              clearable
+            />
+            <el-input
+              v-if="!isCustomer && !isTradeExaminer"
+              v-model="formData.customerName"
+              disabled
+              placeholder="请填写"
+
+              clearable
+            />
+            <el-select
+              v-if="isTradeExaminer"
+              v-model="formData.customerId"
+              placeholder="请选择"
+              clearable
+              filterable
               @change="handleCustomer"
             >
               <el-option

+ 298 - 0
src/views/commercialEngineering/components/geographicalPosi.vue

@@ -38,6 +38,304 @@
           <zj-amap-polygon
             :markers="markers"
             :zoom="zoom"
+            :isWheel="true"
+            :center="center"
+            :electronic-fence="false"
+            @getGeocoder="getGeocoder"
+          >
+            <template #marker="{ marker }">
+              <i class="el-icon-location-outline IP_font" />
+              <div class="IP">
+                <div>地址:{{ marker.name }}</div>
+                <div>经度:{{ marker.center[0] }}</div>
+                <div>维度:{{ marker.center[1] }}</div>
+              </div>
+            </template>
+          </zj-amap-polygon>
+          <!-- 周边数据 -->
+          <div class="zhoubian">
+            <div v-for="(item, index) in mapzhoubian" :key="index" class="zhoubianItem" @click="zhoubiandw(item)">
+              <div class="zhoubianItemview">
+                <i class="el-icon-location-outline" />
+                <div>
+                  <div style="font-weight: bold; margin-bottom: 8px; box-sizing: border-box; padding: 0px 5px">
+                    {{ item.pname }}{{ item.cityname }}{{ item.adname }}{{ item.address }}
+                  </div>
+                  <div>地址:{{ item.name }}</div>
+                </div>
+                <div>
+                  <img
+                    v-for="(p, i) in item.photos || []"
+                    v-if="i === 0"
+                    :key="i"
+                    :src="seturl(p.url)"
+                    alt=""
+                    srcset=""
+                  >
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="handleClose">取 消</el-button>
+          <el-button size="mini" type="primary" @click="sub">提交</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getLocation, getAddress, supervisorChangeList, axiosMapZb } from '@/utils/lbs'
+export default {
+  props: { formData: { type: Object, default: () => ({}) }},
+  data() {
+    return {
+      dialogVisible: false,
+      loading: false,
+      center: [113.36242, 23.1368425],
+      zoom: 16.7,
+      markers: [],
+      mapSearchList: [],
+      mapzhoubian: [],
+      queryString: ''
+    }
+  },
+  watch: {
+    'formData.positionAddress'() {
+      if (this.markers[0] && this.markers[0].name !== this.formData.positionAddress) {
+        Object.assign(this.$data, this.$options.data())
+      }
+    }
+  },
+  methods: {
+    seturl(url) {
+      if (~url.indexOf('https://')) {
+        return url
+      } else {
+        return url.replace('http://', 'https://')
+      }
+    },
+    async open() {
+      this.dialogVisible = true
+      if (this.formData.lng && this.formData.lat && this.formData.positionAddress) {
+        this.changeSearchMapFn(`${this.formData.lng}//${this.formData.lat}//${this.formData.positionAddress}`)
+      } else {
+        var str = ''
+        if (!~(this.formData.positionAddress || '').indexOf(this.formData.province)) {
+          str += this.formData.province || ''
+        }
+        if (!~(this.formData.positionAddress || '').indexOf(this.formData.city)) {
+          str += this.formData.city || ''
+        }
+        if (!~(this.formData.positionAddress || '').indexOf(this.formData.area)) {
+          str += this.formData.area || ''
+        }
+        if (!~(this.formData.positionAddress || '').indexOf(this.formData.street)) {
+          str += this.formData.street || ''
+        }
+        str += this.formData.positionAddress || ''
+        await this.remoteMethod(str)
+        if (this.mapSearchList.length) {
+          var v = this.mapSearchList[0]
+          this.changeSearchMapFn(`${v.location.KL}//${v.location.kT}//${v.formattedAddress}`)
+        }
+      }
+    },
+    async querySearchAsync(queryString, cb) {
+      if (!queryString) {
+        cb && cb([])
+      } else {
+        var res = await supervisorChangeList(queryString)
+        var list = res.tips.map(item => {
+          return {
+            ...item,
+            value: item.district + item.name + item.address
+          }
+        })
+        if (cb) {
+          cb(list)
+        } else if (list.length) {
+          this.handleSelect(list[0])
+        }
+      }
+    },
+    async handleSelect(item) {
+      this.center = [item.location.lng, item.location.lat]
+      var data = await getAddress(this.center)
+      this.markers = [
+        {
+          id: '',
+          name: item.value,
+          center: [item.location.lng, item.location.lat],
+          data: {
+            ...data,
+            formattedAddress: item.value
+          }
+        }
+      ]
+      this.getAxiosMapZb(this.center)
+    },
+    zhoubiandw(item) {
+      this.changeSearchMapFn(
+        `${item.location.split(',').join('//')}//${
+          item.pname + item.cityname + item.adname + item.name + item.address
+        }`,
+        false
+      )
+    },
+    async changeSearchMapFn(value, bool = true) {
+      const res = value.split('//')
+      var data = await getAddress([Number(res[0]), Number(res[1])])
+      this.queryString = res[2]
+      this.markers = [
+        {
+          id: '',
+          name: res[2],
+          center: [res[0], res[1]],
+          data
+        }
+      ]
+      this.center = [res[0], res[1]]
+      if (bool) {
+        this.getAxiosMapZb(this.center)
+      }
+    },
+    async remoteMethod(query) {
+      if (query !== '') {
+        this.loading = true
+        this.mapSearchList = await getLocation(query)
+        this.loading = false
+      } else {
+        this.workerList = []
+      }
+    },
+    async getAxiosMapZb(center = []) {
+      axiosMapZb({
+        location: center.join(',')
+      })
+        .then(res => {
+          this.mapzhoubian = res.data.pois
+        })
+        .catch(err => {
+          console.log(err)
+        })
+    },
+    getGeocoder(data) {
+      this.markers = [
+        {
+          id: '',
+          name: data.formattedAddress,
+          center: data.center,
+          data
+        }
+      ]
+      this.changeSearchMapFn(`${data.center[0]}//${data.center[1]}//${data.formattedAddress}`)
+    },
+    handleClose(done) {
+      this.dialogVisible = false
+    },
+    sub() {
+      this.$emit('selectPosi', this.markers[0])
+      this.handleClose()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .address_map {
+  .el-dialog__body {
+    padding: 0 20px;
+  }
+}
+.IP_font {
+  font-size: 28px;
+  color: #409eff;
+  position: absolute;
+  left: -13px;
+  top: -25px;
+}
+.IP {
+  width: 15vw;
+  background-color: #fff;
+  padding: 6px 0 6px 6px;
+}
+.withinLine {
+  display: inline-block;
+  ::v-deep .el-button {
+    margin-left: 10px;
+  }
+}
+.teshubuju {
+  display: flex;
+}
+.zhoubian {
+  width: 320px;
+  max-height: 100%;
+  position: absolute;
+  right: 0;
+  top: 0;
+  overflow-y: auto;
+  .zhoubianItem {
+    width: 100%;
+    height: auto;
+    box-sizing: border-box;
+    padding: 16px 8px;
+    border-bottom: 1px solid #aaa;
+    background: #fff;
+    cursor: pointer;
+    .zhoubianItemview {
+      display: flex;
+      justify-content: space-between;
+      img {
+        width: 100px;
+      }
+    }
+  }
+}
+</style>
+<template>
+  <div class="withinLine">
+    <el-button type="primary" size="mini" @click="open">地理定位</el-button>
+    <el-dialog
+      title="地理定位"
+      :visible.sync="dialogVisible"
+      :append-to-body="true"
+      width="1000px"
+      :before-close="handleClose"
+    >
+      <template v-if="dialogVisible">
+        <div>
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <div class="teshubuju">
+                <el-autocomplete
+                  v-model="queryString"
+                  style="width: 100%; margin-right: 10px"
+                  placeholder="请输入内容"
+                  :fetch-suggestions="querySearchAsync"
+                  @select="handleSelect"
+                />
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="
+                    () => {
+                      querySearchAsync(queryString)
+                    }
+                  "
+                >查询</el-button>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+        <br>
+        <div style="height: 60vh; position: relative">
+          <zj-amap-polygon
+            :markers="markers"
+            :zoom="zoom"
             :center="center"
             :electronic-fence="false"
             @getGeocoder="getGeocoder"

+ 28 - 11
src/views/commercialEngineering/crossDistrict/crossDistrictkList.vue

@@ -181,16 +181,30 @@ export default {
     columnParsing(item, defaultData) {
       if (item.colName === 'project_no') {
         defaultData.render = (h, { row, index, column }) => {
-          return (<el-link type='primary' underline={false} onClick={() => {
-            const page = this.$router.resolve({
-              path: '/commercialEngineering/crossDistrictkList',
-              query: {
-                detailId: row.id,
-                module: 'detail'
-              }
-            })
-            window.open(page.href, '_blank')
-          }}>{row.projectNo}</el-link>)
+          return ( <div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
+              <el-link
+                type="primary"
+                underline={false}
+                onClick={() => {
+                  const page = this.$router.resolve({
+                    path: '/commercialEngineering/frockList',
+                    query: {
+                      detailId: row.id,
+                      module: 'detail'
+                    }
+                  })
+                  window.open(page.href, '_blank')
+                }}
+              >
+                {row.projectNo}
+              </el-link>
+              {column.isCopy ? (
+                <i
+                  class={['el-icon-document-copy', column.columnCopyClass]}
+                  data-clipboard-text={row[column.columnAttributes.prop]}
+                ></i>
+              ) : null}
+            </div>)
         }
       }
       return defaultData
@@ -243,7 +257,10 @@ export default {
             >
               详情
             </el-button> */}
-            {(row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN')
+            {(this.isTradeExaminer &&
+              (row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN' || row.status === 'ING')) ||
+            row.orderStatus === 'SAVE' ||
+            row.orderStatus === 'RETURN'
               ? <el-button
                 size='mini'
                 type='text'

+ 137 - 101
src/views/commercialEngineering/frock/frockList.vue

@@ -16,7 +16,7 @@
     <Popu v-if="visible">
       <el-page-header slot="head" :content="content" @back="handleClose" />
       <FrockForm
-        v-if="['add', 'edit','apply'].includes(module)"
+        v-if="['add', 'edit', 'apply'].includes(module)"
         :detail-id="detailId"
         :module="module"
         @updateList="handleClose"
@@ -24,7 +24,15 @@
       <Detail v-if="['detail'].includes(module)" :detail-id="detailId" :module="module" @updateList="handleClose" />
       <Examine v-if="['examine'].includes(module)" :detail-id="detailId" :module="module" @updateList="handleClose" />
     </Popu>
-    <Operate v-if="operateVisible" :operate-visible="operateVisible" :operate-type="operateType" :operate-title="operateTitle" :detail-id="detailId" :record-selected="recordSelected" @close="handleClose" />
+    <Operate
+      v-if="operateVisible"
+      :operate-visible="operateVisible"
+      :operate-type="operateType"
+      :operate-title="operateTitle"
+      :detail-id="detailId"
+      :record-selected="recordSelected"
+      @close="handleClose"
+    />
   </template-page>
 </template>
 
@@ -83,84 +91,89 @@ export default {
           console.log(this.isTradeExaminer, 9999)
           return this.isTradeExaminer
             ? [
-              [
                 [
-                  {
-                    name: '更新',
-                    click: () => {
-                      if (this.recordSelected.length === 0) {
-                        this.$message.error('请选择需要更新的数据')
-                        return
-                      }
-
-                      for (let index = 0; index < this.recordSelected.length; index++) {
-                        if (!(this.recordSelected[index].orderStatus == '已审核' && this.recordSelected[index].status == '跟进中')) {
-                          this.$message.error('请选择审核通过并且跟进中的数据')
+                  [
+                    {
+                      name: '更新',
+                      click: () => {
+                        if (this.recordSelected.length === 0) {
+                          this.$message.error('请选择需要更新的数据')
                           return
                         }
+
+                        for (let index = 0; index < this.recordSelected.length; index++) {
+                          if (
+                            !(
+                              this.recordSelected[index].orderStatus == '已审核' &&
+                              this.recordSelected[index].status == '跟进中'
+                            )
+                          ) {
+                            this.$message.error('请选择审核通过并且跟进中的数据')
+                            return
+                          }
+                        }
+                        this.operateType = 'update'
+                        this.operateTitle = '更新'
+                        this.operateVisible = true
                       }
-                      this.operateType = 'update'
-                      this.operateTitle = '更新'
-                      this.operateVisible = true
                     }
-                  }
-                ]
-              ],
-              [
+                  ]
+                ],
                 [
-                  {
-                    name: '替换业务员',
-                    click: () => {
-                      if (this.recordSelected.length === 0) {
-                        this.$message.error('请选择需要替换业务员的数据')
-                        return
-                      }
-                      for (let index = 0; index < this.recordSelected.length; index++) {
-                        if (this.recordSelected[index].orderStatus !== '已审核') {
-                          this.$message.error('请选择审核通过的数据')
+                  [
+                    {
+                      name: '替换业务员',
+                      click: () => {
+                        if (this.recordSelected.length === 0) {
+                          this.$message.error('请选择需要替换业务员的数据')
                           return
                         }
+                        for (let index = 0; index < this.recordSelected.length; index++) {
+                          if (this.recordSelected[index].orderStatus !== '已审核') {
+                            this.$message.error('请选择审核通过的数据')
+                            return
+                          }
+                        }
+                        this.operateType = 'replace'
+                        this.operateTitle = '替换业务员'
+                        this.operateVisible = true
                       }
-                      this.operateType = 'replace'
-                      this.operateTitle = '替换业务员'
-                      this.operateVisible = true
                     }
-                  }
+                  ]
                 ]
               ]
-            ]
             : []
         })(),
-              [
-                [
-                  {
-                    name: '删除',
-                    click: () => {
-                      if (this.recordSelected.length === 0) {
-                        this.$message.error('请选择需要删除的数据')
-                        return
-                      }
-                      if(!this.isTradeExaminer){
-                        for (let index = 0; index < this.recordSelected.length; index++) {
-                        if (this.recordSelected[index].orderStatus !== '保存') {
-                          this.$message.error('请选择保存的数据')
-                          return
-                        }
-                      }
-                      }
-                      // for (let index = 0; index < this.recordSelected.length; index++) {
-                      //   if (this.recordSelected[index].orderStatus !== '已审核') {
-                      //     this.$message.error('请选择审核通过的数据')
-                      //     return
-                      //   }
-                      // }
-                      this.operateType = 'delete'
-                      this.operateTitle = '删除'
-                      this.operateVisible = true
+        [
+          [
+            {
+              name: '删除',
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.error('请选择需要删除的数据')
+                  return
+                }
+                if (!this.isTradeExaminer) {
+                  for (let index = 0; index < this.recordSelected.length; index++) {
+                    if (this.recordSelected[index].orderStatus !== '保存') {
+                      this.$message.error('请选择保存的数据')
+                      return
                     }
                   }
-                ]
-              ]
+                }
+                // for (let index = 0; index < this.recordSelected.length; index++) {
+                //   if (this.recordSelected[index].orderStatus !== '已审核') {
+                //     this.$message.error('请选择审核通过的数据')
+                //     return
+                //   }
+                // }
+                this.operateType = 'delete'
+                this.operateTitle = '删除'
+                this.operateVisible = true
+              }
+            }
+          ]
+        ]
       ]
     }
   },
@@ -179,16 +192,32 @@ export default {
     columnParsing(item, defaultData) {
       if (item.colName === 'project_no') {
         defaultData.render = (h, { row, index, column }) => {
-          return (<el-link type='primary' underline={false} onClick={() => {
-            const page = this.$router.resolve({
-              path: '/commercialEngineering/frockList',
-              query: {
-                detailId: row.id,
-                module: 'detail'
-              }
-            })
-            window.open(page.href, '_blank')
-          }}>{row.projectNo}</el-link>)
+          return (
+            <div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
+              <el-link
+                type="primary"
+                underline={false}
+                onClick={() => {
+                  const page = this.$router.resolve({
+                    path: '/commercialEngineering/frockList',
+                    query: {
+                      detailId: row.id,
+                      module: 'detail'
+                    }
+                  })
+                  window.open(page.href, '_blank')
+                }}
+              >
+                {row.projectNo}
+              </el-link>
+              {column.isCopy ? (
+                <i
+                  class={['el-icon-document-copy', column.columnCopyClass]}
+                  data-clipboard-text={row[column.columnAttributes.prop]}
+                ></i>
+              ) : null}
+            </div>
+          )
         }
       }
       return defaultData
@@ -201,11 +230,11 @@ export default {
     operation() {
       return (h, { row, index, column }) => {
         return (
-          <div class='operation-btns'>
-                {!this.isTradeExaminer && ((row.orderStatus === 'OK') && row.status === 'ING' && !row.isApplyUpdate) ? (
+          <div class="operation-btns">
+            {!this.isTradeExaminer && row.orderStatus === 'OK' && row.status === 'ING' && !row.isApplyUpdate ? (
               <el-button
-                size='mini'
-                type='text'
+                size="mini"
+                type="text"
                 onClick={() => {
                   this.detailId = row.id
                   this.operateType = 'apply'
@@ -216,10 +245,10 @@ export default {
                 申请修改
               </el-button>
             ) : null}
-            {this.isTradeExaminer && row.orderStatus !== 'SAVE'  ? (
+            {this.isTradeExaminer && row.orderStatus !== 'SAVE' ? (
               <el-button
-                size='mini'
-                type='text'
+                size="mini"
+                type="text"
                 onClick={() => {
                   this.content = '审核'
                   this.module = 'examine'
@@ -245,10 +274,13 @@ export default {
               </el-button>
             } */}
 
-            {(row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN')
-              ? <el-button
-                size='mini'
-                type='text'
+            {(this.isTradeExaminer &&
+              (row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN' || row.status === 'ING')) ||
+            row.orderStatus === 'SAVE' ||
+            row.orderStatus === 'RETURN' ? (
+              <el-button
+                size="mini"
+                type="text"
                 onClick={() => {
                   this.content = '编辑'
                   this.module = 'edit'
@@ -256,24 +288,28 @@ export default {
                   this.visible = true
                 }}
               >
-              编辑
-              </el-button> : null
-            }
-            {row.orderStatus === 'OK' && row.status === 'ING'
-              ? <el-button size='mini' type='text' onClick={() => {
-                this.operateType = 'update'
-                this.operateTitle = '更新'
-                this.recordSelected = [row]
-                this.operateVisible = true
-              }}>
-              更新
-              </el-button> : null
-            }
+                编辑
+              </el-button>
+            ) : null}
+            {row.orderStatus === 'OK' && row.status === 'ING' ? (
+              <el-button
+                size="mini"
+                type="text"
+                onClick={() => {
+                  this.operateType = 'update'
+                  this.operateTitle = '更新'
+                  this.recordSelected = [row]
+                  this.operateVisible = true
+                }}
+              >
+                更新
+              </el-button>
+            ) : null}
 
-            {this.isTradeExaminer && ((row.orderStatus === 'OK' || row.orderStatus === 'FAIL') && row.isApplyUpdate) ? (
+            {this.isTradeExaminer && (row.orderStatus === 'OK' || row.orderStatus === 'FAIL') && row.isApplyUpdate ? (
               <el-button
-                size='mini'
-                type='text'
+                size="mini"
+                type="text"
                 onClick={() => {
                   this.detailId = row.id
                   this.operateType = 'examine'

+ 28 - 11
src/views/commercialEngineering/homeDecoration/homeDecorationList.vue

@@ -187,16 +187,30 @@ export default {
     columnParsing(item, defaultData) {
       if (item.colName === 'project_no') {
         defaultData.render = (h, { row, index, column }) => {
-          return (<el-link type='primary' underline={false} onClick={() => {
-            const page = this.$router.resolve({
-              path: '/commercialEngineering/homeDecorationList',
-              query: {
-                detailId: row.id,
-                module: 'detail'
-              }
-            })
-            window.open(page.href, '_blank')
-          }}>{row.projectNo}</el-link>)
+          return ( <div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
+              <el-link
+                type="primary"
+                underline={false}
+                onClick={() => {
+                  const page = this.$router.resolve({
+                    path: '/commercialEngineering/frockList',
+                    query: {
+                      detailId: row.id,
+                      module: 'detail'
+                    }
+                  })
+                  window.open(page.href, '_blank')
+                }}
+              >
+                {row.projectNo}
+              </el-link>
+              {column.isCopy ? (
+                <i
+                  class={['el-icon-document-copy', column.columnCopyClass]}
+                  data-clipboard-text={row[column.columnAttributes.prop]}
+                ></i>
+              ) : null}
+            </div>)
         }
       }
       return defaultData
@@ -249,7 +263,10 @@ export default {
             >
               详情
             </el-button> */}
-            {(row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN')
+            {(this.isTradeExaminer &&
+              (row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN' || row.status === 'ING')) ||
+            row.orderStatus === 'SAVE' ||
+            row.orderStatus === 'RETURN'
               ? <el-button
                 size='mini'
                 type='text'

+ 5 - 2
src/views/commercialEngineering/mixin/index.js

@@ -135,9 +135,12 @@ export default {
       ...this.formData
     }
     this.getDictList()
-    this.getDealerListV2()
     this.getSalesmanListService()
     this.getFirstPartyCustomerManagementList()
+    if (this.module === 'add') {
+      this.getDealerListV2()
+
+    }
     if (this.detailId) {
       this.getCommercialEngineeringDetail()
     }
@@ -183,7 +186,7 @@ export default {
     getDealerListV2() {
       getDealerListV2({
         pageNum: 1,
-        pageSize: -1
+        pageSize: 100
       }).then(res => {
         this.commonData.customerList = res.data.records.map(k => {
           return {

+ 14 - 6
src/views/setting/account.vue

@@ -555,7 +555,7 @@ export default {
       merchantList: [],
       dealerList: [],
       groupList: [],
-
+      myID: '',
       passwordType1: 'password',
       passwordType2: 'password'
     }
@@ -648,7 +648,7 @@ export default {
     },
     remoteMethod(e) {
       this.loading = true
-      this.getDealerList(null, e)
+      this.getDealerList(this.myID, e)
     },
     // 获取经销商列表
     async getDealerList(id, e) {
@@ -673,7 +673,7 @@ export default {
     },
     remoteMethod2(e) {
       this.loading2 = true
-      this.getGroupList(null, e)
+      this.getGroupList(this.myID, e)
     },
     // 获取集团列表
     async getGroupList(id, e) {
@@ -779,12 +779,13 @@ export default {
       this.AccountFormType = type
       this.AccountFormVisible = true
       await this.getMerchantList()
-      await this.getDealerList(id)
-      await this.getGroupList(id)
       await this.getRoleList()
       await this.getCategoryList()
+      this.myID= id
 
       if (type == 'add') {
+        await this.getDealerList(id)
+        await this.getGroupList(id)
         if (this.selectDepartment) {
           this.$refs.tree.setCheckedKeys([this.selectDepartment.adminWebsitId])
         }
@@ -793,7 +794,12 @@ export default {
       if (type == 'edit') {
         this.editAccountId = id
         getAccountDetail({ adminUserId: id }).then(res => {
-          console.log(res, 78787)
+               if (res.data.customerId) {
+            this.getDealerList(id, res.data.customerId)
+          }
+          if (res.data.groupCompanyId) {
+            this.getGroupList(id, res.data.groupCompanyId)
+          }
           this.AccountForm.account = res.data.userName
           this.AccountForm.role = res.data.roleId
           this.AccountForm.nickName = res.data.nickName
@@ -806,6 +812,8 @@ export default {
           this.AccountForm.k3CategoryIds = res.data.k3CategoryList
           this.AccountForm.isShangyong = res.data.isShangyong
           this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || [])
+
+
         })
       }
     },

+ 33 - 12
src/views/setting/engineeringSubAccount.vue

@@ -22,15 +22,13 @@
         </template>
       </Collapse>
       <div class="btn-group clearfix">
-        <div class="fl">
-          <el-button
-            v-if="checkBtnRole('add')"
-            size="small"
-            type="primary"
-            icon="el-icon-plus"
-            @click="addOrEdit('add')"
+        <div style="display: flex">
+          <el-button v-if="checkBtnRole('add')" size="mini" type="primary"  @click="addOrEdit('add')"
             >新增账号</el-button
           >
+          <el-button style="margin-left: 20px" type="primary" size="mini" @click="handleExportListGongCheng"
+            >导出数据</el-button
+          >
         </div>
         <!--        <div class="fr">-->
         <!--          <ImportButton :im-url="'stock/importToll'" @importSuccess="getList" />-->
@@ -205,7 +203,8 @@ import {
   editSubAccount,
   editEngineeringUser,
   getDetailGongCheng,
-  delUserGongCheng
+  delUserGongCheng,
+  exportListGongCheng
 } from '@/api/setting'
 
 export default {
@@ -258,7 +257,16 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['userid', 'name', 'parentId'])
+    ...mapGetters(['userid', 'name', 'parentId']),
+    exParams() {
+      return {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        parentId: this.parentId,
+        userName: this.screenForm.userName,
+        isMaster: false
+      }
+    }
   },
   created() {
     this.getList()
@@ -281,6 +289,19 @@ export default {
         this.subCustomerList = res.data.records
       })
     },
+    handleExportListGongCheng() {
+      exportListGongCheng({}, `${this.$route.meta.title}`)
+        .then(res => {
+          console.log('chengg')
+          this.$message({
+            message: '下载成功',
+            type: 'success'
+          })
+        })
+        .catch(err => {
+          this.$message.error('下载失败')
+        })
+    },
     getList() {
       this.listLoading = true
       const params = {
@@ -494,8 +515,8 @@ export default {
         this.$successMsg('编辑成功')
       })
     },
-     // 提交筛选表单
-     submitScreenForm() {
+    // 提交筛选表单
+    submitScreenForm() {
       this.currentPage = 1
       this.getList()
     },
@@ -505,7 +526,7 @@ export default {
       this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.getList()
-    },
+    }
   }
 }
 </script>

Some files were not shown because too many files changed in this diff