Prechádzať zdrojové kódy

提交销售订单相关代码

Lijy 11 mesiacov pred
rodič
commit
d51a846ece
19 zmenil súbory, kde vykonal 109 pridanie a 71 odobranie
  1. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/taskFunction.ts
  2. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/deteleTables.vue
  3. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue
  4. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/deteleTables.vue
  5. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/detail/index.vue
  6. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/deteleTables.vue
  7. 1 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedOrders.vue
  8. 2 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue
  9. 5 5
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts
  10. 18 12
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/deteleTables.vue
  11. 33 23
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/information.vue
  12. 2 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/products.vue
  13. 7 3
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/rebate.vue
  14. 3 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/detail/index.vue
  15. 21 12
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue
  16. 8 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/component/relatedSalesOrder.vue
  17. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/register.vue
  18. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue
  19. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/taskFunction.ts

@@ -24,7 +24,7 @@ export async function createTask(submitData: any, isClose: boolean) : Promise<Ta
         post(ADD_TASK, getFromValue(params)).then(() => {
             resolve({ saveLoading: '3', isClose })
         }).catch((err) => {
-            reject({ saveLoading: '4', isClose, message: err.message })
+            reject({ saveLoading: '4', isClose, message: err.msg })
         })
     })
 }

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/deteleTables.vue

@@ -100,7 +100,7 @@ function businessOperationItem(value: string | number, label: string, type: oper
             getTableList()
             changeBatch(false)
         }).catch((err) => {
-            globalPopup?.showError(err.message)
+            globalPopup?.showError(err.msg)
         })
     })
 }

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

@@ -356,7 +356,7 @@ function businessDeteleItem(value: string | number, label: string, batch: boolea
       changeBatch(false)
       getBusinessTableList()
     }).catch((err) => {
-      globalPopup?.showError(err.message)
+      globalPopup?.showError(err.msg)
     })
   })
 }

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

@@ -100,7 +100,7 @@ function businessOperationItem(value: string | number, label: string, type: oper
             getTableList()
             changeBatch(false)
         }).catch((err) => {
-            globalPopup?.showError(err.message)
+            globalPopup?.showError(err.msg)
         })
     })
 }

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/detail/index.vue

@@ -81,7 +81,7 @@ function getAllContacts() {
     post(URL_GETALL, {}).then(({ data }) => {
         options.value = (data || []).map((item: any) => ({ value: item.id, label: item.name }))
     }).catch((err) => {
-        globalPopup?.showError(err.message)
+        globalPopup?.showError(err.msg)
     })
 }
 

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/deteleTables.vue

@@ -103,7 +103,7 @@ function operationItem(value: string | number, label: string, type: operationTyp
             getTableList()
             changeBatch(false)
         }).catch((err) => {
-            globalPopup?.showError(err.message)
+            globalPopup?.showError(err.msg)
         })
     })
 }

+ 1 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedOrders.vue

@@ -103,6 +103,7 @@ function saveOrder(flag: boolean) {
             ...res,
             orderEndDate: res.orderEndDate ? formatDate(res.orderEndDate) : '',
             orderStartDate: res.orderStartDate ? formatDate(res.orderStartDate) : '',
+            placeTime: res.placeTime ? formatDate(res.placeTime) : '',
             orderProductDetailString: produt
         }).then((_res) => {
             allVisible.editOrderVisible = flag

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

@@ -78,7 +78,7 @@
             <el-table-column prop="companyPhone" label="公司电话" width="180"></el-table-column>
             <el-table-column prop="email" label="邮箱" width="200"></el-table-column>
             <el-table-column prop="customerIndustryValue" label="客户行业" width="180"></el-table-column>
-            <el-table-column prop="customerLevelValue" label="客户级别" width="180" sortable></el-table-column>
+            <el-table-column prop="customerLevelValue" label="客户级别" width="180" sortable="custom"></el-table-column>
             <el-table-column prop="inchargerName" label="负责人" width="190"></el-table-column>
             <el-table-column prop="creatorName" label="创建人" width="180"></el-table-column>
             <el-table-column prop="newCreateTime" label="创建时间" width="180"></el-table-column>
@@ -352,7 +352,7 @@ function customerDeteleItem(value: string | number, label: string, batch: boolea
       changeBatch(false)
       getCustomerTable()
     }).catch((err) => {
-      globalPopup?.showError(err.message)
+      globalPopup?.showError(err.msg)
     })
   })
 }

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

