|  |  | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="code" :focus="barcodeFocus" @input="findCode()"> | 
 |  |  |          </view> | 
 |  |  |          <view class="item"> | 
 |  |  |             <view class="code-decs">来源地:</view> | 
 |  |  |             <uni-combox :candidates="orderNoList" placeholder="请选择来源地"  v-model="origin"></uni-combox> | 
 |  |  |          </view> | 
 |  |  |          <view class="item"> | 
 |  |  |             <view class="code-decs">货主:</view> | 
 |  |  |             <uni-combox :candidates="ownerList" placeholder="请选择货主"  v-model="owner"></uni-combox> | 
 |  |  |          </view> | 
 |  |  | 
 |  |  |             <view class="code-decs">库位码:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="locNo" > | 
 |  |  |          </view> | 
 |  |  |          <view class="item"> | 
 |  |  |          <!-- <view class="item"> | 
 |  |  |             <view class="code-decs">物料码:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> | 
 |  |  |             <view class="item-right"> | 
 |  |  |                <button></button> | 
 |  |  |                <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> | 
 |  |  |                <uni-icons type="right" color="#c1c1c1"></uni-icons> | 
 |  |  |             </view> | 
 |  |  |          </view> | 
 |  |  |             <view class="item-right"> --> | 
 |  |  |                <!-- <button></button> --> | 
 |  |  |                <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> --> | 
 |  |  |                <!-- <uni-icons type="right" color="#c1c1c1"></uni-icons> --> | 
 |  |  |          <!--    </view> | 
 |  |  |          </view> --> | 
 |  |  |       </view> | 
 |  |  |       <view class="mat-list-title"> | 
 |  |  |          商品列表 | 
 |  |  | 
 |  |  |                   <view class="desc">产地:</view> | 
 |  |  |                   <view class="left-item">{{item.origin}}</view> | 
 |  |  |                </view> | 
 |  |  |                <view class="list-left-item"> | 
 |  |  |                   <view class="desc">批次:</view> | 
 |  |  |                   <view class="left-item">{{item.batch}}</view> | 
 |  |  |                </view> | 
 |  |  |                 | 
 |  |  |                <view class="list-left-item"> | 
 |  |  |                   <view class="desc">公斤:</view> | 
 |  |  |                   <view class="desc">公斤(数量):</view> | 
 |  |  |                   <view class="left-item">{{item.anfme}}</view> | 
 |  |  |                </view> | 
 |  |  |             </view> | 
 |  |  | 
 |  |  |          } | 
 |  |  |       }, | 
 |  |  |       onLoad() { | 
 |  |  | 		 | 
 |  |  |          // 没啥用了 | 
 |  |  |          let that = this | 
 |  |  |          // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE | 
 |  |  |          const eventChannel = this.getOpenerEventChannel(); | 
 |  |  | 			 | 
 |  |  |          // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | 
 |  |  |          eventChannel.on('item', function(data) { | 
 |  |  |             // console.log(data.item); | 
 |  |  |             that.origin = data.item | 
 |  |  |          }) | 
 |  |  |       }, | 
 |  |  |       onShow() { | 
 |  |  |          this.baseUrl = uni.getStorageSync('baseUrl'); | 
 |  |  | 
 |  |  |       methods: { | 
 |  |  |          findCode(){ | 
 |  |  |             let that = this | 
 |  |  |             if(that.code.length < 10){ | 
 |  |  |                that.barcodeFocuss() | 
 |  |  |                return; | 
 |  |  |             } | 
 |  |  |             uni.request({ | 
 |  |  |                url: that.baseUrl + '/mobile/manDetl/in/origin/origin', | 
 |  |  |                header: { 'token':uni.getStorageSync('token') , | 
 |  |  |                "content-type":"application/x-www-form-urlencoded"}, | 
 |  |  |                data: { | 
 |  |  |                   code: that.code, | 
 |  |  |                   origin: that.origin, | 
 |  |  |                }, | 
 |  |  |                method: 'GET', | 
 |  |  |                success(res) { | 
 |  |  |                   res = res.data | 
 |  |  |                   if (res.code === 200) { | 
 |  |  |                      let item = {matnr:res.data.matnr,batch:res.data.batch,weight:res.data.anfme} | 
 |  |  |                      let matnr = {} | 
 |  |  |                      that.findMat2(res.data.matnr).then(result=>{ | 
 |  |  |                         result['batch'] = res.data.batch | 
 |  |  |                         result['anfme'] = res.data.anfme | 
 |  |  |                         result.weight = res.data.weight | 
 |  |  |                         that.dataList.push(result) | 
 |  |  |                      }) | 
 |  |  | 							 | 
 |  |  |                      that.barcodeFocus = false | 
 |  |  |                      setTimeout(()=>{ | 
 |  |  |                         that.code = '' | 
 |  |  |                         that.barcodeFocus = true | 
 |  |  |                      }) | 
 |  |  |                   } | 
 |  |  |                } | 
 |  |  |             }) | 
 |  |  |          }, | 
 |  |  |          async findMat2(matnr) { | 
 |  |  |             let that = this | 
 |  |  |             let item = {} | 
 |  |  |             let abb = await uni.request({ | 
 |  |  |                url: that.baseUrl + '/mat/auth', | 
 |  |  |                data: { | 
 |  |  |                   matnr: matnr | 
 |  |  |                }, | 
 |  |  |                header: { | 
 |  |  |                   'token': uni.getStorageSync('token') | 
 |  |  |                }, | 
 |  |  | 					 | 
 |  |  |             }).then((result)=> { | 
 |  |  |                item = result.data.data | 
 |  |  |             }) | 
 |  |  |             return item | 
 |  |  |          }, | 
 |  |  |          messageToggle(type) { | 
 |  |  |             this.msgType1 = type | 
 |  |  | 
 |  |  |                         // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 | 
 |  |  |                         events: { | 
 |  |  |                            matList: function(data) { | 
 |  |  |                               that.checkMat(data.data) | 
 |  |  |                               // that.checkMat(data.data) | 
 |  |  |                               for(let i = 0; i < data.data.count; i++) { | 
 |  |  |                                  // that.checkMat(data.data) | 
 |  |  |                                  that.dataList.unshift(data.data.mat) | 
 |  |  |                               } | 
 |  |  |                            }, | 
 |  |  |                         }, | 
 |  |  |                      }); | 
 |  |  | 
 |  |  |          resst() { | 
 |  |  |             this.dataList = [] | 
 |  |  |             this.barcode = '' | 
 |  |  |             this.locNo = '' | 
 |  |  |             this.owner = '' | 
 |  |  |             this.barcodeFocuss() | 
 |  |  |          }, | 
 |  |  |          adjust() { | 
 |  |  | 
 |  |  |                } | 
 |  |  |             } | 
 |  |  |             uni.request({ | 
 |  |  |                url: that.baseUrl + '/mobile/manDetl/in/origin', | 
 |  |  |                url: that.baseUrl + '/mobile/manDetl/in/no/origin', | 
 |  |  |                data: JSON.stringify({                   | 
 |  |  |                   locNo:that.locNo, | 
 |  |  |                   code:that.code, | 
 |  |  |                   origin:that.origin, | 
 |  |  |                   combMats: that.dataList | 
 |  |  |                   combMats: that.dataList, | 
 |  |  |                   owner: that.owner | 
 |  |  |                }), | 
 |  |  |                method: 'POST', | 
 |  |  |                header: { | 
 |  |  | 
 |  |  |    .code { | 
 |  |  |       width: 100%; | 
 |  |  |       position: fixed; | 
 |  |  |       min-height: 400rpx; | 
 |  |  |       min-height: 300rpx; | 
 |  |  |       background-color: #FFF; | 
 |  |  |       z-index: 10; | 
 |  |  |    } | 
 |  |  | 
 |  |  |       width: 100%; | 
 |  |  |       background-color: white; | 
 |  |  |       position: fixed; | 
 |  |  |       margin-top: 400rpx; | 
 |  |  |       margin-top: 300rpx; | 
 |  |  |       z-index: 9; | 
 |  |  |       /* border-top: 1px solid #DCDFE6; */ | 
 |  |  |       text-align: center; | 
 |  |  | 
 |  |  |    } | 
 |  |  |     | 
 |  |  |    .list:first-child { | 
 |  |  |       margin-top: 500rpx; | 
 |  |  |       margin-top: 440rpx; | 
 |  |  |    } | 
 |  |  |     | 
 |  |  |    .list:last-child { |