Browse Source

修改直接库存转移

hella_online_20240829
niexiting 5 months ago
parent
commit
9d6f0981ec
  1. 31
      src/pages/inventoryMove/coms/comMoveRecord.vue

31
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -24,7 +24,7 @@
<view class=""> <view class="">
<!-- :isShowEdit="isShowEditLocation" --> <!-- :isShowEdit="isShowEditLocation" -->
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation'
:locationAreaTypeList="toLocationAreaTypeList" :isShowEdit='true' ></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList" :isShowEdit='true'></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>
@ -124,7 +124,7 @@
dataContent: {}, dataContent: {},
fromLocationAreaTypeList: [], fromLocationAreaTypeList: [],
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
isShowEditLocation:false isShowEditLocation: false
} }
}, },
@ -144,7 +144,7 @@
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
@ -153,12 +153,12 @@
this.title = "库存转移记录"; this.title = "库存转移记录";
this.toInventoryStatus = "" this.toInventoryStatus = ""
this.toLocationCode = "" this.toLocationCode = ""
this.isShowEditLocation =true; 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 = "" this.toLocationCode = ""
this.isShowEditLocation =true; this.isShowEditLocation = true;
} else if (this.businessTypeCode == "HoldToScrap") { } else if (this.businessTypeCode == "HoldToScrap") {
this.title = "隔离转报废记录"; this.title = "隔离转报废记录";
this.toInventoryStatus = "SCRAP" this.toInventoryStatus = "SCRAP"
@ -184,7 +184,7 @@
title: this.title title: this.title
}) })
}, },
getLocationInfo(){ getLocationInfo() {
if (this.toLocationCode != "") { if (this.toLocationCode != "") {
getBasicLocationByCode(this.toLocationCode).then(res => { getBasicLocationByCode(this.toLocationCode).then(res => {
if (res.data.total > 0) { if (res.data.total > 0) {
@ -199,14 +199,14 @@
} else { } else {
this.showErrorMessage('库位[' + this.toLocationCode + ']不存在') this.showErrorMessage('库位[' + this.toLocationCode + ']不存在')
} }
}).catch(error => { }).catch(error => {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} }
}, },
openScanPopup() { openScanPopup() {
if (this.fromLocationCode == "") { if (this.fromLocationCode == "") {
this.showFromLocationPopup(); this.showFromLocationPopup();
@ -239,8 +239,12 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus; //
newDetail.toInventoryStatus = this.toInventoryStatus; if (this.businessTypeCode == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
@ -367,8 +371,7 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if (detail.toLocationCode == '') if (detail.toLocationCode == '') {
{
detail.toLocationCode = this.toLocationCode; detail.toLocationCode = this.toLocationCode;
} }
var filterResult = itemList.filter(res => { var filterResult = itemList.filter(res => {
@ -422,7 +425,7 @@
submitItem.package = null; submitItem.package = null;
submitItem.Records = null; submitItem.Records = null;
submitItem.qty = detail.handleQty; submitItem.qty = detail.handleQty;
subList.push(submitItem) subList.push(submitItem)
@ -441,4 +444,4 @@
</script> </script>
<style> <style>
</style> </style>
Loading…
Cancel
Save