Cloud Zhang
2024-05-20 2cd26d312f47a79fb9b8b444a3f1760f98d03e38
工具保养记录和明细
已添加5个文件
995 ■■■■■ 文件已修改
src/api/tigerapi/mes/smt/smtmaintain.ts 240 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/tool/smt_maintain/MaintainDrawer.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/tool/smt_maintain/index.vue 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/tool/smt_maintain/maintaindtl.vue 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/tool/smt_maintain/smt_mt_maintain.data.ts 349 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/mes/smt/smtmaintain.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,240 @@
import { buildUUID } from '../../../../utils/uuid';
//import { ApiAction, ApiActionPage } from '../../model/baseModel';
import { genAction, Api } from '../../system';
import { useUserStore } from '/@/store/modules/user';
import { defHttp } from '/@/utils/http/axios';
import { isNullOrEmpty } from '/@/utils/is';
import { formatToDateTime } from '/@/utils/dateUtil';
/*
 * èŽ·å–é£žè¾¾ä¿¡æ¯
 */
export const getListByPage = async (params: any) => {
  let order = ''
  if (params.order != undefined) {
    order = params.order == 'descend' ? (params.field + ' desc') : params.field
  }
  let sqlcmd = '1=1';
  if (params?.TOOL_CODE != undefined && params?.TOOL_CODE != '') {
    sqlcmd += " And TOOL_CODE like '%" + params?.TOOL_CODE + "%'";
  }
  let option = {
    UserId: useUserStore().getUserInfo.userId as string,
    ByOrg: true,
    OrgCode: useUserStore().getUserInfo.orgCode as string
  }
  if (!isNullOrEmpty(params.page)) {
    const usParams = genAction('SMT_MAINTAIN', {
      QueryAble_T: '',
      where: sqlcmd,
      order: order,
      page: {
        pageAble_T: 'string',
        draw: 1,
        pageIndex: params.page,
        pageSize: params.pageSize,
      }
    });
    return getListByPageAsync(usParams);
  } else {
    const usParams = genAction('SMT_MAINTAIN', {
      QueryAble_T: '',
      where: sqlcmd
    });
    return getListByPageAsync(usParams);
  }
  // const rParams = genActionPage('BIZ_ERP_PROD_IN', sqlcmd, params.page, params.pageSize,option);
  // return getFinishedwarehouseListByPageAsync(rParams);
};
async function getListByPageAsync(params: any) {
  const data = await defHttp.post(
    { url: Api.QueryUrl, params },
    {
      isTransformResponse: false,
    },
  );
  let model = {}
  if (isNullOrEmpty(data.Data.page)) {
    model = {
      items: data.Data.Items,
    };
  } else {
    model = {
      items: data.Data.page.data,
      total: data.Data.page.totals,
    };
  }
  return model;
}
//新增飞达信息
export const Save = async (params: Recordable, isUpdate: boolean, isbaofei: boolean) => {
  const item: any = {
    ID: params.ID,
    CREATE_TIME: params?.CREATE_TIME,
    CREATE_USER: params?.CREATE_USER,
    UPDATE_TIME: params?.UPDATE_TIME,
    UPDATE_USER: params?.UPDATE_USER,
    GHOST_ROW: params?.GHOST_ROW,
    AUTH_ORG: params?.AUTH_ORG,
    AUTH_PROD: params?.AUTH_PROD,
    AUTH_WH: params?.AUTH_WH,
    TOOL_CODE: params?.TOOL_CODE,
    PROJ_CODE: params?.PROJ_CODE,
    RESULT: params?.RESULT,
    REMARK: params?.REMARK,
  };
  let data;
  if (isUpdate) {
    if (isbaofei) {
      item.STATUS = 5;
    }
    const time = new Date();
    item.UPDATE_TIME = formatToDateTime(time);
    item.UPDATE_USER = useUserStore().getUserInfo.userId as string;
    // regionitem.ORG_CODE = useUserStore().getUserInfo.orgCode as string;
    // regionitem.AUTH_ORG = useUserStore().getUserInfo.orgCode as string;
    data = await defHttp.post(
      { url: Api.UpdateEntity, params: genAction('SMT_MAINTAIN', item) },
      {
        errorMessageMode: 'none',
        isTransformResponse: false,
      },
    );
  } else {
    // const usParams = genAction(
    //   'SMT_SOLDER',
    //   "REGION_CODE='" + params.REGION_CODE + "'AND AUTH_ORG='" + regionitem.ORG_CODE + "'",
    // );
    //var check = await isExist(usParams);
    //console.log('check',check)
    //if (!check.Data) {
    item.ID = buildUUID(); //生成GUID
    item.UPDATE_TIME = formatToDateTime(new Date());
    item.CREATE_USER = useUserStore().getUserInfo.userId as string;
    item.UPDATE_USER = useUserStore().getUserInfo.userId as string;
    // regionitem.ORG_CODE = useUserStore().getUserInfo.orgCode as string;
    // regionitem.AUTH_ORG = useUserStore().getUserInfo.orgCode as string;
    data = await defHttp.post(
      { url: Api.AddEntity, params: genAction('SMT_MAINTAIN', item) },
      {
        errorMessageMode: 'none',
        isTransformResponse: false,
      },
    );
    //} else {
    // return check.Message;
    //return '重复了';
    //}
  }
  return data;
};
//删除
export const Delete = async (Tool_Id: string) => {
  const usParams = genAction('SMT_MAINTAIN', `ID='${Tool_Id}'`)
  return await defHttp.post(
    { url: Api.DeleteWhere, params: usParams },
    {
      errorMessageMode: 'none',
      isTransformResponse: false
    }
  )
}
//单据详情
export const getDetailListByPage = async (params: any) => {
  let order = ''
  if (params.order != undefined) {
    order = params.order == 'descend' ? (params.field + ' desc') : params.field
  }
  let sqlcmd = '1=1';
  if (params?.ID != undefined && params?.ID != '') {
    sqlcmd += " And MT_ID like '%" + params?.ID + "%'";
  }
  if (params?.TOOL_CODE != undefined && params?.TOOL_CODE != '') {
    sqlcmd += " And TOOL_CODE like '%" + params?.TOOL_CODE + "%'";
  }
  // if (params?.OUTWAREHOUSECODE != undefined && params?.OUTWAREHOUSECODE != '') {
  //   sqlcmd += " And OUTWAREHOUSECODE = '" + params?.OUTWAREHOUSECODE + "'";
  // }
  // if (params?.INWAREHOUSECODE != undefined && params?.INWAREHOUSECODE != '') {
  //   sqlcmd += " And INWAREHOUSECODE = '" + params?.INWAREHOUSECODE + "'";
  // }
  // if (!isNullOrEmpty(params?.LINESTATUS)) {
  //   sqlcmd += " And LINESTATUS = '" + params?.LINESTATUS + "'";
  // }
  var option ={
    UserId:useUserStore().getUserInfo.userId as string,
    ByOrg:true,
    OrgCode:useUserStore().getUserInfo.orgCode as string
  }
  // const rParams = genActionPage('BIZ_WMS_TRANSFER_DTL', sqlcmd, params.page, params.pageSize,option);
  if(!isNullOrEmpty(params.page)){
    const usParams = genAction('SMT_MT_DTL', {
      QueryAble_T: '',
      where: sqlcmd,
      page: {
        pageAble_T: 'string',
        draw: 1,
        pageIndex: params.page,
        pageSize: params.pageSize,
      }
    });
    return getDetailListByPageAsync(usParams);
  }else{
    const usParams = genAction('SMT_MT_DTL', {
      QueryAble_T: '',
      where: sqlcmd,
    });
    return getDetailListByPageAsync(usParams);
  }
};
async function getDetailListByPageAsync(params: any) {
  const data = await defHttp.post(
    { url: Api.QueryUrl, params },
    {
      isTransformResponse: false,
    },
  );
  let model = {}
  if(isNullOrEmpty(data.Data.page)){
     model = {
      items: data.Data.Items,
    };
  }else{
      model = {
      items: data.Data.page.data,
      total: data.Data.page.totals,
    };
  }
  return model;
}
//下拉列表
// STATUSs å•据状态
export const optionsListApi = async (params: Recordable) => {
  const usParams = genAction('SMT_MAINTAIN+RESULTs', '');
  return await defHttp.post(
    { url: Api.urlQueryEnum, params: usParams },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
      // apiUrl: globSetting.taskApiUrl
    },
  );
};
//类型
export const optionsListApiType = async (params: Recordable) => {
  const usParams = genAction('V_SMT_TOOL+TYPEs', '');
  return await defHttp.post(
    { url: Api.urlQueryEnum, params: usParams },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
      // apiUrl: globSetting.taskApiUrl
    },
  );
};
src/views/tigerprojects/mes/smt/tool/smt_maintain/MaintainDrawer.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
<template>
  <BasicDrawer
    v-bind="$attrs"
    @register="registerDrawer"
    showFooter
    :title="getTitle"
    width="800px"
    @ok="handleSubmit"
  >
    <BasicForm @register="registerForm" />
  </BasicDrawer>
