2026-08-29 d5048a33e4760d414115a5e25645d30b41d24198
src/views/wls/approval/config/modules/process-config-form.vue
@@ -1,7 +1,7 @@
<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';
@@ -25,7 +25,9 @@
    },
  },
  layout: 'horizontal',
  schema: useProcessFormSchema(),
  schema: useProcessFormSchema((value) => {
    currentBizType.value = value;
  }),
  showDefaultActions: false,
});
@@ -53,6 +55,7 @@
  },
  onOpenChange(isOpen) {
    if (isOpen) {
      currentBizType.value = undefined;
      const data = modalApi.getData() as {
        warehouseId: number;
        warehouseName: string;
@@ -69,11 +72,8 @@
  },
});
/** 当前选中的业务类型 */
const currentBizType = computed(() => {
  const values = formApi.getValues();
  return values.bizType;
});
/** 当前选中的业务类型(formApi.getValues 为异步,改由字段 onChange 同步) */
const currentBizType = ref<string>();
/** 监听业务类型变化,加载对应的流程列表 */
watch(currentBizType, async (bizType) => {