diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index ff0a8435c..231f14ed8 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -85,6 +85,16 @@ export const selectBusinessTypeToLocation = async (params) => { } } +export const selectBusinessTypeOutLocation = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/location/pageBusinessTypeOutLocationSenior', data }) + } else { + return request.get({ url: `/wms/location/pageBusinessTypeOutLocation`, params }) + } +} + export const selectPageItemAreaToLocation = async (params) => { if (params.isSearch) { diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts index caacdf50e..e58df3e48 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts @@ -5,7 +5,9 @@ import { dateFormatter, formatDate } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain' -import { DeliverRecordMain } from '../../deliver/deliverRecordMain/deliverRecordMain.data' +import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail' + +import { DeliverRecordMain,DeliverRecordDetail } from '../../deliver/deliverRecordMain/deliverRecordMain.data' import * as CustomerApi from '@/api/wms/customer' import { Customer } from '../../../basicDataManage/customerManage/customer/customer.data' @@ -23,6 +25,8 @@ import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackag import * as ItemPackageApi from '@/api/wms/itempackage/index' import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' const { t } = useI18n() // 国际化 const dateTime = new Date().getTime() @@ -48,6 +52,7 @@ const userDeptArray:any = [userDept] /** * @returns {Array} 客户退货申请主表 */ + export const CustomerreturnRequestMain = useCrudSchemas(reactive([ { label: '单据号', @@ -87,8 +92,10 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ searchListPlaceholder: '请选择发货记录单号', // 输入框占位文本 searchField: 'number', // 查询弹窗赋值字段 searchTitle: '发货记录信息', // 查询弹窗标题 + isConcatDetailSchemas:true, // 是否主子表合并 searchAllSchemas: DeliverRecordMain.allSchemas, // 查询弹窗所需类 - searchPage: DeliverRecordMainApi.getDeliverRecordMainPage, // 查询弹窗所需分页方法 + searchDetailSchemas: DeliverRecordDetail.allSchemas, // 查询弹窗所需类 + searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -893,14 +900,20 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - tableForm: { - disabled: true + isSearch: true, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'toLocationCode', + searchTitle: '到库位代码', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'businessType', + value: 'CustomerReject', + isMainValue: false + }] }, - form: { - componentProps: { - disabled: true - } - } }, { label: '库存状态', @@ -1062,6 +1075,9 @@ export const CustomerreturnRequestDetailRules = reactive({ itemCode: [ { required: true, message: '请选择物料代码', trigger: 'change' } ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'blur' } + ], remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index edec628e8..9da46ac24 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -110,30 +110,35 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] - row['fromPackingNumber'] = val[0]['packingNumber'] - row['toPackingNumber'] = val[0]['packingNumber'] - row['fromBatch'] = val[0]['batch'] - row['toBatch'] = val[0]['batch'] - row['fromInventoryStatus'] = val[0]['inventoryStatus'] - row['toInventoryStatus'] = val[0]['inventoryStatus'] - row['fromContainerNumber'] = val[0]['containerNumber'] - row['toContainerNumber'] = val[0]['containerNumber'] - row['fromQty'] = val[0]['qty'] - row['toQty'] = val[0]['qty'] - row['fromOwnerCode'] = val[0]['ownerCode'] - row['toOwnerCode'] = val[0]['ownerCode'] - row['fromAltBatch'] = val[0]['altBatch'] - row['toAltBatch'] = val[0]['altBatch'] - row['fromArriveDate'] = val[0]['arriveDate'] - row['toArriveDate'] = val[0]['arriveDate'] - row['fromProduceDate'] = val[0]['produceDate'] - row['toProduceDate'] = val[0]['produceDate'] - row['fromExpireDate'] = val[0]['expireDate'] - row['toExpireDate'] = val[0]['expireDate'] - row['itemCode'] = val[0]['itemCode'] - row['locationCode'] = val[0]['locationCode'] - row['uom'] = val[0]['uom'] + if(formField=='toOwnerCode'){ + //到货主代码 + row['toOwnerCode'] = val[0]['code'] + }else{ + row[formField] = val[0][searchField] + row['fromPackingNumber'] = val[0]['packingNumber'] + row['toPackingNumber'] = val[0]['packingNumber'] + row['fromBatch'] = val[0]['batch'] + row['toBatch'] = val[0]['batch'] + row['fromInventoryStatus'] = val[0]['inventoryStatus'] + row['toInventoryStatus'] = val[0]['inventoryStatus'] + row['fromContainerNumber'] = val[0]['containerNumber'] + row['toContainerNumber'] = val[0]['containerNumber'] + row['fromQty'] = val[0]['qty'] + row['toQty'] = val[0]['qty'] + row['fromOwnerCode'] = val[0]['ownerCode'] + row['fromAltBatch'] = val[0]['altBatch'] + row['toAltBatch'] = val[0]['altBatch'] + row['fromArriveDate'] = val[0]['arriveDate'] + row['toArriveDate'] = val[0]['arriveDate'] + row['fromProduceDate'] = val[0]['produceDate'] + row['toProduceDate'] = val[0]['produceDate'] + row['fromExpireDate'] = val[0]['expireDate'] + row['toExpireDate'] = val[0]['expireDate'] + row['itemCode'] = val[0]['itemCode'] + row['locationCode'] = val[0]['locationCode'] + row['uom'] = val[0]['uom'] + } + } else { const setV = {} setV[formField] = val[0][searchField]