Ben Lin
2024-07-30 cc88111d61a350a4d24cf339b526d4357f934ddf
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_VAR.ts
@@ -1,18 +1,27 @@
/*
 * @Description: 产品工艺路线相关
 * @Description: 模板变量相关
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-28 10:53:28
 * @LastEditTime: 2024-07-29 23:10:18
 */
import { Tag, Tooltip } from 'ant-design-vue';
import { ActionItem, BasicColumn } from '/@/components/Table';
import { ActionItem, BasicColumn, FormSchema, useTable } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n';
import { h, unref } from 'vue';
import { GetEnum } from '/@/api/tigerapi/system';
import { h, Ref, unref } from 'vue';
import { AddAfterDelete, getEntity, GetEnum } from '/@/api/tigerapi/system';
import { useLocale } from '/@/locales/useLocale';
import { useDrawer } from '/@/components/Drawer';
import { formatTime } from '/@/utils/dateUtil';
import { custDel, EditOperation, Search } from '../data';
import { buildUUID } from '/@/utils/uuid';
import { CustModalParams, FunctionType } from '/@/api/tigerapi/model/systemModel';
import { useModal } from '/@/components/Modal';
import { SaveLabelTemplate } from '/@/api/tigerapi/mes/label';
import { BAS_LABEL_TEMP, BAS_LABEL_VAR, BAS_LABEL_VAR_WO, BasLabelTempInput } from '/@/api/tigerapi/model/mesModel';
import { useUserStore } from '/@/store/modules/user';
const { getLocale } = useLocale();
@@ -30,93 +39,173 @@
  /**
   * @description: 一些自定义方法
   * @return {*}
   */
   */
  const methods = {
    /**
     * @description: 获取新增按钮的行为,必需要有的方法
     * @return {*}
     */
    CreateAction: (fnName: string) => {
      return {
        action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面)
      };
    CreateAction: (type: string) => {
      let action = {} as any;
      switch (type) {
        case 'BAS_LABEL_VAR':
        case 'BAS_LABEL_VAR_WO':
          action = {
            action: 'edit', //drawer(打开左侧抽屉框) | go(跳转到新的页面) | edit(如果是表格可编辑页面就是自定义方法)
          };
          break;
      }
      return action;
    },
    /**
     * @description: 产品绑定工艺路线操作字段自定义按钮,必需要有的方法
     * @description: 操作字段自定义按钮,必需要有的方法
     * @return {*}
     */
    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
      data.map((x) => {
        if (x.name == 'Delete') {
          x.popConfirm.confirm = custDel.bind(null, args, params);
          x.tooltip = '删除';
        }
      });
      return data;
    },
    /**
     * @description: 高级表单和详情页面返回主页面的url
     * @return {*}
     */
     */
    GetHomeUrl: () => {
      return `/BAS_LABEL_TEMP/LC/${encodeURI(JSON.stringify({ ID: 'BAS_LABEL_TEMP', colSlots: [], crudColSlots: [] }))}`;
    },
    GetBaseColumns: () => {
    /**
     * @description: 获取主信息
     * @return {*}
     */
    GetBaseForm: () => {
      return [
        {
          dataIndex: 'LABEL_ID',
          title: '标签模板ID',
          ifShow: false,
          sorter: true,
          resizable: true,
        },
        {
          dataIndex: 'VAR_NAME',
          title: '变量名称',
          ifShow: true,
          sorter: true,
          resizable: true,
          customRender: () => {},
        },
        {
          dataIndex: 'VAR_TYPE',
          title: '变量类型',
          ifShow: true,
          sorter: true,
          resizable: true,
          customRender: ({ record }) => {
            let color = '';
            let text = '';
            switch (record.VAR_TYPE) {
              case 0:
                text = '常量';
                color = 'green';
                break;
              case 1:
                text = '过程变量';
                color = 'orange';
                break;
              case 2:
                text = '日期变量';
                color = '#4f68b0';
                break;
              case 3:
                text = '自定义变量';
                color = '#bfbfbf';
                break;
            }
            return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text));
          field: 'LABEL_CODE',
          label: '标签模板编码',
          component: 'Input',
          required: true,
          isexist: 'Y',
          colProps: {
            span: 8,
          },
        },
        {
          dataIndex: 'VAR_VALUE',
          title: '变量值',
          ifShow: true,
          sorter: true,
          resizable: true,
          label: '标签模板名称',
          field: 'LABEL_NAME',
          required: true,
          component: 'Input',
          colProps: {
            span: 8,
          },
        },
        {
          dataIndex: 'REMARK',
          title: '备注',
          ifShow: true,
          sorter: true,
          resizable: true,
          label: '模板类型',
          field: 'TEMP_TYPE',
          required: true,
          component: 'ApiSelect',
          colProps: {
            span: 8,
          },
          componentProps: {
            api: GetEnum,
            params: { name: 'BAS_LABEL_TEMP+TEMP_TYPEs' },
            resultField: 'Data',
            labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
            valueField: 'Value',
          },
        },
        {
          field: 'TEMP_PATH',
          label: '标签模板相对路径',
          component: 'Upload',
          isexist: 'N',
          show: true,
          required: true,
          colProps: {
            span: 8,
          },
        },
        {
          field: 'PROD_CODE',
          label: '产品编码',
          component: 'Input',
          isexist: 'N',
          show: true,
          required: true,
          colProps: {
            span: 7,
          },
        },
        {
          field: 'BAS_LABEL_VAR1PSelect_0', //按低代码配置的规则,实体名+序号+PSelect_0,序号用来区分多个的时候,PSelect_0这是个固定后缀
          label: '1',
          defaultValue: 'BAS_LABEL_VAR',
          component: 'Input',
          colProps: { span: 1 },
          colSlot: 'BAS_LABEL_VAR1add', //按低代码配置的规则,实体名+序号+add,序号用来区分多个的时候,add这是个固定后缀
        },
        {
          field: 'CUST_CODE',
          label: '客户编码',
          component: 'Input',
          isexist: 'N',
          show: true,
          // required: true,
          colProps: {
            span: 7,
          },
        },
        {
          field: 'BAS_LABEL_VAR2PSelect_0', //按低代码配置的规则,实体名+序号+PSelect_0,序号用来区分多个的时候,PSelect_0这是个固定后缀
          label: '1',
          defaultValue: 'BAS_CUSTOMER',
          component: 'Input',
          colProps: { span: 1 },
          colSlot: 'BAS_LABEL_VAR2add', //按低代码配置的规则,实体名+序号+add,序号用来区分多个的时候,add这是个固定后缀
        },
        {
          label: '备注',
          field: 'REMARK',
          component: 'Input',
          colProps: {
            span: 24,
          },
        },
        {
          label: 'ID',
          field: 'ID',
          component: 'Input',
          colProps: {
            span: 8,
          },
          show: false,
        },
      ];
    },
    /**
     * @description: 弹出选择框成功返回赋值方法
     * @param {*} d
     * @param {*} u
     * @return {*}
     */
    GetSelectSuccess: (d, u) => {
      return {
        PROD_CODE: d.values['val'],
      };
    },
    /**
     * @description: 获取模态框应用列表
     * @return {*}
     */
    GetUseModals: () => {
      return {
        BAS_LABEL_VAR1add: useModal(),
        BAS_LABEL_VAR2add: useModal(),
      };
    },
    GetSearchForm: () => {
      return [
@@ -209,9 +298,765 @@
        },
      ];
    },
    /**
     * @description: 获取新增行的数据
     * @param {string} type
     * @return {*}
     */
    GetNewRow: (type: string) => {
      let values = {};
      switch (type) {
        case 'BAS_LABEL_VAR_WO':
          values = {
            ID: buildUUID(),
            LABEL_ID: '',
            VAR_NAME: '',
            VAR_TYPE: '',
            VAR_VALUE: '',
            REMARK: '',
          };
          break;
      }
      return values;
    },
    KeyFieldValues: (val: string, id: string) => {
      return { LABEL_ID: id };
    },
    GetUseForm: () => {
      return {};
    },
    /**
     * @description: 获取标题信息
     * @param {string} type
     * @return {*}
     */
    GetTitle: () => {
      return {
        pageTitle: '打印模板管理',
        pageContent: '这里可以添加和修改模板和模板变量及工单模板变量。',
        tableTitle: {
          BAS_LABEL_VAR: '模板变量管理',
          BAS_LABEL_VAR_WO: '工单模板变量管理',
        },
      };
    },
    /**
     * @description: 获取卡片内配置列表,以循环显示多个卡片并配置多个插槽
     * @return {*}
     */
    GetBaseCards: (type: string) => {
      return [
        {
          name: 'BaseForm',
          slots: [],
          preIcons: {},
          title: '模板信息',
          entityName: 'BAS_LABEL_TEMP',
        },
      ];
    },
    /**
     * @description: 获取右侧边框use方法
     * @return {*}
     */
    GetUseDrawers: () => {
      return [
        {
          BAS_LABEL_VAR: useDrawer(),
        },
        { BAS_LABEL_VAR_WO: useDrawer() },
      ];
    } /**
     * @description: 获取表格use列表
     * @param {string} type
     * @param {array} args
     * @return {*}
     */,
    GetUseTables: (data: Ref<{}>, ...args) => {
      // _data = data;
      return {
        BAS_LABEL_VAR: useTable({
          title: '列表信息',
          dataSource: data.value['BAS_LABEL_VAR'],
          columns: GetBaseColumns('BAS_LABEL_VAR', args[0]),
          maxHeight: 520,
          formConfig: {
            labelWidth: 140,
            schemas: searchForms['BAS_LABEL_VAR'],
            submitFunc: () => Search('BAS_LABEL_VAR', data, args[0]), //自定义查询提交按钮的方法,触发查询提交事件
          },
          useSearchForm: false,
          showTableSetting: false,
          bordered: true,
          canResize: true,
          showIndexColumn: false,
          // rowSelection: {
          //   type: 'radio', //'checkbox'
          // },
          // actionColumn: {
          //   width: 130,
          //   title: '操作',
          //   dataIndex: 'action',
          //   slots: { customRender: 'action' },
          //   fixed: 'right',
          // }, //自定义操作列
        }),
        BAS_LABEL_VAR_WO: useTable({
          title: '列表信息',
          dataSource: data.value['BAS_LABEL_VAR_WO'],
          columns: baseColumns['BAS_LABEL_VAR_WO'],
          maxHeight: 550,
          formConfig: {
            labelWidth: 140,
            schemas: searchForms['BAS_LABEL_VAR_WO'],
            submitFunc: () => Search('BAS_LABEL_VAR_WO', data, args[0]), //自定义查询提交按钮的方法,触发查询提交事件
          },
          useSearchForm: false,
          showTableSetting: false,
          bordered: true,
          canResize: false,
          showIndexColumn: false,
          actionColumn: {
            width: 130,
            title: '操作',
            dataIndex: 'action',
            slots: { customRender: 'action' },
            fixed: 'right',
          }, //自定义操作列
        }),
      };
    },
    /**
     * @description: 提交所有
     * @return {*}
     */
    SubmitAll: (data: Ref<any[]>, keyFieldValues: Ref<{}>, ...args) => {
      const cancel = args[0];
      const drawers = args[1];
      const label = args[2]['BaseForm'];
      // const input: BasLabelTempInput ={
      //   Label: undefined,
      //   LabelVar: undefined,
      //   LabelVarWo: undefined
      // };
      const input: BasLabelTempInput = {
        Label: {
          ID: buildUUID(),
          CREATE_USER: useUserStore().getUserInfo.userId as string,
          UPDATE_USER: useUserStore().getUserInfo.userId as string,
          GHOST_ROW: false,
          AUTH_ORG: useUserStore().getUserInfo.orgCode,
          AUTH_PROD: useUserStore().getUserInfo.prodCode,
          AUTH_WH: '',
          LABEL_CODE: label.LABEL_CODE,
          LABEL_NAME: label.LABEL_NAME,
          TEMP_TYPE: label.TEMP_TYPE,
          TEMP_PATH: label.TEMP_PATH[0],
          CUST_CODE: label.CUST_CODE,
          PROD_CODE: label.PROD_CODE,
          REMARK: ''
        } as unknown as BAS_LABEL_TEMP,
        LabelVars: {} as unknown as BAS_LABEL_VAR[],
        LabelVarWos: {} as unknown as BAS_LABEL_VAR_WO[],
      };
      drawers.forEach((d) => {
        let where = `${d['code']} = '${keyFieldValues.value[d['code']]}'`;
        /* type: all-表示需要code的所有的值 */
        if (d['type'] == 'all' && data.value[d['keyName']].length > 0) {
          where = `${d['code']} in (${data.value[d['keyName']].map((value) => `'${value[d['code']]}'`).join(',')})`;
        }
        data.value[d['name']].map((item) => {
          item.ID = buildUUID();
        });
        if(d.name == 'BAS_LABEL_VAR'){
          input.LabelVars =  data.value[d['name']];
        }
        if(d.name == 'BAS_LABEL_VAR_WO'){
          input.LabelVarWos =  data.value[d['name']];
        }
      });
      SaveLabelTemplate(input).then((action) => {
        if (action.IsSuccessed) {
          cancel();
        }
      });
    },
    /**
     * @description: 自定义方法
     * @param {string} type
     * @param {array} args
     * @return {*}
     */
    CustFunc: (param: CustModalParams) => {
      switch (param.cType) {
        case 'BAS_LABEL_VAR':
        case 'BAS_LABEL_VAR_WO':
          return getFns[param.FnName](param) as Promise<any>;
        // break;
        default:
          return new Promise((resolve, reject) => {
            try {
              (e) => {};
              resolve(true);
            } catch {
              reject(false);
            } finally {
              // args[0][0]({ confirmLoading: false });
            }
          });
        // break;
      }
    },
  };
  /* 以下是内部方法,不export */
  /**
   * @description: 自定义方法
   * @return {*}
   */
  const getFns: Record<string, FunctionType> = {
    /**
     * @description: 新增行方法
     * @param {*} e
     * @param {array} args
     * @return {*}
     */
    AddRow: (param: CustModalParams) => {
      return new Promise((resolve, reject) => {
        try {
          console.log('AddRow');
          EditOperation(
            param.data,
            { ...param.values, ...param.others },
            { isUpdate: false },
            param.cType,
            {},
          );
        } catch {
          reject(false);
        }
      });
    },
  };
  let columns: BasicColumn[] = [];
  /**
   * @description: 获取表格字段Json
   * @param {string} type
   * @return {*}
   */
  function GetBaseColumns(type: string, emit) {
    columns = [
      {
        dataIndex: 'LABEL_ID',
        title: '标签模板ID',
        ifShow: false,
        sorter: true,
        resizable: true,
      },
      {
        dataIndex: 'VAR_NAME',
        title: '变量名称',
        ifShow: true,
        sorter: true,
        resizable: true,
        customRender: () => {},
      },
      {
        dataIndex: 'VAR_TYPE',
        title: '变量类型',
        edit: true,
        editRule: true,
        ifShow: true,
        sorter: true,
        resizable: true,
        editComponent: 'ApiSelect',
        editComponentProps: (column) => {
          return {
            api: GetEnum,
            params: { name: 'BAS_LABEL_VAR+VAR_TYPEs' },
            resultField: 'Data',
            labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
            valueField: 'Value',
            onChange: (e, v) => {
              if (e == 1) {
                emit('opencust', {
                  data: column.record,
                  name: 'BAS_LABEL_VAR',
                  modalSchema: {
                    title: '过程变量列表',
                    schemas: [
                      {
                        field: 'VAR_CODE',
                        component: 'Input',
                        label: '过程变量编码',
                        colProps: {
                          span: 12,
                        },
                      },
                    ],
                    ItemColumns: [
                      {
                        title: t('过程变量编码'),
                        dataIndex: 'VAR_CODE',
                        resizable: true,
                        sorter: true,
                        width: 200,
                      },
                      {
                        title: t('过程变量名称'),
                        dataIndex: 'VAR_NAME',
                        resizable: true,
                        sorter: true,
                        width: 180,
                      },
                    ],
                    tableName: 'BAS_LABEL_PV',
                    rowKey: 'VAR_CODE',
                    searchInfo: { TABLE_NAME: 'BAS_LABEL_PV' },
                  },
                });
              }
            },
          };
        },
        editRender: ({ record }) => {
          let color = '';
          let text = '';
          switch (record.VAR_TYPE) {
            case 0:
              text = '常量';
              color = 'green';
              break;
            case 1:
              text = '过程变量';
              color = 'orange';
              break;
            case 2:
              text = '日期变量';
              color = '#4f68b0';
              break;
            case 3:
              text = '自定义变量';
              color = '#bfbfbf';
              break;
          }
          return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text));
        },
      },
    ];
    switch (type) {
      case 'BAS_LABEL_VAR':
        columns = [
          ...columns,
          ...[
            {
              dataIndex: 'VAR_VALUE',
              title: '变量值',
              edit: true,
              // editable: true,
              editRule: true,
              ifShow: (column) => true,
              sorter: true,
              resizable: true,
            },
            {
              dataIndex: 'REMARK',
              title: '备注',
              ifShow: true,
              sorter: true,
              resizable: true,
            },
          ],
        ] as BasicColumn[];
        break;
    }
    return columns;
  }
  /**
   * @description: 表格基本字段
   * @return {*}
   */
  const baseColumns = {
    BAS_LABEL_VAR: [],
    BAS_LABEL_VAR_WO: [
      {
        dataIndex: 'LABEL_ID',
        title: '标签模板ID',
        ifShow: false,
        sorter: true,
        resizable: true,
      },
      {
        title: '工单号',
        dataIndex: 'WORK_ORDER',
        edit: true,
        editRule: true,
        editable: true,
        ifShow: true,
      },
      {
        dataIndex: 'VAR_NAME',
        title: '变量名称',
        edit: true,
        editRule: true,
        editable: true,
        ifShow: true,
        sorter: true,
        resizable: true,
        customRender: () => {},
      },
      {
        dataIndex: 'VAR_VALUE',
        title: '变量值',
        edit: true,
        editRule: true,
        editable: true,
        ifShow: true,
        sorter: true,
        resizable: true,
      },
      {
        title: '标签模板预览地址',
        dataIndex: 'LABEL_VIEW_PATH',
        ifShow: false,
      },
      {
        title: '备注',
        dataIndex: 'REMARK',
      },
      // {
      //   title: '更新时间',
      //   dataIndex: 'UPDATE_TIME',
      // },
      // {
      //   title: '更新人',
      //   dataIndex: 'UPDATE_USER',
      // },
    ] as BasicColumn[],
  };
  /**
   * @description: 查询字段
   * @return {*}
   */
  const searchForms = {
    MES_SHIFT: [
      {
        field: 'SFT_CODE',
        label: '班次编码',
        component: 'Input',
        colProps: {
          span: 8,
        },
      },
      {
        label: '班次名称',
        field: 'SFT_NAME',
        component: 'Input',
        colProps: {
          span: 8,
        },
      },
    ] as FormSchema[],
    MES_SHIFT_PRD: [
      {
        field: 'PRD_CODE',
        label: '时段编码',
        component: 'Input',
        colProps: {
          span: 8,
        },
      },
      {
        label: '时段名称',
        field: 'PRD_NAME',
        component: 'Input',
        colProps: {
          span: 8,
        },
      },
    ] as FormSchema[],
  };
  const crudForms = {
    MES_SHIFT: [
      {
        field: 'SFT_CODE',
        label: '班次编码',
        component: 'Input',
        required: true,
        colProps: {
          span: 24,
        },
      },
      {
        label: '班次名称',
        field: 'SFT_NAME',
        component: 'Input',
        required: true,
        colProps: {
          span: 24,
        },
      },
      {
        label: '班制编码',
        field: 'SFTS_CODE',
        component: 'ApiSelect',
        required: true,
        colProps: {
          span: 24,
        },
        componentProps: {
          api: getEntity,
          params: { entityName: 'MES_SHIFT_SYS', sqlcmd: ' 1=1 ' },
          resultField: 'Data.Items',
          labelField: 'SFTS_NAME',
          valueField: 'SFTS_CODE',
        },
        dynamicDisabled: ({ values }) => {
          return true;
        },
      },
      // {
      //   label: '班次时间范围',
      //   field: '[SFT_BEGIN, SFT_END]',
      //   component: 'TimeRangePicker',
      //   colProps: {
      //     span: 24,
      //   },
      //   componentProps: ({ formModel }) => {
      //     return {
      //       format: 'HH:mm',
      //       placeholder: ['开始时间', '结束时间'],
      //       onChange: (e) => {
      //         const timeRange: any = e;
      //         console.log(e);
      //         // if (timeRange) {
      //         //   formModel.SFT_BEGIN = Number(`${tsToHHmm(timeRange[0].$d)}`);
      //         //   formModel.SFT_END = Number(`${tsToHHmm(timeRange[1].$d)}`);
      //         // }
      //       },
      //     };
      //   },
      // },
      {
        label: '班次开始时间',
        field: 'SFT_BEGIN',
        component: 'TimePicker',
        colProps: {
          span: 12,
        },
        componentProps: ({ formModel }) => {
          return {
            format: 'HH:mm',
          };
        },
        // show: false,
      },
      {
        label: '结束时间',
        field: 'SFT_END',
        component: 'TimePicker',
        colProps: {
          span: 12,
        },
        componentProps: ({ formModel }) => {
          return {
            format: 'HH:mm',
          };
        },
        // show: false,
      },
      {
        label: '是否跨天',
        field: 'IS_ACROSS_DAY',
        component: 'Select',
        required: true,
        colProps: {
          span: 24,
        },
        componentProps: {
          options: [
            {
              label: '是',
              value: 'Y',
              key: 'Y',
            },
            {
              label: '否',
              value: 'N',
              key: 'N',
            },
          ],
        },
      },
      // {
      //   field: 'LOGIN_TIME',
      //   label: '登录时间',
      //   defaultValue: '',
      //   component: 'RangePicker',
      //   ifShow: true,
      //   colProps: { span: 8 },
      // },
      {
        label: '备注',
        field: 'REMARK',
        component: 'Input',
        colProps: {
          span: 24,
        },
      },
      {
        label: 'ID',
        field: 'ID',
        component: 'Input',
        colProps: {
          span: 24,
        },
        show: false,
      },
    ] as FormSchema[],
    MES_SHIFT_PRD: [
      {
        field: 'PRD_CODE',
        label: '时段编码',
        component: 'Input',
        required: true,
        colProps: {
          span: 24,
        },
      },
      {
        label: '时段名称',
        field: 'PRD_NAME',
        component: 'Input',
        required: true,
        colProps: {
          span: 24,
        },
      },
      {
        label: '班次编码',
        field: 'SFT_CODE',
        component: 'Select',
        required: true,
        colProps: {
          span: 24,
        },
        componentProps: () => {
          const options = _data['MES_SHIFT'].map((entity) => ({
            value: entity.SFT_CODE,
            label: entity.SFT_NAME,
          }));
          return {
            options: options,
          };
        },
        // dynamicDisabled: ({ values }) => {
        //   return true;
        // },
      },
      {
        label: '时段开始时间',
        field: 'PRD_BEGIN',
        component: 'TimePicker',
        colProps: {
          span: 12,
        },
        componentProps: ({ formModel }) => {
          return {
            format: 'HH:mm',
          };
        },
      },
      {
        label: '结束时间',
        field: 'PRD_END',
        component: 'TimePicker',
        colProps: {
          span: 12,
        },
        componentProps: ({ formModel }) => {
          return {
            format: 'HH:mm',
          };
        },
      },
      {
        label: '时段排序',
        field: 'SEQ',
        component: 'InputNumber',
        colProps: {
          span: 24,
        },
      },
      {
        label: '是否跨天',
        field: 'IS_ACROSS',
        component: 'Select',
        required: true,
        colProps: {
          span: 24,
        },
        componentProps: {
          options: [
            {
              label: '是',
              value: 'Y',
              key: 'Y',
            },
            {
              label: '否',
              value: 'N',
              key: 'N',
            },
          ],
        },
      },
      {
        label: '是否休息时段',
        field: 'IS_REST',
        component: 'Select',
        required: true,
        colProps: {
          span: 24,
        },
        componentProps: {
          options: [
            {
              label: '是',
              value: 'Y',
              key: 'Y',
            },
            {
              label: '否',
              value: 'N',
              key: 'N',
            },
          ],
        },
      },
      {
        label: '备注',
        field: 'REMARK',
        component: 'Input',
        colProps: {
          span: 24,
        },
      },
      {
        label: 'ID',
        field: 'ID',
        component: 'Input',
        colProps: {
          span: 24,
        },
        show: false,
      },
    ] as FormSchema[],
  };
  return [methods, ActionColumn];