</template>
<script lang="ts">
  import { defineComponent, ref, computed, unref } from 'vue';
  import { BasicForm, useForm } from '/@/components/Form/index';
  import { formSchema } from './smt_mt_maintain.data';
  import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
  import { Save } from '/@/api/tigerapi/mes/smt/smtmaintain';
  export default defineComponent({
    name: 'ToolDrawer',
    components: { BasicDrawer, BasicForm },
    emits: ['success', 'register'],
    setup(_, { emit }) {
      const isUpdate = ref(true);
      const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
        resetFields();
        setDrawerProps({ confirmLoading: false });
        isUpdate.value = !!data?.isUpdate;
        if (unref(isUpdate)) {
          setFieldsValue({
            ...data.record,
          });
        }
      });
      const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
        labelWidth: 120,
        schemas: formSchema,
        actionColOptions: {
          span: 24,
        },
        showActionButtonGroup: false,
      });
      const getTitle = computed(() => (!unref(isUpdate) ? '新增工具保养项目' : '编辑工具保养项目'));
      async function handleSubmit() {
        try {
          const values = await validate();
          setDrawerProps({ confirmLoading: true });
          // TODO custom api
          //保存物料
          const apiAction = Save(values, unref(isUpdate),false);
          apiAction.then((action) => {
            if (action.IsSuccessed) {
              closeDrawer();
              emit('success');
            }
          });
        } finally {
          setDrawerProps({ confirmLoading: false });
        }
      }
      return {
        registerDrawer,
        registerForm,
        getTitle,
        handleSubmit,
      };
    },
  });
