myEarnings.vue 12 KB

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