|  |  | 
 |  |  |    <view> | 
 |  |  |       <view class="code"> | 
 |  |  |          <view class="item"> | 
 |  |  |             <view class="code-decs">库位号:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="locNo" :focus="locNoFocus"> | 
 |  |  |             <button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">推荐</button> | 
 |  |  |          </view> | 
 |  |  |          <view class="item"> | 
 |  |  |             <view class="code-decs">托盘码:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" @input="recommendLoc()"> | 
 |  |  |             <view class="item-right"> | 
 |  |  |                <button></button> | 
 |  |  |             </view> | 
 |  |  |          </view> | 
 |  |  |          <view class="item"> | 
 |  |  |             <view class="code-decs">库位号:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="locNo" :focus="locNoFocus"> | 
 |  |  |             <button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">推荐</button> | 
 |  |  |          </view> | 
 |  |  |       </view> | 
 |  |  |       <view class="mat-list-title"> | 
 |  |  | 
 |  |  |             </scroll-view> | 
 |  |  |          </uni-popup> | 
 |  |  |       </view> | 
 |  |  | 		 | 
 |  |  |       <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> | 
 |  |  |          <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> | 
 |  |  |       </view> | 
 |  |  |    </view> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | 
 |  |  |             matData: '', | 
 |  |  |             removeNum: 0, | 
 |  |  |             type: 'center', | 
 |  |  |             recommendLocs: [] | 
 |  |  |             recommendLocs: [], | 
 |  |  |             hide: true, | 
 |  |  |             hidebg: 'kb-bgtr' | 
 |  |  |          } | 
 |  |  |       }, | 
 |  |  |       onShow() { | 
 |  |  |          this.baseUrl = uni.getStorageSync('baseUrl'); | 
 |  |  |          this.token = uni.getStorageSync('token'); | 
 |  |  |          this.recommendLoc() | 
 |  |  |       }, | 
 |  |  |       onLoad() { | 
 |  |  |          // #ifdef APP | 
 |  |  |          setInterval(()=>{ | 
 |  |  |             if (this.hide) { | 
 |  |  |                uni.hideKeyboard() | 
 |  |  |             } else { | 
 |  |  | 					 | 
 |  |  |             } | 
 |  |  |          },20) | 
 |  |  |          // #endif | 
 |  |  |       }, | 
 |  |  |       onBackPress() { | 
 |  |  |          this.hide = false | 
 |  |  |       }, | 
 |  |  |       methods: { | 
 |  |  |          hideKeyboard() { | 
 |  |  |             this.hide = this.hide ? false : true | 
 |  |  |             if (this.hide) { | 
 |  |  |                this.hidebg = 'kb-bgtr' | 
 |  |  |             } else { | 
 |  |  |                this.hidebg = 'kb-bgfa' | 
 |  |  |             } | 
 |  |  |          }, | 
 |  |  |          chose(item) { | 
 |  |  |             this.locNo = item | 
 |  |  |             this.$refs.popup.close() | 
 |  |  | 
 |  |  |             that.recommendLocs = [] | 
 |  |  |             uni.request({ | 
 |  |  |                url: that.baseUrl + '/mobile/node/recommend/loc', | 
 |  |  |                data: {barcode: that.barcode}, | 
 |  |  |                data: {zpallet: that.barcode}, | 
 |  |  |                header: {'token': uni.getStorageSync('token')}, | 
 |  |  |                method: 'POST', | 
 |  |  |                success(res) { | 
 |  |  |                   res = res.data | 
 |  |  |                   console.log(res); | 
 |  |  |                   that.recommendLocs.push('DT-C-010202') | 
 |  |  |                   return | 
 |  |  |                   res = res.data | 
 |  |  | 						 | 
 |  |  |                   // that.recommendLocs.push('DT-C-010202') | 
 |  |  |                   if (res.code == 200 && res.data) { | 
 |  |  |                      that.recommendLocs = res.data | 
 |  |  |                      that.recommendLocs.push(res.msg) | 
 |  |  |                      that.dataList = res.data | 
 |  |  |                   }  | 
 |  |  |                } | 
 |  |  |                 | 
 |  |  | 
 |  |  |          comb() { | 
 |  |  |             uni.vibrateShort(); | 
 |  |  |             let that = this; | 
 |  |  |             if (that.barcode === '') { | 
 |  |  |                this.messageText = "请添加库位码" | 
 |  |  |                this.messageToggle('error') | 
 |  |  |                return; | 
 |  |  |             } | 
 |  |  |             // if (that.barcode === '') { | 
 |  |  |             //    this.messageText = "请添加库位码" | 
 |  |  |             //    this.messageToggle('error') | 
 |  |  |             //    return; | 
 |  |  |             // } | 
 |  |  |             // if (that.dataList.length === 0) { | 
 |  |  |             //    this.messageText = "请添加商品列表" | 
 |  |  |             //    this.messageToggle('error') | 
 |  |  | 
 |  |  |       display: flex; | 
 |  |  |       min-height: 80rpx; | 
 |  |  |       background-color: #FFF; | 
 |  |  |       margin: auto 20rpx; | 
 |  |  |       /* margin: 20rpx 20rpx; */ | 
 |  |  |       border-radius: 20rpx; | 
 |  |  |       box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2); | 
 |  |  |       margin: 20rpx; | 
 |  |  |    } | 
 |  |  |    .list:first-child { | 
 |  |  |       margin-top: 410rpx; | 
 |  |  |       margin-top: 280rpx; | 
 |  |  |    } | 
 |  |  |    .list:last-child { | 
 |  |  |       margin-bottom: 120rpx; | 
 |  |  | 
 |  |  |    .code { | 
 |  |  |       width: 100%; | 
 |  |  |       position: fixed; | 
 |  |  |       min-height: 200rpx; | 
 |  |  |       min-height: 140rpx; | 
 |  |  |       background-color: #FFF; | 
 |  |  |       z-index: 10; | 
 |  |  |    } | 
 |  |  |    .item { | 
 |  |  |       display: flex; | 
 |  |  |       align-items: center; | 
 |  |  |       height: 100rpx; | 
 |  |  |       height: 70rpx; | 
 |  |  |       margin-left: 20rpx; | 
 |  |  |       border-bottom: 1px solid #DCDFE6; | 
 |  |  |    } | 
 |  |  | 
 |  |  |       width: 100%; | 
 |  |  |       background-color: white; | 
 |  |  |       position: fixed; | 
 |  |  |       margin-top: 200rpx; | 
 |  |  |       margin-top: 140rpx; | 
 |  |  |       z-index: 9; | 
 |  |  |       /* border-top: 1px solid #DCDFE6; */ | 
 |  |  |       text-align: center; |