|
|
@@ -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;
|