#
whycq
2024-10-26 b4109c203742424cc795bdca9ca1e00d5602e241
pages/pakin/WarehouseOutMergeBoardMany.vue
@@ -2,66 +2,35 @@
   <view>
      <view class="code">         
         <view class="item">
            <view class="code-decs" style="width: 100%;">托盘码:{{barcode}}</view>
         </view>
         <view class="item">
            <view class="code-decs">订单号:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="barcodeFocus"
               @input="barcodeInput()">
            <view class="code-decs" style="width: 70%;">托盘码:{{barcode}}</view>
               <button size="mini" type="primary" @click="getMat">提取物料</button>
         </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="list-left-item" >
                  <view class="desc">数量:{{item.useCount}}</view>
               </view>
            </view>
            <view class="list-right">
@@ -100,7 +69,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 +147,8 @@
            orderNoList: [],
            orderNo: '',
            item:'',
            locNo:''
            locNo:'',
            mastCount: 0
         }
      },
      onLoad() {
@@ -195,6 +165,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 +405,6 @@
         comb() {
            uni.vibrateShort();
            let that = this;
            if (that.orderNo === '') {
               this.messageText = "请输入订单号"
               this.messageToggle('error')
               return;
            }
            if (that.barcode === '') {
               this.messageText = "托盘码不能为空"
               this.messageToggle('error')
@@ -434,12 +415,8 @@
               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/WarehouseOutMergeBoardMany/v1',
@@ -454,9 +431,7 @@
               success(result) {
                  var res = result.data
                  if (res.code === 200) {
                     that.orderNo = ""
                     that.dataList = []
                     // that.resst();
                     that.messageText = "并板成功"
                     that.messageToggle('success')
                  } else if (res.code == 403) {
@@ -494,10 +469,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) {
@@ -519,7 +495,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 = "修改成功"
@@ -563,7 +539,7 @@
   }
   .list:first-child {
      margin-top: 360rpx;
      margin-top: 200rpx;
   }
   .list:last-child {
@@ -581,7 +557,7 @@
   .code {
      width: 100%;
      position: fixed;
      min-height: 200rpx;
      min-height: 70rpx;
      background-color: #FFF;
      z-index: 10;
   }
@@ -589,7 +565,7 @@
   .item {
      display: flex;
      align-items: center;
      height: 100rpx;
      height: 70rpx;
      margin-left: 20rpx;
      border-bottom: 1px solid #DCDFE6;
   }
@@ -618,11 +594,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;