Ben Lin
2025-03-08 21a4e09672b1177d40c2bb5b937a8780c5eaa7fb
src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts
@@ -49,31 +49,33 @@
      switch (fnName) {
        case 'ImportExcel':
          action = {
            action: 'importModal', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口) | importModal(打开导入模态窗口)
            action: 'importModal', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口) | importModal(打开导入模态窗口) | ToPrint(打印功能)
            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: [ /* 导入时界面显示数据的字段 */
              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: 'BATCH_NO',
                //   ifShow: true,
                //   width: 180,
                //   // customRender: ({ record }) => {
                //   //   record.BATCH_NO = record.ORDER_NO+'-01'
                //   //   return record.BATCH_NO
                //   // },
                // },
                {
                  title: '计划日期',
                  dataIndex: 'PLAN_DATE',
@@ -84,22 +86,22 @@
                  title: '计划数量',
                  dataIndex: 'PLAN_QTY',
                  ifShow: true,
                  width: 180,
                  width: 100,
                },
                {
                  title: '处理方式',
                  dataIndex: 'VALIDATION_TYPE',
                  ifShow: true,
                  width: 180,
                  width: 100,
                  customRender: ({ record }) => {
                    const status = record.VALIDATION_TYPE;
                    var text = '';
                    var color = 'green';
                    if (status == '数据异常') {
                    if (status == '异常') {
                      color = 'red';
                      text = status;
                    } else if (status == '修改') {
                      color = 'yellow';
                    } else if (status == '更新') {
                      color = 'orange';
                      text = status;
                    } else {
                      text = status;
@@ -108,18 +110,34 @@
                  },
                },
                {
                  title: '处理结果',
                  title: '处理提示',
                  dataIndex: 'VALIDATION_RESULT',
                  ifShow: true,
                  width: 180,
                  width: 280,
                  customRender: ({ record }) => {
                    const status = record.VALIDATION_TYPE;
                    var text = record.VALIDATION_RESULT;
                    var color = 'green';
                    if (status == '异常') {
                      color = 'red';
                    } else if (status == '更新') {
                      color = 'orange';
                    }
                    return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text));
                  },
                },
              ],
            },
          };
          break;
        case 'ToPrint':
          action = {
            action: 'ToPrint', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口) | importModal(打开导入模态窗口) | ToPrint(打印功能)
          };
        break;
        default:
          action = {
            action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口)
            action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | modal(打开模态窗口) | importModal(打开导入模态窗口) | ToPrint(打印功能)
          };
          break;
      }
@@ -143,10 +161,9 @@
          x.onClick = handleRelease.bind(null, args, params);
          x.tooltip = '下发';
        }
        // if (x.name == 'handleTemplate') {
        //   x.onClick = handleTemplate.bind(null, args, params);
        //   x.tooltip = '模板维护';
        // }
        if (x.name == 'ToPrint') {
          x.tooltip = '打印流程卡';
        }
      });
      return data;
    },
@@ -346,7 +363,7 @@
     */
    GetTitle: () => {
      return {
        importTitle: '工单计划导入', /* 打开模态窗口显示的标题 */
        importTitle: '工单计划导入' /* 打开模态窗口显示的标题 */,
      };
    },
  };
@@ -458,10 +475,20 @@
      ID: params['record'].ID,
      CODE: params['record']['ORDER_NO'],
      Name: 'BIZ_MES_WO_BATCH',
      firstTabName: '工单批次',
      secondTabName: '', //'标签过程变量',
      firstTitle: '批次',
      secondTitle: '', //'过程变量',
      Tabs: [
        {
          name: '工单批次',
          tableTitle: '批次',
          entityName: 'BIZ_MES_WO_BATCH',
          key: 'batch'
        },
        // {
        //   name: '工单批次2',
        //   tableTitle: '批次2',
        //   entityName: 'BIZ_U9_ASN_DTL',
        //   key: 'batch2'
        // }
      ],
      pageTitle: '工单详情', //详情页面标题
      contentStr: '这里是工单批次管理页面,可以显示工单下发的所有批次详情',
      detailName: `工单[${params['record'].ORDER_NO}]批次详情`,
@@ -499,6 +526,7 @@
        'BAS_PKG_DTL',
        'ItemCode',
      ] /* 自定义显示列表的表名,跟上面增删改的表名一致,有多个就放列表中 */,
      record: params['record'],
      dense: true,
      pageTitle: `工单工艺绑定`,
      pageContent: `这里是管理工单的工艺绑定,一个工单可以绑定一个工艺路线,并可以保存为客户专用的工艺路线`,