</script>
src/views/tigerprojects/mes/smt/tool/smt_maintain/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,167 @@
<template>
  <div>
    <BasicTable @register="registerTable">
      <template #toolbar>
        <a-button color="primary" @click="handleAdd"> æ·»åŠ  </a-button>
        <a-button ghost color="primary" @click="aoaToExcel"> å¯¼å‡º </a-button>
      </template>
      <template #action="{ record }">
        <TableAction :actions="[
      {
        icon: 'clarity:note-edit-line',
        tooltip: '修改',
        onClick: handleEdit.bind(null, record),
      },
      {
        icon: 'clarity:info-standard-line',
        tooltip: '详情',
        onClick: handleBao.bind(null, record),
      },
      {
        icon: 'ant-design:delete-outlined',
        tooltip: '删除',
        popConfirm: {
          title: '是否确认删除?',
          placement: 'left',
          confirm: handleDelete.bind(null, record),
        },
      },
    ]" />
      </template>
    </BasicTable>
    <Loading :loading="compState.loading" :tip="compState.tip" />
    <!-- <WmsItemDrawer @register="registerDrawer" @success="handleSuccess" /> -->
    <MaintainDrawer @register="registerDrawer" @success="handleSuccess" />
  </div>
</template>
<script lang="ts" setup>
import { reactive, unref } from 'vue';
import { aoaToSheetXlsx } from '/@/components/Excel';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import MaintainDrawer from './MaintainDrawer.vue';
import { useDrawer } from '/@/components/Drawer';
import { columns, searchFormSchema } from './smt_mt_maintain.data';
import { getListByPage, Save, Delete } from '/@/api/tigerapi/mes/smt/smtmaintain';
import { useGo } from '/@/hooks/web/usePage';
import { Loading } from '/@/components/Loading';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
const { createMessage } = useMessage();
const [registerDrawer, { openDrawer }] = useDrawer();
const go = useGo();
const compState = reactive({
  absolute: false,
  loading: false,
  tip: '加载中...',
});
const [registerTable, { getForm, getPaginationRef, reload }] = useTable({
  title: '工具保养记录',
  api: getListByPage,
  columns,
  formConfig: {
    labelWidth: 120,
    schemas: searchFormSchema,
  },
  actionColumn: {
    width: 120,
    title: '操作',
    dataIndex: 'action',
    slots: { customRender: 'action' },
    fixed: 'right', //undefined,
  },
  ellipsis: true,
  useSearchForm: true,
  showTableSetting: false,
  bordered: true,
  showIndexColumn: false,
});
let arr: any[] = [];
//导出
function aoaToExcel() {
  const totals = getPaginationRef().total
  if (totals < 30000) {
    arr = [];
    compState.loading = true;
    const col = getForm().getFieldsValue()
    getListByPage(col).then((res) => {
      res.items.forEach(element => {
        var TYPE = ''
        switch (element.RESULT) {
          case 0:
            TYPE = '正常';
            break;
          case 1:
            TYPE = '刮刀';
            break;
          default:
            break;
        }
        arr.push({
          '工具编码': element.TOOL_CODE,
          '保养项目编码': element.PROJ_CODE,
          '类型': TYPE,
          '备注': element.REMARK,
          '创建人': element.CREATE_USER,
          '创建时间': element.CREATE_TIME,
        });
      });
      const arrHeader = columns.map((column) => column.title);
      const arrData = arr.map((item) => {
        return Object.keys(item).map((key) => item[key]);
      });
      // ä¿è¯data顺序与header一致
      if (arr.length < 30000) {
        aoaToSheetXlsx({
          data: arrData,
          header: arrHeader,
          filename: '工具保养记录.xlsx',
        });
      } else {
        createMessage.error(t('导出数据不能超过三万条,如需要更多的请联系管理员'));
      }
      compState.loading = false;
    })
  } else {
    createMessage.error(t('导出数据不能超过三万条,如需要更多的请联系管理员'));
  }
}
//添加
function handleAdd() {
  openDrawer(true, {
    isUpdate: false,
  });
}
//编辑
function handleEdit(record: any) {
  openDrawer(true, {
    isUpdate: true,
    record
  });
}
function handleSuccess() {
  reload();
}
//报废
function handleBao(record: any) {
  go('/maintaindtl/' + record.ID);
}
//删除
function handleDelete(record: any) {
  const apiAction = Delete(record.ID);
  apiAction.then((action) => {
    if (action.IsSuccessed) {
      createMessage.success(t('已删除'));
      reload();
    } else {
      createMessage.success(t('删除操作失败'));
    }
  });
}
</script>
src/views/tigerprojects/mes/smt/tool/smt_maintain/maintaindtl.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,165 @@
<template>
  <PageWrapper
    :title="bt('工具保养项目资料',[BILLCODE])"
    :content="bt('这是工具保养项目详情页面。')"
    contentBackground
    @back="goBack"
  >
    <template #footer>
      <a-tabs default-active-key="detail" v-model:activeKey="currentKey" @tabClick="tabClkcallback">
        <a-tab-pane key="detail" :tab="bt('单据详情')" />
      </a-tabs>
    </template>
    <div>
      <div v-if="currentKey == 'detail'">
        <BasicTable @register="detailTable">
          <template #toolbar>
            <a-button preIcon="OutR|svg" ghost color="success" @click="aoaToExceldtl"> å¯¼å‡º </a-button>
          </template>
        </BasicTable>
      </div>
    </div>
    <Loading :loading="compState.loading" :tip="compState.tip" />
  </PageWrapper>
