institutionalTeam.vue 16 KB

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