Ben Lin
2024-06-27 226ad601bb8326814c3e94efd6f476014f6a9e66
产品工艺路线工序配置更新
已修改8个文件
851 ■■■■■ 文件已修改
src/api/tigerapi/model/basModel.ts 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/StepModal.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/Config.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/detail/detail.vue 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts 643 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/normalDrawer.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/model/basModel.ts
@@ -124,17 +124,17 @@
  GetHomeUrl: () => string;
  GetBaseColumns: () => [];
  GetSearchForm: () => [];
  GetCrudForm: () => [];
  GetCrudForm: (type: string) => [];
  GetBaseForm: () => [];
  GetBaseCards: () => [];
  OthersValues: (val: string, id: string) => {}
  GetTitle: () => {};
  OthersValues: (val: string, id: string) => {};
  GetTitle: (type: string) => {};
  GetCrudColSlots: () => [];
  nodeChange: ({}) => void,
  nodeChange: ({}) => void;
  CreateIcon: (params: Recordable<any>) => string;
  SelectNode: (selectedNodes: Ref<any[]>) => {};
  GetNavItems: () => NavItem[];
  navChangeItem: (action: any, ...args) => void;
  GetUseModals: () => {};
  SubmitFunc: (values: Recordable<any>, emit) => void;
  SubmitFunc: (values: Recordable<any>, type: string, emit) => void;
}
src/views/components/StepModal.vue
@@ -4,7 +4,7 @@
 * @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
@@ -42,10 +42,13 @@
  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);
