#
whycq
2023-09-18 a8c82932da9385506ace3f7aa78856b306924515
pages/stock/stockCheck_pick.vue
@@ -5,15 +5,6 @@
            <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 class="mat-list-title">
         商品列表
@@ -36,18 +27,12 @@
                  <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 class="list-left-item">
                  <view class="desc">批号:</view>
                  <view class="left-item">
                     <uni-tag :text="item.batch" type="warning"></uni-tag>
                  </view>
                  <view class="desc">日期:</view>
                  <view class="left-item">{{item.date}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">数量:</view>
                  <view class="left-item">{{item.anfme}}</view>
                  <view class="left-item">{{item.count}}</view>
               </view>
            </view>
            <view class="list-right">
@@ -76,13 +61,15 @@
                  </view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">批号:</view>
                  <view class="popup-item-right"><input type="text" v-model="batch"></view>
                  <view class="popup-item-left">日期:</view>
                  <view class="popup-item-right">
                     <uni-datetime-picker type="date" v-model="date" />
                  </view>
               </view>
               <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" :max="9999999" color="#747474" @change="changeValue" />
                     <uni-number-box :value="count" :max="maxAnfme" color="#747474" @change="changeValue" />
                  </view>
               </view>
               <view class="btn">
@@ -142,7 +129,9 @@
            content: '',
            barcodeFocus: true,
            matFocus: false,
            matData: ''
            matData: '',
            maxAnfme: 0,
            date: ''
         }
      },
      onLoad() {
@@ -161,19 +150,18 @@
         search() {
            let that = this
            uni.request({
               url: that.baseUrl + '/mobile/checkDetl/auth2',
               header: {
                  'token': uni.getStorageSync('token')
               },
               data: {
                  barcode: that.barcode
               },
               url: that.baseUrl + '/mobile/comb/form/barcode',
               header: { 'token': uni.getStorageSync('token') },
               data: { barcode: that.barcode },
               method: 'GET',
               success(res) {
                  console.log(res);
                  res = res.data
                  if (res.code === 200) {
                     for (var i = 0; i < res.data.length; i++) {
                        res.data[i]['maxAnfme'] = res.data[i].anfme
                        res.data[i]['matNo'] = res.data[i].matnr
                        res.data[i]['count'] = res.data[i].anfme
                        res.data[i]['date'] = res.data[i].date ? res.data[i].date : ''
                        that.dataList.push(res.data[i])
                     }
                  } else if (res.code == 403) {
@@ -332,8 +320,10 @@
         // 修改批号
         revise(item, i) {
            this.matnr = this.dataList[i].matnr
            this.count = this.dataList[i].anfme
            this.count = this.dataList[i].count
            this.batch = this.dataList[i].batch
            this.maxAnfme = this.dataList[i].maxAnfme
            this.date = this.dataList[i].date
            this.rowNum = i
            this.eject()
         },
@@ -359,8 +349,9 @@
            this.$refs.alertDialog.close()
         },
         reviseConfirm() {
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].count = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.dataList[this.rowNum].date = this.date
            this.messageText = "修改成功"
            this.messageToggle('success')
            this.$refs.revise.close()
@@ -408,9 +399,9 @@
            var combMats = []
            var combParam = {}
            combParam['barcode'] = that.barcode
            combParam['wrkDetls'] = that.dataList
            combParam['combMats'] = that.dataList
            uni.request({
               url: that.baseUrl + '/mobile/adjustNew/auth',
               url: that.baseUrl + '/mobile/comb/form/pickingMaterials',
               method: 'POST',
               data: JSON.stringify(combParam),
               header: {
@@ -454,6 +445,9 @@
<style>
   @import url('../../static/css/wms.css/wms.css');
   .list:first-child {
      margin-top: 220rpx;
   }
   .code {
      width: 100%;
      position: fixed;