<template>
|
<LoadingLayout :loading="state.loading">
|
<AppScrollContainer>
|
<ChunkCell title="">
|
<ProForm :model="detail" ref="formRef" label-width="120px" :is-read="true">
|
<ProFormCol>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="保单号:" prop="orderNo">
|
<ProFormText v-model.trim="detail.orderNo" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="生效状态:" prop="insuranceTypeCode">
|
<ProFormRadio v-model="detail.insuranceType" :value-enum="insuranceTypeText" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
</ProFormCol>
|
<ProFormCol>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="保险起期:" prop="applyTime">
|
<ProFormDatePicker v-model.trim="detail.createTime" format="YYYY-MM-DD HH:mm" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="保险止期:" prop="insuranceTypeCode">
|
<ProFormDatePicker v-model.trim="detail.createTime" format="YYYY-MM-DD HH:mm" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="投保方式:" prop="insureWay">
|
<ProFormRadio v-model="detail.insuranceType" :value-enum="insuranceTypeText" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
</ProFormCol>
|
<ProFormCol>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="参保机构:" prop="applyTime">
|
<ProFormText v-model.trim="detail.orderNo" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="投保方案:" prop="applyTime">
|
<ProFormText v-model.trim="detail.orderNo" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="投保人数:" prop="numberOfFailed">
|
<ProFormInputNumber v-model.trim="detail.incDecAmount" unit="人" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
</ProFormCol>
|
<ProFormCol>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="投保人:" prop="companyName">
|
<ProFormText v-model.trim="detail.orderNo" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
<ProFormColItem :span="8">
|
<ProFormItemV2 label="被保人:" prop="insuranceTypeCode">
|
<ProFormText v-model.trim="detail.orderNo" />
|
</ProFormItemV2>
|
</ProFormColItem>
|
</ProFormCol>
|
</ProForm>
|
</ChunkCell>
|
<ChunkCell title="人员信息">
|
<template #titleRight>
|
<el-button type="primary" @click="handleBatchChange">批改申请</el-button>
|
</template>
|
<ProTableQueryFilterBar @on-reset="reset">
|
<template #query>
|
<QueryFilterItem>
|
<SearchInput
|
v-model="extraParamState.keyWord"
|
style="width: 300px"
|
placeholder="人员姓名/身份证号/手机号"
|
@on-click-search="getBatchRefundInfoDetail"
|
>
|
</SearchInput>
|
</QueryFilterItem>
|
</template>
|
<template #btn>
|
<el-button @click="handleTemplateDownload()" icon="Download" type="primary"
|
>模板下载</el-button
|
>
|
<el-button @click="handleImport()" icon="Download" type="primary">导入</el-button>
|
<el-button @click="handleClear()" icon="Download" type="primary">清空数据</el-button>
|
<el-button @click="handleDownloadPerson()" icon="Download" type="primary"
|
>人员清单下载</el-button
|
>
|
<el-button @click="handleDownloadOrder()" icon="Download" type="primary"
|
>保单下载</el-button
|
>
|
</template>
|
</ProTableQueryFilterBar>
|
<ProTableV2
|
v-bind="proTableProps"
|
:columns="column"
|
:operationBtns="operationBtns"
|
:auto-height="false"
|
ref="proTable"
|
:tableProps="{
|
maxHeight: '400px',
|
}"
|
>
|
</ProTableV2>
|
</ChunkCell>
|
<ChangePersonInfoDialog v-bind="dialogProps"></ChangePersonInfoDialog>
|
</AppScrollContainer>
|
</LoadingLayout>
|
</template>
|
|
<script setup lang="ts">
|
import {
|
LoadingLayout,
|
AppScrollContainer,
|
ProForm,
|
ProFormItemV2,
|
ChunkCell,
|
ProFormText,
|
ProTableQueryFilterBar,
|
QueryFilterItem,
|
SearchInput,
|
ProFormCol,
|
ProFormColItem,
|
ProFormDatePicker,
|
ProFormInputNumber,
|
useTable,
|
ProTableV2,
|
ProFormRadio,
|
defineOperationBtns,
|
useFormDialog,
|
} from '@bole-core/components';
|
import { insuranceTypeText } from '@/constants';
|
import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue';
|
import * as insuranceOrderServices from '@/services/api/InsuranceOrder';
|
import { useQuery, useQueryClient } from '@tanstack/vue-query';
|
import { OrderInputType } from '@bole-core/core';
|
|
defineOptions({
|
name: 'InsureOrderInfoView',
|
});
|
|
const column: API.CustomModuleColumnDto[] = [
|
{
|
id: '1',
|
enCode: 'name',
|
name: '姓名',
|
},
|
{
|
id: '2',
|
enCode: 'name',
|
name: '性别',
|
},
|
{
|
id: '3',
|
enCode: 'name',
|
name: '证件类型',
|
},
|
{
|
id: '4',
|
enCode: 'idNumber',
|
name: '证件号码',
|
},
|
{
|
id: '5',
|
enCode: 'idNumber',
|
name: '雇员工种',
|
},
|
{
|
id: '6',
|
enCode: 'idNumber',
|
name: '用工单位',
|
},
|
{
|
id: '7',
|
enCode: 'idNumber',
|
name: '用工地点',
|
},
|
{
|
id: '8',
|
enCode: 'idNumber',
|
name: '年龄',
|
},
|
{
|
id: '9',
|
enCode: 'idNumber',
|
name: '出生日期',
|
},
|
{
|
id: '10',
|
enCode: 'idNumber',
|
name: '手机号码',
|
},
|
{
|
id: '11',
|
enCode: 'idNumber',
|
name: '理赔',
|
},
|
];
|
|
const operationBtns = defineOperationBtns([
|
{
|
data: {
|
enCode: 'changeInfoBtn',
|
name: '修改信息',
|
},
|
emits: {
|
onClick: (role) => handleChangeInfo(role),
|
},
|
extraProps: {
|
hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile,
|
},
|
},
|
{
|
data: {
|
enCode: 'insureClaimDetailBtn',
|
name: '理赔详情',
|
},
|
emits: {
|
onClick: (role) => handleInsureClaimDetail(),
|
},
|
extraProps: {
|
hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile,
|
},
|
},
|
]);
|
|
const route = useRoute();
|
const router = useRouter();
|
const id = route.params.id as string;
|
const BaseState = {
|
loading: true,
|
};
|
|
const state = reactive({ ...BaseState });
|
|
const { data: detail, isLoading } = useQuery({
|
queryKey: ['insuranceOrderServices/getInsuranceOrderDetail', id],
|
queryFn: async () => {
|
return await insuranceOrderServices.getInsuranceOrderDetail(
|
{ id: id },
|
{
|
showLoading: !state.loading,
|
}
|
);
|
},
|
placeholderData: () => ({} as API.InsuranceOrderListOutput),
|
enabled: !!id,
|
});
|
|
const queryClient = useQueryClient();
|
|
onMounted(async () => {
|
await queryClient.ensureQueryData({
|
queryKey: ['insuranceOrderServices/getInsuranceOrderDetail', id],
|
});
|
await getBatchRefundInfoDetail();
|
state.loading = false;
|
});
|
|
const {
|
getDataSource: getBatchRefundInfoDetail,
|
proTableProps,
|
paginationState,
|
extraParamState,
|
reset,
|
} = useTable(
|
async ({ pageIndex, pageSize }, extraParamState) => {
|
try {
|
let params: API.QueryInsuranceOrderPageInput = {
|
pageModel: {
|
rows: pageSize,
|
page: pageIndex,
|
orderInput: extraParamState.orderInput,
|
},
|
condition: extraParamState.keyWord,
|
// insurePolicyOperateHistoryId: id,
|
};
|
let res = await insuranceOrderServices.getInsuranceOrderPage(params, {
|
showLoading: !state.loading,
|
});
|
return res;
|
} catch (error) {}
|
},
|
{
|
defaultExtraParams: {
|
keyWord: '',
|
orderInput: [{ property: 'id', order: OrderInputType.Asc }],
|
},
|
columnsRenderProps: {},
|
}
|
);
|
|
function handleTemplateDownload() {}
|
function handleClear() {}
|
function handleImport() {}
|
|
function handleDownloadPerson() {}
|
function handleDownloadOrder() {}
|
function handleBatchChange() {
|
// router.push({
|
// name: 'BatchChange',
|
// params: {
|
// id: id,
|
// },
|
// });
|
}
|
|
const { dialogProps, handleEdit, editForm } = useFormDialog({
|
onConfirm: changeInfo,
|
defaultFormParams: {
|
name: '',
|
},
|
});
|
|
function handleChangeInfo(row: API.InsuranceOrderListOutput) {
|
handleEdit({
|
name: row.name,
|
});
|
}
|
|
async function changeInfo() {}
|
|
function handleInsureClaimDetail() {}
|
</script>
|
|
<style lang="scss" scoped>
|
@use '@/style/common.scss' as *;
|
</style>
|