@@ -78,6 +81,20 @@
   */
  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 {
@@ -94,6 +111,12 @@
  function handleStepPrev() {
    current.value--;
    if(current.value == 1){
      step2Values.value = '';
    }
    if(current.value == 0){
      step1Values.value = '';
    }
  }
  function handleStep2Next(Values: any) {
src/views/tigerprojects/system/lowcode/composition/Config.vue
@@ -4,10 +4,10 @@
 * @version: 
 * @Date: 2024-06-24 23:44:31
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 16:28:34
 * @LastEditTime: 2024-06-27 22:52:24
-->
<template>
  <Card :title="GetTitle()['configTitle']">
  <Card :title="GetTitle(props.configType)['configTitle']">
    <BasicForm @register="registerForm">
      <template #[item]="{ field }" v-for="item in GetCrudColSlots()" :key="item">
        <a-button
@@ -27,7 +27,7 @@
</template>
<script lang="ts" setup>
  import { Ref, inject, nextTick, onMounted, ref, unref, watch } from 'vue';
  import { BasicForm, useForm } from '/@/components/Form/index';
  import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
  import { Card } from 'ant-design-vue';
  import { useModal } from '/@/components/Modal';
  import GeneralModal from '/@/views/components/GeneralModal.vue';
@@ -37,37 +37,50 @@
  const { t } = useI18n();
  const emit = defineEmits(['success', 'register']);
  const props = defineProps({
    configType: { type: String },
  });
  const [registerItemAdd, { openModal: openItemModal }] = useModal();
  const objParams = inject('objParams') as Ref<any>;
  const custImport = ref<any[]>([]);
  const EntityCustFunction = ref([
    {
      GetCrudForm() {},
      GetCrudForm(type: string) {},
      GetCrudColSlots(val, id) {},
      OpenSelectItem(openItemModal: Fn, ...args) {},
      GetSelectSuccess(d, u, ...args) {},
      GetTitle() {},
      GetTitle(type: string) {},
      nodeChange(params: {
        resetFields: any;
        setFieldsValue: any;
        objParams: Ref<any>;
        selectedNodes: Ref<any[]>;
      }) {},
      SubmitFunc(values: Recordable<any>, emit) {},
      SubmitFunc(values: Recordable<any>, type: string, emit) {},
    } as EntityCustFunctionType,
  ]);
  /* 动态import实体名.ts的自定义方法 */
  try {
    custImport.value = await import(`../entityts/${objParams.value['Name']}.ts`);
  } catch (e) {}
  const [{ GetCrudForm, GetCrudColSlots, nodeChange, OpenSelectItem, GetSelectSuccess, GetTitle, SubmitFunc }] =
    isNullOrUnDef(custImport.value['default'])
      ? EntityCustFunction.value
      : custImport.value['default']();
  const [
    {
      GetCrudForm,
      GetCrudColSlots,
      nodeChange,
      OpenSelectItem,
      GetSelectSuccess,
      GetTitle,
      SubmitFunc,
    },
  ] = isNullOrUnDef(custImport.value['default'])
    ? EntityCustFunction.value
    : custImport.value['default']();
  const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
  let formSchema: FormSchema[] = GetCrudForm(props.configType);
  const [registerForm, { resetFields, setFieldsValue, validate, setProps }] = useForm({
    labelWidth: 120,
    schemas: GetCrudForm(),
    schemas: formSchema,
    actionColOptions: {
      offset: 8,
      span: 24,
@@ -77,7 +90,7 @@
    },
    showActionButtonGroup: true,
    submitButtonOptions: {
      text: '提交',
      text: '保存',
    },
    submitFunc: customSubmitFunc,
  });
@@ -88,8 +101,15 @@
    () => selectedNodes.value,
    (newVal, oldVal) => {
      nextTick(() => {
        setProps({
          schemas: []
        });
        /* 节点切换事件 */
        nodeChange({ resetFields, setFieldsValue, objParams, selectedNodes });
        formSchema = GetCrudForm(selectedNodes.value[0].type);
        setProps({
          schemas: formSchema
        });
      });
    },
    { deep: true, immediate: true },
@@ -103,7 +123,7 @@
  async function customSubmitFunc() {
    try {
      const values = await validate();
      SubmitFunc(values, emit);
      SubmitFunc(values,props.configType, emit);
      // values.AUTH_PROD = useUserStore().getUserInfo.prodCode;
      // values.FACTORY = useUserStore().getUserInfo.prodCode;
      // const apiAction = SaveEntity(values, true, 'MES_PROD_ACTION');
@@ -112,7 +132,7 @@
      //     emit('success');
      //   }
      // });
    }catch(e) {}
    } catch (e) {}
  }
  /**
src/views/tigerprojects/system/lowcode/composition/index.vue
@@ -1,3 +1,11 @@
<!--
 * @Description: 通用组合页面,左边是树,右边是配置
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-18 23:30:30
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 22:31:13
-->
<template>
  <PageWrapper
    :dense="dense"
@@ -14,7 +22,7 @@
    <Suspense>
      <div class="w-3/4 xl:w-4/5 p-5">
        <CarGridNav v-if="showNav" />
        <Config v-if="showConfig" @success="configSuccess"/>
        <Config v-if="showConfig" :configType="configType" @success="configSuccess"/>
      </div>
    </Suspense>
    <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable">
@@ -94,6 +102,7 @@
  const isMounted = ref(false);
  const showNav = ref(false);
  const showConfig = ref(false);
  const configType = ref('');
  const custImport = ref<any>(null);
  const [registerCust, { openModal: openCustomModal, closeModal }] = useModal();
  provide<Ref<string>>('nodeType', nodeType);
@@ -134,8 +143,13 @@
  function NodeSelect(e) {
    showConfig.value = e.showConfig;
    showNav.value = e.showNav;
    configType.value = e.type
  }
  /**
   * @description: 保存配置成功返回方法
   * @return {*}
   */
  function configSuccess() {
    notification.success({ message: '成功保存行为配置数据' });
  }
src/views/tigerprojects/system/lowcode/detail/detail.vue
@@ -37,6 +37,7 @@
  import { useGo } from '/@/hooks/web/usePage';
  import { DeleteEntity, getListByPage } from '/@/api/tigerapi/system';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel';
  const { t } = useI18n();
@@ -55,9 +56,37 @@
  const dtlSlots = ref([] as any[]);
  const useModalData = ref({}); //表单中插槽渲染按钮打开模态框useModal方法
  const useFormData = ref({});
  const custImport = ref<any[]>(await import(`../entityts/${props.entityName}.ts`));
  const [{ EditeOperation, GetBaseColumns, GetSearchForm, GetCrudForm, OthersValues }] =
    custImport.value['default']();
  const custImport = ref<any[]>([]);
  const EntityCustFunction = ref([
    {
      ActionItem(params, data, ...args) {},
      EditOperation(data, d, u) {},
      GetBaseColumns() {},
      GetSearchForm() {},
      GetCrudForm() {},
      OthersValues(val, id) {},
      GetSelectSuccess(d, u, ...args) {},
      OpenSelectItem(openItemModal: Fn, ...args) {},
    } as EntityCustFunctionType,
  ]);
  /* 动态import实体名.ts的自定义方法 */
  try {
    custImport.value = await import(`../entityts/${objParams['Name']}.ts`);
  } catch (e) {}
  const [
    {
      ActionItem: nActionItem,
      EditOperation,
      GetBaseColumns,
      GetSearchForm,
      GetCrudForm,
      OthersValues,
      GetSelectSuccess,
      OpenSelectItem,
    },
  ] = isNullOrUnDef(custImport.value['default'])
    ? EntityCustFunction.value
    : custImport.value['default']();
  others.value = OthersValues(objParams['CODE'], objParams['ID']);
  const [registerTable, { getForm, reload, setProps }] = useTable({
    title: `${objParams['firstTitle']}列表`,
@@ -121,8 +150,7 @@
    if (isNullOrUnDef(custImport.value)) {
      return actionItem;
    }
    const [{ ActionItem }] = custImport.value['default']();
    return ActionItem(
    return nActionItem(
      params,
      actionItem,
      openDrawer,
@@ -198,21 +226,7 @@
   * @return {*}
   */
  function handleItemSuccess(d, u, item) {
    /* 动态import实体名.ts的自定义方法 */
    try {
      import(
        `../entityts/${getForm().getFieldsValue()[`${item.replace(/form-/, '').replace(/add/, '')}PSelect_0`]}.ts`
      )
        .then((m) => {
          const [{ GetSelectSuccess }] = m.default();
          getForm().setFieldsValue(GetSelectSuccess(d, u));
        })
        .catch(() => {
          getForm().setFieldsValue({
            ITEM_CODE: d.values['val'],
          });
        });
    } catch (e) {}
    getForm().setFieldsValue(GetSelectSuccess(d, u));
  }
  /**
@@ -221,49 +235,6 @@
   * @return {*}
   */
  function handleSelectItem(item) {
    /* 动态import实体名.ts的自定义方法 */
    try {
      import(
        `../entityts/${props.useTableData['table'][1].getForm().getFieldsValue()[`${item.replace(/form-/, '').replace(/add/, '')}PSelect_0`]}.ts`
      )
        .then((m) => {
          const [{ OpenSelectItem }] = m.default();
          OpenSelectItem(openItemModal);
        })
        .catch(() => {
          openItemModal(true, {
            title: '物料列表',
            schemas: [
              {
                field: 'ITEM_CODE',
                component: 'Input',
                label: '物料编码',
                colProps: {
                  span: 12,
                },
              },
            ],
            ItemColumns: [
              {
                title: t('物料编码'),
                dataIndex: 'ITEM_CODE',
                resizable: true,
                sorter: true,
                width: 200,
              },
              {
                title: t('物料名称'),
                dataIndex: 'ITEM_NAME',
                resizable: true,
                sorter: true,
                width: 180,
              },
            ],
            tableName: 'BAS_ITEM',
            rowKey: 'ITEM_CODE',
            searchInfo: { TABLE_NAME: 'BAS_ITEM' },
          });
        });
    } catch (e) {}
    OpenSelectItem(openItemModal);
  }
</script>
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 18:33:09
 * @LastEditTime: 2024-06-27 20:40:25
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 19:19:49
 * @LastEditTime: 2024-06-27 22:57:45
 */
import { Ref, ref, unref } from 'vue';
@@ -16,7 +16,6 @@
import { NavItem } from '/@/api/tigerapi/model/basModel';
import { useMessage } from '/@/hooks/web/useMessage';
import { useModal } from '/@/components/Modal';
import { V_MES_ROUTE_PTREE } from '/@/api/tigerapi/model/router';
const { t } = useI18n();
const { createErrorModal } = useMessage();
@@ -82,198 +81,371 @@
      data.fieldNames = { key: 'tid', title: 'name' };
      return data;
    },
    GetCrudForm: () => {
      return [
        {
          field: 'PROD_CODE',
          label: '产品编码',
          component: 'Input',
          dynamicDisabled: ({ values }) => {
            return true;
          },
          colProps: { span: 12 },
        },
        {
          field: 'ID',
          label: 'ID',
          component: 'Input',
          show: false,
        },
        {
          field: 'ACT_ID',
          label: 'ACT_ID',
          component: 'Input',
          show: false,
        },
        {
          field: 'ROT_ID',
          label: 'ROT_ID',
          component: 'Input',
          show: false,
        },
        {
          field: 'ACT_CODE',
          label: 'ACT_CODE',
          component: 'Input',
          show: false,
        },
        {
          field: 'NODE_ID',
          label: 'NODE_ID',
          component: 'Input',
          show: false,
        },
        {
          field: 'CUST_CODE',
          label: '客户编码',
          component: 'Input',
          dynamicDisabled: ({ values }) => {
            return true;
          },
          colProps: { span: 12 },
        },
        {
          field: 'ACT_TYPE',
          label: '行为类型',
          component: 'ApiSelect',
          colProps: { span: 12 },
          defaultValue: 0,
          componentProps: {
            api: GetEnum,
            params: { name: 'MES_PROD_ACTION+ACT_TYPEs' },
            resultField: 'Data',
            labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
            valueField: 'Value',
            // onChange: (e, v) => {
            //   alert(e)
            //   console.log('ApiSelect====>:', e, v);
            // },
          },
        },
        {
          field: 'IS_ACTIVE',
          label: '是否启用',
          required: true,
          component: 'Select',
          colProps: { span: 12 },
          componentProps: {
            options: [
              {
                label: '是',
                value: 'Y',
                key: 'Y',
    GetCrudForm: (type: string) => {
      let form: any[] = [];
      switch (type) {
        case 'Action':
          form = [
            {
              field: 'PROD_CODE',
              label: '产品编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              {
                label: '否',
                value: 'N',
                key: 'N',
              colProps: { span: 12 },
            },
            {
              field: 'ID',
              label: 'ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ACT_ID',
              label: 'ACT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ROT_ID',
              label: 'ROT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ACT_CODE',
              label: 'ACT_CODE',
              component: 'Input',
              show: false,
            },
            {
              field: 'NODE_ID',
              label: 'NODE_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'CUST_CODE',
              label: '客户编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
            ],
          },
        },
        {
          field: 'RULE_CODE',
          label: '扫码验证',
          component: 'Input',
          colProps: { span: 10 },
          ifShow: ({ values }) => isScan(values.ACT_TYPE),
        },
        {
          field: '0',
          label: '1',
          defaultValue: '',
          component: 'Input',
          colProps: { span: 2, pull: 1 },
          ifShow: ({ values }) => isScan(values.ACT_TYPE),
          colSlot: 'scanadd',
        },
        {
          field: 'ITEM_CODE',
          label: '组装上料',
          colProps: { span: 10 },
          component: 'Input',
          ifShow: ({ values }) => isAssy(values.ACT_TYPE),
        },
        {
          field: '00',
          label: '1',
          defaultValue: '',
          component: 'Input',
          colProps: { span: 2, pull: 1 },
          ifShow: ({ values }) => isAssy(values.ACT_TYPE),
          colSlot: 'assyadd',
        },
        {
          field: 'TEST_CODE',
          label: '产品测试',
          colProps: { span: 10 },
          component: 'Input',
          ifShow: ({ values }) => isTest(values.ACT_TYPE),
        },
        {
          field: 'test0',
          label: '1',
          defaultValue: '',
          component: 'Input',
          colProps: { span: 2, pull: 1 },
          ifShow: ({ values }) => isTest(values.ACT_TYPE),
          colSlot: 'testadd',
        },
        {
          field: 'SAPL_CODE',
          label: '产品抽检',
          colProps: { span: 10 },
          component: 'Input',
          ifShow: ({ values }) => isAudit(values.ACT_TYPE),
        },
        {
          field: 'audit0',
          label: '1',
          defaultValue: '',
          component: 'Input',
          colProps: { span: 2, pull: 1 },
          ifShow: ({ values }) => isAudit(values.ACT_TYPE),
          colSlot: 'auditadd',
        },
        {
          field: 'LABEL_CODE',
          label: '标签打印',
          colProps: { span: 10 },
          component: 'Input',
          ifShow: ({ values }) => isPrint(values.ACT_TYPE),
        },
        {
          field: 'print0',
          label: '1',
          defaultValue: '',
          component: 'Input',
          colProps: { span: 2, pull: 1 },
          ifShow: ({ values }) => isPrint(values.ACT_TYPE),
          colSlot: 'printadd',
        },
        {
          field: 'pkgRULE_CODE',
          label: '包装规则',
          colProps: { span: 10 },
          component: 'Input',
          ifShow: ({ values }) => isPackage(values.ACT_TYPE),
        },
        {
          field: 'pkg0',
          label: '1',
          defaultValue: '',
          component: 'Input',
          colProps: { span: 2, pull: 1 },
          ifShow: ({ values }) => isPackage(values.ACT_TYPE),
          colSlot: 'pkgadd',
        },
        {
          field: 'REMARK',
          label: '备注',
          component: 'Input',
          colProps: { span: 12 },
        },
      ];
              colProps: { span: 12 },
            },
            {
              field: 'ACT_TYPE',
              label: '行为类型',
              component: 'ApiSelect',
              colProps: { span: 12 },
              defaultValue: 0,
              componentProps: {
                api: GetEnum,
                params: { name: 'MES_PROD_ACTION+ACT_TYPEs' },
                resultField: 'Data',
                labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
                valueField: 'Value',
                // onChange: (e, v) => {
                //   alert(e)
                //   console.log('ApiSelect====>:', e, v);
                // },
              },
            },
            {
              field: 'IS_ACTIVE',
              label: '是否启用',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'RULE_CODE',
              label: '扫码验证',
              component: 'Input',
              colProps: { span: 10 },
              ifShow: ({ values }) => isScan(values.ACT_TYPE),
            },
            {
              field: '0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isScan(values.ACT_TYPE),
              colSlot: 'scanadd',
            },
            {
              field: 'ITEM_CODE',
              label: '组装上料',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isAssy(values.ACT_TYPE),
            },
            {
              field: '00',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isAssy(values.ACT_TYPE),
              colSlot: 'assyadd',
            },
            {
              field: 'TEST_CODE',
              label: '产品测试',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isTest(values.ACT_TYPE),
            },
            {
              field: 'test0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isTest(values.ACT_TYPE),
              colSlot: 'testadd',
            },
            {
              field: 'SAPL_CODE',
              label: '产品抽检',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isAudit(values.ACT_TYPE),
            },
            {
              field: 'audit0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isAudit(values.ACT_TYPE),
              colSlot: 'auditadd',
            },
            {
              field: 'LABEL_CODE',
              label: '标签打印',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isPrint(values.ACT_TYPE),
            },
            {
              field: 'print0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isPrint(values.ACT_TYPE),
              colSlot: 'printadd',
            },
            {
              field: 'pkgRULE_CODE',
              label: '包装规则',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isPackage(values.ACT_TYPE),
            },
            {
              field: 'pkg0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isPackage(values.ACT_TYPE),
              colSlot: 'pkgadd',
            },
            {
              field: 'REMARK',
              label: '备注',
              component: 'Input',
              colProps: { span: 12 },
            },
          ];
          break;
        case 'Node':
          form = [
            {
              field: 'PROD_CODE',
              label: '产品编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              colProps: { span: 12 },
            },
            {
              field: 'ID',
              label: 'ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ACT_ID',
              label: 'ACT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ROT_ID',
              label: 'ROT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'NODE_ID',
              label: 'NODE_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'NODE_NAME',
              label: '工序节点名称',
              component: 'Input',
            },
            {
              field: 'CUST_CODE',
              label: '客户编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              colProps: { span: 12 },
            },
            {
              field: 'OPER_CODE',
              label: '工序编码',
              component: 'Input',
            },
            {
              field: 'IS_ACTIVE',
              label: '是否启用',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'IS_CALC_FPY',
              label: '是否计算直通率',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'CAN_SKIP',
              label: '是否允许跳站',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'IS_INPUT',
              label: '是否投入站',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'IS_OUTPUT',
              label: '是否产出站',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'REMARK',
              label: '备注',
              component: 'Input',
              colProps: { span: 12 },
            },
          ];
          break;
      }
      return form;
    },
    /**
     * @description: 获取表单中的字段插槽列表
@@ -292,38 +464,75 @@
      if (!isNullOrEmpty(params['objParams'].value['CODE'])) {
        sqlcmd += `And PROD_CODE = '${params['objParams'].value['CODE']}'`;
      }
      // if (!isNullOrEmpty(Cust_Code.value)) {
      //   sqlcmd += `And CUST_CODE = '${Cust_Code.value}'`;
      // }
      if (!isNullOrEmpty(params['selectedNodes'].value[0].code)) {
        sqlcmd += `And ACT_ID = '${params['selectedNodes'].value[0].code}'`;
      if (!isNullOrEmpty(params['selectedNodes'].value[0].cust)) {
        sqlcmd += `And CUST_CODE = '${params['selectedNodes'].value[0].cust}'`;
      }
      if (!isNullOrEmpty(params['selectedNodes'].value[0].id)) {
        sqlcmd +=
          params['selectedNodes'].value[0].type == 'Action'
            ? `And ACT_ID = '${params['selectedNodes'].value[0].id}'`
            : `And NODE_ID = '${params['selectedNodes'].value[0].id}'`;
      }
      getEntity({
        sqlcmd: sqlcmd,
        entityName: 'MES_PROD_ACTION',
        entityName:
          params['selectedNodes'].value[0].type == 'Action' ? 'MES_PROD_ACTION' : 'MES_PROD_OPER',
      }).then((res) => {
        params['resetFields']();
        params['setFieldsValue']({
          ID: res.Data.Items[0].ID,
          ACT_ID: res.Data.Items[0].ACT_ID,
          ROT_ID: res.Data.Items[0].ROT_ID,
          NODE_ID: res.Data.Items[0].NODE_ID,
          IS_ACTIVE: res.Data.Items[0].IS_ACTIVE,
          ITEM_CODE: res.Data.Items[0].ITEM_CODE,
          ACT_CODE: res.Data.Items[0].ACT_CODE,
          REMARK: res.Data.Items[0].REMARK,
          PROD_CODE: params['objParams'].value['CODE'],
          ACT_TYPE: res.Data.Items[0].ACT_TYPE,
          CUST_CODE: params['selectedNodes'].value[0].cust,
        });
        if (params['selectedNodes'].value[0].type == 'Action') {
          params['setFieldsValue']({
            ID: res.Data.Items[0].ID,
            ACT_ID: res.Data.Items[0].ACT_ID,
            ROT_ID: res.Data.Items[0].ROT_ID,
            NODE_ID: res.Data.Items[0].NODE_ID,
            IS_ACTIVE: res.Data.Items[0].IS_ACTIVE,
            ITEM_CODE: res.Data.Items[0].ITEM_CODE,
            RULE_CODE: res.Data.Items[0].RULE_CODE,
            TEST_CODE: res.Data.Items[0].TEST_CODE,
            SAPL_CODE: res.Data.Items[0].SAPL_CODE,
            LABEL_CODE: res.Data.Items[0].LABEL_CODE,
            PKG_CODE: res.Data.Items[0].PKG_CODE,
            ACT_CODE: res.Data.Items[0].ACT_CODE,
            REMARK: res.Data.Items[0].REMARK,
            PROD_CODE: params['objParams'].value['CODE'],
            ACT_TYPE: res.Data.Items[0].ACT_TYPE,
            CUST_CODE: params['selectedNodes'].value[0].cust,
          });
        }
        if (params['selectedNodes'].value[0].type == 'Node') {
          params['setFieldsValue']({
            ID: res.Data.Items[0].ID,
            OPER_CODE: res.Data.Items[0].OPER_CODE,
            ROT_ID: res.Data.Items[0].ROT_ID,
            NODE_ID: res.Data.Items[0].NODE_ID,
            NODE_NAME: res.Data.Items[0].NODE_NAME,
            IS_ACTIVE: res.Data.Items[0].IS_ACTIVE,
            IS_CALC_FPY: res.Data.Items[0].IS_CALC_FPY,
            CAN_SKIP: res.Data.Items[0].CAN_SKIP,
            IS_INPUT: res.Data.Items[0].IS_INPUT,
            IS_OUTPUT: res.Data.Items[0].IS_OUTPUT,
            REMARK: res.Data.Items[0].REMARK,
            PROD_CODE: params['objParams'].value['CODE'],
            CUST_CODE: params['selectedNodes'].value[0].cust,
          });
        }
      });
    },
    /**
     * @description: 自定义提交方法
     * @return {*}
     */
    SubmitFunc: (values: Recordable<any>, emit) => {
      SaveEntity(values, true, 'MES_PROD_ACTION').then((action) => {
    SubmitFunc: (values: Recordable<any>, type: string, emit) => {
      let entityName = '';
      switch (type) {
        case 'Action':
          entityName = 'MES_PROD_ACTION';
          break;
        case 'Node':
          entityName = 'MES_PROD_OPER';
          break;
      }
      SaveEntity(values, true, entityName).then((action) => {
        if (action.IsSuccessed) {
          emit('success');
        }
@@ -437,9 +646,9 @@
     * @param {string} type
     * @return {*}
     */
    GetTitle: () => {
    GetTitle: (type: string) => {
      return {
        configTitle: '行为配置',
        configTitle: type == 'Action' ? '行为配置' : '工序配置',
        navTitle: '添加工艺路线',
      };
    },
@@ -449,7 +658,7 @@
     * @return {*}
     */
    SelectNode: (selectedNodes: Ref<any[]>) => {
      let result = { showConfig: false, showNav: false };
      let result = { showConfig: false, showNav: false, type: selectedNodes.value[0].type };
      if (isNullOrUnDef(selectedNodes)) {
        return result;
      }
@@ -457,7 +666,7 @@
        result.showNav = true;
        result.showConfig = false;
      }
      if (selectedNodes.value[0].type == 'Action') {
      if (selectedNodes.value[0].type == 'Action' || selectedNodes.value[0].type == 'Node') {
        result.showNav = false;
        result.showConfig = true;
      }
src/views/tigerprojects/system/lowcode/normalDrawer.vue
@@ -158,8 +158,7 @@
  function handleItemSuccess(d, u, item) {
    /* 动态import实体名.ts的自定义方法 */
    try {
      import(
        /* @vite-ignore */ `./entityts/${getFieldsValue()[`${item.replace(/add/, '')}PSelect_0`]}`
      import(`./entityts/${getFieldsValue()[`${item.replace(/add/, '')}PSelect_0`]}.ts`
      )
        .then((m) => {
          const [{ GetSelectSuccess }] = m.default();
@@ -181,8 +180,7 @@
  function handleSelectItem(item) {
    /* 动态import实体名.ts的自定义方法 */
    try {
      import(
        /* @vite-ignore */ `./entityts/${getFieldsValue()[`${item.replace(/add/, '')}PSelect_0`]}`
      import(`./entityts/${getFieldsValue()[`${item.replace(/add/, '')}PSelect_0`]}.ts`
      )
        .then((m) => {
          const [{ OpenSelectItem }] = m.default();