Prechádzať zdrojové kódy

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Guo1B0 10 mesiacov pred
rodič
commit
781c38e6fa

+ 19 - 12
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -52,9 +52,11 @@
             @click="editNewBusiness(false)">新建商机</el-button>
           <el-button type="primary" @click="showVisible('batchTransferVisible')"
             :disabled="batchTableData.length <= 0">批量转移</el-button>
-          <el-button type="primary" v-permission="['businessDelete']" @click="batchDeteleItem()" :disabled="batchTableData.length <= 0">批量删除</el-button>
+          <el-button type="primary" v-permission="['businessDelete']" @click="batchDeteleItem()"
+            :disabled="batchTableData.length <= 0">批量删除</el-button>
           <el-button type="primary" @click="showVisible('stageSetVisible')">阶段设置</el-button>
-          <el-button type="primary" v-permission="['businessRecycle']" @click="showVisible('deteleBusinessVisible')">回收站</el-button>
+          <el-button type="primary" v-permission="['businessRecycle']"
+            @click="showVisible('deteleBusinessVisible')">回收站</el-button>
           <el-button v-permission="['businessImport']" type="primary"
             @click="showVisible('importVisible')">导入</el-button>
           <el-button v-permission="['businessExport']" type="primary" @click="exportBusinessTableList()"
@@ -68,11 +70,13 @@
             <el-table-column v-for="(item, index) in tableColumn" :prop="item.prop" :label="item.label" :key="index"
               :width="item.width">
               <template #default="scope">
-                <div class="table-text-textnowrap" v-if="item.eventName" @click="dealWithTableColumn(scope.row, item.eventName)">{{ scope.row[item.prop] }}</div>
+                <div class="table-text-textnowrap" v-if="item.eventName"
+                  @click="dealWithTableColumn(scope.row, item.eventName)">{{ scope.row[item.prop] }}</div>
                 <template v-else>{{ scope.row[item.prop] }}</template>
               </template>
             </el-table-column>
-            <el-table-column label="操作" fixed="right" width="200" v-permission="['businessAddAnEdit', 'tasksAdd', 'businessDelete']">
+            <el-table-column label="操作" fixed="right" width="200"
+              v-permission="['businessAddAnEdit', 'tasksAdd', 'businessDelete']">
               <template #default="scope">
                 <el-button link type="primary" size="large" @click="editNewBusiness(scope.row)"
                   v-permission="['businessAddAnEdit']">编辑</el-button>
@@ -99,7 +103,8 @@
           <h4 :id="titleId">{{ allText.newBusinessisibleText }}</h4>
           <div>
             <el-button type="primary" :loading="allLoading.newBusinessSaveLading"
-              :disabled="allLoading.businessSaveLading" @click="editBusiness(true)" v-if="!businessTemplateValue.id">保存并新建</el-button>
+              :disabled="allLoading.businessSaveLading" @click="editBusiness(true)"
+              v-if="!businessTemplateValue.id">保存并新建</el-button>
             <el-button type="primary" @click="editBusiness(false)" :loading="allLoading.businessSaveLading"
               :disabled="allLoading.newBusinessSaveLading">保存</el-button>
             <el-button @click="closeVisible('newBusinessisible')">取消</el-button>
@@ -271,13 +276,15 @@ function editBusiness(visibles: boolean) {
       businessItemProductList: productTableListData ? JSON.stringify(productTableListData) : []
     }
     allLoading.businessSaveLading = true
-    post(UPDATEINSET, { ...businessTemplateValue.value, ...newForm }).then((_res) => {
-      allVisible.newBusinessisible = visibles
-      globalPopup?.showSuccess('保存成功')
-      getBusinessTableList()
-    }).finally(() => {
-      allLoading.businessSaveLading = false
-    })
+    setTimeout(() => {
+      post(UPDATEINSET, { ...businessTemplateValue.value, ...newForm }).then((_res) => {
+        allVisible.newBusinessisible = visibles
+        globalPopup?.showSuccess('保存成功')
+        getBusinessTableList()
+      }).finally(() => {
+        allLoading.businessSaveLading = false
+      })
+    }, 1500)
   }).catch((_err: any) => {
     console.log(_err)
     globalPopup?.showError('请填写完整')

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/relatedBusiness.vue

@@ -143,7 +143,7 @@ function closeVisible(type: keyof typeof allVisible) {
 watchEffect(() => {
     const { data } = props
     information.value = data
-    relatedTaskstable.value = data.businessOpportunityList.map((item: any) => {
+    relatedTaskstable.value = (data.businessOpportunityList || []).map((item: any) => {
         return {
             ...item,
             expectedTransactionDate: item.expectedTransactionDate ? formatDate(new Date(item.expectedTransactionDate)) : ''

+ 10 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedContacts.vue

@@ -15,9 +15,9 @@
                 </el-table-column>
                 <el-table-column prop="name" label="联系人姓名">
                     <template #default="scope">
-                        <el-button link type="primary" size="large">{{
+                        <el-button link type="primary" size="large" @click="toPath(scope.row)">{{
                             scope.row.name
-                        }}</el-button>
+                            }}</el-button>
                     </template>
                 </el-table-column>
                 <el-table-column prop="phone" label="电话号码" width="130" />
@@ -56,6 +56,7 @@ import { GETGENERATEFOEM, URL_ADD } from '@/pages/contacts/api';
 import { get, post } from '@/utils/request';
 import { setTemplateDataDisable } from '@/utils/tools';
 import { GenerateForm } from '@zmjs/form-design';
+import router from '@/router';
 import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffect } from 'vue'
 
 const emits = defineEmits(['refreshData']);
@@ -104,6 +105,13 @@ function editContacts(data: any) {
     }, 1000);
 }
 
+function toPath(row: any) {
+    router.push({
+        path: `/contacts/detail`,
+        query: { id: row.id }
+    })
+}
+
 const allLoading = reactive({
     contactsTemplateRefLoading: false,
     editContactsSaveLoading: false

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

@@ -13,7 +13,7 @@
               </el-select>
             </el-form-item>
             <el-form-item label="公司号码">
-              <el-input v-model="customerCriteriaForm.telPhone" clearable placeholder="请输入"></el-input>
+              <el-input v-model="customerCriteriaForm.companyPhone" clearable placeholder="请输入"></el-input>
             </el-form-item>
             <el-form-item label="邮箱">
               <el-input v-model="customerCriteriaForm.email" clearable placeholder="请输入"></el-input>
@@ -208,7 +208,7 @@ interface personnelInterface {
 interface customerCriteriaFormType { // 线索筛选条件类型
   customName: string,
   customSourceId: string | number,
-  telPhone: string,
+  companyPhone: string,
   email: string,
   customerIndustryId: string | number,
   customerLevelId: string | number,
@@ -226,7 +226,7 @@ const globalPopup = inject<GlobalPopup>('globalPopup')
 const customerCriteriaForm = reactive<customerCriteriaFormType>({ // 筛选条件form
   customName: '',
   customSourceId: '',
-  telPhone: '',
+  companyPhone: '',
   email: '',
   customerIndustryId: '',
   customerLevelId: '',

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts

@@ -30,7 +30,7 @@ export const tableColumns: TableColumn[] = [
     { prop: 'price', label: '订单金额(¥)', width: '120' },
     { prop: 'receivedPayment', label: '已回款(¥)', width: '100' },
     { prop: 'unReceivedPayment', label: '未回款(¥)', width: '100' },
-    { prop: 'statusValue', label: '回款状态', width: '100' },
+    { prop: 'receivedStatus', label: '回款状态', width: '100' },
     { prop: 'typeName', label: '订单类型', width: '200' },
     { prop: 'placeTime', label: '下单时间', width: '200' },
     { prop: 'orderStartDate', label: '订单开始时间', width: '200' },

+ 4 - 4
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/operationRecord.vue

@@ -5,9 +5,9 @@
         </div>
         <div class="flex-1 overflow-auto pt-5">
             <el-table :data="operationRecordtable" border style="width: 100%;height: 278px;">
-                <el-table-column prop="operateDate" label="操作时间" width="150" />
-                <el-table-column prop="operateName" label="操作人" width="120" />
-                <el-table-column prop="msg" label="操作内容" />
+                <el-table-column prop="auditTime" label="操作时间" width="150" />
+                <el-table-column prop="auditorName" label="操作人" width="120" />
+                <el-table-column prop="auditorContent" label="操作内容" />
             </el-table>
         </div>
     </div>
@@ -22,7 +22,7 @@ const operationRecordtable = ref([])
 
 watchEffect(() => {
     const { data } = props
-    operationRecordtable.value = data.contactsLogList || []
+    operationRecordtable.value = data || []
 });
 // 生命周期钩子
 onMounted(() => {

+ 5 - 4
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/products.vue

@@ -96,7 +96,7 @@ function saveOrder() {
         ...items,
         orderEndDate: items.orderEndDate ? items.orderEndDate : '',
         orderStartDate: items.orderStartDate ? items.orderStartDate : '',
-        placeTime: items.placeTime ? formatDate(items.placeTime) : '',
+        placeTime: items.placeTime ? formatDate(new Date(items.placeTime)) : '',
         orderProductDetailString: produt
     }
     if((formVal.price || 0) < (formVal.receivedPayment || 0)) {
@@ -104,7 +104,7 @@ function saveOrder() {
       return
     }
     allLoading.editSaveLading = true
-    console.log(formVal, '<==== 将要传的值')
+    console.log(formVal, '<==== 将要传的值', items)
     post(URL_OEDERUPDATE, formVal).then(() => {
         globalPopup?.showSuccess('操作成功')
         allLoading.editSaveLading = false
@@ -160,8 +160,8 @@ async function getSystemField() {
     setInfoValue(info.value)
 }
 
-function setInfoValue(item: any) {
-    const templateKey = getTemplateKey(orderTemplate.value.list)
+async function setInfoValue(item: any) {
+    const templateKey = await getTemplateKey(orderTemplate.value.list)
     let formVal: templateKey = { id: item.id }
     for (let i = 0; i < templateKey.length; i++) {
         const key = templateKey[i]
@@ -174,6 +174,7 @@ watchEffect(() => {
     const { data, information } = props
     relatedTaskstable.value = data || []
     info.value = information || {}
+    setInfoValue(info.value)
 });
 
 // 生命周期钩子

+ 3 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -56,6 +56,9 @@
                   }}</el-button> -->
                   <div class="table-text-textnowrap" @click.prevent="toDetali(scope.row)">{{ scope.row[column.prop] }}</div>
                 </template>
+                <template v-if="column.prop === 'receivedStatus'">
+                  <div>{{ selectData.RemittanceStatus[scope.row.receivedStatus].name }}</div>
+                </template>
               </template>
             </el-table-column>
             <el-table-column :label="'操作'" :width="'200px'" fixed="right" v-permission="['orderEdit']">