|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view class="backcorfff width100">
|
|
|
|
<QSTabs ref="tabs" :tabs="tabs" animationMode="line2" :current="current" @change="change"
|
|
|
|
activeColor="#089bf5" lineColor="#089bf5" minWidth="150">
|
|
|
|
</QSTabs>
|
|
|
|
</view>
|
|
|
|
<!-- 状态 -->
|
|
|
|
<view class="mart20 width100">
|
|
|
|
<view v-if="merchantlist == '' " class="mart60 fotct font14 fcor666">
|
|
|
|
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image>
|
|
|
|
</view>
|
|
|
|
<view class="width94 backcorfff border-r mart15" v-for="(item,index) in merchantlist" :key="index"
|
|
|
|
@click="jumpmerdes(item.id)">
|
|
|
|
<view class="notes">
|
|
|
|
<image src="../../../static/img/merchantstu.png" mode="widthFix" class="iconw40"></image>
|
|
|
|
<view class="width65 margle">
|
|
|
|
<view class="font14 fcor333">{{item.regPhone}}</view>
|
|
|
|
<view class="font12 fcor999">
|
|
|
|
{{item.createTime | timeFormat('yyyy-mm-dd hh:mm')}}
|
|
|
|
{{item.createTime | timeFormat('hh:mm')}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="statucs font14" v-if="item.merStatus == 1">正常</view>
|
|
|
|
<view class="otstatucs font14" v-if="item.merStatus == 2">编辑中</view>
|
|
|
|
<view class="otstatucs font14" v-if="item.merStatus == 3">审核中</view>
|
|
|
|
<view class="otstatucs font14" v-if="item.merStatus == 4">审核失败</view>
|
|
|
|
<view class="otstatucs font14" v-if="item.merStatus == 5">违规</view>
|
|
|
|
</view>
|
|
|
|
<view class="notes">
|
|
|
|
<view class="width30 fcor333 font15">联系人</view>
|
|
|
|
<view class="width30 fcor999 font15" v-if="item.regName">{{item.regName}}</view>
|
|
|
|
<view class="width30 fcor999 font15" v-else>-</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import QSTabs from '../../../components/QS-tabs/QS-tabs.vue';
|
|
|
|
import {
|
|
|
|
getMerListBySalesman
|
|
|
|
} from '../../../Utils/Api.js';
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
QSTabs
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
tabs: ["正常", "编辑中", "审核中", "审核失败", "违规"],
|
|
|
|
current: 0, // tabs默认值
|
|
|
|
merchantlist: [],
|
|
|
|
pageNum: 1,
|
|
|
|
pagesize: 10,
|
|
|
|
isLoadMore: false, //是否加载中
|
|
|
|
merstu: 1 //查询当前状态 1:正常 2:编辑中 4:审核中 5:审核失败 6:违规
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
this.getMerListBySalesman();
|
|
|
|
},
|
|
|
|
onReachBottom() { //上拉触底函数
|
|
|
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
|
|
this.isLoadMore = true
|
|
|
|
this.pageNum += 1
|
|
|
|
this.getCmsContentNEWS()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
//查询商户列表
|
|
|
|
getMerListBySalesman() {
|
|
|
|
uni.showLoading({
|
|
|
|
title: '加载中'
|
|
|
|
})
|
|
|
|
let datas = {
|
|
|
|
merStatus: this.merstu,
|
|
|
|
pageNum: this.pageNum,
|
|
|
|
pageSize: this.pagesize,
|
|
|
|
}
|
|
|
|
getMerListBySalesman(datas).then(res => {
|
|
|
|
uni.hideLoading();
|
|
|
|
if (res.return_code == '000000' && res.return_data.list) {
|
|
|
|
this.merchantlist = this.merchantlist.concat(res.return_data.list);
|
|
|
|
if (res.return_data.pages == this.pageNum) {
|
|
|
|
this.isLoadMore = true;
|
|
|
|
} else {
|
|
|
|
this.isLoadMore = false
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.isLoadMore = true
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
//筛选
|
|
|
|
change(index) {
|
|
|
|
this.$refs.tabs.setFinishCurrent(index);
|
|
|
|
this.current = index;
|
|
|
|
this.merstu = this.current + 1;
|
|
|
|
this.merchantlist = [];
|
|
|
|
this.pageNum = 1;
|
|
|
|
this.getMerListBySalesman();
|
|
|
|
},
|
|
|
|
//跳转详情
|
|
|
|
jumpmerdes(ids) {
|
|
|
|
if (this.current == 1 || this.current == 3) {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '../merchant-incoming-parts/merchant-incoming-parts?id=' + ids
|
|
|
|
})
|
|
|
|
}
|
|
|
|
if (this.current == 2) {
|
|
|
|
uni.showToast({
|
|
|
|
title: '审核中',
|
|
|
|
duration: 2000,
|
|
|
|
icon: 'none'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
if (this.current == 0 || this.current == 4) {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '../merchant-details/merchant-details?id=' + ids
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
page {
|
|
|
|
background-color: #f6f6f6;
|
|
|
|
}
|
|
|
|
|
|
|
|
.notes {
|
|
|
|
width: calc(100% - 40upx);
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 20upx 0 20upx 20upx;
|
|
|
|
}
|
|
|
|
|
|
|
|
//正常状态
|
|
|
|
.statucs {
|
|
|
|
background-color: #e9f9e5;
|
|
|
|
color: #84b878;
|
|
|
|
text-align: center;
|
|
|
|
padding: 2px 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
//其他状态
|
|
|
|
.otstatucs {
|
|
|
|
background-color: #fbeee4;
|
|
|
|
color: #db8c73;
|
|
|
|
text-align: center;
|
|
|
|
padding: 2px 5px;
|
|
|
|
}
|
|
|
|
</style>
|