@@ -27,16 +27,16 @@ export const tableColumns: TableColumn[] = [
     { prop: 'orderName', label: '订单名称', width: '150' },
     { prop: 'customName', label: '客户名称', width: '200' },
     { prop: 'businessOpportunityName', label: '商机名称', width: '200' },
-    { prop: 'price', label: '订单金额(¥)', width: '100' },
+    { prop: 'price', label: '订单金额(¥)', width: '120' },
     { prop: 'receivedPayment', label: '已回款(¥)', width: '100' },
     { prop: 'unReceivedPayment', label: '未回款(¥)', width: '100' },
-    { prop: 'status', label: '回放状态', width: '100' },
+    { prop: 'statusValue', label: '回款状态', width: '100' },
     { prop: 'typeName', label: '订单类型', width: '200' },
     { prop: 'placeTime', label: '下单时间', width: '200' },
     { prop: 'orderStartDate', label: '订单开始时间', width: '200' },
-    { prop: 'orderEndDate', label: '订单结束时间', width: '200' },
-    { prop: 'customSigner', label: '客户签的人', width: '200' },
-    { prop: 'companySigner', label: '公司签的人', width: '200' },
+    { prop: 'orderEndDate', label: '订单结束时间', width: '140' },
+    { prop: 'customSignerName', label: '客户签的人', width: '140' },
+    { prop: 'companySignerName', label: '公司签的人', width: '200' },
     { prop: 'inchargerName', label: '负责人', width: '200' },
     { prop: 'creatorName', label: '创建人', width: '200' },
     { prop: 'createTime', label: '创建时间', width: '200' },

+ 18 - 12
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/deteleTables.vue

@@ -5,10 +5,10 @@
             <div class="flex justify-between items-center border-b pb-3 dialog-header">
                 <h4 :id="titleId">销售订单回收站</h4>
                 <div>
-                    <el-button type="primary" v-loading="allLoading.batchRecoveryLoading" :disabled="batchTableData.length == 0"
-                        @click="batchOperation('恢复')">批量恢复</el-button>
-                    <el-button type="primary" v-loading="allLoading.batchDeteleLoading" :disabled="batchTableData.length == 0"
-                        @click="batchOperation('删除')">批量删除</el-button>
+                    <el-button type="primary" v-loading="allLoading.batchRecoveryLoading"
+                        :disabled="batchTableData.length == 0" @click="batchOperation('恢复')">批量恢复</el-button>
+                    <el-button type="primary" v-loading="allLoading.batchDeteleLoading"
+                        :disabled="batchTableData.length == 0" @click="batchOperation('删除')">批量删除</el-button>
                     <el-button @click="cancel()">取消</el-button>
                 </div>
             </div>
@@ -18,8 +18,8 @@
                 <el-table ref="busiessTableRef" :data="deteleBusinessTable" border v-loading="allLoading.tableLoading"
                     @selection-change="changeBatch" style="width: 100%;height: 100%;">
                     <el-table-column type="selection" width="55" />
-                    <el-table-column v-for="(item, index) in tableColumns" :prop="item.prop" :label="item.label" :key="index"
-                        :width="item.width">
+                    <el-table-column v-for="(item, index) in tableColumns" :prop="item.prop" :label="item.label"
+                        :key="index" :width="item.width">
                         <template #default="scope">
                             <span>{{ scope.row[item.prop] }}</span>
                         </template>
@@ -27,9 +27,9 @@
                     <el-table-column label="操作" fixed="right" width="120">
                         <template #default="scope">
                             <el-button link type="primary" size="large"
-                                @click="businessOperationItem(scope.row.id, scope.row.name, '恢复')">恢复</el-button>
+                                @click="businessOperationItem(scope.row.id, scope.row.orderName, '恢复')">恢复</el-button>
                             <el-button link type="danger" size="large"
-                                @click="businessOperationItem(scope.row.id, scope.row.name, '删除')">删除</el-button>
+                                @click="businessOperationItem(scope.row.id, scope.row.orderName, '删除')">删除</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -45,7 +45,7 @@
 <script lang="ts" setup>
 import { post } from '@/utils/request';
 import { ref, reactive, onMounted, watchEffect, watch, inject } from 'vue'
-import { GETTABLELIST, tableColumns, URL_BATCHDELETE, URL_RECOVER } from '../api';
+import { GETTABLELIST, paymentStatus, tableColumns, URL_BATCHDELETE, URL_RECOVER } from '../api';
 import { ElTable } from 'element-plus';
 import { confirmAction } from '@/utils/tools';
 import { formatDate } from '@/utils/times';
@@ -84,7 +84,7 @@ watch(() => props.visibles, (newVal) => {
 
 function batchOperation(type: operationType) {
     const value = batchTableData.value.map((item: any) => item.id).join(',')
-    const label = batchTableData.value.map((item: any) => item.name).join(',')
+    const label = batchTableData.value.map((item: any) => item.orderName).join(',')
     businessOperationItem(value, label, type, true)
 }
 
@@ -101,7 +101,7 @@ function businessOperationItem(value: string | number, label: string, type: oper
             getTableList()
             changeBatch(false)
         }).catch((err) => {
-            globalPopup?.showError(err.message)
+            globalPopup?.showError(err.msg)
         })
     })
 }
