Преглед изворни кода

客户管理-修复客户唯一性校验导致的保存失败;增加客户科室负责人的参照接口;修复查询参数重置不完全的问题;增加选择科室负责人时带出联系人手机。

DongZ пре 1 година
родитељ
комит
a74daf81d0

+ 26 - 0
src/components/popover-select/components/MKCMCONTACTS_PARAM.js

@@ -0,0 +1,26 @@
+// 客户管理科室负责人参照
+export default [{
+    item: {
+      key: "code",
+      title: "编码",
+      width: "auto"
+    },
+    attr: {},
+  },
+  {
+    item: {
+      key: "name",
+      title: "名称",
+      width: "auto"
+    },
+    attr: {},
+  },
+  {
+    item: {
+      key: "cell",
+      title: "联系电话",
+      width: "auto"
+    },
+    attr: {},
+  },
+];

+ 40 - 1
src/views/business/spd/cm/customers/index.vue

@@ -713,9 +713,47 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
-        this.resetForm("queryForm");
+        this.resetQueryParams();
         this.handleQuery();
       },
+      /** 查询参数重置 */
+      resetQueryParams() {
+        this.queryParams = {
+          abbreviation: null,
+          areaClassification: null,
+          billingCustomer: null,
+          billingCustomerName: null,
+          businessType: null,
+          category: null,
+          channel: null,
+          classification: null,
+          code: null,
+          detailedAddress: null,
+          enterpriseName: null,
+          enterpriseType: null,
+          firstBattalion: null,
+          industry: null,
+          latitude: null,
+          licenseNumber: null,
+          longitude: null,
+          marketingArea: null,
+          marketingAreaName: null,
+          name: null,
+          org: null,
+          orgName: null,
+          pageNum: 1,
+          pageSize: 10,
+          potential: null,
+          registrationArea: null,
+          responsibleDept: null,
+          responsibleDeptName: null,
+          responsiblePerson: null,
+          responsiblePersonName: null,
+          taxType: null,
+          type: null
+        };
+        this.resetForm("queryForm");
+      },
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.ids = selection.map(item => item.id)
@@ -763,6 +801,7 @@
         const id = row.id || this.ids
         getCustomers(id).then(response => {
           this.form = response.data;
+          this.form.oldName = response.data.name;
           this.mkCmCustomersResponsiblePersonList = response.data.mkCmCustomersResponsiblePersonList;
           this.mkCmCustomersDepartmentList = response.data.mkCmCustomersDepartmentList;
           this.openState = 'update';

+ 16 - 2
src/views/business/spd/cm/customersDepartment/index.vue

@@ -16,8 +16,8 @@
         <el-col :span="6">
           <el-form-item label="负责人姓名" prop="responsiblePersonName">
             <el-popover-select-v2 v-model="form.responsiblePersonName" title="负责人" valueKey="name"
-              referName="CONTACTS_PARAM" :dataMapping="{responsiblePerson: 'id', responsiblePersonName: 'name'}"
-              :source.sync="form" placeholder="请选择负责人" :disabled="disable" />
+              referName="MKCMCONTACTS_PARAM" :dataMapping="{responsiblePerson: 'id', responsiblePersonName: 'name', phone: 'cell'}"
+              :source.sync="form" :queryParams="referQuery" placeholder="请选择负责人" :disabled="disable" />
           </el-form-item>
         </el-col>
       </el-row>
@@ -103,6 +103,8 @@
         total: 0,
         // 客户科室表格数据
         customersDepartmentList: [],
+        // 当前操作人
+        operator: null,
         // 表单参数
         form: {
           id: null,
@@ -152,6 +154,8 @@
       if (this.pageStu == 'check' || this.pageStu == 'update') {
         this.getDetails(this.row);
       }
+      // 获取当前登录用户的编码
+      this.operator = this.$store.state.user.name;
     },
     methods: {
       // 取消按钮
@@ -186,6 +190,16 @@
           }
         })
       },
+      // 参照查询条件
+      referQuery() {
+        const parameter = {
+          parame: {
+            customersName: this.form.customersName,
+            operator: this.operator
+          }
+        };
+        return parameter;
+      }
     }
   };