</template>
<script lang="ts" setup>
import { aoaToSheetXlsx } from '/@/components/Excel';
  import { ref,reactive } from 'vue';
  import { useRoute } from 'vue-router';
  import { PageWrapper } from '/@/components/Page';
  import { useTabs } from '/@/hooks/web/useTabs';
  import { Tabs } from 'ant-design-vue';
  import { useGo } from '/@/hooks/web/usePage';
  //详情列表
  import { BasicTable, useTable, TableAction } from '/@/components/Table';
  import {
    getDetailListByPage,
  } from '/@/api/tigerapi/mes/smt/smtmaintain';
import { Loading } from '/@/components/Loading';
import { useMessage } from '/@/hooks/web/useMessage';
  import { columns_D, searchFormSchema_D } from './smt_mt_maintain.data';
  //ATabs: Tabs, ATabPane: Tabs.TabPane
  import { useI18n } from '/@/hooks/web/useI18n';
  const compState = reactive({
  absolute: false,
  loading: false,
  tip: '加载中...',
});
  const ATabs = ref(Tabs);
  const ATabPane = ref(Tabs.TabPane);
  const route = useRoute();
  var ITEM_CODE = ref('');
  const go = useGo();
const { t: bt } = useI18n('');
const { createMessage } = useMessage();
  //获取JobId
  const ID = ref(route.params?.ID);
  const [detailTable, { getForm: DataDtl, getPaginationRef: DataPDtl }] = useTable({
    title: bt('单据详情列表'),
    api: getDetailListByPage,
    columns: columns_D,
    useSearchForm: true,
    showTableSetting: true,
    bordered: true,
    canResize:true,
    showIndexColumn: false,
    formConfig: {
      labelWidth: 120,
      schemas: searchFormSchema_D,
    },
    actionColumn: {
      width: 80,
      title: bt('操作'),
      dataIndex: 'action',
      slots: { customRender: 'action' },
      fixed: 'right', //undefined,
    },
    searchInfo: { ID },
  });
  let arrdtl: any[] = [];
