Просмотр исходного кода

(供货商、零售)库存管理里的库存明细 有分页好像没有显示下一步 2 接口请求了二次

jf 5 лет назад
Родитель
Сommit
3f3ba66e46

+ 11 - 2
ghsApp/src/pagesStorehouse/stockWarn/detailed.vue

@@ -183,7 +183,16 @@ export default {
 		console.log(' this.menuTimeObj',this.menuTimeObj, dateDefaultOption)
 		// console.log('userShopAll',this.setUserShopAll())
 
-		this.init();
+		// this.init();
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this._list().then((res) => {
+				uni.stopPullDownRefresh();
+			});
+		} else {
+			uni.stopPullDownRefresh();
+		}
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
@@ -221,7 +230,7 @@ export default {
 			this._list();
 		},
 		_list() {
-			return getStockDetailApi(this.params).then(res => {
+			return getStockDetailApi({...this.params,page: this.list.page,}).then(res => {
 				this.completes(res);
 			});
 		}

+ 10 - 1
hdApp/src/pagesStorehouse/stockWarn/detailed.vue

@@ -183,6 +183,15 @@ export default {
 
 		this.init();
 	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this._list().then((res) => {
+				uni.stopPullDownRefresh();
+			});
+		} else {
+			uni.stopPullDownRefresh();
+		}
+	},
 	methods: {
 		...mapActions(['setUserShopAll']),
 		// 选择分店
@@ -219,7 +228,7 @@ export default {
 			this._list();
 		},
 		_list() {
-			return getStockDetailApi(this.params).then(res => {
+			return getStockDetailApi({...this.params,page: this.list.page,}).then(res => {
 				this.completes(res);
 			});
 		}