|  |  | 
 |  |  | <template>
 | 
 |  |  |    <view class="has-foot">
 | 
 |  |  |       <form>
 | 
 |  |  |          <view class="cu-form-group margin-top" v-show="!isconfirm">
 | 
 |  |  |          <view class="cu-form-group" v-show="!isconfirm">
 | 
 |  |  |             <view class="title">物料标签</view>
 | 
 |  |  |             <input placeholder="请扫描物料标签" v-model="barcode" focus></input>
 | 
 |  |  |             <text class='cuIcon-close text-gray margin-right-xs' v-show="asncode!==''" @click="clearCode"></text>
 | 
 |  |  |             <input placeholder="请扫描物料标签" v-model="barcode" @input="search()" focus></input>
 | 
 |  |  |             <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
 | 
 |  |  |             <text class='cuIcon-search text-blue' @click="search"></text>
 | 
 |  |  |          </view>
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |                   <text class="text-black">实时库存: <text class="text-grey ">{{item.stockQty}}</text></text>
 | 
 |  |  |                </view>
 | 
 |  |  |             </view>
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  |             <view class="cu-item">
 | 
 |  |  |                <view class="content">
 | 
 |  |  |                   <text class="text-black">平台行号: <text class="text-grey ">{{item.platformId}}</text></text>
 | 
 |  |  | 
 |  |  |                   <text class="text-black">质检结果: <text class="text-grey ">{{item.inspect}}</text></text>
 | 
 |  |  |                </view>
 | 
 |  |  |             </view>
 | 
 |  |  | 
 | 
 |  |  |             <view class="cu-item">
 | 
 |  |  |                <view class="content">
 | 
 |  |  |                   <text class="text-black">采购单位:<text class="text-grey ">{{item.purUnit}}</text></text>
 | 
 |  |  | 
 |  |  |                   <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text>
 | 
 |  |  |                </view>
 | 
 |  |  |             </view>
 | 
 |  |  | 
 | 
 |  |  |             <view class="cu-item">
 | 
 |  |  |                <view class="content">
 | 
 |  |  |                   <text class="text-blue">计划收货数量:<text class="text-grey ">{{item.anfme}}</text></text>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="content">
 | 
 |  |  |                   <text class="text-black">已收数量:<text class="text-grey ">{{item.qty}}</text></text>
 | 
 |  |  |                </view>
 | 
 |  |  |             </view>
 | 
 |  |  |             <view class="cu-item">
 | 
 |  |  |                <view class="content" v-if="!isconfirm">
 | 
 |  |  |                   <view class="cu-form-group padding-lr-0">
 | 
 |  |  |                      <view class="title text-blue">收货数量:</view>
 | 
 |  |  |                      <input type="number" placeholder="请输入收货数量" v-model="item.receiptQty"></input>
 | 
 |  |  |                      <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty" :step='1'></uni-number-box>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="content" v-else>
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  |       <view class="cu-bar btn-group foot" v-show="isconfirm">
 | 
 |  |  |          <button class="cu-btn text-blue line-blue shadow" @click="prev">上一步</button>
 | 
 |  |  |          <button class="cu-btn bg-blue shadow-blur" @click="confirm">提交收货</button>
 | 
 |  |  |          <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">提交收货</button>
 | 
 |  |  |       </view>
 | 
 |  |  | 
 | 
 |  |  |    </view>
 | 
 |  |  | 
 |  |  |             whAreaId: '',
 | 
 |  |  |             list: [],
 | 
 |  |  |             range: [],
 | 
 |  |  |             isconfirm: false
 | 
 |  |  |             isconfirm: false,
 | 
 |  |  |             repeatClick: false,
 | 
 |  |  |             max: 99999999
 | 
 |  |  |          }
 | 
 |  |  |       },
 | 
 |  |  |       computed: {
 | 
 |  |  | 
 |  |  |                msg
 | 
 |  |  |             } = await request('/orders/' + this.barcode, {}, "get")
 | 
 |  |  |             if (code === 200) {
 | 
 |  |  |                if (Object.keys(data).length === 0) {
 | 
 |  |  |                   uni.showToast({
 | 
 |  |  |                      title: "该标签未查询到数据",
 | 
 |  |  |                      icon: "none",
 | 
 |  |  |                      position: 'top'
 | 
 |  |  |                   })
 | 
 |  |  |                }
 | 
 |  |  |                this.list.push(...data)
 | 
 |  |  | 
 | 
 |  |  |             } else if (code == 401) {
 | 
 |  |  |                setTimeout(() => {
 | 
 |  |  |                   uni.removeStorageSync('token');
 | 
 |  |  |                   uni.reLaunch({
 | 
 |  |  |                      url: "/pages/login/login"
 | 
 |  |  |                   });
 | 
 |  |  |                }, 1000);
 | 
 |  |  |             } else {
 | 
 |  |  |                uni.showToast({
 | 
 |  |  |                   title: msg,
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  |          },
 | 
 |  |  |          clearCode() {
 | 
 |  |  |             this.asncode = ''
 | 
 |  |  |             this.barcode = ''
 | 
 |  |  |          },
 | 
 |  |  |          remove(index) {
 | 
 |  |  |             this.list.splice(index, 1);
 | 
 |  |  | 
 |  |  |                   title: '请选择收货区'
 | 
 |  |  |                })
 | 
 |  |  |             } else {
 | 
 |  |  |                this.repeatClick = true
 | 
 |  |  |                const {
 | 
 |  |  |                   code,
 | 
 |  |  |                   data,
 | 
 |  |  | 
 |  |  |                      position: 'top'
 | 
 |  |  |                   })
 | 
 |  |  |                }
 | 
 |  |  | 
 | 
 |  |  |                this.repeatClick = false
 | 
 |  |  |             }
 | 
 |  |  |          },
 | 
 |  |  |          async getRece() {
 |