From bbfe4dd2532bbd41c7f9d26285c7f0aae84ccb54 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 17 七月 2024 14:59:06 +0800 Subject: [PATCH] # --- pages/phyz/orderOut/orderCheck.vue | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/pages/phyz/orderOut/orderCheck.vue b/pages/phyz/orderOut/orderCheck.vue index 7d706cb..3052f9e 100644 --- a/pages/phyz/orderOut/orderCheck.vue +++ b/pages/phyz/orderOut/orderCheck.vue @@ -35,7 +35,16 @@ <!-- 鏍囬 --> <view class="title">鍑哄簱鏁伴噺</view> <view class="popup-item"> - <uni-number-box :value="data.anfme" :step='1' :min="0" :max="count" color="#747474" @change="changeValue" /> + <view> + <uni-number-box :value="data.anfme" :step='1' :min="0" :max="count" color="#747474" @change="changeValue" /> + </view> + + </view> + <view class="popup-item"> + <view> + <view @click="max()" style="padding: 0rpx 16rpx;background-color: #d9d9d9;font-size: 10px;">MAX</view> + </view> + </view> <view class="btn"> <view class="btn-left" @click="addClose">鍙栨秷</view> @@ -47,7 +56,7 @@ <!-- 搴曢儴鎿嶄綔鎸夐挳 --> <view class="buttom"> <button size="mini" @click="reset('warn')">绋嶅悗澶勭悊</button> - <button size="mini" type="primary" @click="combConfirm('warn')">绔嬪嵆鍑哄簱</button> + <button size="mini" type="primary" @click="combConfirm('warn')" :disabled="combDis">绔嬪嵆鍑哄簱</button> </view> </view> </template> @@ -60,10 +69,11 @@ token: '', data: {}, option: '', - count: 0 + count: 0, + combDis: false } }, - onLoad() { + onShow() { let _this = this this.baseUrl = uni.getStorageSync('baseUrl'); this.token = uni.getStorageSync('token'); @@ -76,6 +86,9 @@ }) }, methods: { + max() { + this.data.anfme = this.count + }, toggleDropdown(item) { item.isOpen = !item.isOpen; }, @@ -103,7 +116,12 @@ return } } - } + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) + setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) + } } }) }, @@ -122,6 +140,7 @@ }, combConfirm() { let _this = this + _this.combDis = true if (_this.data.anfme == 0) { uni.showToast({ title: '鍑哄簱鏁伴噺涓嶈兘涓�0锛�', icon: "error", position: 'top'}) return @@ -135,6 +154,7 @@ data: combList, method: 'POST', success(res) { + _this.combDis = true res = res.data if (res.code === 200) { uni.hideLoading({}) @@ -144,7 +164,15 @@ delta: 2 }); },700) + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) + setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) } + }, + fail(res) { + _this.combDis = false } }) } -- Gitblit v1.9.1