From c85407c5dbd04695c747203b6a1011777524d194 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Wed, 31 Jan 2024 13:34:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E6=96=99=E8=AE=B0=E5=BD=95=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=97=B6=E6=A0=A1=E9=AA=8C=E5=B7=B2=E7=BB=8F=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coms/comRepleinshRequestPopup.vue | 5 +++ pages/repleinsh/record/repleinshRecord.vue | 31 ++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/pages/repleinsh/coms/comRepleinshRequestPopup.vue b/pages/repleinsh/coms/comRepleinshRequestPopup.vue index 8ebc05a6..575334de 100644 --- a/pages/repleinsh/coms/comRepleinshRequestPopup.vue +++ b/pages/repleinsh/coms/comRepleinshRequestPopup.vue @@ -135,6 +135,11 @@ type: Array, default: [] }, + itemCodeTypeList: { + type: Array, + default: [] + }, + }, mounted() { diff --git a/pages/repleinsh/record/repleinshRecord.vue b/pages/repleinsh/record/repleinshRecord.vue index 62446127..f9f7304d 100644 --- a/pages/repleinsh/record/repleinshRecord.vue +++ b/pages/repleinsh/record/repleinshRecord.vue @@ -342,6 +342,10 @@ }, submit() { + if(this.getScanCount()==0){ + this.showErrorMessage("当前扫描数为0,请先扫描在提交"); + return + } uni.showLoading({ title: "提交中....", mask: true @@ -439,7 +443,32 @@ this.dataContent.creator = creator; return this.dataContent; }, - + + getScanCount(){ + var scanCount = 0; + var subList = [] + this.detailSource.forEach(toLocationCode => { + toLocationCode.Items.forEach(item => { + item.Locations.forEach(fromLocation => { + fromLocation.Batchs.forEach(batch => { + let subItem = batch.detail; + subItem.recordList = []; + + if (batch.Records.length > 0) { + batch.Records.forEach(r => { + let record = {}; + record.handleQty = r.qty; + subItem.recordList.push(record); + }) + subList.push(subItem); + } + }) + }) + }) + }) + return scanCount =subList.length; + }, + showMessage(message) { this.$refs.comMessage.showMessage(message, res => {