12
zhang
2025-06-27 34e81b3d0fe9ae1e9edd4fd8bcdaf7ec69b7f239
pages/stock/stockCheck.vue
@@ -5,19 +5,10 @@
            <view class="code-decs">托盘码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
               @input="search()">
         </view>
         <view class="item">
            <view class="code-decs">物料码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()">
            <view class="item-right">
               <button></button>
               <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text>
               <uni-icons type="right" color="#c1c1c1"></uni-icons>
            </view>
         </view>
         </view>
      </view>
      <view class="mat-list-title">
         商品列表
         物料列表
      </view>
      <scroll-view>
         <view class="list" v-for="(item,i) in dataList" :key="i">
@@ -43,12 +34,18 @@
               <view class="list-left-item">
                  <view class="desc">批号:</view>
                  <view class="left-item">
                     <uni-tag :text="item.batch" type="warning"></uni-tag>
                     {{item.batch}}
                  </view>
               </view>
               <view class="list-left-item">
                  <view class="desc">数量:</view>
                  <view class="left-item">{{item.anfme}}</view>
                  <view class="desc">库存:</view>
                  <view class="left-item">
                     {{item.anfme}}
                  </view>
               </view>
               <view class="list-left-item">
                  <view class="desc">盘点:</view>
                  <view class="left-item">{{item.checkAnfme}}</view>
               </view>
            </view>
            <view class="list-right">
@@ -78,8 +75,9 @@
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">批号:</view>
                  <view class="popup-item-right"><input type="text" v-model="batch"></view>
               </view>
                  <view class="popup-item-right"><input type="text" v-model="batch" disabled="true"
                        style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;"></view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">数量:</view>
                  <view class="popup-item-right" style="border: none;justify-content: center;">
@@ -162,8 +160,11 @@
         // 根据托盘码搜索
         search() {
            let that = this
            if(that.barcode === "" || that.barcode === null || that.barcode === ''){
               return
            }
            uni.request({
               url: that.baseUrl + '/mobile/checkDetl/auth2',
               url: that.baseUrl + '/inventoryCheckOrder/StockCheck/select/barcode',
               header: {
                  'token':uni.getStorageSync('token')
               },
@@ -184,6 +185,7 @@
                        });
                     }, 1000);
                  } else {
                     that.dataList = []
                     uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }
               }
@@ -323,7 +325,7 @@
         // 修改批号
         revise(item, i) {
            this.matnr = this.dataList[i].matnr
            this.count = this.dataList[i].anfme
            this.count = this.dataList[i].checkAnfme
            this.batch = this.dataList[i].batch
            this.rowNum = i
            this.eject()
@@ -350,7 +352,7 @@
            this.$refs.alertDialog.close()
         },
         reviseConfirm() {
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].checkAnfme = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.messageText = "修改成功"
            this.messageToggle('success')
@@ -396,12 +398,20 @@
         },
         adjust() {
            let that = this
            for (var i = 0; i < that.dataList.length; i++) {
               if (that.dataList[i].checkAnfme == 0 || that.dataList[i].checkAnfme == '' || that.dataList[i].checkAnfme == null) {
                  this.messageText = that.dataList[i].matnr + '盘点数量不能为0'
                  this.messageToggle('error')
                  return;
               }
            }
            var combMats = []
            var combParam = {}
            combParam['barcode'] = that.barcode
            combParam['wrkDetls'] = that.dataList
            combParam['param'] = that.dataList
            uni.request({
               url: that.baseUrl + '/mobile/adjustNew/auth',
               url: that.baseUrl + '/mobile/pda/adjust/auth',
               method: 'POST',
               data: JSON.stringify(combParam),
               header: {
@@ -436,7 +446,7 @@
   .code {
      width: 100%;
      position: fixed;
      min-height: 200rpx;
      min-height: 100rpx;
      background-color: #FFF;
      z-index: 10;
   }
@@ -476,10 +486,21 @@
      width: 100%;
      background-color: white;
      position: fixed;
      margin-top: 200rpx;
      margin-top: 100rpx;
      z-index: 9;
      /* border-top: 1px solid #DCDFE6; */
      text-align: center;
      box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
   }
   .list {
      display: flex;
      min-height: 80rpx;
      background-color: #FFF;
      margin: 20rpx 20rpx;
      border-radius: 20rpx;
      box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
   }
   .list:first-child {
      margin-top: 250rpx;
   }
</style>