From 5a29707780e00b600afd053b62d38af5d267102b Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期日, 28 四月 2024 09:36:25 +0800
Subject: [PATCH] #
---
pages/phyz/order/pakinOrderSelect.vue | 71 +++++++++++++++++++++++++++++++----
1 files changed, 62 insertions(+), 9 deletions(-)
diff --git a/pages/phyz/order/pakinOrderSelect.vue b/pages/phyz/order/pakinOrderSelect.vue
index 4d60b26..c3bba06 100644
--- a/pages/phyz/order/pakinOrderSelect.vue
+++ b/pages/phyz/order/pakinOrderSelect.vue
@@ -35,7 +35,9 @@
</view>
</view>
<!-- 鍨珮 -->
- <view style="height: 50rpx;"></view>
+ <view style="height: 340rpx;text-align: center;color: #b9b9b9;">
+ - 宸茬粡鍒板簳浜� -
+ </view>
<!-- 寮圭獥 -->
<view>
<uni-popup ref="addItem" type="dialog">
@@ -52,6 +54,15 @@
</view>
</uni-popup>
</view>
+ <!-- 閬僵灞� -->
+ <view class="mask" v-if="mask">
+ 鍔犺浇涓�傘�傘��
+ </view>
+ <!-- <view class="buttom">
+ <uni-search-bar :focus="searchValueFocus" v-model="searchValue" style="width: 100%;"
+ maxlength="500" ancel="cancel" @confirm="searchValueInput2()" @clear="clear" placeholder="杈撳叆 / 鎵弿 璁㈠崟鍙�">
+ </uni-search-bar>
+ </view> -->
</view>
</template>
@@ -73,7 +84,7 @@
},
index: 0,
count: 0,
-
+ mask: false
}
},
@@ -82,10 +93,23 @@
this.token = uni.getStorageSync('token');
this.searchValue = uni.getStorageSync('threeCode');
this.getOrderDetlList(this.searchValue,30)
+ console.log("onLoad");
+ },
+ onShow() {
+ console.log(uni.getStorageSync('pakinOrderCar'));
+ // if (uni.getStorageSync('pakinOrderCar')) {
+ // this.orderCarList = uni.getStorageSync('pakinOrderCar');
+ // } else {
+ // this.orderCarList = []
+ // }
+ },
+ onHide() {
+ uni.setStorageSync('pakinOrderCar', this.orderCarList);
},
methods: {
getOrderDetlList(threeCode,limit) {
let _this = this
+ _this.mask = true
_this.data.three_code = threeCode
_this.data.limit = limit
uni.request({
@@ -107,7 +131,13 @@
}
_this.dataList = res.data.records
_this.total = res.data.total
- }
+ _this.mask = false
+ } 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' })
+ }
}
})
},
@@ -143,10 +173,10 @@
this.count = 0
},
addConfirm() {
- if (this.count == 0) {
- uni.showToast({ title: '鍏ュ簱鏁伴噺涓嶅悎娉曪紒', icon: "none", position: 'top' })
- return
- }
+ // if (this.count == 0) {
+ // uni.showToast({ title: '鍏ュ簱鏁伴噺涓嶅悎娉曪紒', icon: "none", position: 'top' })
+ // return
+ // }
this.dataList[this.index]['used'] = true
this.dataList[this.index]['pakinQty'] = this.count
this.orderCarList.push(this.dataList[this.index])
@@ -157,6 +187,10 @@
// 鐐瑰嚮鍓嶅線 寰呯粍鎵樺垪琛�
orderCar() {
let _this = this
+ if (_this.orderCarList.length === 0) {
+ uni.showToast({ title: '璇锋坊鍔犲叆搴撳晢鍝侊紒', icon: "none", position: 'top' })
+ return
+ }
uni.navigateTo({
url: './orderCar',
success(res) {
@@ -167,6 +201,10 @@
events: {
acceptDataFromOpenedPage: function(data) {
console.log(data);
+ if (data.data == 1) {
+ _this.orderCarList = []
+ _this.getOrderDetlList(uni.getStorageSync('threeCode'),999999)
+ }
}
}
})
@@ -200,8 +238,8 @@
}
.shop-car {
position: fixed;
- left: 60rpx;
- bottom: 80rpx;
+ left: 22rpx;
+ bottom: 150rpx;
background-color: #2299ff;
width: 260rpx;
height: 90rpx;
@@ -221,6 +259,21 @@
flex: 4;
}
+ .mask {
+ position: absolute;
+ width: 100%;
+ height: 100vh;
+ z-index: 999;
+ top: 0;
+ left: 0;
+ background-color: rgba(0, 0, 0, .4);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 16px;
+ color: #fff;
+ }
+
.popup {
width: 80vw;
min-height: 100rpx;
--
Gitblit v1.9.1