Ben Lin
2024-12-28 f9eb1a419834f97a3ab0124b132de4f977b1973b
通用导入Excel更新
已修改8个文件
已添加2个文件
399 ■■■■■ 文件已修改
src/api/tigerapi/model/systemModel.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/system.ts 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/icons/ImportExcel-white.svg 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/ImportExcelModal.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/prod/biz_mes_wo/WoModal.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/smttable/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/normal/mainTable.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/wms/wms_item/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/wms/wms_item/wms_item.data.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/model/systemModel.ts
@@ -1,5 +1,6 @@
import { Ref } from 'vue';
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
import { extend } from 'dayjs';
export type AD_INFO = {
  nation?: string;
@@ -370,3 +371,18 @@
export type EntityListGetResultModel = BasicFetchResult<EntityPropertie>;
export type FunctionType = (...args: any[]) => any;
export interface BaseImportInput{
  typeFullName: string;
}
export interface ImportEntityValidate extends BaseImportInput {
  EntityJson: string;
  CheckJson: string;
  where: string;
  typeFullName: string;
}
export interface ImportInput extends BaseImportInput{
  EntityJson: string;
}
src/api/tigerapi/system.ts
@@ -29,6 +29,8 @@
  EntityList,
  iSYS_ROLE_PROD,
  pParams,
  ImportEntityValidate,
  ImportInput,
} from './model/systemModel';
import { defHttp } from '/@/utils/http/axios';
import { isArray, isNullOrEmpty, isTimeViaRegExp8601 } from '/@/utils/is';
@@ -41,6 +43,8 @@
  EntityPageList = '/Base/QueryCustomPage',
  IsAccountExist = '/Base/IsExist',
  AddAfterDelete = '/Base/AddAfterDelete',
  ImportExcel = '/Base/ImportExcel',
  BaseValidateTableImport = '/Base/ValidateTableImport',
  setRoleStatus = '/system/setRoleStatus',
  MenuList = '/SYS/getMenuListAll',
  SaveMenu = '/SYS/SaveMenu',
@@ -823,6 +827,8 @@
        }
      } else if (isNumber(params[Keys[k]])) {
        sqlcmd += `And ${Keys[k]} = ${params[Keys[k]]}`;
      } else if(Keys[k].toString().startsWith('IFEMPTY_')){
        sqlcmd +=params[Keys[k]]=='Y'? `And (${Keys[k].split('IFEMPTY_')[1]} != '' OR ${Keys[k].split('IFEMPTY_')[1]} is not NULL)`: `And (${Keys[k].split('IFEMPTY_')[1]} = '' OR ${Keys[k].split('IFEMPTY_')[1]} is NULL)`;
      } else {
        sqlcmd +=
          params['nolike'] == 'Y'
@@ -1028,3 +1034,37 @@
      isTransformResponse: false,
    },
  );
  /**
   * @desc å¯¼å…¥Excel
   */
export async function ImportExcel(entityName: string, items: ImportInput) {
  const data = await defHttp.post(
    {
      url: Api.ImportExcel,
      params: genAction(entityName, items),
    },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
    },
  );
  return data;
}
/**
 * @desc å¯¼å…¥Excel
 */
export async function ValidateTableImport(entityName: string, items: ImportEntityValidate) {
const data = await defHttp.post(
  {
    url: Api.BaseValidateTableImport,
    params: genAction(entityName, items),
  },
  {
    errorMessageMode: 'none',
    isTransformResponse: false,
  },
);
return data;
}
src/assets/icons/ImportExcel-white.svg
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1735231893769" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3240" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M578.953846 890.958769a31.507692 31.507692 0 0 1-31.507692 31.507693H320.590769a69.395692 69.395692 0 0 1-69.316923-69.316924V620.386462h63.015385v232.763076a6.301538 6.301538 0 0 0 6.301538 6.301539h226.855385a31.507692 31.507692 0 0 1 31.507692 31.507692zM918.685538 318.070154a10.318769 10.318769 0 0 0-0.472615-2.126769 12.681846 12.681846 0 0 0-0.708923-2.284308 8.349538 8.349538 0 0 0-0.708923-1.969231 23.158154 23.158154 0 0 0-2.126769-4.174769 16.620308 16.620308 0 0 0-1.654154-2.441846 39.384615 39.384615 0 0 0-2.914462-3.387077L740.982154 113.664a31.507692 31.507692 0 0 0-23.630769-10.397538H320.590769a69.395692 69.395692 0 0 0-69.316923 69.316923v187.628307h63.015385V172.583385a6.301538 6.301538 0 0 1 6.301538-6.301539h346.584616v157.538462a31.507692 31.507692 0 0 0 31.507692 31.507692h157.538461v138.633846a31.507692 31.507692 0 0 0 63.015385 0v-170.141538a27.884308 27.884308 0 0 0-0.551385-5.750154zM730.190769 292.312615V195.820308l86.646154 96.492307zM957.046154 744.448a31.507692 31.507692 0 0 1-31.507692 31.507692H699.155692l40.723693 40.723693a31.507692 31.507692 0 1 1-44.583385 44.504615l-93.735385-93.735385a31.901538 31.901538 0 0 1-4.804923-5.750153 31.507692 31.507692 0 0 1-3.780923-26.624 18.510769 18.510769 0 0 1 1.102769-2.914462 25.836308 25.836308 0 0 1 2.678154-5.041231A27.017846 27.017846 0 0 1 598.646154 724.676923a28.750769 28.750769 0 0 1 2.126769-2.363077l94.523077-94.523077a30.641231 30.641231 0 0 1 11.342769-7.246769h21.897846a30.641231 30.641231 0 0 1 11.34277 7.246769 31.507692 31.507692 0 0 1 0 44.504616l-40.723693 40.802461h226.38277a31.507692 31.507692 0 0 1 31.507692 31.350154zM728.536615 620.386462h-21.897846a31.507692 31.507692 0 0 1 21.897846 0z" fill="#ffffff" p-id="3241"></path><path d="M728.615385 504.123077v1.260308c0.236308-0.551385 0.078769-1.260308 0-1.260308z" fill="#ffffff" p-id="3242"></path><path d="M706.638769 620.386462h21.897846a31.507692 31.507692 0 0 0-21.897846 0zM728.615385 504.123077v1.260308c0.236308-0.551385 0.078769-1.260308 0-1.260308z" fill="#ffffff" p-id="3243"></path><path d="M327.916308 400.147692v34.343385H199.364923v44.662154h111.616v34.422154H199.364923v47.497846h128.551385v34.737231H164.391385V400.147692h163.524923zM482.461538 594.471385h-43.559384l-3.859692-5.671385-21.425231-31.507692-4.096-6.065231-4.174769 6.065231-21.661539 31.507692-4.017231 5.907692h-42.771692l4.096-5.907692 22.055385-31.507692 25.678769-36.548923-49.467077-71.837539h44.268308l25.993846 41.038769 24.497231-41.117538h42.299076L429.843692 519.876923l26.387693 37.415385 22.212923 31.507692 4.01723 5.671385zM624.246154 533.031385c-0.708923 6.065231-1.654154 11.579077-2.678154 16.620307a56.792615 56.792615 0 0 1-2.363077 7.876923 75.697231 75.697231 0 0 1-4.253538 8.979693 60.731077 60.731077 0 0 1-12.996923 15.753846 46.710154 46.710154 0 0 1-10.161231 6.459077 67.820308 67.820308 0 0 1-10.870154 4.174769 76.012308 76.012308 0 0 1-26.702769 2.599385 73.885538 73.885538 0 0 1-25.67877-6.459077h-0.630153a56.32 56.32 0 0 1-20.007385-15.753846 66.166154 66.166154 0 0 1-9.373538-15.753847 64.118154 64.118154 0 0 1-3.387077-8.979692 88.379077 88.379077 0 0 1-3.229539-31.035077 78.769231 78.769231 0 0 1 5.513846-25.442461 74.594462 74.594462 0 0 1 12.918154-21.031385 60.967385 60.967385 0 0 1 20.716308-15.753846 72.704 72.704 0 0 1 25.915077-7.089231 67.111385 67.111385 0 0 1 21.740307 1.890462 64.827077 64.827077 0 0 1 19.219693 8.270769 51.515077 51.515077 0 0 1 13.863384 12.681846 48.915692 48.915692 0 0 1 7.876923 15.123692l3.859693 12.288h-41.905231a44.898462 44.898462 0 0 0-4.489846-7.876923 22.921846 22.921846 0 0 0-5.907692-5.041231 21.425231 21.425231 0 0 0-11.027693-2.363076 32.925538 32.925538 0 0 0-12.130461 2.756923 26.072615 26.072615 0 0 0-10.555077 7.876923 36.785231 36.785231 0 0 0-6.222769 11.342769 62.227692 62.227692 0 0 0-2.284308 14.729846 54.587077 54.587077 0 0 0 1.654154 16.935385 33.555692 33.555692 0 0 0 6.222769 13.154461 25.757538 25.757538 0 0 0 8.979692 6.852923h0.630154a29.380923 29.380923 0 0 0 13.390769 2.284308 26.702769 26.702769 0 0 0 11.264-2.599385h0.472616a23.630769 23.630769 0 0 0 7.876923-7.876923 26.545231 26.545231 0 0 0 4.174769-9.294769l1.575385-7.246769zM726.646154 545.476923l-1.575385 5.671385a12.681846 12.681846 0 0 1-3.308307 6.222769 18.904615 18.904615 0 0 1-4.411077 3.702154 28.041846 28.041846 0 0 1-15.753847 4.096 36.233846 36.233846 0 0 1-15.123692-2.914462 23.630769 23.630769 0 0 1-7.404308-4.883692 18.983385 18.983385 0 0 1-3.465846-4.017231 32.137846 32.137846 0 0 1-4.647384-11.421538c-0.630154-3.702154-1.102769-7.168-1.575385-10.476308h96.964923l-0.630154-17.171692a98.067692 98.067692 0 0 0-5.513846-28.672 54.035692 54.035692 0 0 0-20.873846-25.836308 50.176 50.176 0 0 0-10.633846-5.907692 64.669538 64.669538 0 0 0-26.860308-5.356308 66.166154 66.166154 0 0 0-31.507692 7.876923 61.833846 61.833846 0 0 0-21.976616 19.219692 74.515692 74.515692 0 0 0-11.027692 22.921847 114.766769 114.766769 0 0 0-3.072 29.065846 93.420308 93.420308 0 0 0 4.883692 30.168615c0 1.260308 0.787692 2.441846 1.260308 3.702154a52.224 52.224 0 0 0 21.267692 25.757538l2.835693 1.654154A73.491692 73.491692 0 0 0 701.046154 597.307077a82.313846 82.313846 0 0 0 26.860308-3.465846 52.617846 52.617846 0 0 0 11.342769-4.962462 53.405538 53.405538 0 0 0 9.058461-6.852923 40.014769 40.014769 0 0 0 11.815385-17.880615c2.048-6.616615 3.702154-12.760615 4.883692-18.432z m-52.932923-45.213538a26.781538 26.781538 0 0 1 5.907692-10.082462 32.216615 32.216615 0 0 1 10.633846-7.876923 33.319385 33.319385 0 0 1 14.020923-2.520615 20.873846 20.873846 0 0 1 13.627077 4.883692 25.206154 25.206154 0 0 1 7.876923 9.531077A74.909538 74.909538 0 0 1 728.615385 504.123077v1.260308h-56.713847zM782.099692 399.990154h33.555693v196.056615h-33.555693z" fill="#ffffff" p-id="3244"></path></svg>
src/views/components/ImportExcelModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,195 @@
<template>
  <BasicModal
    width="1200px"
    :height="700"
    v-bind="$attrs"
    ok-text="保存"
    @register="register"
    :title="t(props.title)"
    @ok="handleSubmit"
  >
    <div class="high-form">
      <p style="color: red" v-text="err"></p>
      <BasicTable
        v-for="(table, index) in tableListRef"
        :key="index"
        :title="table.title"
        :columns="table.columns"
        :dataSource="table.dataSource"
      >
        <template #toolbar>
          <a-button @click="tmpDownload" type="primary" preIcon="tmpDownload-white|svg">
            æ¨¡æ¿
          </a-button>
          <ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
            <a-button type="success" class="m-3" preIcon="ImportExcel-white|svg">
              å¯¼å…¥Excel
            </a-button>
          </ImpExcel>
        </template>
      </BasicTable>
    </div>
  </BasicModal>
</template>
<script lang="ts" setup>
  import { ref, unref, h } from 'vue';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { aoaToSheetXlsx, ImpExcel, ExcelData } from '/@/components/Excel';
  import { useMessage } from '/@/hooks/web/useMessage';
  // import { useLocale } from '/@/locales/useLocale';
  import { BasicTable } from '/@/components/Table';
  import { ImportExcel, ValidateTableImport } from '/@/api/tigerapi/system';
  const emit = defineEmits(['success', 'register', 'toExcel']);
  const props = defineProps({
    title: {
      type: String,
      default: '',
    },
    mtitle: {
      type: String,
      default: '',
    },
    arr: {
      type: Array,
      default: () => [1, 2, 3, 4],
    },
  });
  // const { getLocale } = useLocale();
  const { t } = useI18n('');
  const { createMessage, createConfirm } = useMessage();
  const tmpHeader = ref([]);
  const filename = ref('');
  const entityName = ref('');
  const checkJson = ref('');
  const where = ref('');
  const typeFullName = ref('');
  const baseColumns = ref([]);
  const tableListRef = ref<
    {
      title: string;
      columns?: any[];
      dataSource?: any[];
    }[]
  >([]);
  const [register, { setModalProps, closeModal }] = useModalInner((data) => {
    setModalProps({ confirmLoading: false });
    tableListRef.value = [
      {
        title: '列表信息',
        columns: [
          {
            title: '字段1',
            dataIndex: 'field1',
            width: 200,
            sorter: true,
            resizable: true,
          },
          {
            title: '字段2',
            dataIndex: 'field2',
            width: 200,
            sorter: true,
            resizable: true,
          },
        ],
        dataSource: [],
      },
    ];
    tmpHeader.value = data.tmpHeader;
    filename.value = data.filename;
    baseColumns.value = data.baseColumns;
    entityName.value = data.entityName;
    checkJson.value = JSON.stringify(data.checkJson);
    where.value = JSON.stringify(data.where);
    typeFullName.value = data.typeFullName;
  });
  var err = ref('');
  async function loadDataSuccess(excelDataList: ExcelData[]) {
    tableListRef.value = [];
    for (const excelData of excelDataList) {
      const {
        // header,
        results,
        meta: { sheetName },
      } = excelData;
      let dataSource = [] as any[];
      results.map((item) => {
        let entity = {} as any;
        baseColumns.value.map((c) => {
          entity[c['dataIndex']] = item[c['title']]; //c['dataIndex']=='BATCH_NO'?`${item[c['ORDER_NO']]}-01`: item[c['title']];
        });
        dataSource.push(entity);
      });
      tableListRef.value.push({
        title: sheetName,
        dataSource: dataSource,
        columns: baseColumns.value,
      });
    }
    console.log('console.log(tableListRef.value);', tableListRef.value);
    var res = await ValidateTableImport(entityName.value, {
      EntityJson: JSON.stringify(tableListRef.value[0].dataSource),
      CheckJson: checkJson.value,
      where: where.value,
      typeFullName: typeFullName.value
    });
    if (res.IsSuccessed) {
      tableListRef.value[0].dataSource = res.Data;
      err.value = '';
    } else {
      tableListRef.value = [];
      createMessage.error('导入失败' + res.Message);
      err.value = res.Message;
    }
  }
  /**
   * @desc å¯¼å‡ºæ¨¡æ¿
   */
  function tmpDownload() {
    aoaToSheetXlsx({
      data: '',
      header: tmpHeader.value,
      filename: filename.value, //'工单料站表信息.xlsx'
    });
  }
  /**
   * @desc å¯¼å…¥æäº¤
   */
  async function handleSubmit() {
    try {
      const values = tableListRef.value;
      setModalProps({ confirmLoading: true });
      createConfirm({
        iconType: 'warning',
        title: () => h('span', t('导入信息')),
        content: () => h('span', t('确认有修改的数据是否正确,有异常的数据无法导入')),
        onOk: async () => {
          const apiAction = await ImportExcel(entityName.value, tableListRef.value[0]['dataSource'] as any[]);
          if (apiAction.IsSuccessed) {
            closeModal();
            createMessage.success(t('导入成功'));
            emit('success', {
              isUpdate: unref(false),
              values: { ...values, id: 0 },
            });
          }
        },
      });
    } finally {
      setModalProps({ confirmLoading: false });
    }
  }
