#
whycq
2024-10-26 b4109c203742424cc795bdca9ca1e00d5602e241
pages/pakin/WarehousePickOutParallelBoard.vue
@@ -2,66 +2,40 @@
   <view>
      <view class="code">         
         <view class="item">
            <view class="code-decs" style="width: 100%;">库位号:{{locNo}}</view>
            <view class="code-decs" style="width: 70%;">库位号:{{locNo}}</view>
               <button size="mini" type="primary" @click="getMat">提取物料</button>
         </view>
         <view class="item">
         <!-- <view class="item">
            <view class="code-decs">订单号:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="barcodeFocus"
               @input="barcodeInput()">
         </view>
         </view> -->
      </view>
      <view class="mat-list-title">
         <view style="margin-top: 5px;">商品列表</view>
         <view>
            <button size="mini" type="primary" @click="getChecked">提取</button>
            <!-- <button style="margin-left: 10px;" size="mini" type="primary" @click="reset()">清空</button> -->
         </view>
      </view>
      <scroll-view>
         <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange">
            <view class="aside">
               <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/>
            </view>
            <view class="list-left" style="margin: 0;">
               <view class="list-left-item">
                  <view class="desc">No:</view>
                  <view class="left-item">{{i + 1}}</view>
                  <view class="desc">No:{{i + 1}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">订单号:</view>
                  <view class="left-item">
                     <uni-tag :text="item.orderNo" type="primary"></uni-tag>
                  </view>
                  <view class="desc">订单号:{{item.orderNo}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">料号:</view>
                  <view class="left-item">
                     <uni-tag :text="item.matnr" type="primary"></uni-tag>
                  </view>
                  <view class="desc">料号:{{item.matnr}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">名称:</view>
                  <view class="left-item">{{item.maktx}}</view>
                  <view class="desc">批号:{{item.batch}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">规格:</view>
                  <view class="left-item">{{item.specs}}</view>
                  <view class="desc">可用数量:{{item.count}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">批号:</view>
                  <view class="left-item">
                     <uni-tag :text="item.batch" type="warning"></uni-tag>
                  </view>
               </view>
               <!-- <view class="list-left-item">
                  <view class="desc">重量:</view>
                  <view class="left-item">
                     <uni-tag :text="item.weight" type="warning"></uni-tag>
                  </view>
               </view> -->
               <view class="list-left-item">
                  <view class="desc">数量:</view>
                  <view class="left-item">{{item.anfme}}</view>
                  <view class="desc">数量:{{item.useCount}}</view>
               </view>
            </view>
            <view class="list-right">
@@ -100,7 +74,7 @@
               <view class="popup-item">
                  <view class="popup-item-left">数量:</view>
                  <view class="popup-item-right" style="border: none;justify-content: center;">
                     <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474"
                     <uni-number-box :value="count" :step='1' :max="mastCount" color="#747474"
                        @change="changeValue" />
                  </view>
               </view>
@@ -178,7 +152,8 @@
            orderNoList: [],
            orderNo: '',
            item:'',
            locNo:''
            locNo:'',
            mastCount: 0
         }
      },
      onLoad() {
@@ -195,6 +170,22 @@
         this.getOrderNoList()
      },
      methods: {
         getMat() {
            let _this = this
            uni.navigateTo({
               url: '../order/pickOrderList',
               success(res) {
                  res.eventChannel.emit('matList', {
                     matList: _this.dataList
                  })
               },
               events: {
                  sMat: function(data) {
                     _this.dataList.push(data.data)
                  }
               }
            })
         },
         set(e) {
            var ck = this.dataList[e].checked
            this.dataList[e].checked = ck ? false:true
@@ -419,11 +410,11 @@
         comb() {
            uni.vibrateShort();
            let that = this;
            if (that.orderNo === '') {
               this.messageText = "请输入订单号"
               this.messageToggle('error')
               return;
            }
            // if (that.orderNo === '') {
            //    this.messageText = "请输入订单号"
            //    this.messageToggle('error')
            //    return;
            // }
            if (that.locNo === '') {
               this.messageText = "库位号不能为空"
               this.messageToggle('error')
@@ -434,18 +425,14 @@
               this.messageToggle('error')
               return;
            }
            for (var i = 0; i < that.dataList.length; i++) {
               if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
                  this.messageText = that.dataList[i].matnr + '数量不能为0'
                  this.messageToggle('error')
                  return;
               }
            for (let item of this.dataList) {
               item['anfme'] = item.useCount
            }
            uni.request({
               url: that.baseUrl + '/mobile/pda/WarehouseOutPickMerge/v1',
               data: JSON.stringify({
                  locNo: that.locNo,
                  orderNo: that.orderNo,
                  // orderNo: that.orderNo,
                  combMats: that.dataList
               }),
               method: 'POST',
@@ -495,10 +482,11 @@
         // 修改批号
         revise(item, i) {
            this.matnr1 = this.dataList[i].matnr
            this.count = this.dataList[i].anfme
            this.count = this.dataList[i].useCount
            this.batch = this.dataList[i].batch
            this.weight = this.dataList[i].weight
            this.rowNum = i
            this.mastCount = this.dataList[i].count
            this.eject()
         },
         eject(type) {
@@ -520,7 +508,7 @@
            this.dataList.splice(this.removeNum, 1)
         },
         reviseConfirm() {
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].useCount = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.dataList[this.rowNum].weight = this.weight
            this.messageText = "修改成功"
@@ -537,7 +525,6 @@
         // 清空
         resst() {
            this.dataList = []
            this.locNo = ''
            this.barcodeFocuss()
         },
         combClose() {
@@ -564,7 +551,7 @@
   }
   .list:first-child {
      margin-top: 360rpx;
      margin-top: 200rpx;
   }
   .list:last-child {
@@ -582,7 +569,7 @@
   .code {
      width: 100%;
      position: fixed;
      min-height: 200rpx;
      min-height: 70rpx;
      background-color: #FFF;
      z-index: 10;
   }
@@ -590,7 +577,7 @@
   .item {
      display: flex;
      align-items: center;
      height: 100rpx;
      height: 70rpx;
      margin-left: 20rpx;
      border-bottom: 1px solid #DCDFE6;
   }
@@ -619,11 +606,11 @@
   .mat-list-title {
   /*    display: flex;
      align-items: center; */
      height: 120rpx;
      height: 60rpx;
      width: 100%;
      background-color: white;
      position: fixed;
      margin-top: 200rpx;
      margin-top: 70rpx;
      z-index: 9;
      /* border-top: 1px solid #DCDFE6; */
      text-align: center;