From 668e5ccf4d4f162800c67d94e6bbb9d4a2fd5cfb Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期日, 04 五月 2025 16:36:19 +0800 Subject: [PATCH] 重复点击上报问题修复 --- pages/rece/standard.vue | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pages/rece/standard.vue b/pages/rece/standard.vue index 496ceed..d326fdf 100644 --- a/pages/rece/standard.vue +++ b/pages/rece/standard.vue @@ -52,9 +52,6 @@ <text class="text-black">瀹炴椂搴撳瓨: <text class="text-grey ">{{item.stockQty}}</text></text> </view> </view> - - - <view class="cu-item"> <view class="content"> <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text> @@ -63,7 +60,6 @@ <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text> </view> </view> - <view class="cu-item"> <view class="content"> <text class="text-black">閲囪喘鍗曚綅:<text class="text-grey ">{{item.purUnit}}</text></text> @@ -72,13 +68,15 @@ <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text> </view> </view> - <view class="cu-item"> <view class="content"> <text class="text-blue">璁″垝鏀惰揣鏁伴噺:<text class="text-grey ">{{item.anfme}}</text></text> - </view> + </view> + <view class="content"> + <text class="text-black">宸叉敹鏁伴噺:<text class="text-grey ">{{item.qty}}</text></text> + </view> </view> - <view class="cu-item"> + <view class="cu-item"> <view class="content" v-if="!isconfirm"> <view class="cu-form-group padding-lr-0"> <view class="title text-blue">鏀惰揣鏁伴噺:</view> @@ -158,7 +156,7 @@ <view class="cu-bar btn-group foot" v-show="isconfirm"> <button class="cu-btn text-blue line-blue shadow" @click="prev">涓婁竴姝�</button> - <button class="cu-btn bg-blue shadow-blur" @click="confirm">鎻愪氦鏀惰揣</button> + <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鎻愪氦鏀惰揣</button> </view> </view> @@ -181,7 +179,8 @@ whAreaId: '', list: [], range: [], - isconfirm: false + isconfirm: false, + repeatClick: false } }, computed: { @@ -200,8 +199,8 @@ data, msg } = await request('/orders/' + this.barcode, {}, "get") - if (code === 200) { - if (Object.keys(data).length === 0){ + if (code === 200) { + if (Object.keys(data).length === 0) { uni.showToast({ title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�", icon: "none", @@ -209,15 +208,15 @@ }) } this.list.push(...data) - - }else if(code == 401){ + + } else if (code == 401) { setTimeout(() => { uni.removeStorageSync('token'); uni.reLaunch({ url: "/pages/login/login" }); }, 1000); - }else { + } else { uni.showToast({ title: msg, icon: "none", @@ -265,7 +264,8 @@ icon: "none", title: '璇烽�夋嫨鏀惰揣鍖�' }) - } else { + } else { + this.repeatClick = true const { code, data, @@ -287,8 +287,8 @@ icon: "none", position: 'top' }) - } - + } + this.repeatClick = false } }, async getRece() { -- Gitblit v1.9.1