Browse Source

发料任务bug+新需求

hella_online_20240829
yufei0306 4 months ago
parent
commit
b132c5f890
  1. 5
      src/pages/deliver/record/deliverRecord.vue
  2. 18
      src/pages/issue/coms/comScanIssuePack.vue
  3. 28
      src/pages/issue/job/issueDetail.vue

5
src/pages/deliver/record/deliverRecord.vue

@ -114,10 +114,12 @@
customerText: "", customerText: "",
customerCode : "", customerCode : "",
dataContent:{}, dataContent:{},
managementList:[] managementList:[],
deliverType:''//CUSTTHIRD_PARTY
}; };
}, },
onLoad(option) { onLoad(option) {
this.deliverType = option.deliverType
var typeCode = "Deliver" var typeCode = "Deliver"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
@ -375,6 +377,7 @@
this.dataContent.customerCode = this.customerCode; this.dataContent.customerCode = this.customerCode;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode; this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode; this.dataContent.toWarehouseCode = this.toWarehouseCode;
this.dataContent.deliverType = this.deliverType;
return this.dataContent; return this.dataContent;
}, },

18
src/pages/issue/coms/comScanIssuePack.vue

@ -436,6 +436,9 @@
addRecord(batch, label, balance, packageInfo) { addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo); let record = this.creatRecord(label, balance, packageInfo);
if(!batch.packingNumber){//bug-wyf
batch.packingNumber = label.packingNumber
}
batch.Records.push(record); batch.Records.push(record);
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
@ -487,14 +490,17 @@
this.issueRecord.splice(index, 1) this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode); let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) { if (item != undefined) {
item.Locations.forEach(l => { item.Locations.forEach(l => {
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b.batch == record.batch);
.batch == record.batch);
let rIndex = batch.Records.findIndex(r => r.packingNumber == record if(batch&&batch.Records&&batch.Records.length>0){
.packingNumber && r let rIndex = batch.Records.findIndex(r => r.packingNumber == record.packingNumber && r.batch == record.batch);
.batch == record.batch); batch.Records.splice(rIndex, 1);
batch.Records.splice(rIndex, 1); }
}) })
} }
this.$emit('updateData', item); this.$emit('updateData', item);

28
src/pages/issue/job/issueDetail.vue

@ -243,11 +243,7 @@
// }, // },
submit() { submit() {
let params = this.setParams()
if(!params.subList||params.subList.length==0){
this.showErrorMessage("请扫描您需要提交的发料任务")
return
}
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
@ -264,13 +260,13 @@
//使 //使
if (this.jobContent.useOnTheWayLocation == 'TRUE') { if (this.jobContent.useOnTheWayLocation == 'TRUE') {
// this.submitJob(); this.submitJob();
} else { } else {
// //
getManagementPrecisions(itemCodes, locationCode, res => { getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
// this.submitJob(); this.submitJob();
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
@ -281,6 +277,11 @@
submitJob() { submitJob() {
var params = this.setParams() var params = this.setParams()
if(!params.subList||params.subList.length==0){
uni.hideLoading()
this.showErrorMessage("请扫描您需要提交的发料任务")
return
}
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
issueJobSubmit(params).then(res => { issueJobSubmit(params).then(res => {
@ -342,8 +343,8 @@
// .packingNumber; // .packingNumber;
// record.toBatch = r.batch; // record.toBatch = r.batch;
// } else { // } else {
var info = debugger
getPackingNumberAndBatch( var info = getPackingNumberAndBatch(
this.managementList, r this.managementList, r
.itemCode, .itemCode,
r.packingNumber, r r.packingNumber, r
@ -399,15 +400,18 @@
}, },
updateData(record) { updateData(record) {
console.log('updateData',record)
console.log('this.detailSource',this.detailSource)
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
let itemHandleQty = 0; let itemHandleQty = 0;
if (item != undefined) { if (item != undefined) {
item.Locations.forEach(l => { item.Locations.forEach(l => {
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b.packingNumber == null || b.packingNumber == '') && b.batch == record.batch);
.packingNumber == null || b.packingNumber == '') && b.batch ==
record.batch);
let handleQty = 0; let handleQty = 0;
if (batch != undefined) { if (batch != undefined) {
batch.Records.forEach(res => { batch.Records.forEach(res => {
handleQty = calc.add(handleQty,res.qty) handleQty = calc.add(handleQty,res.qty)

Loading…
Cancel
Save