diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts index 8942cde25..d9b00314b 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -13,6 +13,7 @@ export interface ConfigVO { visible: boolean remark: string createTime: Date + locoationCode: string } // 查询参数列表 diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index 4d7182995..183224ff5 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -86,12 +86,12 @@ export const selectBusinessTypeToLocation = async (params) => { } -export const selectConfigToLocation = async (params) => { +export const selectPageItemAreaToLocation = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/location/pageConfigToLocationSenior', data }) + return await request.post({ url: '/wms/location/pageItemAreaToLocationSenior', data }) } else { - return request.get({ url: `/wms/location/pageConfigToLocation`, params }) + return request.get({ url: `/wms/location/pageItemAreaToLocation`, params }) } } \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts index ca0f4f308..9b7584156 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts @@ -264,9 +264,18 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ // 表单校验 export const ContainerDetailRequestRules = reactive({ - fromLocationCode: [required], - toLocationCode: [required], - concurrencyStamp: [required], + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toinventoryStatus: [ + { required: true, message: '请选择倒库存状态', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], }) export const ContainerDetailRequest = useCrudSchemas(reactive([ @@ -395,8 +404,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ width: 150 }, tableForm: { - type: 'Select', - disabled:true + type: 'Select' }, }, // { diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts index d7385bc01..93ef9ec97 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts @@ -268,9 +268,15 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ // 表单校验 export const ContainerDetailRequestRules = reactive({ - fromLocationCode: [required], - toLocationCode: [required], - concurrencyStamp: [required], + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], }) export const ContainerDetailRequest = useCrudSchemas(reactive([ diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index 6f3211c54..ea5089cda 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -129,9 +129,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => nextTick(() => { if (type == 'tableForm') { if(formField == 'containerNumber') { - row['containerNumber'] = val[0]['code'] + row['containerNumber'] = val[0]['itemCode'] row['uom'] = val[0]['uom'] - row['toInventoryStatus'] = 'OK' + row['fromLocationCode'] = val[0]['locationCode'] + row['fromInventoryStatus'] = val[0]['inventoryStatus'] + row['toInventoryStatus'] = 'SCRAP' }else if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] }else { @@ -149,7 +151,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { nextTick(() => { const setV = {} if(formField == 'containerNumber') { - setV['containerNumber'] = val[0]['code'] + setV['containerNumber'] = val[0]['itemCode'] setV['uom'] = val[0]['uom'] }else if(formField == 'toLocationCode'){ setV['toLocationCode'] = val[0]['code'] @@ -162,7 +164,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { // 修改 tableform 属性 ContainerDetailRequest.allSchemas.tableFormColumns.map(item => { - if(item.field == 'containerNumber') { if (fromLocationCode.value == null) { item.tableForm.searchCondition = [ diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts index 3c49924d7..d14b1c371 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts @@ -5,8 +5,6 @@ import { dateFormatter } from '@/utils/formatTime' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' -import * as confgiApi from '@/api/infra/config' - import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' @@ -29,8 +27,6 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData = data?.list[0] || {} -const confgiData = await confgiApi.queryByKey("containerManageRequestScrapLocationCode") - // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -268,9 +264,15 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ // 表单校验 export const ContainerDetailRequestRules = reactive({ - fromLocationCode: [required], - toLocationCode: [required], - concurrencyStamp: [required], + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], }) export const ContainerDetailRequest = useCrudSchemas(reactive([ @@ -359,17 +361,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.getLocationPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'code', - value: confgiData.locationCode, - isMainValue: false - }] + searchPage: LocationApi.selectPageItemAreaToLocation, }, form: { // labelMessage: '信息提示说明!!!', @@ -379,17 +371,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.getLocationPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'code', - value: confgiData.locationCode, - isMainValue: false - }] + searchPage: LocationApi.selectPageItemAreaToLocation, } } }, @@ -420,7 +402,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ }, tableForm: { type: 'Select', - disabled:true + disabled: true }, }, // {