|
|
@ -93,7 +93,7 @@ const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
const businessType = ref() |
|
|
|
|
|
|
|
console.log(99 , routeName.value) |
|
|
|
const fromInventoryStatus = ref() |
|
|
@ -114,6 +114,7 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'OK' |
|
|
|
toInventoryStatus.value = "HOLD" |
|
|
|
businessType.value = 'OkToHoldRequest' |
|
|
|
} else if ( routeName.value == 'HoldtookRequestMain') { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'HOLD', |
|
|
@ -121,6 +122,7 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'HOLD' |
|
|
|
toInventoryStatus.value = "OK" |
|
|
|
businessType.value = 'HoldToOkRequest' |
|
|
|
} else if ( routeName.value == 'HoldtoscrapRequestMain') { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'HOLD', |
|
|
@ -128,6 +130,7 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'HOLD' |
|
|
|
toInventoryStatus.value = "SCRAP" |
|
|
|
businessType.value = 'HoldToScrapRequest' |
|
|
|
} else if ( routeName.value == 'OktoscrapRequestMain') { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'OK', |
|
|
@ -135,6 +138,7 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'OK' |
|
|
|
toInventoryStatus.value = "SCRAP" |
|
|
|
businessType.value = 'OkToScrapRequest' |
|
|
|
} else if ( routeName.value == 'ScraptoholdRequestMain') { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'SCRAP', |
|
|
@ -142,20 +146,23 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'SCRAP' |
|
|
|
toInventoryStatus.value = "HOLD" |
|
|
|
businessType.value = 'ScrapToHoldRequest' |
|
|
|
} else { |
|
|
|
console.log(146 , fromInventoryStatus.value) |
|
|
|
fromInventoryStatus.value = null |
|
|
|
businessType.value = 'InventoryMoveRequest' |
|
|
|
} |
|
|
|
|
|
|
|
// 修改 tableform 属性 |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
if(item.field == 'fromPackingNumber') { |
|
|
|
if (fromInventoryStatus.value) { |
|
|
|
item.tableForm.searchCondition = [{ |
|
|
|
key: 'inventoryStatus', |
|
|
|
value: fromInventoryStatus.value, |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value , |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
},] |
|
|
|
} else { |
|
|
|
delete item.tableForm.searchCondition |
|
|
|
} |
|
|
@ -168,36 +175,14 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
} |
|
|
|
} |
|
|
|
if(item.field == "toLocationCode"){ |
|
|
|
if (toInventoryStatus.value == 'HOLD') { |
|
|
|
item.tableForm.searchCondition = [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
if (toInventoryStatus.value) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'type', |
|
|
|
value: 'HOLD', |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
if (toInventoryStatus.value == 'SCRAP') { |
|
|
|
item.tableForm.searchCondition = [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'type', |
|
|
|
value: 'SCRAP', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
}else { |
|
|
|
item.tableForm.searchCondition = { |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|