From 6f4959dd6f200241d58f3970c70bbc253fe4287b Mon Sep 17 00:00:00 2001 From: whycq <you@example.com> Date: 星期一, 26 九月 2022 20:40:23 +0800 Subject: [PATCH] # --- pages/basics/orderPakin.vue | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) diff --git a/pages/basics/orderPakin.vue b/pages/basics/orderPakin.vue index 95aa25e..5278079 100644 --- a/pages/basics/orderPakin.vue +++ b/pages/basics/orderPakin.vue @@ -59,10 +59,6 @@ <view class="color-block-blue"></view> <text class="title">淇敼鎵瑰彿/鏁伴噺</text> </view> - <view class="" style="position: relative;left: 50px;margin-bottom: 20px;"> - <text style="display: inline-block;float: left;width: 50px;">鎵瑰彿锛�</text> - <input type="text" style="width: 100px;border-bottom: 1px solid #9e9e9e;" v-model="batch"> - </view> <view class="changeBox"> <view class="num-box"> <uni-number-box :value="count" :max="9999" color="#747474" @change="changeValue"/> @@ -91,6 +87,12 @@ <button class="cu-btn bg-blue " @click="comb()">涓婃灦</button> </label> </view> + <view> + <!-- 鎻愮ず淇℃伅寮圭獥 --> + <uni-popup ref="message" type="message"> + <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message> + </uni-popup> + </view> </view> </template> @@ -105,9 +107,8 @@ barcodeFocus:true, count: 0, batch: '', - - - + msgType: 'success', + messageText: '杩欐槸涓�鏉℃垚鍔熸彁绀�', } }, mounted(){ @@ -133,9 +134,11 @@ let str = that.orderNo.split(';') that.orderNo = str[0] uni.request({ - url: that.commonUrl + '/mat/auth', + url: that.commonUrl + '///', data: { - matnr:str[1] + orderno:str[0], + matnr:str[1], + batch:str[2] }, header: { 'token':uni.getStorageSync('token') @@ -160,6 +163,15 @@ res.eventChannel.emit('matData', { data: that.matData }) }, }); + } else if(res.code === 403) { + uni.showToast({title: res.msg, icon: "none", position: 'top'}) + setTimeout(() => { + uni.reLaunch({ + url: '../login/login' + }); + }, 1000); + } else { + uni.showToast({title: res.msg, icon: "none",position: 'top'}) } } @@ -229,6 +241,18 @@ this.orderNo = '' this.matList = [] }, + // 绉婚櫎鐗╂枡 + removeItem(item,index) { + this.matList.splice(index,1) + // this.listLen = this.matList.length + this.messageToggle('success') + this.messageText = '绉婚櫎鎴愬姛' + }, + messageToggle(type) { + this.msgType = type + this.messageText = '' + this.$refs.message.open() + }, } } </script> -- Gitblit v1.9.1