skyouc
4 天以前 e97cbb592d9165b808a76f654fa0a467817ddedf
pages/outbound/fastPicking.vue
@@ -2,22 +2,23 @@
   <view class="has-foot">
      <form>
         <view class="cu-form-group" v-show="!isconfirm">
            <view class="title">容器/库位码</view>
            <input placeholder="请扫描容器/库位码" v-model="barcode" @input="search()" focus></input>
            <view class="title">容器码</view>
            <input placeholder="请扫描容器码" v-model="barcode"  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>
      </form>
      <view class="cu-form-group" v-show="isClickItem">
      <!-- <view class="cu-form-group" v-show="isClickItem">
         <view class="title">QR码</view>
         <input placeholder="请扫描QR码" v-model="QRbarcode" ></input>
         
      </view>
      </view> -->
            
      <view class="cu-list det menu sm-border  padding">
         <block  v-for="(item, index) in list" :key="index">
            <view :style="clickItem === index ?itemStyle : {}" class="cu-list det menu  "  @click="clickTaskItem(index)">
            <view :style="clickItem === index ?itemStyle : {}" class="cu-list det menu  " >
               
            
            <view class="cu-bar bg-white solid-bottom margin-top-sm">
@@ -32,15 +33,10 @@
               <view class="content">
                  <text class="text-gray">编码:<text class="text-black ">{{item.matnrCode}}</text></text>
               </view>               
            </view>
            </view>
            <view class="cu-item">
               <view class="content">
                  <text class="text-gray">订单:<text class="text-black ">{{item.trackCode}}</text></text>
               </view>
            </view>
            <view class="cu-item">
               <view class="content">
                  <text class="text-gray">出库单:<text class="text-black ">{{item.trackCode}}</text></text>
                  <text class="text-gray">出库单:<text class="text-black ">{{item.sourceCode}}</text></text>
               </view>               
            </view>
            <view class="cu-item">
@@ -52,21 +48,12 @@
               <view class="content">
                  <text class="text-gray">库存单位:<text class="text-black ">{{item.unit}}</text></text>
               </view>   
               <view class="content">
                  <text class="text-gray">质检结论:<text class="text-black ">{{item.matnrCode}}</text></text>
               </view>
            </view>            
            <view class="cu-item">
               <view class="content">
                  <text class="text-gray">标签:<text class="text-black ">{{item.matnrCode}}</text></text>
               </view>
            </view>
            
            <view class="cu-item">
               <view class="content">
                  <text class="text-gray">存储数量:<text class="text-black ">{{item.matnrCode}}</text></text>
               </view>
               <view class="content">
                  <text class="text-gray">计划分拣数量:<text class="text-black ">{{item.anfme}}</text></text>
               </view>                  
@@ -74,7 +61,7 @@
            <view class="cu-item">                  
               <view class="content2">
                  <text class="text-gray">本次分拣数量:</text>
                  <input type="number" v-model="item.workQty"></input>
                  <input type="number" v-model="item.anfme" disabled=""></input>
               </view>
                  
            </view>   
@@ -83,25 +70,16 @@
      </view>
      <view class="text-blue text-right padding-lr" v-show="isconfirm">
         本次收货总数量:{{allCount}}
      </view>
      <view class="cu-form-group " v-show="isconfirm">
         <view class="title">收货区</view>
         <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
            @change="selChange"></uni-data-select>
      </view>
      <view class="cu-bar btn-group foot" v-show="!isconfirm">
      <view class="cu-bar btn-group foot" >
         <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
         <button class="cu-btn bg-blue shadow-blur" @click="next">下一步</button>
         <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">提交确认</button>
      </view>
      <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>
      </view>
   </view>
</template>
@@ -131,6 +109,7 @@
                    backgroundColor: '#42b983',                    
                    borderColor: '#42b983'
            },
            repeatClick: false
         }
      },
      computed: {
@@ -192,6 +171,52 @@
         },
         async complete() {
            let that = this
            if(that.barcode === '' || that.barcode === null){
               uni.showToast({
                  title: "容器号为空",
                  icon: "error",
               })
               return ;
            }
            if(that.list === [] || that.list.length === 0){
               uni.showToast({
                  title: "拣货明细为空",
                  icon: "error",
               })
               return ;
            }
            that.repeatClick = true
            const {
               code,
               data,
               msg
            } = await request('/saveOutTaskSts/'+that.barcode,{}, 'get')
            if (code === 200) {
               uni.showToast({
                  title: msg,
                  icon: "success"
               })
               that.clear()
            }else if(code == 401){
               setTimeout(() => {
                  uni.removeStorageSync('token');
                  uni.reLaunch({
                     url: "/pages/login/login"
                  });
               }, 1000);
            }else {
               uni.showToast({
                  title: msg,
                  icon: "none",
                  position: 'top'
               })
            }
         that.repeatClick = false
         },
         clearCode() {
            this.barcode = ''
         },