| | |
| | | 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; |
| | |
| | | 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: { |
| | |
| | | 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 { |
| | | // ç¨æ·ç¹å»åæ¶ï¼å¯ä»¥åçå¨å½åé¡µé¢ |
| | | // æè
æ§è¡å
¶ä»æä½ |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |