skyouc
2025-05-04 668e5ccf4d4f162800c67d94e6bbb9d4a2fd5cfb
pages/rece/other.vue
@@ -3,9 +3,9 @@
      <form>
         <view class="cu-form-group margin-top" v-show="!isconfirm">
            <view class="title">ASN单号</view>
            <input placeholder="请扫描ASN单号" v-model="asncode" focus></input>
            <input placeholder="请扫描ASN单号" v-model="asncode" @input="search" focus></input>
            <text class='cuIcon-close text-gray margin-right-xs' v-show="asncode!==''" @click="clearCode"></text>
            <text class='cuIcon-search text-blue' @click="search"></text>
            <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
         </view>
         <view class="cu-form-group" v-show="!isconfirm">
            <view class="title">物料标签</view>
@@ -60,9 +60,6 @@
                     <text class="text-black">实时库存: <text class="text-grey ">{{item.stockQty}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
                  <view class="content">
                     <text class="text-black">平台行号: <text class="text-grey ">{{item.platformId}}</text></text>
@@ -71,7 +68,6 @@
                     <text class="text-black">质检结果: <text class="text-grey ">{{item.inspect}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
                  <view class="content">
                     <text class="text-black">采购单位:<text class="text-grey ">{{item.purUnit}}</text></text>
@@ -80,7 +76,6 @@
                     <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
                  <view class="content">
                     <text class="black">计划收货数量:<text class="text-grey ">{{item.anfme}}</text></text>
@@ -90,21 +85,19 @@
                     <text class="black">已收货数量:<text class="text-grey ">{{item.qty}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
                  <view class="content" v-if="!isconfirm">
                     <view class="cu-form-group padding-lr-0">
                        <view class="title text-blue"><text
                              class="text-red text-xl vertical-middle">*</text>收货数量:</view>
                        <input type="number" placeholder="请输入数量" v-model="item.receiptQty"></input>
                        <uni-number-box style="width: 70%;" v-model="item.receiptQty"
                           :step='1'></uni-number-box>
                     </view>
                  </view>
                  <view class="content" v-else>
                     <text class="text-black">收货数量:<text class="text-grey ">{{item.receiptQty}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
                  <view class="content" v-if="!isconfirm">
                     <view class="cu-form-group padding-lr-0">
@@ -133,7 +126,6 @@
                     <text class="text-black">生产日期:<text class="text-grey ">{{item.prodTime}}</text></text>
                  </view>
               </view>
               <view class="cu-item grid  col-1" v-if="!isconfirm">
                  <view v-for="el in dynamicFields" :key="el.id">
                     <view class="cu-form-group padding-lr-0">
@@ -142,16 +134,12 @@
                     </view>
                  </view>
               </view>
               <view class="cu-item grid  col-2" v-if="isconfirm">
                  <view class="item" v-for="el in dynamicFields" :key="el.id">
                     <text class="text-black">{{el.fieldsAlise}}:
                        <text class="text-grey ">{{item[el.fields]}}</text></text>
                  </view>
               </view>
            </view>
         </block>
      </view>
@@ -166,7 +154,6 @@
            @change="selChange"></uni-data-select>
      </view>
      <view class="cu-bar btn-group foot" v-show="!isconfirm">
         <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
         <button class="cu-btn bg-blue shadow-blur" @click="next">下一步</button>
@@ -174,8 +161,7 @@
      <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(true)">收货并完成</button>
         <button class="cu-btn bg-blue shadow-blur" @click="confirm(false)">收货</button>
         <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm(false)">收货</button>
      </view>
   </view>
@@ -199,6 +185,7 @@
            whAreaId: '',
            list: [],
            range: [],
            repeatClick: false,
            isconfirm: false
         }
      },
@@ -250,7 +237,7 @@
            this.list = []
            this.barcode = ''
         },
         next() {
         next(event) {
            if (this.list.length) {
               this.isconfirm = true
            } else {
@@ -264,6 +251,8 @@
            this.isconfirm = false
         },
         selChange(val) {
            console.log('-------->')
            console.log(val)
            uni.setStorageSync('whAreaId', val)
         },
         async complete(id) {
@@ -298,7 +287,7 @@
                  };
               }).filter(el => el.receiptQty !== 0);
               this.repeatClick = true
               const {
                  code,
                  data,
@@ -314,15 +303,16 @@
                  })
                  this.list = []
                  this.barcode = ''
                  this.isconfirm = false
                  this.isconfirm = false
                  this.repeatClick = false
                  isCom && this.complete(data.id)
               } else {
                  uni.showToast({
                     title: msg,
                     icon: "none",
                  })
                  this.repeatClick = false
               }
            }
         },
         async getRece() {
@@ -334,7 +324,7 @@
            if (code === 200) {
               this.range = data.map(item => ({
                  value: item.id,
                  text: item.name
                  text: item.warehouseId$ + "-- " + item.name
               }));
            }
         },