| | |
| | | * @version: |
| | | * @Date: 2024-06-26 22:54:42 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-27 10:44:54 |
| | | * @LastEditTime: 2024-06-27 22:14:51 |
| | | --> |
| | | <template> |
| | | <BasicModal |
| | |
| | | import { BasicModal, useModalInner } from '/@/components/Modal'; |
| | | import { Steps } from 'ant-design-vue'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | |
| | | defineOptions({ name: 'StepModal' }); |
| | | |
| | | const emit = defineEmits(['success']); |
| | | const { createErrorModal } = useMessage(); |
| | | const { t } = useI18n(); |
| | | const title = ref(''); |
| | | const current = ref(0); |
| | |
| | | */ |
| | | async function handleSubmit() { |
| | | try { |
| | | if (isNullOrUnDef(step1Values.value['CUST_CODE'])) { |
| | | createErrorModal({ |
| | | title: t('sys.api.errorTip'), |
| | | content: '步骤1未完成,请完成再保存提交', |
| | | }); |
| | | return; |
| | | } |
| | | if (isNullOrUnDef(step2Values.value['ROT_CODE'])) { |
| | | createErrorModal({ |
| | | title: t('sys.api.errorTip'), |
| | | content: '步骤2未完成,请完成再保存提交', |
| | | }); |
| | | return; |
| | | } |
| | | closeModal(); |
| | | emit('success', { ...step1Values.value, ...step2Values.value }); |
| | | } finally { |
| | |
| | | |
| | | function handleStepPrev() { |
| | | current.value--; |
| | | if(current.value == 1){ |
| | | step2Values.value = ''; |
| | | } |
| | | if(current.value == 0){ |
| | | step1Values.value = ''; |
| | | } |
| | | } |
| | | |
| | | function handleStep2Next(Values: any) { |