| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | const { getLocale } = useLocale(); |
| | | |
| | | const { t } = useI18n(''); |
| | | const { createMessage } = useMessage(); |
| | | const { createMessage,createConfirm } = useMessage(); |
| | | export default defineComponent({ |
| | | components: { BasicModal, BasicForm, PageWrapper, ImpExcel,BasicTable }, |
| | | props: { |
| | |
| | | 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 }); |
| | | } |
| | |
| | | setModalProps({ confirmLoading: true }); |
| | | // TODO custom api |
| | | //添加锡膏胶水记录 |
| | | createConfirm({ |
| | | iconType: 'warning', |
| | | title: () => h('span', t('导入料站表信息')), |
| | | content: () => h('span', t('异常的数据无法导入')), |
| | | onOk: async () => { |
| | | const apiAction = SaveExportTable(tableListRef.value); |
| | | apiAction.then((action) => { |
| | | if (action) { |
| | |
| | | createMessage.error(t('导入失败,代码已使用')); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } finally { |
| | | setModalProps({ confirmLoading: false }); |
| | | } |