partner.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  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/customerService.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 ">
  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">
  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. </view>
  106. </template>
  107. <script>
  108. import myDatePicker from '../components/date-picker.vue';
  109. import seach from '../components/seach.vue';
  110. import QR from "@/common/wxqrcode.js"
  111. import {
  112. mapState,
  113. mapMutations
  114. } from "vuex"
  115. // import uniPopup from 'x../../../components/';
  116. // import card from '../components/card.vue'
  117. export default {
  118. components: {
  119. myDatePicker,
  120. seach
  121. },
  122. computed: {
  123. ...mapState(['userInfo', "userCheckInfo", ]),
  124. },
  125. data() {
  126. return {
  127. //tab选项
  128. tablist: [], //动态tab
  129. personlist: [],
  130. current: 0,
  131. dialogContent: '',
  132. ShowalertDialog: false,
  133. relativeLeavl: null,
  134. ShowModal: false,
  135. ShowModalCode: false,
  136. ShowModalCode1: false,
  137. ShowModalCodebusiness: false,
  138. chineseNumbers: ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
  139. teamTabIndex: 0,
  140. directLsit: [{
  141. partnerNumber: 1
  142. },
  143. {
  144. partnerNumber: 2
  145. }
  146. ],
  147. source: 0,
  148. totalPages: 0,
  149. totalSize: 0,
  150. status: 'loadmore',
  151. pageRequest: { //查询的默认条件
  152. pageNum: 1,
  153. pageSize: 20,
  154. userName: ''
  155. },
  156. partnerImg: '',
  157. workImg: '',
  158. directLsitOne: {},
  159. directLsitTwo: {},
  160. directLsitThree: {},
  161. directLsitFour: {},
  162. userLevel: "",
  163. styles: [{
  164. value: '1',
  165. text: '渠道',
  166. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  167. checked: true
  168. },
  169. {
  170. value: '2',
  171. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  172. text: '个代'
  173. }
  174. ],
  175. deptSource: 1
  176. }
  177. },
  178. async onLoad(params) {
  179. this.queryData(params.grade)
  180. this.userLevel = this.userInfo.sysUser.level
  181. },
  182. methods: {
  183. //数据格式化
  184. numberFormat(value) {
  185. return (value).toLocaleString('en-US');
  186. },
  187. change(index) {
  188. this.current = index;
  189. },
  190. dialogClose() {
  191. this.$refs.alertDialog.close()
  192. },
  193. styleChange(e) {
  194. this.deptSource = e.detail.value
  195. },
  196. dialogConfirm() {
  197. this.ShowModalCode = true
  198. this.$refs.alertDialog.close()
  199. this.partnerImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applypartner?level=" + this
  200. .level + '&userId=' + this.userInfo.sysUser.userId, {
  201. size: parseInt(200) //二维码大小
  202. })
  203. },
  204. ShowModalCodeFun(level, relativeLeavl) {
  205. // 绝对等级:level 相对等级:relativeLeavl
  206. this.level = level
  207. this.relativeLeavl = relativeLeavl
  208. // this.ShowalertDialog=true
  209. this.dialogContent = `是否招募${this.chineseNumbers[relativeLeavl]}级合伙人?`
  210. this.$refs.alertDialog.open()
  211. },
  212. ShowModalCodeSumbit() {
  213. this.ShowModalCode1 = true
  214. this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this
  215. .deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  216. size: parseInt(200) //二维码大小
  217. })
  218. },
  219. ShowModalCodeworkFun() {
  220. this.ShowModalCodebusiness = true
  221. this.deptSource = 1
  222. },
  223. back() {
  224. uni.navigateBack({
  225. delta: 1, // 返回的页面数,如果是1表示返回上一页
  226. success: function() {}
  227. });
  228. },
  229. backHome() {
  230. uni.switchTab({
  231. url: "/pages/index/index"
  232. })
  233. },
  234. partnerDetail() {
  235. uni.navigateTo({
  236. url: "/pages/institutional/partnerDetail"
  237. })
  238. },
  239. closeInstitution(item, level) {
  240. if (item.leaderIds.length > 0) {
  241. item.level = level
  242. uni.navigateTo({
  243. url: "/pages/institutional/institutionalTeam?key=" + encodeURIComponent(JSON.stringify(
  244. item))
  245. })
  246. }
  247. },
  248. //列表数据
  249. async queryData(grade) {
  250. let res = await this.$http.get('/newAppPartner/selectByGradeList?grade=' + grade, );
  251. if (res.code == '200') {
  252. this.tablist = res.data; //选项卡
  253. this.tablist.map(val => {
  254. val.gradeName = "我是" + val.gradeName;
  255. return val;
  256. })
  257. this.personlist = res.data[0].data; //页面赋值第一条数据
  258. }
  259. },
  260. }
  261. }
  262. </script>
  263. <style lang="scss" scoped>
  264. .headers {
  265. position: fixed;
  266. top: 0;
  267. left: 0;
  268. height: auto;
  269. width: 100%;
  270. z-index: 999999;
  271. padding: 30rpx;
  272. padding-top: 50px;
  273. text {
  274. font-size: 36rpx;
  275. font-weight: bold;
  276. color: #000;
  277. }
  278. .headers-activeTab {
  279. width: 80%;
  280. }
  281. .right {
  282. position: absolute;
  283. right: 30rpx;
  284. image {
  285. width: 28rpx;
  286. height: 28rpx;
  287. margin-right: 4rpx;
  288. }
  289. text {
  290. font-weight: 400;
  291. color: #000;
  292. font-size: 24rpx;
  293. }
  294. }
  295. }
  296. //头部背景
  297. .homeBackground {
  298. position: fixed;
  299. top: 0;
  300. left: 0;
  301. z-index: 999;
  302. width: 100%;
  303. height: 176rpx;
  304. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  305. border-bottom: 1rpx solid #f2f2f2;
  306. }
  307. //时间筛选
  308. .filterTime {
  309. position: fixed;
  310. top: 176rpx;
  311. left: 0;
  312. width: 100%;
  313. z-index: 999;
  314. background: #fff;
  315. border-radius: 0rpx 0rpx 0rpx 0rpx;
  316. padding: 20rpx 30rpx;
  317. box-sizing: border-box;
  318. text:first-child {
  319. font-size: 26 rpx;
  320. color: #333;
  321. }
  322. text:last-child {
  323. font-size: 19rpx;
  324. color: #666;
  325. margin-left: 4rpx;
  326. }
  327. }
  328. //业绩
  329. .performance {
  330. position: fixed;
  331. top: 266rpx;
  332. left: 0;
  333. z-index: 999;
  334. width: 100%;
  335. height: 60rpx;
  336. background: #EBF4FF;
  337. border-radius: 0rpx 0rpx 0rpx 0rpx;
  338. font-size: 30rpx;
  339. color: #2B67EF;
  340. }
  341. .partner-head {
  342. background: #FFFFFF;
  343. color: #333333;
  344. font-size: 14px;
  345. i {
  346. margin-left: 2px;
  347. display: inline-block;
  348. width: 0;
  349. height: 0;
  350. border: 4px solid;
  351. border-color: #666666;
  352. border-bottom: 4px solid transparent;
  353. border-right: 4px solid transparent;
  354. border-left: 4px solid transparent;
  355. }
  356. }
  357. .sum-insurance {
  358. padding: 10px 0;
  359. view {
  360. text-align: center;
  361. width: 33.33%;
  362. border-right: 1px solid #EEEEEE;
  363. text {
  364. display: block;
  365. }
  366. text:first-child {
  367. font-weight: 600;
  368. font-size: 18px;
  369. color: #333333;
  370. }
  371. text:last-child {
  372. font-size: 10px;
  373. color: #999999;
  374. }
  375. }
  376. }
  377. //列表数据
  378. .card {
  379. background: #FFFFFF;
  380. border-radius: 10rpx;
  381. background-image: url("/static/card.png");
  382. background-size: 100% 100%;
  383. border-top: 1px solid;
  384. border-image: linear-gradient(270deg, rgba(45, 109, 255, 0), rgba(45, 109, 255, 1), rgba(45, 109, 255, 0)) 1 1;
  385. padding: 20rpx 30rpx 30rpx;
  386. .card-title {
  387. .avatar {
  388. width: 40rpx;
  389. height: 40rpx;
  390. border-radius: 50%;
  391. image {
  392. width: 100%;
  393. height: 100%;
  394. }
  395. }
  396. >text {
  397. font-size: 24rpx;
  398. color: #666;
  399. }
  400. .name {
  401. font-size: 30rpx;
  402. color: #333;
  403. font-weight: bold;
  404. }
  405. }
  406. .card-data {
  407. .view {
  408. width: 33.33%;
  409. text:first-child {
  410. font-size: 30rpx;
  411. color: #333;
  412. font-weight: bold;
  413. }
  414. text:last-child {
  415. font-size: 24rpx;
  416. color: #999;
  417. }
  418. }
  419. .view:nth-child(2) {
  420. border-left: 1rpx solid #eee;
  421. border-right: 1rpx solid #eee;
  422. }
  423. }
  424. }
  425. .popup-code {
  426. text {
  427. display: block;
  428. border-bottom: 1px solid #EEEEEE;
  429. height: 50px;
  430. line-height: 50px;
  431. text-align: center;
  432. font-size: 16px;
  433. color: #666666;
  434. }
  435. }
  436. .ShowModalCode-style {
  437. text:first-of-type {
  438. display: block;
  439. font-weight: 600;
  440. font-size: 16px;
  441. color: #333333;
  442. border: 1px solid #EEEEEE;
  443. padding: 15px;
  444. text-align: center;
  445. }
  446. }
  447. .popup-code {
  448. text {
  449. display: block;
  450. border-bottom: 1px solid #EEEEEE;
  451. height: 50px;
  452. line-height: 50px;
  453. text-align: center;
  454. font-size: 16px;
  455. color: #666666;
  456. }
  457. }
  458. .ShowModalCode-con {
  459. padding: 30px;
  460. text-align: center;
  461. image {
  462. margin: 0 auto;
  463. margin-top: 15px;
  464. }
  465. }
  466. </style>