Browse Source

修复客服已知问题

dev-xx
马远东 1 year ago
parent
commit
a7339f2e3c
  1. 8
      src/api/aftersales/aftersalesWorkOrder.js
  2. 19
      src/option/aftersales/vueTvemp.js
  3. 126
      src/views/aftersales/aftersalesWorkOrder.vue
  4. 26
      src/views/aftersales/aftersalesWorkOrderInfo.vue
  5. 245
      src/views/aftersales/aftersalesWorkOrderend.vue
  6. 171
      src/views/aftersales/aftersalesWorkOrdermodify.vue

8
src/api/aftersales/aftersalesWorkOrder.js

@ -436,4 +436,12 @@ export const $_updateProcessingParty = (data) => {
method: 'put',
data
})
}
export const $_settlementUpdate = (data) => {
return request({
url: '/api/logpm-aftersales/aftersalesWorkOrder/update',
method: 'post',
data
})
}

19
src/option/aftersales/vueTvemp.js

@ -486,7 +486,7 @@ export const Claimsfield = [
label: '异常类型名称',
type: 3,
values: '',
width: '100',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
@ -508,7 +508,7 @@ export const Claimsfield = [
label: '处理结果名称',
type: 3,
values: '',
width: '100',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
@ -538,10 +538,10 @@ export const Claimsfield = [
// },
{
prop: 'discoveryNodeName',
label: '发现环节名称',
label: '发现环节',
type: 3,
values: '',
width: '100',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
@ -552,7 +552,7 @@ export const Claimsfield = [
label: '处理结果说明',
type: 2,
values: '',
width: '100',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
@ -618,7 +618,7 @@ export const Claimsfield = [
label: '钉钉流程号',
type: 2,
values: '',
width: '100',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
@ -637,10 +637,10 @@ export const Claimsfield = [
// },
{
prop: 'workOrderStatusName',
label: '工单状态名称',
label: '工单状态',
type: 3,
values: '',
width: '100',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
@ -651,14 +651,13 @@ export const Claimsfield = [
label: '操作',
type: 6,
values: '',
width: '80',
width: '170',
checkarr: [],
fixed: 'right',
sortable: false,
},
]
// 申诉列表
export const AppealList = [

126
src/views/aftersales/aftersalesWorkOrder.vue

@ -179,23 +179,21 @@
<!-- <el-button @click="addingRecord(slotProps.scope)">新增记录</el-button> -->
<el-button
v-if="
(TabPermissions !== '4' && !AppealStatusT && TabPermissions != '8') ||
(AppealStatusT &&
UserPermissions !== '仓库客服' &&
slotProps.scope.row.typesOf != '2')
(!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'
TabPermissions == '2'
"
@click="DetermineStorage(slotProps.scope)"
>确定</el-button
>
<el-button
v-if="
TabPermissions == '6' &&
@ -208,14 +206,28 @@
>
<el-button
v-if="
AppealStatusT &&
slotProps.scope.row.typesOf == '0' &&
v-if="AppealStatusT && slotProps.scope.row.typesOf == '0' && UserPermissions == '仓库客服' "
@click="appeal(slotProps.scope, 'edit')"
>编辑</el-button
>
<!-- 处理结果编辑 -->
<el-button
v-if="TabPermissions=='4' &&
UserPermissions == '仓库客服'
"
@click="appeal(slotProps.scope, 'edit')"
@click="Resultediting(slotProps.scope)"
>编辑</el-button
>
<!-- 理赔金额确定 -->
<el-button
v-if="TabPermissions=='4' &&
UserPermissions == '仓库客服'
"
@click="DetermineClaims(slotProps.scope)"
>确定理赔金额</el-button
>
<el-button
v-if="AppealStatusT && slotProps.scope.row.typesOf == '3'"
@click="Deleteappeal(slotProps.scope, 'Delete')"
@ -634,6 +646,7 @@ import {
$_AppealDetails,
$_Cancelappeal,
$_getDetails,
$_settlementUpdate,
} from '@/api/aftersales/aftersalesWorkOrder';
import { getToken } from '@/utils/auth';
import { getDictionaryBiz } from '@/api/system/dict'; //
@ -1112,11 +1125,10 @@ const IndexTable = val => {
columnList[2].checkarr = []; //
columnList[3].checkarr = [];
columnList[10].checkarr=[]
updateDictionary(columnList[2].checkarr, 'pc_work_order'); //
updateDictionary(columnList[3].checkarr, 'pc_discovery_node'); //
updateDictionary(columnList[17].checkarr, 'work_order_status'); //
//
updateDictionary(columnList[10].checkarr, 'work_order_status'); //
getDictionaryBiz('after_sales_visits').then(res => {
console.log(res, '角色字典');
const matchingItem = res.data.data.find(
@ -1146,7 +1158,7 @@ const IndexTable = val => {
Tableheaderswitching(columnList);
console.log(res, '初始化返回值');
details.loadingObj.list = false; //
console.log(columnList[17].checkarr,'工单状态12312421');
if (res.data.data) {
page.value.total = res.data.data.total; //
@ -1190,23 +1202,23 @@ const IndexTable = val => {
item.discoveryNodeNameS = columnList[3].checkarr[7].label; //
}
if (item.workOrderStatus == 10) {
item.workOrderStatusNameS = columnList[17].checkarr[0].label; //
item.workOrderStatusNameS = columnList[10].checkarr[0].label; //
} else if (item.workOrderStatus == 20) {
item.workOrderStatusNameS = columnList[17].checkarr[1].label; //
item.workOrderStatusNameS = columnList[10].checkarr[1].label; //
} else if (item.workOrderStatus == 30) {
item.workOrderStatusNameS = columnList[17].checkarr[2].label; //
item.workOrderStatusNameS = columnList[10].checkarr[2].label; //
} else if (item.workOrderStatus == 40) {
item.workOrderStatusNameS = columnList[17].checkarr[4].label; //
item.workOrderStatusNameS = columnList[10].checkarr[4].label; //
} else if (item.workOrderStatus == 50) {
item.workOrderStatusNameS = columnList[17].checkarr[5].label; //
item.workOrderStatusNameS = columnList[10].checkarr[5].label; //
} else if (item.workOrderStatus == 60) {
item.workOrderStatusNameS = columnList[17].checkarr[3].label; //
item.workOrderStatusNameS = columnList[10].checkarr[3].label; //
} else if (item.workOrderStatus == 70) {
item.workOrderStatusNameS = columnList[17].checkarr[6].label; //
item.workOrderStatusNameS = columnList[10].checkarr[6].label; //
} else if (item.workOrderStatus == 80) {
item.workOrderStatusNameS = columnList[17].checkarr[7].label; //
item.workOrderStatusNameS = columnList[10].checkarr[7].label; //
} else if (item.workOrderStatus == 90) {
item.workOrderStatusNameS = columnList[17].checkarr[8].label; //
item.workOrderStatusNameS = columnList[10].checkarr[8].label; //
}
});
details.data = res.data.data.records;
@ -1615,6 +1627,46 @@ const appeal = (val, state) => {
dialogappeal.value = true; //
}
};
//
const DetermineClaims=(val)=>{
console.log(val.row);
let data={
id:val.row.lawoId,
workOrderStatus:30
}
details.loadingObj.list = true; //
console.log(data,'处理好的值');
$_settlementUpdate(data).then(res=>{
console.log(res);
details.loadingObj.list = false; //
if(res.data.code==200){
tabChenge(TabPermissions.value);
}
}).catch(res=>{
details.loadingObj.list = false; //
})
}
//
const Resultediting=(val)=>{
console.log(val.row,'参数');
// return
console.log(val.row,'理赔金额未出');
$router.push({
path: '/aftersales/aftersalesWorkOrdermodify',
query: {
id: val.row.lawoId,
name: val.row.workOrderNumber + '-理赔金额未出编辑',
businessId:val.row.businessId,
warehouseId: val.row.warehouseId,
workOrderNumber:val.row.workOrderNumber,
RouterState:'Kfend',
Processingresults:true,//
index: '1',
},
});
}
//
const Appealbutton = state => {
if (UserPermissions.value == '仓库客服') {
@ -2020,8 +2072,16 @@ const settlementclaim = val => {
$_listSettlement(data).then(res => {
details.loadingObj.list = false; //
console.log(res, '查询理赔数据');
details.data = res.data.data.records; //
page.value.total = res.data.data.total;
if(res.data.data){
if(res.data.data.records.length){
details.data = res.data.data.records; //
}else{
details.data=[]
}
page.value.total = res.data.data.total;
}
}).catch(res=>{
details.loadingObj.list = false; //
});
};
//
@ -2051,6 +2111,8 @@ const appealFn = val => {
details.data = [];
}
page.value.total = res.data.data.total;
}).catch(res=>{
details.loadingObj.list = false; //
});
};
@ -2488,8 +2550,7 @@ const fellSuccess = (response, uploadFile) => {
KFfeel.value = response.data.link;
}
};
//
//
const DetermineStorage = val => {
let data = {
assignList: [],
@ -2498,7 +2559,7 @@ const DetermineStorage = val => {
ID = val.row.id;
data['assignList'].push(ID);
details.loadingObj.list = true; //
if (TabPermissions.value == '6') {
if(UserPermissions.value =='总部客服经理' && TabPermissions.value == '2'){
$_updateManagerConfirmed(data)
.then(res => {
if (res.data.code == 200) {
@ -2507,7 +2568,7 @@ const DetermineStorage = val => {
type: 'success',
});
}
console.log(res, '完结确定');
console.log(res, '处理完毕确定');
tabChenge(TabPermissions.value);
})
.catch(res => {
@ -2515,8 +2576,11 @@ const DetermineStorage = val => {
});
//
console.log(data, '处理好的值');
return
}
if (TabPermissions.value == '2') {
//
if (TabPermissions.value == '2' && UserPermissions.value=='仓库客服' && val.row.workOrderStatus != '30') {
console.log(data, '处理好的数据');
$_updateWorkOrderStatus(data)
.then(res => {

26
src/views/aftersales/aftersalesWorkOrderInfo.vue

@ -690,33 +690,18 @@ const FangAddList = ref([
//
const responsible = ref([
{
value: '1',
value: 1,
label: '工厂',
},
{
value: '2',
value: 2,
label: '外包搬运',
},
{
value: '3',
value: 3,
label: '物流',
},
]);
const DeliveryDriver = ref([
{
value: '0',
label: '兰溪',
},
{
value: '1',
label: '李华',
},
{
value: '2',
label: '唐飞',
},
]);
//
const fileList = ref([]);
//
@ -1051,6 +1036,11 @@ const onLoad = () => {
res.data.data.personResponsibleVOS.forEach(item => {
sum = Number(item.responsibilityRatio) + sum;
});
let factorydata = res.data.data.personResponsibleVOS.find(item => item.typesOf);
if (factorydata.typesOf) {
groundlineType.value = true; //
}
FangAddList.value = res.data.data.personResponsibleVOS.map(res => {
return {
businessName: res.businessId, //ID

245
src/views/aftersales/aftersalesWorkOrderend.vue

@ -716,39 +716,41 @@
<div class="inputMax" v-loading="Msgloadinga" element-loading-text="Loading...">
<div class="inputfell">
<div class="inputbtn">
<div class="inputleft">
<el-upload
ref="uploadRef"
class="upload-demo"
:action="doubledCount"
:headers="headers"
:on-success="fellSuccess"
>
<template #trigger>
<el-button type="primary" class="el-fil">上传附件</el-button>
<div class="felltis" v-if="KFfeel.length">上传成功</div>
</template>
</el-upload>
<el-select
v-model="separateMessageResponsibility"
multiple
filterable
default-first-option
:reserve-keyword="false"
placeholder="指定处理方"
@change="Msgresponsibility"
>
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
</div>
<el-button type="primary" class="el_next" @click="NextRecord()"> 下一条 </el-button>
<div class="inputleft">
<el-upload
ref="uploadRef"
class="upload-demo"
:action="doubledCount"
:headers="headers"
:on-success="fellSuccess"
>
<template #trigger>
<el-button type="primary" class="el-fil">上传附件</el-button>
<div class="felltis" v-if="KFfeel.length">上传成功</div>
</template>
</el-upload>
<el-select
v-model="separateMessageResponsibility"
multiple
filterable
default-first-option
:reserve-keyword="false"
placeholder="指定处理方"
@change="Msgresponsibility"
>
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
</div>
<el-button type="primary" class="el_next" @click="NextRecord()">
下一条
</el-button>
</div>
<el-input
@ -759,11 +761,9 @@
@input="appoint(Msgtextarea)"
/>
<div class="msgHf">
<el-button type="primary" @click="replyMessage()"> 回复 </el-button>
</div>
<el-button type="primary" @click="replyMessage()"> 回复 </el-button>
</div>
</div>
</div>
</div>
@ -900,7 +900,7 @@ const dialogImgList = ref(false); //图片预览弹窗
const amplifyurl = ref(''); //
const amplifysrcList = ref([]); //
const Replycopy = ref([]); //
const Mydata=ref();//
const Mydata = ref(); //
const PackageInfo = ref([
//
{ packageCode: '', orderCode: '', waybillNumber: '' },
@ -1067,7 +1067,7 @@ const TransportChange = val => {
//
const onLoad = () => {
Mydata.value=JSON.parse(localStorage.getItem('my_data'));//
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
//
getDictionaryBiz('after_sales_visits').then(res => {
console.log(res, '角色字典');
@ -1111,7 +1111,10 @@ const onLoad = () => {
.map(item => {
return { businessName: item.businessId };
});
let factorydata = res.data.data.personResponsibleVOS.find(item => item.typesOf);
if (factorydata.typesOf) {
groundlineType.value = true; //
}
FangAddList.value = res.data.data.personResponsibleVOS.map(res => {
console.log(groundlineType.value, '当前责任方状态');
return {
@ -1121,6 +1124,7 @@ const onLoad = () => {
description: res.description, //
};
});
//
res.data.data.processorVOList.forEach(item => {
if (item) {
@ -1157,11 +1161,10 @@ const onLoad = () => {
//
let sum = 0;
FangAddList.value.forEach(item => {
if(item.responsibilityRatio){
if (item.responsibilityRatio) {
item.responsibilityRatio = item.responsibilityRatio.replace(/%/g, '');
sum = Number(item.responsibilityRatio) + sum;
}
});
FangAddList.value.forEach(item => {
item.responsibilityRatio = item.responsibilityRatio + '%';
@ -1288,31 +1291,44 @@ const Fileidentifier = val => {
}
return undefined; // undefined
};
//
const Chathistory = () => {
//
const Chathistory = res => {
Msgloading.value = true; //
MessageResponsibility.value = []; //
Msgtextarea.value = ''; //
$_getSurveyRecord({
id: $route.query.id,
}).then(res => {
let filetype = ''; //
MessageContent.value = []; //
Msgloading.value = false; //
console.log(res, '聊天记录');
res.data.data.surveyRecordEntities.forEach(item => {
if (item.pictureUrl) {
filetype = Fileidentifier(item.pictureUrl);
}
if (res.data.data.processorVOList) {
if (res.data.data.processorVOList.length) {
msgState.value = res.data.data.processorVOList[0].processingStatus; //
}
}
let filetype = ''; //
MessageContent.value = []; //
let resData = null; //
if (UserPermissions.value != '仓库客服') {
console.log(UserPermissions.value, '当前不是仓库客服');
$_getTrackRecord({
id: $route.query.id,
}).then(res => {
resData = res.data.data.surveyRecordEntities;
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, //
});
});
Msgloading.value = false; //
console.log(res, '聊天记录');
});
} else {
$_getSurveyRecord({
id: $route.query.id,
}).then(res => {
resData = res.data.data.surveyRecordEntities;
//
MessageContent.value.push({
time: item.createTime, //
content: item.content, //
@ -1325,44 +1341,27 @@ const Chathistory = () => {
difference: item.difference,
identifying: true, //
});
Msgloading.value = false; //
console.log(res, '聊天记录');
});
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, //
});
});
setTimeout(() => {
const container = scrollContainer.value;
if (container) {
container.scrollTop = container.scrollHeight;
}
}, 0);
});
}
resData.forEach(item => {
if (item.pictureUrl) {
filetype = Fileidentifier(item.pictureUrl);
}
setTimeout(() => {
const container = scrollContainer.value;
if (container) {
container.scrollTop = container.scrollHeight;
if (res.data.data.processorVOList) {
if (res.data.data.processorVOList.length) {
msgState.value = res.data.data.processorVOList[0].processingStatus; //
}
}, 0);
//
}
});
setTimeout(() => {
const container = scrollContainer.value;
if (container) {
container.scrollTop = container.scrollHeight;
}
}, 0);
};
onLoad();
@ -1975,34 +1974,31 @@ const submit = () => {
};
//
const replyMessage = () => {
if(!Msgtextarea.value){
if (!Msgtextarea.value) {
ElMessage({
message: '请输入回复内容',
type: 'warning',
})
return
message: '请输入回复内容',
type: 'warning',
});
return;
}
// if (endFrom.value.processor.includes()) {
// console.log(true);
// } else {
// console.log(false);
// }
// if (endFrom.value.processor.includes()) {
// console.log(true);
// } else {
// console.log(false);
// }
console.log(MessageContent.value, '当前的聊天记录');
console.log(warehouseData.value, '参数1212312312312312');
console.log(MessageResponsibility, '责任方');
console.log(MessageResponsibility.value,'当前处理方信息');
console.log(MessageResponsibility.value, '当前处理方信息');
console.log(separateMessageResponsibility.value);
if(!MessageResponsibility.value.length && !separateMessageResponsibility.value.length){
if (!MessageResponsibility.value.length && !separateMessageResponsibility.value.length) {
ElMessage({
message: '请选择至少一个处理方',
type: 'warning',
})
return
message: '请选择至少一个处理方',
type: 'warning',
});
return;
}
let msgData = {
processorEntityList: [],
@ -2524,8 +2520,8 @@ const CustomerServiceCompleted = () => {
align-items: flex-end;
justify-content: space-between;
position: absolute;
right: 0;
bottom: 0;
right: 0;
bottom: 0;
:deep(.el-button) {
margin-left: 20px;
}
@ -2594,23 +2590,22 @@ const CustomerServiceCompleted = () => {
justify-content: space-between;
align-items: center;
}
.inputleft{
display:flex;
:deep(.el-fil){
.inputleft {
display: flex;
:deep(.el-fil) {
background-color: #afbdc3;
border: none;
}
}
:deep(.el_next){
:deep(.el_next) {
background-color: #afbdc3;
border: none;
border: none;
}
:deep(.el_next:hover){
:deep(.el_next:hover) {
background-color: #409eff;
}
}
:deep(.el-textarea){
:deep(.el-textarea) {
margin-top: 6px;
}
}

171
src/views/aftersales/aftersalesWorkOrdermodify.vue

@ -1,6 +1,5 @@
<template>
<el-card class="box-card" v-loading="editloading"
element-loading-text="正在处理中...">
<el-card class="box-card" v-loading="editloading" element-loading-text="正在处理中...">
<!-- <el-tabs type="border-card" class="topClass" @tab-change="TopChange">
<el-tab-pane label="订单"></el-tab-pane>
<el-tab-pane label="零担"></el-tab-pane>
@ -249,7 +248,7 @@
</el-form>
<el-tabs type="border-card">
<el-tab-pane label="责任方选择">
<el-tab-pane label="内部责任划分">
<div class="ResponsibilityBox">
<div>
<el-button type="primary" @click="responsibleParty" v-if="RouterState != 'Kfend'">
@ -268,6 +267,7 @@
clearable
placeholder="请选提货择责任方"
v-if="groundlineType == 1"
:disabled="RouterState == 'Kfend'"
>
<el-option
v-for="item in responsible"
@ -455,21 +455,38 @@
<el-input
v-model="item.name"
:placeholder="item.state == 0 ? '请填写赔款方' : '请填写受款方'"
:disabled="Processingresults"
/>
<!-- Processingresults表示此刻只能编辑处理结果 -->
</div>
<div class="sk_input">
<el-form-item label="原因">
<el-input v-model="item.reason" placeholder="请填写原因" />
<el-input
v-model="item.reason"
:disabled="Processingresults"
placeholder="请填写原因"
/>
</el-form-item>
</div>
<div class="sk_input">
<el-form-item label="金额">
<el-input @input="amountMoney" :min="0" v-model="item.num" placeholder="金额" />
<el-input
@input="amountMoney"
:min="0"
v-model="item.num"
placeholder="金额"
:disabled="Processingresults"
/>
</el-form-item>
</div>
<div class="sk_input" v-if="item.state == 0">
<el-form-item label="仓库">
<el-select v-model="item.warehouseId" filterable placeholder="请选择仓库">
<el-select
v-model="item.warehouseId"
filterable
placeholder="请选择仓库"
:disabled="Processingresults"
>
<el-option
v-for="item in warehouseData"
:key="item.value"
@ -536,6 +553,7 @@
type="textarea"
:autosize="{ minRows: 5, maxRows: 4 }"
placeholder="请输入仲裁原因"
:disabled="Processingresults"
/>
</el-tab-pane>
</el-tabs>
@ -578,7 +596,9 @@
<el-button
type="primary"
@click="Arbitrationcompleted"
v-if="(RouterState == 'Kfend' && !Appealeditor) || Appealeditor == 'appeal'"
v-if="
(RouterState == 'Kfend' && !Appealeditor) || Appealeditor == 'appeal' || Processingresults
"
>
提交
</el-button>
@ -696,6 +716,7 @@ import {
$_modifyData,
$_shippingInformation,
$_updateCompletionEnd,
$_addProcessingResults,
} from '@/api/aftersales/aftersalesWorkOrder';
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { AddressClosed } from '@/utils/util';
@ -714,7 +735,7 @@ const Indexform = ref({
decreaseImageEntityList: [], //
}); //
const IndexException = ref([]); //
const editloading=ref(false);//
const editloading = ref(false); //
const ProcessingList = ref([]); //
const DiscoveringNodes = ref([]); //
const warehouseData = ref([]); //
@ -766,6 +787,7 @@ const formData = ref({}); // 存储修改过的数据
const dialogImgList = ref(false); //
const amplifyurl = ref(''); //
const amplifysrcList = ref([]); //
const Processingresults = ref(false); //
// ref
//
@ -812,15 +834,15 @@ const FangAddList = ref([
//
const responsible = ref([
{
value: '1',
value: 1,
label: '工厂',
},
{
value: '2',
value: 2,
label: '外包搬运',
},
{
value: '3',
value: 3,
label: '物流',
},
]);
@ -923,7 +945,10 @@ const onLoad = () => {
Appealeditor.value = $route.query.Appealeditor; //
console.log(Appealeditor.value, '申诉编辑状态');
}
//
if ($route.query.Processingresults) {
Processingresults.value = true;
}
console.log(RouterState.value, '路由状态');
getDictionaryBiz('result_handling').then(res => {
console.log(res, '发现环节');
@ -978,6 +1003,11 @@ const onLoad = () => {
unPackageInfo.value = JSON.parse(JSON.stringify(PackageInfo.value)); //
console.log(unPackageInfo.value, '包件信息');
let factorydata = res.data.data.personResponsibleVOS.find(item => item.typesOf);
if (factorydata.typesOf) {
groundlineType.value = true; //
}
FangAddList.value = res.data.data.personResponsibleVOS.map(res => {
ResponsiblepartyData.value.push(res);
@ -1042,6 +1072,7 @@ const onLoad = () => {
text: item.compensationMethodName,
compensationTime: item.compensationTime,
paymentUnit: item.paymentUnit, //
id:item.id, //id
};
}
);
@ -1263,21 +1294,25 @@ const TopChange = val => {
};
const changeProcessingResults = val => {
//
console.log(val,'当前点击的参数');
console.log(ProcessingList.value,'当前的列表');
//
console.log(val[val.length-1]);
ProcessingList.value = ProcessingList.value.filter(item => val.includes(item.state - 1));
//
val.forEach(num => {
let newItem = {
console.log(val,'当前状态');
console.log(num,'当前参数');
newItem = {
input: 0,
min: 0,
max: 9999999999999,
state: num + 1,
state: num,
payment: '',
text: '',
compensationTime: '',
paymentUnit: '',
};
// numnewItemname
switch (num) {
case '1':
@ -1309,8 +1344,8 @@ const changeProcessingResults = val => {
if (!ProcessingList.value.some(item => item.state === newItem.state)) {
ProcessingList.value.push(newItem);
console.log(`添加:${newItem.name}`);
}
});
}
};
//
@ -1354,6 +1389,10 @@ const PaymentConfirmation = val => {
//
const AddCompensation = () => {
if (!Processingresults.value) {
//
return;
}
console.log('添加赔款方');
let som = 1;
CompensationParty.value.forEach(item => {
@ -1365,6 +1404,10 @@ const AddCompensation = () => {
};
//
const AddPayee = () => {
if (!Processingresults.value) {
//
return;
}
let som = 1;
CompensationParty.value.forEach(item => {
if (item.state == 1) {
@ -1398,6 +1441,10 @@ const amountMoney = () => {
};
//
const payremove = (state, val, data) => {
if (!Processingresults.value) {
//
return;
}
console.log(state, '当前移除按钮的状态');
// const completionRecipientEntityListData=ref([]);//
// const completionRecordEntitiesData=ref([]);//
@ -1776,6 +1823,74 @@ const ConfirmForm = () => {
//
const Arbitrationcompleted = () => {
if (Processingresults.value) {
//
//
let data = {
id: $route.query.id,
// workOrderId: $route.query.id, //ID
aftersalesProcessingResultsDTO: {
id: $route.query.id,
},
};
data.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, //
paymentUnit: item.paymentUnit, //
id:item.id, //id
};
} else {
return null;
}
})
.filter(item => item !== null);
//
let sum = 0; //
for (let i = 0; i < ProcessingList.value.length; i++) {
sum = computeNumber(sum, '+', ProcessingList.value[i].input).result;
}
data.aftersalesProcessingResultsDTO.money = sum; //
data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value
.map(item => item.name)
.join(','); //
data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
.map(item => item.text)
.join(',');
console.log(data, '编辑后的数据');
$_addProcessingResults(data).then(res=>{
console.log(res, '理赔编辑成功返回值');
ElMessage({
message: res.data.msg,
type: 'success',
});
if (res.data.code == 200) {
$router.push({
path: '/aftersales/aftersalesWorkOrder',
});
AddressClosed('/aftersales/aftersalesWorkOrdermodify'); //
}
}) .catch(error => {
ElMessage({
message: res.data.msg,
type: 'success',
});
});
return;
}
//
if (Appealeditor.value == 'appeal') {
// ,
let data = {
@ -1822,9 +1937,8 @@ const Arbitrationcompleted = () => {
};
});
console.log(data, '处理好的值');
editloading.value=true,//
$_updateCompletionEnd(data)
.then(res => {
editloading.value = true; //
$_updateCompletionEnd(data).then(res => {
console.log(res, '完结编辑');
if (res.data.code == 200) {
ElMessage({
@ -1832,14 +1946,15 @@ const Arbitrationcompleted = () => {
type: 'success',
});
$store.commit('DEL_TAG_CURRENT'); //
$router.push({//
$router.push({
//
path: '/aftersales/aftersalesWorkOrder',
});
editloading.value=false;//
editloading.value = false; //
}
})
.catch(res => {
editloading.value=false;//
editloading.value = false; //
});
return;
//
@ -1851,7 +1966,7 @@ const Arbitrationcompleted = () => {
completionRecordEntities: [], //
reasonArbitration: Indexform.value.arbitrate, //
aftersalesProcessingResultsDTO: {
workOrderId: '', //ID
workOrderId: $route.query.id, //ID
},
assignList: [],
};
@ -1866,7 +1981,6 @@ const Arbitrationcompleted = () => {
money: Number(item.num), //
reasonArbitration: item.reason, //
workOrderId: $route.query.id, //
//warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // ID
warehouseId: item.warehouseId, //ID
personResponsibleList: item.personResponsibleList, //
};
@ -1911,6 +2025,7 @@ const Arbitrationcompleted = () => {
compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '',
resultName: item.name, //
paymentUnit: item.paymentUnit, //
id:item.id,//id
};
} else {
return null;
@ -1933,7 +2048,7 @@ const Arbitrationcompleted = () => {
});
if (res.data.code == 200) {
$router.push('/aftersales/aftersalesWorkOrder'); //
AddressClosed('/aftersales/aftersalesWorkOrdermodify');
AddressClosed('/aftersales/aftersalesWorkOrdermodify');///
}
});
};

Loading…
Cancel
Save