作者 xiaoqiu

优化了刷新按钮,表单内增加了保险需求字段

... ... @@ -8,6 +8,6 @@ VITE_APP_ENV = 'development'
VITE_APP_BASE_API = '/dev-api'
# 开打新的tab的url前缀
VITE_APP_TAB_URL_PREFIX = 'http://192.168.2.190:6512'
VITE_APP_TAB_URL_PREFIX = 'http://192.168.2.11:6512'
# VITE_APP_TAB_URL_PREFIX = 'http://bxhd.crgx.net'
... ...
不能预览此文件类型
import { reactive, ref } from "vue";
import { queryCarNature } from "@/api/configurationCenter/carNature.js";
import { queryNeed } from "@/api/configurationCenter/need.js";
export default function() {
// 获取数据的请求参数
const getParams = reactive({
pageNum: 1,
pageSize: 100,
});
// 车辆使用性质
const carNatureOption = ref([]);
const getcarNatureOption = async () => {
const { data } = await queryCarNature(getParams);
carNatureOption.value = data.records;
};
getcarNatureOption();
// 保险需求
const needOption = ref([]);
const getNeedOption = async () => {
const { data } = await queryNeed(getParams);
needOption.value = data.records;
};
getNeedOption();
// 新能源
const NewEnergyOption = ref([
{
id: "0",
name: "否",
},
{
id: "1",
name: "是",
},
]);
// 通过返回值暴露响应式变量、方法
return {
carNatureOption,
needOption,
NewEnergyOption
};
}
\ No newline at end of file
... ...
import { disposeUser } from "@/api/policy/index";
import { listDept } from "@/api/system/dept";
export default function useSharingCompany(){
// 分配承保公司弹窗显示
const companyShow = ref(false);
// 分配承保公司查询参数
const companyQueryParams = reactive({
deptName: undefined,
status: undefined,
});
// 分配承保公司列表数据
const deptOptions = ref([
{
deptId: "0",
deptName: "无",
},
]);
// 确认选择的承保公司数据表单
const companyForm = ref({});
const sharingShow = ref(false); // 分配备注显示变量
const sharingMsg = ref(""); // 分配备注
// 分配承保公司
const handleAuthCompany = (associationapprove, taskId) => {
companyForm.value = {
associationapprove,
taskId: taskId,
};
companyShow.value = true;
};
/** 提交通过分配承保公司 */
function submitForm() {
return new Promise((resolve, reject) => {
const data = {
associationapprove: companyForm.value.associationapprove,
associationapprovetype: "1",
deptid: companyForm.value.deptId.toString(),
comment: sharingMsg.value,
};
const taskId = companyForm.value.taskId;
disposeUser(data, taskId).then(() => {
companyShow.value = false;
sharingShow.value = false;
resolve();
})
});
}
/** 查询承保公司列表 */
const getDeptList = () => {
listDept(companyQueryParams).then((response) => {
let newArr = [];
newArr = response.data.filter((item) => item.parentId === 100);
let arrNew = newArr.map((child) => {
return {
deptId: child.deptId.toString(),
deptName: child.deptName,
};
});
deptOptions.value.push(...arrNew);
});
};
return {
companyShow,
deptOptions,
companyForm,
sharingShow,
sharingMsg,
handleAuthCompany,
submitForm,
getDeptList,
}
}
\ No newline at end of file
... ...
... ... @@ -84,6 +84,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="作废时间"
align="center"
prop="distributionTime"
... ...
... ... @@ -96,6 +96,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="分配机制"
width="120"
prop="distributionMechanism"
... ...
... ... @@ -128,6 +128,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="分配机制"
width="120"
prop="distributionMechanism"
... ...
... ... @@ -94,6 +94,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="统一信用代码"
prop="uniformCreditCode"
width="180"
... ... @@ -619,123 +625,26 @@ import {
queryDefeatContent,
} from "@/api/policy/index";
import { checkRole } from "@/utils/permission"; // 权限判断函数
import { queryCarType } from "@/api/configurationCenter/carType.js";
import { queryCarNature } from "@/api/configurationCenter/carNature.js";
import { queryNeed } from "@/api/configurationCenter/need.js";
import useSelectData from "@/hooks/useSelectData.js";
import { listDept } from "@/api/system/dept";
import { ref } from "vue";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const activeTitle = ref("");
const loadingBtn = ref(false);
const showIssue = ref(false);
const total = ref(0);
const typeId = ref(0); // 判断类型 0 问题件 1 退回 2 作废
const transferTip = ref(""); //流转下一家名称
const transferDeptId = ref(""); // 流转的部门公司ID
const open = ref(false);
const form = ref({});
const timeFrame = ref(null);
const showFeedback = ref(false);
const transferShow = ref(false);
const transferForm = ref({});
const taskId = ref("");
const issueReturenCompany = ref(""); // 问题件退回公司
const issueCompanyPerson = ref(""); // 问题件退回操作人员
const issueCompanyPersonPhone = ref(""); // 问题件退回操作人员联系电话
const successShow = ref(false); // 通过备注显示变量
const successMsg = ref(""); // 通过备注
const sharingShow = ref(false); // 分配备注显示变量
const sharingMsg = ref(""); // 分配备注
const lookSuccessShow = ref(false); // 查看通过备注显示变量
const lookSuccessMsg = ref(""); // 查看通过备注
const IssueForm = ref({
deprecatedReason: "",
});
const FeedbackForm = ref({
stronginsurancepolicynumber: "",
commercialinsurancepolicynumber: "",
message: "",
});
const getParams = reactive({
pageNum: 1,
pageSize: 100,
});
const companyShow = ref(false);
const deptOptions = ref([
{
deptId: "0",
deptName: "无",
},
]);
const transferOptions = ref([]);
const deprecatedShow = ref(false);
const deprecatedForm = ref({
deprecatedReason: "",
associationapprove: "",
});
const companyForm = ref({});
// 查询参数
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
name: "",
licensePlate: "",
type: 1,
frameNumber: "",
startTime: "",
endTime: "",
});
const companyQueryParams = reactive({
deptName: undefined,
status: undefined,
});
const policyList = ref([]);
// 判断是否有权限
const hasRole = computed(() => {
return proxy.$auth.hasRole("associationemployee");
});
// 新能源
const NewEnergyOption = ref([
{
id: "0",
name: "否",
},
{
id: "1",
name: "是",
},
]);
// 车辆类型
const carTypeOption = ref([]);
const getCarTypeOption = async () => {
const { data } = await queryCarType(getParams);
carTypeOption.value = data.records;
};
getCarTypeOption();
// 车辆使用性质
const carNatureOption = ref([]);
const getcarNatureOption = async () => {
const { data } = await queryCarNature(getParams);
carNatureOption.value = data.records;
};
getcarNatureOption();
// 保险需求
const needOption = ref([]);
const getNeedOption = async () => {
const { data } = await queryNeed(getParams);
needOption.value = data.records;
};
getNeedOption();
// 获取选择数据列表
const { carNatureOption, needOption, NewEnergyOption } = useSelectData();
// table列表数据
const policyList = ref([]);
const total = ref(0);
// 获取待办数据
const getList = async () => {
loading.value = true;
const { data } = await queryMyList(queryParams);
... ... @@ -743,6 +652,32 @@ const getList = async () => {
total.value = data.total;
loading.value = false;
};
const open = ref(false);
const form = ref({});
/** 修改按钮操作 */
const handleUpdate = async (row) => {
reset();
const { data } = await getCarDetail(row.businessKey);
getTransferTip();
form.value = data;
open.value = true;
taskId.value = row.taskId;
};
// 提交修改
const submitUpdate = () => {
updateCarInfo(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
getList();
});
};
/** 重置操作表单 */
function reset() {
proxy.resetForm("policyRef");
}
// 回馈弹窗显示变量
const showFeedback = ref(false);
// 承接
const handleContinue = (row) => {
if (row.orderProgress === "待承接") {
... ... @@ -764,14 +699,33 @@ const handleContinue = (row) => {
showFeedback.value = true;
}
};
// 问题件
const handleTroubleshooting = (taskId) => {
deprecatedForm.value.taskId = taskId;
activeTitle.value = "问题件退回至协会";
typeId.value = 0;
deprecatedShow.value = true;
// 承接回馈内容表单
const FeedbackForm = ref({
stronginsurancepolicynumber: "", // 交强险
commercialinsurancepolicynumber: "", // 商业险
message: "", // 备注
});
// 提交承接回馈
const submit = () => {
const data = {
policystatus: "2",
message: FeedbackForm.value.message,
commercialinsurancepolicynumber:
FeedbackForm.value.commercialinsurancepolicynumber,
stronginsurancepolicynumber: FeedbackForm.value.stronginsurancepolicynumber,
};
disposeUser(data, FeedbackForm.value.taskId).then((res) => {
getList();
proxy.$modal.msgSuccess("回馈成功");
showFeedback.value = false;
});
};
// 通过保单
const successShow = ref(false); // 通过备注显示变量
const successMsg = ref(""); // 通过备注
const lookSuccessShow = ref(false); // 查看通过备注显示变量
const lookSuccessMsg = ref(""); // 查看通过备注
// 提交通过保单
const handleSuccess = async () => {
await disposeUser(
{
... ... @@ -787,6 +741,24 @@ const handleSuccess = async () => {
successShow.value = false;
getList();
};
// 查阅通过备注
const lookRemark = async (row) => {
const { data } = await queryDefeatContent({
processInstanceId: row.processInstanceId,
type: 3,
});
lookSuccessMsg.value = data.message;
lookSuccessShow.value = true;
};
const typeId = ref(0); // 判断类型 0 问题件 1 退回 2 作废
// 表单作废,退回。问题件对话框显示
const deprecatedShow = ref(false);
// 表单作废,退回。问题件对话框内容表单
const deprecatedForm = ref({
deprecatedReason: "",
associationapprove: "",
});
// 退回保单
const handleFallback = (associationapprove) => {
deprecatedForm.value = {
... ... @@ -810,8 +782,21 @@ const handleVoid = (associationapprove, taskId) => {
"温馨提示:该保单作废后车牌号、车架号在本自然年度无法重新提交";
deprecatedShow.value = true;
};
// 提交方法
const showIssue = ref(false); // 问题件原因显示变量
const issueReturenCompany = ref(""); // 问题件退回公司
const issueCompanyPerson = ref(""); // 问题件退回操作人员
const issueCompanyPersonPhone = ref(""); // 问题件退回操作人员手机号
// 问题件退回原因
const IssueForm = ref({
deprecatedReason: "",
});
// 问题件
const handleTroubleshooting = (taskId) => {
deprecatedForm.value.taskId = taskId;
activeTitle.value = "问题件退回至协会";
typeId.value = 0;
deprecatedShow.value = true;
};
// 查询问题件原因
const lookReason = async (row) => {
const { data } = await queryDefeatContent({
... ... @@ -824,16 +809,6 @@ const lookReason = async (row) => {
issueCompanyPerson.value = row.companyEmployeeUserName;
issueCompanyPersonPhone.value = row.companyEmployeePhone;
};
// 查阅通过备注
const lookRemark = async (row) => {
const { data } = await queryDefeatContent({
processInstanceId: row.processInstanceId,
type: 3,
});
lookSuccessMsg.value = data.message;
lookSuccessShow.value = true;
};
// 提交作废,退回,问题件表单
const sunmitDeprecated = () => {
let data = {};
... ... @@ -849,6 +824,7 @@ const sunmitDeprecated = () => {
};
}
const taskId = deprecatedForm.value.taskId;
// 办理一个业务
disposeUser(data, taskId).then((res) => {
getList();
open.value = false;
... ... @@ -856,15 +832,11 @@ const sunmitDeprecated = () => {
proxy.$modal.msgSuccess("操作成功");
});
};
// 分配承保公司
const handleAuthCompany = (associationapprove, taskId) => {
companyForm.value = {
associationapprove,
taskId: taskId,
};
companyShow.value = true;
};
const transferShow = ref(false); // 转办弹窗显示变量
const transferForm = ref({}); // 转办分配表单数据
// 转办,分配人员列表数据
const transferOptions = ref([]);
// 获取人员列表
const getUser = async () => {
const { data } = await getUserList();
... ... @@ -876,33 +848,44 @@ const handleSharing = (id) => {
getUser();
transferShow.value = true;
};
/** 查询部门列表 */
const getDeptList = () => {
listDept(companyQueryParams).then((response) => {
let newArr = [];
newArr = response.data.filter((item) => item.parentId === 100);
let arrNew = newArr.map((child) => {
return {
deptId: child.deptId.toString(),
deptName: child.deptName,
};
});
deptOptions.value.push(...arrNew);
/** 提交通过分配转办人员 */
function submitTransfer() {
const data = {
username: transferForm.value.username,
};
const taskId = transferForm.value.taskId;
transfer(data, taskId).then((res) => {
transferShow.value = false;
getList();
proxy.$modal.msgSuccess("保单已分配成功");
});
};
/** 重置操作表单 */
function reset() {
proxy.resetForm("policyRef");
}
/** 修改按钮操作 */
const handleUpdate = async (row) => {
reset();
const { data } = await getCarDetail(row.businessKey);
getTransferTip();
form.value = data;
open.value = true;
taskId.value = row.taskId;
// 分配承保公司弹窗显示
const companyShow = ref(false);
// 分配承保公司查询参数
const companyQueryParams = reactive({
deptName: undefined,
status: undefined,
});
// 分配承保公司列表数据
const deptOptions = ref([
{
deptId: "0",
deptName: "无",
},
]);
// 确认选择的承保公司数据表单
const companyForm = ref({});
const sharingShow = ref(false); // 分配备注显示变量
const sharingMsg = ref(""); // 分配备注
// 分配承保公司
const handleAuthCompany = (associationapprove, taskId) => {
companyForm.value = {
associationapprove,
taskId: taskId,
};
companyShow.value = true;
};
/** 提交通过分配承保公司 */
function submitForm() {
... ... @@ -920,53 +903,40 @@ function submitForm() {
proxy.$modal.msgSuccess("保单已分配成功");
});
}
/** 提交通过分配转办人员 */
function submitTransfer() {
const data = {
username: transferForm.value.username,
};
const taskId = transferForm.value.taskId;
transfer(data, taskId).then((res) => {
transferShow.value = false;
getList();
proxy.$modal.msgSuccess("保单已分配成功");
});
}
// 提交承接回馈
const submit = () => {
const data = {
policystatus: "2",
message: FeedbackForm.value.message,
commercialinsurancepolicynumber:
FeedbackForm.value.commercialinsurancepolicynumber,
stronginsurancepolicynumber: FeedbackForm.value.stronginsurancepolicynumber,
};
disposeUser(data, FeedbackForm.value.taskId).then((res) => {
getList();
proxy.$modal.msgSuccess("回馈成功");
showFeedback.value = false;
/** 查询承保公司列表 */
const getDeptList = () => {
listDept(companyQueryParams).then((response) => {
let newArr = [];
newArr = response.data.filter((item) => item.parentId === 100);
let arrNew = newArr.map((child) => {
return {
deptId: child.deptId.toString(),
deptName: child.deptName,
};
});
deptOptions.value.push(...arrNew);
});
};
const loadingBtn = ref(false); // 刷新流转公司加载按钮
const transferTip = ref(""); //流转下一家名称
const transferDeptId = ref(""); // 流转的部门公司ID
// 获取流转下一家分配公司
const getTransferTip = async () => {
loadingBtn.value = true;
const { data } = await getCompanyTip();
transferTip.value = data.deptName;
transferDeptId.value = data.deptId.toString();
loadingBtn.value = false;
};
// 提交修改
const submitUpdate = () => {
updateCarInfo(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
getList();
});
const getTransferTip = async (timers) => {
if (!loadingBtn.value) {
loadingBtn.value = true;
const { data } = await getCompanyTip();
let timer = setTimeout(() => {
transferTip.value = data.deptName;
transferDeptId.value = data.deptId.toString();
loadingBtn.value = false;
clearTimeout(timer);
}, timers);
}
};
// 筛选时间范围
const timeFrame = ref(null);
// 选择时间范围
const handleTime = (valu) => {
if (valu !== null) {
... ... @@ -977,7 +947,17 @@ const handleTime = (valu) => {
queryParams.endTime = "";
}
};
// 查询参数
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
name: "",
licensePlate: "",
type: 1,
frameNumber: "",
startTime: "",
endTime: "",
});
/** 搜索按钮操作 */
function handleQuery() {
queryParams.pageNum = 1;
... ...
... ... @@ -138,6 +138,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="联系电话"
prop="businessPhone"
width="150"
... ...
... ... @@ -78,6 +78,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="作废时间"
align="center"
prop="distributionTime"
... ...
... ... @@ -65,31 +65,73 @@
<span>{{ row.initialRegistration || row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="车牌号" prop="licensePlateNumber" width="150" />
<el-table-column label="车架号" prop="frameNumber" width="240" />
<el-table-column label="车主姓名" prop="name" width="100" />
<el-table-column label="联系电话" prop="phone" width="180" />
<el-table-column
label="车牌号"
align="center"
prop="licensePlateNumber"
width="150"
/>
<el-table-column
label="车架号"
align="center"
prop="frameNumber"
width="240"
/>
<el-table-column
label="车主姓名"
align="center"
prop="name"
width="100"
/>
<el-table-column
label="联系电话"
align="center"
prop="phone"
width="180"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="分配机制"
width="120"
align="center"
prop="distributionMechanism"
/>
<el-table-column label="承保公司" prop="companyName" width="150" />
<el-table-column label="操作人员" width="150">
<el-table-column
label="承保公司"
align="center"
prop="companyName"
width="150"
/>
<el-table-column label="操作人员" align="center" width="150">
<template #default="{ row }">
<span>{{
row.associationEmployeeUserName || row.companyEmployeeUserName
}}</span>
</template>
</el-table-column>
<el-table-column label="办结时间" prop="policyTime" width="160" />
<el-table-column
label="办结时间"
align="center"
prop="policyTime"
width="160"
/>
<el-table-column
label="办理人"
prop="companyEmployeeUserName"
width="150"
align="center"
/>
<el-table-column label="保单状态" width="100" prop="statue">
<el-table-column
label="保单状态"
align="center"
width="100"
prop="statue"
>
<template #default="{ row }">
<span
:style="{ color: row.status === '进行中' ? '#409EFF' : '#67C23A' }"
... ... @@ -99,6 +141,7 @@
</el-table-column>
<el-table-column
label="保单回馈"
align="center"
fixed="right"
width="100"
show-overflow-tooltip
... ...
... ... @@ -112,6 +112,12 @@
prop="distributionMechanism"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="承保公司"
prop="companyName"
width="180"
... ...
... ... @@ -94,6 +94,12 @@
align="center"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="联系电话"
prop="phone"
width="150"
... ... @@ -534,7 +540,7 @@
<!-- 流转提示 -->
<div class="transferTip">
<span>自动订单流转:{{ transferTip }}</span>
<el-button :loading="loadingBtn" @click="getTransferTip"
<el-button :loading="loadingBtn" @click="getTransferTip(1000)"
>刷新</el-button
>
</div>
... ... @@ -598,132 +604,50 @@ import {
queryDefeatContent,
} from "@/api/policy/index";
import { checkRole } from "@/utils/permission"; // 权限判断函数
import { queryCarType } from "@/api/configurationCenter/carType.js";
import { queryCarNature } from "@/api/configurationCenter/carNature.js";
import { queryNeed } from "@/api/configurationCenter/need.js";
import useSelectData from "@/hooks/useSelectData.js";
import { listDept } from "@/api/system/dept";
import { ref } from "vue";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const activeTitle = ref("");
const loadingBtn = ref(false);
const showIssue = ref(false); // 问题件显示变量
const total = ref(0);
const timeFrame = ref(null);
const typeId = ref(0); // 判断类型 0 问题件 1 退回 2 作废
const transferTip = ref(""); //流转下一家名称
const transferDeptId = ref(""); // 流转的部门公司ID
const open = ref(false);
const form = ref({});
const showFeedback = ref(false); // 回馈显示变量
const transferShow = ref(false); // 转办显示变量
const transferForm = ref({});
const taskId = ref("");
const activeTitle = ref(""); // 弹窗标题
const taskId = ref(""); // 任务ID
const successShow = ref(false); // 通过备注显示变量
const successMsg = ref(""); // 通过备注
const sharingShow = ref(false); // 分配备注显示变量
const sharingMsg = ref(""); // 分配备注
const lookSuccessShow = ref(false); // 查看通过备注显示变量
const lookSuccessMsg = ref(""); // 查看通过备注
const issueReturenCompany = ref(""); // 问题件退回公司
const issueCompanyPerson = ref(""); // 问题件退回操作人员
const issueCompanyPersonPhone = ref("");
const open = ref(false); // 编辑弹窗显示变量
const form = ref({}); // 编辑表单数据
/** 修改按钮操作 */
const handleUpdate = async (row) => {
reset();
const { data } = await getCarDetail(row.businessKey);
getTransferTip(0);
form.value = data;
open.value = true;
taskId.value = row.taskId;
};
// 提交修改
const submitUpdate = () => {
updateCarInfo(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
getList();
});
};
/** 重置操作表单 */
function reset() {
proxy.resetForm("policyRef");
}
const IssueForm = ref({
deprecatedReason: "",
});
const FeedbackForm = ref({
stronginsurancepolicynumber: "",
commercialinsurancepolicynumber: "",
message: "",
});
const getParams = reactive({
pageNum: 1,
pageSize: 100,
});
const companyShow = ref(false);
const deptOptions = ref([
{
deptId: "0",
deptName: "无",
},
]);
const transferOptions = ref([]);
const deprecatedShow = ref(false);
const deprecatedForm = ref({
deprecatedReason: "",
associationapprove: "",
});
const companyForm = ref({});
// 查询参数
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
name: "",
licensePlate: "",
type: 0,
frameNumber: "",
startTime: "",
endTime: "",
});
const companyQueryParams = reactive({
deptName: undefined,
status: undefined,
});
const policyList = ref([]);
// 判断是否有权限
const hasRole = computed(() => {
return proxy.$auth.hasRole("associationemployee");
});
// 新能源
const NewEnergyOption = ref([
{
id: "0",
name: "否",
},
{
id: "1",
name: "是",
},
]);
// 选择时间范围
const handleTime = (valu) => {
if (valu !== null) {
queryParams.startTime = proxy.parseTime(valu[0]);
queryParams.endTime = proxy.parseTime(valu[1]);
} else {
queryParams.startTime = "";
queryParams.endTime = "";
}
};
// 车辆类型
const carTypeOption = ref([]);
const getCarTypeOption = async () => {
const { data } = await queryCarType(getParams);
carTypeOption.value = data.records;
};
getCarTypeOption();
// 车辆使用性质
const carNatureOption = ref([]);
const getcarNatureOption = async () => {
const { data } = await queryCarNature(getParams);
carNatureOption.value = data.records;
};
getcarNatureOption();
// 保险需求
const needOption = ref([]);
const getNeedOption = async () => {
const { data } = await queryNeed(getParams);
needOption.value = data.records;
};
getNeedOption();
// 获取选择数据列表
const { carNatureOption, needOption, NewEnergyOption } = useSelectData();
// table数据列表
const policyList = ref([]);
const total = ref(0); // 总条数
// table加载动画
const loading = ref(false);
// 获取待办列表
const getList = async () => {
loading.value = true;
const { data } = await queryMyList(queryParams);
... ... @@ -731,6 +655,9 @@ const getList = async () => {
total.value = data.total;
loading.value = false;
};
// 回馈弹窗显示变量
const showFeedback = ref(false);
// 承接
const handleContinue = (row) => {
if (row.orderProgress === "待承接") {
... ... @@ -752,13 +679,32 @@ const handleContinue = (row) => {
showFeedback.value = true;
}
};
// 问题件
const handleTroubleshooting = (taskId) => {
deprecatedForm.value.taskId = taskId;
activeTitle.value = "问题件退回至协会";
typeId.value = 0;
deprecatedShow.value = true;
// 承接回馈内容表单
const FeedbackForm = ref({
stronginsurancepolicynumber: "", // 交强险
commercialinsurancepolicynumber: "", // 商业险
message: "", // 备注
});
// 提交承接回馈
const submit = () => {
const data = {
policystatus: "2",
message: FeedbackForm.value.message,
commercialinsurancepolicynumber:
FeedbackForm.value.commercialinsurancepolicynumber,
stronginsurancepolicynumber: FeedbackForm.value.stronginsurancepolicynumber,
};
disposeUser(data, FeedbackForm.value.taskId).then((res) => {
getList();
proxy.$modal.msgSuccess("回馈成功");
showFeedback.value = false;
});
};
const successShow = ref(false); // 通过备注显示变量
const successMsg = ref(""); // 通过备注
const lookSuccessShow = ref(false); // 查看通过备注显示变量
const lookSuccessMsg = ref(""); // 查看通过备注
// 提交通过保单
const handleSuccess = async () => {
await disposeUser(
... ... @@ -775,6 +721,24 @@ const handleSuccess = async () => {
successShow.value = false;
getList();
};
// 查阅通过备注
const lookRemark = async (row) => {
const { data } = await queryDefeatContent({
processInstanceId: row.processInstanceId,
type: 3,
});
lookSuccessMsg.value = data.message;
lookSuccessShow.value = true;
};
const typeId = ref(0); // 判断类型 0 问题件 1 退回 2 作废
// 表单作废,退回。问题件对话框显示
const deprecatedShow = ref(false);
// 表单作废,退回。问题件对话框内容表单
const deprecatedForm = ref({
deprecatedReason: "",
associationapprove: "",
});
// 退回保单
const handleFallback = (associationapprove) => {
deprecatedForm.value = {
... ... @@ -798,8 +762,21 @@ const handleVoid = (associationapprove, taskId) => {
"温馨提示:该保单作废后车牌号、车架号在本自然年度无法重新提交";
deprecatedShow.value = true;
};
// 提交方法
const showIssue = ref(false); // 问题件原因显示变量
const issueReturenCompany = ref(""); // 问题件退回公司
const issueCompanyPerson = ref(""); // 问题件退回操作人员
const issueCompanyPersonPhone = ref(""); // 问题件退回操作人员手机号
// 问题件退回原因
const IssueForm = ref({
deprecatedReason: "",
});
// 问题件
const handleTroubleshooting = (taskId) => {
deprecatedForm.value.taskId = taskId;
activeTitle.value = "问题件退回至协会";
typeId.value = 0;
deprecatedShow.value = true;
};
// 查询问题件原因
const lookReason = async (row) => {
const { data } = await queryDefeatContent({
... ... @@ -812,17 +789,6 @@ const lookReason = async (row) => {
issueCompanyPerson.value = row.companyEmployeeUserName;
issueCompanyPersonPhone.value = row.companyEmployeePhone;
};
// 查阅通过备注
const lookRemark = async (row) => {
const { data } = await queryDefeatContent({
processInstanceId: row.processInstanceId,
type: 3,
});
lookSuccessMsg.value = data.message;
lookSuccessShow.value = true;
};
// 提交作废,退回,问题件表单
const sunmitDeprecated = () => {
let data = {};
... ... @@ -838,6 +804,7 @@ const sunmitDeprecated = () => {
};
}
const taskId = deprecatedForm.value.taskId;
// 办理一个业务
disposeUser(data, taskId).then((res) => {
getList();
open.value = false;
... ... @@ -846,15 +813,10 @@ const sunmitDeprecated = () => {
});
};
// 分配承保公司
const handleAuthCompany = (associationapprove, taskId) => {
companyForm.value = {
associationapprove,
taskId: taskId,
};
companyShow.value = true;
};
const transferShow = ref(false); // 转办弹窗显示变量
const transferForm = ref({}); // 转办分配表单数据
// 转办,分配人员列表数据
const transferOptions = ref([]);
// 获取人员列表
const getUser = async () => {
const { data } = await getUserList();
... ... @@ -866,33 +828,44 @@ const handleSharing = (id) => {
getUser();
transferShow.value = true;
};
/** 查询部门列表 */
const getDeptList = () => {
listDept(companyQueryParams).then((response) => {
let newArr = [];
newArr = response.data.filter((item) => item.parentId === 100);
let arrNew = newArr.map((child) => {
return {
deptId: child.deptId.toString(),
deptName: child.deptName,
};
});
deptOptions.value.push(...arrNew);
/** 提交通过分配转办人员 */
function submitTransfer() {
const data = {
username: transferForm.value.username,
};
const taskId = transferForm.value.taskId;
transfer(data, taskId).then((res) => {
transferShow.value = false;
getList();
proxy.$modal.msgSuccess("保单已分配成功");
});
};
/** 重置操作表单 */
function reset() {
proxy.resetForm("policyRef");
}
/** 修改按钮操作 */
const handleUpdate = async (row) => {
reset();
const { data } = await getCarDetail(row.businessKey);
getTransferTip();
form.value = data;
open.value = true;
taskId.value = row.taskId;
// 分配承保公司弹窗显示
const companyShow = ref(false);
// 分配承保公司查询参数
const companyQueryParams = reactive({
deptName: undefined,
status: undefined,
});
// 分配承保公司列表数据
const deptOptions = ref([
{
deptId: "0",
deptName: "无",
},
]);
// 确认选择的承保公司数据表单
const companyForm = ref({});
const sharingShow = ref(false); // 分配备注显示变量
const sharingMsg = ref(""); // 分配备注
// 分配承保公司
const handleAuthCompany = (associationapprove, taskId) => {
companyForm.value = {
associationapprove,
taskId: taskId,
};
companyShow.value = true;
};
/** 提交通过分配承保公司 */
function submitForm() {
... ... @@ -910,52 +883,61 @@ function submitForm() {
proxy.$modal.msgSuccess("保单已分配成功");
});
}
/** 提交通过分配转办人员 */
function submitTransfer() {
const data = {
username: transferForm.value.username,
};
const taskId = transferForm.value.taskId;
transfer(data, taskId).then((res) => {
transferShow.value = false;
getList();
proxy.$modal.msgSuccess("保单已分配成功");
});
}
// 提交承接回馈
const submit = () => {
const data = {
policystatus: "2",
message: FeedbackForm.value.message,
commercialinsurancepolicynumber:
FeedbackForm.value.commercialinsurancepolicynumber,
stronginsurancepolicynumber: FeedbackForm.value.stronginsurancepolicynumber,
};
disposeUser(data, FeedbackForm.value.taskId).then((res) => {
getList();
proxy.$modal.msgSuccess("回馈成功");
showFeedback.value = false;
/** 查询承保公司列表 */
const getDeptList = () => {
listDept(companyQueryParams).then((response) => {
let newArr = [];
newArr = response.data.filter((item) => item.parentId === 100);
let arrNew = newArr.map((child) => {
return {
deptId: child.deptId.toString(),
deptName: child.deptName,
};
});
deptOptions.value.push(...arrNew);
});
};
const loadingBtn = ref(false); // 刷新流转公司加载按钮
const transferTip = ref(""); //流转下一家名称
const transferDeptId = ref(""); // 流转的部门公司ID
// 获取流转下一家分配公司
const getTransferTip = async () => {
loadingBtn.value = true;
const { data } = await getCompanyTip();
transferTip.value = data.deptName;
transferDeptId.value = data.deptId.toString();
loadingBtn.value = false;
};
// 提交修改
const submitUpdate = () => {
updateCarInfo(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
getList();
});
const getTransferTip = async (timers) => {
if (!loadingBtn.value) {
loadingBtn.value = true;
const { data } = await getCompanyTip();
let timer = setTimeout(() => {
transferTip.value = data.deptName;
transferDeptId.value = data.deptId.toString();
loadingBtn.value = false;
clearTimeout(timer);
}, timers);
}
};
// 筛选时间范围
const timeFrame = ref(null);
// 选择时间范围
const handleTime = (valu) => {
if (valu !== null) {
queryParams.startTime = proxy.parseTime(valu[0]);
queryParams.endTime = proxy.parseTime(valu[1]);
} else {
queryParams.startTime = "";
queryParams.endTime = "";
}
};
// 查询参数
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
name: "",
licensePlate: "",
type: 0,
frameNumber: "",
startTime: "",
endTime: "",
});
/** 搜索按钮操作 */
function handleQuery() {
queryParams.pageNum = 1;
... ... @@ -973,6 +955,7 @@ onMounted(() => {
getList();
});
// 判断是否为协会员工,协会员工可分配承保公司
if (checkRole(["associationemployee"])) {
getDeptList();
}
... ...
... ... @@ -107,26 +107,63 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="policyList" @row-click="handleUpdate">
<el-table-column label="序号" type="index" width="55" />
<el-table-column label="登记时间" prop="createTime" width="160" />
<el-table-column label="车牌号" prop="licensePlateNumber" width="150" />
<el-table-column label="车架号" prop="frameNumber" width="240" />
<el-table-column label="车主姓名" prop="name" width="100" />
<el-table-column label="联系电话" prop="phone" width="180" />
<el-table-column
label="登记时间"
prop="createTime"
align="center"
width="160"
/>
<el-table-column
label="车牌号"
prop="licensePlateNumber"
align="center"
width="150"
/>
<el-table-column
label="车架号"
prop="frameNumber"
align="center"
width="240"
/>
<el-table-column
label="车主姓名"
prop="name"
align="center"
width="100"
/>
<el-table-column
label="联系电话"
prop="phone"
align="center"
width="180"
/>
<el-table-column
label="保险需求"
prop="requirements"
align="center"
width="150"
/>
<el-table-column
label="处理状态"
align="center"
prop="policyStatus"
show-overflow-tooltip
width="150"
/>
<el-table-column label="上年承保公司" prop="sysDeptName" width="150" />
<el-table-column label="操作人员" width="150">
<el-table-column
label="上年承保公司"
prop="sysDeptName"
align="center"
width="150"
/>
<el-table-column label="操作人员" align="center" width="150">
<template #default="{ row }">
<span>{{
row.associationEmployeeUserName || row.companyEmployeeUserName
}}</span>
</template>
</el-table-column>
<el-table-column label="操作时间" width="160">
<el-table-column label="操作时间" align="center" width="160">
<template #default="{ row }">
<span>{{
row.companyEmployeeUndertakeTime || row.distributionTime
... ... @@ -135,12 +172,14 @@
</el-table-column>
<el-table-column
label="分配机制"
align="center"
width="120"
prop="distributionMechanism"
/>
<el-table-column
label="承保公司"
prop="companyName"
align="center"
show-overflow-tooltip
width="150"
>
... ... @@ -148,7 +187,7 @@
<span>{{ row.companyName || "无" }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<el-table-column label="操作" fixed="right" align="center" width="150">
<template #default="{ row }">
<el-button
v-show="row.policyStatus === '已退回'"
... ...