|
|
@ -8,7 +8,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll" @scrolltolower='scrolltolower'> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view> |
|
|
|
<!-- 管理精度是批次 --> |
|
|
@ -19,6 +19,7 @@ |
|
|
|
</comReceiptDetailCardBacth> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uni-load-more :status="loadingType" v-if="detailSource.length>0" /> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
<view class="page-footer"> |
|
|
@ -113,6 +114,8 @@ |
|
|
|
toLocationCode: '', |
|
|
|
scanPackList: [], //记录扫描包装 |
|
|
|
packNumberList: [], //记录所有包装 |
|
|
|
loadingType: "nomore", |
|
|
|
isDown:false |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -133,6 +136,9 @@ |
|
|
|
this.scanPackList.push(i) |
|
|
|
} |
|
|
|
}) |
|
|
|
cur.pageNo=1 |
|
|
|
cur.pageSize=20 |
|
|
|
cur.showPackList = cur.packList.slice((cur.pageNo - 1) * cur.pageSize,cur.pageNo * cur.pageSize) |
|
|
|
this.packNumberList = [...cur.packList] |
|
|
|
}) |
|
|
|
}) |
|
|
@ -143,7 +149,58 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
|
this.refresh(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getDetail() { |
|
|
|
var that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
getPurchaseReceiptJobDetail(this.id).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data == null) { |
|
|
|
that.showMessage('未获取到详情'); |
|
|
|
} else { |
|
|
|
if (res.data.subList.length > 0) { |
|
|
|
|
|
|
|
} else { |
|
|
|
that.showMessage('列表数据为0'); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
scrolltolower() { |
|
|
|
this.loadingType = "loading"; |
|
|
|
console.log(this.isDown) |
|
|
|
if(this.isDown)return; |
|
|
|
this.isDown = true |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(cur => { |
|
|
|
cur.pageNo++ |
|
|
|
const list = cur.packList.slice((cur.pageNo - 1) * cur.pageSize,cur.pageNo * cur.pageSize) |
|
|
|
if(list.length>0){ |
|
|
|
this.loadingType = "loading"; |
|
|
|
}else { |
|
|
|
this.loadingType = "nomore"; |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log(this.loadingType) |
|
|
|
cur.showPackList=[...cur.showPackList,...list] |
|
|
|
setTimeout(()=>{ |
|
|
|
this.isDown = false |
|
|
|
},1000) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.updateData('child') |
|
|
|
|
|
|
|
}, |
|
|
|
openScanPopup() { |
|
|
|
// 第一个参数是库位查精度,第二个参数是判断是否走包装信息接口 |
|
|
|
this.$refs.scanPopup.openScanPopup(this.jobToLocationCode, true); |
|
|
|