diff --git a/src/views/aftersales/aftersalesWorkOrderAdd.vue b/src/views/aftersales/aftersalesWorkOrderAdd.vue index a736614d..f1fa63a3 100644 --- a/src/views/aftersales/aftersalesWorkOrderAdd.vue +++ b/src/views/aftersales/aftersalesWorkOrderAdd.vue @@ -53,13 +53,13 @@ /> - +
添加信息
-
+
- + - +
- + - +
@@ -105,6 +105,10 @@
+ +
+ +
@@ -983,12 +987,15 @@ const ResponsibilityRemoval = val => { }; // 顶部标签切换 const TopChange = val => { - console.log(val); + PackageInfo.value=[{ packageCode: '', orderCode: '', waybillNumber: '', brandName: '', state: false },]//重置包件信息 + Indexform.value={};//重置表单 + if (val == 0) { identifying.value = 1; } else { identifying.value = 2; } + console.log(identifying.value, '当前菜单id'); }; // 公司占比计算 @@ -1292,6 +1299,9 @@ const ConfirmForm = () => { delete DataSubmit.processor; //移除多余字段 console.log(DataSubmit, '处理好的数据'); // 提交表单信息stringify + + return; + $_submit(DataSubmit) .then(res => { if (res.data.code == 200) { @@ -1410,16 +1420,35 @@ const moneyBtnB = () => { }; // 统计包件个数 const Statistics = () => { - NumberPackages.value = 0; - PackageInfo.value.map(res => { - if (res.packageCode) { - NumberPackages.value++; - } - }); + // 订单统计包件个数 + if (identifying.value == 1) { + NumberPackages.value = 0; + PackageInfo.value.map(res => { + if (res.packageCode) { + NumberPackages.value++; + } + }); + }else{ + // 零担统计包件个数 + NumberPackages.value = 0; + PackageInfo.value.map(res => { + console.log(res); + if (res.waybillNumber) { + NumberPackages.value++; + } + }); + } }; // 查询包件信息自动回显 const ChangePackageInfo = (val, index) => { + if(identifying.value == '2'){ + Statistics(); //调用统计包件信息 + return + } + + + if (!val) { PackageInfo.value[index].orderCode = ''; //订单自编码 PackageInfo.value[index].waybillNumber = ''; //运单号 diff --git a/src/views/aftersales/aftersalesWorkOrderend.vue b/src/views/aftersales/aftersalesWorkOrderend.vue index 0f3957f5..13a90038 100644 --- a/src/views/aftersales/aftersalesWorkOrderend.vue +++ b/src/views/aftersales/aftersalesWorkOrderend.vue @@ -601,30 +601,29 @@
- + +
+ 回复 + + + +
-
- 回复 - - - -
- -
+
{ }); console.log(JSON.parse(localStorage.getItem('my_data')).id); MessageResponsibility.value.push(JSON.parse(localStorage.getItem('my_data')).id); - MessageResponsibility.value= [...new Set(MessageResponsibility.value)];//对回复方去重 - MessageResponsibility.value = MessageResponsibility.value.filter(item => item !== JSON.parse(localStorage.getItem('my_data')).id);//过滤掉当前登录人的仓库 + MessageResponsibility.value = [...new Set(MessageResponsibility.value)]; //对回复方去重 + MessageResponsibility.value = MessageResponsibility.value.filter( + item => item !== JSON.parse(localStorage.getItem('my_data')).id + ); //过滤掉当前登录人的仓库 console.log(endFrom.value.processor, ' endFrom.value.processor'); getDictionaryBiz('pc_work_order').then(res => { //处理结果字典 @@ -1220,7 +1221,6 @@ const onLoad = () => { endFrom.value.arbitrate = res.data.data.reasonArbitration; //仲裁原因 }); - getDictionaryBiz('result_handling').then(res => { console.log(res, '处理结果'); ProcessingResults.value = res.data.data; @@ -1255,7 +1255,6 @@ const onLoad = () => { }); }); }); - }; // 多开页面的时候刷新参数 @@ -1304,8 +1303,8 @@ const Chathistory = () => { } } // 仓库客服不需要操作记录 - - MessageContent.value.push({ + + MessageContent.value.push({ time: item.createTime, //时间 content: item.content, //消息内容 name: item.addDepartment, //营业部名称 @@ -1317,45 +1316,42 @@ const Chathistory = () => { difference: item.difference, identifying: true, //是否显示待回复按钮 }); - - }); console.log(MessageContent.value, '处理好的聊天记录'); - if(UserPermissions.value !='仓库客服'){ - console.log(UserPermissions.value,'当前不是仓库客服'); - $_getTrackRecord({ - id: $route.query.id, - }).then(res => { - console.log(res, '处理记录返回值'); - res.data.data.surveyRecordEntities.forEach(item => { - MessageContent.value.unshift({ - time: item.createTime, //时间 - content: item.processingResults, //消息内容 - name: item.addDepartment, //营业部名称 - username: item.addPeople, //用户名 - img: filetype == 'png' ? item.pictureUrl : '', - file: filetype == 'docx' ? item.pictureUrl : '', - mp4: filetype == 'mp4' ? item.pictureUrl : '', - imgList: [filetype == 'png' ? item.pictureUrl : ''], - difference: item.difference, - identifying: false, //待回复标识 + if (UserPermissions.value != '仓库客服') { + console.log(UserPermissions.value, '当前不是仓库客服'); + $_getTrackRecord({ + id: $route.query.id, + }).then(res => { + console.log(res, '处理记录返回值'); + res.data.data.surveyRecordEntities.forEach(item => { + MessageContent.value.unshift({ + time: item.createTime, //时间 + content: item.processingResults, //消息内容 + name: item.addDepartment, //营业部名称 + username: item.addPeople, //用户名 + img: filetype == 'png' ? item.pictureUrl : '', + file: filetype == 'docx' ? item.pictureUrl : '', + mp4: filetype == 'mp4' ? item.pictureUrl : '', + imgList: [filetype == 'png' ? item.pictureUrl : ''], + difference: item.difference, + identifying: false, //待回复标识 + }); }); + setTimeout(() => { + const container = scrollContainer.value; + if (container) { + container.scrollTop = container.scrollHeight; + } + }, 0); }); - setTimeout(() => { - const container = scrollContainer.value; - if (container) { - container.scrollTop = container.scrollHeight; - } - }, 0); - }); - } setTimeout(() => { - const container = scrollContainer.value; - if (container) { - container.scrollTop = container.scrollHeight; - } - }, 0); + const container = scrollContainer.value; + if (container) { + container.scrollTop = container.scrollHeight; + } + }, 0); // 滚动到最后 }); }; @@ -1858,18 +1854,22 @@ const submit = () => { // 赔款方 console.log(data, '处理好的值'); - $_addCompletionEnd(data).then(res => { - console.log(res, '完结成功返回值'); - if (res.data.code == 200) { - ElMessage({ - showClose: true, - message: res.data.msg, - type: 'success', - }); - $router.push('/aftersales/aftersalesWorkOrder'); - AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 - } - }); + $_addCompletionEnd(data) + .then(res => { + console.log(res, '完结成功返回值'); + if (res.data.code == 200) { + ElMessage({ + showClose: true, + message: res.data.msg, + type: 'success', + }); + $router.push('/aftersales/aftersalesWorkOrder'); + AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 + } + }) + .catch(res => { + console.log(res, '提交失败'); + }); } else { // 新增记录处理结果 console.log($route.query.id, '异常ID'); @@ -1948,18 +1948,20 @@ const submit = () => { data.aftersalesProcessingResultsDTO.warehouseId = info.warehouseId; //仓库ID console.log(data, '处理好的数据'); - $_addProcessingResults(data).then(res => { - console.log(res, '提交后的参数'); - if (res.data.code == 200) { - ElMessage({ - showClose: true, - message: res.data.msg, - type: 'success', - }); - $router.push('/aftersales/aftersalesWorkOrder'); - AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 - } - }); + $_addProcessingResults(data) + .then(res => { + console.log(res, '提交后的参数'); + if (res.data.code == 200) { + ElMessage({ + showClose: true, + message: res.data.msg, + type: 'success', + }); + $router.push('/aftersales/aftersalesWorkOrder'); + AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 + } + }) + .catch(res => {}); } }; // 消息回复 @@ -2634,6 +2636,13 @@ const CustomerServiceCompleted = () => { display: flex; align-items: center; justify-content: center; + font-size: 12px; + margin-bottom: 8px; + box-shadow: -1px 2px 2px 0px #f5f5f5; + padding: 0 4px; + box-sizing: border-box; + border-radius: 4px; + height: 40px; span { width: 40px; }