From 42b4d70afef5d9987d484c608c0f81f6191f4bcc Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 29 七月 2022 14:42:27 +0800 Subject: [PATCH] # --- pages/basics/orderOut.vue | 61 +++++++++++++++++------------- 1 files changed, 35 insertions(+), 26 deletions(-) diff --git a/pages/basics/orderOut.vue b/pages/basics/orderOut.vue index 0f5930d..781b754 100644 --- a/pages/basics/orderOut.vue +++ b/pages/basics/orderOut.vue @@ -7,7 +7,7 @@ </view> <view class="square-content"> <view class="content-input"> - <input type="text" v-model="billNo" placeholder="鎵爜 / 杈撳叆" @input="searchBillNo"> + <input type="text" v-model="billNo" placeholder="鎵爜 / 杈撳叆" @input="searchBillNo" placeholder-style="line-height: 85rpx;"> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBillNo"></uni-icons> </view> </view> @@ -99,7 +99,7 @@ export default { data() { return { - billNo: 'CK6266262626A', + billNo: '', matList: [], sites: [], siteId: '' @@ -118,35 +118,39 @@ this.billNo = null }, searchBillNo() { - console.log(1) let that = this; uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mobile/order/out/pakout/auth", + url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/orderDetl/list/auth", header: { - // 'content-type':"application/x-www-form-urlencoded", + 'content-type':"application/x-www-form-urlencoded", 'token':uni.getStorageSync('token') }, data: { - staNo:102, - orderNo:20220622, + curr:1, + limit:10, + // typeCode:1, + order_no: that.billNo }, method:"POST", success(result) { - console.log(result) - // let res = result.data - // if (res.code === 200 ) { - // that.matList = res.data.records - // that.staNoSelect() - // } 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'}) - // } + let res = result.data + if (res.code === 200 ) { + if (res.data) { + that.matList = res.data.records + that.staNoSelect() + } else { + that.matList = [] + } + } 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'}) + } }, }) }, @@ -156,6 +160,7 @@ url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/available/take/site", header: {'token':uni.getStorageSync('token')}, success(result) { + console.log(result) let res = result.data if (res.code === 200 ) { that.sites = []; @@ -195,18 +200,22 @@ locDetls: locDetls } console.log(param) - return + // return uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/plate/out/start", + url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mobile/order/out/pakout/auth", header: { 'token':uni.getStorageSync('token')}, - data: JSON.stringify(param), + // data: JSON.stringify(param), + data: { + staNo: staNo, + orderNo: that.billNo + }, method:"POST", success(result) { console.log(result) if (result.data.code === 200) { uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) - that.reset() + that.resst() } else { uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) } -- Gitblit v1.9.1