|
|
@@ -73,6 +73,7 @@ onBeforeMount(async () => {
|
|
|
await loadDicts(['agreement_type', 'valid_status', 'is_enable', 'with_tax']);//获取多个字典
|
|
|
findpage();//列表数据
|
|
|
getDeptTree();
|
|
|
+ initCompany();
|
|
|
agreement_type.value = getDict('agreement_type');//协议类型
|
|
|
valid_status.value = getDict('valid_status');//生效状态
|
|
|
is_enable.value = getDict('is_enable');//协议状态
|
|
|
@@ -90,6 +91,13 @@ const tableData = ref([
|
|
|
const sysUpAndDownList = ref<string[]>([])//选中id
|
|
|
const provinceoptions = ref<string[]>([])//省市区回显数据
|
|
|
const deptOptions = ref()//机构数据
|
|
|
+let company_list = ref()
|
|
|
+const companyIdprops = {
|
|
|
+ expandTrigger: 'hover' as const,
|
|
|
+ value: 'id',
|
|
|
+ label: 'nameSimple',
|
|
|
+ checkStrictly: true,
|
|
|
+}
|
|
|
const agreement_type = ref();
|
|
|
const valid_status = ref();
|
|
|
const is_enable = ref();
|
|
|
@@ -129,10 +137,10 @@ const fields = ref([
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: "保险公司", model: "companyId", type: "select", placeholder: "选择保险公司",
|
|
|
+ label: "保险公司", model: "companyId", type: "cascader", placeholder: "选择保险公司", options: company_list, props: companyIdprops, placement: 'left'
|
|
|
},
|
|
|
{
|
|
|
- label: "协议类型", model: "agreementType", type: "select", placeholder: "选择保险公司", options: agreement_type,
|
|
|
+ label: "协议类型", model: "agreementType", type: "select", placeholder: "选择协议类型", options: agreement_type,
|
|
|
},
|
|
|
{
|
|
|
label: "生效状态", model: "validStatus", type: "select", placeholder: "选择生效状态", options: valid_status,
|
|
|
@@ -159,9 +167,26 @@ const fields = ref([
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
+// 保险公司
|
|
|
+const initCompany = () => {
|
|
|
+ api.agreementApi.findTree({ name: "", systemCode: localStorage.getItem('login_system') }).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ company_list.value = res.data;
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: res.msg,
|
|
|
+ plain: true,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
//数据查询
|
|
|
function findpage() {
|
|
|
- api.agreementApi.agreementList({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline }).then((res: any) => {
|
|
|
+ let query = {...formInline}
|
|
|
+ query.companyId = query.companyId[query.companyId.length - 1]
|
|
|
+ api.agreementApi.agreementList({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...query }).then((res: any) => {
|
|
|
if (res.code == '200') {
|
|
|
tableData.value = res.data.records;
|
|
|
pageInfo.value.pageNum = res.data.current;
|
|
|
@@ -434,6 +459,21 @@ const sysUpAndDown = async (type: string, list?: string[]) => {
|
|
|
}
|
|
|
const resetForm = () => {
|
|
|
formInline.searchValue = '';
|
|
|
+ formInline.deptId = '';
|
|
|
+ formInline.companyId = '';
|
|
|
+ formInline.agreementType = '';
|
|
|
+ formInline.validStatus = '';
|
|
|
+ formInline.isEnable = '';
|
|
|
+ formInline.withTax = '';
|
|
|
+ formInline.dockingPerson = '';
|
|
|
+ formInline.attributionName = '';
|
|
|
+ formInline.takeStartDate = '';
|
|
|
+ formInline.takeEndDate = '';
|
|
|
+ formInline.loseStartDate = '';
|
|
|
+ formInline.loseEndDate = '';
|
|
|
+ formInline.isExternal = '1';
|
|
|
+ formInline.value1 = [];
|
|
|
+ formInline.value2 = [];
|
|
|
provinceoptions.value = [];
|
|
|
findpage();
|
|
|
}
|