skyouc
2025-05-05 6be8b9f43be3670473ddfaebafe18a1be644ca1d
pages/rece/standard.vue
@@ -1,10 +1,10 @@
<template>
   <view class="has-foot">
      <form>
         <view class="cu-form-group margin-top" v-show="!isconfirm">
         <view class="cu-form-group" v-show="!isconfirm">
            <view class="title">物料标签</view>
            <input placeholder="请扫描物料标签" v-model="barcode" focus></input>
            <text class='cuIcon-close text-gray margin-right-xs' v-show="asncode!==''" @click="clearCode"></text>
            <input placeholder="请扫描物料标签" v-model="barcode" @input="search()" focus></input>
            <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
            <text class='cuIcon-search text-blue' @click="search"></text>
         </view>
@@ -52,9 +52,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>
@@ -63,7 +60,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>
@@ -72,15 +68,19 @@
                  <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text>
               </view>
            </view>
            <view class="cu-item">
               <view class="content">
                  <text class="text-blue">计划收货数量:<text class="text-grey ">{{item.anfme}}</text></text>
               </view>
               <view class="content">
                  <text class="text-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">收货数量:</view>
                     <input type="number" placeholder="请输入收货数量" v-model="item.receiptQty"></input>
                     <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty" :step='1'></uni-number-box>
                  </view>
               </view>
               <view class="content" v-else>
@@ -156,7 +156,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">提交收货</button>
         <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">提交收货</button>
      </view>
   </view>
@@ -179,7 +179,9 @@
            whAreaId: '',
            list: [],
            range: [],
            isconfirm: false
            isconfirm: false,
            repeatClick: false,
            max: 99999999
         }
      },
      computed: {
@@ -199,7 +201,22 @@
               msg
            } = await request('/orders/' + this.barcode, {}, "get")
            if (code === 200) {
               if (Object.keys(data).length === 0) {
                  uni.showToast({
                     title: "该标签未查询到数据",
                     icon: "none",
                     position: 'top'
                  })
               }
               this.list.push(...data)
            } else if (code == 401) {
               setTimeout(() => {
                  uni.removeStorageSync('token');
                  uni.reLaunch({
                     url: "/pages/login/login"
                  });
               }, 1000);
            } else {
               uni.showToast({
                  title: msg,
@@ -211,7 +228,7 @@
         },
         clearCode() {
            this.asncode = ''
            this.barcode = ''
         },
         remove(index) {
            this.list.splice(index, 1);
@@ -249,6 +266,7 @@
                  title: '请选择收货区'
               })
            } else {
               this.repeatClick = true
               const {
                  code,
                  data,
@@ -271,7 +289,7 @@
                     position: 'top'
                  })
               }
               this.repeatClick = false
            }
         },
         async getRece() {