From 3be02510ec4c594dc0d7824428ed36458e4ce665 Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Wed, 16 Apr 2025 11:11:39 +0800
Subject: [PATCH] =?UTF-8?q?YT-2415=E4=B8=8D=E8=89=AF=E5=93=81=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E7=AC=AC=E4=B8=80=E4=B8=AA=E9=97=AE=E9=A2=98=E4=BB=8E?=
=?UTF-8?q?=E5=BA=93=E4=BD=8D=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../inventorymoveRequestMainOKHOLD/index.vue | 73 ++++++++++++++-----
.../inventorymoveRequestMain.data.ts | 14 +---
2 files changed, 58 insertions(+), 29 deletions(-)
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: [