|
|
@ -595,13 +595,12 @@ export function getInspectReasonList(value) { |
|
|
|
// else return 'Other'
|
|
|
|
// }
|
|
|
|
|
|
|
|
export function getPackingNumberAndBatchByList(managementList, itemCode, packingNumber,locationCode, batch) { |
|
|
|
export function getPackingNumberAndBatchByList(managementList, itemCode, packingNumber, locationCode, batch) { |
|
|
|
var itemInfo = { |
|
|
|
packingNumber: "", |
|
|
|
batch: "" |
|
|
|
} |
|
|
|
|
|
|
|
var manageType = queryManageModelByList(managementList, itemCode,locationCode) |
|
|
|
var manageType = queryManageModelByList(managementList, itemCode, locationCode) |
|
|
|
if (manageType == "BY_QUANTITY") { |
|
|
|
itemInfo.packingNumber = "" |
|
|
|
itemInfo.batch = "" |
|
|
@ -614,19 +613,22 @@ export function getPackingNumberAndBatchByList(managementList, itemCode, packing |
|
|
|
} else if (manageType == "BY_UNIQUE_ID") { |
|
|
|
itemInfo.packingNumber = packingNumber |
|
|
|
itemInfo.batch = batch |
|
|
|
} else if (manageType == "") { |
|
|
|
itemInfo.packingNumber = packingNumber |
|
|
|
itemInfo.batch = batch |
|
|
|
} |
|
|
|
return itemInfo; |
|
|
|
} |
|
|
|
|
|
|
|
export function queryManageModelByList(managementList, itemCode,locationCode) { |
|
|
|
var result = managementList.filter(res => { |
|
|
|
if (res.itemCode == itemCode&&res.locationCode==locationCode) { |
|
|
|
export function queryManageModelByList(managementList, itemCode, locationCode) { |
|
|
|
var result = managementList.find(res => { |
|
|
|
if (res.itemCode == itemCode && res.locationCode == locationCode) { |
|
|
|
return res.ManagementPrecision |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
if (result != undefined) { |
|
|
|
return result[0].ManagementPrecision |
|
|
|
return result.ManagementPrecision |
|
|
|
} else { |
|
|
|
return "" |
|
|
|
} |
|
|
@ -806,7 +808,7 @@ export function getBatch() { |
|
|
|
var year = date.getFullYear(); //年
|
|
|
|
var month = date.getMonth() + 1; //月
|
|
|
|
var day = date.getDate(); //日
|
|
|
|
var batch =year.toString()+month.toString()+day.toString() |
|
|
|
var batch = year.toString() + month.toString() + day.toString() |
|
|
|
return batch; |
|
|
|
} |
|
|
|
|
|
|
|