Browse Source

fix(客户管理):客户合并功能添加客户归属字段

wanglj 2 năm trước cách đây
mục cha
commit
918d589b8d

+ 14 - 2
src/views/customer/components/Merge.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-27 09:33:48
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-05 09:15:31
+ * @LastEditTime: 2023-01-09 11:32:51
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\components\Merge.vue
 -->
@@ -26,6 +26,7 @@
         <li :class="{ differ: flag.custLocation }">所在地区</li>
         <li :class="{ differ: flag.custAddress }">详细地址</li>
         <li :class="{ differ: flag.remark }">备注</li>
+        <li :class="{ differ: flag.salesName }">客户归属</li>
       </ul>
       <ul v-for="(item, index) in list" :key="index" class="each">
         <li>
@@ -55,6 +56,9 @@
         <li>
           <el-radio v-model="form.remark" :label="item.remark" />
         </li>
+        <li>
+          <el-radio v-model="form.salesName" :label="item.salesName" @change="saleChange(item)" />
+        </li>
       </ul>
     </div>
     <span slot="footer">
@@ -84,6 +88,8 @@
           custIndustry: '', // 客户行业  (没数据)
           custLevel: '', // 客户级别  (没数据)
           source: '', //客户来源
+          salesId: '', //归属销售
+          salesName: '', //销售名称
         },
         flag: {
           custName: false, // 客户名称
@@ -95,6 +101,7 @@
           custIndustry: false, // 客户行业  (没数据)
           custLevel: false, // 客户级别  (没数据)
           source: false, //客户来源
+          salesName: false,
         },
         list: [],
         width: '60%',
@@ -119,9 +126,14 @@
         this.form.id = row.id
         this.form.ChooseId = this.ids.filter((item) => item != row.id)
       },
+      saleChange(row) {
+        this.form.salesId = row.salesId
+      },
       handleClose() {},
       async handleConfirm() {
         let params = { ...this.form }
+        params.saleName = params.salesName
+        if (!params.followUpDate) params.followUpDate = null
         const [err, res] = await to(api.mergeCustomer(params))
         if (err) return
         this.$message.success(res.msg)
@@ -150,7 +162,7 @@
   }
 
   .merge {
-    height: 361px;
+    height: 401px;
     overflow-y: auto;
     display: flex;
 

+ 1 - 16
src/views/customer/list.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 16:34:37
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-05 13:39:44
+ * @LastEditTime: 2023-01-09 11:39:29
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\list.vue
 -->
@@ -62,21 +62,6 @@
       height="calc(100vh - 394px)"
       @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
-
-      <el-table-column align="center" label="客户编码" prop="custCode" />
-      <el-table-column align="center" label="客户名称" prop="custName" />
-      <el-table-column align="center" label="助记名" prop="abbrName" />
-      <el-table-column align="center" label="所在地区" prop="custLocation" />
-
-      <el-table-column align="center" label="客户行业" prop="custIndustry" />
-
-      <el-table-column align="center" label="客户级别" prop="custLevel" />
-      <el-table-column align="center" label="客户状态" prop="custStatus">
-        <template slot-scope="scope">
-          {{ scope.row.custStatus == 10 ? '正常' : '异常' }}
-        </template>
-      </el-table-column>
-
       <el-table-column
         v-for="(item, index) in finallyColumns"
         :key="index"

+ 1 - 13
src/views/customer/openSea.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-15 15:38:21
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-05 11:38:01
+ * @LastEditTime: 2023-01-09 11:42:18
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\openSea.vue
 -->
@@ -386,18 +386,6 @@
               this.fetchData()
             }
           })
-
-          .then(async () => {
-            const [err, res] = await to(api.receiveCustomer({ ids: arr, salesId: 1 }))
-            if (err) return
-            if (res.code == 200) {
-              this.$message({
-                type: 'success',
-                message: '领取成功!',
-              })
-            }
-          })
-
           .catch((err) => console.log(err))
       },
     },