#
zwl
21 小时以前 b5390b1f1254d1a286a78c3d22da0366b3a27096
pages/order/orderPakin3.vue
@@ -7,6 +7,16 @@
            <view style="width: 80px;display: flex;align-items: center;justify-content: center;"><button size="mini"
                  type="primary" @click="findOrder()">检索</button></view>
         </view> -->
         <view class="item">
            <view class="code-decs">托盘码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
               @input="barcodeInput()">
         </view>
         <view class="item">
            <view class="code-decs">站点号:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="rsta" :focus="rstaFocus" @input="rstaInput()">
         </view>
         <view class="item">
            <view class="code-decs">订单号:</view>
            <view style="flex: 1;">
@@ -17,15 +27,10 @@
               <uni-icons type="clear" color="#c1c1c1" @click="clearOrderNo()"></uni-icons>
            </view>
         </view>
         <view class="item">
            <view class="code-decs">托盘码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
               @input="barcodeInput()">
         </view>
         <view class="item">
         <!-- <view class="item">
            <view class="code-decs">仓库:</view>
            <uni-combox :candidates="floorList" placeholder="请选择仓库" v-model="floor"></uni-combox>
         </view>
         </view> -->
         <!-- <view class="item">
            <view class="code-decs">物料码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()">
@@ -52,14 +57,14 @@
                     <uni-tag :text="item.matnr" type="primary"></uni-tag>
                  </view>
               </view>
               <view class="list-left-item">
               <!-- <view class="list-left-item">
                  <view class="desc">品名:</view>
                  <view class="left-item">{{item.maktx}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">规格:</view>
                  <view class="left-item">{{item.specs}}</view>
               </view>
               </view> -->
               <view class="list-left-item">
                  <view class="desc">批号:</view>
                  <view class="left-item">
@@ -76,7 +81,7 @@
                  <view class="left-item">本次入库数量:{{item.enterCount}}</view>
               </view>
               <view class="list-left-item">
                  <view class="left-item">已入/总数:{{item.qty}} / {{item.total}}</view>
                  <view class="left-item">已入/总数:{{item.workQty}} / {{item.total}}</view>
               </view>
            </view>
            <view class="list-right">
@@ -187,14 +192,16 @@
            messageText: '',
            title: '',
            content: '',
            orderNoFocus: true,
            barcodeFocus: false,
            orderNoFocus: false,
            barcodeFocus: true,
            matFocus: false,
            matData: '',
            removeNum: 0,
            floorList: [],
            floor: '',
            enterCount: 0
            enterCount: 0,
            rsta: '',
            rstaFocus: false,
         }
      },
      onLoad() {
@@ -290,7 +297,7 @@
                  if (res.code === 200) {
                     for (let k in res.data) {
                        res.data[k]['total'] = res.data[k].anfme
                        res.data[k]['enterCount'] = res.data[k].anfme - res.data[k].qty
                        res.data[k]['enterCount'] = res.data[k].anfme - res.data[k].workQty
                     }
                     _this.dataList = res.data
                  }
@@ -308,6 +315,25 @@
            setTimeout(() => {
               that.orderNo = '';
               that.orderNoFocus = true;
            }, 100);
         },
         // barcode input 事件
         rstaInput() {
            // 不设置定时器 会出现扫入的字符串不全
            setTimeout(() => {
               var len = this.rsta.length
               this.barcodeFocus1()
            }, 200)
         },
         // 扫描完站点后光标跳转到订单号
         barcodeFocus1() {
            this.focus = false;
            this.barcodeFocus = false;
            this.orderNoFocus = false;
            this.rstaFocus = false;
            setTimeout(() => {
               this.orderNo = '';
               this.orderNoFocus = true;
            }, 100);
         },
         orderNoInput() {
@@ -343,12 +369,15 @@
               that.barcodeFocus = true;
            }, 100);
         },
         // 商品光标清空重置
         // 站点光标清空重置
         focuss() {
            this.focus = false;
            this.barcodeFocus = false;
            this.orderNoFocus = false;
            this.rstaFocus = false;
            setTimeout(() => {
               this.matnr = '';
               this.matFocus = true;
               this.rsta = '';
               this.rstaFocus = true;
            }, 100);
         },
         // 搜索物料
@@ -599,11 +628,6 @@
               this.messageToggle('error')
               return;
            }
            if (that.floor === '') {
               this.messageText = "请选择仓库"
               this.messageToggle('error')
               return;
            }
            if (that.dataList.length === 0) {
               this.messageText = "请添加商品列表"
               this.messageToggle('error')
@@ -626,8 +650,10 @@
                  barcode: that.barcode,
                  combMats: that.dataList,
                  ck: that.floor,
                  beBatch : 0
               }),
                  rsta: that.rsta,
                  type: true,
                  beBatch : 1,
               }),
               method: 'POST',
               header: {
                  'token': uni.getStorageSync('token')
@@ -641,6 +667,7 @@
                     const innerAudioContext = uni.createInnerAudioContext();
                     innerAudioContext.src = '/static/music/pakinOk.mp3';
                     innerAudioContext.play()
                     that.rsta = '';
                  } else if (res.code == 403) {
                     that.messageText = res.msg
                     that.messageToggle('error')
@@ -748,4 +775,20 @@
      text-align: center;
      box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
   }
   .list {
      font-size: 20px;
      font-weight: 600;
   }
   .list-left-item .desc,
   .list-left-item .left-item {
      font-size: 20px;
      font-weight: 600;
   }
   .list-left-item uni-tag {
      font-size: 20px;
      font-weight: 600;
   }
</style>