partner.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <template>
  2. <view class="">
  3. <!-- 全局 loding -->
  4. <public-module></public-module>
  5. <!-- 头部 -->
  6. <view class="headers dis a-c j-start">
  7. <u-icon name="arrow-left" color="#333" size="38" @click="back"></u-icon>
  8. <view class="headers-activeTab">
  9. <u-tabs :list="tablist" :is-scroll="true" active-color="#333" inactive-color="#999" :current="current"
  10. :show-bar="false" @change="change" name="gradeName"
  11. style="background: transparent;height: 80rpx;z-index: -1;"></u-tabs>
  12. </view>
  13. <view class="right dis a-c">
  14. <image src="/static/home/customerService1.png" mode=""></image>
  15. <text>客服</text>
  16. </view>
  17. </view>
  18. <view class="homeBackground"></view>
  19. <!-- 业绩 -->
  20. <view class="filterTime dis j-end a-c ">
  21. <view class=" dis a-c " @click="timeDropdownFilter">
  22. <text>时间筛选</text>
  23. <text>▼</text>
  24. </view>
  25. </view>
  26. <view class="performance dis a-c j-c ">
  27. 共有 5 笔订单,保费54252.25元,佣金569.35元
  28. </view>
  29. <view class="body p-2" style="padding-top: 340rpx;">
  30. <view class="card mb-2" v-for="(item,index) in personlist" :key="index" @click="partnerDetail(item.id)">
  31. <view class="card-title dis a-c j-s mb-2">
  32. <view class="dis a-c ">
  33. <view class="avatar">
  34. <image src="/static/image/my/wuxingb.png" mode=""></image>
  35. </view>
  36. <text class="name ml-1">{{item.userName}}</text>
  37. </view>
  38. <text>{{item.createTime}} &nbsp;加入</text>
  39. </view>
  40. <view class="card-data dis a-c j-s ">
  41. <view class="view dis f-c a-c ">
  42. <text>{{item.number}}</text>
  43. <text>{{item.gradeName}}</text>
  44. </view>
  45. <view class="view dis f-c a-c ">
  46. <text>{{numberFormat(item.premium || 0 )}}</text>
  47. <text>保费</text>
  48. </view>
  49. <view class="view dis f-c a-c ">
  50. <text>{{numberFormat(item.commission || 0 )}}</text>
  51. <text>我的佣金</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <u-popup v-model="ShowModal" mode="bottom" border-radius="15">
  57. <view class="popup-code">
  58. <text @click="ShowModalCodeFun(level)">合伙人</text>
  59. <text @click="ShowModalCodeworkFun">工作室</text>
  60. </view>
  61. </u-popup>
  62. <u-popup v-model="ShowModalCode" mode="bottom" border-radius="15">
  63. <view class="ShowModalCode-style ">
  64. <text>{{chineseNumbers[relativeLeavl]}}级合伙人招募码</text>
  65. <view class=" ShowModalCode-con">
  66. <view>扫码加入</view>
  67. <image :src="partnerImg" mode="widthFix" lazy-load style="width: 150px;"></image>
  68. </view>
  69. </view>
  70. </u-popup>
  71. <u-popup v-model="ShowModalCodebusiness" mode="bottom" border-radius="15">
  72. <view>
  73. <text class=" ShowModalCode-business">工作室业务</text>
  74. <view>
  75. <radio-group class="uni-list" @change="styleChange">
  76. <view v-for="(item, index) in styles" :key="index" class="uni-list-item">
  77. <view class="uni-list-item__container">
  78. <view class="uni-list-item__content">
  79. <text class="uni-list-item__content-title">{{ item.text }}</text>
  80. </view>
  81. <view class="uni-list-item__extra">
  82. <radio :value="item.value" :checked="item.checked" />
  83. </view>
  84. </view>
  85. <view class="uni-list-item__notestext">{{ item.notestext }}</view>
  86. </view>
  87. </radio-group>
  88. </view>
  89. <view class="ShowModalCode-sumbit" @click="ShowModalCodeSumbit()">确定</view>
  90. </view>
  91. </u-popup>
  92. <u-popup v-model="ShowModalCode1" mode="bottom" border-radius="15">
  93. <view class="ShowModalCode-style ">
  94. <text>工作室招募码</text>
  95. <view class=" ShowModalCode-con">
  96. <view>扫码加入</view>
  97. <image :src="workImg" mode="widthFix" lazy-load style="width:150px;"></image>
  98. </view>
  99. </view>
  100. </u-popup>
  101. <u-popup mode="center" ref="alertDialog" type="dialog">
  102. <uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title=" " :content="dialogContent"
  103. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  104. </u-popup>
  105. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  106. </view>
  107. </template>
  108. <script>
  109. import myDatePicker from '../components/date-picker.vue';
  110. import seach from '../components/seach.vue';
  111. import QR from "@/common/wxqrcode.js"
  112. import {
  113. mapState,
  114. mapMutations
  115. } from "vuex"
  116. // import uniPopup from 'x../../../components/';
  117. // import card from '../components/card.vue'
  118. export default {
  119. components: {
  120. myDatePicker,
  121. seach
  122. },
  123. computed: {
  124. ...mapState(['userInfo', "userCheckInfo", ]),
  125. },
  126. data() {
  127. return {
  128. //tab选项
  129. tablist: [], //动态tab
  130. personlist: [],
  131. current: 0,
  132. dialogContent: '',
  133. ShowalertDialog: false,
  134. relativeLeavl: null,
  135. ShowModal: false,
  136. ShowModalCode: false,
  137. ShowModalCode1: false,
  138. ShowModalCodebusiness: false,
  139. chineseNumbers: ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
  140. teamTabIndex: 0,
  141. directLsit: [{
  142. partnerNumber: 1
  143. },
  144. {
  145. partnerNumber: 2
  146. }
  147. ],
  148. source: 0,
  149. totalPages: 0,
  150. totalSize: 0,
  151. status: 'loadmore',
  152. pageRequest: { //查询的默认条件
  153. pageNum: 1,
  154. pageSize: 20,
  155. userName: ''
  156. },
  157. partnerImg: '',
  158. workImg: '',
  159. directLsitOne: {},
  160. directLsitTwo: {},
  161. directLsitThree: {},
  162. directLsitFour: {},
  163. userLevel: "",
  164. styles: [{
  165. value: '1',
  166. text: '渠道',
  167. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  168. checked: true
  169. },
  170. {
  171. value: '2',
  172. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  173. text: '个代'
  174. }
  175. ],
  176. deptSource: 1,
  177. startTime: "",
  178. endTime: "",
  179. grade: "",
  180. }
  181. },
  182. async onLoad(params) {
  183. this.grade = params.grade;
  184. if (params.startTime) {
  185. this.startTime = params.startTime;
  186. this.endTime = params.endTime;
  187. }
  188. this.queryData();
  189. this.userLevel = this.userInfo.sysUser.level
  190. },
  191. methods: {
  192. //下拉筛选
  193. timeDropdownFilter() {
  194. this.$refs.datePicker.open()
  195. },
  196. //日期选择事件
  197. confirmPickDate(startdate, enddate) {
  198. this.startTime = startdate;
  199. this.endTime = enddate;
  200. this.queryData();
  201. },
  202. //数据格式化
  203. numberFormat(value) {
  204. return (value).toLocaleString('en-US');
  205. },
  206. change(index) {
  207. this.current = index;
  208. },
  209. dialogClose() {
  210. this.$refs.alertDialog.close()
  211. },
  212. styleChange(e) {
  213. this.deptSource = e.detail.value
  214. },
  215. dialogConfirm() {
  216. this.ShowModalCode = true
  217. this.$refs.alertDialog.close()
  218. this.partnerImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applypartner?level=" + this
  219. .level + '&userId=' + this.userInfo.sysUser.userId, {
  220. size: parseInt(200) //二维码大小
  221. })
  222. },
  223. ShowModalCodeFun(level, relativeLeavl) {
  224. // 绝对等级:level 相对等级:relativeLeavl
  225. this.level = level
  226. this.relativeLeavl = relativeLeavl
  227. // this.ShowalertDialog=true
  228. this.dialogContent = `是否招募${this.chineseNumbers[relativeLeavl]}级合伙人?`
  229. this.$refs.alertDialog.open()
  230. },
  231. ShowModalCodeSumbit() {
  232. this.ShowModalCode1 = true
  233. this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this
  234. .deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  235. size: parseInt(200) //二维码大小
  236. })
  237. },
  238. ShowModalCodeworkFun() {
  239. this.ShowModalCodebusiness = true
  240. this.deptSource = 1
  241. },
  242. back() {
  243. uni.navigateBack({
  244. delta: 1, // 返回的页面数,如果是1表示返回上一页
  245. success: function() {}
  246. });
  247. },
  248. backHome() {
  249. uni.switchTab({
  250. url: "/pages/index/index"
  251. })
  252. },
  253. partnerDetail(id) {
  254. uni.navigateTo({
  255. url: "/pages/institutional/partnerDetail?id=" + id,
  256. })
  257. },
  258. closeInstitution(item, level) {
  259. if (item.leaderIds.length > 0) {
  260. item.level = level
  261. uni.navigateTo({
  262. url: "/pages/institutional/institutionalTeam?key=" + encodeURIComponent(JSON.stringify(
  263. item))
  264. })
  265. }
  266. },
  267. //列表数据
  268. async queryData(grade) {
  269. let res = await this.$http.get('/newAppPartner/selectByGradeList?grade=' + this.grade + '&startTime=' +
  270. this
  271. .startTime + '&endTime=' + this.endTime, );
  272. if (res.code == '200') {
  273. this.tablist = res.data; //选项卡
  274. this.tablist.map(val => {
  275. val.gradeName = "我是" + val.gradeName;
  276. return val;
  277. })
  278. this.personlist = res.data[0].data; //页面赋值第一条数据
  279. }
  280. },
  281. }
  282. }
  283. </script>
  284. <style lang="scss" scoped>
  285. .headers {
  286. position: fixed;
  287. top: 0;
  288. left: 0;
  289. height: auto;
  290. width: 100%;
  291. z-index: 999999;
  292. padding: 30rpx;
  293. padding-top: 50px;
  294. text {
  295. font-size: 36rpx;
  296. font-weight: bold;
  297. color: #000;
  298. }
  299. .headers-activeTab {
  300. width: 80%;
  301. }
  302. .right {
  303. position: absolute;
  304. right: 30rpx;
  305. image {
  306. width: 28rpx;
  307. height: 28rpx;
  308. margin-right: 4rpx;
  309. }
  310. text {
  311. font-weight: 400;
  312. color: #000;
  313. font-size: 24rpx;
  314. }
  315. }
  316. }
  317. //头部背景
  318. .homeBackground {
  319. position: fixed;
  320. top: 0;
  321. left: 0;
  322. z-index: 999;
  323. width: 100%;
  324. height: 176rpx;
  325. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  326. border-bottom: 1rpx solid #f2f2f2;
  327. }
  328. //时间筛选
  329. .filterTime {
  330. position: fixed;
  331. top: 176rpx;
  332. left: 0;
  333. width: 100%;
  334. z-index: 999;
  335. background: #fff;
  336. border-radius: 0rpx 0rpx 0rpx 0rpx;
  337. padding: 20rpx 30rpx;
  338. box-sizing: border-box;
  339. text:first-child {
  340. font-size: 26 rpx;
  341. color: #333;
  342. }
  343. text:last-child {
  344. font-size: 19rpx;
  345. color: #666;
  346. margin-left: 4rpx;
  347. }
  348. }
  349. //业绩
  350. .performance {
  351. position: fixed;
  352. top: 266rpx;
  353. left: 0;
  354. z-index: 999;
  355. width: 100%;
  356. height: 60rpx;
  357. background: #EBF4FF;
  358. border-radius: 0rpx 0rpx 0rpx 0rpx;
  359. font-size: 30rpx;
  360. color: #2B67EF;
  361. }
  362. .partner-head {
  363. background: #FFFFFF;
  364. color: #333333;
  365. font-size: 14px;
  366. i {
  367. margin-left: 2px;
  368. display: inline-block;
  369. width: 0;
  370. height: 0;
  371. border: 4px solid;
  372. border-color: #666666;
  373. border-bottom: 4px solid transparent;
  374. border-right: 4px solid transparent;
  375. border-left: 4px solid transparent;
  376. }
  377. }
  378. .sum-insurance {
  379. padding: 10px 0;
  380. view {
  381. text-align: center;
  382. width: 33.33%;
  383. border-right: 1px solid #EEEEEE;
  384. text {
  385. display: block;
  386. }
  387. text:first-child {
  388. font-weight: 600;
  389. font-size: 18px;
  390. color: #333333;
  391. }
  392. text:last-child {
  393. font-size: 10px;
  394. color: #999999;
  395. }
  396. }
  397. }
  398. //列表数据
  399. .card {
  400. background: #FFFFFF;
  401. border-radius: 10rpx;
  402. background-image: url("/static/card.png");
  403. background-size: 100% 100%;
  404. border-top: 1px solid;
  405. border-image: linear-gradient(270deg, rgba(45, 109, 255, 0), rgba(45, 109, 255, 1), rgba(45, 109, 255, 0)) 1 1;
  406. padding: 20rpx 30rpx 30rpx;
  407. .card-title {
  408. .avatar {
  409. width: 40rpx;
  410. height: 40rpx;
  411. border-radius: 50%;
  412. image {
  413. width: 100%;
  414. height: 100%;
  415. }
  416. }
  417. >text {
  418. font-size: 24rpx;
  419. color: #666;
  420. }
  421. .name {
  422. font-size: 30rpx;
  423. color: #333;
  424. font-weight: bold;
  425. }
  426. }
  427. .card-data {
  428. .view {
  429. width: 33.33%;
  430. text:first-child {
  431. font-size: 30rpx;
  432. color: #333;
  433. font-weight: bold;
  434. }
  435. text:last-child {
  436. font-size: 24rpx;
  437. color: #999;
  438. }
  439. }
  440. .view:nth-child(2) {
  441. border-left: 1rpx solid #eee;
  442. border-right: 1rpx solid #eee;
  443. }
  444. }
  445. }
  446. .popup-code {
  447. text {
  448. display: block;
  449. border-bottom: 1px solid #EEEEEE;
  450. height: 50px;
  451. line-height: 50px;
  452. text-align: center;
  453. font-size: 16px;
  454. color: #666666;
  455. }
  456. }
  457. .ShowModalCode-style {
  458. text:first-of-type {
  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. }
  468. .popup-code {
  469. text {
  470. display: block;
  471. border-bottom: 1px solid #EEEEEE;
  472. height: 50px;
  473. line-height: 50px;
  474. text-align: center;
  475. font-size: 16px;
  476. color: #666666;
  477. }
  478. }
  479. .ShowModalCode-con {
  480. padding: 30px;
  481. text-align: center;
  482. image {
  483. margin: 0 auto;
  484. margin-top: 15px;
  485. }
  486. }
  487. </style>