</script>
<style lang="less" scoped>
  .high-form {
    padding: 5px 10px 10px;
    background: #f5f9fe;
  }
</style>
src/views/tigerprojects/mes/prod/biz_mes_wo/WoModal.vue
@@ -18,7 +18,7 @@
        :dataSource="table.dataSource"
      >
        <template #toolbar>
          <a-button @click="aoaToExcel" color="primary" preIcon="tmpDownload-white|svg">
          <a-button @click="ToExcel" color="primary" preIcon="tmpDownload-white|svg">
            æ¨¡æ¿
          </a-button>
          <ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
@@ -152,7 +152,7 @@
  //   v && props.userData && nextTick(() => onDataReceive(props.userData));
  // }
  //导出
  function aoaToExcel() {
  function ToExcel() {
    const arrHeader = [
      '关联工单号',
      '产品编码',
@@ -214,7 +214,7 @@
</script>
<style lang="less" scoped>
  .high-form {
    padding: 5px 10px 10px 10px;
    padding: 5px 10px 10px;
    background: #f5f9fe;
  }
</style>
src/views/tigerprojects/mes/smt/smttable/index.vue
@@ -17,6 +17,7 @@
              icon: 'clarity:note-edit-line',
              tooltip: '修改',
              onClick: handleEdit.bind(null, record),
              name: ''
            },
            {
              icon: 'ant-design:delete-outlined',
@@ -27,6 +28,7 @@
                placement: 'left',
                confirm: handleDelete.bind(null, record),
              },
              name: ''
            },
          ]"
        />
