|
...
|
...
|
@@ -2,77 +2,37 @@ |
|
|
|
<div class="app-container">
|
|
|
|
<!-- 表格数据 -->
|
|
|
|
<el-table v-loading="loading" :data="policyList" @row-click="handleUpdate">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="序号" width="55" type="index" />
|
|
|
|
<el-table-column
|
|
|
|
label="登记时间"
|
|
|
|
prop="createTime"
|
|
|
|
width="160"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column label="登记时间" prop="createTime" align="center" />
|
|
|
|
<el-table-column
|
|
|
|
label="车牌号"
|
|
|
|
prop="licensePlateNumber"
|
|
|
|
width="150"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
label="车架号"
|
|
|
|
width="180"
|
|
|
|
prop="frameNumber"
|
|
|
|
align="center"
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
/>
|
|
|
|
<el-table-column label="车主姓名" prop="name" align="center" />
|
|
|
|
<el-table-column label="联系电话" prop="phone" align="center" />
|
|
|
|
<el-table-column label="上年承保公司" prop="sysDeptName" align="center" />
|
|
|
|
<el-table-column
|
|
|
|
label="车主姓名"
|
|
|
|
prop="name"
|
|
|
|
width="100"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
label="联系电话"
|
|
|
|
prop="phone"
|
|
|
|
width="180"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
label="上年承保公司"
|
|
|
|
prop="sysDeptName"
|
|
|
|
width="150"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
v-show="hasCompanyadmin"
|
|
|
|
label="分配机制"
|
|
|
|
prop="distributionMechanism"
|
|
|
|
width="150"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
label="订单分配时间"
|
|
|
|
prop="distributionTime"
|
|
|
|
width="150"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
label="保单进度"
|
|
|
|
prop="orderProgress"
|
|
|
|
width="150"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
label="承接时间"
|
|
|
|
prop="companyEmployeeUndertakeTime"
|
|
|
|
width="150"
|
|
|
|
label="操作"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
v-show="hasCompanyadmin"
|
|
|
|
label="承接人"
|
|
|
|
prop="associationEmployeeUserName"
|
|
|
|
width="150"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
min-width="120"
|
|
|
|
fixed="right"
|
|
|
|
>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
v-hasRole="['companyadmin']"
|
|
|
|
@click.stop="handleSharing(row.taskId)"
|
|
|
|
>分配</el-button
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<pagination
|
|
...
|
...
|
@@ -83,55 +43,28 @@ |
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- 表单作废对话框 -->
|
|
|
|
<el-dialog
|
|
|
|
v-model="deprecatedShow"
|
|
|
|
title="温馨提示:该保单作废后车牌号、车架号在本自然年度无法重新提交"
|
|
|
|
width="500"
|
|
|
|
append-to-body
|
|
|
|
>
|
|
|
|
<QuillEditor
|
|
|
|
:value="deprecatedForm.deprecatedReason"
|
|
|
|
@updateValue="getMsg"
|
|
|
|
/>
|
|
|
|
<template #footer>
|
|
|
|
<div class="dialog-footer">
|
|
|
|
<el-button @click="deprecatedShow = false">取消</el-button>
|
|
|
|
<el-button type="primary" @click="sunmitDeprecated">确定</el-button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 分配承保公司对话框 -->
|
|
|
|
<!-- 转办分配对话框 -->
|
|
|
|
<el-dialog
|
|
|
|
v-model="companyShow"
|
|
|
|
title="分配承保公司:"
|
|
|
|
v-model="transferShow"
|
|
|
|
title="请选择人员:"
|
|
|
|
width="500"
|
|
|
|
append-to-body
|
|
|
|
>
|
|
|
|
<div class="company_box">
|
|
|
|
<div class="header_top">
|
|
|
|
<el-input
|
|
|
|
v-model="companyQueryParams.deptName"
|
|
|
|
style="width: 380px"
|
|
|
|
placeholder="请输入承保公司名称(支持模糊查询)"
|
|
|
|
prefix-icon="Search"
|
|
|
|
/>
|
|
|
|
<el-button type="primary" @click="getDeptList">查询</el-button>
|
|
|
|
</div>
|
|
|
|
<el-radio-group v-model="companyForm.deptId" @change="handleDeptChange">
|
|
|
|
<el-radio-group v-model="transferForm.username">
|
|
|
|
<el-radio
|
|
|
|
v-for="item in deptOptions"
|
|
|
|
:key="item.deptId"
|
|
|
|
:label="item.deptId"
|
|
|
|
>{{ item.deptName }}</el-radio
|
|
|
|
v-for="item in transferOptions"
|
|
|
|
:key="item.userName"
|
|
|
|
:label="item.userName"
|
|
|
|
>{{ item.userName }}</el-radio
|
|
|
|
>
|
|
|
|
</el-radio-group>
|
|
|
|
<div v-show="transferOptions.length === 0">暂无其他员工</div>
|
|
|
|
</div>
|
|
|
|
<template #footer>
|
|
|
|
<div class="dialog-footer">
|
|
|
|
<el-button @click="companyShow = false">取消</el-button>
|
|
|
|
<el-button type="primary" @click="submitForm">确定</el-button>
|
|
|
|
<el-button type="primary" @click="submitTransfer">确定</el-button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</el-dialog>
|
|
...
|
...
|
@@ -141,18 +74,18 @@ |
|
|
|
<el-form :model="form" :rules="rules" ref="policyRef" label-width="100px">
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="车牌号" prop="carNum">
|
|
|
|
<el-form-item label="车牌号" prop="licensePlateNumber">
|
|
|
|
<el-input
|
|
|
|
v-model="form.carNum"
|
|
|
|
v-model="form.licensePlateNumber"
|
|
|
|
placeholder="请输入车牌号"
|
|
|
|
maxlength="30"
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="车架号" prop="frameNum">
|
|
|
|
<el-form-item label="车架号" prop="frameNumber">
|
|
|
|
<el-input
|
|
|
|
v-model="form.frameNum"
|
|
|
|
v-model="form.frameNumber"
|
|
|
|
placeholder="请输入车架号"
|
|
|
|
maxlength="30"
|
|
|
|
/>
|
|
...
|
...
|
@@ -189,9 +122,9 @@ |
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="上年承保公司" prop="company">
|
|
|
|
<el-form-item label="上年承保公司" prop="sysDeptName">
|
|
|
|
<el-input
|
|
|
|
v-model="form.company"
|
|
|
|
v-model="form.sysDeptName"
|
|
|
|
placeholder="请输入上年承保公司"
|
|
|
|
maxlength="50"
|
|
|
|
/>
|
|
...
|
...
|
@@ -199,34 +132,21 @@ |
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
|
|
<div class="dialog-footer">
|
|
|
|
<el-button @click="open = false">取消</el-button>
|
|
|
|
<el-button type="primary" @click="open = false">确定</el-button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { queryPengdingList, disposeUser } from "@/api/policy/index";
|
|
|
|
import { listDept } from "@/api/system/dept";
|
|
|
|
import { onMounted, ref } from "vue";
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
import { queryPengdingList, getUserList } from "@/api/policy/index";
|
|
|
|
const loading = ref(false);
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const total = ref(0);
|
|
|
|
const title = ref("保单信息");
|
|
|
|
const open = ref(false);
|
|
|
|
const timerReason = ref(null);
|
|
|
|
const transferShow = ref(false);
|
|
|
|
const form = ref({});
|
|
|
|
const hasRole = computed(() => {
|
|
|
|
return proxy.$auth.hasRole("associationemployee");
|
|
|
|
});
|
|
|
|
|
|
|
|
const hasCompanyadmin = computed(() => {
|
|
|
|
return proxy.$auth.hasRole("companyadmin");
|
|
|
|
});
|
|
|
|
const transferForm = ref({});
|
|
|
|
const transferOptions = ref([]);
|
|
|
|
const rules = ref({
|
|
|
|
carNum: [{ required: true, message: "车牌号不能为空", trigger: "blur" }],
|
|
|
|
frameNum: [{ required: true, message: "车架号不能为空", trigger: "blur" }],
|
|
...
|
...
|
@@ -241,21 +161,18 @@ const rules = ref({ |
|
|
|
],
|
|
|
|
});
|
|
|
|
const companyShow = ref(false);
|
|
|
|
const deptOptions = ref([]);
|
|
|
|
const company = ref(2);
|
|
|
|
const deprecatedShow = ref(false);
|
|
|
|
const deprecatedForm = ref({});
|
|
|
|
const companyForm = ref({});
|
|
|
|
const queryParams = reactive({
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
});
|
|
|
|
const companyQueryParams = reactive({
|
|
|
|
deptName: undefined,
|
|
|
|
status: undefined,
|
|
|
|
});
|
|
|
|
const policyList = ref([]);
|
|
|
|
|
|
|
|
/** 重置操作表单 */
|
|
|
|
function reset() {
|
|
|
|
proxy.resetForm("policyRef");
|
|
|
|
}
|
|
|
|
|
|
|
|
// 获取处理的列表
|
|
|
|
const getList = async () => {
|
|
|
|
loading.value = true;
|
|
|
|
const { rows, total: all } = await queryPengdingList(queryParams);
|
|
...
|
...
|
@@ -263,117 +180,38 @@ const getList = async () => { |
|
|
|
total.value = all;
|
|
|
|
loading.value = false;
|
|
|
|
};
|
|
|
|
// 通过保单
|
|
|
|
const handleSuccess = (associationapprove, taskId) => {
|
|
|
|
ElMessageBox.confirm("是否通过该保单?", {
|
|
|
|
confirmButtonText: "确认通过",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning",
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
disposeUser({ associationapprove }, taskId).then((res) => {
|
|
|
|
proxy.$modal.msgSuccess("保单已通过");
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
proxy.$modal.msg("取消通过");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
// 退回保单
|
|
|
|
const handleFallback = (associationapprove, taskId) => {
|
|
|
|
ElMessageBox.confirm("是否退回该保单?", {
|
|
|
|
confirmButtonText: "确认退回",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning",
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
disposeUser({ associationapprove }, taskId).then((res) => {
|
|
|
|
proxy.$modal.msgSuccess("保单已退回");
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
proxy.$modal.msg("已取消");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
// 作废保单
|
|
|
|
const handleVoid = (associationapprove, taskId) => {
|
|
|
|
deprecatedForm.value = {
|
|
|
|
associationapprove,
|
|
|
|
taskId,
|
|
|
|
};
|
|
|
|
deprecatedShow.value = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
// 提交作废表单
|
|
|
|
const sunmitDeprecated = () => {
|
|
|
|
const data = {
|
|
|
|
associationapprove: deprecatedForm.value.associationapprove,
|
|
|
|
comment: deprecatedForm.value.deprecatedReason,
|
|
|
|
};
|
|
|
|
const taskId = deprecatedForm.value.taskId;
|
|
|
|
disposeUser(data, taskId).then((res) => {
|
|
|
|
proxy.$modal.msgSuccess("保单已退回");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
// 分配承保公司
|
|
|
|
const handleAuthCompany = (associationapprove, taskId) => {
|
|
|
|
companyForm.value = {
|
|
|
|
associationapprove,
|
|
|
|
taskId,
|
|
|
|
};
|
|
|
|
companyShow.value = true;
|
|
|
|
getDeptList();
|
|
|
|
// 转办或分配
|
|
|
|
const handleSharing = (id) => {
|
|
|
|
transferForm.value.taskId = id;
|
|
|
|
getUser();
|
|
|
|
transferShow.value = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 查询部门列表 */
|
|
|
|
const getDeptList = () => {
|
|
|
|
loading.value = true;
|
|
|
|
listDept(companyQueryParams).then((response) => {
|
|
|
|
deptOptions.value = response.data.filter((item) => item.parentId === 100);
|
|
|
|
loading.value = false;
|
|
|
|
});
|
|
|
|
// 获取人员列表
|
|
|
|
const getUser = async () => {
|
|
|
|
const { data } = await getUserList();
|
|
|
|
transferOptions.value = data;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 重置操作表单 */
|
|
|
|
function reset() {
|
|
|
|
form.value = {
|
|
|
|
policyId: undefined,
|
|
|
|
createTime: undefined,
|
|
|
|
carNum: undefined,
|
|
|
|
frameNum: undefined,
|
|
|
|
name: undefined,
|
|
|
|
phone: undefined,
|
|
|
|
company: undefined,
|
|
|
|
};
|
|
|
|
proxy.resetForm("policyRef");
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
function handleUpdate(row) {
|
|
|
|
reset();
|
|
|
|
form.value = row;
|
|
|
|
open.value = true;
|
|
|
|
}
|
|
|
|
/** 提交通过分配承保公司 */
|
|
|
|
function submitForm() {
|
|
|
|
/** 提交通过分配转办人员 */
|
|
|
|
function submitTransfer() {
|
|
|
|
const data = {
|
|
|
|
associationapprove: companyForm.value.associationapprove,
|
|
|
|
deptId: companyForm.value.deptId.toString(),
|
|
|
|
username: transferForm.value.username,
|
|
|
|
};
|
|
|
|
const taskId = companyForm.value.taskId;
|
|
|
|
disposeUser(data, taskId).then((res) => {
|
|
|
|
companyShow.value = true;
|
|
|
|
const taskId = transferForm.value.taskId;
|
|
|
|
transfer(data, taskId).then((res) => {
|
|
|
|
transferShow.value = false;
|
|
|
|
getList();
|
|
|
|
proxy.$modal.msgSuccess("保单已分配成功");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
const getMsg = (val) => {
|
|
|
|
clearTimeout(timerReason.value);
|
|
|
|
timerReason.value = setTimeout(() => {
|
|
|
|
deprecatedForm.value.deprecatedReaso = val;
|
|
|
|
}, 1000);
|
|
|
|
const handleUpdate = (row) => {
|
|
|
|
reset();
|
|
|
|
form.value = row;
|
|
|
|
// isCustom.value = data.isCustomizeBrandAndModel == "0";
|
|
|
|
open.value = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
getList();
|
|
|
|
</script>
|
|
|
|
|
...
|
...
|
|