| | |
| | | title="上传投保人员清单" |
| | | v-model="innerVisible" |
| | | destroy-on-close |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | draggable |
| | | bodyNoPaddingBottom |
| | | @close="onDialogClose" |
| | | width="600px" |
| | | > |
| | | <ProForm :model="innerForm" ref="dialogForm" label-width="120px"> |
| | | <ProFormItemV2 |
| | | label="批次号:" |
| | | prop="materialName" |
| | | :check-rules="[{ message: '请输入批次号' }]" |
| | | label="投保产品:" |
| | | prop="productIdNumber" |
| | | :check-rules="[{ message: '请选择投保产品' }]" |
| | | v-if="allUserInsureProductSettingList.length > 0" |
| | | > |
| | | <ProFormSelect |
| | | placeholder="请选择投保产品" |
| | | :value-enum="allUserInsureProductSettingList" |
| | | clearable |
| | | v-model="form.productIdNumber" |
| | | enum-label-key="productName" |
| | | enum-value-key="productIdNumber" |
| | | @change="handleProductChange" |
| | | ></ProFormSelect> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="投保产品方案:" |
| | | prop="productSchemeIdNumber" |
| | | :check-rules="[{ message: '请选择投保产品方案' }]" |
| | | v-if="allUserInsureProductSettingList.length > 0" |
| | | > |
| | | <ProFormSelect |
| | | placeholder="请选择投保产品方案" |
| | | :value-enum="allInsureProductSchemeList" |
| | | clearable |
| | | v-model="form.productSchemeIdNumber" |
| | | enum-label-key="name" |
| | | enum-value-key="idNumber" |
| | | ></ProFormSelect> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 label="批次号:" prop="serialNum" :check-rules="[{ message: '请输入批次号' }]"> |
| | | <ProFormText |
| | | placeholder="请输入批次号" |
| | | v-model.trim="innerForm.orderNo" |
| | | v-model.trim="innerForm.serialNum" |
| | | :maxlength="30" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useUserInsureProductSetting, useInsureProductSchemeAllList } from '@/hooks'; |
| | | import { |
| | | ProDialog, |
| | | UploadUserFile, |
| | |
| | | ProFormItemV2, |
| | | ProFormText, |
| | | ProFormUpload, |
| | | ProFormSelect, |
| | | } from '@bole-core/components'; |
| | | import { FormInstance } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | |
| | | defineOptions({ |
| | | name: 'UploadInsurePersonDialog', |
| | |
| | | type Props = { |
| | | modelValue: boolean; |
| | | form?: { |
| | | orderNo: string; |
| | | serialNum: string; |
| | | url: UploadUserFile[]; |
| | | productIdNumber: string; |
| | | productSchemeIdNumber: string; |
| | | }; |
| | | }; |
| | | |
| | |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const { allUserInsureProductSettingList, getInsureProductIdByIdNumber } = |
| | | useUserInsureProductSetting(); |
| | | const { allInsureProductSchemeList } = useInsureProductSchemeAllList({ |
| | | insureProductId: computed(() => getInsureProductIdByIdNumber(props.form.productIdNumber)), |
| | | }); |
| | | |
| | | function handleProductChange() { |
| | | innerForm.value.productSchemeIdNumber = ''; |
| | | } |
| | | |
| | | const innerVisible = computed({ |
| | | get() { |
| | | return props.modelValue; |