@@ -120,7 +120,13 @@ function getTableList() {
     post(GETTABLELIST, { ...tableForm, isDelete: 1 }).then((res) => {
         if (res.code == 'ok') {
             const { record, total } = res.data
-            deteleBusinessTable.value = record
+            deteleBusinessTable.value = (record || []).map((item: any) => {
+                let val = paymentStatus.find((items: any) => items.value == item.status)
+                return {
+                    ...item,
+                    statusValue: val ? val.label : ''
+                }
+            })
             businessTotalTable.value = total
         }
     }).finally(() => {

+ 33 - 23
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/information.vue

@@ -4,13 +4,14 @@
             <div class="title">基本信息</div>
             <div>
                 <el-button type="primary" @click="transferCli()">转移</el-button>
-                <el-button type="primary" @click="editInfo(info)">编辑</el-button>
+                <el-button type="primary" v-permission="['orderEdit']" @click="editInfo(info)">编辑</el-button>
             </div>
         </div>
         <div class="form flex flex-wrap justify-between">
-            <div v-for="item in formItems" :key="item.label" class="formItem flex" :style="{ width: item.width }">
+            <div v-for="item in formItems" :key="item.label" class="formItem flex" :style="`width: ${item.width}`">
                 <div :class="item.labelClass">{{ item.label }}:</div>
-                <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1">{{ item.value }}</div>
+                <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1" v-ellipsis-tooltip>{{
+                    item.value }}</div>
             </div>
         </div>
 
@@ -62,7 +63,7 @@ import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffec
 import { GenerateForm } from '@zmjs/form-design';
 import { getFromValue, getTemplateKey } from '@/utils/tools';
 import { get, post } from '@/utils/request';
-import { GETGENERATEFOEM, GETPERSONNEL, URL_OEDERUPDATE, URL_PRODUTWITHORDER, URL_TRANSFER } from '../api';
+import { GETGENERATEFOEM, GETPERSONNEL, URL_OEDERUPDATE, URL_PRODUTWITHORDER, URL_TRANSFER, paymentStatus } from '../api';
 import { formatDate } from '@/utils/times';
 
 const globalPopup = inject<GlobalPopup>('globalPopup')
@@ -102,6 +103,7 @@ function editOrderSave() {
             ...res,
             orderEndDate: res.orderEndDate ? formatDate(res.orderEndDate) : '',
             orderStartDate: res.orderStartDate ? formatDate(res.orderStartDate) : '',
+            placeTime: res.placeTime ? formatDate(res.placeTime) : '',
             orderProductDetailString: JSON.stringify(productTableListValue.value || [])
         }).then((_res) => {
             closeVisible('editOrderVisible')
@@ -178,32 +180,38 @@ function closeVisible(type: keyof typeof allVisible) {
 }
 
 const formItems = reactive([
-    { label: '订单编号', key: 'orderCode', value: '', labelClass: 'w-20 text-right text-gray-500', width: '48%' },
-    { label: '订单名称', key: 'orderName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '客户名称', key: 'customName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '商机名称', key: 'businessOpportunityName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '订单金额', key: 'price', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '回款状态', key: 'receivedStatus', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '已回款金额', key: 'receivedPayment', value: '', labelClass: 'w-24 text-right text-gray-500', width: '48%' },
-    { label: '未回款', key: 'unReceivedPayment', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '订单类型', key: 'type', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '下单时间', key: 'placeTime', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '订单开始时间', key: 'orderStartDate', value: '', labelClass: 'w-30 text-right text-gray-500', width: '48%' },
-    { label: '订单结束时间', key: 'orderEndDate', value: '', labelClass: 'w-30 text-right text-gray-500', width: '48%' },
-    { label: '负责人', key: 'inchargerName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '创建人', key: 'createName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '创建时间', key: 'createTime', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
-    { label: '客户签约人', key: 'customSigner', value: '', labelClass: 'w-24 text-right text-gray-500', width: '48%' },
-    { label: '公司签约人', key: 'companySigner', value: '', labelClass: 'w-24 text-right text-gray-500', width: '48%' },
-    { label: '备注', key: 'remark', value: '', labelClass: 'w-22 text-right text-gray-500', width: '100%' },
+    { label: '订单编号', key: 'orderCode', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '订单名称', key: 'orderName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '客户名称', key: 'customName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '商机名称', key: 'businessOpportunityName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '订单金额', key: 'price', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '回款状态', key: 'statusValue', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '已回款金额', key: 'receivedPayment', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '未回款', key: 'unReceivedPayment', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '订单类型', key: 'type', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '下单时间', key: 'placeTime', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '订单开始时间', key: 'orderStartDate', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '订单结束时间', key: 'orderEndDate', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '负责人', key: 'inchargerName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '创建人', key: 'creatorName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '创建时间', key: 'createTime', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '客户签约人', key: 'customSigner', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '公司签约人', key: 'companySigner', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: '备注', key: 'remark', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '100%' },
 ])
 
 watchEffect(() => {
     const { data } = props
     info.value = data
     formItems.forEach(item => {
-        item.value = info.value[item.key] || '';
+        if (item.key === 'statusValue') {
+            const status = info.value['status'];
+            item.value = status !== '' && status !== null ? (paymentStatus.find(p => p.value === status)?.label || '') : '';
+        } else {
+            item.value = info.value[item.key] || '';
+        }
     });
+
 })
 
 async function getSystemField() {
@@ -234,6 +242,8 @@ onMounted(async () => {
 
     .form {
         .formItem {
+            width: 48%;
+
             .text {
                 display: -webkit-box;
                 /* Safari */

+ 2 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/products.vue

@@ -2,7 +2,7 @@
     <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
         <div class="flex justify-between">
             <div class="title">相关产品</div>
-            <div class="flex">
+            <div class="flex" v-permission="['productEdit']">
                 <el-button type="primary" @click="productClick()">编辑产品</el-button>
             </div>
         </div>
@@ -97,6 +97,7 @@ function saveOrder() {
         ...items,
         orderEndDate: items.orderEndDate ? items.orderEndDate : '',
         orderStartDate: items.orderStartDate ? items.orderStartDate : '',
+        placeTime: items.placeTime ? formatDate(items.placeTime) : '',
         orderProductDetailString: produt
     }).then(() => {
         globalPopup?.showSuccess('操作成功')

+ 7 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/rebate.vue

@@ -2,7 +2,7 @@
     <div class="operationRecord pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
         <div class="flex justify-between">
             <div class="title">回款</div>
-            <div class="flex">
+            <div class="flex" v-permission="['orderEdit']">
                 <el-button type="primary" @click="editRebate(false)">新增回款</el-button>
             </div>
         </div>
@@ -98,8 +98,12 @@ function editRebate(item: any) {
 }
 
 function saveRebate() {
-    if (!mony.value || mony.value == '.') {
-        globalPopup?.showWarning('请输入金额')
+    if (!mony.value || mony.value == '.' || Number(mony.value as string) < 0) {
+        globalPopup?.showWarning(Number(mony.value as string) < 0 ? '请不要输入负数' : '请输入金额')
+        return
+    }
+    if(Number(mony.value as string) > info.value.unReceivedPayment) {
+        globalPopup?.showWarning('回款金额超过了未回款金额')
         return
     }
     allLoading.rebateLoading = true

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

@@ -94,7 +94,7 @@ function getAllContacts() {
         options.value = (data.record || []).map((item: any) => ({ value: item.id, label: item.orderName }))
         values.value = rowId.value
     }).catch((err) => {
-        globalPopup?.showError(err.message)
+        globalPopup?.showError(err.msg)
     })
 }
 
@@ -157,12 +157,13 @@ async function getAll(event: allTypeStr) {
         } else if (event == 'getFileList') {
             await getFileList()
         } else if (event == 'getRelatedTasks') {
-            await getFileList()
+            await getRelatedTasks()
         } else if (event == 'getOperationRecord') {
             await getOperationRecord()
         } else if (event == 'getRelatedProducts') {
             await getRelatedProducts()
         } else if (event == 'getPaymentCollectionList') {
+            await getDetail()
             await getPaymentCollectionList()
         }
 

+ 21 - 12
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -36,31 +36,32 @@
       <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
         <div class="flex justify-end pb-3">
           <!-- 操作按钮 -->
-          <el-button type="primary" @click="editOrder(false)">新建订单</el-button>
+          <el-button type="primary" v-permission="['orderAdd']" @click="editOrder(false)">新建订单</el-button>
           <el-button type="primary" :disabled="batchTableData.length <= 0">批量转移</el-button>
           <el-button type="primary" @click="batchDeteleItem()" :disabled="batchTableData.length <= 0">批量删除</el-button>
           <el-button type="primary" @click="showVisible('deteleOrderVisible')">回收站</el-button>
-          <el-button type="primary" @click="showVisible('importVisible')">导入</el-button>
-          <el-button type="primary" @click="exportOrderTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
+          <el-button type="primary" v-permission="['orderImport']" @click="showVisible('importVisible')">导入</el-button>
+          <el-button type="primary" v-permission="['orderExport']" @click="exportOrderTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
         </div>
         <div class="flex-1 w-full overflow-hidden">
           <!-- 表格 -->
-          <el-table ref="otherTableRef" :data="formTable" border v-loading="allLoading.formTableLading"
+          <el-table ref="otherTableRef" :data="formTable" :show-overflow-tooltip="tableShowOverflowTooltip" border v-loading="allLoading.formTableLading"
             style="width: 100%;height: 100%;" @selection-change="changeBatch">
             <el-table-column type="selection" width="55" />
             <el-table-column v-for="(column, index) in tableColumns" :key="index" :prop="column.prop"
               :label="column.label" :width="column.width">
               <template #default="scope">
                 <template v-if="column.event === 'toDetali'">
-                  <el-button link type="primary" size="large" @click="toDetali(scope.row)">{{ scope.row[column.prop]
-                  }}</el-button>
+                  <!-- <el-button link type="primary" size="large" @click="toDetali(scope.row)">{{ scope.row[column.prop]
+                  }}</el-button> -->
+                  <div class="table-text-textnowrap" @click.prevent="toDetali(scope.row)">{{ scope.row[column.prop] }}</div>
                 </template>
               </template>
             </el-table-column>
-            <el-table-column :label="'操作'" :width="'200px'" fixed="right">
+            <el-table-column :label="'操作'" :width="'200px'" fixed="right" v-permission="['orderEdit']">
               <template #default="scope">
                 <el-button link type="primary" size="large" @click="editOrder(scope.row)">编辑</el-button>
-                <el-button link type="primary" size="large" @click="newTask(scope.row)">新建任务</el-button>
+                <el-button link type="primary" size="large" v-permission="['tasksEdit']" @click="newTask(scope.row)">新建任务</el-button>
                 <el-button link type="danger" size="large"
                   @click="orderDeteleItem(scope.row.id, scope.row.orderName)">删除</el-button>
               </template>
@@ -132,12 +133,13 @@
 import { ref, reactive, onMounted, inject, defineExpose } from "vue";
 import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate, getTemplateKey, createTaskFromType, confirmAction, downloadFile, downloadTemplate } from '@/utils/tools'
 import { post, get, uploadFile } from "@/utils/request";
-import { tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD, GETTABLELIST, GETALLPRODUCT, GETTABLELISTPRODUCT, URL_OEDERUPDATE, URL_PRODUTWITHORDER, URL_DETELEITEM, EXPORTTIME, IMPORTMOD, IMPORITEM } from "./api";
+import { tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD, GETTABLELIST, GETALLPRODUCT, GETTABLELISTPRODUCT, URL_OEDERUPDATE, URL_PRODUTWITHORDER, URL_DETELEITEM, EXPORTTIME, IMPORTMOD, IMPORITEM, paymentStatus } from "./api";
 import { useRouter, useRoute } from "vue-router";
 import { GenerateForm } from '@zmjs/form-design';
 import { formatDateTime } from "@/utils/times";
 import { ElTable, UploadRequestOptions } from "element-plus";
 import { createTask } from "@/components/TaskModal/taskFunction";
+import { tableShowOverflowTooltip } from '@/utils/globalVariables'
 import { URL_FETALL } from "../customer/api";
 
 import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
@@ -244,7 +246,7 @@ function batchDeteleItem() {
 }
 
 function orderDeteleItem(value: string | number, label: string, batch: boolean = false) {
-  confirmAction(`确定${batch ? '批量' : ''}删除【${label}】客户吗?`).then(() => {
+  confirmAction(`确定${batch ? '批量' : ''}删除【${label}】销售订单吗?`).then(() => {
     post(URL_DETELEITEM, { ids: value }).then(res => {
       if (res.code != 'ok') {
         globalPopup?.showError(res.msg)
@@ -254,7 +256,7 @@ function orderDeteleItem(value: string | number, label: string, batch: boolean =
       changeBatch(false)
       getTableList()
     }).catch((err) => {
-      globalPopup?.showError(err.message)
+      globalPopup?.showError(err.msg)
     })
   })
 }
@@ -295,6 +297,7 @@ function saveOrder(flag: boolean) {
       ...res,
       orderEndDate: res.orderEndDate ? formatDate(res.orderEndDate) : '',
       orderStartDate: res.orderStartDate ? formatDate(res.orderStartDate) : '',
+      placeTime: res.placeTime ? formatDate(res.placeTime) : '',
       orderProductDetailString: produt
     }).then((_res) => {
       allVisible.editOrderVisible = flag
@@ -351,7 +354,13 @@ function getTableList() {
   allLoading.formTableLading = true
   post(GETTABLELIST, { ...formValue, ...formPaging }).then(res => {
     const { total, record } = res.data
-    formTable.value = record
+    formTable.value = (record || []).map((item: any) => {
+      let val = paymentStatus.find((items: any) => items.value == item.status)
+      return {
+        ...item,
+        statusValue: val ? val.label : ''
+      }
+    })
     formTablePaging.total = total
   }).finally(() => {
     allLoading.formTableLading = false

+ 8 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/component/relatedSalesOrder.vue

@@ -26,7 +26,7 @@
 </template>
 <script lang="ts" setup>
 import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffect } from 'vue'
-import { tableColumns, MOD } from '@/pages/order/api'
+import { tableColumns, MOD, paymentStatus } from '@/pages/order/api'
 import router from '@/router';
 
 const relatedTaskstable = ref([])
@@ -37,7 +37,13 @@ const props = defineProps<{
 
 // 接收参数赋值
 function receiveAssignment(item: any) {
-    relatedTaskstable.value = item.data
+    relatedTaskstable.value = (item.data || []).map((item: any) => {
+      let val = paymentStatus.find((items: any) => items.value == item.status)
+      return {
+        ...item,
+        statusValue: val ? val.label : ''
+      }
+    })
 }
 
 function toDetali(row: any) {

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/register.vue

@@ -163,7 +163,7 @@ const register = (formEl: FormInstance | undefined) => {
         registerLoading.value = false;
       }
     }).catch(err => {
-      globalPopup?.showError(err.message || err.msg || "注册失败")
+      globalPopup?.showError(err.msg || err.msg || "注册失败")
       registerLoading.value = false;
     })
 

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue

@@ -208,7 +208,7 @@ function submitForm(data: any, isClose: boolean) {
     search();
   }).catch(err => {
     taskLoading.value = "4"
-    globalPopup?.showError(err.message)
+    globalPopup?.showError(err.msg)
   })
 
 }

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue

@@ -72,7 +72,7 @@
             <el-table-column prop="phone" label="电话号码" width="180"></el-table-column>
             <el-table-column prop="email" label="邮箱" width="180"></el-table-column>
             <el-table-column prop="customerIndustryValue" label="客户行业" width="180"></el-table-column>
-            <el-table-column prop="customerLevelValue" label="客户级别" width="180" sortable></el-table-column>
+            <el-table-column prop="customerLevelValue" label="客户级别" width="180" sortable="custom"></el-table-column>
             <el-table-column prop="inchargerName" label="负责人" width="190"></el-table-column>
             <el-table-column prop="createName" label="创建人" width="180"></el-table-column>
             <el-table-column prop="createTime" label="创建时间" width="180"></el-table-column>