Browse Source

asn收货卡顿功能

intex_online20250418
张立 2 weeks ago
parent
commit
5bd09c184b
  1. 3
      src/mycomponents/package/packageList.vue
  2. 59
      src/pages/purchaseReceipt/job/purchaseReceiptAsnDetail.vue

3
src/mycomponents/package/packageList.vue

@ -15,7 +15,7 @@
</uni-swipe-action> </uni-swipe-action>
</template> </template>
<view v-for="(pack,index) in item.packList" :key="pack.id" <view v-for="(pack,index) in item.showPackList" :key="pack.id"
style=" width: 100%; background-color: antiquewhite;"> style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action> <uni-swipe-action>
<uni-swipe-action-item <uni-swipe-action-item
@ -33,6 +33,7 @@
</uni-swipe-action> </uni-swipe-action>
</view> </view>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
</view> </view>

59
src/pages/purchaseReceipt/job/purchaseReceiptAsnDetail.vue

@ -8,7 +8,7 @@
</view> </view>
</view> </view>
<view class="page-main"> <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 class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view> <view>
<!-- 管理精度是批次 --> <!-- 管理精度是批次 -->
@ -19,6 +19,7 @@
</comReceiptDetailCardBacth> </comReceiptDetailCardBacth>
</view> </view>
</view> </view>
<uni-load-more :status="loadingType" v-if="detailSource.length>0" />
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer"> <view class="page-footer">
@ -113,6 +114,8 @@
toLocationCode: '', toLocationCode: '',
scanPackList: [], // scanPackList: [], //
packNumberList: [], // packNumberList: [], //
loadingType: "nomore",
isDown:false
}; };
}, },
onLoad(option) { onLoad(option) {
@ -133,6 +136,9 @@
this.scanPackList.push(i) 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] this.packNumberList = [...cur.packList]
}) })
}) })
@ -143,7 +149,58 @@
}) })
}) })
}, },
onPullDownRefresh() {
this.refresh();
},
methods: { 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() { openScanPopup() {
// //
this.$refs.scanPopup.openScanPopup(this.jobToLocationCode, true); this.$refs.scanPopup.openScanPopup(this.jobToLocationCode, true);

Loading…
Cancel
Save