yanjinhui
2025-12-01 2b49f7643d15b74889d190f216630559006ed93a
н¨Îļþ¼Ð/PDA/pages/stash/CheckFinish.vue
@@ -438,6 +438,69 @@
               }
            })
         },
         // submit() {
         //    if (this.barcode == "") {
         //       this.$refs.uToast.show({
         //          title: "请扫描货位编号",
         //          type: 'error'
         //       })
         //       return;
         //    }
         //    if (this.materSn.length == 0) {
         //       this.$refs.uToast.show({
         //          title: "请输入实盘数量",
         //          type: 'error'
         //       })
         //       return;
         //    }
         //    this.$u.post('/api/DeliveryOrder/CheckFinish', {
         //       MainData: {
         //          "locationCode": this.barcode,
         //          "taskId":this.taskId,
         //          // "warehouseCode": this.warehouseId,
         //          // "orderNo": this.orderNo,
         //          "qty": this.materSn,
         //          // "batchNo": this.batchNo,
         //       },
         //       // DelKeys: this.sns
         //    }).then(res => {
         //       this.Testcheck = false;
         //       if (res.status) {
         //          this.$refs.uToast.show({
         //             title: "盘点成功",
         //             type: "success"
         //          })
         //          // this.Inqty=res.message;
         //          // this.order_Inqty="已出库数量:"+this.Inqty;
         //          this.barcode="";
         //          // uni.setStorageSync('checkTask',true);
         //    //关键修改:使用 getCurrentPages èŽ·å–å‰ä¸€ä¸ªé¡µé¢å¹¶ç›´æŽ¥è°ƒç”¨å…¶æ–¹æ³•   Y
         //    const pages = getCurrentPages();
         //    const prevPage = pages[pages.length - 2]; // èŽ·å–ä¸Šä¸€ä¸ªé¡µé¢å®žä¾‹
         //    console.log('前一个页面:', prevPage);
         //    if (prevPage && prevPage.refreshData) {
         //       // ç›´æŽ¥è°ƒç”¨ä¸Šä¸€ä¸ªé¡µé¢çš„刷新方法
         //       prevPage.refreshData();
         //       console.log('已调用前一个页面的盘点刷新方法');
         //    }
         //    setTimeout(() => {
         //              uni.navigateBack({
         //                  delta: 1
         //              });
         //          }, 300);
         //          // this.materSn="";
         //       } else {
         //          this.$refs.uToast.show({
         //             title: res.message,
         //             type: "error"
         //          })
         //       }
         //    })
         // }
         submit() {
            if (this.barcode == "") {
               this.$refs.uToast.show({
@@ -453,16 +516,20 @@
               })
               return;
            }
    // æ–°å¢žäºŒæ¬¡ç¡®è®¤é€»è¾‘
    uni.showModal({
        title: '确认盘点',
        content: '您确定要提交盘点信息吗?',
        success: (res) => {
            if (res.confirm) {
                // ç”¨æˆ·ç‚¹å‡»ç¡®å®šï¼Œæ‰§è¡ŒåŽŸæœ‰çš„æäº¤é€»è¾‘
            this.$u.post('/api/DeliveryOrder/CheckFinish', {
               MainData: {
                  "locationCode": this.barcode,
                  "taskId":this.taskId,
                  // "warehouseCode": this.warehouseId,
                  // "orderNo": this.orderNo,
                  "qty": this.materSn,
                  // "batchNo": this.batchNo,
               },
               // DelKeys: this.sns
            }).then(res => {
               this.Testcheck = false;
               if (res.status) {
@@ -470,16 +537,24 @@
                     title: "盘点成功",
                     type: "success"
                  })
                  // this.Inqty=res.message;
                  // this.order_Inqty="已出库数量:"+this.Inqty;
                  this.barcode="";
                  // uni.setStorageSync('checkTask',true);
                        // å…³é”®ä¿®æ”¹ï¼šä½¿ç”¨ getCurrentPages èŽ·å–å‰ä¸€ä¸ªé¡µé¢å¹¶ç›´æŽ¥è°ƒç”¨å…¶æ–¹æ³•
                        const pages = getCurrentPages();
                        const prevPage = pages[pages.length - 2]; // èŽ·å–ä¸Šä¸€ä¸ªé¡µé¢å®žä¾‹
                        console.log('前一个页面:', prevPage);
                        if (prevPage && prevPage.refreshData) {
                            // ç›´æŽ¥è°ƒç”¨ä¸Šä¸€ä¸ªé¡µé¢çš„刷新方法
                            prevPage.refreshData();
                            console.log('已调用前一个页面的盘点刷新方法');
                        }
                  setTimeout(() => {
                      uni.navigateBack({
                          delta: 1
                      });
                  }, 300);
                  // this.materSn="";
               } else {
                  this.$refs.uToast.show({
                     title: res.message,
@@ -487,8 +562,14 @@
                  })
               }
            })
            } else {
                // ç”¨æˆ·ç‚¹å‡»å–消,不做任何操作
         }
      }
    });
}
      }
   }
</script>