From dd8aa40384af417f56d7417e0ab39994d33e12f1 Mon Sep 17 00:00:00 2001 From: whycq0520 <91384184@qq.com> Date: 星期三, 23 三月 2022 16:49:32 +0800 Subject: [PATCH] # --- pages/basics/sale.vue | 51 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 30 insertions(+), 21 deletions(-) diff --git a/pages/basics/sale.vue b/pages/basics/sale.vue index 9f27374..d670295 100644 --- a/pages/basics/sale.vue +++ b/pages/basics/sale.vue @@ -52,6 +52,7 @@ tabData: [], searchData: {}, orderNo: '', + needData:{}, } }, mounted(){ @@ -59,7 +60,7 @@ this.baseIP = UIP; const UPORT = uni.getStorageSync('UPORT'); this.basePORT = UPORT; - this.render("AT-20220322180534") + this.render() }, onLoad() { @@ -68,35 +69,43 @@ // 鎼滅储 search() { let that = this; - that.tabData.forEach(function(e){ - that.searchData = e.orderNo - }) - + // that.tabData.forEach(function(e){ + // that.searchData = e.orderNo + // }) + this.render(that.orderNo) }, // 閲嶇疆 reset() { let that = this; - that.orderNo = '' + that.orderNo = ''; + that.needData['order_no'] = ''; + that.getData(); }, + // 鑾峰彇琛ㄦ牸鏁版嵁 + getData() { + let that = this + uni.request({ + url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/receiveDetl/list/auth", + header:{'token':uni.getStorageSync('token')}, + data: that.needData, + success(res) { + var res = res.data + if (res.code === 200) { + that.tabData = res.data.records + } + } + }) + }, + // 琛ㄦ牸鍔犺浇 render(param) { let that = this; - let data = new Object(); if(param) { - data['order_no'] = param; - - uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/receiveDetl/list/auth", - header:{'token':uni.getStorageSync('token')}, - data: data, - success(res) { - var res = res.data - if (res.code === 200) { - that.tabData = res.data.records - } - } - }) - } + that.needData['order_no'] = param; + that.getData(); + } else { + that.getData(); + } } } -- Gitblit v1.9.1