| | |
| | | <ProDialog title="配置" v-model="visible" @close="onDialogClose" destroy-on-close draggable> |
| | | <FieldRadio |
| | | v-model="form.enterpriseConfigureType" |
| | | :value-enum="EnterpriseConfigureTypeText" |
| | | :value-enum="EnterpriseConfigureTypeTextLsst" |
| | | buttonStyle |
| | | style="margin-bottom: 22px" |
| | | /> |
| | |
| | | <el-tab-pane lazy :name="EnterpriseConfigureType.ShortMessage"> |
| | | <ShortMessageConfigureView :id="form.id" ref="shortMessageConfigureViewRef" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane lazy :name="EnterpriseConfigureType.InsureProduct"> |
| | | <InsureProductConfigureView :id="form.id" ref="insureProductConfigureViewRef" /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { ProDialog, FieldRadio } from '@bole-core/components'; |
| | | import { EnterpriseConfigureType, EnterpriseConfigureTypeText } from '@/constants'; |
| | | import { |
| | | EnterpriseConfigureType, |
| | | EnterpriseConfigureTypeTextPartA, |
| | | EnterpriseConfigureTypeTextSupplier, |
| | | } from '@/constants'; |
| | | import BankConfigureView from './BankConfigureView.vue'; |
| | | import AliPayConfigureView from './AliPayConfigureView.vue'; |
| | | import ElectronicConfigureView from './ElectronicConfigureView.vue'; |
| | | import ShortMessageConfigureView from './ShortMessageConfigureView.vue'; |
| | | import WechatConfigureView from './WechatConfigureView.vue'; |
| | | import InsureProductConfigureView from './InsureProductConfigureView.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'ConfigureDialog', |
| | |
| | | type Form = { |
| | | enterpriseConfigureType: EnterpriseConfigureType; |
| | | id: string; |
| | | type: EnumEnterpriseType; |
| | | }; |
| | | |
| | | const form = defineModel<Form>('form'); |
| | | const visible = defineModel({ type: Boolean }); |
| | | |
| | | const EnterpriseConfigureTypeTextLsst = computed(() => { |
| | | return form.value.type === EnumEnterpriseType.Supplier |
| | | ? EnterpriseConfigureTypeTextSupplier |
| | | : EnterpriseConfigureTypeTextPartA; |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm', value: any): void; |
| | |
| | | const shortMessageConfigureViewRef = useTemplateRef<InstanceType<typeof ShortMessageConfigureView>>( |
| | | 'shortMessageConfigureViewRef' |
| | | ); |
| | | const insureProductConfigureViewRef = useTemplateRef< |
| | | InstanceType<typeof InsureProductConfigureView> |
| | | >('insureProductConfigureViewRef'); |
| | | |
| | | const wechatConfigureViewRef = |
| | | useTemplateRef<InstanceType<typeof WechatConfigureView>>('wechatConfigureViewRef'); |
| | |
| | | res = await shortMessageConfigureViewRef.value?.onConfirm?.(); |
| | | } else if (form.value.enterpriseConfigureType === EnterpriseConfigureType.Wechat) { |
| | | res = await wechatConfigureViewRef.value?.onConfirm?.(); |
| | | } else if (form.value.enterpriseConfigureType === EnterpriseConfigureType.InsureProduct) { |
| | | res = await insureProductConfigureViewRef.value?.onConfirm?.(); |
| | | } |
| | | if (res) { |
| | | emit('onConfirm', res); |