|
|
|
@ -59,8 +59,12 @@
|
|
|
|
|
<el-button type="primary" icon="FolderChecked" v-if="ButtonPermissions.ManagerConfirmed" |
|
|
|
|
>完结批量审核</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="Select" v-if="ButtonPermissions.Batchdetermination" |
|
|
|
|
>批量确定</el-button |
|
|
|
|
<el-button |
|
|
|
|
@click="ResultConfirmed" |
|
|
|
|
type="primary" |
|
|
|
|
icon="Select" |
|
|
|
|
v-if="ButtonPermissions.Batchdetermination" |
|
|
|
|
>批量处理结果提交</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="Stamp" v-if="ButtonPermissions.Result_review" |
|
|
|
|
>结果批量审核</el-button |
|
|
|
@ -131,27 +135,29 @@
|
|
|
|
|
|
|
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
|
<el-text @click="ViewDetails(slotProps.scope.row)">查看</el-text> |
|
|
|
|
|
|
|
|
|
<el-text |
|
|
|
|
@click="WorkOrderAppeal(slotProps.scope.row)" |
|
|
|
|
v-if=" |
|
|
|
|
PermissionButton.Work_order_appeal && |
|
|
|
|
slotProps.scope.row.canRepresentations && |
|
|
|
|
slotProps.scope.row.workOrderStatus != 100 |
|
|
|
|
" |
|
|
|
|
v-if="PermissionButton.Work_order_appeal(slotProps.scope.row)" |
|
|
|
|
>申诉</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
v-if="PermissionButton.Process_submission_button" |
|
|
|
|
@click="ResultConfirmed(slotProps.scope.row)" |
|
|
|
|
>处理提交</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
@click="CancelWorkOrderAppeal(slotProps.scope.row)" |
|
|
|
|
v-if="PermissionButton.Cancel_appeal_button && slotProps.scope.row.typesOf == '0'" |
|
|
|
|
v-if="PermissionButton.Cancel_appeal_button(slotProps.scope.row)" |
|
|
|
|
>取消申诉</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
v-if="PermissionButton.Appeal_editor_button && slotProps.scope.row.typesOf == '0'" |
|
|
|
|
v-if="PermissionButton.Appeal_editor_button(slotProps.scope.row)" |
|
|
|
|
@click="WorkOrderAppeal(slotProps.scope.row, 'edit')" |
|
|
|
|
>编辑</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
v-if="PermissionButton.Delete_appeal_button && slotProps.scope.row.typesOf == '3'" |
|
|
|
|
v-if="PermissionButton.Delete_appeal_button(slotProps.scope.row)" |
|
|
|
|
@click="Deleteappealrecords(slotProps.scope.row, 'edit')" |
|
|
|
|
>删除记录</el-text |
|
|
|
|
> |
|
|
|
@ -421,13 +427,15 @@ const TabList = ref([
|
|
|
|
|
* @description 申诉按钮的逻辑 |
|
|
|
|
* @returns {boolean} 是否显示申诉按钮 |
|
|
|
|
*/ |
|
|
|
|
const WorkOrderAppealButton = () => { |
|
|
|
|
const WorkOrderAppealButton = () => row => { |
|
|
|
|
// 如果是仓库客服角色 |
|
|
|
|
if (UserPermissions.value == Useridentity.Warehouse_customer_service) { |
|
|
|
|
// 并且当前标签是申诉列表 |
|
|
|
|
if (TabPermissions.value == 6) { |
|
|
|
|
// 则显示申诉按钮 |
|
|
|
|
return true; |
|
|
|
|
if (row.canRepresentations && row.workOrderStatus != 100) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 否则不显示申诉按钮 |
|
|
|
@ -437,13 +445,15 @@ const WorkOrderAppealButton = () => {
|
|
|
|
|
* @description 取消申诉按钮的逻辑 |
|
|
|
|
* @returns {boolean} 是否显示申诉按钮 |
|
|
|
|
*/ |
|
|
|
|
const CancelAppealButton = () => { |
|
|
|
|
const CancelAppealButton = () => row => { |
|
|
|
|
// 如果是仓库客服角色 |
|
|
|
|
if (UserPermissions.value == Useridentity.Warehouse_customer_service) { |
|
|
|
|
// 并且当前标签是申诉列表 |
|
|
|
|
if (TabPermissions.value == 10) { |
|
|
|
|
// 则显示申诉按钮 |
|
|
|
|
return true; |
|
|
|
|
if (row.typesOf == '0') { |
|
|
|
|
// 则显示申诉按钮 |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
@ -452,13 +462,14 @@ const CancelAppealButton = () => {
|
|
|
|
|
* @description 编辑申诉按钮的逻辑 |
|
|
|
|
* @returns {boolean} 是否显示申诉编辑按钮 |
|
|
|
|
*/ |
|
|
|
|
const AppealEditorButton = () => { |
|
|
|
|
const AppealEditorButton = () => row => { |
|
|
|
|
// 如果是仓库客服角色 |
|
|
|
|
if (UserPermissions.value == Useridentity.Warehouse_customer_service) { |
|
|
|
|
// 并且当前标签是申诉列表 |
|
|
|
|
if (TabPermissions.value == 10) { |
|
|
|
|
// 则显示申诉按钮 |
|
|
|
|
return true; |
|
|
|
|
if (row.typesOf == '0') { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
@ -467,27 +478,44 @@ const AppealEditorButton = () => {
|
|
|
|
|
* @description 编辑申诉按钮的逻辑 |
|
|
|
|
* @returns {boolean} 是否显示申诉删除按钮 |
|
|
|
|
*/ |
|
|
|
|
const Deleteappealbutton = () => { |
|
|
|
|
const Deleteappealbutton = () => row => { |
|
|
|
|
// 如果是仓库客服角色 |
|
|
|
|
if (UserPermissions.value == Useridentity.Warehouse_customer_service) { |
|
|
|
|
// 并且当前标签是申诉列表 |
|
|
|
|
if (TabPermissions.value == 10) { |
|
|
|
|
// 则显示申诉按钮 |
|
|
|
|
return true; |
|
|
|
|
if (row.typesOf == '3') { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 否则不显示申诉按钮 |
|
|
|
|
return false; |
|
|
|
|
}; |
|
|
|
|
/** |
|
|
|
|
* @description 处理金额提交按钮的逻辑 |
|
|
|
|
* @returns {boolean} 是否显示理赔金额未出处理提交按钮 |
|
|
|
|
*/ |
|
|
|
|
const ProcessSubmission = () => { |
|
|
|
|
// 如果是仓库客服角色 |
|
|
|
|
if (TabPermissions.value == 4) { |
|
|
|
|
// 则显示申诉按钮 |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
// 否则不显示申诉按钮 |
|
|
|
|
return false; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description 操作栏按钮权限 |
|
|
|
|
* @returns {boolean} 是否显示相关按钮 |
|
|
|
|
*/ |
|
|
|
|
const PermissionButton = computed(row => ({ |
|
|
|
|
const PermissionButton = computed(() => ({ |
|
|
|
|
Work_order_appeal: WorkOrderAppealButton(), |
|
|
|
|
Cancel_appeal_button: CancelAppealButton(), |
|
|
|
|
Appeal_editor_button: AppealEditorButton(), |
|
|
|
|
Delete_appeal_button: Deleteappealbutton(), |
|
|
|
|
Process_submission_button: ProcessSubmission(), |
|
|
|
|
})); |
|
|
|
|
const ButtonPermissions = computed(() => { |
|
|
|
|
// 根据 TabPermissions 的状态,决定每个按钮的显示隐藏逻辑 |
|
|
|
@ -568,7 +596,7 @@ const ButtonPermissions = computed(() => {
|
|
|
|
|
applyArbitration: false, //客服介入 |
|
|
|
|
batchFinish: false, //批量完结 |
|
|
|
|
DingTalkNumber: false, //钉钉号填写 |
|
|
|
|
Batchdetermination: UserPermissions.value == Useridentity.Warehouse_customer_service, //批量确定 |
|
|
|
|
Batchdetermination: true, //批量确定 |
|
|
|
|
ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 |
|
|
|
|
ArbitrationDetermination: false, //批量完结确定 |
|
|
|
|
Financial_accounting: false, //财务入账 |
|
|
|
@ -775,7 +803,7 @@ const {
|
|
|
|
|
watch( |
|
|
|
|
() => $route.path, |
|
|
|
|
(newPath, oldPath) => { |
|
|
|
|
if ($useStore.state.isRefresh.refreshObj.aftersalesWorkOrder) { |
|
|
|
|
if ($useStore.state.isRefresh.refreshObj.aftersalesWorkOrderTemp) { |
|
|
|
|
TabPermissions.value = $useStore.state.Customer.Customerobj; |
|
|
|
|
tabValue.value = $useStore.state.Customer.Customerobj; //菜单编号 |
|
|
|
|
if ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].includes(TabPermissions.value)) { |
|
|
|
@ -784,7 +812,7 @@ watch(
|
|
|
|
|
PublicDataRequest(TabPermissions.value); //请求数据 |
|
|
|
|
$useStore.commit('Customer_Menu', 0); //设置回初始值 |
|
|
|
|
} |
|
|
|
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrder', status: false }); //重新缓存页面 |
|
|
|
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrderTemp', status: false }); //重新缓存页面 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
@ -1142,7 +1170,7 @@ const updatePageDetails = (pageSize, currentPage) => {
|
|
|
|
|
details.page.pageSize = pageSize; |
|
|
|
|
details.page.currentPage = currentPage; |
|
|
|
|
}; |
|
|
|
|
const MatchCurrentMenu = (ID =TabPermissions.value) => { |
|
|
|
|
const MatchCurrentMenu = (ID = TabPermissions.value) => { |
|
|
|
|
return TabList.value.find(res => res.name == ID); |
|
|
|
|
}; |
|
|
|
|
// 每页多少条 |
|
|
|
@ -1724,6 +1752,25 @@ const ViewDetails6 = row => {
|
|
|
|
|
}; |
|
|
|
|
$router.push({ path: workOrderInfoPath_end, query: { ...queryParams } }); |
|
|
|
|
}; |
|
|
|
|
/** |
|
|
|
|
* @description: [申诉列表]常工单号,跳转到详情信息页面 |
|
|
|
|
* @param {Object} row - 当前行数据 |
|
|
|
|
* @return {void} |
|
|
|
|
*/ |
|
|
|
|
const ViewDetails10 = row => { |
|
|
|
|
console.log(row, '【申诉列表】当前行数据'); |
|
|
|
|
const workOrderInfoPath_end = '/aftersales/aftersalesWorkOrderend'; //跳转路径 |
|
|
|
|
const queryParams = { |
|
|
|
|
id: row.workOrderId, //申诉列表查询需要的ID |
|
|
|
|
workOrderId: row.id, //申诉驳回用的ID |
|
|
|
|
name: `${row.workOrderNumber}-申诉`, |
|
|
|
|
typesOf: row.typesOf, |
|
|
|
|
workOrderNumber: row.workOrderNumber, //异常工单号 |
|
|
|
|
RouteIndexs: TabPermissions.value, //当前菜单编号 |
|
|
|
|
workOrderStatus: row.workOrderStatus, //工单状态 |
|
|
|
|
}; |
|
|
|
|
$router.push({ path: workOrderInfoPath_end, query: { ...queryParams } }); |
|
|
|
|
}; |
|
|
|
|
// 全部异常工单号点击查看 |
|
|
|
|
const ViewDetailsRow = row => { |
|
|
|
|
console.log(row, '异常工单号点击查看详情当前行数据'); |
|
|
|
@ -1755,7 +1802,9 @@ const ViewDetailsRow = row => {
|
|
|
|
|
case 9: |
|
|
|
|
ViewDetails9(row); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case 10: |
|
|
|
|
ViewDetails10(row); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -1796,10 +1845,53 @@ const ViewDetails = row => {
|
|
|
|
|
case 9: |
|
|
|
|
ViewDetails9(row); |
|
|
|
|
break; |
|
|
|
|
case 10: |
|
|
|
|
ViewDetails10(row); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 理赔金额未出处理结果确定 |
|
|
|
|
const ResultConfirmed = async row => { |
|
|
|
|
console.log(row); |
|
|
|
|
try { |
|
|
|
|
let _submit = { |
|
|
|
|
assignList: [], |
|
|
|
|
}; |
|
|
|
|
if (row.lawoId) { |
|
|
|
|
// 单个 |
|
|
|
|
_submit.assignList.push(row.lawoId); |
|
|
|
|
} else { |
|
|
|
|
// 批量 |
|
|
|
|
if (!details.selectionList.length) { |
|
|
|
|
ElMessage.warning('请勾选要处理的数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
_submit.assignList = details.selectionList.map(item => item.lawoId); |
|
|
|
|
} |
|
|
|
|
ElMessageBox.confirm(`是否确认${row.lawoId ? '提交' : '批量提交'}处理结果?`, '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(async () => { |
|
|
|
|
let _res = await $_updateWorkOrderStatus(_submit); |
|
|
|
|
const { code, msg } = _res.data; |
|
|
|
|
if (code == 200) { |
|
|
|
|
console.log(_res, '理赔金额未出处理结果确定'); |
|
|
|
|
ElMessage.success(msg); |
|
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
|
_Obj.request = true; |
|
|
|
|
PublicDataRequest(TabPermissions.value); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
} catch (e) { |
|
|
|
|
console.log(e); |
|
|
|
|
} finally { |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|