| | |
| | | v-for="item in allReceivingOrders" :key="item.locationCode"> |
| | | <template v-slot:body> |
| | | <uni-group margin-top="20"> |
| | | <view> åæ®ç¼å·:{{orderNo}} </view> |
| | | <view> æ¹å·:{{item.batchNo}} </view> |
| | | <view> ç©æåç§°:{{item.materielName}} </view> |
| | | <view> åå/éç¨å:{{item.item || ''}} </view> |
| | | <view> ç©æç¼å·:{{item.materielCode}} </view> |
| | | <!-- <view> ç©æåç§°:{{item.materielName}} </view> --> |
| | | <view> ç©æè§æ ¼:{{item.materielSpec}} </view> |
| | | <view> ç产åå®¶:{{item.factory || ''}} </view> |
| | | <view> åºæ¬åä½:{{item.materielUnit}} </view> |
| | | <view> ææ:{{item.modifier || ''}} </view> |
| | | <view> æ¹å·:{{item.batchNo}} </view> |
| | | <view> åæ®ç¼å·:{{orderNo}} </view> |
| | | <view> è´§ä½ç¼å·:{{item.locationCode}} </view> |
| | | <view> æ°é:{{item.stockQuantity}} </view> |
| | | </uni-group> |
| | |
| | | // this.getData(); |
| | | }, |
| | | onReachBottom() { |
| | | // åªæå¨è¿ææ´å¤æ°æ®æ¶æå è½½ä¸ä¸é¡µ |
| | | if (this.status === 'more') { |
| | | this.pageNo += 1; |
| | | this.getData(); |
| | | } |
| | | }, |
| | | // æ·»å è¿ä¸ªçå½å¨æ |
| | | onHide() { |
| | | // 页é¢éèæ¶ä¸åä»»ä½æä½ |
| | | }, |
| | | |
| | | |
| | | |
| | | onShow() { |
| | | // this.outTask = uni.getStorageSync('outTask'); |
| | | // if (this.outTask) { |
| | |
| | | this.scrollTop = e.scrollTop; |
| | | }, |
| | | methods: { |
| | | // æ·»å å·æ°æ¹æ³ä¾å
¶ä»é¡µé¢è°ç¨ |
| | | refreshData() { |
| | | console.log('æ¶å°å·æ°è¯·æ±'); |
| | | this.pageNo = 1; |
| | | this.allReceivingOrders = []; |
| | | this.getData(); |
| | | }, |
| | | search(res) { |
| | | this.pageNo = 1; |
| | | this.getData(); |
| | |
| | | groupClick() { |
| | | |
| | | }, |
| | | |
| | | // getData() { |
| | | // var postData = { |
| | | // MainData: { |
| | |
| | | // }, |
| | | // } |
| | | // if (this.pageNo == 1) this.allReceivingOrders = []; |
| | | // this.$u.post('/api/DeliveryOrder/GetCheckOutTasks',postData).then(( |
| | | // this.$u.post('/api/DeliveryOrder/CheckOutTasks',postData).then(( |
| | | // res) => { |
| | | // if (res.status) { |
| | | // if (res.data.length > 0) { |
| | |
| | | // } |
| | | // }) |
| | | // } |
| | | 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; |
| | | 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 { |
| | | // // ç¨æ·ç¹å»åæ¶ï¼å¯ä»¥åçå¨å½åé¡µé¢ |
| | | // // æè
æ§è¡å
¶ä»æä½ |
| | | // } |
| | | // } |
| | | // }); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | getData() { |
| | | var postData = { |
| | | MainData: { |
| | | warehouseId: this.warehouseId, |
| | | locationCode: this.searchValue, |
| | | orderNo: this.orderNo, |
| | | pageNo: this.pageNo, |
| | | isCheck: false, |
| | | }, |
| | | } |
| | | |
| | | // 妿æ¯ç¬¬ä¸é¡µææç´¢ï¼æ¸
ç©ºæ°æ® |
| | | if (this.pageNo === 1 || this.searchValue !== '') { |
| | | this.allReceivingOrders = []; |
| | | this.status = "more"; |
| | | } |
| | | |
| | | this.$u.post('/api/DeliveryOrder/CheckOutTasks', postData).then((res) => { |
| | | if (res.status) { |
| | | if (res.data && res.data.length > 0) { |
| | | // è¿½å æ°æ®è䏿¯æ¿æ¢ |
| | | this.allReceivingOrders = [...this.allReceivingOrders, ...res.data]; |
| | | |
| | | // 妿è¿åçæ°æ®å°äº5æ¡ï¼è¯´ææ²¡ææ´å¤æ°æ®äº |
| | | if (res.data.length < 5) { |
| | | this.status = 'noMore'; |
| | | } else { |
| | | this.status = 'more'; |
| | | } |
| | | |
| | | // æ§å¶å è½½æç¤ºæ¾ç¤º |
| | | this.loadVisible = this.allReceivingOrders.length > 0; |
| | | |
| | | } else { |
| | | // æ²¡ææ°æ® |
| | | this.status = 'noMore'; |
| | | this.loadVisible = this.allReceivingOrders.length > 0; |
| | | |
| | | // 妿æ¯ç¬¬ä¸é¡µä¸æ²¡ææ°æ®ï¼æ¾ç¤ºç©ºç¶æ |
| | | if (this.pageNo === 1) { |
| | | this.allReceivingOrders = []; |
| | | } |
| | | |
| | | // åºåºå®ææç¤ºé»è¾ |
| | | if (this.allReceivingOrders.length < 1) { |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, 300); |
| | | } |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.error('请æ±å¤±è´¥:', err); |
| | | this.status = 'noMore'; |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | | |
| | | |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |