diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index ec15543fa..5c427d9a9 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -61,6 +61,7 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @clearInput="clearInput" + @clearSearchInput="clearSearchInput" /> @@ -142,12 +143,14 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{ { key: 'available', value: 'TRUE', - isMainValue: false + isMainValue: false, + isSearch: true, // 使用自定义拼接条件 }, { key: 'businessType', value: businessType.value, - isMainValue: false + isMainValue: false, + isSearch: true, // 使用自定义拼接条件 },{ key: 'isIn', value: 'out', @@ -213,13 +216,17 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { { key: 'businessType', value: businessType.value , - isMainValue: false + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 }] item.form.componentProps.searchCondition = [ { key: 'businessType', value: businessType.value, - isMainValue: false + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 } ] } else if (fromInventoryStatus.value == null) { @@ -227,13 +234,17 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { { key: 'businessType', value: businessType.value , - isMainValue: false + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 }] item.form.componentProps.searchCondition = [ { key: 'businessType', value: businessType.value, - isMainValue: false + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 }] } else { delete item.tableForm.searchCondition @@ -314,6 +325,15 @@ const clearInput = (field, row, index) => { row['supplierName'] = '' } } +const clearSearchInput=(field) => { + if (field=='fromLocationCode') { + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => { + if (item.key == 'locationCode') { + item.value = '' + } + }) + } +} const fromManagementPrecision = ref('') const toManagementPrecision = ref('') // 查询页面返回 @@ -392,20 +412,35 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} - if (formField == 'fromWarehouseCode') { + if (formField == 'fromLocationCode') { if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ - InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.push({ - key: 'warehouseCode', - value: val[0]["code"], - isMainValue: false - }) - } else { - InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => { - if (item.key == 'warehouseCode') { - item.value = val[0]["code"] - } - }) - } + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.push({ + key: 'warehouseCode', + value: val[0]["code"], + isMainValue: false + }) + } else { + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => { + if (item.key == 'warehouseCode') { + item.value = val[0]["code"] + } + }) + } + if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => (item.key == 'locationCode')) == undefined){ + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.push({ + key: 'locationCode', + value: val[0]["code"], + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }) + } else { + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => { + if (item.key == 'locationCode') { + item.value = val[0]["code"] + } + }) + } } setV[formField] = val[0][searchField] formRef.setValues(setV) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts index 68eccd896..eefc90ac6 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -161,8 +161,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ }, { - label: '到库位代码', // 子表数据--新增在form上展示 - field: 'toLocationCode', + label: '从库位代码', // 子表数据--新增在form上展示 + field: 'fromLocationCode', sort: 'custom', isForm:true, isTable:false, @@ -1225,15 +1225,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( isInpuFocusShow: false, // 开启查询弹窗 searchListPlaceholder: '请选择从批次', searchField: 'packingNumber', - searchTitle: '库存余额信息1', + searchTitle: '库存余额信息', searchAllSchemas: BalancePopWindow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, - searchCondition: [ - { - key: 'aaa', - value: '123', - isMainValue: false - }], }, form: { // labelMessage: '信息提示说明!!!', @@ -1243,7 +1237,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择从批次', searchField: 'packingNumber', - searchTitle: '库存余额信息1', + searchTitle: '库存余额信息', searchAllSchemas: BalancePopWindow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, searchCondition: [