|
|
@ -84,19 +84,19 @@ export function getPrecisionStrategyList(itemList, callback) { |
|
|
|
}; |
|
|
|
|
|
|
|
getPrecisionStrategy(itemList).then(res => { |
|
|
|
console.log(111,res.data) |
|
|
|
console.log(111, res.data) |
|
|
|
if (res.data == null) { |
|
|
|
result.success = false |
|
|
|
result.message = '未查询到管理精度信息' |
|
|
|
} else { |
|
|
|
result.list = res.data; |
|
|
|
} |
|
|
|
console.log('haha',result) |
|
|
|
console.log('haha', result) |
|
|
|
callback(result); |
|
|
|
}).catch(error => { |
|
|
|
result.success = false; |
|
|
|
result.message = error; |
|
|
|
console.log('hehe',result) |
|
|
|
console.log('hehe', result) |
|
|
|
callback(result); |
|
|
|
}) |
|
|
|
} |
|
|
@ -136,21 +136,21 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) { |
|
|
|
} |
|
|
|
|
|
|
|
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) { |
|
|
|
|
|
|
|
|
|
|
|
let result = { |
|
|
|
list: [], |
|
|
|
success: true, |
|
|
|
message: '' |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
itemCodes: [label.itemCode], |
|
|
|
locationCode: locationCode |
|
|
|
}; |
|
|
|
// let jsonParem = JSON.stringify(param)
|
|
|
|
getManagementPrecision(params).then(res => { |
|
|
|
|
|
|
|
console.log("成功"+res) |
|
|
|
|
|
|
|
console.log("成功" + res) |
|
|
|
let managementPrecision = res.data[0].ManagementPrecision; |
|
|
|
switch (managementPrecision) { |
|
|
|
case 'BY_PACKAGING': |
|
|
@ -179,7 +179,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento |
|
|
|
break; |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.log("失败"+error) |
|
|
|
console.log("失败" + error) |
|
|
|
let result = { |
|
|
|
success: false, |
|
|
|
message: error |
|
|
@ -219,11 +219,16 @@ export function byPacking(label, locationCode, fromInventoryStatuses, callback) |
|
|
|
action: "==", |
|
|
|
value: locationCode |
|
|
|
}) |
|
|
|
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { |
|
|
|
if (fromInventoryStatuses) { |
|
|
|
let status = "" |
|
|
|
fromInventoryStatuses.forEach(res => { |
|
|
|
status = res + "," |
|
|
|
}) |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "inventoryStatus", |
|
|
|
action: "in", |
|
|
|
value: fromInventoryStatuses |
|
|
|
value: status |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -282,11 +287,16 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) { |
|
|
|
value: locationCode |
|
|
|
}) |
|
|
|
|
|
|
|
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { |
|
|
|
if (fromInventoryStatuses) { |
|
|
|
let status = "" |
|
|
|
fromInventoryStatuses.forEach(res => { |
|
|
|
status = res + "," |
|
|
|
}) |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "inventoryStatus", |
|
|
|
action: "in", |
|
|
|
value: fromInventoryStatuses |
|
|
|
value: status |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -332,7 +342,7 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback) |
|
|
|
data: {} |
|
|
|
}; |
|
|
|
|
|
|
|
var filters = [] |
|
|
|
let filters = [] |
|
|
|
filters.push({ |
|
|
|
column: "itemCode", |
|
|
|
action: "==", |
|
|
@ -354,11 +364,16 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback) |
|
|
|
value: locationCode |
|
|
|
}) |
|
|
|
|
|
|
|
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { |
|
|
|
if (fromInventoryStatuses) { |
|
|
|
var status = "" |
|
|
|
fromInventoryStatuses.forEach(res => { |
|
|
|
status = res + "," |
|
|
|
}) |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "inventoryStatus", |
|
|
|
action: "in", |
|
|
|
value: fromInventoryStatuses |
|
|
|
value: status |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -401,18 +416,23 @@ export function byUniqueId(label, locationCode, fromInventoryStatuses, callback) |
|
|
|
data: {} |
|
|
|
}; |
|
|
|
|
|
|
|
var filters = [] |
|
|
|
let filters = [] |
|
|
|
filters.push({ |
|
|
|
column: "packingNumber", |
|
|
|
action: "==", |
|
|
|
value: label.packingNumber |
|
|
|
}) |
|
|
|
|
|
|
|
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { |
|
|
|
if (fromInventoryStatuses) { |
|
|
|
var status = "" |
|
|
|
fromInventoryStatuses.forEach(res => { |
|
|
|
status = res + "," |
|
|
|
}) |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "inventoryStatus", |
|
|
|
action: "in", |
|
|
|
value: fromInventoryStatuses |
|
|
|
value: status |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -482,4 +502,4 @@ export function balanceByLocation(locationCode, callback) { |
|
|
|
result.message = err.message; |
|
|
|
callback(result) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |