|
@@ -1,24 +1,32 @@
|
|
<template>
|
|
<template>
|
|
<view class="choose-network-container">
|
|
<view class="choose-network-container">
|
|
|
|
+ <!-- 筛选弹框 -->
|
|
|
|
+ <search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
|
|
<view class="choose-network-header">
|
|
<view class="choose-network-header">
|
|
<view class="checked-all">
|
|
<view class="checked-all">
|
|
- <u-checkbox
|
|
|
|
|
|
+ <u-checkbox
|
|
|
|
+ class="checked-all-c"
|
|
@change="checkedAll"
|
|
@change="checkedAll"
|
|
- v-model="isCheckedAll"
|
|
|
|
|
|
+ v-model="isCheckedAll"
|
|
|
|
+ label-size="26"
|
|
name="checkedAll"
|
|
name="checkedAll"
|
|
>全选</u-checkbox>
|
|
>全选</u-checkbox>
|
|
</view>
|
|
</view>
|
|
- <view class="">已选:<text>10</text></view>
|
|
|
|
|
|
+ <view class="choose-checked" @tap="openScreen=true">
|
|
|
|
+ 已选:<text>{{checkedNum}}</text>
|
|
|
|
+ <image class="filter-icon" src="@/static/filter.png"></image>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
|
|
<scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
|
|
<!-- 列表数据 -->
|
|
<!-- 列表数据 -->
|
|
- <u-checkbox-group class="cell-item-con" @change="checkboxGroupChange">
|
|
|
|
- <u-checkbox
|
|
|
|
- class="cell-item"
|
|
|
|
- @change="checkboxChange"
|
|
|
|
- v-model="item.checked"
|
|
|
|
- v-for="(item, index) in listdata" :key="index"
|
|
|
|
- :name="item.name">
|
|
|
|
|
|
+ <u-checkbox-group class="cell-item-con">
|
|
|
|
+ <view class="cell-item" v-for="(item, index) in listdata" :key="index">
|
|
|
|
+ <u-checkbox
|
|
|
|
+ class="cell-item-checkbox"
|
|
|
|
+ @change="checkboxChange($event, index)"
|
|
|
|
+ v-model="item.checked"
|
|
|
|
+ :name="item.id">
|
|
|
|
+ </u-checkbox>
|
|
<view class="cell-item-c" @tap="goPage(item)">
|
|
<view class="cell-item-c" @tap="goPage(item)">
|
|
<view class="cell-item-info">
|
|
<view class="cell-item-info">
|
|
<view class="cell-item-info-network">
|
|
<view class="cell-item-info-network">
|
|
@@ -38,7 +46,7 @@
|
|
</view>
|
|
</view>
|
|
<u-icon name="arrow-right" class="arrow-right" :size="28" color="#999"></u-icon>
|
|
<u-icon name="arrow-right" class="arrow-right" :size="28" color="#999"></u-icon>
|
|
</view>
|
|
</view>
|
|
- </u-checkbox>
|
|
|
|
|
|
+ </view>
|
|
</u-checkbox-group>
|
|
</u-checkbox-group>
|
|
<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
|
|
<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
|
|
<view class="loadmore">
|
|
<view class="loadmore">
|
|
@@ -54,8 +62,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import searchModal from '@/pages/cleared/searchModal.vue'
|
|
import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
|
|
import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
|
|
export default{
|
|
export default{
|
|
|
|
+ components: { searchModal },
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
listdata: [],
|
|
listdata: [],
|
|
@@ -65,6 +75,14 @@
|
|
noDataText: '暂无数据', // 列表请求状态提示语
|
|
noDataText: '暂无数据', // 列表请求状态提示语
|
|
status: 'loadmore', // 加载中状态
|
|
status: 'loadmore', // 加载中状态
|
|
scrollTop: 0, // 滚动条位置
|
|
scrollTop: 0, // 滚动条位置
|
|
|
|
+ isCheckedAll: false, // 全选状态
|
|
|
|
+ checkedNum: 0, // 已选个数
|
|
|
|
+ openScreen: false, // 是否打开筛选
|
|
|
|
+ searchForm: {
|
|
|
|
+ // 查询条件
|
|
|
|
+ bundleName: '', // 网点名称
|
|
|
|
+ custMobile: '', // 排序方式
|
|
|
|
+ },
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -72,18 +90,27 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 选中某个复选框时,由checkbox时触发
|
|
// 选中某个复选框时,由checkbox时触发
|
|
- checkboxChange(e) {
|
|
|
|
- console.log(e)
|
|
|
|
- },
|
|
|
|
- // 选中任一checkbox时,由checkbox-group触发
|
|
|
|
- checkboxGroupChange(e) {
|
|
|
|
- console.log(e)
|
|
|
|
|
|
+ checkboxChange(e,ind) {
|
|
|
|
+ this.listdata[ind].checked = e.value
|
|
|
|
+ let len = 0
|
|
|
|
+ this.listdata.map(item => {
|
|
|
|
+ if(item.checked){
|
|
|
|
+ len++
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.checkedNum = len
|
|
},
|
|
},
|
|
// 全选
|
|
// 全选
|
|
- checkedAll() {
|
|
|
|
|
|
+ checkedAll(e) {
|
|
|
|
+ this.isCheckedAll = e
|
|
|
|
+ let len = 0
|
|
this.listdata.map(val => {
|
|
this.listdata.map(val => {
|
|
- val.checked = true
|
|
|
|
|
|
+ val.checked = e.value ? true : false
|
|
|
|
+ if(val.checked){
|
|
|
|
+ len++
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+ this.checkedNum = len
|
|
},
|
|
},
|
|
// 获取查询参数 刷新列表
|
|
// 获取查询参数 刷新列表
|
|
refresh(params){
|
|
refresh(params){
|
|
@@ -100,6 +127,9 @@
|
|
pageSize: this.pageSize
|
|
pageSize: this.pageSize
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
|
|
+ res.data.list.map(item => {
|
|
|
|
+ item.checked = false
|
|
|
|
+ })
|
|
if(this.pageNo>1){
|
|
if(this.pageNo>1){
|
|
this.listdata = this.listdata.concat(res.data.list || [])
|
|
this.listdata = this.listdata.concat(res.data.list || [])
|
|
}else{
|
|
}else{
|
|
@@ -113,16 +143,13 @@
|
|
this.listdata = []
|
|
this.listdata = []
|
|
this.total = 0
|
|
this.total = 0
|
|
}
|
|
}
|
|
- this.listdata.map(item => {
|
|
|
|
- item.checked = false
|
|
|
|
- })
|
|
|
|
this.status = "loadmore"
|
|
this.status = "loadmore"
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 查看详情
|
|
// 查看详情
|
|
goPage(row){
|
|
goPage(row){
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pages/cleared/details'
|
|
|
|
|
|
+ url: '/pages/cleared/network'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// scroll-view到底部加载更多
|
|
// scroll-view到底部加载更多
|
|
@@ -148,14 +175,39 @@
|
|
height: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- padding-top: 100rpx;
|
|
|
|
|
|
+ padding-top: 80rpx;
|
|
padding-bottom: 102rpx;
|
|
padding-bottom: 102rpx;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+ // 顶部固定
|
|
.choose-network-header{
|
|
.choose-network-header{
|
|
position: fixed;
|
|
position: fixed;
|
|
top: 0;
|
|
top: 0;
|
|
left: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ padding: 0 $uni-spacing-row-base;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ line-height: 80rpx;
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+ .checked-all{
|
|
|
|
+ .checked-all-c{
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .choose-checked{
|
|
|
|
+ text{
|
|
|
|
+ color: red;
|
|
|
|
+ }
|
|
|
|
+ .filter-icon{
|
|
|
|
+ width: 36rpx;
|
|
|
|
+ height: 36rpx;
|
|
|
|
+ padding-left: 30rpx;
|
|
|
|
+ vertical-align: text-top;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 列表
|
|
// 列表
|
|
.scroll-con{
|
|
.scroll-con{
|
|
@@ -174,14 +226,15 @@
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
padding: $uni-spacing-col-base $uni-spacing-row-base;
|
|
padding: $uni-spacing-col-base $uni-spacing-row-base;
|
|
- position: relative;
|
|
|
|
|
|
+ // 多选框
|
|
|
|
+ .cell-item-checkbox{
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ }
|
|
.cell-item-c{
|
|
.cell-item-c{
|
|
- // flex-grow: 1;
|
|
|
|
|
|
+ flex-grow: 1;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
align-items: center;
|
|
- display: block;
|
|
|
|
- width: 100%;
|
|
|
|
.cell-item-info{
|
|
.cell-item-info{
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|
|
.cell-item-info-network{
|
|
.cell-item-info-network{
|