| | |
| | | <script lang="ts" setup> |
| | | import type { WmsApprovalApi } from '#/api/mes/wm/approval'; |
| | | |
| | | import { computed, ref, watch } from 'vue'; |
| | | import { ref, watch } from 'vue'; |
| | | |
| | | import { useVbenModal } from '@vben/common-ui'; |
| | | |
| | |
| | | }, |
| | | }, |
| | | layout: 'horizontal', |
| | | schema: useProcessFormSchema(), |
| | | schema: useProcessFormSchema((value) => { |
| | | currentBizType.value = value; |
| | | }), |
| | | showDefaultActions: false, |
| | | }); |
| | | |
| | |
| | | }, |
| | | onOpenChange(isOpen) { |
| | | if (isOpen) { |
| | | currentBizType.value = undefined; |
| | | const data = modalApi.getData() as { |
| | | warehouseId: number; |
| | | warehouseName: string; |
| | |
| | | }, |
| | | }); |
| | | |
| | | /** 当前选中的业务类型 */ |
| | | const currentBizType = computed(() => { |
| | | const values = formApi.getValues(); |
| | | return values.bizType; |
| | | }); |
| | | /** 当前选中的业务类型(formApi.getValues 为异步,改由字段 onChange 同步) */ |
| | | const currentBizType = ref<string>(); |
| | | |
| | | /** 监听业务类型变化,加载对应的流程列表 */ |
| | | watch(currentBizType, async (bizType) => { |