|
@@ -16,12 +16,12 @@
|
|
|
<view class="order_list" >
|
|
<view class="order_list" >
|
|
|
<view style="padding:22upx 0 0 20upx;font-size:30upx;">总欠款:{{info.totalDebtAmount?parseFloat(info.totalDebtAmount):0}}</view>
|
|
<view style="padding:22upx 0 0 20upx;font-size:30upx;">总欠款:{{info.totalDebtAmount?parseFloat(info.totalDebtAmount):0}}</view>
|
|
|
<block>
|
|
<block>
|
|
|
- <block v-if="!$util.isEmpty(supplierList)">
|
|
|
|
|
- <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="goToCg(item)" >
|
|
|
|
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
|
|
+ <view class="list_item" v-for="(item, index) in list.data" :key="index" @click="goToCg(item)" >
|
|
|
|
|
|
|
|
<view v-if="item.location == 1"
|
|
<view v-if="item.location == 1"
|
|
|
style="width:90upx;padding:5upx 0 5upx 0;font-size:20upx;background-color:#7babc1;color:white;position:absolute;left:0;top:0;text-align:center;"
|
|
style="width:90upx;padding:5upx 0 5upx 0;font-size:20upx;background-color:#7babc1;color:white;position:absolute;left:0;top:0;text-align:center;"
|
|
|
- >本地</view>
|
|
|
|
|
|
|
+ >附近</view>
|
|
|
|
|
|
|
|
<view class="store_name">
|
|
<view class="store_name">
|
|
|
<view class="store_title" @click.stop="nameModify(item)">
|
|
<view class="store_title" @click.stop="nameModify(item)">
|
|
@@ -52,7 +52,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(supplierList)" />
|
|
|
|
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
</block>
|
|
</block>
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
@@ -78,6 +78,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import { getList,changeGhsName } from "@/api/ghs";
|
|
import { getList,changeGhsName } from "@/api/ghs";
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
|
|
+import { list } from "@/mixins";
|
|
|
export default {
|
|
export default {
|
|
|
components: { AppWrapperEmpty, AppSearchModule,Tabs,ModalModule },
|
|
components: { AppWrapperEmpty, AppSearchModule,Tabs,ModalModule },
|
|
|
data () {
|
|
data () {
|
|
@@ -88,7 +89,6 @@ export default {
|
|
|
list: {
|
|
list: {
|
|
|
data: []
|
|
data: []
|
|
|
},
|
|
},
|
|
|
- supplierList: [],
|
|
|
|
|
tabIndex: 0,
|
|
tabIndex: 0,
|
|
|
tabs: [
|
|
tabs: [
|
|
|
{
|
|
{
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
value: "0"
|
|
value: "0"
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- name: "本地",
|
|
|
|
|
|
|
+ name: "附近",
|
|
|
key: "1",
|
|
key: "1",
|
|
|
value: "0"
|
|
value: "0"
|
|
|
}
|
|
}
|
|
@@ -112,11 +112,21 @@ export default {
|
|
|
T:null
|
|
T:null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ mixins: [list],
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
- this.getGHSList().then(res => {
|
|
|
|
|
|
|
+ this.getGhsList().then(res => {
|
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ onReachBottom() {
|
|
|
|
|
+ if (!this.list.finished) {
|
|
|
|
|
+ this.getGhsList().then((res) => {
|
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
modifyConfirm(val){
|
|
modifyConfirm(val){
|
|
|
let that=this;
|
|
let that=this;
|
|
@@ -132,6 +142,7 @@ export default {
|
|
|
that.modifyGhsId = 0
|
|
that.modifyGhsId = 0
|
|
|
that.modifyGhsName = ''
|
|
that.modifyGhsName = ''
|
|
|
that.modifyGhsShow = false
|
|
that.modifyGhsShow = false
|
|
|
|
|
+ that.resetList()
|
|
|
that.init()
|
|
that.init()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -142,11 +153,7 @@ export default {
|
|
|
this.modifyGhsShow = true
|
|
this.modifyGhsShow = true
|
|
|
},
|
|
},
|
|
|
cgList(item){
|
|
cgList(item){
|
|
|
- if(item.location && item.location == 1){
|
|
|
|
|
- this.pageTo({url:'/pagesPurchase/wcOrder?ghsId='+item.id})
|
|
|
|
|
- }else{
|
|
|
|
|
- this.pageTo({url:'/pagesPurchase/order?ghsId='+item.id})
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.pageTo({url:'/pagesPurchase/order?ghsId='+item.id})
|
|
|
},
|
|
},
|
|
|
changeTabEvent(info) {
|
|
changeTabEvent(info) {
|
|
|
const { index } = info;
|
|
const { index } = info;
|
|
@@ -154,7 +161,8 @@ export default {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
this.tabIndex = index;
|
|
this.tabIndex = index;
|
|
|
- this.getGHSList()
|
|
|
|
|
|
|
+ this.resetList()
|
|
|
|
|
+ this.getGhsList()
|
|
|
},
|
|
},
|
|
|
addGhs(){
|
|
addGhs(){
|
|
|
this.pageTo({url:'/pagesPurchase/suppAdd'})
|
|
this.pageTo({url:'/pagesPurchase/suppAdd'})
|
|
@@ -162,31 +170,28 @@ export default {
|
|
|
getDebtList(){
|
|
getDebtList(){
|
|
|
this.$msg('开发中')
|
|
this.$msg('开发中')
|
|
|
},
|
|
},
|
|
|
- settleAccounts (item) {
|
|
|
|
|
- //this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
|
|
|
|
|
- },
|
|
|
|
|
init() {
|
|
init() {
|
|
|
- this.getGHSList()
|
|
|
|
|
|
|
+ this.getGhsList()
|
|
|
},
|
|
},
|
|
|
searchFn(e) {
|
|
searchFn(e) {
|
|
|
- if (this.$util.isEmpty(e)){
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
let that = this
|
|
let that = this
|
|
|
if(this.T != null){
|
|
if(this.T != null){
|
|
|
clearTimeout(this.T)
|
|
clearTimeout(this.T)
|
|
|
}
|
|
}
|
|
|
this.T = setTimeout(function(){
|
|
this.T = setTimeout(function(){
|
|
|
|
|
+ that.resetList()
|
|
|
that.search = e
|
|
that.search = e
|
|
|
- that.getGHSList()
|
|
|
|
|
- },500)
|
|
|
|
|
|
|
+ that.getGhsList()
|
|
|
|
|
+ },700)
|
|
|
},
|
|
},
|
|
|
- getGHSList() {
|
|
|
|
|
- let location = this.tabs[this.tabIndex].key
|
|
|
|
|
|
|
+ getGhsList() {
|
|
|
let name = this.search
|
|
let name = this.search
|
|
|
- return getList({ pageSize:300, name:name,location:location }).then(res => {
|
|
|
|
|
- this.supplierList = res.data.list
|
|
|
|
|
|
|
+ return getList({name:name,page: this.list.page}).then(res => {
|
|
|
this.info = res.data
|
|
this.info = res.data
|
|
|
|
|
+ this.completes(res);
|
|
|
|
|
+ if (this.$util.isEmpty(res.data)){
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
goToSearchDebt(item){
|
|
goToSearchDebt(item){
|