From 7c5ce3dca46607aee8d49d06e58be0f531cbb50c Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 10 Jan 2024 10:44:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=95=86=E9=85=8D=E5=A4=96?= =?UTF-8?q?=E5=8D=8F=E6=8F=90=E4=BA=A4=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 | 283 +++++++++++------- .../turndelivery/deliveryDiscuss.vue | 24 +- 2 files changed, 190 insertions(+), 117 deletions(-) diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index 8e2fe33a..8fc3a4e0 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -122,7 +122,7 @@ - 申诉 @@ -172,8 +172,10 @@
查看 @@ -185,22 +187,33 @@ > 申诉 - 编辑 取消申诉 - - + @@ -445,7 +458,11 @@
- +
{ let data = { id: val.row.id, //取消申诉ID typesOf: '3', //申诉状态 - workOrderId:val.row.workOrderId,//异常工单ID + workOrderId: val.row.workOrderId, //异常工单ID }; - + $_Cancelappeal(data).then(res => { console.log(res, '取消申诉返回值'); if (res.data.code == 200) { @@ -1483,10 +1500,10 @@ const CancelappealFn = val => { // 工单申诉按钮 const appeal = (val, state) => { - AppealAttachment.value=[];//清空图片 - Appealselection.value='';//清空责任人 - Reasonforappeal.value='',//清空申诉内容 - console.log(state); + AppealAttachment.value = []; //清空图片 + Appealselection.value = ''; //清空责任人 + (Reasonforappeal.value = ''), //清空申诉内容 + console.log(state); console.log(val.row, '申诉当前点击的按钮'); if (state == 'edit') { // 当前是编辑申诉 @@ -1506,14 +1523,14 @@ const appeal = (val, state) => { setTimeout(() => { console.log(res.data.data.peopleEntityList.map(item => item.actualPersonId)); console.log(warehouseData.value, '仓库数据'); - if(res.data.data.peopleEntityList){ - Appealselection.value= res.data.data.peopleEntityList.map(item => item.actualPersonId) + if (res.data.data.peopleEntityList) { + Appealselection.value = res.data.data.peopleEntityList.map(item => item.actualPersonId); + } + if (res.data.data.imagePath) { + AppealAttachment.value.push({ + url: res.data.data.imagePath, + }); } - if(res.data.data.imagePath){ - AppealAttachment.value.push({ - url:res.data.data.imagePath, - }) - } dialogappeal.value = true; //展开申诉编辑 }, 0); }); @@ -1549,94 +1566,96 @@ const appeal = (val, state) => { }; // 工单申诉确认按钮 const Appealbutton = state => { - if(UserPermissions.value =='仓库客服'){ + if (UserPermissions.value == '仓库客服') { if (AppealAttachment.value.length > 1) { - ElMessage({ - message: '只能上传一张图片', - type: 'warning', - }); - return; - } - // appealData.value单条申诉点击变量暂未启用 - console.log(details.selectionList, '当前申诉的东西'); - loadingappeal.value = true; //开启加载效果 - console.log(Appealselection.value, '当前选择的责任人'); - console.log(warehouseData.value, '要循环处理的参数'); - let data = { - peopleEntityList: [], //参数一 - imagePath: '', //申诉图片附件 - }; - if(AppealeditorState.value){ - data.workOrderId = details.selectionList[0].workOrderId; - }else{ - data.workOrderId = details.selectionList[0].id; - } - data.reason = Reasonforappeal.value; - data.appealPeopleName = warehouseData.value - .filter(item => Appealselection.value.includes(item.value)) - .map(item => item.label) - .join(','); //实际责任人名称 - //如果为编辑状态追加ID字段 - console.log(AppealeditorState.value, '申诉状态'); - if (AppealeditorState.value) { - data.id = details.selectionList[0].id; - } - console.log(details.selectionList, '准备处理的数据'); - //处理数据 - Appealselection.value.forEach(item => { - console.log(item,'循环的值'); - data['peopleEntityList'].push({ - workOrderId: details.selectionList[0].id, //异常工单ID - reason: Reasonforappeal.value, //申诉理由 - claimant: userInfo.value.content.user_name, //申诉人 - actualPersonId: warehouseData.value.find(res => res.value == item).value, //实际责任人ID - actualPersonName: warehouseData.value.find(res=> res.value == item).label, //实际责任人名称 - }); - }); - if (AppealAttachment.value.length) { - console.log(AppealAttachment.value,'图片'); - if(AppealAttachment.value[0].response){ - data.imagePath = AppealAttachment.value[0].response.data.link; //申诉图片 - }else{ - data.imagePath = AppealAttachment.value[0].url; //申诉图片 - } - } - console.log(data, '处理好的值'); - - $_appealSubmit(data).then(res => { - if (res.data.code == 200) { ElMessage({ - message: res.data.msg, - type: 'success', + message: '只能上传一张图片', + type: 'warning', }); + return; } - }).finally(res=>{ - dialogappeal.value = false; //关闭申诉弹窗 - loadingappeal.value = false; //关闭加载效果 - console.log(res, '功返回值'); - ProcessingPartyState.value = false; //关闭处理方 - ArbitrationStatus.value = false; //不可以申请仲裁 - AppealeditorState.value = false; //关闭编辑状态 - appealData.value = {}; //清空当前行申诉数据 - if(AppealStatusT.value){ - Tableheaderswitching(AppealList); //切换表头 - AppealList.forEach(item => { - //清空搜索记录 - item.values = ''; + // appealData.value单条申诉点击变量暂未启用 + console.log(details.selectionList, '当前申诉的东西'); + loadingappeal.value = true; //开启加载效果 + console.log(Appealselection.value, '当前选择的责任人'); + console.log(warehouseData.value, '要循环处理的参数'); + let data = { + peopleEntityList: [], //参数一 + imagePath: '', //申诉图片附件 + }; + if (AppealeditorState.value) { + data.workOrderId = details.selectionList[0].workOrderId; + } else { + data.workOrderId = details.selectionList[0].id; + } + data.reason = Reasonforappeal.value; + data.appealPeopleName = warehouseData.value + .filter(item => Appealselection.value.includes(item.value)) + .map(item => item.label) + .join(','); //实际责任人名称 + //如果为编辑状态追加ID字段 + console.log(AppealeditorState.value, '申诉状态'); + if (AppealeditorState.value) { + data.id = details.selectionList[0].id; + } + console.log(details.selectionList, '准备处理的数据'); + //处理数据 + Appealselection.value.forEach(item => { + console.log(item, '循环的值'); + data['peopleEntityList'].push({ + workOrderId: details.selectionList[0].id, //异常工单ID + reason: Reasonforappeal.value, //申诉理由 + claimant: userInfo.value.content.user_name, //申诉人 + actualPersonId: warehouseData.value.find(res => res.value == item).value, //实际责任人ID + actualPersonName: warehouseData.value.find(res => res.value == item).label, //实际责任人名称 + }); }); - appealFn(); // 获取申诉列表 - }else{ - data.workOrderStatus = 80; - details.query.workOrderStatus = 80; - tabValue.value = 6; - empty(); //清空搜索数据 - IndexTable({ workOrderStatus: 80 }); + if (AppealAttachment.value.length) { + console.log(AppealAttachment.value, '图片'); + if (AppealAttachment.value[0].response) { + data.imagePath = AppealAttachment.value[0].response.data.link; //申诉图片 + } else { + data.imagePath = AppealAttachment.value[0].url; //申诉图片 + } } - ElMessage({ - message: res.data.msg, - type: 'success', + console.log(data, '处理好的值'); + + $_appealSubmit(data) + .then(res => { + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + } + }) + .finally(res => { + dialogappeal.value = false; //关闭申诉弹窗 + loadingappeal.value = false; //关闭加载效果 + console.log(res, '功返回值'); + ProcessingPartyState.value = false; //关闭处理方 + ArbitrationStatus.value = false; //不可以申请仲裁 + AppealeditorState.value = false; //关闭编辑状态 + appealData.value = {}; //清空当前行申诉数据 + if (AppealStatusT.value) { + Tableheaderswitching(AppealList); //切换表头 + AppealList.forEach(item => { + //清空搜索记录 + item.values = ''; + }); + appealFn(); // 获取申诉列表 + } else { + data.workOrderStatus = 80; + details.query.workOrderStatus = 80; + tabValue.value = 6; + empty(); //清空搜索数据 + IndexTable({ workOrderStatus: 80 }); + } + ElMessage({ + message: res.data.msg, + type: 'success', + }); }); - }); } }; @@ -1955,7 +1974,6 @@ const settlementclaim = val => { }; // 获取申诉列表 const appealFn = val => { - details.loadingObj.list = true; //开启动画加载 AppealStatus.value = true; //开启申诉列表状态 TimeoutStatus.value = false; //关闭 超时状态 @@ -1975,7 +1993,10 @@ const appealFn = val => { console.log(res, '申诉列表返回值'); if (res.data.data.records.length) { - details.data = res.data.data.records; + // details.data = res.data.data.records; + for (let i = 1; i < 100; i++) { + details.data.push({}); + } } else { details.data = [{}]; } @@ -1985,7 +2006,6 @@ const appealFn = val => { // 申诉列表 const AppealTab = val => { - if (val == 0) { AppealStatusT.value = false; //申诉列表关闭 Tableheaderswitching(columnList); //切换表头 @@ -1999,11 +2019,10 @@ const AppealTab = val => { }; IndexTable(data); } else { - AppealStatusT.value = true; //申诉列表开启 console.log(val, '切换申诉列表'); data.workOrderStatus = ''; - console.log( data.workOrderStatus,'当前搜索状态'); + console.log(data.workOrderStatus, '当前搜索状态'); Tableheaderswitching(AppealList); //切换表头 AppealList.forEach(item => { //清空搜索记录 @@ -2012,9 +2031,9 @@ const AppealTab = val => { appealFn(); // 获取申诉列表 } - AppealAttachment.value=[];//清空图片 - Appealselection.value='';//清空责任人 - Reasonforappeal.value='';//清空申诉内容 + AppealAttachment.value = []; //清空图片 + Appealselection.value = ''; //清空责任人 + Reasonforappeal.value = ''; //清空申诉内容 }; // 超时金额修改 const BtnModifyAmount = val => { @@ -2043,6 +2062,30 @@ const ModifyAmountFn = () => { dialogModifyAmount.value = false; //关闭超时金额弹窗修改 }); }; +function getWinHight() { + var windowHight = 0; + if (document.body.clientHeight && document.documentElement.clientHeight) { + windowHight = + document.body.clientHeight < document.documentElement.clientHeight + ? document.body.clientHeight + : document.documentElement.clientHeight; + } else { + // windowHight=(document.body.clientHeight>document.documentElement.clientHeight)?document.body.clientHeight:document.documentElement.clientHeight; + } + // return windowHight; + return document.documentElement.clientHeight; + } + + +const height =(val)=>{ + console.log('执行了计算高度'); + var bodyContent = document.querySelectorAll('.maboxhi'); + const _height = getWinHight(); + // 设置列表的高度 + bodyContent.forEach(val => { + val.style.height = _height - val.getBoundingClientRect().top - (val) + 'px'; + }); +} // 查询超时记录 const TimeoutHandling = val => { timeoutList[3].checkarr = []; //异常类型名称 @@ -2144,6 +2187,18 @@ const tabChenge = val => { Tableheaderswitching(columnList); //表头切换 empty(); IndexTable(data); + + console.log('执行了计算高度'); + var bodyContent = document.querySelectorAll('.maboxhi'); + const _height = getWinHight(); + // 设置列表的高度 + bodyContent.forEach(val => { + val.style.height = _height - val.getBoundingClientRect().top - (65+20) + 'px'; + }); + + + + } else if (val == 7) { // 超时未处理 ProcessingPartyState.value = false; //关闭处理方 @@ -2994,6 +3049,9 @@ const CompletedSubmission = () => { display: flex; align-items: flex-end; margin-bottom: 10px; + position: fixed; + bottom: 0; + right: 6px; } .el-times { :deep(.el-input__wrapper) { @@ -3287,7 +3345,4 @@ const CompletedSubmission = () => { width: 100%; } } -:deep(#bodys){ - height: auto !important; -} diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index c7222286..e9b459e2 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -2546,10 +2546,27 @@ const merge = (val, kindS) => { if (kindS == 'WX') { // 如果是外协就不进行下面的司机合并 console.log('当前是外协'); - state.value = true; //满足提交条件 + + if(!DataSubmit.value.tripartite.distributionCompany){ + ElMessage({ + message: '请选择外协来源', + type: 'warning', + }); return; } - delete DataSubmit.value.tripartite; //删掉外协字段 + + + if (!DataSubmit.value.taskTime) { + ElMessage({ + message: '请填写配送日期', + type: 'warning', + }); + return; + } + state.value = true; //满足提交条件 + return; + } + // 判断司机配置是否选择 if (!DriverTemporaryStorage.value.length && !VehicleTemporaryStorage.value.length) { ElMessage({ @@ -2590,7 +2607,7 @@ const merge = (val, kindS) => { return; } // 如果是提交就不弹窗 - + delete DataSubmit.value.tripartite; //删掉外协字段 // 合并司机和车辆信息 let dataInfo = []; //暂存司机配置 dataInfo = DriverTemporaryStorage.value.map((driver, index) => ({ @@ -2723,6 +2740,7 @@ const SubmitCommercial = async () => { editLoading.value = false; //关闭提交加载 if (code !== 200) return; + state.value = false; //重置满足条件 ElMessage.success('操作成功'); ElMessageBox.alert('操作成功', '', {