Browse Source

HL-5281、HL-5538 上架策略 下架策略

hella_online_20240823
wangyufei 3 months ago
parent
commit
8ac71da6e0
  1. 11
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  2. 13
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

11
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -686,7 +686,7 @@ const formData = ref({
// //
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] }, { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'TransactionType', Operator: 'IN', Value: [] } { ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
], ],
configuration: { configuration: {
// //
@ -920,6 +920,9 @@ const searchTableRef = ref()
const blurWarehouse = async ()=>{ const blurWarehouse = async ()=>{
// //
let warehouseValue = formData.value.configuration[warehouseType.value] let warehouseValue = formData.value.configuration[warehouseType.value]
if(!warehouseValue){
return
}
if(warehouseType.value == 'WarehouseCode'){ if(warehouseType.value == 'WarehouseCode'){
// //
let verifyRes = await WarehouseApi.verifyWarehouse({ let verifyRes = await WarehouseApi.verifyWarehouse({
@ -1000,7 +1003,7 @@ const searchTransactionType = ()=>{
// //
const blurTransactionType = async ()=>{ const blurTransactionType = async ()=>{
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType')
if(transactionType){ if(transactionType&&transactionType.Value){
let verifyRes = await TransactiontypeApi.verifyTransactiontype({ let verifyRes = await TransactiontypeApi.verifyTransactiontype({
code:transactionType.Value code:transactionType.Value
}) })
@ -1143,7 +1146,7 @@ const open = async (type: string, strategyCode: string, id?: number) => {
if (data.condition) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
formData.value.condition.forEach((item, index) => { 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(',') item.Value = item.Value.split(',')
} }
}) })
@ -1277,7 +1280,7 @@ const resetForm = () => {
// //
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] }, { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'TransactionType', Operator: 'IN', Value: [] } { ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
], ],
configuration: { configuration: {

13
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -628,7 +628,7 @@ const formData = ref({
// //
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] }, { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'TransactionType', Operator: 'IN', Value: [] } { ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
], ],
configuration: { configuration: {
// //
@ -895,7 +895,9 @@ const searchWarehouse = ()=>{
const blurWarehouse = async ()=>{ const blurWarehouse = async ()=>{
// //
let warehouseValue = formData.value.configuration[warehouseType.value] let warehouseValue = formData.value.configuration[warehouseType.value]
if(!warehouseValue){
return
}
if(warehouseType.value == 'WarehouseCode'){ if(warehouseType.value == 'WarehouseCode'){
// //
let verifyRes = await WarehouseApi.verifyWarehouse({ let verifyRes = await WarehouseApi.verifyWarehouse({
@ -977,7 +979,8 @@ const searchTransactionType = ()=>{
// //
const blurTransactionType = async ()=>{ const blurTransactionType = async ()=>{
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') 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({ let verifyRes = await TransactiontypeApi.verifyTransactiontype({
code:transactionType.Value code:transactionType.Value
}) })
@ -1064,7 +1067,7 @@ const open = async (type: string, strategyCode: string, id?: number) => {
if (data.condition) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
formData.value.condition.forEach((item, index) => { 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(',') item.Value = item.Value.split(',')
} }
}) })
@ -1217,7 +1220,7 @@ const resetForm = () => {
// //
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] }, { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'TransactionType', Operator: 'IN', Value: [] } { ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
], ],
configuration: { configuration: {
// //

Loading…
Cancel
Save