Merge branch 'dev-2.2.0' of http://120.26.58.240:8888/r/JYBIndependentFront into dev-2.2.0
| | |
| | | placeholderData: () => [] as API.InsureProductSettingDto[], |
| | | }); |
| | | |
| | | function getInsureProductByIdNumber(productIdNumber: string) { |
| | | return allUserInsureProductSettingList.value.find((x) => x.productIdNumber === productIdNumber); |
| | | } |
| | | |
| | | function getInsureProductIdByIdNumber(productIdNumber: string) { |
| | | const insureProduct = getInsureProductByIdNumber(productIdNumber); |
| | | return insureProduct?.id ?? ''; |
| | | } |
| | | |
| | | return { |
| | | allUserInsureProductSettingList, |
| | | getInsureProductByIdNumber, |
| | | getInsureProductIdByIdNumber, |
| | | refetch, |
| | | }; |
| | | } |
| | | |
| | | type UseInsureProductSchemeAllListOptions = { |
| | | insureProductId?: MaybeRef<string>; |
| | | }; |
| | | |
| | | export function useInsureProductSchemeAllList(options: UseInsureProductSchemeAllListOptions = {}) { |
| | | const { insureProductId } = options; |
| | | |
| | | const { data: allInsureProductSchemeList, refetch } = useQuery({ |
| | | queryKey: ['dictionaryServices/getInsureProductSchemeAllList', insureProductId], |
| | | queryFn: async () => { |
| | | let res = await dictionaryServices.getInsureProductSchemeAllList( |
| | | { |
| | | insureProductId: unref(insureProductId), |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | | return res; |
| | | }, |
| | | placeholderData: () => [] as API.InsureProductSchemeDto[], |
| | | enabled: computed(() => !!unref(insureProductId)), |
| | | staleTime: Infinity, |
| | | }); |
| | | |
| | | return { |
| | | allInsureProductSchemeList, |
| | | refetch, |
| | | }; |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取保险产品方案下拉列表 POST /api/Dictionary/GetInsureProductSchemeAllList */ |
| | | export async function getInsureProductSchemeAllList( |
| | | body: API.GetInsureProductSchemePageInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.InsureProductSchemeDto[]>('/api/Dictionary/GetInsureProductSchemeAllList', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取保险产品方案列表 POST /api/Dictionary/GetInsureProductSchemePage */ |
| | | export async function getInsureProductSchemePage( |
| | | body: API.GetInsureProductSchemePageInput, |
| | |
| | | } |
| | | |
| | | /** 太平保险承保成功通知 POST /api/TaiPing/Success */ |
| | | export async function success( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIsuccessParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | export async function success(body: string, options?: API.RequestConfig) { |
| | | return request<string>('/api/TaiPing/Success', { |
| | | method: 'POST', |
| | | params: { |
| | | ...params, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | url?: string; |
| | | serialNum?: string; |
| | | productIdNumber?: string; |
| | | productSchemeIdNumber?: string; |
| | | } |
| | | |
| | | interface APIsearchParams { |
| | |
| | | interface APIsetForUserParams { |
| | | userId?: string; |
| | | permissionName?: string; |
| | | } |
| | | |
| | | interface APIsuccessParams { |
| | | input?: string; |
| | | } |
| | | |
| | | interface APIupdateDefaultConnectionStringParams { |
| | |
| | | auditStatus?: InsurancePolicyAuditStatusEnum; |
| | | /** 审核备注 */ |
| | | auditRemark?: string; |
| | | /** 返回地址 */ |
| | | returnUrl?: string; |
| | | } |
| | | |
| | | type InsurancePolicyAuditStatusEnum = 10 | 20 | -10; |
| | |
| | | serialNum: '', |
| | | url: [] as UploadUserFile[], |
| | | productIdNumber: '', |
| | | productSchemeIdNumber: '', |
| | | }, |
| | | closeAfterConfirm: false, |
| | | }); |
| | |
| | | serialNum: editForm.serialNum, |
| | | url: editForm.url?.[0]?.path, |
| | | productIdNumber: editForm.productIdNumber, |
| | | productSchemeIdNumber: editForm.productSchemeIdNumber, |
| | | }; |
| | | let res = await insuranceOrderServices.importInsStaffToList(params); |
| | | if (res.length > 0) { |
| | |
| | | @close="onDialogClose" |
| | | width="600px" |
| | | > |
| | | <ProForm :model="innerForm" ref="dialogForm" label-width="100px"> |
| | | <ProForm :model="innerForm" ref="dialogForm" label-width="120px"> |
| | | <ProFormItemV2 |
| | | label="投保产品:" |
| | | prop="productIdNumber" |
| | |
| | | :value-enum="allUserInsureProductSettingList" |
| | | clearable |
| | | v-model="form.productIdNumber" |
| | | enum-label-key="insuranceScheme" |
| | | 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: '请输入批次号' }]"> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useUserInsureProductSetting } from '@/hooks'; |
| | | import { useUserInsureProductSetting, useInsureProductSchemeAllList } from '@/hooks'; |
| | | import { |
| | | ProDialog, |
| | | UploadUserFile, |
| | |
| | | serialNum: string; |
| | | url: UploadUserFile[]; |
| | | productIdNumber: string; |
| | | productSchemeIdNumber: string; |
| | | }; |
| | | }; |
| | | |
| | |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const { allUserInsureProductSettingList } = useUserInsureProductSetting(); |
| | | const { allUserInsureProductSettingList, getInsureProductIdByIdNumber } = |
| | | useUserInsureProductSetting(); |
| | | const { allInsureProductSchemeList } = useInsureProductSchemeAllList({ |
| | | insureProductId: computed(() => getInsureProductIdByIdNumber(props.form.productIdNumber)), |
| | | }); |
| | | |
| | | function handleProductChange() { |
| | | innerForm.value.productSchemeIdNumber = ''; |
| | | } |
| | | |
| | | const innerVisible = computed({ |
| | | get() { |