From d524a557387c9b169f076f5a86e520516ebbf662 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 27 九月 2023 15:28:45 +0800 Subject: [PATCH] # --- pages/basics/orderPakin.vue | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/pages/basics/orderPakin.vue b/pages/basics/orderPakin.vue index 6da0e04..48030fa 100644 --- a/pages/basics/orderPakin.vue +++ b/pages/basics/orderPakin.vue @@ -89,10 +89,13 @@ <view><text style="width: 400rpx;">鍏ュ簱鍖哄煙锛歿{item.matType$}}</text></view> <view><text style="width: 400rpx;">鎵瑰彿锛歿{item.batch}}</text></view> <view><text style="width: 400rpx;">瀹㈡埛淇℃伅锛歿{item.owner}}</text></view> - <view> + <text style="width: 400rpx;">澶囨敞锛歿{item.memo}}</text> + <text style="width: 400rpx;margin-left: 100rpx;color: blue;" v-show="orderNo">宸插叆/鎬绘暟锛歿{item.qty}} / {{item.total}}</text> + <view><text style="width: 400rpx;">鏈鍏ュ簱锛歿{item.enterCount}}</text></view> + <!-- <view> <text style="width: 400rpx;">澶囨敞锛歿{item.memo}}</text> - <text style="width: 400rpx;margin-left: 100rpx">鏁伴噺锛歿{item.anfme}}</text> - </view> + <text style="width: 400rpx;margin-left: 100rpx;color: blue;">宸插叆/鎬绘暟锛歿{item.qty}} / {{item.anfme}}</text> + </view> --> <!-- <view> <text style="width: 400rpx;">鏁伴噺锛歿{item.anfme}}</text> </view> --> @@ -190,7 +193,8 @@ ck1: false, ck2: true, frozen: 0, - owner: '' + owner: '', + enterCount: 0 } }, onShow() { @@ -223,9 +227,12 @@ success(res) { res = res.data if (res.code === 200 ) { + for(let k in res.data) { + res.data[k]['total'] = res.data[k].anfme + res.data[k]['enterCount'] = res.data[k].anfme - res.data[k].qty + } _this.matList = res.data } - console.log(res); } }) @@ -271,7 +278,11 @@ var len = this.barcode.length if (len != 8) { uni.showToast({title: '鎵樼洏鐮佹湁璇閲嶈瘯', icon: "none", position: 'top'}); - this.barcodeFocuss() + this.orderNoFocus = false; + setTimeout(()=>{ + this.barcode = ''; + this.orderNoFocus = true; + }, 100); return; } this.focuss() @@ -280,10 +291,10 @@ // 鎵樼洏鐮佹湁璇噸缃� barcodeFocuss() { let that = this; - that.barcodeFocus = false; + that.orderNoFocus = false; setTimeout(()=>{ that.barcode = ''; - that.barcodeFocus = true; + that.orderNoFocus = true; }, 100); }, // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 @@ -301,6 +312,7 @@ this.matList = [] this.barcode = '' this.matnr = '' + this.orderNo = '' this.barcodeFocuss() uni.vibrateShort(); }, @@ -357,6 +369,9 @@ that.matList[k].owner = that.owner[t].id } } + } + for (let k in that.matList) { + that.matList[k].anfme = that.matList[k].enterCount } uni.showLoading(); uni.request({ @@ -526,7 +541,7 @@ uni.vibrateShort(); }, revise(item,index) { - this.count = this.matList[index].anfme + this.count = this.matList[index].enterCount this.batch = this.matList[index].batch this.memo = this.matList[index].memo this.cstmr = this.matList[index].cstmr @@ -542,7 +557,7 @@ this.count = value }, confirm() { - this.matList[this.rowNum].anfme = this.count + this.matList[this.rowNum].enterCount = this.count this.matList[this.rowNum].batch = this.batch this.matList[this.rowNum].memo = this.memo this.matList[this.rowNum].cstmr = this.cstmr -- Gitblit v1.9.1