Ben Lin
2024-08-04 54bd2e89b8689e9aa8ab6edcda003da46065cb19
工单工艺路线编辑
已修改21个文件
760 ■■■■ 文件已修改
src/api/tigerapi/mes/mesApi.ts 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/mes/router.ts 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/model/router.ts 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/RouteViewModal.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/components/PostProps.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/index.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/typings/v-form-component.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/Config.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/data.ts 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/detail/detail.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT_GRP.ts 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/V_BAS_PROD.ts 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts 438 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/high/dtl.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/mes/mesApi.ts
@@ -4,11 +4,15 @@
 * @version: 
 * @Date: 2024-04-27 15:54:50
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-29 21:17:12
 * @LastEditTime: 2024-08-04 18:03:42
 */
export enum mesApi {
  GetRoute = '/MES/GetRoute',
  GetRouteData = '/MES/GetRouteData',
  GetWoRouteData = '/MES/GetWoRouteData',
  SaveRouteNodePost = '/MES/SaveRouteNodePost',
  SaveWoRouteNodePost = '/MES/SaveWoRouteNodePost',
  SaveWoRouteData = '/MES/SaveWoRouteData',
  SaveRouteData = '/MES/SaveRouteData',
  SaveRoute = '/MES/SaveRoute',
  DeleteRoute = '/MES/DeleteRoute',
@@ -16,7 +20,6 @@
  DeleteMesWo = '/MES/DeleteMesWo',
  SaveMesWs = '/MES/SaveMesWs',
  DeleteMesWs = '/MES/DeleteMesWs',
  SaveRouteNodePost = '/MES/SaveRouteNodePost',
  GetRoutePTree = '/MES/GetRoutePTree',
  GetWoPTree = '/MES/GetWoPTree',
  RouteToProd = '/MES/RouteToProd',
src/api/tigerapi/mes/router.ts
@@ -5,10 +5,11 @@
import { mesApi } from './mesApi';
import { useUserStore } from '/@/store/modules/user';
import { DelProdRotInput, DelWoRotInput, RoutePageListGetResultModel, RoutelistPageParams } from '../model/mesModel';
import { StringLiteral } from 'typescript';
/*
 * 获取工艺路线列表
/**
 * @description: 获取工艺路线列表
 * @param {string} route_code
 * @return {*}
 */
export function getRouteData(route_code: string) {
  const params = genAction('', route_code);
@@ -29,6 +30,29 @@
}
/**
 * @description: 获取工单工艺路线列表
 * @param {string} route_code
 * @return {*}
 */
export function getWoRouteData(route_code: string) {
  const params = genAction('', route_code);
  return getWoRotApi(params);
}
async function getWoRotApi(params: ApiAction<string>) {
  const data = await defHttp.post<ApiAction<RouteData>>(
    {
      url: mesApi.GetWoRouteData,
      params,
    },
    {
      errorMessageMode: 'modal',
      isTransformResponse: false,
    },
  );
  return data;
}
/**
 * @description: 保存工艺路线
 * @param {RouteData} params
 * @return {*}
@@ -36,6 +60,22 @@
export const SaveRouteData = async (params: RouteData) => {
  const data = await defHttp.post(
    { url: mesApi.SaveRouteData, params: genAction('', params) },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
    },
  );
  return data;
};
/**
 * @description: 保存工单工艺路线
 * @param {RouteData} params
 * @return {*}
 */
export const SaveWoRouteData = async (params: RouteData) => {
  const data = await defHttp.post(
    { url: mesApi.SaveWoRouteData, params: genAction('', params) },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
@@ -143,6 +183,11 @@
    },
  );
/**
 * @description: 保存工艺路线的岗位资源
 * @param {MES_ROUTE_NODE_POST} params
 * @return {*}
 */
export const SaveRouteNodePost = async (params: MES_ROUTE_NODE_POST[]) => {
  const data = await defHttp.post(
    { url: mesApi.SaveRouteNodePost, params: genAction('MES_ROUTE_NODE_POST', params) },
@@ -155,6 +200,22 @@
};
/**
 * @description: 保存工单工艺路线的岗位资源
 * @param {MES_ROUTE_NODE_POST} params
 * @return {*}
 */
export const SaveWoRouteNodePost = async (params: MES_ROUTE_NODE_POST[]) => {
  const data = await defHttp.post(
    { url: mesApi.SaveWoRouteNodePost, params: genAction('MES_WO_NODE_POST', params) },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
    },
  );
  return data;
};
/**
 * @description: 获取产品工艺路线树形数据
 * @param {string} params
 * @return {*}
src/api/tigerapi/model/router.ts
@@ -1,3 +1,5 @@
import { BIZ_MES_WO } from "./mesModel";
export interface MES_ROUTE {
  ID: string;
  CREATE_TIME: Date;
@@ -12,6 +14,9 @@
  ROT_NAME: string;
  ROT_TYPE: number;
  ROT_VER: number;
  WORK_ORDER: string;
  PROD_CODE: string;
  CUST_CODE: string;
  IS_ACTIVE: string;
  REMARK: string;
}
@@ -28,6 +33,9 @@
  AUTH_WH: string;
  NODE_NAME: string;
  ROT_ID: string;
  WORK_ORDER: string;
  PROD_CODE: string;
  CUST_CODE: string;
  SEGMENT: string;
  OPER_CODE: string;
  GPH_TYPE: string;
@@ -63,6 +71,9 @@
  AUTH_WH: string;
  EDGE_NAME: string;
  ROT_ID: string;
  WORK_ORDER: string;
  PROD_CODE: string;
  CUST_CODE: string;
  SRC_NODE: string;
  TGT_NODE: string;
  GPH_TYPE: string;
@@ -94,6 +105,9 @@
  AUTH_WH: string;
  ACT_NAME: string;
  ROT_ID: string;
  WORK_ORDER: string;
  PROD_CODE: string;
  CUST_CODE: string;
  NODE_ID: string;
  ACT_CODE: string;
  ACT_TYPE: number;
src/views/components/RouteViewModal.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-18 15:09:48
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-03 21:00:23
 * @LastEditTime: 2024-08-04 16:34:13
-->
<template>
  <BasicModal
@@ -16,7 +16,7 @@
    :width="width"
  >
    <!-- 这里嵌入router-view来展示路由页面 -->
    <Route_View :rotId="rotId" />
    <Route_View :rotId="rotId" :rotType="rotType" />
  </BasicModal>
</template>
<script lang="ts" setup>
@@ -31,14 +31,17 @@
  const title = ref('');
  const width = ref('');
  const rotId = ref('');
  const rotType = ref('');
  const submitFn = ref('');
  const slotName = ref('');
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false, cancelText: '关闭', showOkBtn: false });
    rotId.value = data?.rotId;
    rotType.value = data?.rotType;
    slotName.value = data?.slotName;
    submitFn.value = data?.submitFn; //'rvSubmit'
  });
  onMounted(() => {});
src/views/tigerprojects/mes/eng/route/components/PostProps.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-11 21:07:04
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-26 08:48:12
 * @LastEditTime: 2024-08-04 18:34:26
-->
<!--
 * @Description: 右侧属性面板控件 表单属性面板
@@ -28,6 +28,7 @@
                placement: 'left',
                confirm: handleDelete.bind(null, record),
              },
              name: '',
            },
          ]"
        />
@@ -45,15 +46,10 @@
  import { useModal } from '/@/components/Modal';
  import GeneralModal from '/@/views/components/GeneralModal.vue';
  import { useI18n } from '/@/hooks/web/useI18n';
  import {
    DeleteEntity,
    DeleteWhere,
    SaveEntity,
    getEntity,
    getListByPage,
  } from '/@/api/tigerapi/system';
  import { DeleteWhere, getListByPage } from '/@/api/tigerapi/system';
  import { useRouteDesignState } from '../hooks/useRouteDesignState';
  import { SaveRouteNodePost } from '/@/api/tigerapi/mes/router';
  import { SaveRouteNodePost, SaveWoRouteNodePost } from '/@/api/tigerapi/mes/router';
  import { WORD_BREAK } from 'html2canvas/dist/types/css/property-descriptors/word-break';
  const { t } = useI18n();
  const { routeConfig, mesRoute } = useRouteDesignState();
@@ -81,7 +77,9 @@
  const [registerTable, { reload }] = useTable({
    title: '列表',
    api: getListByPage,
    searchInfo: { TABLE_NAME: 'V_MES_ROUTE_NODE_POST', NODE_ID: routeConfig.currentItem.ID },
    searchInfo: routeConfig['isWorkOrder']
      ? { TABLE_NAME: 'V_MES_WO_NODE_POST', NODE_ID: routeConfig['currentItem'].ID }
      : { TABLE_NAME: 'V_MES_ROUTE_NODE_POST', NODE_ID: routeConfig['currentItem'].ID },
    columns,
    useSearchForm: false,
    showTableSetting: false,
@@ -164,9 +162,10 @@
   * @return {*}
   */
  function handleDelete(record: Recordable) {
    let entityName = routeConfig['isWorkOrder'] ? 'MES_WO_NODE_POST' : 'MES_ROUTE_NODE_POST';
    DeleteWhere(
      `POST_CODE = '${record.POST_CODE}' And NODE_ID = '${record.NODE_ID}'`,
      'MES_ROUTE_NODE_POST',
      entityName,
    ).then((res) => {
      reload();
    });
@@ -183,10 +182,21 @@
    let eintity: any[] = [];
    var i;
    for (i = 0; i < codes.length; i++) {
      eintity.push({ NODE_ID: routeConfig.currentItem.ID, POST_CODE: codes[i], REMARK: '' });
      eintity.push({
        NODE_ID: routeConfig['currentItem'].ID,
        POST_CODE: codes[i],
        REMARK: '',
        WORK_ORDER: routeConfig['currentItem'].WORK_ORDER,
      });
    }
    SaveRouteNodePost(eintity).then((res) => {
      reload();
    });
    if (routeConfig['isWorkOrder']) {
      SaveWoRouteNodePost(eintity).then((res) => {
        reload();
      });
    } else {
      SaveRouteNodePost(eintity).then((res) => {
        reload();
      });
    }
  }
</script>
src/views/tigerprojects/mes/eng/route/index.vue
@@ -47,7 +47,12 @@
<script lang="ts" setup>
  import { FlowChart } from '/@/components/FlowChart';
  import { PageWrapper } from '/@/components/Page';
  import { SaveRouteData, getRouteData } from '/@/api/tigerapi/mes/router';
  import {
    SaveRouteData,
    SaveWoRouteData,
    getRouteData,
    getWoRouteData,
  } from '/@/api/tigerapi/mes/router';
  import { useModal } from '/@/components/Modal';
  import RouteModal from './RouteModal.vue';
  import { onMounted, ref, unref, Ref, provide, reactive, nextTick, watch } from 'vue';
@@ -94,6 +99,7 @@
    currentAct: {} as MES_ROUTE_NODE_ACT,
    routeData: {} as RouteData,
    activeKey: 1,
    isWorkOrder: false,
  });
  const currRoute = ref({} as MES_ROUTE);
  const routeData = ref({
@@ -109,6 +115,7 @@
  const entityName = ref<any>('MES_POSITION');
  const props = defineProps({
    rotId: { type: String, default: '' },
    rotType: { type: String, default: 'Route' },
  });
  const IsOperation = ref(false);
  const title = ref('');
@@ -118,7 +125,7 @@
  watch(
    () => props.rotId,
    (v) => {
      if (v !== currRotId.value) {
      if (!isNullOrEmpty(v) && v !== currRotId.value) {
        currRotId.value = v;
        if (!isNullOrUnDef(unref(currlf))) {
          unref(currlf).render({});
@@ -145,7 +152,11 @@
  async function init(lf) {
    currlf.value = unref(lf);
    //通过工艺路线ID获取图形数据,并渲染
    var _data = await getRouteData(currRotId.value);
    routeConfig.isWorkOrder = props.rotType == 'Wo';
    var _data =
      props.rotType == 'Route'
        ? await getRouteData(currRotId.value)
        : await getWoRouteData(currRotId.value);
    console.log('组件已挂载', _data);
    //工艺路线全信息,包括Node、Edge和Act
    routeConfig.routeData = _data.Data;
@@ -174,6 +185,11 @@
    }
  }
  /**
   * @description: 获取工艺路线图数据
   * @param {*} lf
   * @return {*}
   */
  const GetRotData = (lf) => {
    var currRotData: RouteData = {
      route: {
@@ -192,6 +208,9 @@
        AUTH_ORG: useUserStore().getUserInfo.orgCode,
        AUTH_PROD: '',
        AUTH_WH: '',
        WORK_ORDER: currRoute.value.WORK_ORDER,
        PROD_CODE: currRoute.value.PROD_CODE,
        CUST_CODE: currRoute.value.CUST_CODE,
      },
      nodes: [],
      edges: [],
@@ -244,6 +263,9 @@
              // DO_IF_FAIL: a.DO_IF_FAIL,
              node: {} as node,
              IS_ACTIVE: a.IS_ACTIVE,
              WORK_ORDER: a.WORK_ORDER,
              PROD_CODE: a.PROD_CODE,
              CUST_CODE: a.CUST_CODE,
            };
            var pnode = [n];
            while (pnode[0].properties.operType == 'Action') {
@@ -294,6 +316,9 @@
              OPTION_4: '',
              OPTION_5: '',
              node: {} as node,
              WORK_ORDER: nd.WORK_ORDER,
              PROD_CODE: nd.PROD_CODE,
              CUST_CODE: nd.CUST_CODE,
            };
            nd.GPH_TYPE = n.type;
            nd.GPH_PROP = JSON.stringify(n.properties);
@@ -342,6 +367,9 @@
        OPTION_4: '',
        OPTION_5: '',
        edge: {} as edge,
        WORK_ORDER: routeConfig.routeData.route.WORK_ORDER,
        PROD_CODE: routeConfig.routeData.route.PROD_CODE,
        CUST_CODE: routeConfig.routeData.route.CUST_CODE,
      };
      routeConfig.routeData.edges.push(edge);
      currRotData.edges.push(edge);
@@ -355,7 +383,10 @@
   */
  async function handleSave(lf) {
    console.log('handleSave', unref(lf).getGraphData().nodes[0]);
    if (isNullOrEmpty(currRoute.value.ROT_CODE)) {
    if (
      isNullOrEmpty(currRoute.value.ROT_CODE) ||
      (props.rotType == 'Wo' && isNullOrEmpty(currRoute.value.WORK_ORDER))
    ) {
      createErrorModal({
        title: t('未选择'),
        content: t('未选择工艺路线或者新增工艺路线'),
@@ -380,7 +411,10 @@
          getContainer: () => document.body,
        });
      } else {
        var action = await SaveRouteData(GetRotData(lf));
        var action =
          props.rotType == 'Wo'
            ? await SaveWoRouteData(GetRotData(lf))
            : await SaveRouteData(GetRotData(lf));
        if (action.IsSuccessed) {
          await refreshPage();
        }
@@ -455,6 +489,9 @@
        OPTION_4: '',
        OPTION_5: '',
        node: {} as node,
        WORK_ORDER: currRoute.value.WORK_ORDER,
        PROD_CODE: currRoute.value.PROD_CODE,
        CUST_CODE: currRoute.value.CUST_CODE,
      };
      routeConfig.routeData.nodes.push(_node);
      _num++;
@@ -504,6 +541,9 @@
          OPTION_5: '',
          REMARK: '',
          node: {} as node,
          WORK_ORDER: currRoute.value.WORK_ORDER,
          PROD_CODE: currRoute.value.PROD_CODE,
          CUST_CODE: currRoute.value.CUST_CODE,
        };
        routeConfig.routeData.acts.push(_act);
        _numEdge++;
@@ -542,6 +582,9 @@
        OPTION_5: '',
        REMARK: '',
        node: {} as node,
        WORK_ORDER: currRoute.value.WORK_ORDER,
        PROD_CODE: currRoute.value.PROD_CODE,
        CUST_CODE: currRoute.value.CUST_CODE,
      };
      const actModel = lf.getNodeModelById(selectnode.value.id);
      actModel.updateText(routeConfig.currentAct?.ACT_NAME);
@@ -574,6 +617,10 @@
        ALLOW_DFT_IN: _node.ALLOW_DFT_IN,
        IS_OUTPUT: _node.IS_OUTPUT,
        REMARK: _node.REMARK,
        WORK_ORDER: currRoute.value.WORK_ORDER,
        PROD_CODE: currRoute.value.PROD_CODE,
        CUST_CODE: currRoute.value.CUST_CODE,
        node: {} as node,
      };
      const nodeModel = lf.getNodeModelById(selectnode.value.id);
      nodeModel.updateText(_node.NODE_NAME);
src/views/tigerprojects/mes/eng/route/typings/v-form-component.ts
@@ -50,6 +50,7 @@
  isInput?: boolean;
  isOutput?: boolean;
  schemas?: Array<any>;
  isWorkOrder?: boolean;
}
/**
src/views/tigerprojects/system/lowcode/composition/Config.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-24 23:44:31
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-04 01:21:43
 * @LastEditTime: 2024-08-04 15:33:56
-->
<template>
  <Card :title="GetTitle(props.configType)['configTitle']">
@@ -134,6 +134,7 @@
            if (showOtherTable.value) {
              showOtherTable.value = false;
              data.value['Table'] = result['Table'];
              data.value['Action'] = result['Action']
              setTimeout(() => {
                showOtherTable.value = true;
              }, 10);
@@ -160,7 +161,9 @@
    const nodes = selectedNodes.value;
    nodeChange({ useForms, objParams, selectedNodes: nodes }).then((result) => {
      showOtherTable.value = result.isShow;
      data.value['Action'] = result['Action'];
      if (showOtherTable.value) {
        data.value['Table'] = result['Table'];
        useTables.value['Table'][1].setProps({
          dataSource: [],
        });
@@ -196,7 +199,7 @@
      isUpdate: true,
      entityName: objParams.value['OtherTableName'],
      formJson: GetCrudForm(props.OtherTableName),
      ifSave: true,
      ifSave: objParams.value['ifSave'],
      // cType,
      // dtlSlots,
      // formSchemas,
@@ -229,7 +232,6 @@
          values: d,
          data: data,
        },
        useTables,
      ).then(() => {
        /* 显示其他表格 */
        if (showOtherTable.value) {
@@ -240,6 +242,8 @@
          useTables.value = GetUseTables(data, emit);
          setTimeout(() => {
            useTables.value['Table'][1].reload();
            useForms.value['Action'][1].resetFields();
            useForms.value['Action'][1].setFieldsValue(data.value['Action'][0]);
          }, 10);
        }
      });
src/views/tigerprojects/system/lowcode/composition/index.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-18 23:30:30
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-04 00:14:39
 * @LastEditTime: 2024-08-04 17:50:50
-->
<template>
  <PageWrapper
@@ -29,7 +29,12 @@
            </div>
          </template>
        </CarGridNav>
        <Config v-if="showConfig" :configType="configType" :OtherTableName="OtherTableName" @success="configSuccess" />
        <Config
          v-if="showConfig"
          :configType="configType"
          :OtherTableName="OtherTableName"
          @success="configSuccess"
        />
      </div>
    </Suspense>
    <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable">
@@ -165,12 +170,12 @@
  const currlf = ref(null) as Ref<LogicFlow | null>;
  /**
   * @description: 工艺路线初始化
   * @description: 工艺路线初始化,特殊页面自定义内容
   * @param {*} lf
   * @return {*}
   */
  async function init(lf, rotId) {
    initRoute(lf, rotId, routeData, currlf);
    initRoute(lf, rotId, routeData, currlf, objParams.value.rotType);
  }
  /**
@@ -189,8 +194,13 @@
      nodes: [],
      edges: [],
    };
    /* 自定义内容,只有显示工艺路线的组合页面会进来 */
    if (e.nodes[0].type == 'Route') {
      initRoute(currlf, e.nodes[0].code, routeData, currlf);
      let _rotId = e.nodes[0].code;
      if (objParams.value.rotType == 'Wo') {
        _rotId = e.nodes[0].wo;
      }
      initRoute(currlf, _rotId, routeData, currlf, objParams.value.rotType);
    }
  }
src/views/tigerprojects/system/lowcode/data.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-02 17:52:35
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-03 23:48:01
 * @LastEditTime: 2024-08-04 17:43:44
 */
import { ActionItem, FormSchema, PopConfirm } from '/@/components/Table';
@@ -13,7 +13,7 @@
import { woCustFn, woformSchema } from '/@/views/components/bizMesWo';
import { useModal } from '/@/components/Modal';
import { Ref, unref } from 'vue';
import { getRouteData } from '/@/api/tigerapi/mes/router';
import { getRouteData, getWoRouteData } from '/@/api/tigerapi/mes/router';
import { buildUUID } from '/@/utils/uuid';
import { useUserStore } from '/@/store/modules/user';
import { formatToDateTime } from '/@/utils/dateUtil';
@@ -154,10 +154,10 @@
 * @param {*} lf
 * @return {*}
 */
export async function initRoute(lf, rotId, routeData, currlf) {
export async function initRoute(lf, rotId, routeData, currlf, rotType) {
  currlf.value = unref(lf);
  //通过工艺路线ID获取图形数据,并渲染
  var _data = await getRouteData(rotId);
  var _data = rotType == 'Wo'?await getWoRouteData(rotId): await getRouteData(rotId);
  console.log('组件已挂载', _data);
  if (_data.Data != null) {
    _data.Data.nodes.forEach((n) => {
src/views/tigerprojects/system/lowcode/detail/detail.vue
@@ -175,7 +175,7 @@
    const params = {
      record,
      isUpdate: true,
      ifSave: true,
      ifSave: objParams.value['ifSave'],
      entityName: props.entityName,
      formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`),
      cType,
@@ -217,7 +217,7 @@
    if (isNullOrUnDef(custImport.value['default'])) {
      openDrawer(true, {
        isUpdate: false,
        ifSave: true,
        ifSave: objParams.value['ifSave'],
        entityName: props.entityName,
        formJson: _cruds, //getFormSchema(`${entityName.value}_Crud`),
        crudColSlots: colSlots.value,
@@ -242,7 +242,7 @@
        case 'drawer':
          openDrawer(true, {
            isUpdate: false,
            ifSave: true,
            ifSave: objParams.value['ifSave'],
            entityName: props.entityName,
            formJson: _cruds, //getFormSchema(`${entityName.value}_Crud`),
            crudColSlots: colSlots.value,
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT_GRP.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-28 12:46:53
 * @LastEditTime: 2024-08-04 14:20:02
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -41,6 +41,7 @@
          Title: '新增不良代码组',
          // pCode: 'DFTG_CODE',
          IsID: false,
          ifSave: false,
          drawers: [{ name: 'BAS_DEFECT', code: 'DFTG_CODE', type: 'one', keyName: 'BAS_DEFECT' }], //drawers是右边弹出增改侧框的名字列表
        },
      };
@@ -127,6 +128,7 @@
      Title: `编辑不良代码组:${params['record']['DFTG_CODE']}`,
      pCode: 'DFTG_CODE',
      IsID: false,
      ifSave: false,
      drawers: [{ name: 'BAS_DEFECT', code: 'DFTG_CODE', type: 'one', keyName: 'BAS_DEFECT' }], //drawers是右边弹出增改侧框的名字列表
    };
    // 将对象转换为JSON字符串并保存到sessionStorage
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-04 00:44:17
 * @LastEditTime: 2024-08-04 14:20:29
 */
import { DeleteLabelTemplate } from '/@/api/tigerapi/mes/label';
@@ -175,6 +175,7 @@
      Title: `编辑模板${params['record']['LABEL_CODE']}的变量`,
      pCode: 'LABEL_CODE',
      IsID: true,
      ifSave: false,
      colSlots: params['colSlots'].value, //['BAS_LABEL_VAR1add', 'BAS_LABEL_VAR2add'],
      colSlotsInHigh: ['BAS_LABEL_VAR1add', 'BAS_LABEL_VAR2add'],
      drawers: [
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-28 17:28:46
 * @LastEditTime: 2024-08-04 14:20:37
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -43,6 +43,7 @@
          Title: '新增不良原因组',
          pCode: 'RSNG_CODE',
          IsID: false,
          ifSave: false,
          drawers: [{ name: 'BAS_REASON', code: 'RSNG_CODE', type: 'one', keyName: 'BAS_REASON' }], //drawers是右边弹出增改侧框的名字列表
        },
      };
@@ -118,6 +119,7 @@
      Title: `编辑不良原因组:${params['record']['RSNG_CODE']}`,
      pCode: 'RSNG_CODE',
      IsID: false,
      ifSave: false,
      drawers: [{ name: 'BAS_REASON', code: 'RSNG_CODE', type: 'one', keyName: 'BAS_REASON' }], //drawers是右边弹出增改侧框的名字列表
    };
    // 将对象转换为JSON字符串并保存到sessionStorage
src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-25 21:46:26
 * @LastEditTime: 2024-08-04 15:49:53
 */
import { Ref, h, ref, render, unref } from 'vue';
@@ -418,11 +418,14 @@
      CODE: params['record'].ORDER_NO,
      Title: `工单[${params['record'].ORDER_NO}]工艺绑定`,
      colSlots: params['colSlots'].value, /* 表格内的查询表单字段的插槽列表,一般用于弹出选择框按钮 */
      crudColSlots: [] /* 增删改表单字段的插槽列表,一般用于弹出选择框按钮 */,
      crudColSlots:  ['BAS_LABEL_TEMP1add']  /* 增删改表单字段的插槽列表,一般用于弹出选择框按钮 */,
      dense: true,
      pageTitle: `工单工艺绑定`,
      pageContent: `这里是管理工单的工艺绑定,一个工单可以绑定多个工艺路线`,
      SessionName: 'WoRouteBinding_update',
      OtherTableName: 'BAS_PKG_DTL',
      ifSave: false,
      rotType: 'Wo'
    };
    // 将对象转换为JSON字符串并保存到sessionStorage
    sessionStorage.removeItem(`${id.SessionName}_params`);
src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-20 21:27:46
 * @LastEditTime: 2024-08-04 14:21:03
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -41,6 +41,7 @@
          Title: '新增班制', //标题
          pCode: 'SFTS_CODE', //主信息关键字段CODE
          IsID: false, //是否带过去侧边框的是ID,false就是CODE,true是ID
          ifSave: false,
          drawers: [
            { name: 'MES_SHIFT', code: 'SFTS_CODE', type: 'one', keyName: 'MES_SHIFT', order: 'SFT_CODE' },
            {
@@ -136,6 +137,7 @@
      Title: `编辑班制:${params['record']['SFTS_CODE']}`, //标题
      // pCode: 'SFTS_CODE', //主信息关键字段CODE,高级表单用下面drawers里的code
      IsID: false, //是否带过去侧边框的是ID,false就是CODE,true是ID
      ifSave: false,
      drawers: [
        { name: 'MES_SHIFT', code: 'SFTS_CODE', type: 'one', keyName: 'MES_SHIFT', order: 'SFT_CODE' }, //type: one-表示需要code: 'SFTS_CODE'只要唯一值
        { name: 'MES_SHIFT_PRD', code: 'SFT_CODE', type: 'all', keyName: 'MES_SHIFT', order: 'SFT_CODE,SEQ' }, //type: all-表示需要code: 'SFT_CODE'所有的值,keyName:表示需要所有值的code的实体名
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-08-04 01:13:27
 * @LastEditTime: 2024-08-04 15:42:50
 */
import { Ref, h, ref, render, unref } from 'vue';
@@ -14,12 +14,7 @@
  RouteToCust,
  RouteToProd,
} from '/@/api/tigerapi/mes/router';
import {
  GetEnum,
  SaveEntity,
  convertToTree,
  getEntity,
} from '/@/api/tigerapi/system';
import { GetEnum, SaveEntity, convertToTree, getEntity } from '/@/api/tigerapi/system';
import { useLocale } from '/@/locales/useLocale';
import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
import { useI18n } from '/@/hooks/web/useI18n';
@@ -121,7 +116,7 @@
          break;
        case 'BAS_PKG_DTL':
          form = crudForms[type];
        break;
          break;
      }
      return form;
    },
@@ -183,6 +178,7 @@
              PROD_CODE: params['objParams'].value['CODE'],
              ACT_TYPE: res.Data.Items[0].ACT_TYPE,
              CUST_CODE: params['selectedNodes'][0].cust,
              OPTION_1: res.Data.Items[0].OPTION_1,
            });
            result['isShow'] = isNullOrEmpty(res.Data.Items[0].PKG_CODE) ? false : true;
            const ents = await getEntity({
@@ -190,7 +186,14 @@
              entityName: 'V_BAS_PKG_DTL',
              order: '',
            });
            result['Table'] = ents.Data.Items;
            result['Table'] = isNullOrEmpty(res.Data.Items[0].OPTION_1)
              ? ents.Data.Items
              : JSON.parse(res.Data.Items[0].OPTION_1);
            /* 如果OPTION_1字段为空就把包装信息转JSON存到OPTION_1字段 */
            res.Data.Items[0].OPTION_1 = isNullOrEmpty(res.Data.Items[0].OPTION_1)
              ? JSON.stringify(ents.Data.Items)
              : res.Data.Items[0].OPTION_1;
            result['Action'] = res.Data.Items;
          }
          if (params['selectedNodes'][0].type == 'Node') {
            resetFieldsNode();
@@ -637,15 +640,20 @@
     * @param {array} args
     * @return {*}
     */
    CustFunc: async (param: CustModalParams, ...args) => {
      if (param.ctype == 'BAS_PKG_DTL') {
        let useTables = args[0];
        const ents = await getEntity({
          sqlcmd: `PKG_RULE_ID ='${param.values['PKG_RULE_ID']}'`,
          entityName: 'V_BAS_PKG_DTL',
          order: '',
    CustFunc: async (param: CustModalParams) => {
      if (param['ctype'] == 'BAS_PKG_DTL') {
        // const ents = await getEntity({
        //   sqlcmd: `PKG_RULE_ID ='${param.values['PKG_RULE_ID']}'`,
        //   entityName: 'V_BAS_PKG_DTL',
        //   order: '',
        // });
        // param.data.value['Table'] = ents.Data.Items;
        param.data.value['Table'].map((x) => {
          if (x.PKG_CODE == param.values['PKG_CODE']) {
            x.LABEL_CODE = param.values['LABEL_CODE'];
          }
        });
        param.data.value['Table'] = ents.Data.Items;
        param.data.value['Action'][0]['OPTION_1'] = JSON.stringify(param.data.value['Table']);
      }
    },
    /**
@@ -1102,6 +1110,13 @@
      component: 'Input',
      colProps: { span: 12 },
    },
    {
      field: 'OPTION_1',
      label: '行为选项1',
      component: 'Input',
      colProps: { span: 12 },
      show: false,
    },
  ];
  /**
@@ -1300,7 +1315,7 @@
      colProps: { span: 12 },
    },
  ];
  const crudForms = {
    BAS_PKG_DTL: [
      {
src/views/tigerprojects/system/lowcode/entityts/V_BAS_PROD.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-04 00:28:41
 * @LastEditTime: 2024-08-04 17:45:27
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -74,6 +74,8 @@
      pageContent: `这里是管理产品的工艺绑定,一个产品可以绑定多个工艺路线`,
      SessionName: 'ProdRouteBinding_update',
      OtherTableName: 'BAS_PKG_DTL',
      ifSave: false,
      rotType: 'Route'
    };
    // 将对象转换为JSON字符串并保存到sessionStorage
    sessionStorage.removeItem(`${id.SessionName}_params`);
src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts
@@ -4,16 +4,13 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-01 19:46:42
 * @LastEditTime: 2024-08-04 16:44:05
 */
import { Ref, h, ref, render, unref } from 'vue';
import {
  DeleteWoRoute,
  GetRoutePTree,
  GetWoPTree,
  RouteToCust,
  RouteToProd,
  SP_MES_PROD2WO,
  SP_MES_WO2CUST,
} from '/@/api/tigerapi/mes/router';
@@ -24,13 +21,13 @@
import { NavItem } from '/@/api/tigerapi/model/basModel';
import { useMessage } from '/@/hooks/web/useMessage';
import { useModal } from '/@/components/Modal';
import { FormSchema } from '/@/components/Table';
import { initRoute } from '../data';
import { BasicColumn, FormSchema, useTable } from '/@/components/Table';
import { CustModalParams } from '/@/api/tigerapi/model/systemModel';
import { useUserStore } from '/@/store/modules/user';
import { EventDataNode } from 'ant-design-vue/lib/tree';
import { ContextMenuItem } from '/@/components/TigerTree';
import { UpdateWoStatus } from '/@/api/tigerapi/mes/wo';
import { useForm } from '/@/components/Form';
const { t } = useI18n();
const { createErrorModal } = useMessage();
@@ -126,6 +123,9 @@
        case 'Node':
          form = nodeFormShema;
          break;
        case 'BAS_PKG_DTL':
          form = crudForms[type];
          break;
      }
      return form;
    },
@@ -137,74 +137,162 @@
      return ['scanadd', 'assyadd', 'testadd', 'auditadd', 'printadd', 'pkgadd'];
    },
    /**
     * @description: 获取表格use列表
     * @param {string} type
     * @param {array} args
     * @return {*}
     */
    GetUseTables: (data: Ref<{}>, ...args) => {
      return {
        Table: useTable({
          title: '列表信息',
          // api: getListByPage,
          // searchInfo: { TABLE_NAME: 'V_BAS_PKG_DTL' },
          dataSource: data.value['Table'],
          columns: GetBaseColumns('', args[0], data),
          maxHeight: 520,
          useSearchForm: false,
          showTableSetting: false,
          bordered: true,
          canResize: true,
          showIndexColumn: false,
          // rowSelection: {
          //   type: 'radio', //'checkbox'
          // },
          actionColumn: {
            width: 100,
            title: '操作',
            dataIndex: 'action',
            slots: { customRender: 'action' },
            fixed: 'right',
          }, //自定义操作列
        }),
      };
    },
    GetUseForm: () => {
      return {
        Action: useForm({
          labelWidth: 145,
          schemas: methods.GetCrudForm('Action'),
          actionColOptions: {
            offset: 8,
            span: 24,
          },
          wrapperCol: {
            span: 15,
          },
          showActionButtonGroup: true,
          submitButtonOptions: {
            text: '保存',
          },
        }),
        Node: useForm({
          labelWidth: 145,
          schemas: methods.GetCrudForm('Node'),
          actionColOptions: {
            offset: 8,
            span: 24,
          },
          wrapperCol: {
            span: 15,
          },
          showActionButtonGroup: true,
          submitButtonOptions: {
            text: '保存',
          },
        }),
      };
    },
    /**
     * @description: 切换节点时事件方法
     * @return {*}
     */
    nodeChange: (params: {
      resetFields: any;
      setFieldsValue: any;
      objParams: Ref<any>;
      selectedNodes: Ref<any[]>;
    }) => {
      let sqlcmd = ' 1=1 ';
      if (!isNullOrEmpty(params['objParams'].value['CODE'])) {
        sqlcmd += `And WORK_ORDER = '${params['objParams'].value['CODE']}'`;
      }
      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:
          params['selectedNodes'].value[0].type == 'Action' ? 'MES_WO_ACTION' : 'MES_WO_OPER',
        order: '',
      }).then((res) => {
        params['resetFields']();
        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,
            WORK_ORDER: params['objParams'].value['CODE'],
            ACT_TYPE: res.Data.Items[0].ACT_TYPE,
            CUST_CODE: params['selectedNodes'].value[0].cust,
            PROD_CODE: params['selectedNodes'].value[0].prod,
          });
    nodeChange: (params: { useForms: Ref<any>; objParams: Ref<any>; selectedNodes: any[] }) =>
      new Promise<any>(async (resolve, reject) => {
        let result = {};
        let sqlcmd = ' 1=1 ';
        if (!isNullOrEmpty(params['objParams'].value['CODE'])) {
          sqlcmd += `And WORK_ORDER = '${params['objParams'].value['CODE']}'`;
        }
        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,
            ALLOW_DFT_IN: res.Data.Items[0].ALLOW_DFT_IN,
            REMARK: res.Data.Items[0].REMARK,
            WORK_ORDER: params['objParams'].value['CODE'],
            CUST_CODE: params['selectedNodes'].value[0].cust,
            PROD_CODE: params['selectedNodes'].value[0].prod,
          });
        if (!isNullOrEmpty(params['selectedNodes'][0].id)) {
          sqlcmd +=
            params['selectedNodes'][0].type == 'Action'
              ? `And ACT_ID = '${params['selectedNodes'][0].id}'`
              : `And NODE_ID = '${params['selectedNodes'][0].id}'`;
        }
      });
    },
        try {
          const res = await getEntity({
            sqlcmd: sqlcmd,
            entityName:
              params['selectedNodes'][0].type == 'Action' ? 'MES_WO_ACTION' : 'MES_WO_OPER',
            order: '',
          });
          const setFieldsValue = params['useForms'].value['Action'][1]['setFieldsValue'];
          const setFieldsValueNode = params['useForms'].value['Node'][1]['setFieldsValue'];
          const resetFields = params['useForms'].value['Action'][1]['resetFields'];
          const resetFieldsNode = params['useForms'].value['Node'][1]['resetFields'];
          if (params['selectedNodes'][0].type == 'Action') {
            resetFields();
            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,
              WORK_ORDER: params['objParams'].value['CODE'],
              ACT_TYPE: res.Data.Items[0].ACT_TYPE,
              CUST_CODE: params['selectedNodes'][0].cust,
              PROD_CODE: params['selectedNodes'][0].prod,
              OPTION_1: res.Data.Items[0].OPTION_1,
            });
            result['isShow'] = isNullOrEmpty(res.Data.Items[0].PKG_CODE) ? false : true;
            const ents = await getEntity({
              sqlcmd: `RULE_CODE ='${res.Data.Items[0].PKG_CODE}'`,
              entityName: 'V_BAS_PKG_DTL',
              order: '',
            });
            result['Table'] = isNullOrEmpty(res.Data.Items[0].OPTION_1)
              ? ents.Data.Items
              : JSON.parse(res.Data.Items[0].OPTION_1);
            /* 如果OPTION_1字段为空就把包装信息转JSON存到OPTION_1字段 */
            res.Data.Items[0].OPTION_1 = isNullOrEmpty(res.Data.Items[0].OPTION_1)
              ? JSON.stringify(ents.Data.Items)
              : res.Data.Items[0].OPTION_1;
            result['Action'] = res.Data.Items;
          }
          if (params['selectedNodes'][0].type == 'Node') {
            resetFieldsNode();
            setFieldsValueNode({
              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,
              ALLOW_DFT_IN: res.Data.Items[0].ALLOW_DFT_IN,
              REMARK: res.Data.Items[0].REMARK,
              WORK_ORDER: params['objParams'].value['CODE'],
              CUST_CODE: params['selectedNodes'][0].cust,
              PROD_CODE: params['selectedNodes'][0].prod,
            });
          }
          resolve(result);
        } catch (e) {
          reject(e);
        }
      }),
    /**
     * @description: 自定义提交方法
     * @return {*}
@@ -259,27 +347,45 @@
     * @param {*} u
     * @return {*}
     */
    GetSelectSuccess: (d, u, ...args) => {
    GetSelectSuccess: async (d, u, ...args) => {
      let value = {};
      switch (args[0]) {
        case 'scanadd':
          value = {
            RULE_CODE: d.values['val'],
            value: {
              RULE_CODE: d.values['val'],
            },
            isShow: false,
          };
          break;
        case 'assyadd':
          value = {
            ITEM_CODE: d.values['val'],
            value: {
              ITEM_CODE: d.values['val'],
            },
            isShow: false,
          };
          break;
        case 'printadd':
          value = {
            LABEL_CODE: d.values['val'],
            value: {
              LABEL_CODE: d.values['val'],
            },
            isShow: false,
          };
          break;
        case 'pkgadd':
          const ents = await getEntity({
            sqlcmd: `RULE_CODE ='${d.values['val']}'`,
            entityName: 'V_BAS_PKG_DTL',
            order: '',
          });
          value = {
            PKG_CODE: d.values['val'],
            value: {
              PKG_CODE: d.values['val'],
            },
            isShow: true,
            data: ents.Data.Items,
          };
          break;
        case 'addRoute':
@@ -363,6 +469,7 @@
      return {
        configTitle: type == 'Action' ? '行为配置' : '工序配置',
        navTitle: type == 'Product' ? '添加工艺路线' : '工艺路线维护',
        tableTitle: type == 'Action' ? '包装层级列表' : '',
      };
    },
    /**
@@ -376,6 +483,7 @@
        showNav: false,
        type: selectedNodes.value[0].type,
        nodes: selectedNodes.value,
        showOtherTable: false,
      };
      if (isNullOrUnDef(selectedNodes)) {
        return result;
@@ -383,10 +491,16 @@
      if (selectedNodes.value[0].type == 'WorkOrder' || selectedNodes.value[0].type == 'Route') {
        result.showNav = true;
        result.showConfig = false;
        result.showOtherTable = false;
      }
      if (selectedNodes.value[0].type == 'Action' || selectedNodes.value[0].type == 'Node') {
        result.showNav = false;
        result.showConfig = true;
        if (selectedNodes.value[0].type == 'Action') {
          result.showOtherTable = true;
        } else {
          result.showOtherTable = false;
        }
      }
      return result;
    },
@@ -486,7 +600,7 @@
          SP_MES_WO2CUST({ wo: args[2][0]['wo'] });
          break;
        case 'editRoute':
          args[1](true, { rotId: args[2][0].code, slotName: '' });
          args[1](true, { rotId: args[2][0].wo, slotName: '', rotType: 'Wo' });
          break;
      }
    },
@@ -541,13 +655,13 @@
     * @param {array} args
     * @return {*}
     */
    CustFunc: (param: CustModalParams) => {
      if (param.cType == 'Route') {
        // initRoute(args[0], args[1]);
      }
    },
    GetUseForm: () => {
      return {};
    CustFunc: async (param: CustModalParams) => {
      param.data.value['Table'].map((x) => {
        if (x.PKG_CODE == param.values['PKG_CODE']) {
          x.LABEL_CODE = param.values['LABEL_CODE'];
        }
      });
      param.data.value['Action'][0]['OPTION_1'] = JSON.stringify(param.data.value['Table']);
    },
    /**
     * @description: 获取右键菜单列表
@@ -588,6 +702,63 @@
  /* 以下是内部方法,不export,供上面的方法调用 */
  let columns: BasicColumn[] = [];
  /**
   * @description: 获取表格字段Json
   * @param {string} type
   * @return {*}
   */
  function GetBaseColumns(type: string, emit, data: Ref<{}>) {
    columns = [
      {
        dataIndex: 'PKG_RULE_ID',
        title: '包装规则ID',
        ifShow: false,
        sorter: true,
        resizable: true,
      },
      {
        dataIndex: 'PKG_CODE',
        title: '包装编码',
        ifShow: false,
        sorter: true,
        resizable: true,
        customRender: () => {},
      },
      {
        dataIndex: 'PKG_NAME',
        title: '包装名称',
        ifShow: true,
        sorter: true,
        resizable: true,
        customRender: () => {},
      },
      {
        dataIndex: 'PKG_QTY',
        title: '包装数量',
        ifShow: true,
        sorter: true,
        resizable: true,
        customRender: () => {},
      },
      {
        dataIndex: 'PKG_LEVEL',
        title: '包装层级',
        ifShow: true,
        sorter: true,
        resizable: true,
        customRender: () => {},
      },
      {
        dataIndex: 'LABEL_CODE',
        title: '标签模板编码',
        ifShow: true,
        sorter: true,
        resizable: true,
      },
    ];
    return columns;
  }
  /**
   * @description: 弹出选择框-物料选择框配置
   * @return {*}
@@ -932,6 +1103,13 @@
      component: 'Input',
      colProps: { span: 12 },
    },
    {
      field: 'OPTION_1',
      label: '行为选项1',
      component: 'Input',
      colProps: { span: 12 },
      show: false,
    },
  ];
  /**
@@ -1131,6 +1309,102 @@
    },
  ];
  const crudForms = {
    BAS_PKG_DTL: [
      {
        label: '包装规则ID',
        field: 'PKG_RULE_ID',
        component: 'Input',
        colProps: {
          span: 24,
        },
        dynamicDisabled: ({ values }) => {
          return true;
        },
      },
      {
        label: '包装层级',
        field: 'PKG_LEVEL',
        component: 'Input',
        colProps: {
          span: 24,
        },
        dynamicDisabled: ({ values }) => {
          return true;
        },
      },
      {
        field: 'PKG_CODE',
        label: '包装/载具编码',
        component: 'Input',
        colProps: {
          span: 24,
        },
        dynamicDisabled: ({ values }) => {
          return true;
        },
      },
      {
        label: '包装数量',
        field: 'PKG_QTY',
        component: 'Input',
        colProps: {
          span: 24,
        },
        dynamicDisabled: ({ values }) => {
          return true;
        },
      },
      {
        field: 'LABEL_CODE',
        label: '模板编码',
        component: 'Input',
        show: true,
        required: true,
        colProps: {
          span: 22,
        },
      },
      {
        field: 'BAS_LABEL_TEMP1PSelect_0', //按低代码配置的规则,实体名+序号+PSelect_0,序号用来区分多个的时候,PSelect_0这是个固定后缀
        label: '1',
        defaultValue: 'BAS_LABEL_TEMP',
        component: 'Input',
        colProps: { span: 2 },
        colSlot: 'BAS_LABEL_TEMP1add', //按低代码配置的规则,实体名+序号+add,序号用来区分多个的时候,add这是个固定后缀
      },
      {
        label: '包装名称',
        field: 'PKG_NAME',
        component: 'Input',
        colProps: {
          span: 24,
        },
        show: false,
      },
      {
        label: '备注',
        field: 'REMARK',
        component: 'Input',
        colProps: {
          span: 24,
        },
        dynamicDisabled: ({ values }) => {
          return true;
        },
      },
      {
        label: 'ID',
        field: 'ID',
        component: 'Input',
        colProps: {
          span: 24,
        },
        show: false,
      },
    ] as FormSchema[],
  };
  return [methods];
}
src/views/tigerprojects/system/lowcode/high/dtl.vue
@@ -174,7 +174,7 @@
    const params = {
      record,
      isUpdate: true,
      ifSave: false,
      ifSave: objParams.value['ifSave'],
      entityName: props.entityName,
      formJson: [], //getFormSchema(`${entityName.value}_Crud`),
      cType,
@@ -272,7 +272,7 @@
      }
      useDrawers[index][item['name']][1].openDrawer(true, {
        isUpdate: false,
        ifSave: false,
        ifSave: objParams.value['ifSave'],
        entityName: item['name'], //props.entityName,
        // formJson: GetCrudForm(item, data), //获取增删改表单字段
        crudColSlots: props.crudColSlots,
src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue
@@ -232,7 +232,7 @@
    const params = {
      record,
      isUpdate: true,
      ifSave: false,
      ifSave: objParams.value['ifSave'],
      entityName: props.entityName,
      formJson: [], //getFormSchema(`${entityName.value}_Crud`),
      cType,
@@ -296,7 +296,7 @@
      }
      useDrawers[index][item['name']][1].openDrawer(true, {
        isUpdate: false,
        ifSave: flase,
        ifSave: objParams.value['ifSave'],
        entityName: item['name'], //props.entityName,
        // formJson: GetCrudForm(item, data), //获取增删改表单字段
        crudColSlots: props.crudColSlots,