wangxinhui
2025-04-08 dcecb039035f4b2e82e31c39b74db9402444c536
´úÂë¹ÜÀí/»´°²PDA/pages/stash/receiveorderoutbound.vue
@@ -8,7 +8,7 @@
               <uni-forms-item :label="label" style="margin-top: -20px;"></uni-forms-item>
               <!-- <uni-forms-item label="单据类型:生产领料单" style="margin-top: -20px;"></uni-forms-item> -->
               <uni-forms-item label="内箱码:" style="margin-top: -20px;">
                  <uni-easyinput type="text" placeholder="请扫描内箱码" ref='midInput' :focus="focus"
                  <uni-easyinput type="text" placeholder="请扫描内箱码" ref='midInput' :focus="!focus"
                     v-model="innerCode" @input="innercodeInput" />
               </uni-forms-item>
               <uni-forms-item :label="PurchaseOrderNo" style="margin-top: -20px;"></uni-forms-item>
@@ -22,10 +22,19 @@
               </uni-forms-item>
            </uni-forms>
            <uni-forms-item>
               <button @click="submit" type="primary" size="default" style="margin-top: 2%;">确认收货</button>
               <view class="uni-flex uni-row" style="justify-content: space-between;margin-top: 2%;height: 45px;width: 520rpx;margin: 0px auto;">
                  <view>
                     <button @click="resetReceive" type="default" size="default" style="width: 200rpx;border: 1rpx solid #007aff;color: #007aff;">重置</button>
                  </view>
                  <view>
                     <button @click="submit" type="primary" size="default" style="width: 220rpx;">确认收货</button>
                  </view>
               </view>
            </uni-forms-item>
            <uni-forms-item>
               <button @click="submit1" type="primary" size="default" style="margin-top: 2%;">完成收货</button>
               <view style="margin-top: 2%;height: 45px;width: 520rpx;margin: 0px auto;">
                  <button @click="submit1" type="primary" size="default" style="margin-top: 2%;backgroundColor:#1AAD19;borderColor:#1AAD19">完成收货</button>
               </view>
            </uni-forms-item>
         </view>
      </view>
@@ -43,15 +52,15 @@
               </uni-forms-item>
            </uni-forms> -->
            <uni-list :border="true">
               <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="item.id">
               <uni-list-item direction="column" v-for="item in orderinfoDetails" :key="item.id">
                  <template v-slot:body>
                        <view class="uni-content">
                           <view style="font-size: 18px;">收货单号:{{orderNo}}</view>
                           <view style="font-size: 18px;">采购单号:{{item.purchaseOrderNo}}</view>
                           <view style="font-size: 18px;">物料编号:{{item.materielCode}}</view>
                           <view style="font-size: 18px;">批次号:{{item.lotNo}}</view>
                           <view style="font-size: 18px;">收货数量:{{item.receivedQuantity}}</view>
                           <view style="font-size: 18px;">是否质检:{{item.ifInspection==1?"是":"否"}}</view>
                           <view>收货单号:{{orderNo}}</view>
                           <view>采购单号:{{item.purchaseOrderNo}}</view>
                           <view>物料编号:{{item.materielCode}}</view>
                           <view>批次号:{{item.lotNo}}</view>
                           <view>收货数量:{{item.receivedQuantity}}</view>
                           <view>是否质检:{{item.ifInspection==1?"是":"否"}}</view>
                        </view>
                  </template>
               </uni-list-item>
@@ -175,6 +184,7 @@
            current: 0,
            orderNo: "",
            orderInfo: [],
            orderinfoDetails:[],
            label: "",
            innerCode: "",
            PurchaseOrderNo: "采购单号:",
@@ -191,7 +201,7 @@
            remaindQty: "实际数量:",
            tagFocus: true,
            numberFocus: false,
            focus: true,
            focus: false,
            tag: "",
            number: "",
            tagmatCode: "物料编码:",
@@ -218,6 +228,7 @@
            endTypeRange: [],
            sns: "",
            receiveOrderId: 0,
            warehouseId:""
         }
      },
@@ -233,6 +244,7 @@
         this.orderNo = res.orderNo;
         this.receiveOrderId = res.receiveOrderId;
         this.label = "收货单号:" + this.orderNo;
         this.warehouseId=res.warehouseId;
         this.getData();
      },
      mounted() {
@@ -256,6 +268,19 @@
         },
         search() {
            this.getData();
         },
         resetReceive(){
            this.PurchaseOrderNo="采购单号:";
            this.matCode="物料编码:";
            this.LotNo="物料批次:";
            this.orderQty="订单数量:";
            this.ProductionDate="生产日期:";
            this.EffectiveDate="有效日期:";
            this.Quantity="";
            setTimeout(() => {
               this.innerCode="";
               this.focus=false;
            }, 10);
         },
         releasebox() {
            if (this.releasevalue.length == 0) {
@@ -363,15 +388,32 @@
               })
               return;
            }
            if(this.warehouseId==2){
               //替换指定两个字符间的字符
               this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => {
                 return p1 + this.Quantity + p3;
               });
            }
            this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
               .orderNo, {}).then(res => {
               if (res.status) {
                  this.PurchaseOrderNo="采购单号:";
                  this.matCode="物料编码:";
                  this.LotNo="物料批次:";
                  this.orderQty="订单数量:";
                  this.ProductionDate="生产日期:";
                  this.EffectiveDate="有效日期:";
                  this.Quantity="";
                  setTimeout(() => {
                     this.innerCode="";
                     this.focus=false;
                  }, 100);
                  this.orderInfo=[];
                  this.sns = "";
                  this.$refs.uToast.show({
                     title: "确认收货成功",
                     type: "success"
                  })
                  this.orderInfo=[];
                  this.sns = "";
               } else {
                  this.$refs.uToast.show({
                     title: res.message,
@@ -446,6 +488,7 @@
            })
         },
         onClickItem(e) {
            console.log(1)
            this.focus = false;
            this.addressFocus = false;
            if (this.current !== e.currentIndex) {
@@ -464,8 +507,8 @@
            }
            this.$u.post('/api/ReceiveOrderDetail/GetReceiveOrderInfos', postData).then((res) => {
               if (res.status) {
                  this.orderInfo = res.data;
                  if (this.orderInfo.length > 3) {
                  this.orderinfoDetails = res.data;
                  if (this.orderinfoDetails.length > 3) {
                     this.loadVisible = true;
                  }
               }
@@ -479,7 +522,8 @@
               var innerCode = this.innerCode;
               setTimeout(() => {
                  this.innerCode = "";
               }, 10);
                  this.focus=true;
               }, 1);
               this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + innerCode, {}).then((res) => {
                  if (res.status) {
@@ -493,16 +537,6 @@
                     this.ProductionDate = "生产日期:" + res.data.productionDate;
                     this.orderQty = "订单数量:" + res.data.quantity;
                     this.Quantity = res.data.quantity;
                     if (res.message) {
                        this.$refs.uToast.show({
                           title: res.message,
                           type: "error"
                        })
                        setTimeout(() => {
                           this.voiceSpeech('../../static/fail.mp3');
                        }, 100);
                        return;
                     }
                     setTimeout(() => {
                        this.voiceSpeech('../../static/success.mp3');
                     }, 100);