dengjunjie
2025-10-26 7bfa3796ce60a29c4fe2244a7b7a553149773483
н¨Îļþ¼Ð/PDA/pages/stash/outboundorderDetail.vue
@@ -40,19 +40,29 @@
            orderNo: "",
            pageNo: 1,
            scrollTop: 0,
            outTask: false,
            warehouseId: ""
         }
      },
      onLoad(res) {
         this.warehouseId = res.warehouseId;
         this.orderNo = res.orderNo;
         this.allReceivingOrders=res.detail;
         this.page = this.page + "orderNo=" + this.orderNo +"&warehouseId=" + this.warehouseId + "&locationCode=";
         this.allReceivingOrders = res.detail;
         this.page = this.page + "orderNo=" + this.orderNo + "&warehouseId=" + this.warehouseId + "&locationCode=";
         this.getData();
      },
      onReachBottom() {
         this.pageNo += 1;
         this.getData();
      },
      onShow() {
         this.outTask = uni.getStorageSync('outTask');
         if (this.outTask) {
            uni.removeStorageSync('outTask');
            this.pageNo = 1;
            // ä»Žå…¶ä»–页面返回时刷新
            this.getData();
         }
      },
      onPageScroll(e) {
         this.scrollTop = e.scrollTop;
@@ -65,6 +75,45 @@
         groupClick() {
         },
         // getData() {
         //    var postData = {
         //       MainData: {
         //          warehouseId: this.warehouseId,
         //          locationCode: this.searchValue,
         //          orderNo: this.orderNo,
         //          pageNo: this.pageNo,
         //          isCheck:false,
         //       },
         //    }
         //    if (this.pageNo == 1) this.allReceivingOrders = [];
         //    this.$u.post('/api/DeliveryOrder/GetCheckOutTasks',postData).then((
         //       res) => {
         //          if (res.status) {
         //             if (res.data.length > 0) {
         //                if (this.searchValue == '') {
         //                   this.allReceivingOrders = this.allReceivingOrders.concat(res.data);
         //                   // this.allReceivingOrders = res.data;
         //                   if (this.allReceivingOrders.length > 3) {
         //                      this.loadVisible = true;
         //                   } else {
         //                      this.loadVisible = false;
         //                   }
         //                } else {
         //                   this.allReceivingOrders = res.data;
         //                   if (this.allReceivingOrders.length > 3) {
         //                      this.loadVisible = true;
         //                   } else {
         //                      this.loadVisible = false;
         //                   }
         //                }
         //             } else {
         //                this.status = 'noMore';
         //                //this.allReceivingOrders = [];
         //                this.loadVisible = true;
         //             }
         //          }
         //       })
         // }
         getData() {
            var postData = {
               MainData: {
@@ -72,37 +121,56 @@
                  locationCode: this.searchValue,
                  orderNo: this.orderNo,
                  pageNo: this.pageNo,
                  isCheck:false,
                  isCheck: false,
               },
            }
            if (this.pageNo == 1) this.allReceivingOrders = [];
            this.$u.post('/api/DeliveryOrder/GetCheckOutTasks',postData).then((
            this.$u.post('/api/DeliveryOrder/GetCheckOutTasks', postData).then((
               res) => {
                  if (res.status) {
                     if (res.data.length > 0) {
                        if (this.searchValue == '') {
                           this.allReceivingOrders = this.allReceivingOrders.concat(res.data);
                           // this.allReceivingOrders = res.data;
                           if (this.allReceivingOrders.length > 3) {
                              this.loadVisible = true;
                           } else {
                              this.loadVisible = false;
                           }
               if (res.status) {
                  if (res.data.length > 0) {
                     if (this.searchValue == '') {
                        this.allReceivingOrders = this.allReceivingOrders.concat(res.data);
                        // this.allReceivingOrders = res.data;
                        if (this.allReceivingOrders.length > 3) {
                           this.loadVisible = true;
                        } else {
                           this.allReceivingOrders = res.data;
                           if (this.allReceivingOrders.length > 3) {
                              this.loadVisible = true;
                           } else {
                              this.loadVisible = false;
                           }
                           this.loadVisible = false;
                        }
                     } else {
                        this.status = 'noMore';
                        //this.allReceivingOrders = [];
                        this.loadVisible = true;
                        this.allReceivingOrders = res.data;
                        if (this.allReceivingOrders.length > 3) {
                           this.loadVisible = true;
                        } else {
                           this.loadVisible = false;
                        }
                     }
                  } else {
                     this.status = 'noMore';
                     //this.allReceivingOrders = [];
                     this.loadVisible = true;
                     if (this.allReceivingOrders.length < 1) {
                        uni.showModal({
                           title: '提示',
                           content: '出库已完成,是否返回首页?',
                           success: (res) => {
                              if (res.confirm) {
                                 // ç”¨æˆ·ç‚¹å‡»ç¡®å®š
                                 setTimeout(() => {
                                    uni.navigateBack({
                                       delta: 2
                                    });
                                 }, 500);
                              } else {
                                 // ç”¨æˆ·ç‚¹å‡»å–消,可以停留在当前页面
                                 // æˆ–者执行其他操作
                              }
                           }
                        });
                     }
                  }
               })
               }
            })
         }
      }
   }