Compare commits

...

2 Commits

  1. 215
      src/views/aftersales/aftersalesWorkOrderTemp.vue
  2. 2
      src/views/finance/ReconciliationDepositSlip.vue

215
src/views/aftersales/aftersalesWorkOrderTemp.vue

@ -73,7 +73,11 @@
<el-button type="primary" icon="Stamp" v-if="ButtonPermissions.Result_review"
>结果批量审核</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 type="primary" icon="User" v-if="ButtonPermissions.applyArbitration"
@ -289,6 +293,43 @@
</span>
</template>
</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>
<!-- 列表配置显示 -->
@ -401,6 +442,15 @@ const workOrderStatus = ref(30); //工单状态
const PageLoading = ref(false); //loading
const warehouseData = 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 BatchReturn = ref({
//
@ -608,7 +658,7 @@ const ButtonPermissions = computed(() => {
return {
add: false, //
batchReject: UserPermissions.value == Useridentity.Headquarters_customer_service, //
assignment: false, //
assignment: UserPermissions.value != Useridentity.Warehouse_customer_service, //
applyArbitration: false, //
DingTalkNumber: false, //
batchFinish: false, //
@ -857,9 +907,7 @@ watch(
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)) {
let _Obj = MatchCurrentMenu(); //
_Obj.request = true; //
PublicDataRequest(TabPermissions.value); //
updateMenuAndData(); //
$useStore.commit('Customer_Menu', 0); //
}
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrderTemp', status: false }); //
@ -920,15 +968,13 @@ const selectionChange = list => {
};
//
const searchChange = () => {
PublicDataRequest();
updateMenuAndData(); //
};
//
const searchChangeS = () => {
details.search = false; //
let _Obj = MatchCurrentMenu();
_Obj.request = true;
PublicDataRequest(TabPermissions.value);
updateMenuAndData(); //
};
//
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(), //
SelectionInitialization(), //
GetWarehouse(), //
GetCustomerService(), //
]);
//
PublicDataRequest(TabPermissions.value);
await PublicDataRequest(TabPermissions.value);
} catch (error) {
console.log(error);
} finally {
@ -1358,7 +1424,17 @@ const getQuery = () => {
let _Obj = MatchCurrentMenu();
return _Obj.query;
};
/**
* @description: 更新当前菜单的请求状态并请求数据
* @return {void} 无返回值
*/
const updateMenuAndData = () => {
const currentMenu = MatchCurrentMenu(); //
if (currentMenu) {
currentMenu.request = true; //
}
PublicDataRequest(TabPermissions.value); //
};
/**
* @description 通用函数用于处理数据请求包含待回复理赔金额未出申诉超时未处理
* @param {Function} fetchFunction - 用于执行具体数据请求的函数
@ -1566,9 +1642,7 @@ const Appealbutton = async state => {
}
appeal.value.dialogappeal = false;
const currentMenu = MatchCurrentMenu();
currentMenu.request = true;
PublicDataRequest(TabPermissions.value);
updateMenuAndData(); //
} finally {
appeal.value.loadingappeal = false;
}
@ -1593,9 +1667,7 @@ const Deleteappealrecords = async row => {
message: '删除成功',
type: 'success',
});
let _Obj = MatchCurrentMenu();
_Obj.request = true;
PublicDataRequest(TabPermissions.value); //
updateMenuAndData(); //
}
} catch {
} finally {
@ -1626,9 +1698,7 @@ const CancelWorkOrderAppeal = row => {
.then(res => {
console.log(res, '取消申诉返回值');
if (res.data.code == 200) {
let _Obj = MatchCurrentMenu();
_Obj.request = true;
PublicDataRequest(TabPermissions.value); //
updateMenuAndData(); //
ElMessage({
message: '取消申诉成功',
type: 'success',
@ -1930,9 +2000,7 @@ const ResultConfirmed = async row => {
if (code == 200) {
console.log(_res, '理赔金额未出处理结果确定');
ElMessage.success(msg);
let _Obj = MatchCurrentMenu();
_Obj.request = true;
PublicDataRequest(TabPermissions.value);
updateMenuAndData(); //
}
})
.catch(() => {});
@ -1984,9 +2052,7 @@ const ConfirmReturn = async () => {
if (code === 200) {
ElMessage.success(msg);
BatchReturn.value.dialogReturn = false; //
const _Obj = MatchCurrentMenu();
_Obj.request = true;
PublicDataRequest(TabPermissions.value);
updateMenuAndData(); //
}
} catch (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>
<style scoped lang="scss">
@ -2064,12 +2212,19 @@ const ConfirmReturn = async () => {
}
}
}
.plAllret {
:deep(.el-select) {
width: 100%;
}
:deep(.plAllret) {
height: 30%;
display: flex;
flex-direction: column;
.el-select {
width: 100%;
}
.el-dialog__footer {
display: flex;
flex: 1;
align-items: flex-end;
justify-content: flex-end;
}
}
</style>

2
src/views/finance/ReconciliationDepositSlip.vue

@ -40,7 +40,7 @@
<el-option label="部分签收" value="1" />
</el-select>
</el-form-item>
<el-form-item label="计算时间">
<el-form-item label="开单时间">
<el-date-picker
v-model="item.query.calculateTimeSection"
type="datetimerange"

Loading…
Cancel
Save