function aoaToExceldtl() {
  const totals = DataPDtl().total
  if (totals < 30000) {
    arrdtl = [];
    compState.loading = true;
    const col = DataDtl().getFieldsValue()
    //col.BILLCODE = BILLCODE.value
    getDetailListByPage(col).then((res) => {
      res.items.forEach(element => {
        arrdtl.push({
          '保养记录ID': element.MT_ID,
          '工具编码': element.TOOL_CODE,
          '保养项目编码': element.PROJ_CODE,
          '保养记录值1': element.VALUE01,
          '保养记录值2': element.VALUE02,
          '保养记录值3': element.VALUE03,
          '保养记录值4': element.VALUE04,
          '保养记录值5': element.VALUE05,
          '保养记录值6': element.VALUE06,
          '保养记录值7': element.VALUE07,
          '保养记录值8': element.VALUE08,
          '保养记录值9': element.VALUE09,
          '保养记录值10': element.VALUE10,
          '保养记录值11': element.VALUE11,
          '保养记录值12': element.VALUE12,
          '保养记录值13': element.VALUE13,
          '保养记录值14': element.VALUE14,
          '保养记录值15': element.VALUE15,
          '保养记录值16': element.VALUE16,
          '保养记录值17': element.VALUE17,
          '保养记录值18': element.VALUE18,
          '保养记录值19': element.VALUE19,
          '保养记录值20': element.VALUE20,
          '备注': element.REMARK,
          '创建人': element.CREATE_USER,
          '创建时间': element.CREATE_TIME,
        });
      });
      const arrHeader = columns_D.map((column) => column.title);
      const arrData = arrdtl.map((item) => {
        return Object.keys(item).map((key) => item[key]);
      });
      // ä¿è¯data顺序与header一致
      if (arrdtl.length < 30000) {
        aoaToSheetXlsx({
          data: arrData,
          header: arrHeader,
          filename: '调拨单明细.xlsx',
        });
      } else {
        createMessage.error(bt('导出数据不能超过三万条,如需要更多的请联系管理员'));
      }
    })
  }else{
    createMessage.error(bt('导出数据不能超过三万条,如需要更多的请联系管理员'));
  }
  compState.loading=false;
}
  // æ­¤å¤„可以得到用户ID
  //const BILLCODE = ref(route.params?.BILLCODE.split(',')[1]);
  var currentKey = ref('detail');
  const { setTitle } = useTabs();
  // TODO
  // æœ¬é¡µä»£ç ä»…作演示,实际应当通过userId从接口获得用户的相关资料
  // è®¾ç½®Tab的标题(不会影响页面标题)
  setTitle(bt('详情:单据') + ID.value);
  // é¡µé¢å·¦ä¾§ç‚¹å‡»è¿”回链接时的操作
  function goBack() {
    // æœ¬ä¾‹çš„æ•ˆæžœæ—¶ç‚¹å‡»è¿”回始终跳转到账号列表页,实际应用时可返回上一页
    go('/Maintain');
  }
  const tabClkcallback = (val: string) => {
    if (val == 'detail') {
      ITEM_CODE.value = '';
    }
  };
