From 88fd0d77b3a211deee15d2dd157aa6404a6651eb Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Mon, 10 Jan 2022 10:33:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20--=20=E6=88=90=E5=93=81?= =?UTF-8?q?=E5=87=BA=E5=BA=93=20--=20=E9=80=80=E6=89=AB=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 1 + src/i18n/lang/en.ts | 1 + .../product/outbound/stoOutbound/Back.vue | 46 +++++++++++++++---- .../product/outbound/stoOutbound/model.ts | 9 ++++ src/utils/url.ts | 1 + 5 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 895baae..39e6c33 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -54,6 +54,7 @@ export default { rawMenu_SignOut: '退出', Purchase: '采购单', BackSweep: '退扫', + succeeded: '退扫成功', //po收货 po_ReceivingGoods: 'PO收货', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 163bcf2..347132c 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -334,6 +334,7 @@ export default { //成品下线 product_Location: 'Loc', + succeeded: 'Scan back succeeded', product_barCode: 'Barcode', sweepBarCode: 'Barcode', QuantityReturned: 'Quantity returned', diff --git a/src/pages/product/outbound/stoOutbound/Back.vue b/src/pages/product/outbound/stoOutbound/Back.vue index a9a1600..ed52608 100644 --- a/src/pages/product/outbound/stoOutbound/Back.vue +++ b/src/pages/product/outbound/stoOutbound/Back.vue @@ -10,19 +10,19 @@ - + - + - + - + @@ -46,14 +46,44 @@ import { session } from '@/store/modules/session'; @Component export default class stoOutboundDom extends BasePage { model = model; - SweepCode: any = ''; + order3: any = ''; firstFocus = false; - arr: any = ''; + barCode: any = ''; + scanAmount: number = 0; + retreatNum: number = 0; onReady() { let code = sessionStorage.getItem('SweepCode'); - this.SweepCode = JSON.parse(code); + this.order3 = JSON.parse(code); + this.model.materielList.forEach((item: any) => { + this.scanAmount += parseFloat(item.outAmount); + }); + } + async BackSweep() { + if (!this.barCode) { + uni.showToast({ + icon: 'none', + title: this.$t('message.barcode') as string, + }); + return; + } + let params = { + barCode: this.barCode, + loginName: session.loginName, + factoryCode: session.factoryCode, + order3: this.order3, + keepBy: session.loginName, + }; + await this.model.BackSweep(params); + if (this.model.code == '1') { + uni.showToast({ + icon: 'none', + title: this.$t('message.succeeded') as string, + }); + } + this.barCode = ''; + this.scanAmount -= 1; + this.retreatNum += 1; } - BackSweep() {} }