institutionalTeam.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <template>
  2. <view class="">
  3. <public-module></public-module>
  4. <view class="headers " :style="headerStyle">
  5. <view class="dis a-c j-start " style="padding: 0 15px;">
  6. <!-- <u-icon name="arrow-left" size="40" @tap="back"></u-icon> -->
  7. <text @tap="back">返回</text>
  8. <text
  9. style="margin: auto;">{{ parentData.level ? `工作室(${chineseNumbers[parentData.level - 1]}级合伙人)` : '我的工作室' }}</text>
  10. <text @tap="backHome">首页</text>
  11. </view>
  12. </view>
  13. <view class="body" style="background: #F8FAFE;margin-top: 85px;">
  14. <view class="partner-head">
  15. <seach @queryData="queryData" :directLsit='parentData' />
  16. </view>
  17. <!-- <card :cardData='directLsit'></card> -->
  18. <block v-for="(item, index) in directLsit" :key="index">
  19. <view class="card">
  20. <view style="padding: 10px 15px 0 10px">
  21. <view class="dis j-s card-title">
  22. <view>
  23. <text style="font-size: 16px;">{{ item.deptName }}({{ item.userName }})</text>
  24. <!-- <image v-if="parentData.partnerType==1 " style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie1.png" mode=""></image>
  25. <image v-if="parentData.partnerType==2 " style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie.png" mode=""></image>
  26. <image v-if="parentData.partnerType==3" style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie3.png" mode=""></image>
  27. <image v-if="parentData.partnerType==4" style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie4.png" mode=""></image> -->
  28. </view>
  29. <text v-if="item.teamManNum > 0" @click="detail(item)">详情
  30. <image style="display: inline-block; width: 9px;height:9px;vertical-align: -1px;"
  31. src="/static/icon/right.png" mode=""></image>
  32. </text>
  33. </view>
  34. <view style="padding:0 15px;font-size: 10px;
  35. color: #666666;font-weight: 600;">下级团队共计
  36. <text style="font-size: 12px;color: #333333;font-weight: 600;">{{ item.deptNum }}</text>
  37. </view>
  38. <view class="card-con dis j-c a-c">
  39. <view>
  40. <text>{{ item.suggestName || '未设置' }}</text>
  41. <text>推荐人</text>
  42. </view>
  43. <view>
  44. <text>{{ item.teamManNum }}</text>
  45. <text>会员总人数</text>
  46. </view>
  47. <view>
  48. <text>{{ item.sumPremium }}</text>
  49. <text>总保费</text>
  50. </view>
  51. <view style="border-right:none">
  52. <text>{{ item.extractFee }}</text>
  53. <text>我的佣金</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </block>
  59. <!-- <u-loadmore style="margin-top: 5px;" v-if="directLsit.length!=0" :status="status" />
  60. <o-empty v-if="directLsit.length==0" /> -->
  61. </view>
  62. <view id="_drag_button" class="drag" :style="'left: ' + left + 'px; top:' + top + 'px;'"
  63. @touchmove.stop.prevent="touchmove" @touchend="touchend">
  64. <image src="/static/code.png" mode="" @click.stop.prevent="btnClick"></image>
  65. <text>招募码</text>
  66. </view>
  67. <u-popup v-model="ShowModalCodebusiness" mode="bottom" border-radius="15">
  68. <view>
  69. <text class=" ShowModalCode-business">工作室业务</text>
  70. <view>
  71. <radio-group class="uni-list" @change="styleChange">
  72. <view v-for="(item, index) in styles" :key="index" class="uni-list-item">
  73. <view class="uni-list-item__container">
  74. <view class="uni-list-item__content">
  75. <text class="uni-list-item__content-title">{{ item.text }}</text>
  76. </view>
  77. <view class="uni-list-item__extra">
  78. <radio :value="item.value" :checked="item.checked" />
  79. </view>
  80. </view>
  81. <view class="uni-list-item__notestext">{{ item.notestext }}</view>
  82. </view>
  83. </radio-group>
  84. </view>
  85. <view class="ShowModalCode-sumbit" @click="ShowModalCodeSumbit()">确定</view>
  86. </view>
  87. </u-popup>
  88. <u-popup v-model="ShowModalCode1" mode="bottom" border-radius="15">
  89. <view class="ShowModalCode-style ">
  90. <text>{{deptSource==1?'渠道':'个代'}}工作室招募码</text>
  91. <view class=" ShowModalCode-con">
  92. <view>扫码加入</view>
  93. <image :src="workImg" mode="widthFix" lazy-load style="width: 150px;"></image>
  94. </view>
  95. </view>
  96. </u-popup>
  97. </view>
  98. </template>
  99. <script>
  100. import myDatePicker from '../components/date-picker.vue';
  101. import seach from '../components/seach.vue';
  102. import QR from "@/common/wxqrcode.js"
  103. import {
  104. mapState,
  105. mapMutations
  106. } from "vuex"
  107. // import card from '../components/card.vue'
  108. export default {
  109. components: { myDatePicker, seach },
  110. data() {
  111. return {
  112. ShowModalCodebusiness:false,
  113. ShowModalCode1:false,
  114. styles: [{
  115. value: '1',
  116. text: '渠道',
  117. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  118. checked: true
  119. },
  120. {
  121. value: '2',
  122. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  123. text: '个代'
  124. }
  125. ],
  126. deptSource: 1,
  127. workImg:'',
  128. top: 0,
  129. left: 0,
  130. width: 0,
  131. height: 0,
  132. offsetWidth: 0,
  133. offsetHeight: 0,
  134. windowWidth: 0,
  135. windowHeight: 0,
  136. isMove: true,
  137. edge: 10,
  138. startShow: false,
  139. year: [{
  140. lable: '日',
  141. startShow: false
  142. }, {
  143. lable: '月',
  144. startShow: false
  145. }, {
  146. lable: '季',
  147. startShow: false
  148. }, {
  149. lable: '年',
  150. startShow: false
  151. }, {
  152. lable: '自定义',
  153. startShow: false
  154. }],
  155. chineseNumbers: ['一', '二', '三', '四', '五', '六', '七', '八', '九'],
  156. headerStyle: {
  157. backgroundColor: 'transparent',
  158. backgroundImage: 'url("/static/beijing (2).png")',
  159. backgroundSize: 'cover',
  160. backgroundPosition: '',
  161. boxShadow: ''
  162. // 其他样式属性...
  163. },
  164. teamTabIndex: 0,
  165. directLsit: [],
  166. source: 0,
  167. totalPages: 0,
  168. totalSize: 0,
  169. status: 'loadmore',
  170. pageRequest: { //查询的默认条件
  171. pageNum: 1,
  172. pageSize: 20,
  173. userName: ''
  174. },
  175. parentData: {}
  176. }
  177. },
  178. computed: {
  179. ...mapState(['userInfo', "userCheckInfo",]),
  180. },
  181. async onLoad(e) {
  182. this.parentData = JSON.parse(decodeURIComponent(e.key));
  183. // this.parentData.partnerType=this.parentData.level+1
  184. console.log(this.parentData)
  185. this.queryData()
  186. },
  187. mounted() {
  188. const sys = uni.getSystemInfoSync();
  189. this.windowWidth = sys.windowWidth;
  190. this.windowHeight = sys.windowHeight;
  191. // #ifdef APP-PLUS
  192. this.existTabBar && (this.windowHeight -= 50);
  193. // #endif
  194. if (sys.windowTop) {
  195. this.windowHeight += sys.windowTop;
  196. }
  197. const query = uni.createSelectorQuery().in(this);
  198. query.select('#_drag_button').boundingClientRect(data => {
  199. this.width = data.width;
  200. this.height = data.height;
  201. this.offsetWidth = data.width / 2;
  202. this.offsetHeight = data.height / 2;
  203. this.left = this.windowWidth - this.width - this.edge;
  204. if (this.bottomPx * 1 > 0) {
  205. this.top = this.windowHeight - this.height - this.bottomPx;
  206. } else {
  207. this.top = this.windowHeight - this.height - this.edge;
  208. }
  209. }).exec();
  210. //避免部分情况下图片加载延迟导致高度渲染出错
  211. setTimeout(() => {
  212. const query = uni.createSelectorQuery().in(this);
  213. query.select('#_drag_button').boundingClientRect(data => {
  214. this.width = data.width;
  215. this.height = data.height;
  216. this.offsetWidth = data.width / 2;
  217. this.offsetHeight = data.height / 2;
  218. this.left = this.windowWidth - this.width - this.edge;
  219. if (this.bottomPx * 1 > 0) {
  220. this.top = this.windowHeight - this.height - this.bottomPx;
  221. } else {
  222. this.top = this.windowHeight - this.height - this.edge;
  223. }
  224. }).exec();
  225. }, 200);
  226. },
  227. methods: {
  228. backHome() {
  229. uni.switchTab({
  230. url: "/pages/index/index"
  231. })
  232. },
  233. styleChange(e) {
  234. this.deptSource = e.detail.value
  235. },
  236. btnClick() {
  237. this.ShowModalCodebusiness = true
  238. this.deptSource = 1
  239. },
  240. ShowModalCodeSumbit(){
  241. this. ShowModalCode1 = true
  242. this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this.deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  243. size: parseInt(200) //二维码大小
  244. })
  245. },
  246. touchmove(e) {
  247. // 单指触摸
  248. if (e.touches.length !== 1) {
  249. return false;
  250. }
  251. if (!this.isMove) {
  252. }
  253. this.isMove = true;
  254. this.left = e.touches[0].clientX - this.offsetWidth;
  255. let clientY = e.touches[0].clientY - this.offsetHeight;
  256. // #ifdef H5
  257. clientY += this.height;
  258. // #endif
  259. let edgeBottom = this.windowHeight - this.height - this.edge;
  260. // 上下触及边界
  261. if (clientY < this.edge) {
  262. this.top = this.edge;
  263. } else if (clientY > edgeBottom) {
  264. this.top = edgeBottom;
  265. } else {
  266. this.top = clientY
  267. }
  268. },
  269. touchend(e) {
  270. if (this.isDock) {
  271. let edgeRigth = this.windowWidth - this.width - this.edge;
  272. if (this.left < this.windowWidth / 2 - this.offsetWidth) {
  273. this.left = this.edge;
  274. } else {
  275. this.left = edgeRigth;
  276. }
  277. }
  278. if (this.isMove) {
  279. this.isMove = false;
  280. }
  281. },
  282. back() {
  283. uni.navigateBack({
  284. delta: 1, // 返回的页面数,如果是1表示返回上一页
  285. success: function () { }
  286. });
  287. },
  288. detail(item) {
  289. uni.navigateTo({
  290. url: "/pages/institutional/institutional?key=" + encodeURIComponent(JSON.stringify(item))
  291. })
  292. },
  293. onReachBottom() {
  294. if (this.pageRequest.pageNum >= this.totalPages) return;
  295. this.status = 'loading';
  296. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  297. setTimeout(async () => {
  298. let res = await this.$http.post('/sysPartner/querySysPartnerAPPPage', {
  299. ...this.pageRequest,
  300. source: this.source
  301. });
  302. if (res.code == '200') {
  303. this.totalSize = res.data.totalSize;
  304. this.directLsit = [...this.directLsit, ...res.data.content];
  305. }
  306. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  307. else this.status = 'loading';
  308. }, 1000)
  309. },
  310. async queryData(data) {
  311. let params = {
  312. beginTime: data && data.beginTime || '',
  313. endTime: data && data.endTime || '',
  314. leaderIds: this.parentData.leaderIds,
  315. level: this.parentData.partnerType + 1 || this.parentData.level + 1,
  316. industrySector: data && data.industrySector || '',
  317. // ...this.pageRequest
  318. }
  319. let res = await this.$http.post('/APPPartner/partnerLeaderInfo', params);
  320. if (res.code == '200') {
  321. this.directLsit = res.data.partnerInfoVoList
  322. this.parentData = { ...this.parentData, ...res.data }
  323. this.totalPages = res.data.totalPages;
  324. this.totalSize = res.data.totalSize;
  325. if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
  326. else this.status = 'loadmore';
  327. }
  328. },
  329. onShowDatePicker() { //显示
  330. this.showDatePicker = true;
  331. },
  332. }
  333. }
  334. </script>
  335. <style lang="scss" scoped>
  336. .headers {
  337. position: fixed;
  338. top: 0;
  339. left: 0;
  340. width: 100%;
  341. z-index: 999999;
  342. padding-top: 40px;
  343. height: 85px;
  344. text:nth-child(2){
  345. font-size: 18px;
  346. font-weight: bold;
  347. }
  348. }
  349. .partner-head {
  350. background: #FFFFFF;
  351. color: #333333;
  352. font-size: 14px;
  353. i {
  354. margin-left: 2px;
  355. display: inline-block;
  356. width: 0;
  357. height: 0;
  358. border: 4px solid;
  359. border-color: #666666;
  360. border-bottom: 4px solid transparent;
  361. border-right: 4px solid transparent;
  362. border-left: 4px solid transparent;
  363. }
  364. .search-data {
  365. color: #666666;
  366. .active {
  367. color: #FFFFFF;
  368. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  369. }
  370. text {
  371. // width: 25px;
  372. // height: 25px;
  373. // text-align: center;
  374. padding: 5px 8px;
  375. border: 1px solid #EEEEEE;
  376. }
  377. }
  378. }
  379. .sum-insurance {
  380. padding: 10px 0;
  381. view {
  382. text-align: center;
  383. width: 33.33%;
  384. border-right: 1px solid #EEEEEE;
  385. text {
  386. display: block;
  387. }
  388. text:first-child {
  389. font-weight: 600;
  390. font-size: 18px;
  391. color: #333333;
  392. }
  393. text:last-child {
  394. font-size: 10px;
  395. color: #999999;
  396. }
  397. }
  398. }
  399. .card {
  400. background: #FFFFFF;
  401. border-radius: 5px 5px 5px 5px;
  402. margin: 10px;
  403. background-image: url("/static/card.png");
  404. background-size: 100% 100%;
  405. border-top: 1px solid;
  406. border-image: linear-gradient(270deg, rgba(45, 217, 255, 0), rgba(45, 217, 255, 1), rgba(45, 217, 255, 0)) 1 1;
  407. .card-title {
  408. padding: 10px 15px;
  409. text:first-child {
  410. font-weight: 600;
  411. font-size: 16px;
  412. color: #333333;
  413. }
  414. text:last-child {
  415. font-size: 12px;
  416. color: #666666;
  417. }
  418. }
  419. .card-con {
  420. padding: 10px 0;
  421. view {
  422. text-align: center;
  423. width: 33.33%;
  424. border-right: 1px solid #EEEEEE;
  425. text {
  426. display: block;
  427. }
  428. text:first-child {
  429. font-weight: 600;
  430. font-size: 16px;
  431. color: #333333;
  432. line-height: 18px;
  433. }
  434. text:last-child {
  435. font-size: 10px;
  436. color: #999999;
  437. }
  438. }
  439. }
  440. }
  441. .drag {
  442. display: flex;
  443. flex-direction: column;
  444. justify-content: center;
  445. align-items: center;
  446. min-height: 80rpx;
  447. position: fixed;
  448. z-index: 999999;
  449. font-size: 12px;
  450. color: #FFFFFF;
  451. width: 50px;
  452. height: 50px;
  453. padding-top: 2px;
  454. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  455. border-radius: 3px 3px 3px 3px;
  456. image {
  457. display: inline-block;
  458. width: 23px;
  459. height: 23px;
  460. }
  461. &.transition {
  462. transition: left .3s ease, top .3s ease;
  463. }
  464. }
  465. .ShowModalCode-business {
  466. display: block;
  467. font-weight: 600;
  468. font-size: 16px;
  469. color: #333333;
  470. // border: 1px solid #EEEEEE;
  471. padding: 15px;
  472. text-align: center;
  473. }
  474. .ShowModalCode-con {
  475. padding: 30px;
  476. text-align: center;
  477. image {
  478. margin: 0 auto;
  479. margin-top: 15px;
  480. }
  481. }
  482. .uni-list {
  483. flex: 1;
  484. }
  485. .uni-list-item:first-child {
  486. /* #ifndef APP-NVUE */
  487. // display: flex;
  488. /* #endif */
  489. flex: 1;
  490. flex-direction: row;
  491. background-color: #FFFFFF;
  492. border-bottom-style: solid;
  493. border-bottom-width: 1px;
  494. border-bottom-color: #eee;
  495. }
  496. .uni-list-item__container {
  497. padding: 12px 15px;
  498. width: 100%;
  499. flex: 1;
  500. position: relative;
  501. /* #ifndef APP-NVUE */
  502. display: flex;
  503. box-sizing: border-box;
  504. /* #endif */
  505. flex-direction: row;
  506. justify-content: space-between;
  507. align-items: center;
  508. }
  509. .uni-list-item__notestext {
  510. padding: 0 15px 15px 15px;
  511. font-size: 15px;
  512. color: #666666;
  513. }
  514. .uni-list-item__content-title {
  515. font-size: 17px;
  516. color: #333333;
  517. }
  518. .ShowModalCode-sumbit {
  519. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  520. border-radius: 5px 5px 5px 5px;
  521. height: 40px;
  522. line-height: 40px;
  523. font-size: 16px;
  524. color: #FFFFFF;
  525. margin: 15px;
  526. text-align: center;
  527. }
  528. .ShowModalCode-style {
  529. text:first-of-type {
  530. display: block;
  531. font-weight: 600;
  532. font-size: 16px;
  533. color: #333333;
  534. border: 1px solid #EEEEEE;
  535. padding: 15px;
  536. text-align: center;
  537. }
  538. }
  539. .popup-code {
  540. text {
  541. display: block;
  542. border-bottom: 1px solid #EEEEEE;
  543. height: 50px;
  544. line-height: 50px;
  545. text-align: center;
  546. font-size: 16px;
  547. color: #666666;
  548. }
  549. }
  550. </style>