|
|
@ -12,7 +12,7 @@ |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="ContainerRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="ContainerRecordDetail.allSchemas" |
|
|
|
:detailAllSchemas="ContainerRecordDetailAllSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
@ -67,7 +67,9 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { ContainerRecordMain,ContainerRecordMainRules,ContainerRecordDetail,ContainerRecordDetailRules } from './containerRecordMain.data' |
|
|
|
import { ContainerRecordMain, ContainerRecordMainRules, ContainerRecordDetail, ContainerRecordDetailRules } from './containerRecordMain.data' |
|
|
|
|
|
|
|
console.log(3444,ContainerRecordDetail) |
|
|
|
import * as ContainerRecordMainApi from '@/api/wms/containerRecordMain' |
|
|
|
import * as ContainerRecordDetailApi from '@/api/wms/containerRecordDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
@ -76,6 +78,7 @@ import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
import { json } from 'stream/consumers' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
defineOptions({ name: 'ContainerRecordMain' }) |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -85,7 +88,10 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const businessType = ref() |
|
|
|
const importFileName = ref() |
|
|
|
const tableColumns = ref([...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns]) |
|
|
|
const tableColumns = ref([...ContainerRecordMain.allSchemas.tableColumns, ...ContainerRecordDetail.allSchemas.tableMainColumns]) |
|
|
|
// const ContainerRecordDetailTableColumns = ref(JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns))) |
|
|
|
const ContainerRecordDetailAllSchemas = ref(JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas))) |
|
|
|
console.log(2233,ContainerRecordDetail.allSchemas.tableMainColumns) |
|
|
|
const searchType = ref() |
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: ContainerRecordDetailApi.getContainerRecordDetailPage // 分页接口 |
|
|
@ -135,27 +141,18 @@ else if ( routeName.value == 'ScrapContainerManageRecord') { |
|
|
|
businessType.value = 'ContainerManage' |
|
|
|
importFileName.value = '器具管理记录' |
|
|
|
} |
|
|
|
|
|
|
|
if ( routeName.value == 'InitialContainerManageRecord') { |
|
|
|
console.log('dodododo1') |
|
|
|
console.log('dodododo1',tableColumns.value) |
|
|
|
tableColumns.value = tableColumns.value.filter(item=>item.field != "fromLocationCode") |
|
|
|
console.log('dodododo1',tableColumns.value) |
|
|
|
// ContainerRecordDetail.allSchemas.formSchema.forEach((item) => { |
|
|
|
// if(item.field == 'fromLocationCode'){ |
|
|
|
// console.log('dodododo2') |
|
|
|
// item.hidden = true |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}else{ |
|
|
|
ContainerRecordDetail.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'fromLocationCode'){ |
|
|
|
item.hidden = false |
|
|
|
} |
|
|
|
}) |
|
|
|
if ( routeName.value == 'InitialContainerManageRecord') { |
|
|
|
const array = ContainerRecordDetail.allSchemas.tableMainColumns.filter(item=>item.field != "fromLocationCode") |
|
|
|
ContainerRecordDetailAllSchemas.value.tableMainColumns = array |
|
|
|
tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetailAllSchemas.value.tableMainColumns] |
|
|
|
} |
|
|
|
else { |
|
|
|
ContainerRecordDetail.allSchemas.tableMainColumns =JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns)) |
|
|
|
tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|