From 92034e64c9bb28c262b0fcb90660b58328aa2f5e Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 23 十月 2025 14:35:05 +0800
Subject: [PATCH] fix: bug
---
src/views/Home/components/InsureOrderInfoView.vue | 201 +++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 167 insertions(+), 34 deletions(-)
diff --git a/src/views/Home/components/InsureOrderInfoView.vue b/src/views/Home/components/InsureOrderInfoView.vue
index 8772799..fba9f62 100644
--- a/src/views/Home/components/InsureOrderInfoView.vue
+++ b/src/views/Home/components/InsureOrderInfoView.vue
@@ -60,6 +60,22 @@
</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="insurerName">
@@ -94,8 +110,41 @@
</QueryFilterItem>
</template>
<template #btn>
- <template v-if="detail.status === InsurancePolicyStatusEnum.WaitEffect">
- <template v-if="!detail.productOnline">
+ <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
>
@@ -113,18 +162,6 @@
</template>
</BlFileUpload>
<el-button @click="handleClear()" type="primary">娓呯┖鏁版嵁</el-button>
- </template>
- </template>
- <template v-else>
- <template v-if="detail.productOnline">
- <el-button @click="handleExport(InsuranceDetailStatusEnum.Effecting)" type="primary"
- >瀵煎嚭鍦ㄤ繚浜哄憳</el-button
- >
- <el-button @click="handleExport(InsuranceDetailStatusEnum.Fail)" type="primary"
- >瀵煎嚭閿欒浜哄憳</el-button
- >
- <el-button @click="handleGoStampFiles(id)" type="primary">涓嬭浇淇濆崟</el-button>
- <el-button @click="handleGoDownloadInvoice(id)" type="primary">涓嬭浇鍙戠エ</el-button>
</template>
<template v-else>
<el-button @click="handleExport(null)" type="primary">涓嬭浇浜哄憳娓呭崟</el-button>
@@ -145,6 +182,7 @@
</ChunkCell>
<ChangePersonInfoDialog v-bind="dialogProps"></ChangePersonInfoDialog>
<InsureClaimDetailDialog v-bind="dialogInsureClaimProps"></InsureClaimDetailDialog>
+ <UploadInsurePersonDialog v-bind="dialogSupplyProps" isSupply />
</AppContainer>
</LoadingLayout>
</template>
@@ -190,7 +228,12 @@
import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core';
import { setOSSLink } from '@/utils';
import dayjs from 'dayjs';
-import { useInsureActions } from '@/hooks';
+import {
+ useInsureActions,
+ useInsureProductSchemeAllList,
+ useUserInsureProductSetting,
+} from '@/hooks';
+import UploadInsurePersonDialog from './UploadInsurePersonDialog.vue';
defineOptions({
name: 'InsureOrderInfoView',
@@ -299,10 +342,16 @@
onClick: (role) => handleChangeInfo(role),
},
extraProps: {
- hide: (row: API.GetInsuranceStaffPageTemplate) =>
- detail.value?.productOnline ||
- detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect ||
- detail.value?.auditStatus === InsurancePolicyAuditStatusEnum.Pass,
+ 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
+ );
+ }
+ },
},
},
{
@@ -374,6 +423,7 @@
let res = await insuranceOrderServices.getInsuranceStaffList(params, {
showLoading: !state.loading,
});
+ console.log('res: ', res);
return res;
} catch (error) {}
},
@@ -417,21 +467,23 @@
url: response.url,
});
if (res?.length > 0) {
- await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
- XLSXUtils.exportToXLSX({
- workbookDataList: res,
- fileName: '閿欒浜哄憳鍚嶅崟',
- workbookHeaderMap: {
- name: '闆囧憳濮撳悕',
- sex: '鎬у埆',
- certType: '璇佷欢绫诲瀷',
- certNo: '璇佷欢鍙风爜',
- jobName: '闆囧憳宸ョ',
- useEmploer: '鐢ㄥ伐鍗曚綅',
- address: '鐢ㄥ伐鍦扮偣',
- note: '澶囨敞',
- },
- });
+ 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'],
@@ -548,6 +600,87 @@
}
} 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,
+ });
+}
+
+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: '',
+ },
+ closeAfterConfirm: false,
+});
+
+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>
--
Gitblit v1.9.1