club-inactive-list.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. <template>
  2. <view class="container club clearfix">
  3. <view class="club-main">
  4. <view v-if="isEmpty" class="empty-container">
  5. <image
  6. class="club-empty-image"
  7. src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"
  8. mode="aspectFit"
  9. ></image>
  10. <view class="txt">暂无机构数据</view>
  11. </view>
  12. <view v-else class="club-list">
  13. <scroll-view scroll-y="true">
  14. <view class="list" v-for="(club, index) in clubList" :key="index">
  15. <view class="list-cell-top">
  16. <view class="list-logo">
  17. <image
  18. :src="
  19. club.headpic
  20. ? club.headpic
  21. : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'
  22. "
  23. mode=""
  24. ></image>
  25. <text class="list-id">编号:{{ club.newClubId }}</text>
  26. </view>
  27. <view class="list-content">
  28. <view class="list-name">
  29. {{ club.userIdentity === 2 ? club.name : club.linkMan }}
  30. <text class="tags" v-if="club.vipFlag == 0 && club.userIdentity === 2">VIP</text>
  31. <text class="tags sv" v-if="club.vipFlag == 1">SVIP</text>
  32. <text class="tags xf" v-if="club.newDeal === 1">新分配</text>
  33. </view>
  34. <view class="list-tags">
  35. <text
  36. class="tags"
  37. @click.stop="
  38. this.$api.navigateTo('/pages/service/service?id=1041&title=标签说明')
  39. "
  40. >
  41. {{ club.activeState }} <text class="iconfont icon-xiayibu"></text>
  42. </text>
  43. <text
  44. class="tags"
  45. @click.stop="
  46. this.$api.navigateTo('/pages/service/service?id=1041&title=标签说明')
  47. "
  48. >
  49. {{ club.customerValue }} <text class="iconfont icon-xiayibu"></text>
  50. </text>
  51. <text class="tags-or" @click.stop="handleOrderHistory(club)">
  52. <text class="iconfont icon-dingdan"></text> 订单列表
  53. <text
  54. v-if="club.orderNum > 0"
  55. class="opea-badge uni-badge uni-badge-error uni-small uni-badge--small icon-num"
  56. >
  57. {{ showBadge(club.orderNum) }}
  58. </text>
  59. </text>
  60. </view>
  61. <view class="list-ntel" v-if="tabSmallCurrentIndex === 1">
  62. <text class="list-link">销售:{{ club.serviceName ? club.serviceName : '' }}</text>
  63. </view>
  64. <view class="list-ntel" v-if="tabSmallCurrentIndex !== 1">
  65. <text class="list-link">{{ club.linkMan ? club.linkMan : '' }}</text>
  66. <text class="list-texl" @click="handlePhone(club.contractMobile)">
  67. {{ club.contractMobile ? club.contractMobile : '' }}
  68. </text>
  69. </view>
  70. <view class="list-ntel" v-if="listQuery.type === 6">
  71. <text class="list-link">分配时间:{{ club.providerTime | dateConversion }}</text>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="club-list-bot">
  76. <view class="btn" @click.stop="handleClickOper(1, club)">
  77. <text class="iconfont icon-jigouhuaxiang"></text> 机构画像
  78. </view>
  79. <view class="btn" @click.stop="handleClickOper(3, club)">
  80. <text class="iconfont icon-shangcheng"></text> 商城访问记录
  81. </view>
  82. </view>
  83. </view>
  84. <!--加载loadding-->
  85. <tui-loadmore :visible="loadding" :index="3" type="black" />
  86. <tui-nomore :visible="!pullUpOn" bgcolor="#f7f7f7" :text="nomoreText" />
  87. </scroll-view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import { mapState, mapMutations } from 'vuex'
  94. import authorize from '@/common/config/authorize.js'
  95. import wxLogin from '@/common/config/wxLogin.js'
  96. const defaultListQuery = {
  97. pageNum: 1,
  98. pageSize: 10,
  99. serviceProviderId: 0
  100. }
  101. export default {
  102. data() {
  103. return {
  104. listQuery: Object.assign({}, defaultListQuery),
  105. isEmpty: false,
  106. nomoreText: '上拉显示更多',
  107. pageNum: 1,
  108. pageSize: 10,
  109. hasNextPage: false,
  110. loadding: false,
  111. pullUpOn: true,
  112. pullFlag: true,
  113. clubList: [],
  114. isIphoneX: this.$store.state.isIphoneX,
  115. CustomBar: this.CustomBar,
  116. StatusBar: this.StatusBar,
  117. capsule: this.capsule,
  118. }
  119. },
  120. filters: {
  121. dateConversion(val) {
  122. const date = new Date(val)
  123. const setZero = val => (val < 10 ? '0' + val : val)
  124. return `${date.getFullYear()}-${setZero(date.getMonth() + 1)}-${setZero(date.getDate())} ${setZero(
  125. date.getHours()
  126. )}:${setZero(date.getMinutes())}:${setZero(date.getSeconds())}`
  127. }
  128. },
  129. onLoad(option) {
  130. this.listQuery.serviceProviderId = option.serviceProviderId
  131. this.getUnActiveClubList()
  132. },
  133. computed: {
  134. ...mapState(['isManage'])
  135. },
  136. methods: {
  137. getUnActiveClubList() {
  138. this.SellerService.getUnActiveClubList(this.listQuery)
  139. .then(response => {
  140. let data = response.data
  141. if (data.list && data.list.length > 0) {
  142. this.isEmpty = false
  143. this.hasNextPage = response.data.hasNextPage
  144. this.clubList = data.list.map((el, index) => {
  145. el.bubble = false
  146. return el
  147. })
  148. this.pullFlag = false
  149. setTimeout(() => {
  150. this.pullFlag = true
  151. }, 500)
  152. if (this.hasNextPage) {
  153. this.pullUpOn = false
  154. this.nomoreText = '上拉显示更多'
  155. } else {
  156. this.pullUpOn = true
  157. this.loadding = false
  158. this.nomoreText = '已至底部'
  159. }
  160. } else {
  161. this.isEmpty = true
  162. }
  163. })
  164. .catch(error => {
  165. this.$util.msg(error.msg, 2000)
  166. })
  167. },
  168. getOnReachBottomData() {
  169. this.listQuery.pageNum += 1
  170. this.SellerService.getUnActiveClubList(this.listQuery)
  171. .then(response => {
  172. let data = response.data
  173. if (data.list && data.list.length > 0) {
  174. this.hasNextPage = response.data.hasNextPage
  175. this.clubList = this.clubList.concat(data.list)
  176. this.pullFlag = false // 防上拉暴滑
  177. setTimeout(() => {
  178. this.pullFlag = true
  179. }, 500)
  180. if (this.hasNextPage) {
  181. this.pullUpOn = false
  182. this.nomoreText = '上拉显示更多'
  183. } else {
  184. this.pullUpOn = false
  185. this.loadding = false
  186. this.nomoreText = '已至底部'
  187. }
  188. }
  189. })
  190. .catch(error => {
  191. this.$util.msg(error.msg, 2000)
  192. })
  193. },
  194. // 按钮操作
  195. handleClickOper(type, club) {
  196. /**
  197. * 1:机构画像 2:填写咨询记录 3:商城访问记录 4:修改资料 5:更换协销
  198. * */
  199. console.log('type', type)
  200. switch (type) {
  201. case 1:
  202. this.$api.navigateTo(`/pages/seller/club/club-portrait?userId=${club.userId}`)
  203. break
  204. case 3:
  205. this.$api.navigateTo(`/pages/seller/club/club-visit?clubId=${club.clubId}`)
  206. break
  207. }
  208. },
  209. handleOrderHistory(club) {
  210. //跳转机构历史订单
  211. this.$api.setStorage('orderUserInfo', club)
  212. this.$api.navigateTo(`/pages/seller/order/order-historylist?clubId=${club.clubId}&listType=0`)
  213. },
  214. // 拨打电话
  215. handlePhone(phoneNumber) {
  216. uni.makePhoneCall({
  217. phoneNumber: phoneNumber //拨打电话
  218. })
  219. },
  220. showBadge(n) {
  221. let num = ''
  222. if (n > 100) {
  223. num = 99
  224. } else {
  225. num = n
  226. }
  227. return num
  228. },
  229. },
  230. onReachBottom() {
  231. if (this.hasNextPage) {
  232. this.loadding = true
  233. this.pullUpOn = true
  234. this.getOnReachBottomData()
  235. }
  236. },
  237. onShow() {
  238. wxLogin.wxLoginAuthorize()
  239. }
  240. }
  241. </script>
  242. <style lang="scss">
  243. page {
  244. height: auto;
  245. }
  246. page,
  247. .container {
  248. /* padding-bottom: 120upx; */
  249. background: #ffffff;
  250. }
  251. .container {
  252. position: relative;
  253. }
  254. .club-main {
  255. .list {
  256. width: 100%;
  257. height: 320rpx;
  258. padding: 24rpx;
  259. box-sizing: border-box;
  260. background: #ffffff;
  261. position: relative;
  262. border-bottom: 1px solid #ebebeb;
  263. .list-cell-top {
  264. width: 100%;
  265. height: 140rpx;
  266. box-sizing: border-box;
  267. .list-logo {
  268. width: 140rpx;
  269. height: 140rpx;
  270. float: left;
  271. position: relative;
  272. image {
  273. width: 140rpx;
  274. height: 140rpx;
  275. border-radius: 8rpx;
  276. }
  277. .list-id {
  278. display: inline-block;
  279. width: 100%;
  280. height: 32rpx;
  281. line-height: 32rpx;
  282. background: rgba(0, 0, 0, 0.1);
  283. color: #333;
  284. position: absolute;
  285. top: 0;
  286. left: 0;
  287. box-sizing: border-box;
  288. text-align: left;
  289. font-size: 20rpx;
  290. padding-left: 4rpx;
  291. border-radius: 8rpx 8rpx 0 0;
  292. }
  293. }
  294. .list-content {
  295. width: 560rpx;
  296. height: 190rpx;
  297. float: left;
  298. padding-left: 20rpx;
  299. box-sizing: border-box;
  300. .list-name {
  301. width: 100%;
  302. height: 50rpx;
  303. float: left;
  304. line-height: 50rpx;
  305. text-align: left;
  306. font-size: $font-size-26;
  307. color: #333333;
  308. .tags {
  309. display: inline-block;
  310. height: 36rpx;
  311. box-sizing: border-box;
  312. padding: 0 15rpx;
  313. border-radius: 8rpx;
  314. background: #f0cb72;
  315. font-size: $font-size-22;
  316. color: #4e4539;
  317. text-align: center;
  318. line-height: 36rpx;
  319. margin-left: 20rpx;
  320. margin-top: 7rpx;
  321. &.sv {
  322. background: #333333;
  323. color: #f0cb72;
  324. }
  325. &.xf {
  326. background-color: #f94b4b;
  327. color: #ffffff;
  328. }
  329. }
  330. }
  331. .list-tags {
  332. width: 100%;
  333. height: 36rpx;
  334. float: left;
  335. line-height: 36rpx;
  336. margin: 7rpx 0;
  337. .tags {
  338. display: inline-block;
  339. height: 36rpx;
  340. box-sizing: border-box;
  341. padding: 0 8rpx 0 15rpx;
  342. border-radius: 8rpx;
  343. background: #faede5;
  344. font-size: $font-size-22;
  345. color: $color-system;
  346. text-align: center;
  347. line-height: 36rpx;
  348. margin-right: 16rpx;
  349. .icon-xiayibu {
  350. font-size: 20rpx;
  351. margin-left: 10rpx;
  352. }
  353. }
  354. .tags-or {
  355. display: inline-block;
  356. height: 36rpx;
  357. box-sizing: border-box;
  358. font-size: $font-size-22;
  359. color: #1890f9;
  360. text-align: center;
  361. line-height: 36rpx;
  362. position: relative;
  363. .opea-badge {
  364. position: absolute;
  365. right: -30rpx;
  366. top: -15rpx;
  367. }
  368. .icon-xiayibu {
  369. font-size: 22rpx;
  370. color: #1890f9;
  371. }
  372. }
  373. }
  374. .list-ntel {
  375. width: 100%;
  376. height: 50rpx;
  377. float: left;
  378. line-height: 50rpx;
  379. text-align: left;
  380. font-size: $font-size-24;
  381. color: #666666;
  382. .list-link {
  383. display: inline-block;
  384. float: left;
  385. margin-right: 12rpx;
  386. }
  387. .list-texl {
  388. display: inline-block;
  389. float: left;
  390. text-decoration: underline;
  391. }
  392. }
  393. }
  394. }
  395. .club-list-bot {
  396. width: 100%;
  397. height: 80rpx;
  398. float: left;
  399. background-color: #f7f7f7;
  400. border-radius: 8rpx;
  401. .btn {
  402. height: 80rpx;
  403. box-sizing: border-box;
  404. line-height: 80rpx;
  405. padding: 0 20rpx;
  406. font-size: $font-size-24;
  407. color: #333333;
  408. text-align: center;
  409. float: left;
  410. position: relative;
  411. &:nth-child(1) {
  412. &:before {
  413. content: '';
  414. width: 1px;
  415. height: 20rpx;
  416. background-color: #b2b2b2;
  417. position: absolute;
  418. right: 0;
  419. top: 30rpx;
  420. }
  421. }
  422. &:nth-child(2) {
  423. &:before {
  424. content: '';
  425. width: 1px;
  426. height: 20rpx;
  427. background-color: #b2b2b2;
  428. position: absolute;
  429. right: 0;
  430. top: 30rpx;
  431. }
  432. }
  433. &:nth-child(3) {
  434. &:before {
  435. content: '';
  436. width: 1px;
  437. height: 20rpx;
  438. background-color: #b2b2b2;
  439. position: absolute;
  440. right: 0;
  441. top: 30rpx;
  442. }
  443. }
  444. &:last-child {
  445. padding: 0 28rpx;
  446. .iconfont {
  447. font-weight: bold;
  448. }
  449. .btn-bubble {
  450. width: 200rpx;
  451. height: 160rpx;
  452. background: rgba(51, 51, 51, 0.8);
  453. position: absolute;
  454. top: -154rpx;
  455. right: 0;
  456. border-radius: 8rpx;
  457. &:before {
  458. content: '';
  459. width: 0;
  460. height: 0;
  461. border: 15rpx solid transparent;
  462. border-top: 15rpx solid rgba(51, 51, 51, 0.8);
  463. position: absolute;
  464. bottom: -26rpx;
  465. right: 35rpx;
  466. }
  467. .btn-view {
  468. width: 100%;
  469. height: 80rpx;
  470. box-sizing: border-box;
  471. line-height: 80rpx;
  472. font-size: $font-size-24;
  473. color: #ffffff;
  474. text-align: center;
  475. float: left;
  476. .iconfont {
  477. font-size: 28rpx;
  478. color: #ffffff;
  479. margin-right: 5rpx;
  480. font-weight: normal;
  481. }
  482. &.border {
  483. border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  484. }
  485. }
  486. }
  487. }
  488. &.none {
  489. &::before {
  490. background-color: #f7f7f7 !important;
  491. }
  492. }
  493. .iconfont {
  494. font-size: 30rpx;
  495. color: #333333;
  496. margin-right: 5rpx;
  497. }
  498. }
  499. }
  500. }
  501. }
  502. .nav_active {
  503. color: $color-system;
  504. }
  505. </style>