diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue index 3425a1cf7..34ac5d2e3 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue @@ -686,7 +686,7 @@ const formData = ref({ // 存储类型 { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, // 库存事务 - { ParamCode: 'TransactionType', Operator: 'IN', Value: [] } + { ParamCode: 'TransactionType', Operator: 'IN', Value: '' } ], configuration: { // 仓库代码 @@ -920,6 +920,9 @@ const searchTableRef = ref() const blurWarehouse = async ()=>{ // 校验的值 let warehouseValue = formData.value.configuration[warehouseType.value] + if(!warehouseValue){ + return + } if(warehouseType.value == 'WarehouseCode'){ // 仓库 let verifyRes = await WarehouseApi.verifyWarehouse({ @@ -1000,7 +1003,7 @@ const searchTransactionType = ()=>{ // 失去焦点校验 const blurTransactionType = async ()=>{ let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') - if(transactionType){ + if(transactionType&&transactionType.Value){ let verifyRes = await TransactiontypeApi.verifyTransactiontype({ code:transactionType.Value }) @@ -1143,7 +1146,7 @@ const open = async (type: string, strategyCode: string, id?: number) => { if (data.condition) { formData.value.condition = JSON.parse(data.condition) formData.value.condition.forEach((item, index) => { - if (item.Operator == 'IN' || item.Operator == 'NOT IN') { + if ((item.Operator == 'IN' || item.Operator == 'NOT IN')&& Array.isArray(item.Value)) { item.Value = item.Value.split(',') } }) @@ -1277,7 +1280,7 @@ const resetForm = () => { // 存储类型 { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, // 库存事务 - { ParamCode: 'TransactionType', Operator: 'IN', Value: [] } + { ParamCode: 'TransactionType', Operator: 'IN', Value: '' } ], configuration: { diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue index a8c533f04..e0e3c07e8 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue @@ -628,7 +628,7 @@ const formData = ref({ // 存储类型 { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, // 库存事务 - { ParamCode: 'TransactionType', Operator: 'IN', Value: [] } + { ParamCode: 'TransactionType', Operator: 'IN', Value: '' } ], configuration: { // 仓库代码 @@ -895,7 +895,9 @@ const searchWarehouse = ()=>{ const blurWarehouse = async ()=>{ // 校验的值 let warehouseValue = formData.value.configuration[warehouseType.value] - + if(!warehouseValue){ + return + } if(warehouseType.value == 'WarehouseCode'){ // 仓库 let verifyRes = await WarehouseApi.verifyWarehouse({ @@ -977,7 +979,8 @@ const searchTransactionType = ()=>{ // 失去焦点校验 const blurTransactionType = async ()=>{ let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') - if(transactionType){ + console.log('transactionType',transactionType) + if(transactionType&&transactionType.Value){ let verifyRes = await TransactiontypeApi.verifyTransactiontype({ code:transactionType.Value }) @@ -1064,7 +1067,7 @@ const open = async (type: string, strategyCode: string, id?: number) => { if (data.condition) { formData.value.condition = JSON.parse(data.condition) formData.value.condition.forEach((item, index) => { - if (item.Operator == 'IN' || item.Operator == 'NOT IN') { + if ((item.Operator == 'IN' || item.Operator == 'NOT IN')&& Array.isArray(item.Value)) { item.Value = item.Value.split(',') } }) @@ -1217,7 +1220,7 @@ const resetForm = () => { // 存储类型 { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, // 库存事务 - { ParamCode: 'TransactionType', Operator: 'IN', Value: [] } + { ParamCode: 'TransactionType', Operator: 'IN', Value: '' } ], configuration: { // 仓库代码