|
|
|
@ -1619,11 +1619,87 @@ const PaymentConfirmation = val => {
|
|
|
|
|
console.log(ProcessingList.value, '选择好的支付列表'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 确定提交存储 |
|
|
|
|
// 确定存储 |
|
|
|
|
const DetermineStorage=()=>{ |
|
|
|
|
$_updateWorkOrderStatus().then(res=>{ |
|
|
|
|
console.log(res,'确定提交存储'); |
|
|
|
|
}) |
|
|
|
|
console.log($route.query.id, '异常ID'); |
|
|
|
|
console.log(ProcessingList.value, 'ProcessingList12312'); |
|
|
|
|
let data = { |
|
|
|
|
aftersalesProcessingResultsDTO: { |
|
|
|
|
}, |
|
|
|
|
processingMoneyEntityList: [], //赔付方式 |
|
|
|
|
assignList:[{}] |
|
|
|
|
}; |
|
|
|
|
let a={} |
|
|
|
|
a=$route.query.id |
|
|
|
|
data['assignList'].push(a) |
|
|
|
|
data.id = $route.query.id; |
|
|
|
|
data.aftersalesProcessingResultsDTO['workOrderId'] = $route.query.id; //异常工单ID |
|
|
|
|
let sum = 0; //金额总计 |
|
|
|
|
for (let i = 0; i < ProcessingList.value.length; i++) { |
|
|
|
|
console.log(ProcessingList.value[i].input); |
|
|
|
|
sum = computeNumber(sum, '+', ProcessingList.value[i].input).result; |
|
|
|
|
} |
|
|
|
|
data.aftersalesProcessingResultsDTO.money = sum; //金额汇总 |
|
|
|
|
// data['compensationMethod'] = Paymentmethod.value.filter( |
|
|
|
|
// item => item.dictKey == endFrom.value.compensationMethod |
|
|
|
|
// )[0].dictValue; //目前是单选 |
|
|
|
|
|
|
|
|
|
// data['compensationMethod'] = endFrom.value.compensationMethod.join(','); //赔付方式多选 |
|
|
|
|
// console.log(data['compensationMethod']); |
|
|
|
|
console.log(Paymentmethod.value, 'Paymentmethod.value'); |
|
|
|
|
data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value |
|
|
|
|
.map(item => item.text) |
|
|
|
|
.join(','); |
|
|
|
|
data['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, //处理结果名字 |
|
|
|
|
compensationTime: item.compensationTime, //赔付时间 |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.filter(item => item !== null); |
|
|
|
|
data.aftersalesProcessingResultsDTO.processingMoneyEntityList = |
|
|
|
|
data['processingMoneyEntityList']; |
|
|
|
|
console.log('走到了这一步'); |
|
|
|
|
data.aftersalesProcessingResultsDTO.workOrderId = $route.query.id; //异常工单ID |
|
|
|
|
data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value |
|
|
|
|
.map(item => item.name) |
|
|
|
|
.join(','); //处理结果说明文字拼接 |
|
|
|
|
let imgLink = ''; //存储图片地址 |
|
|
|
|
// 图片处理存在问题 |
|
|
|
|
// if (endFrom.value['packageImage'].length) { |
|
|
|
|
// imgLink = endFrom.value['packageImage'].map(item => item.response.data.link).join(','); //图片处理 |
|
|
|
|
// } |
|
|
|
|
if (videoUrl.value && imgLink) { |
|
|
|
|
data.aftersalesProcessingResultsDTO['annex'] = videoUrl.value + ',' + imgLink; |
|
|
|
|
} else { |
|
|
|
|
data.aftersalesProcessingResultsDTO['annex'] = imgLink; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(data, '处理好的数据'); |
|
|
|
|
delete data.aftersalesProcessingResultsDTO.id; //删除ID字段 |
|
|
|
|
|
|
|
|
|
data.aftersalesProcessingResultsDTO.warehouseId = info.warehouseId; //仓库ID |
|
|
|
|
console.log(data, '处理好的数据'); |
|
|
|
|
// $_updateWorkOrderStatus(data).then(res=>{ |
|
|
|
|
// console.log(res,'确定提交存储'); |
|
|
|
|
// }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 提交信息 |
|
|
|
|