| | |
| | | <QueryFilterItem> |
| | | <FieldRadio |
| | | v-model="extraParamState.insurancePeriod" |
| | | :value-enum="insuranceTypeText" |
| | | :value-enum="insuranceTypeTextForFilter" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | |
| | | InsurancePolicyListPayStatusEnum, |
| | | InsurancePolicyListPayStatusEnumText, |
| | | InsuranceOccupationTypeTempPath, |
| | | InsurancePeriodEnum, |
| | | insuranceTypeTextForFilter, |
| | | } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | | import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue'; |
| | | import { useUserInsureProductSetting } from '@/hooks'; |
| | | import { useInsureProductSchemeAllList, useUserInsureProductSetting } from '@/hooks'; |
| | | // import { Recorder } from '@/utils/record'; |
| | | |
| | | defineOptions({ |
| | |
| | | onClick: (role) => handleUploadStampFile(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => |
| | | row.status !== InsurancePolicyStatusEnum.WaitEffect, |
| | | hide: (row: API.GetInsurancePageOutput) => { |
| | | if (row.productOnline) { |
| | | return ( |
| | | row.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAdd && |
| | | row.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAudit |
| | | ); |
| | | } else { |
| | | return row.status !== InsurancePolicyStatusEnum.WaitEffect; |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | 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: 'payBtn', |
| | | // name: '支付', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => handlePay(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetInsurancePageOutput) => |
| | | // row.payStatus != InsurancePolicyListPayStatusEnum.WaitPay, |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'stampFilesBtn', |
| | |
| | | // onClick: (role) => handleStandarEndo(role), |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'submitAuditBtn', |
| | | name: '提交审核', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleSubmitAuditBtn(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => |
| | | row.auditStatus != InsurancePolicyAuditStatusEnum.WaitAdd, |
| | | }, |
| | | }, |
| | | ]).filter(Boolean); |
| | | |
| | | const BaseState = { |
| | |
| | | productIdNumber: '', |
| | | productSchemeIdNumber: '', |
| | | effectStartTime: dayjs().add(1, 'day').format('YYYY-MM-DD'), |
| | | effectEndTime: '', |
| | | }, |
| | | closeAfterConfirm: false, |
| | | }); |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { isSjbAccount, getInsureProductIdByIdNumber } = useUserInsureProductSetting(); |
| | | |
| | | const { getInsureProductSchemeByIdNumber } = useInsureProductSchemeAllList({ |
| | | insureProductId: computed(() => getInsureProductIdByIdNumber(editForm.productIdNumber)), |
| | | }); |
| | | |
| | | async function importInsStaffToList() { |
| | | try { |
| | | let params: API.ImportInsStaffToListFrontInput = { |
| | |
| | | productSchemeIdNumber: editForm.productSchemeIdNumber, |
| | | effectStartTime: editForm.effectStartTime, |
| | | }; |
| | | const currentInsureProductScheme = getInsureProductSchemeByIdNumber( |
| | | editForm.productSchemeIdNumber |
| | | ); |
| | | if (currentInsureProductScheme?.period === InsurancePeriodEnum['1-29D']) { |
| | | params.effectEndTime = editForm.effectEndTime; |
| | | } |
| | | let res = await insuranceOrderServices.importInsStaffToList(params, { |
| | | timeout: 60 * 1000 * 10, |
| | | customErrorHandler(error) { |
| | |
| | | const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog({ |
| | | onConfirm: handleUpload, |
| | | }); |
| | | |
| | | const { isSjbAccount } = useUserInsureProductSetting(); |
| | | |
| | | function handleOpenInstructions() { |
| | | if (isSjbAccount.value) { |
| | |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleSubmitAuditBtn(row: API.GetInsurancePageOutput) { |
| | | try { |
| | | let params: API.InsurancePolicyAuditInput = { |
| | | insurancePolicyId: row.id, |
| | | }; |
| | | let res = await insuranceOrderServices.insurancePolicyAddAudit(params); |
| | | if (res) { |
| | | Message.successMessage('上传成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |