|
|
|
@ -498,18 +498,24 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
label="金额(元)" |
|
|
|
|
label="金额/占比" |
|
|
|
|
:prop="`responsibilitiesList[${index}.responsibilityRatio]`" |
|
|
|
|
:rules="ruleForm.responsibilityRatio" |
|
|
|
|
> |
|
|
|
|
<el-input-number |
|
|
|
|
<!-- <el-input-number |
|
|
|
|
v-model="item.responsibilityRatio" |
|
|
|
|
:min="0" |
|
|
|
|
:max="item.ProportionMax" |
|
|
|
|
:controls="false" |
|
|
|
|
:precision="2" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
/> --> |
|
|
|
|
<el-input |
|
|
|
|
v-model="item.responsibilityRatio" |
|
|
|
|
placeholder="请输入三方责任人" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="三方责任人" |
|
|
|
@ -696,7 +702,7 @@
|
|
|
|
|
v-model="form.ProcessingTab" |
|
|
|
|
class="demo-tabs Completioninformation" |
|
|
|
|
v-loading="form.Packageloading" |
|
|
|
|
v-if="$route.query.typesOf == '0'" |
|
|
|
|
v-if="$route.query.workOrderStatus == '100'" |
|
|
|
|
> |
|
|
|
|
<el-tab-pane label="完结信息" name="0"> |
|
|
|
|
<div class="el-ckbtn"> |
|
|
|
@ -778,7 +784,7 @@
|
|
|
|
|
v-model="form.arbitration" |
|
|
|
|
class="demo-tabs arbitration" |
|
|
|
|
v-loading="form.Packageloading" |
|
|
|
|
v-if="$route.query.typesOf == '0'" |
|
|
|
|
v-if="$route.query.workOrderStatus == '100'" |
|
|
|
|
> |
|
|
|
|
<el-tab-pane label="仲裁原因" name="0"> |
|
|
|
|
<el-input |
|
|
|
@ -823,7 +829,7 @@
|
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
icon="Position" |
|
|
|
|
@click="onSubmit" |
|
|
|
|
@click="onSubmitAdd" |
|
|
|
|
v-if="PermissionButton.Modification_submission" |
|
|
|
|
>修改提交</el-button |
|
|
|
|
> |
|
|
|
@ -891,6 +897,7 @@ import {
|
|
|
|
|
$_getInfo, |
|
|
|
|
$_modifyData, |
|
|
|
|
$_updateCompletionEnd, |
|
|
|
|
$_updatePersonResponsible, |
|
|
|
|
} from '@/api/aftersales/aftersalesWorkOrder'; |
|
|
|
|
import { compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
@ -1027,7 +1034,7 @@ const Modificationsubmission = () => {
|
|
|
|
|
// 申诉成立权限 |
|
|
|
|
const Appealestablished = () => { |
|
|
|
|
if (form.value.UserPermissions == '总部客服经理') { |
|
|
|
|
if ($route.query.typesOf == '0') { |
|
|
|
|
if ($route.query.workOrderStatus == '100') { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1948,7 +1955,100 @@ const Compremove = (item, index) => {
|
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}; |
|
|
|
|
const onSubmitAdd = () => { |
|
|
|
|
ruleFormRef.value.validate(valid => { |
|
|
|
|
if (!valid) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '信息未填写完整,请根据提示填写完整!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const message = `注意信息填写正确!点击确定将<span style="color: red;">提交修改工单</span>是否继续?`; |
|
|
|
|
ElMessageBox.confirm(message, '提示', { |
|
|
|
|
dangerouslyUseHTMLString: true, // 如果组件支持,启用此选项以解析 HTML |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(async () => { |
|
|
|
|
form.value.Pageloading = true; // 开启页面加载 |
|
|
|
|
|
|
|
|
|
let submitData = { |
|
|
|
|
id: $route.query.id, |
|
|
|
|
personResponsibleVOS: [], // 确保这个字段被初始化为一个数组 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 内部责任划分 |
|
|
|
|
if (form.value.responsibilitiesList && form.value.responsibilitiesList.length) { |
|
|
|
|
form.value.responsibilitiesList.forEach(item => { |
|
|
|
|
console.log(item); |
|
|
|
|
let data = { |
|
|
|
|
responsibilityRatio: item.responsibilityRatio, // 责任占比 |
|
|
|
|
tripartite: item.tripartite, // 三方责任人 |
|
|
|
|
description: item.description, // 说明 |
|
|
|
|
id:item.valueId||'' |
|
|
|
|
}; |
|
|
|
|
// 责任人查询 |
|
|
|
|
let Responsibleperson = item.ResponsibleoNameptions.find( |
|
|
|
|
res => res.id == item.personResponsibleId |
|
|
|
|
); |
|
|
|
|
console.log(Responsibleperson, 'Responsibleperson'); |
|
|
|
|
|
|
|
|
|
if (form.value.groundlineType == '1') { |
|
|
|
|
data.personResponsibleName = item.personResponsibleId; // 责任人名称 |
|
|
|
|
data.businessName = item.Processingoptions.find( |
|
|
|
|
res => res.value == item.businessId |
|
|
|
|
).label; // 责任方 |
|
|
|
|
data.businessId = item.businessId; // 责任方 ID |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
data.personResponsibleId = Responsibleperson ? Responsibleperson.id : null; // 责任人 ID |
|
|
|
|
data.personResponsibleName = |
|
|
|
|
item.ResponsibleoNameptions.find(res => res.id == item.personResponsibleId)?.name || |
|
|
|
|
item.personResponsibleId; // 责任人名称 |
|
|
|
|
data.businessName = item.Responsibleoptions.find( |
|
|
|
|
res => res.value == item.businessId |
|
|
|
|
).label; // 责任方 |
|
|
|
|
data.businessId = item.businessId; // 责任方 ID |
|
|
|
|
} |
|
|
|
|
// 如果是自定义责任人就删除 ID |
|
|
|
|
if (!data.personResponsibleId) { |
|
|
|
|
delete data.personResponsibleId; |
|
|
|
|
} |
|
|
|
|
submitData.personResponsibleVOS.push(data); // 确保这里使用的是 .push 方法 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(submitData, '处理好的参数'); |
|
|
|
|
|
|
|
|
|
form.value.Pageloading = false; // 关闭页面加载,这里放在提交数据前是为了避免后续的修改被页面加载状态遮盖 |
|
|
|
|
|
|
|
|
|
$_updatePersonResponsible(submitData) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
$useStore.commit('DEL_TAG_CURRENT'); // 关闭当前页面 |
|
|
|
|
$router.push('/aftersales/aftersalesWorkOrder'); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(error => { |
|
|
|
|
console.log(error, 'error'); |
|
|
|
|
}) |
|
|
|
|
.finally(() => { |
|
|
|
|
form.value.Pageloading = false; // 最后确保页面加载状态被关闭 |
|
|
|
|
}); |
|
|
|
|
}).catch(() => { |
|
|
|
|
// 用户点击取消按钮的回调 |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '已取消提交', |
|
|
|
|
type: 'info', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 提交 |
|
|
|
|
const onSubmit = () => { |
|
|
|
|
console.log(form.value); |
|
|
|
|