Browse Source

器具初始化去掉来源库位代码

hella_online_20241017
zhang_li 2 months ago
parent
commit
27caea6e42
  1. 37
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue

37
src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue

@ -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

Loading…
Cancel
Save