wangxinhui
4 小时以前 c2cdf0b95d4c9214646c860609b8c838d6ffa779
ÏîÄ¿´úÂë/ÁúÀûµÃPDA/pages/stash/boxing.vue
@@ -46,6 +46,23 @@
               </uni-forms>
            </view>
         </view>
         <view v-if="current === 2" class="headerstyle" >
            <view class="itemstyle">
               <uni-forms label-width="120">
                  <uni-forms-item label="托盘条码">
                     <uni-easyinput type="text" :focus="!addressEmptyFocus" v-model="emptyCode"
                        placeholder="请扫描托盘条码" ref='midInput' @confirm="inputChangeemptyCode" />
                  </uni-forms-item>
                  <uni-forms-item label="地址条码">
                     <uni-easyinput type="text" v-model="addressEmpty"
                        placeholder="请扫描地址条码" ref='midInput' :focus="addressEmptyFocus" />
                  </uni-forms-item>
                  <uni-forms-item>
                     <button @click="inEmpty" type="primary" size="default" style="margin-top: 2%;">入库确认</button>
                  </uni-forms-item>
               </uni-forms>
            </view>
         </view>
      </view>
      <u-toast ref="uToast" />
   </view>
@@ -71,6 +88,9 @@
            orderNo: "",
            warehouseId: "",
            Test: false,
            emptyCode: "",
            addressEmpty: "",
            addressEmptyFocus: false,
         }
      },
      onShow() {},
@@ -81,6 +101,10 @@
         if (this.warehouseId == 1) { 
            this.items=['组盘'];
         }
         if (this.warehouseId == 2) {
            this.items=['空盘入库'];
            this.current=2;
         }
      },
      methods: {
         barcodeInput() {
@@ -89,6 +113,54 @@
                  this.focus = true;
               }
            })
         },
         inputChangeemptyCode() {
            if (this.emptyCode.length > 0) {
               this.addressEmptyFocus = true;
            } else {
               this.addressEmptyFocus = false;
            }
         },
         inEmpty(){
            if (this.emptyCode == "") {
                  this.$refs.uToast.show({
                     title: "请扫描托盘条码",
                     type: "error"
                  })
                  return;
               }
               if (this.addressEmpty == "") {
                  this.$refs.uToast.show({
                     title: "请扫描地址条码",
                     type: "error"
                  })
                  return;
               }
               var url="?barCode="+this.emptyCode+"&startPoint="+this.addressEmpty;
               this.$u.post('/api/Task/EmptyBackTask'+url, {}).then(res => {
                  if (res.status) {
                     this.emptyCode = "";
                     this.addressEmpty="";
                     //获取总数量
                     setTimeout(() => {
                        this.addressEmptyFocus = false;
                        this.$refs.uToast.show({
                           title: "成功",
                           type: "success"
                        })
                     }, 200);
                  } else {
                     this.$refs.uToast.show({
                        title: res.message,
                        type: "error"
                     })
                  }
               }).catch(err => {
                  this.$refs.uToast.show({
                     title: err.message,
                     type: "error"
                  })
               })
         },
         inbound() {
            if (this.inboundBarcode == "") {
@@ -166,9 +238,10 @@
                  })
                  this.focus = false;
                  this.barcode = "";
                  this.matInfos = [];
                  this.sns = [];
                  this.matTotal = [];
                  this.materSn = "";
                  this.wide = "";
                  this.weight = "";
                  this.thickness = "";
               } else {
                  this.$refs.uToast.show({
                     title: res.message,