|
|
@ -73,7 +73,11 @@ |
|
|
|
<el-button type="primary" icon="Stamp" v-if="ButtonPermissions.Result_review" |
|
|
|
<el-button type="primary" icon="Stamp" v-if="ButtonPermissions.Result_review" |
|
|
|
>结果批量审核</el-button |
|
|
|
>结果批量审核</el-button |
|
|
|
> |
|
|
|
> |
|
|
|
<el-button type="primary" icon="Pointer" v-if="ButtonPermissions.assignment" |
|
|
|
<el-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
icon="Pointer" |
|
|
|
|
|
|
|
v-if="ButtonPermissions.assignment" |
|
|
|
|
|
|
|
@click="WorkOrderAssignment" |
|
|
|
>工单指派</el-button |
|
|
|
>工单指派</el-button |
|
|
|
> |
|
|
|
> |
|
|
|
<el-button type="primary" icon="User" v-if="ButtonPermissions.applyArbitration" |
|
|
|
<el-button type="primary" icon="User" v-if="ButtonPermissions.applyArbitration" |
|
|
@ -289,6 +293,43 @@ |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 工单指派弹窗 --> |
|
|
|
|
|
|
|
<el-dialog v-model="assignFrom.dialogassign" title="工单指派" width="40%" class="plAllret"> |
|
|
|
|
|
|
|
<el-form |
|
|
|
|
|
|
|
v-loading="assignFrom.AssignLoad" |
|
|
|
|
|
|
|
element-loading-text="正在处理中..." |
|
|
|
|
|
|
|
label-position="top" |
|
|
|
|
|
|
|
label-width="100px" |
|
|
|
|
|
|
|
:model="assignFrom" |
|
|
|
|
|
|
|
:rules="assignFrom.rules" |
|
|
|
|
|
|
|
ref="assignFromForm" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-form-item label="客服列表" prop="businessDepartment"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="assignFrom.businessDepartment" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
default-first-option |
|
|
|
|
|
|
|
:reserve-keyword="false" |
|
|
|
|
|
|
|
placeholder="请选择指派客服" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in assignFrom.customerService" |
|
|
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
|
|
:label="item.realName" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
<template #footer> |
|
|
|
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
|
|
|
<el-button @click="assignFrom.dialogassign = false">取消</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" @click="Assignbutton" :disabled="assignFrom.AssignLoad"> |
|
|
|
|
|
|
|
确定 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</basic-container> |
|
|
|
</basic-container> |
|
|
|
<!-- 列表配置显示 --> |
|
|
|
<!-- 列表配置显示 --> |
|
|
|
|
|
|
|
|
|
|
@ -401,6 +442,15 @@ const workOrderStatus = ref(30); //工单状态 |
|
|
|
const PageLoading = ref(false); //页面loading |
|
|
|
const PageLoading = ref(false); //页面loading |
|
|
|
const warehouseData = ref([]); //仓库信息 |
|
|
|
const warehouseData = ref([]); //仓库信息 |
|
|
|
const UserInfo = ref({}); //登陆人信息 |
|
|
|
const UserInfo = ref({}); //登陆人信息 |
|
|
|
|
|
|
|
const assignFromForm = ref(null); //指派客服表单实例 |
|
|
|
|
|
|
|
const assignFrom = ref({ |
|
|
|
|
|
|
|
dialogassign: false, |
|
|
|
|
|
|
|
AssignLoad: false, |
|
|
|
|
|
|
|
customerService: [], //客服列表 |
|
|
|
|
|
|
|
rules: { |
|
|
|
|
|
|
|
businessDepartment: [{ required: true, message: '请选择要指派的客服', trigger: 'blur' }], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}); //工单指派总部客服 |
|
|
|
const batchReturnForm = ref(null); |
|
|
|
const batchReturnForm = ref(null); |
|
|
|
const BatchReturn = ref({ |
|
|
|
const BatchReturn = ref({ |
|
|
|
//批量打回弹窗 |
|
|
|
//批量打回弹窗 |
|
|
@ -608,7 +658,7 @@ const ButtonPermissions = computed(() => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
add: false, //新增按钮 |
|
|
|
add: false, //新增按钮 |
|
|
|
batchReject: UserPermissions.value == Useridentity.Headquarters_customer_service, //批量打回 |
|
|
|
batchReject: UserPermissions.value == Useridentity.Headquarters_customer_service, //批量打回 |
|
|
|
assignment: false, //工单指派 |
|
|
|
assignment: UserPermissions.value != Useridentity.Warehouse_customer_service, //工单指派 |
|
|
|
applyArbitration: false, //客服介入 |
|
|
|
applyArbitration: false, //客服介入 |
|
|
|
DingTalkNumber: false, //钉钉号填 |
|
|
|
DingTalkNumber: false, //钉钉号填 |
|
|
|
batchFinish: false, //批量完结 |
|
|
|
batchFinish: false, //批量完结 |
|
|
@ -857,9 +907,7 @@ watch( |
|
|
|
TabPermissions.value = $useStore.state.Customer.Customerobj; |
|
|
|
TabPermissions.value = $useStore.state.Customer.Customerobj; |
|
|
|
tabValue.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)) { |
|
|
|
if ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].includes(TabPermissions.value)) { |
|
|
|
let _Obj = MatchCurrentMenu(); //匹配出当前菜单 |
|
|
|
updateMenuAndData(); //获取最新数据 |
|
|
|
_Obj.request = true; //更新请求状态 |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); //请求数据 |
|
|
|
|
|
|
|
$useStore.commit('Customer_Menu', 0); //设置回初始值 |
|
|
|
$useStore.commit('Customer_Menu', 0); //设置回初始值 |
|
|
|
} |
|
|
|
} |
|
|
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrderTemp', status: false }); //重新缓存页面 |
|
|
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrderTemp', status: false }); //重新缓存页面 |
|
|
@ -920,15 +968,13 @@ const selectionChange = list => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
// 网页顶部搜索按钮 |
|
|
|
// 网页顶部搜索按钮 |
|
|
|
const searchChange = () => { |
|
|
|
const searchChange = () => { |
|
|
|
PublicDataRequest(); |
|
|
|
updateMenuAndData(); //获取最新数据 |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 刷新按钮 |
|
|
|
// 刷新按钮 |
|
|
|
const searchChangeS = () => { |
|
|
|
const searchChangeS = () => { |
|
|
|
details.search = false; //关闭搜索 |
|
|
|
details.search = false; //关闭搜索 |
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
updateMenuAndData(); //获取最新数据 |
|
|
|
_Obj.request = true; |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
// 重置表格搜索 |
|
|
|
// 重置表格搜索 |
|
|
|
const ResetTableSearch = async () => { |
|
|
|
const ResetTableSearch = async () => { |
|
|
@ -1082,6 +1128,25 @@ const GetWarehouse = () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 获取客服人员 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @returns {Promise<void>} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
const GetCustomerService = async () => { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
let _res = await $_getCustomerServicePersonnel(); |
|
|
|
|
|
|
|
const { code, data } = _res.data; |
|
|
|
|
|
|
|
if (code != 200) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
assignFrom.value.customerService = data; |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.log(e); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
*页面初始化函数,包含字典,等必要请求 |
|
|
|
*页面初始化函数,包含字典,等必要请求 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -1094,10 +1159,11 @@ const PageOnlaod = async () => { |
|
|
|
Roleverification(), // 获取角色信息 |
|
|
|
Roleverification(), // 获取角色信息 |
|
|
|
SelectionInitialization(), // 下拉框初始化赋值 |
|
|
|
SelectionInitialization(), // 下拉框初始化赋值 |
|
|
|
GetWarehouse(), //获取仓库 |
|
|
|
GetWarehouse(), //获取仓库 |
|
|
|
|
|
|
|
GetCustomerService(), //获取总部客服列表 |
|
|
|
]); |
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
// 获取页面数据 |
|
|
|
// 获取页面数据 |
|
|
|
PublicDataRequest(TabPermissions.value); |
|
|
|
await PublicDataRequest(TabPermissions.value); |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
console.log(error); |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
@ -1358,7 +1424,17 @@ const getQuery = () => { |
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
return _Obj.query; |
|
|
|
return _Obj.query; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @description: 更新当前菜单的请求状态并请求数据 |
|
|
|
|
|
|
|
* @return {void} 无返回值 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
const updateMenuAndData = () => { |
|
|
|
|
|
|
|
const currentMenu = MatchCurrentMenu(); // 匹配当前菜单 |
|
|
|
|
|
|
|
if (currentMenu) { |
|
|
|
|
|
|
|
currentMenu.request = true; // 更新请求状态 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); // 请求数据 |
|
|
|
|
|
|
|
}; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @description 通用函数用于处理数据请求(包含待回复、理赔金额未出、申诉、超时未处理) |
|
|
|
* @description 通用函数用于处理数据请求(包含待回复、理赔金额未出、申诉、超时未处理) |
|
|
|
* @param {Function} fetchFunction - 用于执行具体数据请求的函数 |
|
|
|
* @param {Function} fetchFunction - 用于执行具体数据请求的函数 |
|
|
@ -1566,9 +1642,7 @@ const Appealbutton = async state => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
appeal.value.dialogappeal = false; |
|
|
|
appeal.value.dialogappeal = false; |
|
|
|
const currentMenu = MatchCurrentMenu(); |
|
|
|
updateMenuAndData(); //更新菜单数据 |
|
|
|
currentMenu.request = true; |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); |
|
|
|
|
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
appeal.value.loadingappeal = false; |
|
|
|
appeal.value.loadingappeal = false; |
|
|
|
} |
|
|
|
} |
|
|
@ -1593,9 +1667,7 @@ const Deleteappealrecords = async row => { |
|
|
|
message: '删除成功', |
|
|
|
message: '删除成功', |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
|
}); |
|
|
|
}); |
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
updateMenuAndData(); //获取新数据 |
|
|
|
_Obj.request = true; |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); //获取新数据 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} catch { |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
@ -1626,9 +1698,7 @@ const CancelWorkOrderAppeal = row => { |
|
|
|
.then(res => { |
|
|
|
.then(res => { |
|
|
|
console.log(res, '取消申诉返回值'); |
|
|
|
console.log(res, '取消申诉返回值'); |
|
|
|
if (res.data.code == 200) { |
|
|
|
if (res.data.code == 200) { |
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
updateMenuAndData(); //获取新数据 |
|
|
|
_Obj.request = true; |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); //获取新数据 |
|
|
|
|
|
|
|
ElMessage({ |
|
|
|
ElMessage({ |
|
|
|
message: '取消申诉成功', |
|
|
|
message: '取消申诉成功', |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
@ -1930,9 +2000,7 @@ const ResultConfirmed = async row => { |
|
|
|
if (code == 200) { |
|
|
|
if (code == 200) { |
|
|
|
console.log(_res, '理赔金额未出处理结果确定'); |
|
|
|
console.log(_res, '理赔金额未出处理结果确定'); |
|
|
|
ElMessage.success(msg); |
|
|
|
ElMessage.success(msg); |
|
|
|
let _Obj = MatchCurrentMenu(); |
|
|
|
updateMenuAndData(); //获取最新数据 |
|
|
|
_Obj.request = true; |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.catch(() => {}); |
|
|
@ -1984,9 +2052,7 @@ const ConfirmReturn = async () => { |
|
|
|
if (code === 200) { |
|
|
|
if (code === 200) { |
|
|
|
ElMessage.success(msg); |
|
|
|
ElMessage.success(msg); |
|
|
|
BatchReturn.value.dialogReturn = false; //关闭弹窗 |
|
|
|
BatchReturn.value.dialogReturn = false; //关闭弹窗 |
|
|
|
const _Obj = MatchCurrentMenu(); |
|
|
|
updateMenuAndData(); //获取最新数据 |
|
|
|
_Obj.request = true; |
|
|
|
|
|
|
|
PublicDataRequest(TabPermissions.value); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
console.error(e); |
|
|
|
console.error(e); |
|
|
@ -2007,6 +2073,88 @@ const ConfirmReturn = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @description 工单指派 |
|
|
|
|
|
|
|
* @return {void} 无返回值 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
const WorkOrderAssignment = () => { |
|
|
|
|
|
|
|
// 检查是否选中任何工单 |
|
|
|
|
|
|
|
if (!details.selectionList.length) { |
|
|
|
|
|
|
|
// 提示用户选择数据 |
|
|
|
|
|
|
|
ElMessage({ |
|
|
|
|
|
|
|
message: '请勾选要处理的数据', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 初始化指派表单并打开指派弹窗 |
|
|
|
|
|
|
|
assignFrom.value = { ...assignFrom.value, businessDepartment: '', dialogassign: true }; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 工单指派确定按钮 |
|
|
|
|
|
|
|
* 1.根据选择的客服ID,名称,和选择的工单ID,将其组装成一个data对象 |
|
|
|
|
|
|
|
* 2.然后调用$_assignCustomerService(data)接口, |
|
|
|
|
|
|
|
* 3.成功后关闭加载,关闭弹窗,重新拉取数据 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
const Assignbutton = async () => { |
|
|
|
|
|
|
|
const WorkOrderAssignmentFunction = async () => { |
|
|
|
|
|
|
|
const assignForm = assignFrom.value; |
|
|
|
|
|
|
|
assignForm.AssignLoad = true; // 开启加载 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
// 筛选选择的工单 |
|
|
|
|
|
|
|
const foundObjs = assignForm.customerService.find( |
|
|
|
|
|
|
|
obj => obj.id == assignForm.businessDepartment |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!foundObjs) { |
|
|
|
|
|
|
|
console.error('未找到对应的工单信息'); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 构建请求数据 |
|
|
|
|
|
|
|
const data = { |
|
|
|
|
|
|
|
customerServiceId: foundObjs.id, // 归属客服ID |
|
|
|
|
|
|
|
customerServiceName: foundObjs.realName, // 归属客服名称 |
|
|
|
|
|
|
|
assignList: details.selectionList.map(item => item.id), // 异常工单ID/工单ID |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 发起请求 |
|
|
|
|
|
|
|
const _res = await $_assignCustomerService(data); |
|
|
|
|
|
|
|
const { code, msg } = _res.data; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (code !== 200) { |
|
|
|
|
|
|
|
console.error('分配客服失败:', msg); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭弹窗 |
|
|
|
|
|
|
|
assignForm.dialogassign = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新当前菜单和请求数据 |
|
|
|
|
|
|
|
updateMenuAndData(); |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
console.error('分配客服时发生错误:', error); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
assignForm.AssignLoad = false; // 关闭加载 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assignFromForm.value.validate(async valid => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
ElMessageBox.confirm('是否确认指派该客服?', '提示', { |
|
|
|
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}).then(async () => { |
|
|
|
|
|
|
|
await WorkOrderAssignmentFunction(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
ElMessage.warning('请检查表单是否填写否完整'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
<style scoped lang="scss"> |
|
|
@ -2064,12 +2212,19 @@ const ConfirmReturn = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.plAllret { |
|
|
|
:deep(.plAllret) { |
|
|
|
:deep(.el-select) { |
|
|
|
height: 30%; |
|
|
|
width: 100%; |
|
|
|
|
|
|
|
} |
|
|
|
display: flex; |
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
.el-select { |
|
|
|
.el-select { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.el-dialog__footer { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
flex: 1; |
|
|
|
|
|
|
|
align-items: flex-end; |
|
|
|
|
|
|
|
justify-content: flex-end; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|