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. 163
      src/pages/productPutaway/record/productPutawayRecord.vue

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

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

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

@ -308,7 +308,7 @@
getScanResult(result) {
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 qty = result.balance.qty;
var itemCode = result.balance.itemCode;

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

Loading…
Cancel
Save