Browse Source

修改库存转移错误

wms3.0_pda
lijuncheng 8 months ago
parent
commit
216a67e5e3
  1. 104
      pages/inventoryMove/coms/comMoveRecord.vue
  2. 12
      pages/inventoryMove/coms/comMovebalance.vue
  3. 2
      pages/inventoryMove/record/oktoScrapRecord.vue

104
pages/inventoryMove/coms/comMoveRecord.vue

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

12
pages/inventoryMove/coms/comMovebalance.vue

@ -6,14 +6,14 @@
<pack v-if="isShowPack && dataContent.packingNumber!=''" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
<location v-if="isShowLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"></location>
</view>
<view>
<qty :isShowStatus="false"
v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
<!-- <qty :isShowStatus="false"
:dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty> -->
<compare-qty :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.handleQty" :isShowStdPack="isShowStdPack">
</compare-qty>
<move-status :fromInventoryStatus="fromInventoryStatus" :toInventoryStatus="toInventoryStatus" :showToInventoryStatus="allowEditStatus">
</move-status>

2
pages/inventoryMove/record/oktoScrapRecord.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comMoveRecord businessTypeCode='OktoScrap' > </comMoveRecord>
<comMoveRecord businessTypeCode='OkToScrap' > </comMoveRecord>
</view>
</template>

Loading…
Cancel
Save