|
|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<view class="ghs_list_page flex-col">
|
|
|
- <template v-if="!$util.isEmpty(supplierList)">
|
|
|
+ <template v-if="!$util.isEmpty(list.data)">
|
|
|
<view class="ghs_list_area flex-col justify-end">
|
|
|
|
|
|
- <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in supplierList" :key="index">
|
|
|
+ <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in list.data" :key="index">
|
|
|
<view class="image-text_7 flex-row justify-between">
|
|
|
<view class="section_1 flex-col">
|
|
|
<image class="logo" :src="ghsInfo.avatar" />
|
|
|
@@ -44,17 +44,27 @@
|
|
|
import emptyComponent from "@/components/empty";
|
|
|
import { ghsList } from "@/api/purchase";
|
|
|
import { changeDelStatus } from "@/api/ghs";
|
|
|
+import { list } from "@/mixins";
|
|
|
export default {
|
|
|
components: {
|
|
|
emptyComponent
|
|
|
},
|
|
|
+ mixins: [list],
|
|
|
data () {
|
|
|
return {
|
|
|
- supplierList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onReachBottom () {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ this.getGhsList().then(res => {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
}
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
- this.getGHSList().then(res => {
|
|
|
+ this.getGhsList().then(res => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
})
|
|
|
},
|
|
|
@@ -78,16 +88,17 @@ export default {
|
|
|
let that = this
|
|
|
changeDelStatus({delStatus:0,ghsId:ghs.id}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
- that.getGHSList()
|
|
|
+ that.resetList()
|
|
|
+ that.getGhsList()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
init() {
|
|
|
- this.getGHSList()
|
|
|
+ this.getGhsList()
|
|
|
},
|
|
|
- getGHSList () {
|
|
|
- return ghsList({delStatus:1}).then(res => {
|
|
|
- this.supplierList = res.data.list
|
|
|
+ getGhsList () {
|
|
|
+ return ghsList({delStatus:1,page: this.list.page}).then(res => {
|
|
|
+ this.completes(res)
|
|
|
})
|
|
|
},
|
|
|
settleAccounts (item) {
|