institutionalTeam.vue 14 KB

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