dengjunjie
6 天以前 1c8f0035e164e9780d8c35a32fc1524d67ff9d9d
н¨Îļþ¼Ð/PDA/pages/stash/outboundorderDetail.vue
@@ -1,21 +1,22 @@
<template>
   <view>
      <!-- <u-sticky>
      <u-sticky>
         <view style="background-color: #ffffff;">
            <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
         </view>
      </u-sticky> -->
      </u-sticky>
      <uni-list :border="true">
         <uni-list-item direction="column" clickable @click="groupClick(item.batch_num)" link
            :to="page+item.batch_num+'&order_qty='+item.order_qty+'&order_Inqty='+item.order_Outqty+'&goods_no='+item.goods_no"
            v-for="item in allReceivingOrders" :key="item.batch_num">
         <uni-list-item direction="column" clickable @click="groupClick(item.locationCode)" link
            :to="page+item.locationCode+'&stockQuantity='+item.stockQuantity+'&taskId='+item.taskId+'&materielCode='+item.materielCode+'&batchNo='+item.batchNo+'&materielName='+item.materielName"
            v-for="item in allReceivingOrders" :key="item.locationCode">
            <template v-slot:body>
               <uni-group margin-top="20">
                  <view> å•据编号:{{orderNo}} </view>
                  <view> æ‰¹å·:{{item.batch_num}} </view>
                  <view> ç‰©æ–™ç¼–号:{{item.goods_no}} </view>
                  <view> å•据数量:{{item.order_qty}} </view>
                  <view> å‡ºåº“数量:{{item.order_Outqty}} </view>
                  <view> æ‰¹å·:{{item.batchNo}} </view>
                  <view> ç‰©æ–™ç¼–号:{{item.materielCode}} </view>
                  <!-- <view> ç‰©æ–™åç§°:{{item.materielName}} </view> -->
                  <view> è´§ä½ç¼–号:{{item.locationCode}} </view>
                  <view> æ•°é‡:{{item.stockQuantity}} </view>
               </uni-group>
            </template>
         </uni-list-item>
@@ -31,7 +32,7 @@
   export default {
      data() {
         return {
            page: "/pages/stash/Outorderboxing?",
            page: "/pages/stash/outFinish?",
            loadVisible: false,
            searchValue: "",
            status: "more",
@@ -39,19 +40,30 @@
            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 + "&batchNo=";
         this.getData();
         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.allReceivingOrders = [];
            // ä»Žå…¶ä»–页面返回时刷新
            this.getData();
         // }
      },
      onPageScroll(e) {
         this.scrollTop = e.scrollTop;
@@ -64,42 +76,103 @@
         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: {
            //       warehouseId: this.warehouseId,
            //       orderNo: this.searchValue,
            //       pageNo: this.pageNo
            //    },
            // }
            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/GetDeliveryOrderDetail?pageNo=' + this.warehouseId + '&orderNo=' + this.orderNo+'&isPick=false').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) {
                                 // uni.getStorageSync('isout',true)
                     //             // ç”¨æˆ·ç‚¹å‡»ç¡®å®š
                                 setTimeout(() => {
                                    uni.navigateBack({
                                       delta: 1
                                    });
                                 }, 300);
                     //          } else {
                     //             // ç”¨æˆ·ç‚¹å‡»å–消,可以停留在当前页面
                     //             // æˆ–者执行其他操作
                     //          }
                     //       }
                     //    });
                     }
                  }
               })
               }
            })
         }
      }
   }