|
@@ -18,13 +18,11 @@
|
|
|
<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
</block>
|
|
</block>
|
|
|
<view class="app-footer open_btn">
|
|
<view class="app-footer open_btn">
|
|
|
- <view @click="selectProduct" class="admin-button-com big blue">新增损耗</view>
|
|
|
|
|
|
|
+ <view @click="selectProduct" class="admin-button-com big blue">新增报损</view>
|
|
|
</view>
|
|
</view>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-
|
|
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
import { wastageList } from "@/api/wastage";
|
|
import { wastageList } from "@/api/wastage";
|
|
|
export default {
|
|
export default {
|
|
@@ -37,13 +35,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
this.resetList();
|
|
this.resetList();
|
|
|
- this._list().then((res) => {
|
|
|
|
|
|
|
+ this.getBreakList().then((res) => {
|
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
if (!this.list.finished) {
|
|
if (!this.list.finished) {
|
|
|
- this._list().then((res) => {
|
|
|
|
|
|
|
+ this.getBreakList().then((res) => {
|
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
@@ -56,7 +54,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
this.resetList();
|
|
this.resetList();
|
|
|
- this._list();
|
|
|
|
|
|
|
+ this.getBreakList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
init(){
|
|
init(){
|
|
@@ -64,22 +62,20 @@ export default {
|
|
|
},
|
|
},
|
|
|
selectProduct(){
|
|
selectProduct(){
|
|
|
if(this.$util.isScanEnv()){
|
|
if(this.$util.isScanEnv()){
|
|
|
- this.$util.pageTo({url: '/admin/breakage/confirm'})
|
|
|
|
|
|
|
+ this.$util.pageTo({url: '/admin/breakage/confirm',type:2})
|
|
|
}else{
|
|
}else{
|
|
|
- this.$util.pageTo({url: '/admin/breakage/index'})
|
|
|
|
|
|
|
+ this.$util.pageTo({url: '/admin/breakage/index',type:2})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- _list(type, timeArr) {
|
|
|
|
|
- return wastageList({
|
|
|
|
|
- page: this.list.page,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
|
+ getBreakList(type, timeArr) {
|
|
|
|
|
+ return wastageList({ page: this.list.page, }).then((res) => {
|
|
|
this.completes(res);
|
|
this.completes(res);
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -103,4 +99,4 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|