From eaf3a23a17c5178fac338b6c76b1cfd24882843f Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Tue, 8 Oct 2024 10:04:42 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E5=92=8C?=
=?UTF-8?q?=E4=B8=8A=E6=9E=B6=E4=BF=AE=E6=94=B9=E6=88=90=E6=8C=89=E6=89=B9?=
=?UTF-8?q?=E6=AC=A12024/9/13=2012:06:51?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/mycomponents/package/packageCard.vue | 2 +-
.../scan/winScanPackAndLocation.vue | 32 ++-
.../purchaseReceipt/job/receiptDetail.vue | 55 ++--
src/pages/putaway/job/putawayDetail.vue | 272 +++++++++++++-----
4 files changed, 254 insertions(+), 107 deletions(-)
diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue
index 93a571b5..6c1f9269 100644
--- a/src/mycomponents/package/packageCard.vue
+++ b/src/mycomponents/package/packageCard.vue
@@ -6,7 +6,7 @@
-
+
diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue
index 08974039..75100eac 100644
--- a/src/mycomponents/scan/winScanPackAndLocation.vue
+++ b/src/mycomponents/scan/winScanPackAndLocation.vue
@@ -120,7 +120,11 @@
balanceFromInventoryStatuses: { //是否传fromInventoryStatuses
type: Boolean,
default: true
- }
+ },
+ toLocationCode: {
+ type: String,
+ default: ""
+ },
},
data() {
return {
@@ -209,8 +213,8 @@
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //出库库存状态
uni.showLoading({
- title:"获取标签信息",
- mask:true
+ title: "获取标签信息",
+ mask: true
})
getLabelInfo(scanMessage, this.headerType, callback => {
uni.hideLoading()
@@ -308,7 +312,7 @@
// }
},
- checkPackage(result) {
+ async checkPackage(result) {
if (result.label != null) {
this.scanResult = result;
if (this.queryBalance == true) {
@@ -317,7 +321,8 @@
// mask: true
// })
// 采购上架任务--大哥让去掉 fromInventoryStatuses
- getBalanceByManagementPrecisionByPacking(result.label, result.package, this.fromLocationCode, this
+ // 获取精度
+ await getBalanceByManagementPrecisionByPacking(result.label, result.package, this.fromLocationCode, this
.balanceFromInventoryStatuses ? this.fromInventoryStatuses : undefined,
res => {
uni.hideLoading();
@@ -365,9 +370,9 @@
},
//允许无库存
- allowNoneBalance(datas) {
+ async allowNoneBalance(datas) {
if (datas.length == 0) {
- this.packCallBack(null);
+ await this.packCallBack(null);
} else {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],已经查找到该包装的库存记录,请重新扫描', res => {
this.packGetFocus();
@@ -440,7 +445,7 @@
this.$emit("getCountScanResult", data);
},
- packCallBack(item) {
+ async packCallBack(item) {
if (this.$refs.comscan) {
this.$refs.comscan.clear();
}
@@ -452,7 +457,12 @@
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
- this.$emit("getResult", data);
+ // 如果管理精度是批次,给父组件多返回一个参数
+ if (this.managementPrecision == 'BY_BATCH') {
+ this.$emit("getResult", data, this.managementPrecision);
+ } else {
+ this.$emit("getResult", data);
+ }
},
packGetFocus() {
@@ -476,9 +486,9 @@
let condition = '按照以下条件:\n';
let label = this.scanResult.label;
var isShowStatus = this.balanceFromInventoryStatuses ? this.fromInventoryStatuses : undefined
- let status=""
+ let status = ""
if (isShowStatus) {
- status = getInventoryStatusDesc(isShowStatus);
+ status = getInventoryStatusDesc(isShowStatus);
}
switch (this.managementPrecision) {
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 5034b1ad..a82b2bcd 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -26,14 +26,18 @@
:isShowEdit="false">
-->
-
+
-
+
+
+
+
@@ -119,6 +123,7 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import comReceiptDetailCard from '@/pages/purchaseReceipt/coms/comReceiptDetailCard.vue'
+ import comReceiptDetailCardBacth from '@/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue'
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue'
// import print from '@/mycomponents/print/print.vue'
import {
@@ -136,7 +141,8 @@
winScanPack,
comReceiptDetailCard,
locationCompare,
- jobTopAsn,
+ jobTopAsn,
+ comReceiptDetailCardBacth
// print
},
data() {
@@ -152,7 +158,8 @@
jobToLocationCode: "",
toLocationInfo: {},
businessTypeInfo: {},
- managementList: [],
+ managementList: [],
+ managementType: '', //管理精度
jobStatus: "",
isAllReceived: false,
operation: '',
@@ -267,6 +274,19 @@
that.toLocationCode = that.jobToLocationCode;
}
that.isAllReceived = false;
+
+ //获取管理模式,封装参数
+ var itemCodes = []
+ this.detailSource.forEach(item => {
+ itemCodes.push(item.itemCode)
+ })
+ getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ this.managementType = this.managementList.some(item => item.ManagementPrecision ==
+ 'BY_BATCH') ? 'BY_BATCH' : ''
+ }
+ })
// if (uni.getStorageSync('purchaseReceiptDetailPointParams')) {
// const purchaseReceiptDetailPointParams = uni.getStorageSync(
// 'purchaseReceiptDetailPointParams')
@@ -462,10 +482,10 @@
} else {
//不允许部分提交,提示
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
- if (res) {
- this.openScanPopup();
- }
- });
+ if (res) {
+ this.openScanPopup();
+ }
+ });
}
}
@@ -515,7 +535,7 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams();
- let that =this
+ let that = this
purchaseReceiptJobSubmit(params).then(res => {
if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode)
@@ -524,7 +544,7 @@
// this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
uni.redirectTo({
- url: '/pages/pointPutawayJob/index?number='+that.jobContent.number
+ url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number
})
} else {
// if (res.data == '打印任务已发送,等待打印机处理!') {
@@ -582,7 +602,8 @@
}
uni.hideLoading()
uni.redirectTo({
- url: '/pages/pointPutawayJob/index?number='+that.jobContent.number+'&data=' +
+ url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number +
+ '&data=' +
encodeURIComponent(JSON.stringify(dataParams))
})
}
@@ -627,7 +648,9 @@
})
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
- detail.toPackingNumber = info.packingNumber;
+ detail.toPackingNumber = info.packingNumber;
+ detail.packingNumber = info.packingNumber;
+ detail.formPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
subList.push(detail)
})
@@ -711,7 +734,7 @@
showMessage(message) {
- if(this.$refs.scanPopup){
+ if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
setTimeout(r => {
@@ -724,7 +747,7 @@
},
showErrorMessage(message) {
- if(this.$refs.scanPopup){
+ if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
setTimeout(r => {
diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue
index 5c5591d0..b298b7c0 100644
--- a/src/pages/putaway/job/putawayDetail.vue
+++ b/src/pages/putaway/job/putawayDetail.vue
@@ -15,11 +15,15 @@
-
+
+
+
+
+
@@ -27,8 +31,7 @@