shish 5 лет назад
Родитель
Сommit
a198b92733

+ 0 - 2
ghsApp/src/admin/breakage/list.vue

@@ -55,8 +55,6 @@ export default {
     }
   },
   mounted() {
-    // getCategory()
-    // getUsage()
   },
   onLoad(option) {
   },

+ 2 - 2
ghsApp/src/api/inventory/index.js

@@ -3,8 +3,8 @@ import https from "@/plugins/luch-request_0.0.7/request";
 /** *
  * 盘点列表
  */
-export const getCheckOrderListApi = async status => {
-	return https.get("/check-order/list", { status });
+export const getCheckOrderListApi = data => {
+	return https.get("/check-order/list", data);
 };
 
 /** *

+ 19 - 56
ghsApp/src/pagesStorehouse/inventory/list.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="allot-ex-page">
-		<scroll-view scroll-y class="allot-list">
+		<view class="allot-list">
 			<block v-if="!$util.isEmpty(list.data)">
 				<view
 					class="allot-item"
@@ -27,7 +27,7 @@
 			<block v-else>
 				<AppWrapperEmpty title="暂无记录" :is-empty="$util.isEmpty(list.data)" />
 			</block>
-		</scroll-view>
+		</view>
 		<div class="app-footer open_btn">
 			<div @click="addEvent" class="admin-button-com middle blue">新增盘点</div>
 		</div>
@@ -35,9 +35,7 @@
 </template>
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { INVENTORY_STATUS } from "@/utils/declare";
 import { getCheckOrderListApi } from "@/api/inventory/index";
-
 import { list } from "@/mixins";
 export default {
 	name: "panDianList",
@@ -45,16 +43,9 @@ export default {
 	mixins: [list],
 	data() {
 		return {
-			listLoading: false,
-			INVENTORY_STATUS,
-			tabIndex: 0
 		};
 	},
 	onShow() {
-		if (!this.listLoading) {
-			this.resetList();
-			this.init();
-		}
 	},
 	onPullDownRefresh() {
 		this.resetList();
@@ -62,46 +53,27 @@ export default {
 			uni.stopPullDownRefresh();
 		});
 	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this._list().then((res) => {
+				uni.stopPullDownRefresh();
+			});
+		} else {
+			uni.stopPullDownRefresh();
+		}
+	},
 	methods: {
 		async init() {
 			this._list();
 		},
 		_list() {
-			this.listLoading = true;
-			return getCheckOrderListApi("")
+			return getCheckOrderListApi({page: this.list.page})
 				.then(res => {
 					this.completes(res);
-					this.listLoading = false;
 				})
 				.catch(err => {
-					this.listLoading = false;
 				});
 		},
-		changeTabEvent(info) {
-			const { index } = info;
-			if (this.tabIndex == index) {
-				return false;
-			} else {
-				this.tabIndex = index;
-				this.resetList();
-				this._list();
-			}
-		},
-		getItemStatusName(status) {
-			let name = "";
-			switch (status) {
-				case OUT_STATUS.CONFIRM:
-					name = "待出库";
-					break;
-				case OUT_STATUS.DONE:
-					name = "已出库";
-					break;
-
-				default:
-					break;
-			}
-			return name;
-		},
 		addEvent() {
 			uni.navigateTo({
 				url: `/pagesStorehouse/inventory/update`,
@@ -111,21 +83,12 @@ export default {
 			});
 		},
 		gotoDetailsEvent(item) {
-			if (item.status == INVENTORY_STATUS.DONE) {
-				uni.navigateTo({
-					url: `/pagesStorehouse/inventory/details?orderSn=${item.orderSn}`,
-					success: result => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			} else {
-				uni.navigateTo({
-					url: `/pagesStorehouse/inventory/update?orderSn=${item.orderSn}`,
-					success: result => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			}
+			uni.navigateTo({
+				url: `/pagesStorehouse/inventory/details?orderSn=${item.orderSn}`,
+				success: result => {},
+				fail: () => {},
+				complete: () => {}
+			})
 		}
 	}
 };
@@ -139,7 +102,7 @@ export default {
 	.allot-list {
 		margin-top: 20upx;
 		flex: 1;
-		padding-bottom: 150upx;
+		padding-bottom: 90upx;
 		.allot-item {
 			margin-bottom: 1px;
 			padding: 30upx;