From 50a2e746474166e940c5bfe22032a52767d05351 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Mon, 15 Jan 2024 19:43:58 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=8C=E7=BB=93?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=B8=8B=E7=9A=84=E5=AE=8C=E7=BB=93=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/aftersales/aftersalesWorkOrder.vue | 107 ++++--- .../aftersales/aftersalesWorkOrderInfo.vue | 1 + .../aftersales/aftersalesWorkOrdermodify.vue | 271 ++++++++++++------ 3 files changed, 252 insertions(+), 127 deletions(-) diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index d2ed5589..c1ec8085 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -190,9 +190,7 @@ 确定 @@ -205,7 +203,6 @@ >确定 --> - 编辑 - + + 编辑 { - console.log(columnList[10],'22212as'); + console.log(columnList[10], '22212as'); val.forEach(item => { console.log(item, 'item'); // 对为null的数据进行处理 @@ -1198,7 +1199,7 @@ const Statusprocessing = val => { item.workOrderStatusNameS = columnList[10].checkarr[9].label; //处理结果已提交 } else if (item.workOrderStatus == 100) { item.workOrderStatusNameS = columnList[10].checkarr[10].label; //已结束 - }else if (item.workOrderStatus == 110) { + } else if (item.workOrderStatus == 110) { item.workOrderStatusNameS = columnList[10].checkarr[11].label; //已结束 } }); @@ -1268,9 +1269,9 @@ const IndexTable = val => { }; // 表格切换 -const Tableheaderswitching = val => { +const Tableheaderswitching = val => { publicColumnList.value = val; //默认加载表格 - details.columnList = val;//列表配置项 + details.columnList = val; //列表配置项 }; // 页面初始化 @@ -1474,8 +1475,6 @@ const view = val => { return; } - - // 理赔查看 if (TabPermissions.value == 4) { $router.push({ @@ -1751,8 +1750,8 @@ const Resultediting = val => { }, }); }; -const ProcessedResultediting=(val)=>{ -console.log(val,'参数'); +const ProcessedResultediting = val => { + console.log(val, '参数'); // return $router.push({ path: '/aftersales/aftersalesWorkOrdermodify', @@ -1765,7 +1764,26 @@ console.log(val,'参数'); workOrderNumber: val.row.workOrderNumber, RouterState: 'Kfend', Processingresults: true, //处理结果编辑 - Processed:'true', + Processed: 'true', + index: '1', + }, + }); +}; + +// 完结菜单的编辑 +const CompletedEditing=(val)=>{ + $router.push({ + path: '/aftersales/aftersalesWorkOrdermodify', + query: { + id: val.row.id, + name: val.row.workOrderNumber + '-完结编辑', + businessId: val.row.businessId, + warehouseId: val.row.warehouseId, + workOrderNumber: val.row.workOrderNumber, + RouterState: 'Kfend', + CompletedEditing:'true',//完结信息编辑 + Appealeditor: 'appeal', //只是编辑完结 + Processed: 'true', index: '1', }, }); @@ -1866,8 +1884,8 @@ const inputsc = (index, row) => { processRowProperty(index, row, details); details.query[row.prop] = index; // tabChenge( TabPermissions.value,details.query) - DataRendering(TabPermissions.value,details.query) - return + DataRendering(TabPermissions.value, details.query); + return; console.log('没有执行'); if (TabPermissions.value == '4') { // 理赔金额未出 @@ -1887,7 +1905,7 @@ const inputsc = (index, row) => { } if (TabPermissions.value == '7') { TimeoutHandling(details.query); //超时未处理 - return + return; } IndexTable(details.query); //首页初始化信息 @@ -1922,9 +1940,8 @@ const inputsc = (index, row) => { }; // 网页顶部搜索按钮 const searchChange = () => { - - DataRendering(TabPermissions.value,details.query) - return + DataRendering(TabPermissions.value, details.query); + return; if (ClaimStatus.value) { // 表示这是理赔查询 @@ -1949,12 +1966,12 @@ const emptyvalues = data => { // 清空头部搜索条件 const empty = () => { -// 清空搜索参数 + // 清空搜索参数 for (let key in details.query) { - if (key !== 'workOrderStatus') { - delete details.query[key]; + if (key !== 'workOrderStatus') { + delete details.query[key]; + } } -} // let dataList = [columnList, recordList, Claimsfield, AppealList, timeoutList]; details.columnList.forEach(item => { item.values = ''; @@ -1996,8 +2013,8 @@ const selectsc = (index, row) => { console.log(details, '下拉的参数'); details.query.workOrderStatus = TabPermissions.value; - DataRendering(TabPermissions.value,details.query) - return + DataRendering(TabPermissions.value, details.query); + return; if (TimeoutStatus.value) { // 超时列表 @@ -2045,8 +2062,8 @@ const selectionChange = list => { /** 页码改变执行的回调 */ const currentChange = val => { page.value.currentPage = val; - DataRendering(TabPermissions.value,details.query) - return + DataRendering(TabPermissions.value, details.query); + return; // 超时 if (TimeoutStatus.value) { TimeoutHandling(details.query); @@ -2075,8 +2092,8 @@ const currentChange = val => { // 每页多少条 const sizeChange = val => { page.value.pageSize = val; - DataRendering(TabPermissions.value,details.query) - return + DataRendering(TabPermissions.value, details.query); + return; // 超时 if (TimeoutStatus.value) { TimeoutHandling(details.query); @@ -2346,11 +2363,11 @@ const TimeoutHandling = val => { }; // 数据渲染公共函数 -const DataRendering =(val,input)=>{ +const DataRendering = (val, input) => { // val:当前是在哪一个菜单下面 //input:当前传入的搜索参数 console.log('执行了公共函数'); - if(val !=6){ + if (val != 6) { AppealStatusT.value = false; //申诉列表关闭 } console.log(val, '触发了标签栏'); @@ -2421,12 +2438,12 @@ const DataRendering =(val,input)=>{ ArbitrationStatus.value = false; //不可以申请仲裁 Tableheaderswitching(columnList); //表头切换 IndexTable(data); - } else if(val == 6 && AppealStatusT.value){ + } else if (val == 6 && AppealStatusT.value) { console.log('申诉列表'); data.workOrderStatus = null; details.query.workOrderStatus = null; AppealListFn(data); //申诉列表函数 - } else if (val == 6) { + } else if (val == 6) { // 完结 ProcessingPartyState.value = false; //关闭处理方 data.workOrderStatus = 80; @@ -2459,16 +2476,14 @@ const DataRendering =(val,input)=>{ } } console.log('执行完毕'); -} - - +}; // 标签栏触发 const tabChenge = async (val, input) => { TabPermissions.value = val; //记录当前点击的菜单 - if(val !=6){ + if (val != 6) { AppealStatusT.value = false; //申诉列表关闭 } console.log(val, '触发了标签栏'); @@ -2476,8 +2491,8 @@ const tabChenge = async (val, input) => { ...input, //搜索输入框 }; await empty(); - DataRendering(TabPermissions.value,input) - return + DataRendering(TabPermissions.value, input); + return; if (val == 0) { ProcessingPartyState.value = false; //关闭处理方 ArbitrationStatus.value = true; //可以以申请仲裁 @@ -2541,12 +2556,12 @@ const tabChenge = async (val, input) => { ArbitrationStatus.value = false; //不可以申请仲裁 Tableheaderswitching(columnList); //表头切换 IndexTable(data); - } else if(val == 6 && AppealStatusT.value){ + } else if (val == 6 && AppealStatusT.value) { console.log('申诉列表'); data.workOrderStatus = null; details.query.workOrderStatus = null; AppealListFn(data); //申诉列表函数 - } else if (val == 6) { + } else if (val == 6) { // 完结 ProcessingPartyState.value = false; //关闭处理方 data.workOrderStatus = 80; @@ -2821,7 +2836,9 @@ const DetermineStorage = val => { } // 仓库客服 if ( - TabPermissions.value == '2' && UserPermissions.value == '仓库客服' && val.row.workOrderStatus != '30' + TabPermissions.value == '2' && + UserPermissions.value == '仓库客服' && + val.row.workOrderStatus != '30' ) { // 处理结果确定 console.log(data, '处理好的数据'); diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue index 66652bf5..be4db8d9 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfo.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue @@ -1446,6 +1446,7 @@ const CustomerServiceCompleted = () => { warehouseId: $route.query.warehouseId, workOrderNumber: $route.query.workOrderNumber, RouterState: 'Kfend', + CompletedEditing:'true',//可以编辑完结信息编辑 index: '1', }, }); diff --git a/src/views/aftersales/aftersalesWorkOrdermodify.vue b/src/views/aftersales/aftersalesWorkOrdermodify.vue index f27b0d0b..84bca7a2 100644 --- a/src/views/aftersales/aftersalesWorkOrdermodify.vue +++ b/src/views/aftersales/aftersalesWorkOrdermodify.vue @@ -1,6 +1,5 @@ @@ -747,20 +842,17 @@ import { ElMessage, ElMessageBox } from 'element-plus'; import { useRouter, useRoute } from 'vue-router'; import { useStore } from 'vuex'; -const $store = useStore(); +const $useStore = useStore(); import { getDictionaryBiz } from '@/api/system/dict'; //字典 -import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //处理方 +import { getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //处理方 import { - $_submit, - $_getBusinessDepartmentUser, - $_getAbnormalPackage, - $_shippingInformation, $_getTrackRecord, $_getSurveyRecord, $_getInfo, + $_batchReturn, + $_Cancelappeal, } from '@/api/aftersales/aftersalesWorkOrder'; -import { computeNumber } from '@/utils/util'; -import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue'; +import { ref, reactive, computed, onMounted } from 'vue'; import { getToken } from '@/utils/auth'; const $router = useRouter(); const $route = useRoute(); @@ -769,6 +861,7 @@ const Indexform = ref({ decreaseImageEntityList: [], //处理好的图片数据 discoveryNode: '1', }); //首页新增表单 +const pageState = ref(false); //页面加载状态 const ProcessingResults = ref([]); //处理结果列表选项 const IndexException = ref([]); //异常类型下拉选择 const ZFname = ref(''); //支付名字预留状态 @@ -815,6 +908,10 @@ const msgState = ref(0); const Msgloading = ref(false); const TotalamountCompensation = ref(0); //赔款总金额 const TotalamountReceived = ref(0); //受款总金额 +const BatchFrom = ref({}); //打回内容 +const dialogReturn = ref(false); //打回弹窗 +const appeal = ref(false); //工单申诉状态 +const AppealReview = ref(false); //申诉状态只能查看 const CompensationParty = ref([ { name: '', @@ -885,6 +982,20 @@ onMounted(() => { }, 0); }); +// 底部按钮权限 +const PermissionButton = computed(() => { + return { + reply: !appeal.value, //回复 + Processing_results: !appeal.value && $route.query.workOrderStatus != '21', //处理结果 + work_order_completion: !appeal.value, //完结 + repulse: !appeal.value, //打回 + apply_arbitration: !appeal.value, //客服仲裁完结 + information_editing: !appeal.value, //信息编辑 + Appeal_established: appeal.value && AppealReview.value, //申诉成立 + Appeal_rejection: appeal.value && AppealReview.value, //申诉驳回 + }; +}); + // 聊天记录获取 const Chathistory = res => { Msgloading.value = true; @@ -1206,9 +1317,177 @@ const isShowFormItem2 = computed(() => { return !['2', '5', '6', '7', '8'].includes(groundlineType.value); }); // 聊天刷新 -const Chatrefresh=()=>{ - Chathistory() -} +const Chatrefresh = () => { + Chathistory(); +}; + +// 底部按钮事件 +// 回复 +const addireply = () => { + $router.push({ + path: '/aftersales/aftersalesWorkOrderend', + query: { + id: $route.query.id, + name: $route.query.workOrderNumber + '-回复', + businessId: $route.query.workOrderNumber, + RouterState: 'determine', + index: '0', + }, + }); +}; + +// 处理结果 +const addingRecord = () => { + $router.push({ + path: '/aftersales/aftersalesWorkOrderend', + query: { + id: $route.query.id, + name: $route.query.workOrderNumber + '-添加异常记录', + businessId: $route.query.workOrderNumber, + RouterState: 'record', + index: '1', + }, + }); +}; + +// 完结 +const EndJump = () => { + $router.push({ + path: '/aftersales/aftersalesWorkOrderend', + query: { + id: $route.query.id, + name: $route.query.workOrderNumber + '-完结填写', + RouterState: 'end', + index: '2', + workOrderStatus: $route.query.workOrderStatus, //当前单子状态 + }, + }); +}; +// 打回 +const BatchReturn = () => { + BatchFrom.value.businessDepartment = []; + BatchFrom.value.txt = null; + dialogReturn.value = true; +}; +// 客服仲裁完结 +const CustomerServiceCompleted = () => { + $router.push({ + path: '/aftersales/aftersalesWorkOrdermodify', + query: { + id: $route.query.id, + name: $route.query.workOrderNumber + '-客服仲裁完结', + businessId: $route.query.businessId, + warehouseId: $route.query.warehouseId, + workOrderNumber: $route.query.workOrderNumber, + RouterState: 'Kfend', + CompletedEditing: 'true', //可以编辑完结信息编辑 + index: '1', + }, + }); +}; + +// 信息编辑 +const EditInformation = () => { + $router.push({ + path: '/aftersales/aftersalesWorkOrdermodify', + query: { + id: $route.query.id, + name: $route.query.workOrderNumber + '-编辑', + businessId: $route.query.businessId, + warehouseId: $route.query.warehouseId, + workOrderNumber: $route.query.workOrderNumber, + RouterState: 'Infoedit', + ProcessType: $route.query.ProcessType, //类型 1 待处理 2 已处理 + }, + }); +}; +// 申诉成立 +const AppealEstablished = () => { + $router.push({ + path: '/aftersales/aftersalesWorkOrdermodify', + query: { + id: $route.query.id, //这里的id是workOrderId是有申诉列表带入的 + name: $route.query.workOrderNumber + '-申诉编辑', + businessId: $route.query.businessId, + warehouseId: $route.query.warehouseId, + workOrderNumber: $route.query.workOrderNumber, + RouterState: 'Kfend', + Appealeditor: 'appeal', //申诉编辑 + appealID: $route.query.appealID, //申诉ID + }, + }); +}; + +// 申诉驳回 +const AppealRejection = () => { + let data = { + id: $route.query.appeal, //取消申诉ID + typesOf: '2', //申诉状态 + workOrderId: $route.query.id, //异常工单ID + }; + $_Cancelappeal(data) + .then(res => { + console.log(res, '申诉驳回返回值'); + if (res.data.code == 200) { + ElMessage({ + showClose: true, + message: '申诉驳回成功', + type: 'success', + }); + $useStore.commit('DEL_TAG_CURRENT'); //关闭当前页面 + $router.push({ + path: '/aftersales/aftersalesWorkOrder', + }); + } + }) + .catch(res => { + ElMessage({ + showClose: true, + message: '操作失败', + type: 'success', + }); + }) + .finally(() => { + Pageloading.value = false; //关闭加载效果 + }); +}; + +// 工单打回确认按钮 +const ConfirmReturn = () => { + repulse.value = true; //开启加载并关闭按钮 + let data = { + processorList: [], + }; + // 过滤满足条件的对象 + let foundObjs = warehouseData.value.filter(obj => + BatchFrom.value.businessDepartment.includes(obj.value) + ); + data['businessId'] = foundObjs.map(item => item.value).join(','); + data['businessName'] = foundObjs.map(item => item.label).join(','); + // 营业部处理 + foundObjs.forEach(item => { + data['processorList'].push({ id: item.value, name: item.label }); + }); + data.reasonReturn = BatchFrom.value.txt; //打回原因 + data.workOrderIds = [$route.query.id]; //异常工单ID + console.log(data, '处理好的值'); + $_batchReturn(data) + .then(res => { + repulse.value = false; //关闭加载并关闭按钮 + dialogReturn.value = false; //关闭打回弹窗 + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + $router.push('/aftersales/aftersalesWorkOrder'); //打回成功跳转到列表 + } + }) + .catch(error => { + repulse.value = false; //关闭加载并关闭按钮 + dialogReturn.value = false; //关闭打回弹窗 + }); +}; diff --git a/src/views/aftersales/aftersalesWorkOrderend.vue b/src/views/aftersales/aftersalesWorkOrderend.vue index 75211bf0..61f0b57e 100644 --- a/src/views/aftersales/aftersalesWorkOrderend.vue +++ b/src/views/aftersales/aftersalesWorkOrderend.vue @@ -637,10 +637,7 @@

{{ item.username }}【{{ item.name }}】

-
- : -

{{ item.time }}

-
+ +
+ : +

{{ item.time }}

+
- - -
-
-
-
- 包条码: - -
- -
- 订单自编码: - -
- -
- 运单号: - -
-
- 品牌: - -
-
-
-
- 总件数:{{ PackageInfo.length }} -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ + + + + + - - - - - - - - - - - -
-
处理结果-理赔金额
-
-
- {{ item.name }}: - - + + + + + + + + + + + + + - -
- {{ item.payment ? item.text : '支付方式' }} -
-
- 支付单位: - -
- -
-
- -
- 总金额:{{ TotalClaimAmount }} -
-
- - - - - - - -
-
-
-
- 责任方: - - - - - - - - + + + + + +
+
+
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ +
+
+
+
+ 总件数:{{ NumberPackages }} +
+
+
+ + + + + + + -
- 责任人: - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + +
+ +
+ + + + + + + + + +
+
+ + + + + +
+
+ + + + + +
+ +
+ + + + + +
+
+
+
+ 公司占比:{{ companyProportion }}% +
-
- 占比: - + + + + + +
+ + + +
+ +
+
处理结果-理赔金额
+
+
+
+
+ {{ item.name }} + +
+
+ 支付方式 +
+ {{ item.payment ? item.text : '暂未选择支付方式' }} +
+
+ +
+ 支付单位 +
+ +
+
+ +
+ 支付时间 + +
+
+
-
- 三方责任人: - -
-
- 说明: - + +
+ 总金额:{{ TotalClaimAmount }}元
-
-
- 公司占比:{{ companyProportion }}% -
-
-
-
- - - - - -
-
- {{ item.state == 0 ? '赔款方' : '受款方' }}{{ item.cld }} -
-
-
+ + + + + + + + + + + +
+
+ {{ item.state == 0 ? '赔款方' : '受款方' }}{{ item.cld }} +
+ +
+
+ + + +
+
+ 原因 + + + +
+
+ 金额 + + + +
+ +
+ 仓库 + + + + +
+ +
+ +
+ 责任人 + + + +
+ +
+
-
- +
+ + 赔款金额总和:{{ TotalamountCompensation }} + + 受款金额总和:{{ TotalamountReceived }}
-
+ + + + + +
+ + + + -
- -
- - - -
+ + +
-
- -
- + + + + +
+ + v-model:file-list="Indexform.packList" + list-type="picture-card" + :on-preview="pictureList" + :on-remove="ImgListRemove" + :action="doubledCount" + :on-success="ImgSuccess" + :before-upload="beforeAvatarUpload" + :headers="headers" + multiple + drag + class="el-picture-card" + > + + + + + +
+
+
-
+ +
+ + + + +
+ +
+ +
+
+
+ 刷新 +
+
+
+ + + +
+
+ : +

{{ item.username }}【{{ item.name }}】

+
+ + {{ + item.difference == '1' + ? ' 调查记录' + : item.difference == '2' + ? '指定记录' + : item.difference == '3' + ? '操作记录' + : '' + }} + +
+ +
+ : {{ item.content }} +
+ +
+ +
+
+ 视频: 点击预览 + +
+ + + +
+
+ : +

{{ item.time }}

+
+
+ {{ + msgState == 1 + ? ' 待回复' + : msgState == 2 + ? '已回复' + : msgState == 3 + ? '已超时' + : '' + }} + +
+
+
+
+
+
+ +
-
-
- - 赔款金额总和:{{ TotalamountCompensation }} - - 受款金额总和:{{ TotalamountReceived }} -
- - - -
- {{ - SelectType == 1 ? '运损照片' : SelectType == 3 ? '窜货照片' : '照片' - }} - - - - - - - -
- -
- - 回复 - 处理结果 +
+
+ + + + - 完结 - 打回 - 客服仲裁完结 - 信息编辑 -
-
- 申诉成立 - 申诉驳回 -
- - - - - - - - - - - - - - - - + + + + + + + + + + + + +
diff --git a/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue b/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue index 89378eaa..68897717 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue @@ -1,50 +1,5 @@ @@ -718,6 +731,23 @@ console.log(accessControl, '权限按钮'); // arbitration_completed;//仲裁完结 // information_editing;//信息编辑 console.log(accessControl.workAdd, '新增按钮权限'); +// const PermissionButton = computed(() => { +// return { +// workAdd: accessControl.workAdd, //新增 +// batch_return: accessControl.batch_return, //批量打回 +// assign: accessControl.assign, //工单指派 +// apply_arbitration: accessControl.apply_arbitration, //申请仲裁 +// batch_completion: accessControl.batch_completion, //批量完结 +// representations: accessControl.representations, //申诉 +// reply: accessControl.reply, //回复 +// processing_completed: accessControl.processing_completed, //处理完结 +// work_order_completion: accessControl.work_order_completion, //完结 +// repulse: accessControl.repulse, //打回 +// arbitration_completed: accessControl.arbitration_completed, //仲裁完结 +// information_editing: accessControl.information_editing, //信息编辑 +// }; +// }); + const PermissionButton = computed(() => { return { workAdd: accessControl.workAdd, //新增 @@ -734,6 +764,7 @@ const PermissionButton = computed(() => { information_editing: accessControl.information_editing, //信息编辑 }; }); + const DingTalkfilling = ref({}); //钉钉号表单 const dialogDingTalk = ref(false); //钉钉号弹窗 const tabValue = ref(0); //侧边栏激活状态 @@ -1017,11 +1048,20 @@ const ButtonPermissions = computed(() => { switch (TabPermissions.value) { case 0: //全部 return { + // add: true, //新增按钮 + // batchReject: true, //批量打回 + // assignment: true, //工单指派 + // applyArbitration:true, //客服介入 + // DingTalkNumber:true,//钉钉号填写 + // batchFinish:true, //批量完结 + // appeal: true, //申诉 + add: UserPermissions.value == '仓库客服', //新增按钮 - batchReject: UserPermissions.value == '职能客服', //批量打回 - assignment: UserPermissions.value == '客服经理', //工单指派 - applyArbitration: UserPermissions.value == '仓库客服', //申请仲裁 - batchFinish: UserPermissions.value == '职能客服' || UserPermissions.value == '客服经理', //批量完结 + batchReject: UserPermissions.value != '仓库客服', //批量打回 + assignment: UserPermissions.value == '总部客服经理', //工单指派 + applyArbitration: UserPermissions.value == '仓库客服', //客服介入 + DingTalkNumber: UserPermissions.value == '总部客服经理', //钉钉号填写 + batchFinish: UserPermissions.value != '仓库客服', //批量完结 appeal: false, //申诉 }; case 1: //处理中 @@ -1029,8 +1069,9 @@ const ButtonPermissions = computed(() => { add: false, //新增按钮 batchReject: UserPermissions.value == '职能客服' || UserPermissions.value == '客服经理', //批量打回 assignment: false, //工单指派 - applyArbitration: UserPermissions.value == '仓库客服', //申请仲裁 + applyArbitration: UserPermissions.value == '仓库客服', //客服介入 batchFinish: UserPermissions.value != '仓库客服', //批量完结 + Batchdetermination: false, //批量确定 appeal: false, //申诉 }; case 2: //处理完毕 @@ -1038,54 +1079,70 @@ const ButtonPermissions = computed(() => { add: false, //新增按钮 batchReject: false, //批量打回 assignment: false, //工单指派 - applyArbitration: false, //申请仲裁 + applyArbitration: false, //客服介入 batchFinish: false, //批量完结 appeal: UserPermissions.value == '仓库客服' && AppealStatusT.value, //申诉 + Batchdetermination: UserPermissions.value == '仓库客服', //批量确定 }; case 3: //待处理 return { add: false, //新增按钮 - batchReject: UserPermissions.value == '职能客服', //批量打回 - assignment: UserPermissions.value == '客服经理', //工单指派 - applyArbitration: false, //申请仲裁 + batchReject: UserPermissions.value == '总部客服', //批量打回 + assignment: UserPermissions.value == '总部客服经理', //工单指派 + applyArbitration: true, //客服介入 batchFinish: false, //批量完结 appeal: false, //申诉 + Batchdetermination: false, //批量确定 }; case 4: //理赔金额未出 return { add: false, //新增按钮 batchReject: false, //批量打回 assignment: false, //工单指派 - applyArbitration: false, //申请仲裁 + applyArbitration: false, //客服介入 batchFinish: false, //批量完结 appeal: false, //申诉 + Batchdetermination: false, //批量确定 }; case 5: //仲裁中 return { add: false, //新增按钮 batchReject: false, //批量打回 assignment: false, //工单指派 - applyArbitration: false, //申请仲裁 + applyArbitration: false, //客服介入 batchFinish: false, //批量完结 appeal: false, //申诉 + Batchdetermination: false, //批量确定 }; case 6: //完结 return { add: false, //新增按钮 batchReject: false, //批量打回 assignment: false, //工单指派 - applyArbitration: false, //申请仲裁 - batchFinish: false, //批量完结 + applyArbitration: false, //客服介入 + batchFinish: UserPermissions.value != '仓库客服', //批量完结 appeal: true, //申诉 + Batchdetermination: false, //批量确定 }; case 7: //超时未处理 return { add: false, //新增按钮 batchReject: false, //批量打回 assignment: false, //工单指派 - applyArbitration: false, //申请仲裁 + applyArbitration: false, //客服介入 + batchFinish: false, //批量完结 + appeal: false, //申诉 + Batchdetermination: false, //批量确定 + }; + case 8: //待回复 + return { + add: false, //新增按钮 + batchReject: false, //批量打回 + assignment: false, //工单指派 + applyArbitration: true, //客服介入 batchFinish: false, //批量完结 appeal: false, //申诉 + Batchdetermination: false, //批量确定 }; // 其他任何情况下的默认情况 default: @@ -1096,6 +1153,7 @@ const ButtonPermissions = computed(() => { applyArbitration: false, batchFinish: false, appeal: false, + Batchdetermination: false, //批量确定 }; } }); @@ -1417,7 +1475,7 @@ const InformationViewing = val => { RouteIndexs: TabPermissions.value, //当前记录参数 Routstate: 'appeal', //申诉列表 AppealReview: val.row.typesOf == '0' ? 'true' : 'false', //当前只能查看申诉详情信息 - workOrderStatus:val.row.workOrderStatus,//工单状态 + workOrderStatus: val.row.workOrderStatus, //工单状态 }, }); return; @@ -1453,7 +1511,7 @@ const InformationViewing = val => { businessId: val.row.businessId, ProcessType: TabPermissions.value == 2 ? '2' : TabPermissions.value == 3 ? '1' : '', //类型 1 待处理 2 已处理 RouteIndexs: TabPermissions.value, //当前记录参数 - workOrderStatus:val.row.workOrderStatus,//工单状态 + workOrderStatus: val.row.workOrderStatus, //工单状态 }, }); }; @@ -1476,7 +1534,7 @@ const view = val => { RouteIndexs: TabPermissions.value, //当前菜单 Routstate: 'appeal', //申诉列表 AppealReview: val.row.typesOf == '0' ? 'true' : 'false', //当前只能查看申诉详情信息 - workOrderStatus:val.row.workOrderStatus,//当前工单状态 + workOrderStatus: val.row.workOrderStatus, //当前工单状态 }, }); return; @@ -1778,7 +1836,7 @@ const ProcessedResultediting = val => { }; // 完结菜单的编辑 -const CompletedEditing=(val)=>{ +const CompletedEditing = val => { $router.push({ path: '/aftersales/aftersalesWorkOrdermodify', query: { @@ -1788,13 +1846,13 @@ const CompletedEditing=(val)=>{ warehouseId: val.row.warehouseId, workOrderNumber: val.row.workOrderNumber, RouterState: 'Kfend', - CompletedEditing:'true',//完结信息编辑 + CompletedEditing: 'true', //完结信息编辑 Appealeditor: 'appeal', //只是编辑完结 Processed: 'true', index: '1', }, }); -} +}; // 工单申诉确认按钮 const Appealbutton = state => { if (UserPermissions.value == '仓库客服') { @@ -2348,7 +2406,6 @@ function getWinHight() { // }; // 查询超时记录 const TimeoutHandling = val => { - timeoutList[3].checkarr = []; //异常类型名称 timeoutList[4].checkarr = []; //发现环节 ClaimStatus.value = false; //关闭理赔查询状态 @@ -2817,9 +2874,26 @@ const DetermineStorage = val => { let data = { assignList: [], }; - let ID = {}; - ID = val.row.id; - data['assignList'].push(ID); + let ConfirmStatus = false; //批量确认状态 + if (!val.row) { + // 说明点击的批量确定 + console.log('当前点击的批量确定'); + if (!details.selectionList.length) { + ElMessage({ + message: '请勾选要处理的数据数据', + type: 'warning', + }); + return; + } else { + ConfirmStatus = true; //说明走的是批量 + data['assignList'] = details.selectionList.map(item => item.id); + console.log(data['assignList'], '批量确定处理好的参数'); + } + } else { + let ID = {}; + ID = val.row.id; + data['assignList'].push(ID); + } details.loadingObj.list = true; //开启加载效果 if (UserPermissions.value == '总部客服经理' && TabPermissions.value == '1') { // 完结结果确定 @@ -2842,31 +2916,73 @@ const DetermineStorage = val => { return; } +}; +// 处理完毕里面确定 + +const ResultConfirmation = (val) => { + let data = { + assignList: [], + }; + let ConfirmStatus = false; //批量确认状态 + if (!val.row) { + // 说明点击的批量确定 + console.log('当前点击的批量确定'); + if (!details.selectionList.length) { + ElMessage({ + message: '请勾选要处理的数据数据', + type: 'warning', + }); + return; + } else { + ConfirmStatus = true; //说明走的是批量 + data['assignList'] = details.selectionList.map(item => item.id); + console.log(data['assignList'], '批量确定处理好的参数'); + } + } else { + let ID = {}; + ID = val.row.id; + data['assignList'].push(ID); + } + + // 仓库客服 - if ( - TabPermissions.value == '2' && - UserPermissions.value == '仓库客服' && - val.row.workOrderStatus != '30' - ) { - // 处理结果确定 - console.log(data, '处理好的数据'); - $_updateWorkOrderStatus(data) - .then(res => { - console.log(res, '确定提交存储'); - if (res.data.code == 200) { - ElMessage({ - message: res.data.msg, - type: 'success', - }); - } - tabChenge(TabPermissions.value); - }) - .catch(res => { - details.loadingObj.list = false; //关闭加载效果 + + if (ConfirmStatus) { + // 走的批量确认 + let state = details.selectionList.every(item => item.workOrderStatus !== '30'); + if (!state) { + ElMessage({ + message: '批量确认中有状态不符合的必须为处理结果已提交', + type: 'warning', }); + return; + } + }else{ + if(val.workOrderStatus !== '30'){ + ElMessage({ + message: '状态错误,已经确认过', + type: 'warning', + }); + return + } } + details.loadingObj.list = true; //开启加载效果 + console.log(data, '处理好的数据'); + $_updateWorkOrderStatus(data) + .then(res => { + console.log(res, '确定提交存储'); + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + } + tabChenge(TabPermissions.value); + }) + .catch(res => { + details.loadingObj.list = false; //关闭加载效果 + }); }; - // 批量打回 const BatchReturn = () => { BatchFrom.value.businessDepartment = []; From d7ea60a3fcf86312b773eca495e385d97360aa2b Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Tue, 16 Jan 2024 21:32:45 +0800 Subject: [PATCH 13/21] =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aftersales/aftersalesWorkOrder.js | 2 +- src/views/aftersales/aftersalesWorkOrder.vue | 63 ++++++++++++++++---- 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/src/api/aftersales/aftersalesWorkOrder.js b/src/api/aftersales/aftersalesWorkOrder.js index ab015a4d..fe4f68e6 100644 --- a/src/api/aftersales/aftersalesWorkOrder.js +++ b/src/api/aftersales/aftersalesWorkOrder.js @@ -382,7 +382,7 @@ export const $_updateWorkOrderStatus = (data) => { data }) } -// 完结结果确定 +// 处理结果完结结果确定 export const $_updateManagerConfirmed = (data) => { return request({ url: '/api/logpm-aftersales/aftersalesWorkOrder/updateManagerConfirmed', diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index 340c7b5e..5421ba4c 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -96,13 +96,22 @@ @click="BatchReturn" >批量打回 - + 批量确定 + + 批量确定 + + + 工单指派 确定 + 批量确定 + > --> @@ -198,17 +198,17 @@ " --> - 确定 + > --> 确定编辑 - 编辑 + > --> { // DingTalkNumber:true,//钉钉号填写 // batchFinish:true, //批量完结 // appeal: true, //申诉 - add: UserPermissions.value == '仓库客服', //新增按钮 + add:true, //新增按钮 batchReject: UserPermissions.value != '仓库客服', //批量打回 assignment: UserPermissions.value == '总部客服经理', //工单指派 applyArbitration: UserPermissions.value == '仓库客服', //客服介入 @@ -1080,7 +1080,7 @@ const ButtonPermissions = computed(() => { batchReject: UserPermissions.value == '职能客服' || UserPermissions.value == '客服经理', //批量打回 assignment: false, //工单指派 applyArbitration: UserPermissions.value == '仓库客服', //客服介入 - batchFinish: false, //批量完结 + batchFinish: UserPermissions.value != '仓库客服', //批量完结 Batchdetermination: UserPermissions.value != '仓库客服', //批量确定 appeal: false, //申诉 ManagerConfirmed:false,//处理完毕下面的客服经理批量确定 @@ -1102,7 +1102,7 @@ const ButtonPermissions = computed(() => { batchReject: UserPermissions.value == '总部客服', //批量打回 assignment: UserPermissions.value == '总部客服经理', //工单指派 applyArbitration: UserPermissions.value == '仓库客服', //客服介入 - batchFinish: false, //批量完结 + batchFinish:UserPermissions.value != '仓库客服' , //批量完结 appeal: false, //申诉 Batchdetermination: false, //批量确定 ManagerConfirmed:false,//处理完毕下面的客服经理批量确定 @@ -1135,7 +1135,7 @@ const ButtonPermissions = computed(() => { batchReject: false, //批量打回 assignment: false, //工单指派 applyArbitration: false, //客服介入 - batchFinish: UserPermissions.value != '仓库客服', //批量完结 + batchFinish: false, //批量完结 appeal: true, //申诉 Batchdetermination: false, //批量确定 ManagerConfirmed:false,//处理完毕下面的客服经理批量确定 @@ -1856,10 +1856,11 @@ const ProcessedResultediting = val => { // 完结菜单的编辑 const CompletedEditing = val => { + console.log(val); $router.push({ path: '/aftersales/aftersalesWorkOrdermodify', query: { - id: val.row.id, + id: val.row.workOrderId, name: val.row.workOrderNumber + '-完结编辑', businessId: val.row.businessId, warehouseId: val.row.warehouseId, @@ -2959,6 +2960,7 @@ const DetermineStorage = val => { // 处理完毕里面确定(仓库客服用的) const ResultConfirmation = (val) => { +if(UserPermissions.value == '仓库客服'){ let data = { assignList: [], }; @@ -3021,6 +3023,72 @@ const ResultConfirmation = (val) => { .catch(res => { details.loadingObj.list = false; //关闭加载效果 }); + }else{ + let data = { + assignList: [], + }; + let ConfirmStatus = false; //批量确认状态 + if (!val.row) { + // 说明点击的批量确定 + console.log('当前点击的批量确定'); + if (!details.selectionList.length) { + ElMessage({ + message: '请勾选要处理的数据数据', + type: 'warning', + }); + return; + } else { + ConfirmStatus = true; //说明走的是批量 + data['assignList'] = details.selectionList.map(item => item.id); + console.log(data['assignList'], '批量确定处理好的参数'); + } + } else { + let ID = {}; + ID = val.row.id; + data['assignList'].push(ID); + } + + if (ConfirmStatus) { + // 走的批量确认 + let state = details.selectionList.every(item => item.workOrderStatus == '40'); + if (!state) { + ElMessage({ + message: '批量确认中状态只能为待审核', + type: 'warning', + }); + return; + } + }else{ + if(val.workOrderStatus != '40'){ + ElMessage({ + message: '状态错误,已经确认过', + type: 'warning', + }); + return + } + } + + details.loadingObj.list = true; //开启加载效果 + // 完结结果确定 + $_updateManagerConfirmed(data) + .then(res => { + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + } + console.log(res, '处理完毕确定'); + tabChenge(TabPermissions.value); + }) + .catch(res => { + console.log(res,'错误信息'); + }).finally(res=>{ + details.loadingObj.list = false; //关闭加载效果 + }) + // 赔款方 + console.log(data, '处理好的值'); + } }; // 批量打回 const BatchReturn = () => { diff --git a/src/views/aftersales/aftersalesWorkOrdermodify.vue b/src/views/aftersales/aftersalesWorkOrdermodify.vue index a3d691fb..0f59396e 100644 --- a/src/views/aftersales/aftersalesWorkOrdermodify.vue +++ b/src/views/aftersales/aftersalesWorkOrdermodify.vue @@ -354,7 +354,7 @@ :value="item.id" /> - +
占比: From 097340a5e18c6d82d8ea135b0104f535f743eeb7 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 17 Jan 2024 10:16:18 +0800 Subject: [PATCH 15/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/aftersales/aftersalesWorkOrder.vue | 20 ++++++++++--------- .../aftersales/aftersalesWorkOrderInfo.vue | 4 ++-- .../aftersales/aftersalesWorkOrderend.vue | 2 +- vite.config.js | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index e09f8e18..df112474 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -206,10 +206,9 @@ 确定 @@ -309,7 +308,7 @@ >申诉 --> 修改金额 @@ -1136,7 +1135,7 @@ const ButtonPermissions = computed(() => { assignment: false, //工单指派 applyArbitration: false, //客服介入 batchFinish: false, //批量完结 - appeal: true, //申诉 + appeal: UserPermissions.value == '仓库客服', //申诉 Batchdetermination: false, //批量确定 ManagerConfirmed:false,//处理完毕下面的客服经理批量确定 }; @@ -2379,11 +2378,12 @@ function AppealListFn(val) { // 超时金额修改 const BtnModifyAmount = val => { + console.log(val, '超时金额修改'); dialogModifyAmount.value = true; //开启超时金额弹窗修改 fromamount.value.title = val.row.workOrderNumber; //工单号 fromamount.value.ytimeout = val.row.money; //原本金额 - fromamount.value.id = val.row.lawoId; //id + fromamount.value.id = val.row.id; //id }; // 修改金额确定 const ModifyAmountFn = () => { @@ -2402,6 +2402,8 @@ const ModifyAmountFn = () => { }); } dialogModifyAmount.value = false; //关闭超时金额弹窗修改 + }).catch(res=>{ + dialogModifyAmount.value = false; //关闭超时金额弹窗修改 }); }; function getWinHight() { @@ -2960,7 +2962,7 @@ const DetermineStorage = val => { // 处理完毕里面确定(仓库客服用的) const ResultConfirmation = (val) => { -if(UserPermissions.value == '仓库客服'){ +if(UserPermissions.value == '仓库客服'){ //处理完毕菜单下面确定按钮用于确定处理结果(仓库客服用的) let data = { assignList: [], }; @@ -2999,7 +3001,7 @@ if(UserPermissions.value == '仓库客服'){ return; } }else{ - if(val.workOrderStatus !== '30'){ + if(val.workOrderStatus != '30'){ ElMessage({ message: '状态错误,已经确认过', type: 'warning', diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue index c4b5719f..3d87dad8 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfo.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue @@ -988,9 +988,8 @@ const PermissionButton = computed(() => { // if(appeal.value)return false // else if ( $route.query.workOrderStatus != '21')return false // return true - return { - reply: !appeal.value, //回复 + reply: !appeal.value && $route.query.workOrderStatus != '80' && $route.query.workOrderStatus != '30', //回复 Processing_results: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10')), //处理结果10 20 21 work_order_completion: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus != '80' && UserPermissions.value !='仓库客服') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus != '80' && UserPermissions.value !='仓库客服')) , //完结 repulse: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10')) && UserPermissions.value !='仓库客服', //打回 @@ -1357,6 +1356,7 @@ const addireply = () => { businessId: $route.query.workOrderNumber, RouterState: 'determine', index: '0', + workOrderStatus:$route.query.workOrderStatus,//工单状态 }, }); }; diff --git a/src/views/aftersales/aftersalesWorkOrderend.vue b/src/views/aftersales/aftersalesWorkOrderend.vue index 61f0b57e..ebafff6b 100644 --- a/src/views/aftersales/aftersalesWorkOrderend.vue +++ b/src/views/aftersales/aftersalesWorkOrderend.vue @@ -580,7 +580,7 @@ > --> { // 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.167:9777',//CYZ + target: 'http://192.168.6.169:9777',//CYZ // target: 'http://192.168.10.57:13000', // target: 'http://192.168.10.200:13000', // target: 'http://192.168.10.29:13000', From 324841193624ac26e42b3e9b5bc7c263ac89e5a8 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 17 Jan 2024 10:42:48 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=9C=AA=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BF=AE=E5=A4=8D=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/aftersales/aftersalesWorkOrder.vue | 42 +++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index df112474..99c6e326 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -308,7 +308,7 @@ >申诉 --> 修改金额 @@ -1519,6 +1519,23 @@ const InformationViewing = val => { }); return; } + if (TabPermissions.value == 7) { + console.log('当前在超时未处理未出'); + $router.push({ + path: '/aftersales/aftersalesWorkOrderInfo', + query: { + id: val.row.workOrderId, + appealID: val.row.id, //只有才需要的参数 + name: val.row.workOrderNumber + '-信息查看', + warehouseId: val.row.warehouseId, + workOrderNumber: val.row.workOrderNumber, //添加异常记录包条码 + businessId: val.row.businessId, + RouteIndexs: TabPermissions.value, //当前记录参数 + workOrderStatus: val.row.workOrderStatus, //订单状态 + }, + }); + return + } $router.push({ path: '/aftersales/aftersalesWorkOrderInfo', query: { @@ -1579,6 +1596,29 @@ const view = val => { }); return; } + if (TabPermissions.value == 7) { + console.log('当前在超时未处理未出'); + $router.push({ + path: '/aftersales/aftersalesWorkOrderInfo', + query: { + id: val.row.workOrderId, + appealID: val.row.id, //只有才需要的参数 + name: val.row.workOrderNumber + '-信息查看', + warehouseId: val.row.warehouseId, + workOrderNumber: val.row.workOrderNumber, //添加异常记录包条码 + businessId: val.row.businessId, + RouteIndexs: TabPermissions.value, //当前记录参数 + workOrderStatus: val.row.workOrderStatus, //订单状态 + }, + }); + return + } + + + + + + $router.push({ // AppealStatusT为真表示是申诉列表 From a3112580b4298b90d83e9a53a1d51a2f14ef130c Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 17 Jan 2024 10:54:27 +0800 Subject: [PATCH 17/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=8C=E7=BB=93?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/aftersales/aftersalesWorkOrderInfo.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue index 3d87dad8..02859b9d 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfo.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue @@ -989,7 +989,7 @@ const PermissionButton = computed(() => { // else if ( $route.query.workOrderStatus != '21')return false // return true return { - reply: !appeal.value && $route.query.workOrderStatus != '80' && $route.query.workOrderStatus != '30', //回复 + reply: !appeal.value && $route.query.workOrderStatus != '80' && $route.query.workOrderStatus != '30', //回复 Processing_results: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10')), //处理结果10 20 21 work_order_completion: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus != '80' && UserPermissions.value !='仓库客服') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus != '80' && UserPermissions.value !='仓库客服')) , //完结 repulse: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10')) && UserPermissions.value !='仓库客服', //打回 @@ -1271,9 +1271,9 @@ const onLoad = () => { Indexform.value.compensationTime = res.data.data.processingResultsVO.compensationTime; // 处理结果说明回显 Indexform.value.resultDescription = res.data.data.processingResultsVO.resultDescription; - + CompensationParty.value = []; if (res.data.data.completionRecipientEntityList.length) { - CompensationParty.value = []; + res.data.data.completionRecipientEntityList.forEach((item, index) => { TotalamountReceived.value += Number(item.money); CompensationParty.value.push({ @@ -1289,7 +1289,6 @@ const onLoad = () => { } // 赔款方 if (res.data.data.completionRecordEntities.length) { - CompensationParty.value = []; res.data.data.completionRecordEntities.forEach((item, index) => { TotalamountCompensation.value += Number(item.money); CompensationParty.value.push({ From 4427dbaee2dbb58919e3d4b53a657bde2ace0594 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 17 Jan 2024 11:25:50 +0800 Subject: [PATCH 18/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=B2=E8=A3=81?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/aftersales/aftersalesWorkOrder.vue | 2 +- .../aftersales/aftersalesWorkOrderInfo.vue | 176 ++++++++++++++++-- 2 files changed, 162 insertions(+), 16 deletions(-) diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index 99c6e326..6230f46f 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -3032,7 +3032,7 @@ if(UserPermissions.value == '仓库客服'){ //处理完毕菜单下面确定按 if (ConfirmStatus) { // 走的批量确认 - let state = details.selectionList.every(item => item.workOrderStatus !== '30'); + let state = details.selectionList.every(item => item.workOrderStatus != '30'); if (!state) { ElMessage({ message: '批量确认中有状态不符合的必须为处理结果已提交', diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue index 02859b9d..70205310 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfo.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue @@ -590,7 +590,6 @@ type="textarea" :autosize="{ minRows: 5, maxRows: 4 }" disabled - placeholder="暂无仲裁原因" /> @@ -673,6 +672,12 @@ 申诉驳回 + 确定
@@ -851,6 +856,8 @@ import { $_getInfo, $_batchReturn, $_Cancelappeal, + $_updateWorkOrderStatus, + $_updateManagerConfirmed, } from '@/api/aftersales/aftersalesWorkOrder'; import { ref, reactive, computed, onMounted } from 'vue'; import { getToken } from '@/utils/auth'; @@ -912,7 +919,7 @@ const BatchFrom = ref({}); //打回内容 const dialogReturn = ref(false); //打回弹窗 const appeal = ref(false); //工单申诉状态 const AppealReview = ref(false); //申诉状态只能查看 -const warehouseIdState = ref(false);//当前订单仓库状态 +const warehouseIdState = ref(false); //当前订单仓库状态 const CompensationParty = ref([ { name: '', @@ -989,14 +996,51 @@ const PermissionButton = computed(() => { // else if ( $route.query.workOrderStatus != '21')return false // return true return { - reply: !appeal.value && $route.query.workOrderStatus != '80' && $route.query.workOrderStatus != '30', //回复 - Processing_results: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10')), //处理结果10 20 21 - work_order_completion: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus != '80' && UserPermissions.value !='仓库客服') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus != '80' && UserPermissions.value !='仓库客服')) , //完结 - repulse: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10')) && UserPermissions.value !='仓库客服', //打回 - apply_arbitration: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '70') || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '70')) && UserPermissions.value !='仓库客服', //客服仲裁完结 - information_editing: !appeal.value && (($route.query.RouteIndexs =='0' && $route.query.workOrderStatus == '10' ) || ($route.query.RouteIndexs =='3' && $route.query.workOrderStatus == '10' ))&& warehouseIdState.value, //信息编辑 只能待处理和当前仓库人 + reply: + !appeal.value && + $route.query.workOrderStatus != '80' && + $route.query.workOrderStatus != '30' && + $route.query.workOrderStatus != '20' && + $route.query.workOrderStatus != '40', //回复 + Processing_results: + !appeal.value && + (($route.query.RouteIndexs == '0' && $route.query.workOrderStatus == '10') || + ($route.query.RouteIndexs == '3' && $route.query.workOrderStatus == '10')), //处理结果10 20 21 + work_order_completion: + !appeal.value && + (($route.query.RouteIndexs == '0' && + $route.query.workOrderStatus != '80' && + UserPermissions.value != '仓库客服' && + $route.query.workOrderStatus != '20') || + ($route.query.RouteIndexs == '3' && + $route.query.workOrderStatus != '80' && + UserPermissions.value != '仓库客服' && + $route.query.workOrderStatus != '20')), //完结 + repulse: + !appeal.value && + (($route.query.RouteIndexs == '0' && $route.query.workOrderStatus == '10') || + ($route.query.RouteIndexs == '3' && $route.query.workOrderStatus == '10')) && + UserPermissions.value != '仓库客服', //打回 + apply_arbitration: + !appeal.value && + (($route.query.RouteIndexs == '0' && $route.query.workOrderStatus == '70') || + ($route.query.RouteIndexs == '3' && $route.query.workOrderStatus == '70')) && + UserPermissions.value != '仓库客服', //客服仲裁完结 + information_editing: + !appeal.value && + (($route.query.RouteIndexs == '0' && $route.query.workOrderStatus == '10') || + ($route.query.RouteIndexs == '3' && $route.query.workOrderStatus == '10')) && + warehouseIdState.value, //信息编辑 只能待处理和当前仓库人 Appeal_established: appeal.value && AppealReview.value, //申诉成立 - Appeal_rejection:appeal.value && AppealReview.value, //申诉驳回 + Appeal_rejection: appeal.value && AppealReview.value, //申诉驳回 + Processing_confirmation: + (UserPermissions.value != '仓库客服' && + $route.query.RouteIndexs == '0' && + $route.query.workOrderStatus == '40') || + (UserPermissions.value != '仓库客服' && + $route.query.RouteIndexs == '1' && + $route.query.workOrderStatus == '40') || + $route.query.RouteIndexs == '2', }; }); @@ -1172,7 +1216,7 @@ const onLoad = () => { $_getInfo({ id: $route.query.id }).then(res => { if ($route.query.Routstate) { appeal.value = true; - console.log(appeal.value,'appeal.value'); + console.log(appeal.value, 'appeal.value'); } // 只能查看申诉信息 if ($route.query.AppealReview) { @@ -1185,15 +1229,18 @@ const onLoad = () => { } } + console.log(res, '回显返回值参数'); Indexform.value = res.data.data; - if(res.data.data.warehouseId == Mydata.value.id){ + + if (res.data.data.warehouseId == Mydata.value.id) { // 判断订单是否是当前登陆人发起的,用于修改订单信息(必须是待处理) - warehouseIdState.value=true; + warehouseIdState.value = true; } Indexform.value['result'] = []; Indexform.value['processor'] = []; //图片处理回显 + Indexform.value.arbitrate = res.data.data.reasonArbitration;//仲裁原因 Indexform.value.packList = res.data.data.decreaseImageVOList.map(res => { amplifysrcList.value.push(res.imagePath); return { @@ -1273,7 +1320,6 @@ const onLoad = () => { Indexform.value.resultDescription = res.data.data.processingResultsVO.resultDescription; CompensationParty.value = []; if (res.data.data.completionRecipientEntityList.length) { - res.data.data.completionRecipientEntityList.forEach((item, index) => { TotalamountReceived.value += Number(item.money); CompensationParty.value.push({ @@ -1307,6 +1353,7 @@ const onLoad = () => { } }); }); + // 中擦原因回显 console.log(Mydata.value, '记录本地登录'); getDictionaryBiz('result_handling').then(res => { @@ -1355,7 +1402,7 @@ const addireply = () => { businessId: $route.query.workOrderNumber, RouterState: 'determine', index: '0', - workOrderStatus:$route.query.workOrderStatus,//工单状态 + workOrderStatus: $route.query.workOrderStatus, //工单状态 }, }); }; @@ -1465,7 +1512,7 @@ const AppealRejection = () => { } }) .catch(res => { - console.log('错误信息',res); + console.log('错误信息', res); }) .finally(() => { Pageloading.value = false; //关闭加载效果 @@ -1508,6 +1555,105 @@ const ConfirmReturn = () => { dialogReturn.value = false; //关闭打回弹窗 }); }; + +// 待处理确定 和处理完毕确定 + +// 处理完毕里面确定(仓库客服用的) + +const ResultConfirmation = () => { + if (UserPermissions.value == '仓库客服') { + //处理完毕菜单下面确定按钮用于确定处理结果(仓库客服用的) + let data = { + assignList: [], + }; + let ID = {}; + ID = $route.query.id; + data['assignList'].push(ID); + + if ($route.query.workOrderStatus != '30') { + ElMessage({ + message: '状态错误,已经确认过', + type: 'warning', + }); + return; + } + // 仓库客服 + + console.log(data, '处理好的数据'); + $_updateWorkOrderStatus(data) + .then(res => { + console.log(res, '确定提交存储'); + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + } + }) + .catch(res => {}); + } else { + let data = { + assignList: [], + }; + let ConfirmStatus = false; //批量确认状态 + if (!val.row) { + // 说明点击的批量确定 + console.log('当前点击的批量确定'); + if (!details.selectionList.length) { + ElMessage({ + message: '请勾选要处理的数据数据', + type: 'warning', + }); + return; + } else { + ConfirmStatus = true; //说明走的是批量 + data['assignList'] = details.selectionList.map(item => item.id); + console.log(data['assignList'], '批量确定处理好的参数'); + } + } else { + let ID = {}; + ID = val.row.id; + data['assignList'].push(ID); + } + + if (ConfirmStatus) { + // 走的批量确认 + let state = details.selectionList.every(item => item.workOrderStatus == '40'); + if (!state) { + ElMessage({ + message: '批量确认中状态只能为待审核', + type: 'warning', + }); + return; + } + } else { + if (val.workOrderStatus != '40') { + ElMessage({ + message: '状态错误,已经确认过', + type: 'warning', + }); + return; + } + } + // 完结结果确定 + $_updateManagerConfirmed(data) + .then(res => { + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + } + console.log(res, '处理完毕确定'); + }) + .catch(res => { + console.log(res, '错误信息'); + }) + .finally(res => {}); + // 赔款方 + console.log(data, '处理好的值'); + } +};