helongyang
昨天 6f8fe2fc191fb466e3141a6e915d6aa63802c269
´úÂë¹ÜÀí/»´°²PDA/pages/stash/receiveorderoutbound.vue
@@ -177,6 +177,7 @@
   import {
      config
   } from '../../common/config';
import message from '../../tuniao-ui/libs/function/message';
   const innerAudioContext = uni.createInnerAudioContext();
   export default {
      data() {
@@ -230,7 +231,9 @@
            endTypeRange: [],
            sns: "",
            receiveOrderId: 0,
            warehouseId:""
            warehouseId:"",
            toastQueue: [], // æç¤ºé˜Ÿåˆ—
            isShowingToast: false
         }
      },
@@ -260,6 +263,29 @@
         }
      },
      methods: {
         showToast(options) {
                     this.toastQueue.push(options);
                     this.processToastQueue();
                 },
                 // å¤„理提示队列
                 processToastQueue() {
                     // å¦‚果正在显示提示或队列为空,则不执行
                     if (this.isShowingToast || this.toastQueue.length === 0) return;
                     this.isShowingToast = true;
                     const toastOptions = this.toastQueue.shift();
                     // æ˜¾ç¤ºæç¤º
                     this.$refs.uToast.show({
                         ...toastOptions,
                         complete: () => {
                             // æç¤ºå…³é—­åŽå¤„理下一个
                             this.isShowingToast = false;
                             this.processToastQueue();
                         }
                     });
                 },
         inputDialogToggle(itemCode) {
            this.itemCode = itemCode;
            this.$refs.inputDialog.open()
@@ -376,6 +402,35 @@
            });
         },
         submit() {
             // æå–生产日期(格式为"生产日期:YYYY-MM")
             const productionDateStr = this.ProductionDate.replace('生产日期:', '');
             if (!productionDateStr) {
               this.showToast({
                     title: "未获取到生产日期",
                     type: 'error'
                 });
                 return;
             }
             // è§£æžç”Ÿäº§æ—¥æœŸçš„年月
             const [prodYear, prodMonth] = productionDateStr.split('-').map(Number);
             // èŽ·å–å½“å‰æ—¥æœŸçš„å¹´æœˆ
             const currentDate = new Date();
             const currentYear = currentDate.getFullYear();
             const currentMonth = currentDate.getMonth() + 1;
             // æ¯”较年月是否一致
             const isDateMismatch = prodYear !== currentYear || prodMonth !== currentMonth;
             if (isDateMismatch) {
                 this.showToast({
                     title: "该物料生产日期的年月与当前年月不一致",
                     type: 'warning',
                     duration: 1500
                 });
             }
             // åŽŸæœ‰çš„ç¡®è®¤æ”¶è´§é€»è¾‘
            if (this.sns == "") {
               this.$refs.uToast.show({
                  title: "请扫描内箱标签",
@@ -396,6 +451,7 @@
                 return p1 + this.Quantity + p3;
               });
            }
            const sendRequest = () => {
            this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
               .orderNo, {}).then(res => {
               if (res.status) {
@@ -423,6 +479,14 @@
                  })
               }
            })
            };
            // å¦‚果有日期不匹配提示,等待提示完成后发送请求
            if (isDateMismatch) {
                setTimeout(sendRequest, 1500); // ç­‰å¾…1.5秒(与提示时长一致)
            } else {
                sendRequest(); // æ²¡æœ‰æ—¥æœŸæç¤ºï¼Œç«‹å³å‘送请求
            }
         },
         submit1() {
            this.$u.post('/api/ReceiveOrder/FeedbackReceiveOrder?orderId=' + this