|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <view class="container"> | 
|---|
|  |  |  | <view class="code"> | 
|---|
|  |  |  | <uni-search-bar :focus="searchValueFocus" v-model="searchValue"  @input="searchValueInput()" | 
|---|
|  |  |  | maxlength="500" ancel="cancel" @clear="clear" placeholder="输入 / 扫描 订单号"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <view>单据类型:{{item.docType$}}</view> | 
|---|
|  |  |  | <view>创建时间:{{item.createTime$}}</view> | 
|---|
|  |  |  | <!-- <view class="card-id">{{i + 1}}</view> --> | 
|---|
|  |  |  | <view class="card-status">{{item.settle$}}</view> | 
|---|
|  |  |  | <view class="card-status-1" v-if="item.settle == 1">{{item.settle$}}</view> | 
|---|
|  |  |  | <view class="card-status-2" v-if="item.settle == 2">{{item.settle$}}</view> | 
|---|
|  |  |  | <view class="card-status-4" v-if="item.settle == 4">{{item.settle$}}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- <view class="list-right" @click="checkboxChange(item)"> | 
|---|
|  |  |  | <label > | 
|---|
|  |  |  | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | this.baseUrl = uni.getStorageSync('baseUrl'); | 
|---|
|  |  |  | this.token = uni.getStorageSync('token'); | 
|---|
|  |  |  | this.oldDataList = [...this.dataList] | 
|---|
|  |  |  | this.getOrderList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | searchValueInput() { | 
|---|
|  |  |  | let count = 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | this.dataList = [...this.oldDataList] | 
|---|
|  |  |  | this.newDataList = [] | 
|---|
|  |  |  | for (let k in this.dataList) { | 
|---|
|  |  |  | if (!this.dataList[k].matnr.includes(this.matnr)) { | 
|---|
|  |  |  | if (!this.dataList[k].orderNo.includes(this.searchValue)) { | 
|---|
|  |  |  | count++; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.newDataList.push(this.dataList[k]) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.matnr != '') { | 
|---|
|  |  |  | for (let j in this.dataList) { | 
|---|
|  |  |  | if (!this.dataList[j].maktx.includes(this.matnr)) { | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | for (let i in this.newDataList) { | 
|---|
|  |  |  | if (this.newDataList[i].matnr ==  this.dataList[j].matnr) { | 
|---|
|  |  |  | sign++ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (sign == 0) { | 
|---|
|  |  |  | this.newDataList.push(this.dataList[j]) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.dataList = this.newDataList | 
|---|
|  |  |  | 
|---|
|  |  |  | res = res.data | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | _this.dataList = res.data.records | 
|---|
|  |  |  | _this.oldDataList = [..._this.dataList] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | @import url('../../../static/css/common/order.css'); | 
|---|
|  |  |  | .card-status { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | right: 20rpx; | 
|---|
|  |  |  | top: 30rpx; | 
|---|
|  |  |  | padding: 10rpx 20rpx; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | font-size: 10px; | 
|---|
|  |  |  | color: #ffa39e; | 
|---|
|  |  |  | background-color: #fff1f0; | 
|---|
|  |  |  | border: 1px solid #ffa39e; | 
|---|
|  |  |  | border-radius: 6rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|