| | |
| | | <view class="cu-bar bg-white search"> |
| | | <view class="search-form radius"> |
| | | <text class="cuIcon-search"></text> |
| | | <input :adjust-position="false" type="text" placeholder="扫码 / 输入 (单据编号)" confirm-type="search"></input> |
| | | <text class="cuIcon-close"></text> |
| | | <input v-model="orderNo" :adjust-position="false" type="text" placeholder="扫码 / 输入 (单据编号)" confirm-type="search" @input="search()"></input> |
| | | <text class="cuIcon-close" @click="reset()"></text> |
| | | </view> |
| | | <view class="action"> |
| | | <button class="cu-btn bg-yellow" style="color: #fff;">搜 索</button> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabData:[], |
| | | tabData: [], |
| | | searchData: {}, |
| | | orderNo: '', |
| | | } |
| | | }, |
| | | mounted(){ |
| | |
| | | this.baseIP = UIP; |
| | | const UPORT = uni.getStorageSync('UPORT'); |
| | | this.basePORT = UPORT; |
| | | let that = this; |
| | | uni.request({ |
| | | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/receiveDetl/list/auth", |
| | | header:{'token':uni.getStorageSync('token')}, |
| | | success(res) { |
| | | var res = res.data |
| | | if (res.code === 200) { |
| | | that.tabData = res.data.records |
| | | console.log(that.tabData) |
| | | } |
| | | } |
| | | }) |
| | | this.render("AT-20220322180534") |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | // 搜索 |
| | | search() { |
| | | let that = this; |
| | | that.tabData.forEach(function(e){ |
| | | that.searchData = e.orderNo |
| | | }) |
| | | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | let that = this; |
| | | that.orderNo = '' |
| | | }, |
| | | // 表格加载 |
| | | 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 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |