Răsfoiți Sursa

订单管理-业务员类型值匹配

@dongkboy 4 luni în urmă
părinte
comite
b1f859ba2d
1 a modificat fișierele cu 7 adăugiri și 8 ștergeri
  1. 7 8
      src/views/insurancePolicy/order.vue

+ 7 - 8
src/views/insurancePolicy/order.vue

@@ -110,7 +110,7 @@
       <el-table-column label="业务员信息" prop="salesmanInfo" width="200"></el-table-column>
       <el-table-column label="业务员信息" prop="salesmanInfo" width="200"></el-table-column>
       <el-table-column label="业务员类型" prop="salesmanType" width="200">
       <el-table-column label="业务员类型" prop="salesmanType" width="200">
         <template #default="scope">
         <template #default="scope">
-          {{ typeAttrMap(scope.row.salesmanType) }}
+          {{ processPartnerTypeAttr(scope.row.salesmanType) }}
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column label="出单机构" prop="deptName" width="200"></el-table-column>
       <el-table-column label="出单机构" prop="deptName" width="200"></el-table-column>
@@ -267,20 +267,19 @@ const allFields = {
   ]
   ]
 };
 };
 
 
-const typeAttrMap=(value)=>{
+const processPartnerTypeAttr = (partnerTypeAttr: string) => {
   const map = {
   const map = {
-    "1": '前线人员',
-    "2": '后线人员',
-    "3": '合伙人',
-    "4": '工作是管理员',
     "5": '团队',
     "5": '团队',
     "6": '个代',
     "6": '个代',
     "7": '电销',
     "7": '电销',
     "8": '渠道',
     "8": '渠道',
   }
   }
-  return map[value]
+  // 将字符串转为数组
+  const arr = partnerTypeAttr.split(',').map(item => item.trim());
+  // 过滤掉等于1、2、3、4的数据
+  const filteredArr = arr.filter(item => !['1', '2', '3', '4'].includes(item));
+  return map[filteredArr];
 }
 }
-
 // 创建反向映射
 // 创建反向映射
 const fieldMap = Object.fromEntries(
 const fieldMap = Object.fromEntries(
   [...allFields.basic, ...allFields.other].map(item => [item.value, item.label])
   [...allFields.basic, ...allFields.other].map(item => [item.value, item.label])