Lijy 11 месяцев назад
Родитель
Сommit
b2fcbdb5a0

+ 7 - 6
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue

@@ -9,7 +9,7 @@
             </el-form-item>
             <el-form-item label="客户来源">
               <el-select v-model="customerCriteriaForm.customSourceId" placeholder="请选择">
-                <el-option v-for="item in fixedData.CustomSources" :key="item.id" :label="item.name" :value="item.id" />
+                <el-option v-for="item in fixedData.ClueSources" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
             <el-form-item label="电话号码">
@@ -80,8 +80,8 @@
             <el-table-column prop="newCreateTime" label="创建时间" width="180"></el-table-column>
             <el-table-column label="操作" fixed="right" width="200">
               <template #default="scope">
-                <el-button link type="primary" size="large">编辑</el-button>
-                <el-button link type="primary" size="large">新建客户</el-button>
+                <el-button link type="primary" size="large" @click="editCustomer(scope.row)">编辑</el-button>
+                <el-button link type="primary" size="large">新建任务</el-button>
                 <el-button link type="danger" size="large">删除</el-button>
               </template>
             </el-table-column>
@@ -182,7 +182,7 @@ const allText = reactive({
   editCustomerText: '新建客户',
 })
 const fixedData = reactive({
-  CustomSources: [] as fixedDataInterface[],
+  ClueSources: [] as fixedDataInterface[],
   CustomIndustry: [] as fixedDataInterface[],
   CustomLevel: [] as fixedDataInterface[],
   Personnel: [] as personnelInterface[]
@@ -218,7 +218,8 @@ function editCustomerSave(flag: boolean) {
 
 function editCustomer(row: any) { // row 有数据代表编辑
   if (row) {
-
+    const templateKey = customerTemplate.value.list.map((item: any) => item.model)
+    console.log(templateKey, '<==== key')
   } else { // 没有数据代表新建
     customerTemplateRef.value?.reset()
   }
@@ -258,7 +259,7 @@ function getCustomerTable() {
 }
 
 async function getSystemField() {
-  const systemField = getAllListByCode(['客户来源', '客户行业', '客户级别'])
+  const systemField = getAllListByCode(['线索来源', '客户行业', '客户级别'])
   for (let i in systemField) {
     const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
     for (let key of Object.keys(fixedData)) {