</script>
src/views/tigerprojects/mes/smt/tool/smt_maintain/smt_mt_maintain.data.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,349 @@
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { optionsListApi,optionsListApiType } from '/@/api/tigerapi/mes/smt/smtmaintain';
import { h,unref } from 'vue';
import { Tag ,Tooltip} from 'ant-design-vue';
import{ useLocale } from '/@/locales/useLocale';
const { getLocale }=useLocale();
export const columns: BasicColumn[] = [
  {
    title: '工具编码',
    dataIndex: 'TOOL_CODE',
    width:200,
    sorter: true,
    resizable:true
  },
  {
    title: '保养项目编码',
    dataIndex: 'PROJ_CODE',
    width: 100,
    sorter: true,
    resizable:true
  },
  {
    title: '类型',
    dataIndex: 'RESULT',
    width: 100,
    sorter: true,
    resizable: true,
    customRender: ({ record }) => {
      const status = record.RESULT;
      var text = '';
      var color = '';
      switch (status) {
        case 0:
          text = '正常';
          color = 'green';
          break;
        case 1:
          text = '刮刀';
          color = 'blue';
          break;
        default:
          break;
      }
      return h(Tooltip, { title: 'xxxxxx' }, () => h(Tag, { color: color }, () => text));
    },
  },
  {
    title: '备注',
    dataIndex: 'REMARK',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '创建人',
    dataIndex: 'CREATE_USER',
    width:100,
    sorter: true,
    resizable:true
  },
  {
    title: '创建时间',
    dataIndex: 'CREATE_TIME',
    width:100,
    sorter: true,
    resizable:true
  },
  {
    title: 'ID',
    dataIndex: 'ID',
    width:200,
    sorter: true,
    resizable:true,
    ifShow:false
  }
];
export const searchFormSchema: FormSchema[] = [
  {
    field: 'TOOL_CODE',
    label: '工具编码',
    component: 'Input',
    colProps: { span: 8 },
  }
];
//新增组件export const
export const formSchema: FormSchema[] = [
  {
    label: '工具编码',
    field: 'TOOL_CODE',
    required: true,
    colProps: { span: 8 },
    component: 'Input',
  },
  {
    field: 'ID',
    label: 'ID',
    component: 'Input',
    show: false,
  },
  {
    label: '保养项目编码',
    field: 'PROJ_CODE',
    required: true,
    colProps: { span: 8 },
    component: 'Input',
  },
  {
    label: '类型',
    field: 'RESULT',
    required: true,
    component: 'ApiSelect',
    colProps: { span: 8 },
    componentProps: {
      api: optionsListApi,
      resultField: 'Data',
      labelField: unref(getLocale)=='zh_CN'?'Desc':'Name',
      valueField: 'Value',
    },
  },
  {
    label: '备注',
    field: 'REMARK',
    required: true,
    colProps: { span: 8 },
    component: 'Input',
  }
];
//详情
export const columns_D: BasicColumn[] = [
  {
    title: '保养记录ID',
    dataIndex: 'MT_ID',
    width:200,
    sorter: true,
    resizable:true
  },
  {
    title: '工具编码',
    dataIndex: 'TOOL_CODE',
    width: 100,
    sorter: true,
    resizable:true
  },
  {
    title: '保养项目编码',
    dataIndex: 'PROJ_CODE',
    width: 100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值1',
    dataIndex: 'VALUE01',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值2',
    dataIndex: 'VALUE02',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值3',
    dataIndex: 'VALUE03',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值4',
    dataIndex: 'VALUE04',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值5',
    dataIndex: 'VALUE05',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值6',
    dataIndex: 'VALUE06',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值7',
    dataIndex: 'VALUE07',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值8',
    dataIndex: 'VALUE08',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养项9',
    dataIndex: 'VALUE09',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值10',
    dataIndex: 'VALUE10',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值11',
    dataIndex: 'VALUE11',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值12',
    dataIndex: 'VALUE12',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值13',
    dataIndex: 'VALUE13',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值14',
    dataIndex: 'VALUE14',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值15',
    dataIndex: 'VALUE15',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值16',
    dataIndex: 'VALUE16',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值17',
    dataIndex: 'VALUE17',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值18',
    dataIndex: 'VALUE18',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值19',
    dataIndex: 'VALUE19',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '保养记录值20',
    dataIndex: 'VALUE20',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '备注',
    dataIndex: 'REMARK',
    width:100,
    sorter: true,
    resizable:true
  }
  ,
  {
    title: '创建人',
    dataIndex: 'CREATE_USER',
    width:100,
    sorter: true,
    resizable:true
  },
  {
    title: '创建时间',
    dataIndex: 'CREATE_TIME',
    width:100,
    sorter: true,
    resizable:true
  }
];
export const searchFormSchema_D: FormSchema[] = [
  {
    field: 'TOOL_CODE',
    label: '工具编码',
    component: 'Input',
    colProps: { span: 8 },
  }
];