Browse Source

修改预生产直接上架提交

hella_online_20240927
lijuncheng 4 months ago
parent
commit
15b2fe5929
  1. 26
      src/pages/deliver/coms/comScanDeliverPack.vue
  2. 2
      src/pages/productPutaway/job/productPutawayDetail.vue
  3. 191
      src/pages/productPutaway/record/productPutawayRecord.vue

26
src/pages/deliver/coms/comScanDeliverPack.vue

@ -165,7 +165,7 @@
fromLocationList: [], fromLocationList: [],
fromLocationCode: '', fromLocationCode: '',
fromLocation: null, fromLocation: null,
issueRecord: [], // issueRecord: [], //
expand: true, expand: true,
scanOptions: {}, scanOptions: {},
editItem: {}, editItem: {},
@ -266,7 +266,7 @@
let location = this.fromLocationList.find(r => r == fromlocation) let location = this.fromLocationList.find(r => r == fromlocation)
if (location == undefined) { if (location == undefined) {
this.fromLocationCode = '' this.fromLocationCode = ''
this.showErrorMessage('发库位【' + fromlocation + '】不存在') this.showErrorMessage('发库位【' + fromlocation + '】不存在')
} }
}, },
@ -285,7 +285,7 @@
let lot = result.label.batch; let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode); let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) { if (item == undefined) {
that.showErrorMessage('未查找到物料【' + itemCode + '】的发明细', that.showErrorMessage('未查找到物料【' + itemCode + '】的发明细',
res => { res => {
that.getfocus(); that.getfocus();
} }
@ -543,7 +543,7 @@
} else { } else {
if (this.jobContent.allowModifyBatch == "TRUE") { if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发料明细,是否要继续发料?', res => { '】的发货明细,是否要继续发货?', res => {
if (res) { if (res) {
let batch = that.createBatchInfo(label, balance, packageInfo); let batch = that.createBatchInfo(label, balance, packageInfo);
//details //details
@ -556,7 +556,7 @@
} }
}) })
} else { } else {
that.showErrorMessage('未查找到批次【' + lot + '】的发明细', that.showErrorMessage('未查找到批次【' + lot + '】的发明细',
res => { res => {
that.getfocus(); that.getfocus();
}); });
@ -567,7 +567,7 @@
// //
if (this.jobContent.allowModifyLocation == "TRUE") { if (this.jobContent.allowModifyLocation == "TRUE") {
this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
"】与推荐的库位不一致,是否要继续发?", res => { "】与推荐的库位不一致,是否要继续发?", res => {
if (res) { if (res) {
let locaion = that.createLocationInfo(label, balance, packageInfo); let locaion = that.createLocationInfo(label, balance, packageInfo);
item.Locations.push(locaion); item.Locations.push(locaion);
@ -578,7 +578,7 @@
} else { } else {
this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
"】与推荐的库位不一致,不允许继续发?") "】与推荐的库位不一致,不允许继续发?")
} }
} }
@ -624,7 +624,7 @@
// } else { // } else {
// if (this.jobContent.allowModifyBatch == "TRUE") { // if (this.jobContent.allowModifyBatch == "TRUE") {
// this.showQuestionMessage('' + that.fromLocationCode + ',' + lot + // this.showQuestionMessage('' + that.fromLocationCode + ',' + lot +
// ',?', res => { // ',?', res => {
// if (res) { // if (res) {
// let batch = that.createBatchInfo(label, balance, packageInfo); // let batch = that.createBatchInfo(label, balance, packageInfo);
// //details // //details
@ -637,7 +637,7 @@
// } // }
// }) // })
// } else { // } else {
// that.showErrorMessage('' + lot + '', // that.showErrorMessage('' + lot + '',
// res => { // res => {
// that.getfocus(); // that.getfocus();
// }); // });
@ -686,7 +686,7 @@
// } else { // } else {
// if (this.jobContent.allowModifyBatch == "TRUE") { // if (this.jobContent.allowModifyBatch == "TRUE") {
// this.showQuestionMessage('' + that.fromLocationCode + ',' + lot + // this.showQuestionMessage('' + that.fromLocationCode + ',' + lot +
// ',?', res => { // ',?', res => {
// if (res) { // if (res) {
// let batch = that.createBatchInfo(label, balance, packageInfo); // let batch = that.createBatchInfo(label, balance, packageInfo);
// //details // //details
@ -699,7 +699,7 @@
// } // }
// }) // })
// } else { // } else {
// that.showErrorMessage('' + lot + '', // that.showErrorMessage('' + lot + '',
// res => { // res => {
// that.getfocus(); // that.getfocus();
// }); // });
@ -708,7 +708,7 @@
// } else { // } else {
// if (this.jobContent.allowModifyLocation == "TRUE") { // if (this.jobContent.allowModifyLocation == "TRUE") {
// this.showQuestionMessage("[" + itemCode + "]" + that.fromLocationCode + // this.showQuestionMessage("[" + itemCode + "]" + that.fromLocationCode +
// ",?", res => { // ",?", res => {
// if (res) { // if (res) {
// let locaion = that.createLocationInfo(label, balance, packageInfo); // let locaion = that.createLocationInfo(label, balance, packageInfo);
// item.Locations.push(locaion); // item.Locations.push(locaion);
@ -719,7 +719,7 @@
// } else { // } else {
// this.showErrorMessage("[" + itemCode + "]" + that.fromLocationCode + // this.showErrorMessage("[" + itemCode + "]" + that.fromLocationCode +
// ",?") // ",?")
// } // }
// } // }

2
src/pages/productPutaway/job/productPutawayDetail.vue

@ -308,7 +308,7 @@
getScanResult(result) { getScanResult(result) {
try { try {
var packingNumber = result.balance.packingNumber; var packingNumber = result.balance.packingNumber==result.package.number?result.balance.packingNumber:result.package.number;
var batch = result.balance.batch; var batch = result.balance.batch;
var qty = result.balance.qty; var qty = result.balance.qty;
var itemCode = result.balance.itemCode; var itemCode = result.balance.itemCode;

191
src/pages/productPutaway/record/productPutawayRecord.vue

@ -36,7 +36,10 @@
<win-scan-button v-if="detailSource.length>0" @goScan='openScanPopup'></win-scan-button> <win-scan-button v-if="detailSource.length>0" @goScan='openScanPopup'></win-scan-button>
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package>
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode">
</winComScanBalance>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getToLocationCode' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getToLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></win-scan-location> :locationAreaTypeList="toLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -77,7 +80,7 @@
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' import winScanPackage from '@/mycomponents/scan/winScanPackage.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import { import {
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -90,7 +93,8 @@
comBlankView, comBlankView,
recordComDetailCard, recordComDetailCard,
winScanPackage, winScanPackage,
winScanLocation winScanLocation,
winComScanBalance
}, },
data() { data() {
return { return {
@ -106,7 +110,7 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", //:"", outInventoryStatus: "", //:"",
bussinessCode: "ProductPutaway", businessTypeCode: "ProductPutaway",
businessType: {}, businessType: {},
managementList: [], managementList: [],
type: '', type: '',
@ -131,12 +135,11 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {
getBusinessType(this.bussinessCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses);
this.toLocationAreaTypeList = res.toLocationAreaTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(); this.openScanPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
@ -146,55 +149,126 @@
methods: { methods: {
getScanResult(result) { getScanResult(result) {
this.setData(result);
},
setData(result) {
let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
let errorHint=""
result.balance.forEach( var item = this.detailSource.find(res => {
balance => { if (res.itemCode == balance.itemCode) {
let item = this.detailSource.find(res => { return res
if (res.itemCode == balance.itemCode && res.containerNumber == balance }
.parentPackingNumber) { })
return res if (item == undefined) {
} var itemp = createItemInfo(balance, pack);
}) // itemp.containerNumber=""
if (item == undefined) { let newDetail = createDetailInfo(balance, pack); //
var itemp = createItemInfo(balance, pack); newDetail.fromLocationCode=balance.locationCode
itemp.containerNumber = balance.parentPackingNumber
// newDetail.parentNumber = pack.parentNumber;
let newDetail = createDetailInfo(balance, pack); newDetail.packingNumber = pack.number
newDetail.fromInventoryStatus = balance.inventoryStatus; newDetail.packUnit = pack.packUnit;
itemp.subList.push(newDetail); newDetail.packQty = pack.packQty;
this.detailSource.push(itemp) if (balance.lableQty) {
this.calcHandleQty(); newDetail.handleQty = balance.lableQty
this.getRecommendLocation(balance) }
} else { itemp.subList.push(newDetail);
var detail = item.subList.find(r => { this.detailSource.push(itemp)
if (r.packingNumber == balance.packingNumber && this.itemCode = balance.itemCode;
r.batch == balance.batch && this.fromLocationCode = balance.locationCode
r.locationCode == balance.locationCode && this.getRecommendLocation(balance)
r.inventoryStatus == balance.inventoryStatus) { this.scanPopupGetFocus()
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == balance.batch &&
r.fromLocationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
//
//
//,
if (pack.parentNumber) {
var checkData = item.subList.find(r => {
if (r.packingNumber == pack.parentNumber &&
r.batch == balance.batch&&
r.fromLocationCode == balance.locationCode) {
return r; return r;
} }
}) })
if (detail == undefined) { if (checkData) {
//
this.showErrorMessage("扫描箱码[" + pack.number + "]批次[" + balance.batch +
"]的父包装已经扫描")
console.log("父包装已经扫描")
} else {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
newDetail.fromInventoryStatus = balance.inventoryStatus; newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
newDetail.fromLocationCode=balance.locationCode
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail); item.subList.push(newDetail);
}
} else {
//
var checkData = item.subList.find(r => {
if (r.parentNumber == pack.number &&
r.batch == balance.batch&&
r.fromLocationCode == balance.locationCode) {
return r;
}
})
if (checkData) {
//
this.$refs.comMessage.showQuestionMessage("箱码[" + checkData.parentNumber+"]" + "批次[" + balance
.batch + "]是父包装,是否移除子包装", res => {
if (res) {
item.subList = [];
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
newDetail.fromLocationCode=balance.locationCode
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
})
console.log("扫描的是父包装,是否移除子包装")
} else { } else {
if (detail.scaned == true) { let newDetail = createDetailInfo(balance, pack);
errorHint+="箱码[" + balance.packingNumber + "批次[" + balance.batch + newDetail.fromLocationCode=balance.locationCode
"]重复扫描\n" newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
} }
item.subList.push(newDetail);
} }
} }
this.calcHandleQty();
this.scanPopupGetFocus()
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描")
}
} }
)
if(errorHint){
this.showErrorMessage(errorHint)
}else {
this.scanPopupGetFocus()
} }
calcHandleQty(this.detailSource);
}, },
getRecommendLocation(balance) { getRecommendLocation(balance) {
@ -214,7 +288,7 @@
uni.hideLoading(); uni.hideLoading();
let item = this.detailSource.find(res => { let item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode && res.containerNumber == balance if (res.itemCode == balance.itemCode && res.containerNumber == balance
.parentPackingNumber) { .packingNumber) {
return res return res
} }
}) })
@ -274,9 +348,11 @@
}, },
openScanPopup() { openScanPopup() {
setTimeout(r => { if (this.businessType) {
this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType); this.$refs.scanPopup.openScanPopup(this.businessType);
}) } else {
this.getBusinessType()
}
}, },
closeScanPopup() { closeScanPopup() {
@ -313,12 +389,6 @@
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
// this.managementList = [];
// var precisionStrategParams = this.setPrecisionStrategParams()
// getPrecisionStrategyList(precisionStrategParams, res => {
// if (res.success) {
// this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
@ -383,27 +453,16 @@
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
var submitItem = deepCopyData(detail) var submitItem = deepCopyData(detail)
// var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
// detail.packingNumber, detail.toLocationCode, detail.batch);
submitItem.itemCode = detail.itemCode; submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName; submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1; submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2; submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus; submitItem.inventoryStatus = detail.inventoryStatus;
// submitItem.fromPackingNumber = info.packingNumber;
// submitItem.toPackingNumber = info.packingNumber;
submitItem.fromPackingNumber = detail.packingNumber; submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber; submitItem.toPackingNumber = detail.packingNumber;
//submitItem.fromContainerNumber = detail.containerNumber; submitItem.fromParentPackingNumber = detail.parentNumber;
//submitItem.toContainerNumber = detail.containerNumber
//submitItem.fromBatch = info.batch;
//submitItem.toBatch = info.batch;
submitItem.fromBatch = detail.package.batch; submitItem.fromBatch = detail.package.batch;
submitItem.toBatch = detail.package.batch; submitItem.toBatch = detail.package.batch;

Loading…
Cancel
Save