src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts
@@ -22,6 +22,7 @@
import { useForm } from '/@/components/Form/index';
import { cloneDeep } from 'lodash-es';
import { useProdRouteStore } from '/@/store/modules/prodRoute';
import { Tag, Tooltip } from 'ant-design-vue';
const { t } = useI18n();
const { createErrorModal } = useMessage();
@@ -43,10 +44,86 @@
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
     * @return {*}
     */
    CreateAction: (type: string) => {
      return {
        action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面)
      };
    CreateAction: (type: string, fnName: string) => {
      let action = {} as any;
      switch (fnName) {
        case 'ImportExcel':
          action = {
            action: 'importModal', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口) | importModal(打开导入模态窗口)
            params: {
              tmpHeader: ['工单号', '计划日期', '计划数量'], /* ä¸‹è½½æ¨¡æ¿çš„æ ‡é¢˜å­—段 */
              filename: '工单计划模板.xlsx', /* ä¸‹è½½æ¨¡æ¿çš„æ–‡ä»¶å */
              entityName: 'BIZ_MES_WO_BATCH', /* å¯¼å…¥è¡¨çš„表名 */
              checkJson: ['ORDER_NO', 'PLAN_DATE', 'PLAN_QTY'], /* å¯¼å…¥è¡¨éœ€è¦æ£€æŸ¥çš„字段列表 */
              where: ['ORDER_NO'], /* å¯¼å…¥è¡¨éœ€è¦æŸ¥è¯¢çš„字段列表 */
              typeFullName:'Tiger.IBusiness.MES.IImportWoPlan,Tiger.IBusiness.MES', /* å¯¼å…¥çš„æ–¹æ³•全名,通用导入用这个:Tiger.IBusiness.ICommonImportExcel,Tiger.IBusiness */
              baseColumns: [ /* å¯¼å…¥æ—¶ç•Œé¢æ˜¾ç¤ºæ•°æ®çš„字段 */
                {
                  title: '工单号',
                  dataIndex: 'ORDER_NO',
                  ifShow: true,
                  width: 180,
                },
                {
                  title: '工单批次号',
                  dataIndex: 'BATCH_NO',
                  ifShow: true,
                  width: 180,
                  // customRender: ({ record }) => {
                  //   record.BATCH_NO = record.ORDER_NO+'-01'
                  //   return record.BATCH_NO
                  // },
                },
                {
                  title: '计划日期',
                  dataIndex: 'PLAN_DATE',
                  ifShow: true,
                  width: 180,
                },
                {
                  title: '计划数量',
                  dataIndex: 'PLAN_QTY',
                  ifShow: true,
                  width: 180,
                },
                {
                  title: '处理方式',
                  dataIndex: 'VALIDATION_TYPE',
                  ifShow: true,
                  width: 180,
                  customRender: ({ record }) => {
                    const status = record.VALIDATION_TYPE;
                    var text = '';
                    var color = 'green';
                    if (status == '数据异常') {
                      color = 'red';
                      text = status;
                    } else if (status == '修改') {
                      color = 'yellow';
                      text = status;
                    } else {
                      text = status;
                    }
                    return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text));
                  },
                },
                {
                  title: '处理结果',
                  dataIndex: 'VALIDATION_RESULT',
                  ifShow: true,
                  width: 180,
                },
              ],
            },
          };
          break;
        default:
          action = {
            action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口)
          };
          break;
      }
      return action;
    },
    /**
     * @description: æ“ä½œå­—段自定义按钮
@@ -262,6 +339,16 @@
          break;
      }
    },
    /**
     * @description: èŽ·å–æ ‡é¢˜ä¿¡æ¯
     * @param {string} type
     * @return {*}
     */
    GetTitle: () => {
      return {
        importTitle: '工单计划导入', /* æ‰“开模态窗口显示的标题 */
      };
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
@@ -312,7 +399,7 @@
        try {
          const form = param.values['forminfo'];
          const wo = param.values['mValues'];
          wo.STATUS = wo.STATUS == 3?wo.STATUS: 2;
          wo.STATUS = wo.STATUS == 3 ? wo.STATUS : 2;
          let input: SaveWoBatchInput = {
            Wo: wo,
            WoBatch: {
@@ -348,7 +435,7 @@
              ACT_END_TIME: wo.ACT_END_TIME,
              BATCH_NO: '',
            },
            IfToCust: form.IfToCust
            IfToCust: form.IfToCust,
          };
          SaveMesBatchWo(input).then((action) => {
            resolve(action);
@@ -402,15 +489,22 @@
      Name: 'WoRouteBinding',
      CODE: params['record'].ORDER_NO,
      Title: `工单[${params['record'].ORDER_NO}]工艺绑定`,
      colSlots: params['colSlots'].value, /* è¡¨æ ¼å†…的查询表单字段的插槽列表,一般用于弹出选择框按钮 */
      crudColSlots: {BAS_PKG_DTL:['BAS_LABEL_TEMP1add'], ItemCode: ['BAS_CODE_RULE1add']} /* å¢žåˆ æ”¹è¡¨å•字段的插槽列表,一般用于弹出选择框按钮 */,
      OtherTableName: ['BAS_PKG_DTL', 'ItemCode'], /* è‡ªå®šä¹‰æ˜¾ç¤ºåˆ—表的表名,跟上面增删改的表名一致,有多个就放列表中 */
      colSlots:
        params['colSlots'].value /* è¡¨æ ¼å†…的查询表单字段的插槽列表,一般用于弹出选择框按钮 */,
      crudColSlots: {
        BAS_PKG_DTL: ['BAS_LABEL_TEMP1add'],
        ItemCode: ['BAS_CODE_RULE1add'],
      } /* å¢žåˆ æ”¹è¡¨å•字段的插槽列表,一般用于弹出选择框按钮 */,
      OtherTableName: [
        'BAS_PKG_DTL',
        'ItemCode',
      ] /* è‡ªå®šä¹‰æ˜¾ç¤ºåˆ—表的表名,跟上面增删改的表名一致,有多个就放列表中 */,
      dense: true,
      pageTitle: `工单工艺绑定`,
      pageContent: `这里是管理工单的工艺绑定,一个工单可以绑定一个工艺路线,并可以保存为客户专用的工艺路线`,
      SessionName: 'WoRouteBinding_update',
      ifSave: false,
      rotType: 'Wo'
      rotType: 'Wo',
    };
    // å°†å¯¹è±¡è½¬æ¢ä¸ºJSON字符串并保存到sessionStorage
    sessionStorage.removeItem(`${id.SessionName}_params`);
src/views/tigerprojects/system/lowcode/normal/mainTable.vue
@@ -66,6 +66,7 @@
      </CustModal>
    </Suspense>
    <normalDrawer @register="registerDrawer" @success="handleSuccess" />
    <ImportExcelModal @register="registerImport" :title="ImportTitle" />
  </div>
</template>
<script lang="ts" setup>
@@ -77,6 +78,7 @@
  import normalDrawer from '../normalDrawer.vue';
  import CustModal from '/@/views/components/CustModal.vue';
  import RouteViewModal from '/@/views/components/RouteViewModal.vue';
  import ImportExcelModal from '/@/views/components/ImportExcelModal.vue';
  import { FlowChartView } from '/@/components/FlowChart';
  import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
  import { useModal } from '/@/components/Modal';
@@ -117,6 +119,7 @@
  const [registerRv, { openModal: openRvModal, closeModal: RvcloseModal }] = useModal();
  const [registerCust, { openModal: openCustModal }] = useModal();
  const [registerCrud, { openModal: openCrudModal }] = useModal();
  const [registerImport, { openModal: openImportModal }] = useModal();
  const cType = ref('');
  const formSchemas = ref({}); //弹出框多表单结构
  const routeData = ref({
@@ -151,6 +154,7 @@
      OpenSelectItem: OpenSelectCust,
      GetSelectSuccess,
      CustFunc,
      GetTitle,
    },
    ActionColumn,
  ] = isNullOrUnDef(custImport.value['default'])
@@ -161,6 +165,7 @@
    ? {}
    : KeyFieldValues(objParams.value['CODE'], objParams.value['ID']);
  const dtlSlots = ref<any[]>([]);
  const ImportTitle = GetTitle && isFunction(GetTitle)? ref(GetTitle().importTitle): ref('');
  const useformdata = GetUseForm && isFunction(GetUseForm) ? GetUseForm() : {};
  const useFormData = ref<any>(useformdata);
  /* è‡ªå®šä¹‰æ¨¡æ€çª—口中表单中插槽渲染按钮打开模态框useModal方法 */
@@ -345,7 +350,7 @@
  }
  /**
   * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
   * @description: èŽ·å–å·¥å…·æ ä¸­æŒ‰é’®çš„è¡Œä¸º
   * @return {*}
   */
  function handleCreate(fnName: string) {
@@ -362,7 +367,7 @@
    } else {
      /* å¦‚果动态加载的实体类.ts存在,根据.ts文件中的方法来执行操作 */
      const [{ CreateAction }] = custImport.value['default']();
      const result = CreateAction(entityName.value, colSlots.value);
      const result = CreateAction(entityName.value, fnName);
      switch (result.action) {
        case 'go' /* è·³è½¬é¡µé¢ */:
          // å°†å¯¹è±¡è½¬æ¢ä¸ºJSON字符串并保存到sessionStorage
@@ -384,6 +389,9 @@
            ifSave: true, //是否提交表单时保存到数据库,否-暂存|是-保存
          });
          break;
        case 'importModal' /* æ‰“开导入Excel模态窗口 */:
          openImportModal(true, result.params);
          break;
      }
    }
  }
src/views/tigerprojects/wms/wms_item/index.vue
@@ -68,12 +68,12 @@
    canResize: true,
    bordered: true,
    showIndexColumn: false,
    actionColumn: {
      width: 80,
      title: '操作',
      dataIndex: 'action',
      slots: { customRender: 'action' },
    },
    // actionColumn: {
    //   width: 80,
    //   title: '操作',
    //   dataIndex: 'action',
    //   slots: { customRender: 'action' },
    // },
    searchInfo: { ITEM_CODE },
  });
  const { setTitle } = useTabs();
src/views/tigerprojects/wms/wms_item/wms_item.data.ts
@@ -163,6 +163,7 @@
    title: '供应商批次号',
    dataIndex: 'SUPP_LOTNO',
    resizable: true,
    fixed: 'right'
  },
  {
    title: '批次号',