From 23093df749742fe98fcee61cf0fe00957aa176d1 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 07 七月 2025 09:43:51 +0800 Subject: [PATCH] Merge branch 'dev-2.2.1' of http://120.26.58.240:8888/r/JYBIndependentFront into dev-2.2.1 --- src/views/Home/components/InsureOrderInfoView.vue | 199 +++++++++++++++++++++++++++++++++++++------------ 1 files changed, 150 insertions(+), 49 deletions(-) diff --git a/src/views/Home/components/InsureOrderInfoView.vue b/src/views/Home/components/InsureOrderInfoView.vue index 6451e8b..ff3d989 100644 --- a/src/views/Home/components/InsureOrderInfoView.vue +++ b/src/views/Home/components/InsureOrderInfoView.vue @@ -6,7 +6,16 @@ <ProFormCol> <ProFormColItem :span="8"> <ProFormItemV2 label="淇濆崟鍙�:" prop="insureBillNo"> - <ProFormText v-model.trim="detail.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"> @@ -66,7 +75,10 @@ </ProForm> </ChunkCell> <ChunkCell title="浜哄憳淇℃伅" class="full-table-chunk"> - <template #titleRight v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect"> + <template + #titleRight + v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect && !detail.productOnline" + > <el-button type="primary" @click="handleBatchChange">鎵规敼鐢宠</el-button> </template> <ProTableQueryFilterBar @on-reset="reset"> @@ -82,29 +94,48 @@ </QueryFilterItem> </template> <template #btn> - <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 v-if="detail.productOnline"> + <el-button + v-if="detail.auditStatus === InsurancePolicyAuditStatusEnum.Pass" + @click="handleSupplySubmit()" + type="primary" + >琛ユ彁</el-button > - <template #default> - <el-button icon="Plus" type="primary">瀵煎叆</el-button> - </template> - </BlFileUpload> - <el-button @click="handleClear()" type="primary">娓呯┖鏁版嵁</el-button> + <template v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect"> + <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> <template v-else> - <el-button @click="handleDownloadPerson()" type="primary">涓嬭浇浜哄憳娓呭崟</el-button> - <el-button v-if="detail.productOnline" @click="handleGoStampFiles()" type="primary" - >涓嬭浇淇濆崟</el-button - > - <el-button v-else @click="handleDownloadOrder()" type="primary">涓嬭浇淇濆崟</el-button> + <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> @@ -120,6 +151,7 @@ </ChunkCell> <ChangePersonInfoDialog v-bind="dialogProps"></ChangePersonInfoDialog> <InsureClaimDetailDialog v-bind="dialogInsureClaimProps"></InsureClaimDetailDialog> + <UploadInsurePersonDialog v-bind="dialogSupplyProps" isSupply /> </AppContainer> </LoadingLayout> </template> @@ -154,6 +186,8 @@ InsurancePolicyStatusEnum, InsurancePolicyStatusEnumText, InsurancePolicyAuditStatusEnum, + InsuranceDetailStatusEnumText, + InsuranceDetailStatusEnum, } from '@/constants'; import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue'; import InsureClaimDetailDialog from './InsureClaimDetailDialog.vue'; @@ -163,6 +197,12 @@ 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', @@ -198,6 +238,16 @@ name: '闆囧憳宸ョ', }, { + id: '51', + enCode: 'occupationType', + name: '鑱屼笟绫诲瀷', + }, + { + id: '52', + enCode: 'occupationCode', + name: '鑱屼笟鐮佸��', + }, + { id: '6', enCode: 'userEmploer', name: '鐢ㄥ伐鍗曚綅', @@ -226,6 +276,24 @@ 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: 'claimCount', name: '鐞嗚禂', @@ -244,6 +312,7 @@ }, extraProps: { hide: (row: API.GetInsuranceStaffPageTemplate) => + detail.value?.productOnline || detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect || detail.value?.auditStatus === InsurancePolicyAuditStatusEnum.Pass, }, @@ -317,6 +386,7 @@ let res = await insuranceOrderServices.getInsuranceStaffList(params, { showLoading: !state.loading, }); + console.log('res: ', res); return res; } catch (error) {} }, @@ -325,7 +395,12 @@ keyWord: '', orderInput: [{ property: 'id', order: OrderInputType.Asc }], }, - columnsRenderProps: {}, + columnsRenderProps: { + status: { + type: 'enum', + valueEnum: InsuranceDetailStatusEnumText, + }, + }, } ); @@ -378,36 +453,11 @@ } catch (error) {} } -async function handleDownloadPerson() { - try { - if (paginationState.total === 0) { - Message.warnMessage('娌℃湁鏁版嵁鍙互瀵煎嚭鍝'); - return; - } - let res = await insuranceOrderServices.getInsuranceStaffListExport( - { id: id }, - { - responseType: 'blob', - getResponse: true, - } - ); - if (res) { - downloadFile(res.data, `浜哄憳娓呭崟`, 'xlsx'); - } - } catch (error) {} -} function handleDownloadOrder() { downloadFileByUrl(setOSSLink(detail.value?.insureBillUrl)); } -function handleGoStampFiles() { - router.push({ - name: 'InsurancePolicyStampFiles', - params: { - id: id, - }, - }); -} +const { handleGoDownloadInvoice, handleGoStampFiles } = useInsureActions(); function handleBatchChange() { if ( @@ -492,6 +542,57 @@ }); } 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, + }); +} + +const { + dialogProps: dialogSupplyProps, + handleAdd: handleSupplyAdd, + editForm: supplyForm, +} = useFormDialog({ + onConfirm: supplySubmit, + defaultFormParams: { + serialNum: '', + url: [] as UploadUserFile[], + productIdNumber: '', + productSchemeIdNumber: '', + effectStartTime: dayjs().add(1, 'day').format('YYYY-MM-DD'), + }, +}); + +// TODO 琛ユ彁 +async function supplySubmit() {} </script> <style lang="scss" scoped> -- Gitblit v1.9.1