partner.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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="list" :is-scroll="true" active-color="#333" inactive-color="#999" :current="current"
  10. :show-bar="false" @change="change"
  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="i in 10" :key="i" @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">ZhangXiLin</text>
  37. </view>
  38. <text>2025.05.21 12:00:59 出单</text>
  39. </view>
  40. <view class="card-data dis a-c j-s ">
  41. <view class="view dis f-c a-c ">
  42. <text>wangxiaoyu</text>
  43. <text>代理人</text>
  44. </view>
  45. <view class="view dis f-c a-c ">
  46. <text>22,552.87</text>
  47. <text>保费</text>
  48. </view>
  49. <view class="view dis f-c a-c ">
  50. <text>152.87</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. list: [{
  129. name: '我是创始人'
  130. }, {
  131. name: '我是管理人'
  132. },
  133. {
  134. name: '我是合伙人'
  135. },
  136. {
  137. name: '我是工作室'
  138. }
  139. ],
  140. current: 0,
  141. dialogContent: '',
  142. ShowalertDialog: false,
  143. relativeLeavl: null,
  144. ShowModal: false,
  145. ShowModalCode: false,
  146. ShowModalCode1: false,
  147. ShowModalCodebusiness: false,
  148. chineseNumbers: ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
  149. teamTabIndex: 0,
  150. directLsit: [{
  151. partnerNumber: 1
  152. },
  153. {
  154. partnerNumber: 2
  155. }
  156. ],
  157. source: 0,
  158. totalPages: 0,
  159. totalSize: 0,
  160. status: 'loadmore',
  161. pageRequest: { //查询的默认条件
  162. pageNum: 1,
  163. pageSize: 20,
  164. userName: ''
  165. },
  166. partnerImg: '',
  167. workImg: '',
  168. directLsitOne: {},
  169. directLsitTwo: {},
  170. directLsitThree: {},
  171. directLsitFour: {},
  172. userLevel: "",
  173. styles: [{
  174. value: '1',
  175. text: '渠道',
  176. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  177. checked: true
  178. },
  179. {
  180. value: '2',
  181. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  182. text: '个代'
  183. }
  184. ],
  185. deptSource: 1
  186. }
  187. },
  188. async onLoad(params) {
  189. this.queryData()
  190. this.userLevel = this.userInfo.sysUser.level
  191. },
  192. methods: {
  193. change(index) {
  194. this.current = index;
  195. },
  196. dialogClose() {
  197. this.$refs.alertDialog.close()
  198. },
  199. styleChange(e) {
  200. this.deptSource = e.detail.value
  201. },
  202. dialogConfirm() {
  203. this.ShowModalCode = true
  204. this.$refs.alertDialog.close()
  205. this.partnerImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applypartner?level=" + this
  206. .level + '&userId=' + this.userInfo.sysUser.userId, {
  207. size: parseInt(200) //二维码大小
  208. })
  209. },
  210. ShowModalCodeFun(level, relativeLeavl) {
  211. // 绝对等级:level 相对等级:relativeLeavl
  212. this.level = level
  213. this.relativeLeavl = relativeLeavl
  214. // this.ShowalertDialog=true
  215. this.dialogContent = `是否招募${this.chineseNumbers[relativeLeavl]}级合伙人?`
  216. this.$refs.alertDialog.open()
  217. },
  218. ShowModalCodeSumbit() {
  219. this.ShowModalCode1 = true
  220. this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this
  221. .deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  222. size: parseInt(200) //二维码大小
  223. })
  224. },
  225. ShowModalCodeworkFun() {
  226. this.ShowModalCodebusiness = true
  227. this.deptSource = 1
  228. },
  229. // partnersAndStudios(level){
  230. // this.level=level
  231. // this.ShowModal = true
  232. // },
  233. // recruitment(level) {
  234. // this.level = level
  235. // this.ShowModalCodeFun(level)
  236. // },
  237. back() {
  238. uni.navigateBack({
  239. delta: 1, // 返回的页面数,如果是1表示返回上一页
  240. success: function() {}
  241. });
  242. },
  243. backHome() {
  244. uni.switchTab({
  245. url: "/pages/index/index"
  246. })
  247. },
  248. partnerDetail() {
  249. uni.navigateTo({
  250. url: "/pages/institutional/partnerDetail"
  251. })
  252. },
  253. closeInstitution(item, level) {
  254. if (item.leaderIds.length > 0) {
  255. item.level = level
  256. uni.navigateTo({
  257. url: "/pages/institutional/institutionalTeam?key=" + encodeURIComponent(JSON.stringify(
  258. item))
  259. })
  260. }
  261. },
  262. // onReachBottom() {
  263. // if (this.pageRequest.pageNum >= this.totalPages) return;
  264. // this.status = 'loading';
  265. // this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  266. // setTimeout(async () => {
  267. // let res = await this.$http.post('/sysPartner/querySysPartnerAPPPage', {
  268. // ...this.pageRequest,
  269. // source:this.source
  270. // });
  271. // if (res.code == '200') {
  272. // this.totalSize = res.data.totalSize;
  273. // this.directLsit = [...this.directLsit, ...res.data.content];
  274. // }
  275. // if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  276. // else this.status = 'loading';
  277. // }, 1000)
  278. // },
  279. async queryData(data) {
  280. let params = {
  281. beginTime: data && data.beginTime || '',
  282. endTime: data && data.endTime || '',
  283. partnerType: data && data.partnerType || '',
  284. industrySector: data && data.industrySector || '',
  285. // ...this.pageRequest
  286. }
  287. let res = await this.$http.post('/APPPartner/info', params);
  288. if (res.code == '200') {
  289. res.data.forEach(e => {
  290. switch (e.partnerType) {
  291. case 2:
  292. this.directLsitOne = e
  293. break;
  294. case 3:
  295. this.directLsitTwo = e
  296. break;
  297. case 4:
  298. this.directLsitThree = e
  299. break;
  300. case 5:
  301. this.directLsitFour = e
  302. break;
  303. default:
  304. break;
  305. }
  306. })
  307. // this.directLsit=res.data
  308. // this.totalPages = res.data.totalPages;
  309. // this.totalSize = res.data.totalSize;
  310. // if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
  311. // else this.status = 'loadmore';
  312. }
  313. },
  314. }
  315. }
  316. </script>
  317. <style lang="scss" scoped>
  318. .headers {
  319. position: fixed;
  320. top: 0;
  321. left: 0;
  322. height: auto;
  323. width: 100%;
  324. z-index: 999999;
  325. padding: 30rpx;
  326. padding-top: 50px;
  327. text {
  328. font-size: 36rpx;
  329. font-weight: bold;
  330. color: #000;
  331. }
  332. .headers-activeTab {
  333. width: 80%;
  334. }
  335. .right {
  336. position: absolute;
  337. right: 30rpx;
  338. image {
  339. width: 28rpx;
  340. height: 28rpx;
  341. margin-right: 4rpx;
  342. }
  343. text {
  344. font-weight: 400;
  345. color: #000;
  346. font-size: 24rpx;
  347. }
  348. }
  349. }
  350. //头部背景
  351. .homeBackground {
  352. position: fixed;
  353. top: 0;
  354. left: 0;
  355. z-index: 999;
  356. width: 100%;
  357. height: 176rpx;
  358. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  359. border-bottom: 1rpx solid #f2f2f2;
  360. }
  361. //时间筛选
  362. .filterTime {
  363. position: fixed;
  364. top: 176rpx;
  365. left: 0;
  366. width: 100%;
  367. z-index: 999;
  368. background: #fff;
  369. border-radius: 0rpx 0rpx 0rpx 0rpx;
  370. padding: 20rpx 30rpx;
  371. box-sizing: border-box;
  372. text:first-child {
  373. font-size: 26 rpx;
  374. color: #333;
  375. }
  376. text:last-child {
  377. font-size: 19rpx;
  378. color: #666;
  379. margin-left: 4rpx;
  380. }
  381. }
  382. //业绩
  383. .performance {
  384. position: fixed;
  385. top: 266rpx;
  386. left: 0;
  387. z-index: 999;
  388. width: 100%;
  389. height: 60rpx;
  390. background: #EBF4FF;
  391. border-radius: 0rpx 0rpx 0rpx 0rpx;
  392. font-size: 30rpx;
  393. color: #2B67EF;
  394. }
  395. .partner-head {
  396. background: #FFFFFF;
  397. color: #333333;
  398. font-size: 14px;
  399. i {
  400. margin-left: 2px;
  401. display: inline-block;
  402. width: 0;
  403. height: 0;
  404. border: 4px solid;
  405. border-color: #666666;
  406. border-bottom: 4px solid transparent;
  407. border-right: 4px solid transparent;
  408. border-left: 4px solid transparent;
  409. }
  410. }
  411. .sum-insurance {
  412. padding: 10px 0;
  413. view {
  414. text-align: center;
  415. width: 33.33%;
  416. border-right: 1px solid #EEEEEE;
  417. text {
  418. display: block;
  419. }
  420. text:first-child {
  421. font-weight: 600;
  422. font-size: 18px;
  423. color: #333333;
  424. }
  425. text:last-child {
  426. font-size: 10px;
  427. color: #999999;
  428. }
  429. }
  430. }
  431. //列表数据
  432. .card {
  433. background: #FFFFFF;
  434. border-radius: 10rpx;
  435. background-image: url("/static/card.png");
  436. background-size: 100% 100%;
  437. border-top: 1px solid;
  438. border-image: linear-gradient(270deg, rgba(45, 109, 255, 0), rgba(45, 109, 255, 1), rgba(45, 109, 255, 0)) 1 1;
  439. padding: 20rpx 30rpx 30rpx;
  440. .card-title {
  441. .avatar {
  442. width: 40rpx;
  443. height: 40rpx;
  444. border-radius: 50%;
  445. image {
  446. width: 100%;
  447. height: 100%;
  448. }
  449. }
  450. >text {
  451. font-size: 24rpx;
  452. color: #666;
  453. }
  454. .name {
  455. font-size: 30rpx;
  456. color: #333;
  457. font-weight: bold;
  458. }
  459. }
  460. .card-data {
  461. .view {
  462. width: 33.33%;
  463. text:first-child {
  464. font-size: 30rpx;
  465. color: #333;
  466. font-weight: bold;
  467. }
  468. text:last-child {
  469. font-size: 24rpx;
  470. color: #999;
  471. }
  472. }
  473. .view:nth-child(2) {
  474. border-left: 1rpx solid #eee;
  475. border-right: 1rpx solid #eee;
  476. }
  477. }
  478. }
  479. .popup-code {
  480. text {
  481. display: block;
  482. border-bottom: 1px solid #EEEEEE;
  483. height: 50px;
  484. line-height: 50px;
  485. text-align: center;
  486. font-size: 16px;
  487. color: #666666;
  488. }
  489. }
  490. .ShowModalCode-style {
  491. text:first-of-type {
  492. display: block;
  493. font-weight: 600;
  494. font-size: 16px;
  495. color: #333333;
  496. border: 1px solid #EEEEEE;
  497. padding: 15px;
  498. text-align: center;
  499. }
  500. }
  501. .popup-code {
  502. text {
  503. display: block;
  504. border-bottom: 1px solid #EEEEEE;
  505. height: 50px;
  506. line-height: 50px;
  507. text-align: center;
  508. font-size: 16px;
  509. color: #666666;
  510. }
  511. }
  512. .ShowModalCode-con {
  513. padding: 30px;
  514. text-align: center;
  515. image {
  516. margin: 0 auto;
  517. margin-top: 15px;
  518. }
  519. }
  520. </style>