diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index ea295edc..bcdcd6b2 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -179,21 +179,29 @@ <!-- <el-button @click="addingRecord(slotProps.scope)">新增记录</el-button> --> <el-button v-if=" - (TabPermissions !== '4' && !AppealStatusT && TabPermissions!='8') || (AppealStatusT && UserPermissions !== '仓库客服' && slotProps.scope.row.typesOf != '2') + (TabPermissions !== '4' && !AppealStatusT && TabPermissions != '8') || + (AppealStatusT && + UserPermissions !== '仓库客服' && + slotProps.scope.row.typesOf != '2') " @click="view(slotProps.scope)" >查看</el-button > <!-- 处理结果确定和完结确定 --> <el-button - v-if="TabPermissions == '2' && slotProps.scope.row.workOrderStatus !='30'" + v-if=" + TabPermissions == '2' && slotProps.scope.row.workOrderStatus != '30' + " @click="DetermineStorage(slotProps.scope)" >确定</el-button > <el-button v-if=" - TabPermissions == '6' && !AppealStatusT && UserPermissions == '仓库客服' && slotProps.scope.row.workOrderStatus!='100' + TabPermissions == '6' && + !AppealStatusT && + UserPermissions == '仓库客服' && + slotProps.scope.row.workOrderStatus != '100' " @click="appeal(slotProps.scope, false)" >申诉</el-button @@ -1128,6 +1136,10 @@ const IndexTable = val => { } else { TabList.value[2].state = true; } + if (UserPermissions.value == '仓库客服') { + details.query.workOrderStatus = 1000; + console.log('执行了1000'); + } } else { TabList.value[2].state = true; UserPermissions.value = '仓库客服'; @@ -1237,9 +1249,7 @@ const OnLoad = () => { console.log(data, '要提交的数据'); updateDictionary(columnList[2].checkarr, 'pc_work_order'); //异常类型 updateDictionary(columnList[3].checkarr, 'pc_discovery_node'); //发现环节 - if(TabPermissions.value=='0'){ - details.query.workOrderStatus = 1000; - } + IndexTable(details.query); getDeptWarehouse({}).then(res => { res.data.data.forEach(item => { @@ -1362,25 +1372,25 @@ const searchHide = () => { // 异常工单号点击查看 const InformationViewing = val => { - if(AppealStatusT.value){ + if (AppealStatusT.value) { // 表示当前在申诉列表 $router.push({ - // AppealStatusT为真表示是申诉列表 - 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, - ProcessType: TabPermissions.value == 2 ? '2' : TabPermissions.value == 3 ? '1' : '', //类型 1 待处理 2 已处理 - RouteIndexs: TabPermissions.value, //当前记录参数 - Routstate: 'appeal', //申诉列表 - AppealReview:val.row.typesOf=='0'?'true':'false', //当前只能查看申诉详情信息 - }, - }); - return + // AppealStatusT为真表示是申诉列表 + 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, + ProcessType: TabPermissions.value == 2 ? '2' : TabPermissions.value == 3 ? '1' : '', //类型 1 待处理 2 已处理 + RouteIndexs: TabPermissions.value, //当前记录参数 + Routstate: 'appeal', //申诉列表 + AppealReview: val.row.typesOf == '0' ? 'true' : 'false', //当前只能查看申诉详情信息 + }, + }); + return; } $router.push({ @@ -1412,7 +1422,7 @@ const view = val => { ProcessType: TabPermissions.value == 2 ? '2' : TabPermissions.value == 3 ? '1' : '', //类型 1 待处理 2 已处理 RouteIndexs: TabPermissions.value, //当前记录参数 Routstate: '', //申诉列表 - AppealReview:val.row.typesOf?val.row.typesOf=='0'?'true':'false':'true', //当前只能查看申诉详情信息 + AppealReview: val.row.typesOf ? (val.row.typesOf == '0' ? 'true' : 'false') : 'true', //当前只能查看申诉详情信息 }, }); }; @@ -1796,7 +1806,7 @@ const searchChangeS = () => { details.search = false; //关闭搜索 // tabValue.value = 0; // IndexTable(); //首页初始化信息 - tabChenge(TabPermissions.value) + tabChenge(TabPermissions.value); }; // 网页顶部清空按钮 const searchReset = () => { @@ -2492,38 +2502,41 @@ const DetermineStorage = val => { let ID = {}; ID = val.row.id; data['assignList'].push(ID); - details.loadingObj.list=true;//开启加载效果 + details.loadingObj.list = true; //开启加载效果 if (TabPermissions.value == '6') { - - $_updateManagerConfirmed(data).then(res => { - if (res.data.code == 200) { - ElMessage({ - message: res.data.msg, - type: 'success', - }); - } - console.log(res, '完结确定'); - tabChenge(TabPermissions.value) - }).catch(res=>{ - details.loadingObj.list=false;//关闭加载效果 - }); + $_updateManagerConfirmed(data) + .then(res => { + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + } + console.log(res, '完结确定'); + tabChenge(TabPermissions.value); + }) + .catch(res => { + details.loadingObj.list = false; //关闭加载效果 + }); // 赔款方 console.log(data, '处理好的值'); } if (TabPermissions.value == '2') { 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;//关闭加载效果 - }); + $_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; //关闭加载效果 + }); } }; @@ -2913,13 +2926,13 @@ const Deleteappeal = val => { let id = val.row.id; $_getDetails({ ids: id }) .then(res => { - if (res.data.code == 200) { - ElMessage({ - message: '删除成功', - type: 'success', - }); - } - AppealListFn(); + if (res.data.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success', + }); + } + AppealListFn(); }) .catch(res => { console.log(res, '删除失败返回值'); @@ -2927,7 +2940,7 @@ const Deleteappeal = val => { }; // 回复按钮 -const MessageReply=(val)=>{ +const MessageReply = val => { $router.push({ path: '/aftersales/aftersalesWorkOrderend', query: { @@ -2935,11 +2948,10 @@ const MessageReply=(val)=>{ name: val.row.workOrderNumber + '-消息回复', businessId: val.row.businessId, RouterState: 'determine', - index: '0', + index: '0', }, }); - -} +}; </script> <style scoped lang="scss">