From 17c63ddd016876d846b6e8f9c74d54c0316f9ee9 Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期一, 27 六月 2022 16:27:08 +0800 Subject: [PATCH] # --- pages/basics/orderOut.vue | 57 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 33 insertions(+), 24 deletions(-) diff --git a/pages/basics/orderOut.vue b/pages/basics/orderOut.vue index 0f5930d..d1289dd 100644 --- a/pages/basics/orderOut.vue +++ b/pages/basics/orderOut.vue @@ -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