|
@@ -28,7 +28,7 @@
|
|
|
class="input"
|
|
|
type="text"
|
|
|
confirm-type="search"
|
|
|
- v-model="searchInputVal"
|
|
|
+ v-model="listQuery.name"
|
|
|
@input="onShowClose"
|
|
|
@confirm="GetSellerClubList()"
|
|
|
placeholder="机构名称/联系人"
|
|
@@ -44,6 +44,8 @@
|
|
|
height: capsule.height + 'px',
|
|
|
lineHeight: capsule.height + 'px;'
|
|
|
}"
|
|
|
+ v-if="listQuery.manager > 0"
|
|
|
+ @click="showRightDrawer"
|
|
|
>
|
|
|
<text class="iconfont icon-shaixuan"></text>
|
|
|
</view>
|
|
@@ -59,7 +61,7 @@
|
|
|
<text class="item-text">{{ item.name }}<text class="line"></text></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="search-smalltab">
|
|
|
+ <view class="search-smalltab" v-if="listQuery.manager > 0">
|
|
|
<view
|
|
|
class="tab-item"
|
|
|
v-for="(item, index) in listItemTab"
|
|
@@ -71,7 +73,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="club-main">
|
|
|
+ <view class="club-main" :style="{ paddingTop: listQuery.manager > 0 ? '374rpx' : '268rpx' }">
|
|
|
<view v-if="isEmpty" class="empty-container">
|
|
|
<image
|
|
|
class="club-empty-image"
|
|
@@ -119,7 +121,7 @@
|
|
|
{{ showBadge(club.orderNum) }}
|
|
|
</text>
|
|
|
</view>
|
|
|
- <view class="btn" @click.stop="checkData(club)">更换协销</view>
|
|
|
+ <view class="btn" @click.stop="handleReplaceClub(club)">更换协销</view>
|
|
|
<view class="btn" @click.stop="handleClubinfo(club)" v-if="club.recordCount === 1"
|
|
|
>注册行为记录</view
|
|
|
>
|
|
@@ -144,8 +146,21 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- 分享弹窗 -->
|
|
|
- <shareModel v-if="isShareModal" :orderID="shareClubUseId" @shareConfirm="onShareAppMessage"></shareModel>
|
|
|
+ <!-- 筛选抽屉 -->
|
|
|
+ <cm-clubDrawer
|
|
|
+ ref="screendrawer"
|
|
|
+ :rightDrawer="rightDrawer"
|
|
|
+ @handSearchConfirm="handSearchConfirmData"
|
|
|
+ >
|
|
|
+ </cm-clubDrawer>
|
|
|
+ <!-- 选择弹窗 -->
|
|
|
+ <cm-seller-popup
|
|
|
+ ref="cmresellerpopup"
|
|
|
+ v-if="isSellerpopup"
|
|
|
+ :show="isSellerpopup"
|
|
|
+ @handleChoiceaSeller="handleChoiceaSellerData"
|
|
|
+ >
|
|
|
+ </cm-seller-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -153,78 +168,67 @@
|
|
|
import authorize from '@/common/config/authorize.js'
|
|
|
import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
|
|
|
import tuiNomore from '@/components/tui-components/nomore/nomore'
|
|
|
-import shareModel from '@/components/cm-module/modelAlert/shareModel.vue' //分享弹窗
|
|
|
+import cmClubDrawer from '../components/cm-club-drawer'
|
|
|
+import cmSellerPopup from '../components/cm-seller-popup'
|
|
|
|
|
|
+const defaultListQuery = {
|
|
|
+ userIdentity: 4,
|
|
|
+ name: '',
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ spId: 0,
|
|
|
+ status: 90,
|
|
|
+ manager:0,
|
|
|
+ leaderId:0
|
|
|
+}
|
|
|
export default {
|
|
|
components: {
|
|
|
tuiLoadmore,
|
|
|
tuiNomore,
|
|
|
- shareModel
|
|
|
+ cmClubDrawer,
|
|
|
+ cmSellerPopup
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
listTab: [{ name: '个人机构' }, { name: '资质机构' }],
|
|
|
listItemTab: [{ name: '我的机构' }, { name: '组员机构' }, { name: '待分配机构' }],
|
|
|
- serviceProviderId: '',
|
|
|
- shareClubUseId: 0,
|
|
|
- shareIdentity: 0,
|
|
|
+ listQuery: Object.assign({}, defaultListQuery),
|
|
|
isShowClose: false,
|
|
|
- searchInputVal: '',
|
|
|
isEmpty: false,
|
|
|
- isShareModal: false,
|
|
|
nomoreText: '上拉显示更多',
|
|
|
- userIdentity: 4,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
hasNextPage: false,
|
|
|
loadding: false,
|
|
|
pullUpOn: true,
|
|
|
pullFlag: true,
|
|
|
- allowDataStatus: true,
|
|
|
- wrapperHeight: '100%',
|
|
|
- scrollHeight: '',
|
|
|
- deleteAddressId: '',
|
|
|
- currPage: '', //当前页面
|
|
|
- prevPage: '', //上一个页面
|
|
|
tabCurrentNum: 0,
|
|
|
tabCurrentIndex: 0,
|
|
|
tabSmallCurrentIndex:0,
|
|
|
- listStatus: 90,
|
|
|
clubList: [],
|
|
|
isIphoneX: this.$store.state.isIphoneX,
|
|
|
CustomBar: this.CustomBar,
|
|
|
StatusBar: this.StatusBar,
|
|
|
capsule: this.capsule,
|
|
|
- show_index: 0 //控制显示那个组件
|
|
|
+ show_index: 0 ,//控制显示那个组件
|
|
|
+ rightDrawer:false,
|
|
|
+ isSellerpopup:false,
|
|
|
+ salesParams: {
|
|
|
+ clubId: 0,
|
|
|
+ spId: 0
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
- this.setScrollHeight()
|
|
|
- },
|
|
|
+ onLoad() {},
|
|
|
methods: {
|
|
|
- setScrollHeight() {
|
|
|
- // 窗口高度 - 底部距离
|
|
|
- setTimeout(() => {
|
|
|
- const query = wx.createSelectorQuery().in(this)
|
|
|
- query.selectAll('.add-btn').boundingClientRect()
|
|
|
- query.exec(res => {
|
|
|
- if (res[0][0]) {
|
|
|
- let winHeight = this.$api.getWindowHeight(),
|
|
|
- eleTop = res[0][0].top - 1
|
|
|
- this.scrollHeight = eleTop
|
|
|
- }
|
|
|
- })
|
|
|
- }, 500)
|
|
|
+ async initGetStotage() {
|
|
|
+ const userInfo = await this.$api.getStorage()
|
|
|
+ this.listQuery.spId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
|
|
|
+ this.listQuery.manager = userInfo.manager ? userInfo.manager : 0
|
|
|
+ this.GetSellerClubList()
|
|
|
},
|
|
|
GetSellerClubList() {
|
|
|
- this.SellerService.GetSellerClubList({
|
|
|
- userIdentity: this.userIdentity,
|
|
|
- name: this.searchInputVal,
|
|
|
- pageNum: 1,
|
|
|
- pageSize: this.pageSize,
|
|
|
- spId: this.serviceProviderId,
|
|
|
- status: this.listStatus
|
|
|
- })
|
|
|
+ this.SellerService.GetSellerClubList(this.listQuery)
|
|
|
.then(response => {
|
|
|
let data = response.data
|
|
|
if (data.list && data.list.length > 0) {
|
|
@@ -252,15 +256,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getOnReachBottomData() {
|
|
|
- this.pageNum += 1
|
|
|
- this.SellerService.GetSellerClubList({
|
|
|
- userIdentity: this.userIdentity,
|
|
|
- name: this.searchInputVal,
|
|
|
- pageNum: this.pageNum,
|
|
|
- pageSize: this.pageSize,
|
|
|
- spId: this.serviceProviderId,
|
|
|
- status: this.listStatus
|
|
|
- })
|
|
|
+ this.listQuery.pageNum += 1
|
|
|
+ this.SellerService.GetSellerClubList(this.listQuery)
|
|
|
.then(response => {
|
|
|
let data = response.data
|
|
|
if (data.list && data.list.length > 0) {
|
|
@@ -284,18 +281,31 @@ export default {
|
|
|
this.$util.msg(error.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
+ userClubChoseSales(param) {
|
|
|
+ //分配或更换协销
|
|
|
+ this.SellerService.userClubChoseSales(param)
|
|
|
+ .then(response => {
|
|
|
+ this.$util.msg('操作成功~', 2000, true, 'success')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.GetSellerClubList()
|
|
|
+ }, 1000)
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ console.log('分配协销异常')
|
|
|
+ })
|
|
|
+ },
|
|
|
tabClick(index) {
|
|
|
//tab切换
|
|
|
this.tabCurrentIndex = index
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
- this.listStatus = 90
|
|
|
+ this.listQuery.listStatus = 90
|
|
|
break
|
|
|
case 1:
|
|
|
- this.listStatus = 1
|
|
|
+ this.listQuery.listStatus = 1
|
|
|
break
|
|
|
case 2:
|
|
|
- this.listStatus = 92
|
|
|
+ this.listQuery.listStatus = 92
|
|
|
break
|
|
|
}
|
|
|
this.GetSellerClubList()
|
|
@@ -306,15 +316,15 @@ export default {
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
this.tabCurrentIndex = 0
|
|
|
- this.userIdentity = 4
|
|
|
- this.listStatus = 90
|
|
|
- this.pageNum = 1
|
|
|
+ this.listQuery.userIdentity = 4
|
|
|
+ this.listQuery.listStatus = 90
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
this.GetSellerClubList()
|
|
|
break
|
|
|
case 1:
|
|
|
- this.pageNum = 1
|
|
|
- this.userIdentity = 2
|
|
|
- this.listStatus = 90
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.listQuery.userIdentity = 2
|
|
|
+ this.listQuery.listStatus = 90
|
|
|
this.GetSellerClubList()
|
|
|
break
|
|
|
}
|
|
@@ -323,6 +333,26 @@ export default {
|
|
|
//商品详情&&供应商信息tab切换
|
|
|
this.tabSmallCurrentIndex = index
|
|
|
},
|
|
|
+ handSearchConfirmData(data) {
|
|
|
+ console.log('确定筛选', data)
|
|
|
+ //确定筛选
|
|
|
+ this.listQuery.startAddTime = data.startAddTime
|
|
|
+ this.GetSellerClubList()
|
|
|
+ },
|
|
|
+ handleChoiceaSellerData(data) {
|
|
|
+ // 确定搜索
|
|
|
+ this.salesParams.spId = data.serviceProviderId
|
|
|
+ this.userClubChoseSales(this.salesParams)
|
|
|
+ },
|
|
|
+ handleReplaceClub(club){
|
|
|
+ //更换协销
|
|
|
+ this.salesParams.clubId = club.clubId
|
|
|
+ this.isSellerpopup = true
|
|
|
+ },
|
|
|
+ showRightDrawer() {
|
|
|
+ //显示筛选抽屉
|
|
|
+ this.rightDrawer = true
|
|
|
+ },
|
|
|
checkData(club) {
|
|
|
//修改机构资料
|
|
|
switch (this.tabCurrentNum) {
|
|
@@ -345,7 +375,7 @@ export default {
|
|
|
},
|
|
|
onShowClose() {
|
|
|
//输入框失去焦点时触发
|
|
|
- if (this.searchInputVal != '') {
|
|
|
+ if (this.listQuery.name != '') {
|
|
|
this.isShowClose = true
|
|
|
} else {
|
|
|
this.isShowClose = false
|
|
@@ -353,7 +383,7 @@ export default {
|
|
|
},
|
|
|
delInputText() {
|
|
|
//清除输入框内容
|
|
|
- this.searchInputVal = ''
|
|
|
+ this.listQuery.name = ''
|
|
|
this.isShowClose = false
|
|
|
},
|
|
|
showBadge(n) {
|
|
@@ -377,11 +407,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.$api.getStorage().then(response => {
|
|
|
- this.serviceProviderId = response.serviceProviderId
|
|
|
- this.pageNum = 1
|
|
|
- this.GetSellerClubList()
|
|
|
- })
|
|
|
+ this.initGetStotage()
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -407,7 +433,7 @@ page,
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
- z-index: 999;
|
|
|
+ z-index: 99;
|
|
|
.search-top {
|
|
|
flex: 1;
|
|
|
display: flex;
|
|
@@ -522,7 +548,6 @@ page,
|
|
|
}
|
|
|
}
|
|
|
.club-main {
|
|
|
- padding-top: 374rpx;
|
|
|
.list {
|
|
|
width: 100%;
|
|
|
height: 268rpx;
|