From eed2448d2e9d3dd2b1ec17d5c4ae74b102d793c5 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 30 六月 2025 21:47:39 +0800 Subject: [PATCH] feat: v2.2 --- src/views/Home/Home.vue | 123 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 117 insertions(+), 6 deletions(-) diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue index 712142d..0568350 100644 --- a/src/views/Home/Home.vue +++ b/src/views/Home/Home.vue @@ -53,6 +53,13 @@ </QueryFilterItem> </template> <template #btn> + <el-button + @click="handleDownloadOccupationType()" + type="primary" + style="margin-right: 10px" + link + >鑱屼笟绫诲瀷瀵圭収琛�</el-button + > <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link >妯℃澘涓嬭浇</el-button > @@ -82,10 +89,29 @@ rowKey: 'id', }" > + <template #auditStatus="{ row }"> + <el-tooltip + class="box-item" + effect="dark" + :content="row.auditRemark" + placement="top" + v-if="row.auditStatus === InsurancePolicyAuditStatusEnum.Reject && row.auditRemark" + popper-class="max-width-popper" + > + <div style="display: inline-flex; align-items: center; color: inherit"> + {{ InsurancePolicyAuditStatusEnumText[row.auditStatus] }} + <el-icon size="16" color="#3a71ff"><QuestionFilled /></el-icon> + </div> + </el-tooltip> + <el-text v-else style="color: inherit"> + {{ InsurancePolicyAuditStatusEnumText[row.auditStatus] }} + </el-text> + </template> </ProTableV2> </AppContainer> <UploadInsurePersonDialog v-bind="dialogProps" /> <UploadStampFileDialog v-bind="dialogStampFileProps" /> + <InsureInstructionsDialog v-bind="dialogInstructionsProps" /> </LoadingLayout> </template> @@ -104,6 +130,7 @@ SearchInput, FieldRadio, XLSXUtils, + useDialog, } from '@bole-core/components'; import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; import { Message, OrderInputType, downloadFileByUrl } from '@bole-core/core'; @@ -121,9 +148,13 @@ InsurancePolicyAuditStatusEnumText, InsurancePolicyAuditStatusEnum, InsurancePolicyProductIdNumberEnum, + InsurancePolicyListPayStatusEnum, + InsurancePolicyListPayStatusEnumText, + InsuranceOccupationTypeTempPath, } from '@/constants'; import dayjs from 'dayjs'; import _ from 'lodash'; +import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue'; defineOptions({ name: 'Home', @@ -149,8 +180,7 @@ }, extraProps: { hide: (row: API.GetInsurancePageOutput) => - row.productIdNumber === InsurancePolicyProductIdNumberEnum.SJB || - row.status !== InsurancePolicyStatusEnum.Effecting, + row.productOnline || row.status !== InsurancePolicyStatusEnum.Effecting, }, }, { @@ -163,8 +193,6 @@ }, extraProps: { hide: (row: API.GetInsurancePageOutput) => - row.productIdNumber === InsurancePolicyProductIdNumberEnum.SJB || - row.auditStatus !== InsurancePolicyAuditStatusEnum.Pass || row.status !== InsurancePolicyStatusEnum.WaitEffect, }, }, @@ -177,9 +205,47 @@ onClick: (role) => handleDownloadInsureFile(role), }, extraProps: { - hide: (row: API.GetInsurancePageOutput) => !row.insureBillUrl, + hide: (row: API.GetInsurancePageOutput) => row.productOnline || !row.insureBillUrl, }, }, + { + data: { + enCode: 'payBtn', + name: '鏀粯', + }, + emits: { + onClick: (role) => handlePay(role), + }, + extraProps: { + hide: (row: API.GetInsurancePageOutput) => + row.payStatus != InsurancePolicyListPayStatusEnum.WaitPay, + }, + }, + { + data: { + enCode: 'stampFilesBtn', + name: '淇濆崟涓嬭浇', + }, + emits: { + onClick: (role) => handleGoStampFiles(role), + }, + extraProps: { + hide: (row: API.GetInsurancePageOutput) => !(row.productOnline && row.anyPayComplete), + }, + }, + { + data: { + enCode: 'downloadInvoiceBtn', + name: '鍙戠エ涓嬭浇', + }, + emits: { + onClick: (role) => handleGoDownloadInvoice(role), + }, + extraProps: { + hide: (row: API.GetInsurancePageOutput) => !(row.productOnline && row.anyPayComplete), + }, + }, + // { // data: { // enCode: 'standarEndoBtn', @@ -200,6 +266,7 @@ onMounted(async () => { await getList(); state.loading = false; + handleOpenInstructions(); }); const { @@ -229,7 +296,6 @@ }, columnsRenderProps: { status: { type: 'enum', valueEnum: InsurancePolicyStatusEnumText }, - auditStatus: { type: 'enum', valueEnum: InsurancePolicyAuditStatusEnumText }, insurancePeriod: { type: 'enum', valueEnum: insuranceTypeText }, creationTime: { type: 'date', format: 'YYYY-MM-DD' }, effectStartTime: { type: 'date', format: 'YYYY-MM-DD' }, @@ -244,6 +310,7 @@ formatter: (row: API.GetInsurancePageOutput) => row.amount == null ? '' : toThousand(row.amount), }, + payStatus: { type: 'enum', valueEnum: InsurancePolicyListPayStatusEnumText }, }, } ); @@ -271,6 +338,7 @@ serialNum: '', url: [] as UploadUserFile[], productIdNumber: '', + productSchemeIdNumber: '', }, closeAfterConfirm: false, }); @@ -301,6 +369,7 @@ serialNum: editForm.serialNum, url: editForm.url?.[0]?.path, productIdNumber: editForm.productIdNumber, + productSchemeIdNumber: editForm.productSchemeIdNumber, }; let res = await insuranceOrderServices.importInsStaffToList(params); if (res.length > 0) { @@ -323,6 +392,12 @@ dialogState.dialogVisible = false; getList(paginationState.pageIndex); } catch (error) {} +} + +const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog(); + +function handleOpenInstructions() { + dialogInstructionsState.dialogVisible = true; } function handleUpload() { @@ -366,6 +441,10 @@ downloadFile(res.data, `鍦ㄤ繚浜哄憳瀵煎嚭`, 'xlsx'); } } catch (error) {} +} + +function handleDownloadOccupationType() { + downloadFileByUrl(InsuranceOccupationTypeTempPath, '鑱屼笟绫诲瀷瀵圭収琛�'); } function handleDownload() { @@ -471,4 +550,36 @@ // } } catch (error) {} } + +async function handleGoStampFiles(row: API.GetInsurancePageOutput) { + try { + router.push({ + name: 'InsurancePolicyStampFiles', + params: { + id: row.id, + }, + }); + } catch (error) {} +} + +function handlePay(row: API.GetInsurancePageOutput) { + router.push({ + name: 'InsurePayDetail', + params: { + id: row.id, + }, + }); +} + +async function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) { + try { + await insuranceOrderServices.getInvoiceId({ id: row.id }); + router.push({ + name: 'InsureDownloadInvoice', + params: { + id: row.id, + }, + }); + } catch (error) {} +} </script> -- Gitblit v1.9.1