From 004b81ef2b3132f89685932508101d2f7c0027e1 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 28 十月 2024 15:06:40 +0800 Subject: [PATCH] # --- pages/order/orderDetlListLoc.vue | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 44 insertions(+), 3 deletions(-) diff --git a/pages/order/orderDetlListLoc.vue b/pages/order/orderDetlListLoc.vue index dcaea43..a548bba 100644 --- a/pages/order/orderDetlListLoc.vue +++ b/pages/order/orderDetlListLoc.vue @@ -1,5 +1,19 @@ <template> <view> + <view class="code"> + <view style="display: flex;align-items: center;"> + <view style="flex: 1;"> + <uni-search-bar v-model="searchValue" + maxlength="500" ancel="cancel" @confirm="getOrderNoList(locNo)" @clear="clear" placeholder="杈撳叆 / 鎵弿"> + </uni-search-bar> + </view> + + </view> + <view class="code-title"> + <view></view> + <view style="width: 100%;text-align: center;margin: 16rpx 0;">鎬绘暟閲忥細- {{menuList.length}} -</view> + </view> + </view> <view class="card" v-for="item in menuList" @click="chose(item)"> <view class="item">搴撲綅鍙凤細{{item.locNo}}</view> <view class="item">鐗╂枡缂栫爜锛歿{item.matnr}}</view> @@ -7,6 +21,7 @@ <!-- <view class="item">鎵�  娆★細{{item.batch}}</view> --> <view class="item">鏄庣粏鏁伴噺锛歿{item.anfme}}</view> </view> + <view style="height: 50rpx;"></view> </view> </template> @@ -17,7 +32,8 @@ baseUrl: '', token: '', menuList: [], - orderNo: '' + orderNo: '', + searchValue: '' } }, onLoad() { @@ -37,15 +53,33 @@ }, methods: { + clear() { + this.searchValue = '' + this.getOrderNoList(this.locNo) + }, getOrderNoList(locNo) { let that = this uni.request({ url: this.baseUrl + '/locDetl/forlocNo/auth/v1', - data: { locNo: that.locNo }, + data: { locNo: that.locNo, matnr: that.searchValue }, header: { 'token': uni.getStorageSync('token') }, success(res) { res = res.data - that.menuList = res.data + that.menuList = [] + if (res.code == 200) { + that.menuList = res.data + // uni.showToast({ title: res.msg, icon: "success", position: 'top' }) + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) + setTimeout(() => { + uni.reLaunch({ + url: '../login/login' + }); + }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) + } + } }) }, @@ -75,6 +109,13 @@ </script> <style> + .code { + background-color: #d9d9d9; + z-index: 99; + position: sticky; + top: 0rpx; + left: 0; + } .card { margin: 20rpx; padding: 30rpx; -- Gitblit v1.9.1