From b10f549bf55bbf9e4e4ee996ecc065d400eff91e Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 07 五月 2024 19:28:10 +0800
Subject: [PATCH] #
---
pages/phyz/orderOut/orderCheck.vue | 37 ++++++++++++++++++++++++++++++++-----
1 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/pages/phyz/orderOut/orderCheck.vue b/pages/phyz/orderOut/orderCheck.vue
index 7cf5583..bec3242 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="count" :step='1' :max="9999999" 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>
@@ -63,7 +72,7 @@
count: 0
}
},
- onLoad() {
+ onShow() {
let _this = this
this.baseUrl = uni.getStorageSync('baseUrl');
this.token = uni.getStorageSync('token');
@@ -71,12 +80,14 @@
const eventChannel = this.getOpenerEventChannel();
// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
eventChannel.on('mat', function(data) {
- console.log(data);
let ids = [data.mat.id]
_this.getPakoutList(ids,data.mat.locNo)
})
},
methods: {
+ max() {
+ this.data.anfme = this.count
+ },
toggleDropdown(item) {
item.isOpen = !item.isOpen;
},
@@ -99,11 +110,17 @@
if (locNo == k.locNo) {
k['isOpen'] = false
_this.count = k.anfme
+ k.anfme = 0
_this.data = k
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 +139,11 @@
},
combConfirm() {
let _this = this
+ if (_this.data.anfme == 0) {
+ uni.showToast({ title: '鍑哄簱鏁伴噺涓嶈兘涓�0锛�', icon: "error", position: 'top'})
+ return
+ }
+ uni.showLoading({})
let combList = []
combList.push(_this.data)
uni.request({
@@ -131,14 +153,19 @@
method: 'POST',
success(res) {
res = res.data
- console.log(res);
if (res.code === 200) {
+ uni.hideLoading({})
uni.showToast({ title: '鍑哄簱鎴愬姛', icon: "success", position: 'top'})
setTimeout(()=> {
uni.navigateBack({
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' })
}
}
})
--
Gitblit v1.9.1