From 34e81b3d0fe9ae1e9edd4fd8bcdaf7ec69b7f239 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期五, 27 六月 2025 09:00:45 +0800 Subject: [PATCH] 12 --- pages/order/orderDetlList.vue | 79 ++++++++++++++++++++++++++++++--------- 1 files changed, 60 insertions(+), 19 deletions(-) diff --git a/pages/order/orderDetlList.vue b/pages/order/orderDetlList.vue index 91e66f3..e22b40a 100644 --- a/pages/order/orderDetlList.vue +++ b/pages/order/orderDetlList.vue @@ -1,5 +1,9 @@ <template> <view> + <!-- 鎼滅储妗� --> + <view class="search-bar"> + <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @input="search" /> + </view> <view class="card" v-show="item.enableQty >0" v-for="item in menuList" @click="chose(item)"> <view class="tag-item">鍗曟嵁鍙凤細 {{item.orderNo}}</view> <view class="tag-item">鐗╂枡鐮侊細 {{item.matnr}}</view> @@ -16,7 +20,8 @@ export default { data() { return { - data:'', + data:'', + condition:'', menuList: [], order:'', baseUrl: '', @@ -33,9 +38,42 @@ }, onShow() { let that = this - + this.baseUrl = uni.getStorageSync('baseUrl'); + this.token = uni.getStorageSync('token'); + that.getOrderNoList(that.order) }, methods: { + search(){ + let that = this + uni.request({ + url: that.baseUrl + '/orderDetl/search/pda/auth', + data: { + condition: that.condition, + order: that.order.orderNo + }, + // method:"GET", + header: { + 'token':uni.getStorageSync('token'), + }, + success(result) { + console.log(result); + var res = result.data + if (res.code === 200 ) { + that.menuList = res.data + // that.save() + } 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'}) + } + } + }); + }, getOrderNoList(order) { let that = this uni.request({ @@ -51,25 +89,28 @@ }) }, chose(item) { - let that = this - uni.navigateTo({ - url: "../order/orderPakin2", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('orderItem', { - item: item - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - // that.matnr = data.data - // that.input(that.matnr) - }, - }, + // let that = this + // uni.navigateTo({ + // url: "../order/orderPakin2", + // success: function(res) { + // // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 + // res.eventChannel.emit('orderItem', { + // item: item + // }) + // }, + // events: { + // // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� + // acceptDataFromOpenedPage: function(data) { + // // that.matnr = data.data + // // that.input(that.matnr) + // }, + // }, - }); + // }); + uni.navigateBack({ + + }) } } } -- Gitblit v1.9.1