From f189938e6e33403a427bb64a54a69d178256fad4 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 10:15:05 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/detail.js | 3 +
src/common/label.js | 18 +-
src/mycomponents/package/packageCard.vue | 19 +-
src/mycomponents/package/packageList.vue | 32 +-
src/mycomponents/qty/recommendQty.vue | 4 +-
src/mycomponents/scan/winComScan.vue | 9 +-
src/mycomponents/scan/winScanPack.vue | 8 +-
src/pages/issue/job/issueDetail.vue | 3 +-
.../coms/comReceiptDetailCardBacth.vue | 14 +-
.../purchaseReceipt/job/receiptDetail.vue | 349 +++++++-----------
10 files changed, 196 insertions(+), 263 deletions(-)
diff --git a/src/common/detail.js b/src/common/detail.js
index 89721e7a..3171ca38 100644
--- a/src/common/detail.js
+++ b/src/common/detail.js
@@ -141,6 +141,7 @@ export function createRecordInfo(detail, balance) {
//计算实际数量
export function calcHandleQty(detailSource) {
+ console.log(999,detailSource)
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
@@ -190,6 +191,8 @@ export function calcTreeHandleQty(detailSource) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}
+ }else{
+ detail.handleQty = new Decimal(0).toNumber();
}
if(detail.handleQty){
item.handleQty = calc.add(item.handleQty, detail.handleQty);
diff --git a/src/common/label.js b/src/common/label.js
index 4615e948..82bec5b7 100644
--- a/src/common/label.js
+++ b/src/common/label.js
@@ -14,7 +14,7 @@ import {
getManagementPrecisions
} from '@/common/balance.js';
-export function getLabelInfo(scanMsg, headerType, callBack,locationCode) {
+export function getLabelInfo(scanMsg, headerType, callBack,locationCode,isHavePackNumber) {
if (scanMsg.length == 0) {
return null
}
@@ -42,17 +42,17 @@ export function getLabelInfo(scanMsg, headerType, callBack,locationCode) {
let type = header.substring(header.length - 1, header.length);
if (type == 'Q') //qrcode
{
- getQRCodeInfo(header, version, scanMsg, callBack,locationCode);
+ getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber);
}
// else if (type == 'B') //barcode
// {
// getBarCodeInfo(header, version, items[2], callBack);
// }
else { //直接输入文本
- getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode);
+ getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber);
}
} else {
- getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode);
+ getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber);
// let labelResult = {
// label: {
// labelType: "",
@@ -67,7 +67,7 @@ export function getLabelInfo(scanMsg, headerType, callBack,locationCode) {
}
}
-export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) {
+export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) {
//获取包装信息
let labelItem = labelDic.find(r => r.header == header && r.version == version);
if (labelItem == undefined) {
@@ -92,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) {
};
labelDic.push(newItem);
- getLabelItems(newItem, scanMsg, callBack,locationCode);
+ getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber);
}
}).catch(err => {
labelResult.success = false;
@@ -100,7 +100,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) {
callBack(err);
})
} else {
- getLabelItems(labelItem, scanMsg, callBack,locationCode);
+ getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber);
}
}
@@ -117,7 +117,9 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) {
const managementList = res.list;
managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING'
if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){
- packingNumber = ''
+ if(!isHavePackNumber){
+ packingNumber = ''
+ }
}
}
})
diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue
index 8e583b13..6e30e527 100644
--- a/src/mycomponents/package/packageCard.vue
+++ b/src/mycomponents/package/packageCard.vue
@@ -6,7 +6,8 @@
-
+
+
@@ -19,12 +20,12 @@
+ :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" :isShowStatus="isShowStatus" :isShowRecommendQty='isShowRecommendQty'>
-
+
@@ -90,7 +91,15 @@
type: String,
default: '库位'
},
-
+ // 采购订单单独显示的包装号
+ isShowPackingNumberProps:{
+ type:Boolean,
+ default:false
+ },
+ isShowRecommendQty: {
+ type: Boolean,
+ default: true
+ }
},
watch: {
// 模拟扫描功能
diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue
index 9d39d966..a4458dd7 100644
--- a/src/mycomponents/package/packageList.vue
+++ b/src/mycomponents/package/packageList.vue
@@ -1,13 +1,13 @@
-
-
+
+
+ @click="swipeClick($event,item,'parent',index)">
@@ -19,12 +19,13 @@
style=" width: 100%; background-color: antiquewhite;">
-
+
+ :isShowStatus="isShowPackListStatus"
+ :isShowRecommendQty='false'
+ :isShowBatch="false">
@@ -113,6 +114,11 @@
isEdit: {
type: Boolean,
default: false
+ },
+ // 采购订单单独显示的包装号
+ isShowPackingNumberProps:{
+ type:Boolean,
+ default:false
}
},
@@ -120,14 +126,14 @@
},
methods: {
- swipeClick(e, item, type) {
+ swipeClick(e, item, type,index,ele) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
if (type == 'parent') {
this.removeParent(item);
} else {
- this.remove(item)
+ this.remove(item,index,ele)
}
}
},
@@ -150,13 +156,14 @@
- remove(item) {
+ remove(item,index,ele) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null;
- this.$emit('updateData')
+ this.collapseChange()
+ this.$emit('updateData',ele,index)
this.$forceUpdate()
}
});
@@ -164,6 +171,7 @@
edit(item) {
this.editItem = item;
+ console.log(777,item)
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
collapseChange() {
diff --git a/src/mycomponents/qty/recommendQty.vue b/src/mycomponents/qty/recommendQty.vue
index a1406e0d..62043ada 100644
--- a/src/mycomponents/qty/recommendQty.vue
+++ b/src/mycomponents/qty/recommendQty.vue
@@ -1,10 +1,10 @@
-
+
- {{Number(dataContent.qty)}}
+ {{Number(dataContent.qty) ? Number(dataContent.qty) : ''}}
diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue
index 9f34d28d..5f2e2c31 100644
--- a/src/mycomponents/scan/winComScan.vue
+++ b/src/mycomponents/scan/winComScan.vue
@@ -92,7 +92,12 @@
locationCode:{
type: String,
default: ''
- }
+ },
+ // 批次默认不显示包装号,采购收货要显示
+ isHavePackNumber: {
+ type: Boolean,
+ default: false
+ },
},
data() {
return {
@@ -195,7 +200,7 @@
}
})
}
- },this.locationCode);
+ },this.locationCode,this.isHavePackNumber);
}, 200);
}
},
diff --git a/src/mycomponents/scan/winScanPack.vue b/src/mycomponents/scan/winScanPack.vue
index e901a25d..68af998f 100644
--- a/src/mycomponents/scan/winScanPack.vue
+++ b/src/mycomponents/scan/winScanPack.vue
@@ -15,7 +15,7 @@
+ :isShowHistory="isShowHistory" :clearResult="true" :locationCode='locationCode' :isHavePackNumber='isHavePackNumber'>
@@ -53,7 +53,8 @@
data() {
return {
show: false,
- locationCode:''
+ locationCode:'',
+ isHavePackNumber:false,//默认是没有包装号不走包装接口
}
},
created() {
@@ -70,9 +71,10 @@
})
},
- openScanPopup(locationCode1) {
+ openScanPopup(locationCode1,isHavePackNumber) {
this.$refs.popup.open('bottom')
this.locationCode = locationCode1
+ this.isHavePackNumber = isHavePackNumber
setTimeout(res => {
this.getfocus()
}, 500)
diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue
index 9ddc72ac..2a09a298 100644
--- a/src/pages/issue/job/issueDetail.vue
+++ b/src/pages/issue/job/issueDetail.vue
@@ -223,8 +223,7 @@
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
- this.managementType = this.managementList.some(item => item.ManagementPrecision ==
- 'BY_BATCH') ? 'BY_BATCH' : ''
+ this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
}
})
setTimeout(r => {
diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
index bd31d00b..2d37cfe3 100644
--- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
+++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
@@ -1,7 +1,7 @@
-
+
-
+ :isShowFromLocation="false" :isShowPackingNumberProps='true'>
@@ -117,9 +117,9 @@
},
resizeCollapse() {
- this.$nextTick(r => {
+ setTimeout(() => {
this.$refs.collapse.resize()
- });
+ }, 500)
this.$forceUpdate();
},
@@ -200,8 +200,8 @@
this.editItem.handleQty = qty;
this.$emit('updateData')
},
- updateData() {
- this.$emit('updateData')
+ updateData(index,packList) {
+ this.$emit('updateData',index,packList)
}
}
}
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 43b5ff0d..96493f0c 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -5,7 +5,7 @@
-
整单收货
@@ -32,7 +32,7 @@
-
@@ -178,8 +178,10 @@
reasonText: "",
packingNumberList:[],
source_type:'',
+ idValue:0
// printDeafult: {}, //默认打印机
// templateDeafult: {} //默认的模板
+
};
},
@@ -319,11 +321,8 @@
},
getScanResult(result) {
this.balanceInfo = result.balance
- console.log(this.managementType)
- if(this.managementType == 'BY_BATCH'){
+ if(this.managementType == 'BY_BATCH'||this.managementType == 'BY_QUANTITY'){
this.getScanResultAfterBatch(result)
- }else if(this.managementType == 'BY_QUANTITY' ){
- this.getScanResultAfterQuantity(result)
}else{
this.getScanResultAfter(result)
}
@@ -439,6 +438,7 @@
},
// 批次扫码之后逻辑
getScanResultAfterBatch(result){
+ console.log(222,result)
try {
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
@@ -469,7 +469,7 @@
}
}
} else if (result.label.labelType == "PurchaseLabel") {
- debugger
+ // debugger
var packingNumber = result.package.number;
var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch;
@@ -479,218 +479,84 @@
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
//物料在列表中
- var itemDetail = detail.subList.find(r => r.batch ==
+ const batchDetailList = detail.subList.filter(r => r.batch ==
batch);
- if (itemDetail == undefined) {
- itemDetail = detail.subList.find(r => r.batch ==
- batch);
-
- if (itemDetail == undefined) {
+ if (!batchDetailList || batchDetailList && batchDetailList.length == 0) {
this.showMessage("批次【" + batch + "】不在列表中")
} else {
- var pack = itemDetail.packList.find(p =>
- p.batch == batch)
- if (pack == undefined) {
- this.showMessage("批次【" + batch + "】不在列表中")
- } else {
- let isScan = false
- if(packingNumber){
- isScan = this.packList.some(item=>item == packingNumber)
- }else{
- isScan = false
- }
- if (isScan) {
- pack.scanDate = new Date();
- // this.showMessage("箱码【" + packingNumber + "】已经扫描");
+ // 箱码是否已经扫描
+ var isHavePackingNumber =this.packingNumberList.find(r => r.packingNumber == packingNumber);
+ if(isHavePackingNumber){
+ this.showMessage("箱码【" + packingNumber + "】已经扫描");
+ return
+ }
+ for(let i = 0 ; i {
+ pack.handleQty =pack.handleQty? pack.handleQty :0
+ packAllHandleQty = calc.add(packAllHandleQty,pack.handleQty)
+ })
+ // 批次任务数量减去当前扫描总箱码数量的差为该批次还有多少任务数量没有扫
+ let handleQtySub = calc.sub(parseFloat(batchDetailList[i].qty),parseFloat(packAllHandleQty))
+ let pack = {}
+ pack.packingNumber =packingNumber
+ pack.packQty = result.package.packQty
+ pack.packUnit = result.package.packUnit
+ pack.qty = batchDetailList[i].qty
- pack.handleQty = calc.add(pack.handleQty,result.label.qty)
- } else {
- this.packList.push(packingNumber)
- pack.packList.push(packingNumber)
- pack.scaned = true
- pack.scanDate = new Date();
- pack.handleQty = Number(result.label.qty);
pack.toLocationCode = this.toLocationCode;
- pack.labelQty = Number(result.label.qty);
+ pack.labelQty = Number(qty);
+ pack.scaned = true;
+ // 当前批次剩余可以扫进的数量大于当前扫描的标签数量的时候直接插入当前的批次
+ if(handleQtySub >= parseFloat(qty)){
+ pack.handleQty = Number(qty);
+ batchDetailList[i].packList.push(pack)
+ batchDetailList[i].scaned = true
+ const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber)
+ if(!isHave){
+ this.packingNumberList.push(pack)
+ }
+ calcTreeHandleQty(this.detailSource);
+ break
+ }else{
+ // 如果扫描的数量大于每行的任务剩余扫进去的数量
+ if(handleQtySub != 0){
+ // 如果是最后一行所有数量直接放入最后一行
+ if(batchDetailList.length-1 == i){
+ pack.handleQty = qty;
+ }else{
+ // 不是最后一行取当前批次剩余可以扫进的数量
+ pack.handleQty = handleQtySub;
+ }
+ batchDetailList[i].packList.push(pack)
+ batchDetailList[i].scaned = true
+ qty = calc.sub(parseFloat(qty),parseFloat(handleQtySub))
+ // 如果箱码没有被扫过直接插入记录箱码的列表,扫过了不计入
+ const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber)
+ if(!isHave){
+ this.packingNumberList.push(pack)
+ }
+ calcTreeHandleQty(this.detailSource);
+ }
}
- }
- calcHandleQty(this.detailSource);
- itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序
- this.$forceUpdate()
+
+
}
-
- } else {
- //扫描的是外包装,将包装集合全部扫描
- var scanedLength = 0;
- itemDetail.packList.forEach(res => {
- if (res.scaned) {
- scanedLength++;
- }
- })
- let isScan = false
- if(packingNumber){
- isScan = this.packingNumberList.some(item=>item == packingNumber)
- }else{
- isScan = false
- }
- if (isScan) {
- itemDetail.scanDate = new Date();
- // this.showMessage("箱码【" + packingNumber + "】已经扫描")
- itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty)
- } else {
- this.packingNumberList.push(packingNumber)
- itemDetail.scaned = true;
- itemDetail.scanDate = new Date();
- itemDetail.handleQty =itemDetail.handleQty ?itemDetail.handleQty:0
- itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty)
- console.log(itemDetail.handleQty)
- itemDetail.toLocationCode = this.toLocationCode;
- itemDetail.labelQty = Number(result.label.qty);
- itemDetail.packList.forEach(pac => {
- pac.scaned = true
- pac.scanDate = new Date();
- pac.handleQty = calc.add(pac.handleQty,result.label.qty);
- pac.toLocationCode = this.toLocationCode;
+ console.log(8777,this.detailSource)
+
+ setTimeout(()=>{
+ this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
+ item.resizeCollapse()
+
+ item.$refs.packageListRef.$refs.collapse2.forEach(cur=>{
+ cur.resize()
+ })
})
- detail.handleQty = itemDetail.handleQty
- this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
- this.continueScan()
- this.$forceUpdate()
- }
- calcHandleQty(this.detailSource);
+ },500)
+
}
- }
- }
- } catch (e) {
- this.showErrorMessage(e.message)
- }
- },
- // 数量扫码之后逻辑
- getScanResultAfterQuantity(result){
- try {
- var itemCode = result.label.itemCode;
- var detail = this.detailSource.find(r => r.itemCode == itemCode);
- if (detail == undefined) {
- this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
- return;
- }
- detail.scaned = true;
- if (result.label.labelType == "ContainerLabel") {
- var containerNumber = result.label.container;
- var itemDetail = detail.subList.filter(r => r.containerNumber == containerNumber);
- if (itemDetail.length == 0) {
- this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】不在列表中")
- } else {
- if (itemDetail[0].scaned) {
- this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】已经扫描")
- } else {
- itemDetail.forEach(item => {
- item.scaned = true;
- itemDetail.scanDate = new Date();
- item.handleQty = calc.add(item.handleQty,result.label.qty)
- item.toLocationCode = this.toLocationCode;
- })
- // calcHandleQty(this.detailSource);
- this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
- this.continueScan()
- this.$forceUpdate()
- }
- }
- } else if (result.label.labelType == "PurchaseLabel") {
- var packingNumber = result.package.number;
- var parentpackingNumber = result.package.parentNumber;
- var batch = result.label.batch;
- var qty = result.label.qty;
- var detail = this.detailSource.find(r => r.itemCode == itemCode);
- console.log(8989,this.detailSource)
- if (detail == undefined) {
- this.showMessage("物料号【" + itemCode + "】不在列表中")
- } else {
- //物料在列表中
- // var itemDetail = detail.subList.find(r => r.batch ==
- // batch);
- // if (itemDetail == undefined) {
- // itemDetail = detail.subList.find(r => r.batch ==
- // batch);
-
- // if (itemDetail == undefined) {
- // this.showMessage("批次【" + batch + "】不在列表中")
- // } else {
- // var pack = itemDetail.packList.find(p =>
- // p.batch == batch)
- // if (pack == undefined) {
- // this.showMessage("批次【" + batch + "】不在列表中")
- // } else {
- let isScan = false
- const itemDetail = detail.subList[0]
- let pack = detail.subList[0] && detail.subList[0].length>0 ?detail.subList[0] : {}
- if(packingNumber){
- isScan = this.packingNumberList.some(item=>item == packingNumber)
- }else{
- isScan = false
- }
- if (isScan) {
- detail.subList[0].scanDate = new Date();
- // this.showMessage("箱码【" + packingNumber + "】已经扫描");
-
- detail.subList[0].handleQty = calc.add(detail.subList[0].handleQty,result.label.qty)
- } else {
- this.packingNumberList.push(packingNumber)
- detail.subList[0].scaned = true
- detail.subList[0].scanDate = new Date();
- detail.subList[0].handleQty = Number(result.label.qty);
- detail.subList[0].toLocationCode = this.toLocationCode;
- detail.subList[0].labelQty = Number(result.label.qty);
- }
- // }
- calcHandleQty(this.detailSource);
- this.continueScan()
- // itemDetail.packList[0] = detail.subList[0]; //按扫描信息排序
- this.$forceUpdate()
- // }
-
- // } else {
- // //扫描的是外包装,将包装集合全部扫描
- // var scanedLength = 0;
- // itemDetail.packList.forEach(res => {
- // if (res.scaned) {
- // scanedLength++;
- // }
- // })
- // debugger
- // let isScan = false
- // if(packingNumber){
- // isScan = this.packingNumberList.some(item=>item == packingNumber)
- // }else{
- // isScan = false
- // }
- // if (isScan) {
- // itemDetail.scanDate = new Date();
- // // this.showMessage("箱码【" + packingNumber + "】已经扫描")
- // itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty)
- // } else {
- // this.packingNumberList.push(packingNumber)
- // itemDetail.scaned = true;
- // itemDetail.scanDate = new Date();
- // itemDetail.handleQty =itemDetail.handleQty ?itemDetail.handleQty:0
- // itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty)
- // console.log(itemDetail.handleQty)
- // itemDetail.toLocationCode = this.toLocationCode;
- // itemDetail.labelQty = Number(result.label.qty);
- // itemDetail.packList.forEach(pac => {
- // pac.scaned = true
- // pac.scanDate = new Date();
- // pac.handleQty = calc.add(pac.handleQty,result.label.qty);
- // pac.toLocationCode = this.toLocationCode;
- // })
- // detail.handleQty = itemDetail.handleQty
- // this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
- // this.continueScan()
- // this.$forceUpdate()
- // }
- // calcHandleQty(this.detailSource);
- // }
}
}
@@ -708,12 +574,20 @@
}
},
- updateData() {
+ updateData(ele,index) {
// if(this.managementType == 'BY_BATCH'){
// }else{
// calcTreeHandleQty(this.detailSource)
// }
- calcHandleQty(this.detailSource);
+ if(ele){
+ ele.packList.splice(index,1)
+ if(ele.packList.length == 0){
+ ele.scaned = false
+ }
+ this.packingNumberList.splice(index,1)
+ }
+
+ calcTreeHandleQty(this.detailSource);
},
scanLocationCode(location, code) {
@@ -737,6 +611,8 @@
},
commit() {
+ this.scanCount = getScanCount(this.detailSource);
+ console.log(this.scanCount )
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
@@ -794,9 +670,35 @@
//按批次的校验
checkBatch(){
//扫描数量和任务数量相等,直接提交
- const scanCount1 = this.detailSource
- const current = this.detailSource.find(item=> item.handleQty {
+ item.subList.forEach(cur=>{
+ if(cur.scaned){
+ scanCount++;
+ if(parseFloat(cur.qty)>parseFloat(cur.handleQty)){
+ str += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以小于任务数量【${cur.qty}】\n`
+ }
+ if(parseFloat(cur.qty) {
if (res.data) {
@@ -868,6 +769,7 @@
})
}else if(!isCheckPrint1 && !isCheckPrint){
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
+ uni.hideLoading()
}else if(that.source_type!='TOOL'&&that.source_type!='Develop'){
// if (res.data == '打印任务已发送,等待打印机处理!') {
// this.showCommitSuccessMessage(res.data)
@@ -977,13 +879,15 @@ console.log(8787,this.detailSource)
pack.handleQty = 0
}
})
- detail.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode
+ let obj = {...detail}
+ obj.packList = []
+ obj.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,detail.packingNumber, detail.batch);
- detail.toPackingNumber = info.packingNumber;
- detail.packingNumber = info.packingNumber;
- detail.formPackingNumber = info.packingNumber;
- detail.toBatch = info.batch;
- subList.push(detail)
+ obj.toPackingNumber = info.packingNumber;
+ obj.packingNumber = info.packingNumber;
+ obj.formPackingNumber = info.packingNumber;
+ obj.toBatch = info.batch;
+ subList.push(obj)
})
})
this.jobContent.subList = subList
@@ -1093,7 +997,8 @@ console.log(8787,this.detailSource)
},
openScanPopup() {
- this.$refs.scanPopup.openScanPopup(this.jobToLocationCode);
+ // 第一个参数是库位查精度,第二个参数是判断是否走包装信息接口
+ this.$refs.scanPopup.openScanPopup(this.jobToLocationCode,true);
},
closeScanPopup() {
From d7e80e2ff1e52aa0511a78526768f309b42672bc Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 10:41:35 +0800
Subject: [PATCH 2/7] =?UTF-8?q?YT-886PDA=E7=AB=AF=E9=87=87=E8=B4=AD?=
=?UTF-8?q?=E6=94=B6=E8=B4=A7=E6=89=AB=E6=8F=8F=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/purchaseReceipt/job/receiptDetail.vue | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 96493f0c..2e755ac3 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -194,9 +194,6 @@
this.source_type = option.source_type;
this.switchCode = "purchasereceiptPrintPDA" //采购收货PDA打印开关
this.switchCode1 = "EnableQms" //根据开关中是否启用QMS去判断,如果为TRUE显示检验指引单,如果为FALSE不显示检验指引单
- },
-
- onShow() {
if (this.id != undefined) {
//新建的任务自动接收
if (this.status == "1") {
@@ -208,6 +205,10 @@
}
}
},
+
+ onShow() {
+
+ },
//返回首页
onNavigationBarButtonTap(e) {
if (e.index === 0) {
From a3ad8b69b0793b5ecd099f431bf2a04c9133f932 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 10:50:01 +0800
Subject: [PATCH 3/7] =?UTF-8?q?YT-951=E6=89=AB=E6=8F=8F=E5=90=8C=E4=B8=80?=
=?UTF-8?q?=E7=89=A9=E6=96=99=E3=80=81=E6=89=B9=E6=AC=A1=E5=A4=9A=E6=AC=A1?=
=?UTF-8?q?=EF=BC=8C=E6=8F=90=E7=A4=BA=E5=BA=94=E5=8A=A0=E7=89=A9=E6=96=99?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/inventoryMove/coms/comMoveRecord.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index de73700c..248487b6 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -456,11 +456,11 @@
// detail.handleQty =calc.add(detail.handleQty, result.label.qty)
if(managementTypeParams == 'BY_QUANTITY'){
this.showErrorMessage(
- "批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
+ "物料号[" + item.itemCode + "]\n" + "批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}else if(managementTypeParams == 'BY_BATCH'){
this.showErrorMessage(
- "批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
+ "物料号[" + item.itemCode + "]\n" + "批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}
}
From c8cfcbe1dc5dc5f9392ec53a46f9244c9eba65d0 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 10:58:45 +0800
Subject: [PATCH 4/7] =?UTF-8?q?YT-953=E7=BC=96=E8=BE=91=EF=BC=8C=E5=8C=85?=
=?UTF-8?q?=E8=A3=85=E6=95=B0=E9=87=8F=E3=80=81=E6=A0=87=E5=8C=85=E6=95=B0?=
=?UTF-8?q?=E5=BA=94=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/inventoryMove/coms/comMoveRecord.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index 248487b6..5d2cfe21 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -406,6 +406,8 @@
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
+ newDetail.packQty = balance.packQty;
+ newDetail.packUnit = balance.packUnit;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
@@ -447,6 +449,8 @@
newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
+ newDetail.packQty = balance.packQty;
+ newDetail.packUnit = balance.packUnit;
item.subList.push(newDetail);
this.clearFromLocation()
this.$refs.okToHoldRecordPackRef.handleQty = 0
From d65b81d837e9f49ec636497784e91ab93209e786 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 11:15:47 +0800
Subject: [PATCH 5/7] =?UTF-8?q?YT-954=E5=BA=93=E5=AD=98=E6=98=AF0=E6=97=B6?=
=?UTF-8?q?=EF=BC=8C=E8=83=BD=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/inventoryMove/coms/comMoveRecord.vue | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index 5d2cfe21..f0722be2 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -389,6 +389,12 @@
return res
}
})
+ // 库存余额是0不让添加
+
+ if(!balance.qty){
+ this.showErrorMessage("物料号[" + result.label.itemCode + "]库存余额余额数量是0")
+ return
+ }
if (item == undefined) {
var itemp = createItemInfoForLabel(balance, result.label);
let newDetail = createDetailInfoForLabel(balance, pack, result.label);
From 1353708a838fa8b74aeb595be47921fab77cb017 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 11:30:51 +0800
Subject: [PATCH 6/7] =?UTF-8?q?YT-956=E6=89=AB=E6=8F=8F=E7=9B=B8=E5=90=8C?=
=?UTF-8?q?=E7=89=A9=E6=96=99=E4=B8=8D=E5=90=8C=E6=89=B9=E6=AC=A1=EF=BC=8C?=
=?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F?=
=?UTF-8?q?=E8=BE=93=E5=85=A52=EF=BC=8C=E5=B8=A6=E5=87=BA=E7=9A=84?=
=?UTF-8?q?=E6=98=AF=E5=BA=93=E5=AD=98=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/inventoryMove/coms/comMoveRecord.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index f0722be2..ab990d4d 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -422,7 +422,6 @@
this.$refs.okToHoldRecordPackRef.showOne = false
} else {
var detail = ''
- console.log(9988,managementTypeParams)
if(managementTypeParams == 'BY_QUANTITY'){
detail = item.subList.find(r => {
if (r.fromLocationCode == balance.locationCode &&
@@ -455,6 +454,7 @@
newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
+ newDetail.handleQty = result.label.qty
newDetail.packQty = balance.packQty;
newDetail.packUnit = balance.packUnit;
item.subList.push(newDetail);
From 1e84d079465a143b8224ba7c4c3101a57bcffbc0 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 14 Nov 2024 11:40:59 +0800
Subject: [PATCH 7/7] =?UTF-8?q?YT-957=E6=96=B0=E5=A2=9E=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=E6=95=B0=E9=87=8F=E5=A4=A7=E4=BA=8E=E5=BA=93=E5=AD=98=E6=95=B0?=
=?UTF-8?q?=E9=87=8F=E5=8F=AF=E4=BB=A5=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=EF=BC=8C=E5=A4=A7=E4=BA=8E=E5=BA=93=E5=AD=98=E4=BD=99?=
=?UTF-8?q?=E9=A2=9D=E6=97=B6=E5=BA=94=E6=9C=89=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/inventoryMove/coms/comMoveRecord.vue | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index ab990d4d..520cff17 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -390,9 +390,13 @@
}
})
// 库存余额是0不让添加
-
if(!balance.qty){
- this.showErrorMessage("物料号[" + result.label.itemCode + "]库存余额余额数量是0")
+ this.$refs.comMessage.showConfirmWarningModal("物料号[" + result.label.itemCode + "]库存余额数量是0")
+ return
+ }
+ // 不可以大于库存余额数量
+ if(result.label.qty > balance.qty){
+ this.$refs.comMessage.showConfirmWarningModal("物料号[" + result.label.itemCode + "]数量[" + result.label.qty + "]不可以大于库存余额数量[" + balance.qty + "]")
return
}
if (item == undefined) {
@@ -606,7 +610,7 @@
console.log("提交" ,params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
- this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
+ this.$refs.comMessage.showConfirmWarningModal('物料号[' +obj.itemCode + ']批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}