|
|
@@ -1,43 +1,46 @@
|
|
|
<template>
|
|
|
- <PageMain class="vh100">
|
|
|
- <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
|
- <el-tab-pane :label="`待审核(${pendingReviewlength})`" name="pendingReview">
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane :label="`审核不通过(${reviewRejectedlength})`" name="reviewRejected">
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- <SearchForm :fields="fields" :formInline="formInline" :onSearch="agreementQuery" :onReset="resetForm" />
|
|
|
- <ComplexTable :tableData="tableData" :columns="columns" :showIndex="false" :columnwidth="200" :showSelect="true"
|
|
|
- :pageInfo="pageInfo" @getList="getList" @selectionChange="selectionChange" uniqueIdName="costId">
|
|
|
- <template v-slot:table-title-btn>
|
|
|
- <el-dropdown placement="bottom-start" v-if="activeName == 'pendingReview'">
|
|
|
- <el-button> 批量审核<el-icon>
|
|
|
- <arrow-down />
|
|
|
- </el-icon>
|
|
|
- </el-button>
|
|
|
- <template #dropdown>
|
|
|
- <el-dropdown-menu>
|
|
|
- <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchaudit">批量审核</el-dropdown-item>
|
|
|
- <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchrejected">批量驳回</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </template>
|
|
|
- </el-dropdown>
|
|
|
- </template>
|
|
|
- <template v-slot:operation="scope">
|
|
|
- <el-button v-if="scope.operationData.approved == '0'" type="primary" link
|
|
|
- @click="agreemenUpdate(scope.operationData)"> 审核
|
|
|
+ <PageMain class="vh100">
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
|
+ <el-tab-pane :label="`待审核(${pendingReviewlength})`" name="pendingReview">
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane :label="`审核通过(${passlength})`" name="pass">
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane :label="`审核不通过(${reviewRejectedlength})`" name="reviewRejected">
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <SearchForm :fields="fields" :formInline="formInline" :onSearch="agreementQuery" :onReset="resetForm" />
|
|
|
+ <ComplexTable :tableData="companylist" :columns="columns" :showIndex="false" :columnwidth="200" :showSelect="true"
|
|
|
+ :pageInfo="pageInfo" @getList="getList" @selectionChange="selectionChange" uniqueIdName="costId">
|
|
|
+ <template v-slot:table-title-btn>
|
|
|
+ <el-dropdown placement="bottom-start" v-if="activeName == 'pendingReview'">
|
|
|
+ <el-button> 批量审核<el-icon>
|
|
|
+ <arrow-down />
|
|
|
+ </el-icon>
|
|
|
</el-button>
|
|
|
- <el-button v-if="scope.operationData.approved == '2'" type="primary" link
|
|
|
- @click="agreemenUpdate(scope.operationData)"> 详情
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </ComplexTable>
|
|
|
- </PageMain>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchaudit">批量审核</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchrejected">批量驳回</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ <template v-slot:operation="scope">
|
|
|
+ <el-button v-if="scope.operationData.approved == '0'" type="primary" link
|
|
|
+ @click="agreemenUpdate(scope.operationData)"> 审核
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.operationData.approved == '2' || scope.operationData.approved == '1'" type="primary" link
|
|
|
+ @click="agreemenUpdate(scope.operationData)"> 详情
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </ComplexTable>
|
|
|
+ </PageMain>
|
|
|
|
|
|
- <!-- 规则费用编辑组件 -->
|
|
|
- <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle"
|
|
|
- :agreementInfo="AgreementInfo" :RulesInfo="ruleInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
|
|
|
- @cancel="ruleFeeEditVisible = false" operationType="audit" @rejectOperation="rejectOperation" @auditOperation="auditOperation" />
|
|
|
+ <!-- 规则费用编辑组件 -->
|
|
|
+ <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle"
|
|
|
+ :agreementInfo="AgreementInfo" :RulesInfo="ruleInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
|
|
|
+ @cancel="ruleFeeEditVisible = false" :operationType="activeName == 'pendingReview' ? 'audit' : 'rejected'"
|
|
|
+ @rejectOperation="rejectOperation" @auditOperation="auditOperation" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
@@ -58,17 +61,21 @@ onBeforeMount(async () => {
|
|
|
if (id.value) {
|
|
|
formInline.agreement = id.value;
|
|
|
}
|
|
|
- findpage();//列表数据
|
|
|
+ findpage("0");//列表数据
|
|
|
+ findpage("1");//列表数据
|
|
|
+ findpage("2");//列表数据
|
|
|
getDeptTree();
|
|
|
agreement();
|
|
|
+ getAgreement();//全部协议;
|
|
|
valid_status.value = getDict('valid_status');//生效状态
|
|
|
is_enable.value = getDict('is_enable');//协议状态
|
|
|
insurance_type.value = getDict('insurance_type')
|
|
|
audit_status.value = getDict('audit_status')
|
|
|
|
|
|
});
|
|
|
-const tableData = ref([
|
|
|
-]);
|
|
|
+const tableData1 = ref([]);//待审核
|
|
|
+const tableData2 = ref([]);//审核通过
|
|
|
+const tableData3 = ref([]);//审核不通过
|
|
|
const activeName = ref('pendingReview')
|
|
|
const agreementQueryName = ref();//选择协议查询
|
|
|
const agreementList = ref();//协议列表
|
|
|
@@ -78,10 +85,13 @@ const insurance_type = ref();
|
|
|
const valid_status = ref();
|
|
|
const audit_status = ref();
|
|
|
const is_enable = ref();
|
|
|
+const agreementListALL = ref();//全部协议列表
|
|
|
+
|
|
|
const route = useRoute();
|
|
|
const id = ref(route.query.id as string);//id参数
|
|
|
-const pendingReviewlength = ref(0);
|
|
|
-const reviewRejectedlength = ref(0);
|
|
|
+const pendingReviewlength = ref(0);//待审核
|
|
|
+const passlength = ref(0);//审核通过
|
|
|
+const reviewRejectedlength = ref(0);//审核不通过
|
|
|
const pageInfo = ref({
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
@@ -99,10 +109,32 @@ const formInline = reactive({
|
|
|
effectiveTime: [],
|
|
|
failureTime: [],
|
|
|
})
|
|
|
-
|
|
|
+const companylist = computed(() => {
|
|
|
+ let list = [] as any;
|
|
|
+ switch (activeName.value) {
|
|
|
+ case 'pendingReview':
|
|
|
+ list = tableData1.value;
|
|
|
+ break;
|
|
|
+ case 'pass':
|
|
|
+ list = tableData2.value;
|
|
|
+ break;
|
|
|
+ case 'reviewRejected':
|
|
|
+ list = tableData3.value;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+})
|
|
|
//表格字段数据
|
|
|
const fields = ref([
|
|
|
- { label: "所属协议", model: "agreement", type: "input", placeholder: "输入代码,名称,简称查找" },
|
|
|
+ {
|
|
|
+ label: "所属协议", model: "agreement", type: "select", placeholder: "输入代码,名称,简称查找", options: agreementListALL,
|
|
|
+ props: {
|
|
|
+ label: 'agreementTitle',
|
|
|
+ value: 'agreementTitle'
|
|
|
+ }, filterable: true
|
|
|
+ },
|
|
|
{
|
|
|
label: "险种", model: "productId", type: "select", options: insurance_type,
|
|
|
},
|
|
|
@@ -137,16 +169,21 @@ const fields = ref([
|
|
|
]);
|
|
|
|
|
|
//费用数据查询
|
|
|
-function findpage() {
|
|
|
+function findpage(type: string) {
|
|
|
+ formInline.auditStatus = type;
|
|
|
api.agreementApi.queryByFeePage({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline }).then((res: any) => {
|
|
|
if (res.code == '200') {
|
|
|
- tableData.value = res.data.records;
|
|
|
pageInfo.value.pageNum = res.data.current;
|
|
|
pageInfo.value.pageSize = res.data.size;
|
|
|
pageInfo.value.total = res.data.total;
|
|
|
- if (res.data.records[0].approved == '0') {
|
|
|
+ if (type == '0') {
|
|
|
+ tableData1.value = res.data.records;
|
|
|
pendingReviewlength.value = res.data.total;
|
|
|
+ } else if (type == '1') {
|
|
|
+ tableData2.value = res.data.records;
|
|
|
+ passlength.value = res.data.total;
|
|
|
} else {
|
|
|
+ tableData3.value = res.data.records;
|
|
|
reviewRejectedlength.value = res.data.total;
|
|
|
}
|
|
|
} else {
|
|
|
@@ -162,6 +199,14 @@ function agreement() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+const getAgreement = () => {
|
|
|
+ api.agreementApi.agreementList({ pages: 1, size: 1000 }).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ agreementListALL.value = res.data.records;
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
const columns = [
|
|
|
{
|
|
|
prop: "agreementAbbreviation", label: "协议信息", width: '300',
|
|
|
@@ -172,7 +217,8 @@ const columns = [
|
|
|
{ prop: "effectiveTime", label: "生效时间", width: '200' },
|
|
|
{ prop: "failureTime", label: "失效时间", width: '200' },
|
|
|
{
|
|
|
- prop: "ruleDescription", label: "承保规则", width: '500'},
|
|
|
+ prop: "ruleDescription", label: "承保规则", width: '500'
|
|
|
+ },
|
|
|
{ prop: "productName", label: "险种", width: '120', },
|
|
|
{
|
|
|
prop: "costRules", label: "费用规则", width: '500',
|
|
|
@@ -207,31 +253,36 @@ const columns = [
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- prop: "isEnabled", label: "费用状态", width: '100', component: "Tag",
|
|
|
- formatter: (row: any) => {
|
|
|
- let name = getDict('is_enable').find(val => val.value == row.isEnabled).label
|
|
|
- if (name) {
|
|
|
- return { type: 'primary', text: name };
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "approved", label: "审核状态", width: '120', component: "Tag",
|
|
|
- formatter: (row: any) => {
|
|
|
- let name = getDict('audit_status').find(val => val.value == row.approved).label
|
|
|
- if (name) {
|
|
|
- return { type: 'warning', text: name };
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: "isEnabled", label: "费用状态", width: '100', component: "Tag",
|
|
|
+ formatter: (row: any) => {
|
|
|
+ let name = getDict('is_enable').find(val => val.value == row.isEnabled).label
|
|
|
+ if (name) {
|
|
|
+ return { type: 'primary', text: name };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "approved", label: "审核状态", width: '120', component: "Tag",
|
|
|
+ formatter: (row: any) => {
|
|
|
+ let name = getDict('audit_status').find(val => val.value == row.approved).label
|
|
|
+ if (name) {
|
|
|
+ return { type: 'warning', text: name };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
];
|
|
|
//分页事件
|
|
|
function getList(item: PageInfo) {
|
|
|
pageInfo.value.pageNum = item.pageNum;
|
|
|
pageInfo.value.pageSize = item.pageSize;
|
|
|
- findpage();
|
|
|
-
|
|
|
+ if (activeName.value == 'pendingReview') {
|
|
|
+ findpage("0");
|
|
|
+ } else if (activeName.value == 'pass') {
|
|
|
+ findpage("1");
|
|
|
+ } else {
|
|
|
+ findpage("2");
|
|
|
+ }
|
|
|
};
|
|
|
// 审核
|
|
|
const agreemenUpdate = async (item: any) => {
|
|
|
@@ -260,7 +311,7 @@ const ruleFeeEditSave = (data: object) => {
|
|
|
plain: true,
|
|
|
})
|
|
|
ruleFeeEditVisible.value = false;
|
|
|
- findpage();
|
|
|
+ agreementQuery();
|
|
|
} else {
|
|
|
}
|
|
|
});
|
|
|
@@ -351,55 +402,63 @@ const batchrejected = () => {
|
|
|
center: true,
|
|
|
inputType: "textarea",
|
|
|
inputPlaceholder: "请输入不通过原因",
|
|
|
- inputPattern: /^[\u4e00-\u9fa5,。!?、;:“”‘’《》【】()——]+$/,
|
|
|
- inputErrorMessage: '请输入中文',
|
|
|
})
|
|
|
.then(({ value }) => {
|
|
|
auditFailed(sysUpAndDownList.value, value)
|
|
|
})
|
|
|
}
|
|
|
//单一审核回调
|
|
|
-const auditOperation=(automatic:any,id:any)=>{
|
|
|
- auditSuccess([id],automatic)
|
|
|
+const auditOperation = (automatic: any, id: any) => {
|
|
|
+ auditSuccess([id], automatic)
|
|
|
}
|
|
|
//单一驳回回调
|
|
|
-const rejectOperation=(automatic:any,id:any,value:any)=>{
|
|
|
- auditFailed([id], value,automatic)
|
|
|
+const rejectOperation = (automatic: any, id: any, value: any) => {
|
|
|
+ auditFailed([id], value, automatic)
|
|
|
}
|
|
|
const agreementQuery = () => {
|
|
|
- findpage();
|
|
|
+ if (activeName.value == 'pendingReview') {
|
|
|
+ findpage("0");
|
|
|
+ } else if (activeName.value == 'pass') {
|
|
|
+ findpage("1");
|
|
|
+ } else {
|
|
|
+ findpage("2");
|
|
|
+ }
|
|
|
}
|
|
|
//审核不通过
|
|
|
-const auditFailed = async (list: string[], value: string,automatic?:boolean) => {
|
|
|
- await api.agreementApi.auditFailed({ids:list, reason:value,automatic:automatic}).then((res: any) => {
|
|
|
+const auditFailed = async (list: string[], value: string, automatic?: boolean) => {
|
|
|
+ await api.agreementApi.auditFailed({ ids: list, reason: value, automatic: automatic }).then((res: any) => {
|
|
|
if (res.code == '200') {
|
|
|
- findpage();
|
|
|
+ findpage("0");
|
|
|
+ findpage("1");
|
|
|
+ findpage("2");
|
|
|
ElMessage({
|
|
|
type: 'success',
|
|
|
message: res.msg,
|
|
|
plain: true,
|
|
|
})
|
|
|
- ruleFeeEditVisible.value=false;
|
|
|
- if(res.data){
|
|
|
- let info=tableData.value.find((val:any)=>val.costId==res.data);
|
|
|
+ ruleFeeEditVisible.value = false;
|
|
|
+ if (res.data) {
|
|
|
+ let info = tableData.value.find((val: any) => val.costId == res.data);
|
|
|
agreemenUpdate(info)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
// 审核通过
|
|
|
-const auditSuccess = async (list: string[],automatic?:boolean) => {
|
|
|
- await api.agreementApi.auditSuccess({ ids: list,automatic:automatic}).then((res: any) => {
|
|
|
+const auditSuccess = async (list: string[], automatic?: boolean) => {
|
|
|
+ await api.agreementApi.auditSuccess({ ids: list, automatic: automatic }).then((res: any) => {
|
|
|
if (res.code == '200') {
|
|
|
- findpage();
|
|
|
+ findpage("0");
|
|
|
+ findpage("1");
|
|
|
+ findpage("2");
|
|
|
ElMessage({
|
|
|
type: 'success',
|
|
|
message: res.msg,
|
|
|
plain: true,
|
|
|
})
|
|
|
- ruleFeeEditVisible.value=false;
|
|
|
- if(res.data){
|
|
|
- let info=tableData.value.find((val:any)=>val.costId==res.data);
|
|
|
+ ruleFeeEditVisible.value = false;
|
|
|
+ if (res.data) {
|
|
|
+ let info = tableData.value.find((val: any) => val.costId == res.data);
|
|
|
agreemenUpdate(info)
|
|
|
}
|
|
|
}
|
|
|
@@ -415,7 +474,13 @@ const resetForm = () => {
|
|
|
formInline.validState = "";
|
|
|
formInline.effectiveTime = [];
|
|
|
formInline.failureTime = [];
|
|
|
- findpage();
|
|
|
+ if (activeName.value == 'pendingReview') {
|
|
|
+ findpage("0");
|
|
|
+ } else if (activeName.value == 'pass') {
|
|
|
+ findpage("1");
|
|
|
+ } else {
|
|
|
+ findpage("2");
|
|
|
+ }
|
|
|
}
|
|
|
const getDeptTree = () => {
|
|
|
api.institutionApi.institutionList({}).then((res: any) => {
|
|
|
@@ -435,10 +500,13 @@ const ruleInfo = ref();//规则对象
|
|
|
const handleClick = (pane: any) => {
|
|
|
if (pane.props.name == 'pendingReview') {
|
|
|
formInline.auditStatus = '0';
|
|
|
- findpage()
|
|
|
+ findpage("0");
|
|
|
+ } else if (pane.props.name == 'pass') {
|
|
|
+ formInline.auditStatus = '1';
|
|
|
+ findpage("1");
|
|
|
} else {
|
|
|
formInline.auditStatus = '2';
|
|
|
- findpage();
|
|
|
+ findpage("2");
|
|
|
}
|
|
|
}
|
|
|
|