From 4c978564a6223e542ee2d4dd428ccf112536a16b Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 20 Dec 2023 19:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aftersales/aftersalesWorkOrder.js | 4 +- src/router/views/index.js | 32 ++ src/views/aftersales/aftersalesWorkOrder.vue | 2 +- .../aftersales/aftersalesWorkOrderAdd.vue | 34 +- .../aftersales/aftersalesWorkOrderInfo.vue | 2 +- .../aftersales/aftersalesWorkOrdermodify.vue | 393 +++++++++++------- .../signfor/distributionSignforedt.vue | 9 + vite.config.js | 4 +- 8 files changed, 310 insertions(+), 170 deletions(-) diff --git a/src/api/aftersales/aftersalesWorkOrder.js b/src/api/aftersales/aftersalesWorkOrder.js index c3e922d4..c51fe909 100644 --- a/src/api/aftersales/aftersalesWorkOrder.js +++ b/src/api/aftersales/aftersalesWorkOrder.js @@ -336,7 +336,7 @@ export const $_modifyData = (data) => { // 查询配送信息 export const $_shippingInformation = (data) => { return request({ - url: '/api/logpm-aftersales/deliveryList/shippingInformation', + url: '/api/logpm-aftersales/aftersalesWorkOrder/deliveryList/shippingInformation', method: 'post', data }) @@ -344,8 +344,6 @@ export const $_shippingInformation = (data) => { // 数据同步信息 - - export const $_syncOrder = (data) => { return request({ url: '/api/logpm-patch/syncOrderInfo/syncOrder', diff --git a/src/router/views/index.js b/src/router/views/index.js index 71536306..a6388ac7 100644 --- a/src/router/views/index.js +++ b/src/router/views/index.js @@ -1209,6 +1209,10 @@ export default [ redirect: '/aftersales/aftersalesWorkOrder', children: [ { + meta: { + i18n: 'dict', + keepAlive:false, + }, path: '/aftersales/aftersalesWorkOrder', name: '工单', component: () => import('@/views/aftersales/aftersalesWorkOrder.vue'), @@ -1221,6 +1225,10 @@ export default [ redirect: '/aftersales/aftersalesWorkOrderAdd', children: [ { + meta: { + i18n: 'dict', + keepAlive: false, + }, path: '/aftersales/aftersalesWorkOrderAdd', name: '工单新增', component: () => import('@/views/aftersales/aftersalesWorkOrderAdd.vue'), @@ -1234,6 +1242,10 @@ export default [ redirect: '/aftersales/aftersalesWorkOrderInfo', children: [ { + meta: { + i18n: 'dict', + keepAlive:false, + }, path: '/aftersales/aftersalesWorkOrderInfo', name: '工单详情查看', component: () => import('@/views/aftersales/aftersalesWorkOrderInfo.vue'), @@ -1247,6 +1259,10 @@ export default [ redirect: '/aftersales/aftersalesWorkOrderend', children: [ { + meta: { + i18n: 'dict', + keepAlive:false, + }, path: '/aftersales/aftersalesWorkOrderend', name: '工单完结', component: () => import('@/views/aftersales/aftersalesWorkOrderend.vue'), @@ -1259,6 +1275,10 @@ export default [ redirect: '/aftersales/WorkorderTimeout', children: [ { + meta: { + i18n: 'dict', + keepAlive:false, + }, path: '/aftersales/WorkorderTimeout', name: '工单超时罚款', component: () => import('@/views/aftersales/WorkorderTimeout.vue'), @@ -1271,6 +1291,10 @@ export default [ redirect: '/aftersales/customerService', children: [ { + meta: { + i18n: 'dict', + keepAlive: false, + }, path: '/aftersales/customerService', name: '客服回复', component: () => import('@/views/aftersales/customerService.vue'), @@ -1283,6 +1307,10 @@ export default [ redirect: '/aftersales/aftersalesWorkOrdermodify', children: [ { + meta: { + i18n: 'dict', + keepAlive: false, + }, path: '/aftersales/aftersalesWorkOrdermodify', name: '信息编辑', component: () => import('@/views/aftersales/aftersalesWorkOrdermodify.vue'), @@ -1296,6 +1324,10 @@ export default [ redirect: '/aftersales/DataSynchronization', children: [ { + meta: { + i18n: 'dict', + keepAlive: false, + }, path: '/aftersales/DataSynchronization', name: '数据同步', component: () => import('@/views/aftersales/DataSynchronization.vue'), diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index 92c3dcbc..3e5efa02 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -1766,7 +1766,7 @@ const view = val => { path: '/aftersales/aftersalesWorkOrderInfo', query: { id: val.row.id, - name: val.row.id + '-信息查看', + name: val.row.workOrderNumber + '-信息查看', warehouseId: val.row.warehouseId, workOrderNumber: val.row.workOrderNumber, //添加异常记录包条码 businessId: val.row.businessId, diff --git a/src/views/aftersales/aftersalesWorkOrderAdd.vue b/src/views/aftersales/aftersalesWorkOrderAdd.vue index 6f1fa25a..416d291d 100644 --- a/src/views/aftersales/aftersalesWorkOrderAdd.vue +++ b/src/views/aftersales/aftersalesWorkOrderAdd.vue @@ -591,18 +591,18 @@ const FangAddList = ref([ ]); // 提货责任方 const responsible = ref([ - { - value: '1', - label: '工厂', - }, - { - value: '2', - label: '外包搬运', - }, - { - value: '3', - label: '物流', - }, + // { + // value: '1', + // label: '工厂', + // }, + // { + // value: '2', + // label: '外包搬运', + // }, + // { + // value: '3', + // label: '物流', + // }, ]); const DeliveryDriver = ref([ @@ -731,6 +731,16 @@ const DiscoveringNodesChange = val => { } else { groundlineSet.value = true; //展示所有搜索框 } + + // if(val==1){ + // let data={ + + // } + // $_shippingInformation(data).then(res=>{ + // console.log(res,'获取运单信息'); + // }) + + // } }; // 照片 diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue index e71bc8a3..4224d722 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfo.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue @@ -230,7 +230,7 @@ 完结信息 - -
+ +
添加赔款方 添加收款方
@@ -460,41 +460,29 @@
- +
- +
- +
- +
-
+ +
+ + 移除 + 财务处理 - 移除
@@ -675,6 +663,7 @@ import { import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue'; import { getToken } from '@/utils/auth'; import { computeNumber, isNumer } from '@/utils/util'; +import error from '@/error'; const $router = useRouter(); const $route = useRoute(); const TotalamountCompensation = ref(0); //赔款金额合计 @@ -724,6 +713,21 @@ const NewImageAddress = ref([]); //旧的片地址 const InitialresponsibleParty = ref(); //初始的责任方 const ProcessingParty = ref(); //拷贝一份处理方 const CopyingInfo = ref({}); //拷贝的信息 +const ProcessingpartyData = ref([]); //处理方拷贝的信息 +const ResponsiblepartyData = ref([]); //责任方拷贝的信息 +const completionRecipientEntityListData = ref([]); //收款方拷贝 +const completionRecordEntitiesData = ref([]); //赔款方拷贝 +const UncompletionRecipientEntityListData = ref([]); //收款取消的 +const UncompletionRecordEntitiesDat = ref([]); //赔款取消的 +const CompletionInformation = ref([]); //完结信息收赔款信息 +const formData = ref({}); // 存储修改过的数据 +// ref 用于跟踪哪些字段被修改过 +// 当字段改变时标记它为已修改 + +const modifiedFields = ref(new Set()); +const markFieldAsModified = fieldName => { + modifiedFields.value.add(fieldName); +}; const CompensationParty = ref([ { name: '', state: 0, num: null, reason: '', cld: 1, explains: '' }, //赔款方 { name: '', state: 1, num: null, reason: '', cld: 1, explains: '' }, //收款方 @@ -865,6 +869,7 @@ const onLoad = () => { console.log(oldData.value, '旧数据'); console.log(res, '回显返回值参数'); Indexform.value = res.data.data; + formData.value = JSON.parse(JSON.stringify(Indexform.value)); Indexform.value.result = []; Indexform.value.processor = []; Indexform.value.packageImage = []; @@ -873,17 +878,18 @@ const onLoad = () => { Indexform.value['packageImage'].push({ name: res.imageName, url: res.imagePath, + id: res.id, }); }); // 拷贝基础信息 - CopyingInfo.value.deliveryDriver = res.data.data.deliveryDriver; //配送司机 - CopyingInfo.value.deliveryTime = res.data.data.deliveryTime; //配送时间 - CopyingInfo.value.warehousingTime = res.data.data.warehousingTime; //入库时间 - CopyingInfo.value.waybillMall = res.data.data.waybillMall; //运单商场 - CopyingInfo.value.trainNumber = res.data.data.trainNumber; //车次号 - CopyingInfo.value.first = res.data.data.first; //一级品 - CopyingInfo.value.secondary = res.data.data.secondary; //二级品 - CopyingInfo.value.problemDescription = res.data.data.problemDescription; //异常问题描述 + // CopyingInfo.value.deliveryDriver = res.data.data.deliveryDriver; //配送司机 + // CopyingInfo.value.deliveryTime = res.data.data.deliveryTime; //配送时间 + // CopyingInfo.value.warehousingTime = res.data.data.warehousingTime; //入库时间 + // CopyingInfo.value.waybillMall = res.data.data.waybillMall; //运单商场 + // CopyingInfo.value.trainNumber = res.data.data.trainNumber; //车次号 + // CopyingInfo.value.first = res.data.data.first; //一级品 + // CopyingInfo.value.secondary = res.data.data.secondary; //二级品 + // CopyingInfo.value.problemDescription = res.data.data.problemDescription; //异常问题描述 NewImageAddress.value = JSON.parse(JSON.stringify(Indexform.value['packageImage'])); //拷贝一份固定数据 // 包件回显 PackageInfo.value = res.data.data.abnormalPackageVOList; @@ -900,6 +906,7 @@ const onLoad = () => { }); FangAddList.value = res.data.data.personResponsibleVOS.map(res => { + ResponsiblepartyData.value.push(res); return { businessName: res.businessId, //责任人ID personResponsibleName: res.personResponsibleName, //责任人名称 @@ -912,9 +919,11 @@ const onLoad = () => { res.data.data.processorVOList.forEach(item => { if (item.typesOf == 2) { // 处理方 + ProcessingpartyData.value.push(item); //处理方拷贝为了取消的时候获取到ID Indexform.value.processor.push(item.businessId); } }); + ProcessingParty.value = JSON.parse(JSON.stringify(Indexform.value.processor)); //拷贝一份处理方 console.log(ProcessingParty.value, '拷贝的处理方'); console.log(Indexform.value.processor, ' Indexform.value.processor'); @@ -973,10 +982,23 @@ const onLoad = () => { ) { // 如果收款方和赔款方存在数据清空初始数据 CompensationParty.value = []; - // 赔款方 if (res.data.data.completionRecordEntities.length) { + completionRecordEntitiesData.value = JSON.parse( + JSON.stringify(res.data.data.completionRecordEntities) + ); //赔款方拷贝 res.data.data.completionRecordEntities.forEach((item, index) => { + CompletionInformation.value.push({ + //把赔款方信息添加到数组中 + state: 0, //状态 + num: item.money, //金额 + name: item.indemnitor, //收款方名字 + reason: item.reason, //收款方原因 + explains: item.explains, //收款方说明 + cld: index + 1, + id: item.id, //赔款方id + }); + TotalamountCompensation.value += Number(item.money); CompensationParty.value.push({ state: 0, //状态 @@ -985,13 +1007,29 @@ const onLoad = () => { reason: item.reason, //收款方原因 explains: item.explains, //收款方说明 cld: index + 1, + id: item.id, //赔款方id }); }); } // 收款方 if (res.data.data.completionRecipientEntityList.length) { + completionRecipientEntityListData.value = JSON.parse( + JSON.stringify(res.data.data.completionRecipientEntityList) + ); //拷贝收款方 + res.data.data.completionRecipientEntityList.forEach((item, index) => { + CompletionInformation.value.push({ + //把收款方信息添加到数组中 + state: 1, //状态 + num: item.money, //金额 + name: item.recipient, //收款方名字 + reason: item.reasonReceivingPayment, //收款方原因 + explains: item.explains, //收款方说明 + cld: index + 1, + id: item.id, //收款方id + }); + TotalamountReceived.value += Number(item.money); CompensationParty.value.push({ state: 1, //状态 @@ -1000,6 +1038,7 @@ const onLoad = () => { reason: item.reasonReceivingPayment, //收款方原因 explains: item.explains, //收款方说明 cld: index + 1, + id: item.id, //收款方id }); }); } @@ -1230,7 +1269,17 @@ const amountMoney = () => { console.log('收款总计金额', TotalamountReceived.value); }; // 移除按钮 -const payremove = (state, val) => { +const payremove = (state, val, data) => { + console.log(state, '当前移除按钮的状态'); + // const completionRecipientEntityListData=ref([]);//收款方拷贝 + // const completionRecordEntitiesData=ref([]);//赔款方拷贝 + if (state == 0) { + UncompletionRecordEntitiesDat.value.push(data); //删除的赔款方 + } else { + UncompletionRecipientEntityListData.value.push(data); //删除的收款方 + console.log(); + } + // 判断赔付方,至少保留一条数据 let som = 0; if (state == 0) { @@ -1272,6 +1321,8 @@ function removeEmptyProperties(obj) { //表单提交 const ConfirmForm = () => { + console.log(ProcessingpartyData.value, '处理方信息'); + // console.log(oldData.value,'查看老数据'); // ...Indexform.value let DataSubmit = { @@ -1287,6 +1338,8 @@ const ConfirmForm = () => { personResponsibleDTO: [], //添加预计责任人(完成) unPersonResponsibleDTO: [], //取消预计责任人(完成) surveyRecordDTO: {}, //调查经过 + unCompletionRecipientEntities: [], //取消异常工单完结处理结果收款方 + unCompletionRecordEntities: [], //取消异常工单完结的赔款方 }; DataSubmit.id = $route.query.id; //任务 @@ -1295,13 +1348,13 @@ const ConfirmForm = () => { ); //修改过的包件信息 // 调查经过 - if (Indexform.value.investigationPocess) { - DataSubmit.surveyRecordDTO = { - content: Indexform.value.investigationPocess, //内容' - workOrderId: $route.query.id, //工单ID - // pictureUrl: KFfeel.value.join(','), //附件路径 - }; - } + // if (Indexform.value.investigationProcess) { + // DataSubmit.surveyRecordDTO = { + // content: Indexform.value.investigationProcess, //内容' + // workOrderId: $route.query.id, //工单ID + // // pictureUrl: KFfeel.value.join(','), //附件路径 + // }; + // } if (Modified.length) { // 如果有修改过包件信息执行 @@ -1341,11 +1394,7 @@ const ConfirmForm = () => { if (SelectType.value == '1' || SelectType.value == '3') { if (unDecreaseImageEntityList.value.length) { unDecreaseImageEntityList.value.forEach(item => { - DataSubmit['unDecreaseImageEntityList'].push({ - imageType: SelectType.value == '1' ? 10 : SelectType.value == '3' ? 20 : '', - imageName: item.name, - imagePath: item.url, - }); + DataSubmit['unDecreaseImageEntityList'].push(item.id); }); } } @@ -1373,7 +1422,7 @@ const ConfirmForm = () => { console.log(modifyresponsibility, '发送改变的责任方'); modifyresponsibility.forEach(item => { DataSubmit['personResponsibleDTO'].push({ - wordOrderId: Indexform.value.workOrderNumber, //工单异常ID + wordOrderId: $route.query.id, //工单异常ID personResponsibleId: personResponsibleList.value.find(obj => obj.id == item.personResponsibleName)?.id || null, //责任人ID personResponsibleName: @@ -1384,22 +1433,15 @@ const ConfirmForm = () => { description: item.description, //说明 }); }); + // 被移除的责任方处理 if (unProcessorEntityList.value.length) { + console.log(ResponsiblepartyData.value, '初始值责任方'); unProcessorEntityList.value.forEach(item => { - DataSubmit['unPersonResponsibleDTO'].push({ - wordOrderId: Indexform.value.workOrderNumber, //工单异常ID - personResponsibleId: - personResponsibleList.value.find(obj => obj.id == item.personResponsibleName)?.id || null, //责任人ID - personResponsibleName: - personResponsibleList.value.find(obj => obj.id == item.personResponsibleName)?.name || - null, //责任人名称 - businessId: warehouseData.value.find(obj => obj.value == item.businessName)?.value || null, //责任方ID - businessName: - warehouseData.value.find(obj => obj.value == item.businessName)?.label || null, //责任方名称//责任方名称 - responsibilityRatio: item.responsibilityRatio, //责任比例 - description: item.description, //说明 - }); + console.log(item, '循环要被删除的责任方'); + DataSubmit['unPersonResponsibleDTO'].push( + ResponsiblepartyData.value.find(obj => obj.businessId == item.businessName).id + ); }); } @@ -1427,11 +1469,10 @@ const ConfirmForm = () => { }); // 新增处理方要携带调查经过 DataSubmit.surveyRecordDTO = { - content: Indexform.value.investigationPocess, //内容' + content: Indexform.value.investigationProcess, //内容' workOrderId: $route.query.id, //工单ID // pictureUrl: KFfeel.value.join(','), //附件路径 }; - } // 删除的 @@ -1440,104 +1481,154 @@ const ConfirmForm = () => { ); console.log(processornremove, '被删除的处理方'); if (processornremove.length) { + console.log(ProcessingpartyData.value, '准备处理的数据'); processornremove.forEach(item => { - DataSubmit['unProcessorEntityList'].push({ - businessName: warehouseData.value.find(obj => obj.value == item).label, //名称 - businessId: warehouseData.value.find(obj => obj.value == item).value, //ID - workOrderId: $route.query.id, //异常工单ID - conditions: 2, //状态 1正常 2新增 3取消 - typesOf: 2, //1 责任方 2 处理方 - warehouseId: $route.query.warehouseId, //仓库ID - processingStatus: $route.query.ProcessType, //处理状态 类型 1 待处理 2 已处理 - }); + let ids = warehouseData.value.find(obj => obj.value == item).value; + DataSubmit['unProcessorEntityList'].push( + ProcessingpartyData.value.find(obj => obj.businessId == ids).id + ); //ID); }); - // 新增处理方要携带调查经过 - DataSubmit.surveyRecordDTO = { - content: Indexform.value.investigationPocess, //内容' - workOrderId: $route.query.id, //工单ID - // pictureUrl: KFfeel.value.join(','), //附件路径 - }; } + // ProcessingParty.value = JSON.parse(JSON.stringify(Indexform.value.processor)); //拷贝一份处理方 // // 完结信息修改 - // console.log(CompensationParty.value); - // // 异常工单完结赔款方 - // DataSubmit['completionRecordEntities'] = CompensationParty.value - // .filter(item => item.state === 0) // 先筛选出状态为 0 的项 - // .map(item => { - // return { - // indemnitor: item.name, // 赔款方 - // reason: item.reason, // 原因 - // money: Number(item.num), // 金额 - // reasonArbitration: item.reason, // 说明 - // workOrderId: $route.query.id, // 异常工单 - // warehouseId: $route.query.warehouseId, // 仓库ID - // }; - // }); - // // 异常工单完结收款方 - // DataSubmit['completionRecipientEntities'] = CompensationParty.value - // .filter(item => item.state === 1) // 先筛选出状态为 1 的项 - // .map(item => { - // return { - // recipient: item.name, // 收款方 - // reasonReceivingPayment: item.reason, // 原因 - // money: Number(item.num), // 金额 - // workOrderNumber: $route.query.workOrderNumber, // 工单号 - // responsibleParty: FangAddList.value - // .map(aItem => - // warehouseData.value - // .filter(bItem => bItem.value === aItem.businessName) - // .map(match => match.label) - // .join(',') - // ) - // .join(','), - // warehouseId: $route.query.warehouseId, // 仓库ID - // workOrderId: $route.query.id, //异常工单 - // }; - // }); - - // // 支付方式 - // DataSubmit.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value - // .map(item => item.text) - // .join(','); - - // DataSubmit.aftersalesProcessingResultsDTO['processingMoneyEntityList'] = ProcessingList.value - // .map(item => { - // console.log(item); - // let match = ProcessingResults.value.find(element => element.dictValue == item.name); - // if (match) { - // let paymentMethodMatch = Paymentmethod.value.find( - // paymentMethod => paymentMethod.dictKey == item.payment - // ); - // return { - // resultType: match.dictKey, //赔方式的key - // money: item.input, //金额 - // typesOf: 1, //固定参数 - // compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '未知支付方式', - // compensationMethodName: paymentMethodMatch - // ? paymentMethodMatch.dictValue - // : '未知支付方式', - // resultName: item.name, //处理结果名字 - // }; - // } else { - // return null; - // } - // }) - // .filter(item => item !== null); + console.log(CompensationParty.value); + // 异常工单完结赔款方 + + // unCompletionRecipientEntities: [], //取消异常工单完结处理结果收款方 + // unCompletionRecordEntities:[],//取消异常工单完结的赔款方 + + // completionRecordEntitiesData.value; //赔款 + // completionRecipientEntityListData.value; //收款 + + if (UncompletionRecipientEntityListData.value.length) { + // 如果有取消的完结收款执行 + console.log(completionRecipientEntityListData.value, '完结收款'); + // 完结收款取消的收款 + UncompletionRecipientEntityListData.value.forEach(item => { + console.log(item, '完结取消的收款方'); + DataSubmit['unCompletionRecipientEntities'].push( + completionRecipientEntityListData.value.find(obj => obj.id == item.id).id + ); + }); + } + + if (UncompletionRecordEntitiesDat.value.length) { + // 完结收款取消的赔款 + console.log(completionRecordEntitiesData.value, '完结赔款'); + UncompletionRecordEntitiesDat.value.forEach(item => { + console.log(item, '完结取消的赔款方'); + DataSubmit['unCompletionRecordEntities'].push( + completionRecordEntitiesData.value.find(obj => obj.id == item.id).id + ); + }); + } + + // completionRecordEntitiesData.value; //赔款方 + // completionRecipientEntityListData.value;//收款方 + + // 这里处理新增的赔款方和收款方 + + let CompletedModificationsData = CompensationParty.value.filter(itemB => { + return !CompletionInformation.value.some(itemA => { + return itemB.name === itemA.name; + }); + }); + console.log(CompletedModificationsData, '新增或者修改的数据'); + console.log(CompletionInformation.value, '完结收款赔款累计信息'); + + // 有新增或者有修改的完结收赔款信息 + if (CompletedModificationsData.length) { + CompletedModificationsData.forEach(item => { + if (item.state == 0) { + // 赔款方 + DataSubmit['completionRecordEntities'].push({ + indemnitor: item.name, // 赔款方 + reason: item.reason, // 原因 + money: Number(item.num), // 金额 + reasonArbitration: item.reason, // 说明 + workOrderId: $route.query.id, // 异常工单 + warehouseId: $route.query.warehouseId, // 仓库ID + }); + } else { + DataSubmit['completionRecipientEntities'].push({ + recipient: item.name, // 收款方 + reasonReceivingPayment: item.reason, // 原因 + money: Number(item.num), // 金额 + workOrderNumber: $route.query.workOrderNumber, // 工单号 + responsibleParty: FangAddList.value + .map(aItem => + warehouseData.value + .filter(bItem => bItem.value === aItem.businessName) + .map(match => match.label) + .join(',') + ) + .join(','), + warehouseId: $route.query.warehouseId, // 仓库ID + workOrderId: $route.query.id, //异常工单 + }); + } + }); + } + + // 支付方式 + DataSubmit.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value + .map(item => item.text) + .join(','); + + DataSubmit.aftersalesProcessingResultsDTO['processingMoneyEntityList'] = ProcessingList.value + .map(item => { + console.log(item); + let match = ProcessingResults.value.find(element => element.dictValue == item.name); + if (match) { + let paymentMethodMatch = Paymentmethod.value.find( + paymentMethod => paymentMethod.dictKey == item.payment + ); + return { + resultType: match.dictKey, //赔方式的key + money: item.input, //金额 + typesOf: 1, //固定参数 + compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '未知支付方式', + compensationMethodName: paymentMethodMatch + ? paymentMethodMatch.dictValue + : '未知支付方式', + resultName: item.name, //处理结果名字 + }; + } else { + return null; + } + }) + .filter(item => item !== null); //移除的货损图片 DataSubmit = removeEmptyProperties(DataSubmit); console.log(DataSubmit, '处理好的数据'); - $_modifyData(DataSubmit).then(res => { - console.log(res, '编辑成功返回值'); - // if (res.data.code == 200) { - // ElMessage({ - // message: res.data.msg, - // type: 'success', - // }); - // } - }); + $_modifyData(DataSubmit) + .then(res => { + console.log(res, '编辑成功返回值'); + ElMessage({ + message: res.data.msg, + type: 'success', + }); + $router.push({ + path: '/aftersales/aftersalesWorkOrderInfo', + query: { + id: $route.query.id, + name: $route.query.workOrderNumber + '-信息查看', + warehouseId: $route.query.warehouseId, + workOrderNumber: $route.query.workOrderNumber, //添加异常记录包条码 + businessId: $route.query.businessId, + ProcessType: $route.query.ProcessType, + }, + }); + }) + .catch(error => { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + }); }; // 客服仲裁完结 diff --git a/src/views/distribution/signfor/distributionSignforedt.vue b/src/views/distribution/signfor/distributionSignforedt.vue index 0a373adf..d888c98e 100644 --- a/src/views/distribution/signfor/distributionSignforedt.vue +++ b/src/views/distribution/signfor/distributionSignforedt.vue @@ -457,7 +457,9 @@ + 勾选数量:{{TcTemp.length}} + @@ -729,6 +731,7 @@ 取消 确认提交 + @@ -2072,6 +2075,7 @@ function InventoryList() { } //商品信息切换 const tabClick = val => { + TcTemp.value=[];//切换表头重置选中数组 switch (val.props.name) { case '0': console.log(data.value, 'datavalue'); @@ -2392,4 +2396,9 @@ const ImgSuccessE = (response, uploadFile) => { width: 100% !important; height: 100% !important; } +.gx_num{ + font-size: 14px; + margin-top: 20px; + display: block; +} diff --git a/vite.config.js b/vite.config.js index 5dc51dbc..c56f12a4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,7 +14,7 @@ export default ({ mode, command }) => { '/api': { // target: 'http://192.168.10.126:8889', // hy - target: 'http://192.168.10.48:13000', + // target: 'http://192.168.10.48:13000', // lmy // target: 'http://192.168.10.123:8889', // target: 'http://192.168.10.101:8888', @@ -22,7 +22,7 @@ export default ({ mode, command }) => { // target: 'http://192.168.10.75:8777', // 新zyc // target: 'http://192.168.6.116:8777', - // target: 'http://192.168.6.122:8777', + target: 'http://192.168.6.122:8777', // target: 'http://192.168.10.25:13000', // target: 'http://192.168.10.25:2888', // target: 'http://192.168.6.122:8777',