Jelajahi Sumber

提交配置文件,调整字段

Lijy 1 tahun lalu
induk
melakukan
82e886ce20

+ 21 - 11
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -66,23 +66,23 @@
                 }}</el-button>
               </template>
             </el-table-column>
-            <el-table-column prop="clueSourceId" label="客户名称" width="180"></el-table-column>
-            <el-table-column prop="phone" label="联系人" width="180">
+            <el-table-column prop="customerName" label="客户名称" width="180"></el-table-column>
+            <el-table-column prop="contactsName" label="联系人" width="180">
               <template #default="scope">
                 <el-button link type="primary" size="large">{{
-                  scope.row.phone
+                  scope.row.contactsName
                 }}</el-button>
               </template>
             </el-table-column>
-            <el-table-column prop="email" label="商机金额" width="180"></el-table-column>
-            <el-table-column prop="customerIndustryId" label="商机阶段" width="180"></el-table-column>
-            <el-table-column prop="customerLevelId" label="预计成交" width="180"></el-table-column>
-            <el-table-column prop="inchargerId" label="负责人" width="180"></el-table-column>
-            <el-table-column prop="createName" label="创建人" width="180"></el-table-column>
+            <el-table-column prop="amountOfMoney" label="商机金额" width="180"></el-table-column>
+            <el-table-column prop="stageValue" label="商机阶段" width="180"></el-table-column>
+            <el-table-column prop="expectedTransactionDate" label="预计成交" width="180"></el-table-column>
+            <el-table-column prop="inchargerName" label="负责人" width="180"></el-table-column>
+            <el-table-column prop="creatorName" label="创建人" width="180"></el-table-column>
             <el-table-column prop="createTime" 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" @click="editShowVisible('newBusinessisible', scope.row)">编辑</el-button>
                 <el-button link type="primary" size="large">新建任务</el-button>
                 <el-button link type="danger" size="large">删除</el-button>
               </template>
@@ -179,7 +179,7 @@ function editBusiness(visibles: boolean) {
     let newForm = {
       ...res,
       expectedTransactionDate: res.expectedTransactionDate ? formatDate(new Date(res.expectedTransactionDate)) : '',
-      businessItemProductList: productTableListData ? JSON.stringify(productTableListData) : []
+      // businessItemProductList: productTableListData ? JSON.stringify(productTableListData) : []
     }
     allLoading.businessSaveLading = true
     post(UPDATEINSET, { ...newForm }).then((_res) => {
@@ -195,6 +195,11 @@ function editBusiness(visibles: boolean) {
   })
 }
 
+function editShowVisible(type: keyof typeof allVisible, item: any) {
+  console.log(item, '选择数据')
+  showVisible(type)
+}
+
 function showVisible(type: keyof typeof allVisible) { // 显示弹窗
   allVisible[type] = true
 }
@@ -211,7 +216,12 @@ function getBusinessTableList() {
   const formValue = getFromValue(businessOpportunityForm)
   post(GETBUSINESSLIST, { ...formValue }).then((res) => {
     const { data, total } = res.data
-    businessTable.value = data
+    businessTable.value = data.map((item: any) => {
+      return {
+        ...item,
+        expectedTransactionDate: formatDate(new Date(item.expectedTransactionDate))
+      }
+    })
     businessTotalTable.value = total
   })
 }

+ 6 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/request.ts

@@ -31,6 +31,7 @@ instance.interceptors.response.use(
   (response: AxiosResponse) => {
     // 对响应数据进行处理
     if (response.status != 200) {
+      ElNotification.closeAll()
       ElNotification({
         message: showMessage(response.status), // 传入响应码,匹配响应码对应信息,
         type: "error",
@@ -39,6 +40,11 @@ instance.interceptors.response.use(
     return response;
   },
   (error: AxiosError) => {
+    ElNotification.closeAll()
+    ElNotification({
+      message: showMessage(error.request.status), // 传入响应码,匹配响应码对应信息,
+      type: "error",
+    });
     // 处理响应错误
     return Promise.reject(error);
   }