From 33f3506c93c0b84f6abc165e7d22d2bae1c8fcb1 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 23 十月 2025 22:21:33 +0800
Subject: [PATCH] feat: 接口
---
src/views/Home/components/InsureOrderInfoView.vue | 556 ++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 465 insertions(+), 91 deletions(-)
diff --git a/src/views/Home/components/InsureOrderInfoView.vue b/src/views/Home/components/InsureOrderInfoView.vue
index 7656760..bd96540 100644
--- a/src/views/Home/components/InsureOrderInfoView.vue
+++ b/src/views/Home/components/InsureOrderInfoView.vue
@@ -1,70 +1,97 @@
<template>
<LoadingLayout :loading="state.loading">
- <AppScrollContainer>
+ <AppContainer>
<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 label="淇濆崟鍙�:" prop="insureBillNo">
+ <div class="pro-from-item-read-content-wrapper" v-if="!!detail.insureBillNo">
+ {{ detail.insureBillNo }}
+ <el-button
+ type="primary"
+ link
+ @click="handleGoStampFiles(id)"
+ v-if="detail.productOnline && detail.anyPayComplete"
+ >璇︽儏</el-button
+ >
+ </div>
</ProFormItemV2>
</ProFormColItem>
<ProFormColItem :span="8">
- <ProFormItemV2 label="鐢熸晥鐘舵��:" prop="insuranceTypeCode">
- <ProFormRadio v-model="detail.insuranceType" :value-enum="insuranceTypeText" />
+ <ProFormItemV2 label="鐢熸晥鐘舵��:" prop="status">
+ <ProFormRadio v-model="detail.status" :value-enum="InsurancePolicyStatusEnumText" />
</ProFormItemV2>
</ProFormColItem>
</ProFormCol>
<ProFormCol>
<ProFormColItem :span="8">
- <ProFormItemV2 label="淇濋櫓璧锋湡:" prop="applyTime">
- <ProFormDatePicker v-model.trim="detail.createTime" format="YYYY-MM-DD HH:mm" />
+ <ProFormItemV2 label="淇濋櫓璧锋湡:" prop="effectStartTime">
+ <ProFormDatePicker v-model.trim="detail.effectStartTime" format="YYYY-MM-DD" />
</ProFormItemV2>
</ProFormColItem>
<ProFormColItem :span="8">
- <ProFormItemV2 label="淇濋櫓姝㈡湡:" prop="insuranceTypeCode">
- <ProFormDatePicker v-model.trim="detail.createTime" format="YYYY-MM-DD HH:mm" />
+ <ProFormItemV2 label="淇濋櫓姝㈡湡:" prop="effectEndTime">
+ <ProFormDatePicker v-model.trim="detail.effectEndTime" format="YYYY-MM-DD" />
</ProFormItemV2>
</ProFormColItem>
<ProFormColItem :span="8">
- <ProFormItemV2 label="鎶曚繚鏂瑰紡:" prop="insureWay">
- <ProFormRadio v-model="detail.insuranceType" :value-enum="insuranceTypeText" />
+ <ProFormItemV2 label="鎶曚繚鏂瑰紡:" prop="insurancePeriod">
+ <ProFormRadio v-model="detail.insurancePeriod" :value-enum="insuranceTypeText" />
</ProFormItemV2>
</ProFormColItem>
</ProFormCol>
<ProFormCol>
<ProFormColItem :span="8">
- <ProFormItemV2 label="鍙備繚鏈烘瀯:" prop="applyTime">
- <ProFormText v-model.trim="detail.orderNo" />
+ <ProFormItemV2 label="鍙備繚鏈烘瀯:" prop="insuranceOrg">
+ <!-- <ProFormRadio v-model="detail.insuranceOrg" :value-enum="InsuredInstitutionEnum" /> -->
+ <ProFormText v-model.trim="detail.insuranceOrg" />
</ProFormItemV2>
</ProFormColItem>
<ProFormColItem :span="8">
- <ProFormItemV2 label="鎶曚繚鏂规:" prop="applyTime">
- <ProFormText v-model.trim="detail.orderNo" />
+ <ProFormItemV2 label="鎶曚繚鏂规:" prop="insuranceScheme">
+ <!-- <ProFormRadio v-model="detail.insuranceScheme" :value-enum="InsuranceSchemeEnum" /> -->
+ <ProFormText v-model.trim="detail.insuranceScheme" />
</ProFormItemV2>
</ProFormColItem>
<ProFormColItem :span="8">
- <ProFormItemV2 label="鎶曚繚浜烘暟:" prop="numberOfFailed">
- <ProFormInputNumber v-model.trim="detail.incDecAmount" unit="浜�" />
+ <ProFormItemV2 label="鎶曚繚浜烘暟:" prop="insureCount">
+ <ProFormInputNumber v-model.trim="detail.insureCount" unit="浜�" />
+ </ProFormItemV2>
+ </ProFormColItem>
+ </ProFormCol>
+ <ProFormCol v-if="detail.productOnline">
+ <ProFormColItem :span="8">
+ <ProFormItemV2 label="鎬讳繚璐�:" prop="amount">
+ <ProFormInputNumber v-model="detail.amount" unit="鍏�" formatValue="money" />
+ </ProFormItemV2>
+ </ProFormColItem>
+ <ProFormColItem :span="8">
+ <ProFormItemV2 label="鎬讳繚棰�:" prop="sumInsured">
+ <ProFormInputNumber
+ v-model.trim="detail.sumInsured"
+ unit="鍏�"
+ formatValue="money"
+ />
</ProFormItemV2>
</ProFormColItem>
</ProFormCol>
<ProFormCol>
<ProFormColItem :span="8">
- <ProFormItemV2 label="鎶曚繚浜�:" prop="companyName">
- <ProFormText v-model.trim="detail.orderNo" />
+ <ProFormItemV2 label="鎶曚繚浜�:" prop="insurerName">
+ <ProFormText v-model.trim="detail.insurerName" />
</ProFormItemV2>
</ProFormColItem>
<ProFormColItem :span="8">
- <ProFormItemV2 label="琚繚浜�:" prop="insuranceTypeCode">
- <ProFormText v-model.trim="detail.orderNo" />
+ <ProFormItemV2 label="琚繚浜�:" prop="policyerName">
+ <ProFormText v-model.trim="detail.policyerName" />
</ProFormItemV2>
</ProFormColItem>
</ProFormCol>
</ProForm>
</ChunkCell>
- <ChunkCell title="浜哄憳淇℃伅">
- <template #titleRight>
+ <ChunkCell title="浜哄憳淇℃伅" class="full-table-chunk">
+ <template #titleRight v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect">
<el-button type="primary" @click="handleBatchChange">鎵规敼鐢宠</el-button>
</template>
<ProTableQueryFilterBar @on-reset="reset">
@@ -73,34 +100,87 @@
<SearchInput
v-model="extraParamState.keyWord"
style="width: 300px"
- placeholder="浜哄憳濮撳悕/韬唤璇佸彿/鎵嬫満鍙�"
- @on-click-search="getBatchRefundInfoDetail"
+ placeholder="濮撳悕/韬唤璇佸彿/鎵嬫満鍙�"
+ @on-click-search="getInsuranceStaffList"
>
</SearchInput>
</QueryFilterItem>
</template>
<template #btn>
- <el-button @click="handleTemplateDownload()" link type="primary">妯℃澘涓嬭浇</el-button>
- <el-button @click="handleImport()" type="primary">瀵煎叆</el-button>
- <el-button @click="handleClear()" type="primary">娓呯┖鏁版嵁</el-button>
- <el-button @click="handleDownloadPerson()" type="primary">浜哄憳娓呭崟涓嬭浇</el-button>
- <el-button @click="handleDownloadOrder()" type="primary">淇濆崟涓嬭浇</el-button>
+ <template v-if="detail.productOnline">
+ <el-button
+ v-if="detail.auditStatus === InsurancePolicyAuditStatusEnum.Pass"
+ @click="handleSupplySubmit()"
+ type="primary"
+ >琛ユ彁</el-button
+ >
+ <el-button @click="handleExport(InsuranceDetailStatusEnum.Effecting)" type="primary"
+ >瀵煎嚭鍦ㄤ繚浜哄憳</el-button
+ >
+ <el-button @click="handleExport(InsuranceDetailStatusEnum.Fail)" type="primary"
+ >瀵煎嚭閿欒浜哄憳</el-button
+ >
+ <template v-if="detail.auditStatus === InsurancePolicyAuditStatusEnum.WaitAdd">
+ <BlFileUpload
+ :limitFileSize="10"
+ accept="xls,xlsx"
+ :showTip="false"
+ :show-file-list="false"
+ :on-success="handleUploadSuccess"
+ style="margin-right: 10px; margin-left: 10px"
+ >
+ <template #default>
+ <el-button icon="Plus" type="primary">瀵煎叆</el-button>
+ </template>
+ </BlFileUpload>
+ <el-button @click="handleClear()" type="primary">娓呯┖鏁版嵁</el-button>
+ </template>
+ <template v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect">
+ <el-button @click="handleGoStampFiles(id)" type="primary">涓嬭浇淇濆崟</el-button>
+ <el-button @click="handleGoDownloadInvoice(id)" type="primary">涓嬭浇鍙戠エ</el-button>
+ </template>
+ </template>
+ <template v-else>
+ <template v-if="detail.status === InsurancePolicyStatusEnum.WaitEffect">
+ <el-button @click="handleTemplateDownload()" link type="primary"
+ >妯℃澘涓嬭浇</el-button
+ >
+ <BlFileUpload
+ v-if="detail.auditStatus !== InsurancePolicyAuditStatusEnum.Pass"
+ :limitFileSize="10"
+ accept="xls,xlsx"
+ :showTip="false"
+ :show-file-list="false"
+ :on-success="handleUploadSuccess"
+ style="margin-right: 10px; margin-left: 10px"
+ >
+ <template #default>
+ <el-button icon="Plus" type="primary">瀵煎叆</el-button>
+ </template>
+ </BlFileUpload>
+ <el-button @click="handleClear()" type="primary">娓呯┖鏁版嵁</el-button>
+ </template>
+ <template v-else>
+ <el-button @click="handleExport(null)" type="primary">涓嬭浇浜哄憳娓呭崟</el-button>
+ <el-button @click="handleDownloadOrder()" type="primary">涓嬭浇淇濆崟</el-button>
+ </template>
+ </template>
</template>
</ProTableQueryFilterBar>
- <ProTableV2
- v-bind="proTableProps"
- :columns="column"
- :operationBtns="operationBtns"
- :auto-height="false"
- ref="proTable"
- :tableProps="{
- maxHeight: '400px',
- }"
- >
- </ProTableV2>
+ <div class="full-table-chunk-table">
+ <ProTableV2
+ v-bind="proTableProps"
+ :columns="column"
+ :operationBtns="operationBtns"
+ ref="proTable"
+ >
+ </ProTableV2>
+ </div>
</ChunkCell>
<ChangePersonInfoDialog v-bind="dialogProps"></ChangePersonInfoDialog>
- </AppScrollContainer>
+ <InsureClaimDetailDialog v-bind="dialogInsureClaimProps"></InsureClaimDetailDialog>
+ <UploadInsurePersonDialog v-bind="dialogSupplyProps" isSupply />
+ </AppContainer>
</LoadingLayout>
</template>
@@ -124,12 +204,33 @@
ProFormRadio,
defineOperationBtns,
useFormDialog,
+ BlFileUpload,
+ UploadUserFile,
+ XLSXUtils,
} from '@bole-core/components';
-import { InsuranceOrderTempPath, insuranceTypeText } from '@/constants';
+import {
+ InsuranceOrderTempPath,
+ insuranceTypeText,
+ InsurancePolicyStatusEnum,
+ InsurancePolicyStatusEnumText,
+ InsurancePolicyAuditStatusEnum,
+ InsuranceDetailStatusEnumText,
+ InsuranceDetailStatusEnum,
+} from '@/constants';
import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue';
+import InsureClaimDetailDialog from './InsureClaimDetailDialog.vue';
import * as insuranceOrderServices from '@/services/api/InsuranceOrder';
+import * as insuranceClaimServices from '@/services/api/InsuranceClaim';
import { useQuery, useQueryClient } from '@tanstack/vue-query';
-import { downloadFileByUrl, OrderInputType } from '@bole-core/core';
+import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core';
+import { setOSSLink } from '@/utils';
+import dayjs from 'dayjs';
+import {
+ useInsureActions,
+ useInsureProductSchemeAllList,
+ useUserInsureProductSetting,
+} from '@/hooks';
+import UploadInsurePersonDialog from './UploadInsurePersonDialog.vue';
defineOptions({
name: 'InsureOrderInfoView',
@@ -143,53 +244,88 @@
},
{
id: '2',
- enCode: 'name',
+ enCode: 'gender',
name: '鎬у埆',
+ width: 80,
},
{
id: '3',
- enCode: 'name',
+ enCode: 'certType',
name: '璇佷欢绫诲瀷',
+ width: 100,
},
{
id: '4',
- enCode: 'idNumber',
+ enCode: 'certNo',
name: '璇佷欢鍙风爜',
+ width: 180,
},
{
id: '5',
- enCode: 'idNumber',
+ enCode: 'jobName',
name: '闆囧憳宸ョ',
},
{
+ id: '51',
+ enCode: 'occupationType',
+ name: '鑱屼笟绫诲瀷',
+ },
+ {
+ id: '52',
+ enCode: 'occupationCode',
+ name: '鑱屼笟鐮佸��',
+ },
+ {
id: '6',
- enCode: 'idNumber',
+ enCode: 'userEmploer',
name: '鐢ㄥ伐鍗曚綅',
},
{
id: '7',
- enCode: 'idNumber',
+ enCode: 'address',
name: '鐢ㄥ伐鍦扮偣',
},
{
id: '8',
- enCode: 'idNumber',
+ enCode: 'age',
name: '骞撮緞',
+ width: 80,
},
{
id: '9',
- enCode: 'idNumber',
+ enCode: 'birthDay',
name: '鍑虹敓鏃ユ湡',
+ width: 120,
},
{
id: '10',
- enCode: 'idNumber',
+ enCode: 'phone',
name: '鎵嬫満鍙风爜',
+ width: 140,
+ },
+ {
+ id: '101',
+ enCode: 'payOrder',
+ name: '鎵规鍙�',
+ width: 140,
+ },
+ {
+ id: '102',
+ enCode: 'status',
+ name: '鎶曚繚鐘舵��',
+ width: 140,
+ },
+ {
+ id: '103',
+ enCode: 'auditRemark',
+ name: '澶囨敞',
+ width: 140,
},
{
id: '11',
- enCode: 'idNumber',
+ enCode: 'claimCount',
name: '鐞嗚禂',
+ width: 100,
},
];
@@ -202,9 +338,18 @@
emits: {
onClick: (role) => handleChangeInfo(role),
},
- // extraProps: {
- // hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile,
- // },
+ extraProps: {
+ hide: (row: API.GetInsuranceStaffPageTemplate) => {
+ if (detail.value?.productOnline) {
+ return detail.value?.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAdd;
+ } else {
+ return (
+ detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect ||
+ detail.value?.auditStatus === InsurancePolicyAuditStatusEnum.Pass
+ );
+ }
+ },
+ },
},
{
data: {
@@ -212,11 +357,12 @@
name: '鐞嗚禂璇︽儏',
},
emits: {
- onClick: (role) => handleInsureClaimDetail(role),
+ onClick: (role) => handleDetail(role),
},
- // extraProps: {
- // hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile,
- // },
+ extraProps: {
+ hide: (row: API.GetInsuranceStaffPageTemplate) =>
+ !(row.claimCount && detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect),
+ },
},
]);
@@ -230,16 +376,16 @@
const state = reactive({ ...BaseState });
const { data: detail, isLoading } = useQuery({
- queryKey: ['insuranceOrderServices/getInsuranceOrderDetail', id],
+ queryKey: ['insuranceOrderServices/getInsurancePolicyHeadDto', id],
queryFn: async () => {
- return await insuranceOrderServices.getInsuranceOrderDetail(
+ return await insuranceOrderServices.getInsurancePolicyHeadDto(
{ id: id },
{
showLoading: !state.loading,
}
);
},
- placeholderData: () => ({} as API.InsuranceOrderListOutput),
+ placeholderData: () => ({} as API.GetInsurancePageOutput),
enabled: !!id,
});
@@ -247,14 +393,14 @@
onMounted(async () => {
await queryClient.ensureQueryData({
- queryKey: ['insuranceOrderServices/getInsuranceOrderDetail', id],
+ queryKey: ['insuranceOrderServices/getInsurancePolicyHeadDto', id],
});
- await getBatchRefundInfoDetail();
+ await getInsuranceStaffList();
state.loading = false;
});
const {
- getDataSource: getBatchRefundInfoDetail,
+ getDataSource: getInsuranceStaffList,
proTableProps,
paginationState,
extraParamState,
@@ -262,18 +408,19 @@
} = useTable(
async ({ pageIndex, pageSize }, extraParamState) => {
try {
- let params: API.QueryInsuranceOrderPageInput = {
+ let params: API.GetInsuranceStaffListInput = {
pageModel: {
rows: pageSize,
page: pageIndex,
orderInput: extraParamState.orderInput,
},
condition: extraParamState.keyWord,
- // insurePolicyOperateHistoryId: id,
+ insurancePolicyId: id,
};
- let res = await insuranceOrderServices.getInsuranceOrderPage(params, {
+ let res = await insuranceOrderServices.getInsuranceStaffList(params, {
showLoading: !state.loading,
});
+ console.log('res: ', res);
return res;
} catch (error) {}
},
@@ -282,55 +429,282 @@
keyWord: '',
orderInput: [{ property: 'id', order: OrderInputType.Asc }],
},
- columnsRenderProps: {},
+ columnsRenderProps: {
+ status: {
+ type: 'enum',
+ valueEnum: InsuranceDetailStatusEnumText,
+ },
+ },
}
);
function handleTemplateDownload() {
downloadFileByUrl(InsuranceOrderTempPath, '浜哄憳淇℃伅妯℃澘');
}
-function handleClear() {}
-function handleImport() {}
+async function handleClear() {
+ try {
+ if (paginationState.total === 0) {
+ Message.warnMessage('娌℃湁闇�瑕佹竻绌虹殑鏁版嵁~');
+ return;
+ }
+ await Message.tipMessage('鏄惁娓呯┖浜哄憳淇℃伅');
+ let res = await insuranceOrderServices.clearInsuranceStaffData({
+ id: id,
+ });
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getInsuranceStaffList(paginationState.pageIndex);
+ }
+ } catch (error) {}
+}
+async function handleUploadSuccess(response: UploadUserFile) {
+ try {
+ let res = await insuranceOrderServices.importInsDetailStaffToList({
+ id: id,
+ url: response.url,
+ });
+ if (res?.length > 0) {
+ try {
+ await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
+ XLSXUtils.exportToXLSX({
+ workbookDataList: res,
+ fileName: '閿欒浜哄憳鍚嶅崟',
+ workbookHeaderMap: {
+ name: '闆囧憳濮撳悕',
+ sex: '鎬у埆',
+ certType: '璇佷欢绫诲瀷',
+ certNo: '璇佷欢鍙风爜',
+ jobName: '闆囧憳宸ョ',
+ useEmploer: '鐢ㄥ伐鍗曚綅',
+ address: '鐢ㄥ伐鍦扮偣',
+ note: '澶囨敞',
+ },
+ });
+ } catch (error) {}
+ }
+ queryClient.invalidateQueries({
+ queryKey: ['insuranceOrderServices/getInsuranceStaffList'],
+ });
+ getInsuranceStaffList();
+ } catch (error) {}
+}
-function handleDownloadPerson() {}
-function handleDownloadOrder() {}
+function handleDownloadOrder() {
+ downloadFileByUrl(setOSSLink(detail.value?.insureBillUrl));
+}
+
+const { handleGoDownloadInvoice, handleGoStampFiles } = useInsureActions();
+
function handleBatchChange() {
+ if (
+ dayjs(detail.value?.effectEndTime).isBefore(dayjs()) ||
+ dayjs(detail.value?.effectEndTime).isSame(dayjs(), 'day')
+ ) {
+ Message.errorMessage('淇濋櫓浠婂ぉ鍒版湡锛屾棤娉曟壒鏀�');
+ return;
+ }
router.push({
name: 'BatchChange',
params: {
id: id,
},
+ query: {
+ insurerName: detail.value?.insurerName ?? '',
+ insureBillNo: detail.value?.insureBillNo ?? '',
+ effectEndTime: detail.value?.effectEndTime ?? '',
+ },
});
}
-const { dialogProps, handleEdit, editForm } = useFormDialog({
- onConfirm: changeInfo,
+const { dialogProps, handleEdit, editForm, dialogState } = useFormDialog({
+ onConfirm: updateInsuranceStaffInfo,
defaultFormParams: {
+ id: '',
name: '',
+ idNumber: '',
+ phone: '',
+ },
+ closeAfterConfirm: false,
+});
+
+function handleChangeInfo(row: API.GetInsuranceStaffPageTemplate) {
+ handleEdit({
+ id: row.id,
+ name: row.name,
+ idNumber: row.certNo,
+ phone: row.phone,
+ });
+}
+
+async function updateInsuranceStaffInfo() {
+ try {
+ let params: API.UpdateInsuranceStaffInfoInput = {
+ insurancePolicyId: id,
+ id: editForm.id,
+ name: editForm.name,
+ idNumber: editForm.idNumber,
+ phone: editForm.phone,
+ };
+ let res = await insuranceOrderServices.updateInsuranceStaffInfo(params);
+ if (res) {
+ Message.successMessage('淇敼鎴愬姛');
+ dialogState.dialogVisible = false;
+ getInsuranceStaffList(paginationState.pageIndex);
+ }
+ } catch (error) {}
+}
+
+const { dialogProps: dialogInsureClaimProps, handleEdit: handleInsureClaimEdit } = useFormDialog({
+ defaultFormParams: {
+ id: '',
+ routeId: '',
+ staffList: [] as API.InsuranceClaimDetailOutput[],
},
});
-function handleChangeInfo(row: API.InsuranceOrderListOutput) {
- handleEdit({
- name: row.name,
+async function getInsuranceClaimDetailList(id: string) {
+ try {
+ return await insuranceClaimServices.getInsuranceClaimDetailList({ id: id });
+ } catch (error) {}
+}
+
+async function handleDetail(row: API.GetInsuranceStaffPageTemplate) {
+ try {
+ const res = await getInsuranceClaimDetailList(row.id);
+ handleInsureClaimEdit({
+ id: row.id,
+ staffList: res,
+ routeId: id,
+ });
+ } catch (error) {}
+}
+
+async function handleExport(status: InsuranceDetailStatusEnum) {
+ try {
+ if (paginationState.total === 0) {
+ Message.warnMessage('娌℃湁鏁版嵁鍙互瀵煎嚭鍝');
+ return;
+ }
+ let res = await insuranceOrderServices.getInsuranceStaffListExport(
+ { insurancePolicyId: id, status: status },
+ {
+ responseType: 'blob',
+ getResponse: true,
+ }
+ );
+ if (res) {
+ downloadFile(res.data, `浜哄憳娓呭崟`, 'xlsx');
+ }
+ } catch (error) {}
+}
+
+const { getInsureProductIdByIdNumber } = useUserInsureProductSetting();
+const { getInsureProductSchemeByCode } = useInsureProductSchemeAllList({
+ insureProductId: computed(() => getInsureProductIdByIdNumber(detail.value.productIdNumber)),
+});
+
+function handleSupplySubmit() {
+ handleSupplyAdd({
+ serialNum: detail.value.serialNum,
+ productIdNumber: detail.value.productIdNumber,
+ productSchemeIdNumber: getInsureProductSchemeByCode(detail.value.productSchemeCode)?.idNumber,
+ effectStartTime: detail.value.effectStartTime,
+ effectEndTime: detail.value.effectEndTime,
+ isOnLineInsurance: detail.value.productOnline ?? false,
});
}
-async function changeInfo() {}
+const {
+ dialogProps: dialogSupplyProps,
+ handleAdd: handleSupplyAdd,
+ editForm: supplyForm,
+ dialogState: dialogSupplyState,
+} = useFormDialog({
+ onConfirm: supplySubmit,
+ defaultFormParams: {
+ serialNum: '',
+ url: [] as UploadUserFile[],
+ productIdNumber: '',
+ productSchemeIdNumber: '',
+ effectStartTime: dayjs().add(1, 'day').format('YYYY-MM-DD'),
+ effectEndTime: '',
+ isOnLineInsurance: false,
+ },
+ closeAfterConfirm: false,
+});
-function handleInsureClaimDetail(row: API.InsuranceOrderListOutput) {
- router.push({
- name: 'InsuranceClaimDetail',
- params: {
- id: row.id,
- },
- query: {
- fromRoute: 'InsuranceOrderDetail',
- },
- });
+async function supplySubmit() {
+ try {
+ let params: API.FillInsStaffToListFrontInput = {
+ insurancePolicyId: id,
+ url: supplyForm.url?.[0]?.path,
+ };
+ let res = await insuranceOrderServices.fillInsStaffToList(params, {
+ timeout: 60 * 1000 * 10,
+ });
+ if (res) {
+ // await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
+ try {
+ if (res.errorList.length > 0) {
+ await Message.tipMessage(
+ `鎬绘姇淇濅汉鏁�${res.importAllCount}浜猴紝鎶曚繚鎴愬姛${res.successCount}浜猴紝鎶曚繚澶辫触${res.errorList.length}浜烘槸鍚﹀鍑烘姇淇濆け璐ヤ汉鍛樻竻鍗曪紵`,
+ {
+ confirmButtonText: '瀵煎嚭',
+ }
+ );
+ XLSXUtils.exportToXLSX({
+ workbookDataList: res.errorList,
+ fileName: '閿欒浜哄憳鍚嶅崟',
+ workbookHeaderMap: {
+ name: '闆囧憳濮撳悕',
+ sex: '鎬у埆',
+ certType: '璇佷欢绫诲瀷',
+ certNo: '璇佷欢鍙风爜',
+ jobName: '闆囧憳宸ョ',
+ useEmploer: '鐢ㄥ伐鍗曚綅',
+ address: '鐢ㄥ伐鍦扮偣',
+ note: '澶囨敞',
+ },
+ });
+ } else {
+ await Message.tipMessage(
+ `鎬绘姇淇濅汉鏁�${res.importAllCount}浜猴紝鎶曚繚鎴愬姛${res.successCount}浜篳,
+ {
+ showCancelButton: false,
+ }
+ );
+ }
+ } catch (error) {}
+ dialogSupplyState.dialogVisible = false;
+ getInsuranceStaffList(paginationState.pageIndex);
+ }
+ } catch (error) {}
}
</script>
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
+
+.full-table-chunk {
+ display: flex;
+ min-height: 0;
+ flex: 1;
+ flex-direction: column;
+
+ :deep() {
+ .chunk-cell-content {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ min-height: 0;
+ }
+ }
+
+ .full-table-chunk-table {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ min-height: 0;
+ }
+}
</style>
--
Gitblit v1.9.1