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