|
@ -23,7 +23,7 @@ |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation' |
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation' |
|
|
:locationTypeList="toLocationTypeArray" :isShowEdit="allowEditStatus"></requiredLocation> |
|
|
:locationTypeList="tolocationTypeList" :isShowEdit="isShowEditLocation"></requiredLocation> |
|
|
</view> |
|
|
</view> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
@ -63,7 +63,8 @@ |
|
|
} from '@/common/balance.js'; |
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getPackingNumberAndBatchByList |
|
|
getPackingNumberAndBatchByList, |
|
|
|
|
|
deepCopyData |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -124,6 +125,7 @@ |
|
|
dataContent: {}, |
|
|
dataContent: {}, |
|
|
fromlocationTypeList: [], |
|
|
fromlocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
|
|
|
isShowEditLocation:false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -139,29 +141,11 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
this.initData(); |
|
|
this.initData(); |
|
|
|
|
|
this.getLocationInfo(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onLoad() { |
|
|
onLoad() { |
|
|
if (this.toLocationCode != '') { |
|
|
|
|
|
getBasicLocationByCode(this.toLocationCode).then(res => { |
|
|
|
|
|
if (res.data.total > 0) { |
|
|
|
|
|
let result = res.data.list[0]; |
|
|
|
|
|
var type = result.type; |
|
|
|
|
|
var available = result.available; |
|
|
|
|
|
if (available == "TRUE") { |
|
|
|
|
|
this.toLocationInfo = res.data.list[0]; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("扫描库位[" + this.code + "]不可用") |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage('库位[' + this.toLocationCode + ']不存在') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
@ -170,10 +154,12 @@ |
|
|
this.title = "库存转移记录"; |
|
|
this.title = "库存转移记录"; |
|
|
this.toInventoryStatus = "" |
|
|
this.toInventoryStatus = "" |
|
|
this.toLocationCode = "" |
|
|
this.toLocationCode = "" |
|
|
|
|
|
this.isShowEditLocation =true; |
|
|
} else if (this.businessTypeCode == "HoldToOk") { |
|
|
} else if (this.businessTypeCode == "HoldToOk") { |
|
|
this.title = "隔离转合格记录"; |
|
|
this.title = "隔离转合格记录"; |
|
|
this.toInventoryStatus = "OK" |
|
|
this.toInventoryStatus = "OK" |
|
|
this.toLocationCode = "OK" |
|
|
this.toLocationCode = "" |
|
|
|
|
|
this.isShowEditLocation =true; |
|
|
} else if (this.businessTypeCode == "HoldToScrap") { |
|
|
} else if (this.businessTypeCode == "HoldToScrap") { |
|
|
this.title = "隔离转报废记录"; |
|
|
this.title = "隔离转报废记录"; |
|
|
this.toInventoryStatus = "SCRAP" |
|
|
this.toInventoryStatus = "SCRAP" |
|
@ -182,10 +168,10 @@ |
|
|
this.title = "合格转隔离记录"; |
|
|
this.title = "合格转隔离记录"; |
|
|
this.toInventoryStatus = "HOLD" |
|
|
this.toInventoryStatus = "HOLD" |
|
|
this.toLocationCode = "HOLD" |
|
|
this.toLocationCode = "HOLD" |
|
|
} else if (this.businessTypeCode == "OktoScrap") { |
|
|
} else if (this.businessTypeCode == "OkToScrap") { |
|
|
this.title = "合格转报废记录"; |
|
|
this.title = "合格转报废记录"; |
|
|
this.toInventoryStatus = "SCRAP" |
|
|
this.toInventoryStatus = "SCRAP" |
|
|
this.toLocationCode = "HOLD" |
|
|
this.toLocationCode = "SCRAP" |
|
|
} else if (this.businessTypeCode == "ScrapToHold") { |
|
|
} else if (this.businessTypeCode == "ScrapToHold") { |
|
|
this.title = "报废转隔离记录"; |
|
|
this.title = "报废转隔离记录"; |
|
|
this.toInventoryStatus = "HOLD" |
|
|
this.toInventoryStatus = "HOLD" |
|
@ -195,6 +181,29 @@ |
|
|
title: this.title |
|
|
title: this.title |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
getLocationInfo(){ |
|
|
|
|
|
if (this.toLocationCode != "") { |
|
|
|
|
|
getBasicLocationByCode(this.toLocationCode).then(res => { |
|
|
|
|
|
if (res.data.total > 0) { |
|
|
|
|
|
let result = res.data.list[0]; |
|
|
|
|
|
var type = result.type; |
|
|
|
|
|
var available = result.available; |
|
|
|
|
|
if (available == "TRUE") { |
|
|
|
|
|
this.toLocationInfo = res.data.list[0]; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("扫描库位[" + this.code + "]不可用") |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage('库位[' + this.toLocationCode + ']不存在') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
if (this.fromLocationCode == "") { |
|
|
if (this.fromLocationCode == "") { |
|
|
this.showFromLocationPopup(); |
|
|
this.showFromLocationPopup(); |
|
@ -230,13 +239,14 @@ |
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
itemp.subList.push(newDetail); |
|
|
itemp.subList.push(newDetail); |
|
|
this.detailSource.push(itemp) |
|
|
this.detailSource.push(itemp) |
|
|
} else { |
|
|
} else { |
|
|
var detail = item.subList.find(r => { |
|
|
var detail = item.subList.find(r => { |
|
|
if (r.packingNumber == balance.packingNumber && |
|
|
if (r.packingNumber == balance.packingNumber && |
|
|
r.batch == balance.batch && |
|
|
r.batch == balance.batch && |
|
|
r.locationCode == balance.locationCode && |
|
|
r.fromLocationCode == balance.locationCode && |
|
|
r.inventoryStatus == balance.inventoryStatus && |
|
|
r.inventoryStatus == balance.inventoryStatus && |
|
|
r.scaned == true) { |
|
|
r.scaned == true) { |
|
|
return r; |
|
|
return r; |
|
@ -248,6 +258,7 @@ |
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
item.subList.push(newDetail); |
|
|
item.subList.push(newDetail); |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage(balance.packingNumber + "已经在列表中") |
|
|
this.showErrorMessage(balance.packingNumber + "已经在列表中") |
|
@ -326,7 +337,7 @@ |
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "记录<br>" + |
|
|
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "<br>" + |
|
|
res.data) |
|
|
res.data) |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
@ -386,32 +397,33 @@ |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
|
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
|
|
var subItem = {}; |
|
|
var submitItem = deepCopyData(detail) |
|
|
Object.assign(subItem, detail) |
|
|
submitItem.itemCode = detail.itemCode; |
|
|
subItem.itemCode = detail.itemCode; |
|
|
submitItem.itemName = detail.package.itemName; |
|
|
subItem.itemName = detail.package.itemName; |
|
|
submitItem.itemDesc1 = detail.package.itemDesc1; |
|
|
subItem.itemDesc1 = detail.package.itemDesc1; |
|
|
submitItem.itemDesc2 = detail.package.itemDesc2; |
|
|
subItem.itemDesc2 = detail.package.itemDesc2; |
|
|
|
|
|
|
|
|
|
|
|
subItem.fromInventoryStatus = detail.inventoryStatus; |
|
|
submitItem.fromInventoryStatus = detail.inventoryStatus; |
|
|
subItem.toInventoryStatus = detail.toInventoryStatus; |
|
|
submitItem.toInventoryStatus = detail.toInventoryStatus; |
|
|
|
|
|
|
|
|
subItem.fromPackingNumber = info.packingNumber; |
|
|
submitItem.fromPackingNumber = info.packingNumber; |
|
|
subItem.toPackingNumber = info.packingNumber; |
|
|
submitItem.toPackingNumber = info.packingNumber; |
|
|
|
|
|
|
|
|
subItem.fromContainerNumber = detail.containerNumber; |
|
|
submitItem.fromContainerNumber = detail.containerNumber; |
|
|
subItem.toContainerNumber = detail.containerNumber |
|
|
submitItem.toContainerNumber = detail.containerNumber |
|
|
|
|
|
|
|
|
subItem.fromBatch = info.batch; |
|
|
submitItem.fromBatch = info.batch; |
|
|
subItem.toBatch = info.batch; |
|
|
submitItem.toBatch = info.batch; |
|
|
|
|
|
|
|
|
subItem.fromLocationCode = detail.locationCode; |
|
|
submitItem.fromLocationCode = detail.fromLocationCode; |
|
|
subItem.toLocationCode = detail.toLocationCode; |
|
|
submitItem.toLocationCode = detail.toLocationCode; |
|
|
|
|
|
|
|
|
subItem.package = null; |
|
|
submitItem.package = null; |
|
|
subItem.Records = null; |
|
|
submitItem.Records = null; |
|
|
|
|
|
|
|
|
|
|
|
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty; |
|
|
|
|
|
|
|
|
subList.push(subItem) |
|
|
subList.push(submitItem) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|