Cloud Zhang
2024-05-22 773469386cf5346ac3477407e60737ede858b0ff
料站表优化
已修改2个文件
23 ■■■■ 文件已修改
src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue
@@ -4,7 +4,7 @@
    @register="registerDrawer"
    showFooter
    :title="getTitle"
    width="800px"
    width="600px"
    @ok="handleSubmit"
  >
    <BasicForm @register="registerForm" />
src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue
@@ -1,5 +1,5 @@
<template>
  <BasicModal width="1200px" :height=400 v-bind="$attrs" ok-text="保存" @register="register" :title="t('导入工单料站表')"
  <BasicModal width="1200px" :height=600 v-bind="$attrs" ok-text="保存" @register="register" :title="t('导入工单料站表')"
    @ok="handleSubmit">
    <a-button style="position:relative;left: 100px;" @click="aoaToExcel" class="m-3"> 模板 </a-button>
      <ImpExcel style="width: 100px; position: relative; top:-56px" @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
@@ -10,7 +10,7 @@
    <a-card style="position: relative;top:-55px" :title="t('列表')" :bordered="false">
        <!-- :columns="dtlColumns"
        :dataSource="data" -->
        <PageWrapper :minHeight="300" dense contentFullHeight contentClass="flex">
        <PageWrapper dense contentClass="flex">
          <BasicTable :maxHeight="200" v-for="(table, index) in tableListRef" :key="index" :title="table.title" :columns="table.columns"
            :dataSource="table.dataSource" />
        </PageWrapper>
@@ -34,7 +34,7 @@
const { getLocale } = useLocale();
const { t } = useI18n('');
const { createMessage } = useMessage();
const { createMessage,createConfirm } = useMessage();
export default defineComponent({
  components: { BasicModal, BasicForm, PageWrapper, ImpExcel,BasicTable },
  props: {
@@ -81,13 +81,16 @@
      if(status=='数据异常'){
        color='red'
        text=status
      }else if(status=='修改'){
        color='yellow'
        text=status
      }
      else{
        text=status
      }
      return h(Tooltip, { title: 'xxxxxx' }, () => h(Tag, { color: color }, () => text));
    },});
        columns.push({title:'原因',dataIndex:'原因'})
        columns.push({title:'原因',dataIndex:'原因',width:300,resizable:true})
        for (const title of header) {
          columns.push({ title, dataIndex: title });
        }
@@ -127,7 +130,12 @@
        setModalProps({ confirmLoading: true });
        // TODO custom api
        //添加锡膏胶水记录
        const apiAction = SaveExportTable(tableListRef.value);
        createConfirm({
        iconType: 'warning',
        title: () => h('span', t('导入料站表信息')),
        content: () => h('span', t('异常的数据无法导入')),
        onOk: async () => {
          const apiAction = SaveExportTable(tableListRef.value);
        apiAction.then((action) => {
          if (action) {
            if (action.IsSuccessed) {
@@ -142,6 +150,9 @@
            createMessage.error(t('导入失败,代码已使用'));
          }
        });
      }
      });
      } finally {
        setModalProps({ confirmLoading: false });
      }