commission.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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 style="margin: auto;">佣金总收入</text>
  8. </view>
  9. </view>
  10. <view class="body" style="background: #F8FAFE;margin-top: 85px;">
  11. <view class="partner-head">
  12. <view class=" dis j-s search">
  13. <!-- <text>收入种类<i></i></text> -->
  14. <text style="margin-right: 10px;" @click="industryShow = true">{{industryData}}<i></i></text>
  15. <u-select mode="single-column" :list="industryoptions" v-model="industryShow" label-name="lable"
  16. value-name="value" @confirm="industryopConfirm($event)"></u-select>
  17. <text @click="$refs.datePicker.open()">自定义时间<i></i></text>
  18. </view>
  19. </view>
  20. <block>
  21. <view class="content">
  22. <view class="options" v-for="val in withdrawalData" :key="val" @click="view(val)">
  23. <view class="dis">
  24. <view class="left">
  25. <image v-if='val.industrySector==1' src="/static/image/my/qiche.png" mode=""></image>
  26. <image v-else src="/static/image/my/caixian.png" mode=""></image>
  27. {{val.licenseno}}
  28. <view class="type">{{val.industrySector==1?'(车险)':'(财险)'}}</view>
  29. </view>
  30. <view class="right">
  31. {{val.createTime}}
  32. </view>
  33. <!-- <view>
  34. <view style="line-height: 18px;">{{val.industrySector==1?'汽车-车险':'保险-财险'}}</view>
  35. <text style="font-size: 10px;color: #999999;">{{val.createTime}}</text>
  36. </view> -->
  37. </view>
  38. <view class="contribution">
  39. <view class="contribution_left">
  40. 贡献合伙人
  41. <text v-if="val.profferLevel-userLevel==0">无</text>
  42. <text v-if="val.profferLevel-userLevel==1">一级合伙人</text>
  43. <text v-if="val.profferLevel-userLevel==2">二级合伙人</text>
  44. <text v-if="val.profferLevel-userLevel==3">三级合伙人</text>
  45. <text v-if="val.profferLevel-userLevel==4">四级合伙人</text>
  46. </view>
  47. <view class="contribution_right">
  48. {{val.extractFee}}
  49. </view>
  50. </view>
  51. <view class="dividend">
  52. <view class="dividend_left">
  53. 分红合伙人
  54. </view>
  55. <view class="dividend_right">
  56. <view class="dividend_options" v-for="(item,index) in val.profferList" :key="index">
  57. <!-- <text v-if="item.source == 1">我的佣金</text>
  58. <text v-if="item.source == 2">一级合伙人</text>
  59. <text v-if="item.source == 3">二级合伙人</text>
  60. <text v-if="item.source == 4">三级合伙人</text>
  61. <text v-if="item.source == 5">四级合伙人</text> -->
  62. <text v-if="index ==0"> 我的佣金</text>
  63. <text v-if="item.source-userLevel ==1"> 一级合伙人</text>
  64. <text v-if="item.source-userLevel ==2"> 二级合伙人</text>
  65. <text v-if="item.source-userLevel ==3"> 三级合伙人</text>
  66. <text v-if="item.source-userLevel ==4"> 四级合伙人</text>
  67. <!-- <text v-if="index !==0&&item.source ==5"> 五级合伙人</text> -->
  68. {{item.extractFee}}元
  69. </view>
  70. </view>
  71. </view>
  72. <!-- <text>{{val.extractFee}}</text> -->
  73. </view>
  74. </view>
  75. </block>
  76. <u-loadmore style="margin-top: 5px;" v-if="directLsit.length!=0" :status="status" />
  77. <o-empty v-if="directLsit.length==0" />
  78. </view>
  79. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  80. </view>
  81. </template>
  82. <script>
  83. import {
  84. mapState,
  85. } from "vuex"
  86. import myDatePicker from '../components/date-picker.vue';
  87. export default {
  88. components: {
  89. myDatePicker
  90. },
  91. computed: {
  92. ...mapState(['userInfo']),
  93. },
  94. data() {
  95. return {
  96. userLevel: 0,
  97. headerStyle: {
  98. backgroundColor: 'transparent',
  99. backgroundImage: 'url("/static/beijing (2).png")',
  100. backgroundSize: 'cover',
  101. backgroundPosition: '',
  102. boxShadow: ''
  103. // 其他样式属性...
  104. },
  105. directLsit: {},
  106. source: 0,
  107. totalPages: 0,
  108. totalSize: 0,
  109. status: 'loadmore',
  110. pageRequest: { //查询的默认条件
  111. pageNum: 1,
  112. pageSize: 20,
  113. },
  114. withdrawalData: [],
  115. industryData: '全部行业',
  116. industryShow: false,
  117. industrySector: '0',
  118. industryoptions: [{
  119. lable: '全部行业',
  120. value: '0'
  121. }, {
  122. lable: '汽车服务',
  123. value: '1'
  124. }, {
  125. lable: '保险',
  126. value: '2'
  127. }],
  128. }
  129. },
  130. async onLoad(params) {
  131. this.queryData()
  132. this.userLevel = this.userInfo.sysUser.level
  133. },
  134. methods: {
  135. // 收入种类筛选
  136. industryopConfirm(e) {
  137. this.industryData = e[0].label
  138. this.industrySector = e[0].value
  139. this.queryData()
  140. },
  141. confirmPickDate(dateStr, dateStr1) {
  142. if (dateStr) {
  143. dateStr += ' 00:00:01'
  144. }
  145. if (dateStr1) {
  146. dateStr1 += ' 23:59:59'
  147. }
  148. this.queryData(dateStr, dateStr1)
  149. },
  150. view(item) {
  151. uni.navigateTo({
  152. url: "/pages/my/commissionDetail?key=" + encodeURIComponent(JSON.stringify(item))
  153. })
  154. },
  155. back() {
  156. uni.navigateBack({
  157. delta: 1, // 返回的页面数,如果是1表示返回上一页
  158. success: function() {}
  159. });
  160. },
  161. onReachBottom() {
  162. if (this.pageRequest.pageNum >= this.totalPages) return;
  163. this.status = 'loading';
  164. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  165. setTimeout(async () => {
  166. let res = await this.$http.post('/APPPartner/getCommissionInfos', {
  167. beginTime: '2024-10-08 16:21:11',
  168. endTime: '2024-10-11 16:21:11',
  169. // industrySector: '1',
  170. industrySector: this.industrySector
  171. });
  172. if (res.code == '200') {
  173. // this.totalSize = res.data.totalSize;
  174. this.directLsit = [...this.withdrawalData, ...res.data.content];
  175. }
  176. // if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  177. else this.status = 'loading';
  178. }, 1000)
  179. },
  180. async queryData(beginTime = '', endTime = '') {
  181. let params = {
  182. beginTime,
  183. endTime,
  184. // industrySector: '1',
  185. industrySector: this.industrySector
  186. // ...this.pageRequest
  187. }
  188. let res = await this.$http.post('/APPPartner/getCommissionInfos', params);
  189. if (res.code == '200') {
  190. this.withdrawalData = res.data
  191. // this.totalPages = res.data.totalPages;
  192. // this.totalSize = res.data.totalSize;
  193. // if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
  194. // else this.status = 'loadmore';
  195. }
  196. },
  197. onShowDatePicker() { //显示
  198. this.showDatePicker = true;
  199. },
  200. }
  201. }
  202. </script>
  203. <style lang="scss" scoped>
  204. .headers {
  205. position: fixed;
  206. top: 0;
  207. left: 0;
  208. width: 100%;
  209. z-index: 999999;
  210. padding-top: 40px;
  211. height: 85px;
  212. text {
  213. font-size: 18px;
  214. font-weight: bold;
  215. }
  216. }
  217. .sum-insurance {
  218. padding: 10px 0;
  219. view {
  220. text-align: center;
  221. width: 33.33%;
  222. border-right: 1px solid #EEEEEE;
  223. text {
  224. display: block;
  225. }
  226. text:first-child {
  227. font-weight: 600;
  228. font-size: 18px;
  229. color: #333333;
  230. }
  231. text:last-child {
  232. font-size: 10px;
  233. color: #999999;
  234. }
  235. }
  236. }
  237. .withdrawal-flow {
  238. margin: 8px 16px;
  239. overflow: hidden;
  240. background: #FFFFFF;
  241. border-radius: 5px 5px 5px 5px;
  242. font-size: 16px;
  243. color: #333333;
  244. .withdrawal-card {
  245. border-bottom: 1px solid #EEEEEE;
  246. padding: 15px 0;
  247. margin: 0 15px;
  248. image {
  249. display: inline-block;
  250. width: 33px;
  251. height: 33px;
  252. margin-right: 10px;
  253. }
  254. }
  255. }
  256. .partner-head {
  257. background: #FFFFFF;
  258. color: #333333;
  259. font-size: 14px;
  260. .search-data {
  261. color: #666666;
  262. text {
  263. padding: 5px 8px;
  264. border: 1px solid #EEEEEE;
  265. }
  266. }
  267. .search {
  268. border: 1px solid #EEEEEE;
  269. padding: 10px;
  270. text {
  271. width: 49%;
  272. text-align: center;
  273. }
  274. i {
  275. margin-left: 2px;
  276. display: inline-block;
  277. width: 0;
  278. height: 0;
  279. border: 4px solid;
  280. border-color: #666666;
  281. border-bottom: 4px solid transparent;
  282. border-right: 4px solid transparent;
  283. border-left: 4px solid transparent;
  284. }
  285. }
  286. }
  287. .content {
  288. padding: 20rpx 30rpx;
  289. background: #F7F7F7;
  290. .options {
  291. width: 100%;
  292. box-sizing: border-box;
  293. background: #FFFFFF;
  294. margin: 0 auto 14rpx;
  295. border-radius: 8px 8px 8px 8px;
  296. border-left: 1px solid #2D6DFF;
  297. padding: 20rpx;
  298. .dis {
  299. width: 100%;
  300. display: flex;
  301. align-items: center;
  302. justify-content: space-between;
  303. .left {
  304. // width: 100%;
  305. display: flex;
  306. align-items: center;
  307. font-weight: 500;
  308. font-size: 32rpx;
  309. .type {
  310. font-weight: 500;
  311. font-size: 32rpx;
  312. margin-left: 20rpx;
  313. }
  314. image {
  315. width: 40rpx;
  316. height: 40rpx;
  317. margin-right: 10rpx;
  318. }
  319. }
  320. .right {
  321. font-size: 18rpx;
  322. color: #999999;
  323. }
  324. }
  325. .contribution {
  326. width: 100%;
  327. display: flex;
  328. align-items: center;
  329. justify-content: space-between;
  330. margin-top: 14rpx;
  331. .contribution_left {
  332. // width: 22%;
  333. font-size: 24rpx;
  334. color: #999999;
  335. text {
  336. color: #333333;
  337. margin-left: 20rpx;
  338. }
  339. }
  340. .contribution_right {
  341. font-size: 30rpx;
  342. font-weight: 500;
  343. color: #333333;
  344. }
  345. }
  346. .dividend {
  347. width: 100%;
  348. display: flex;
  349. .dividend_left {
  350. width: 120rpx;
  351. font-size: 24rpx;
  352. margin-right: 20rpx;
  353. color: #999999;
  354. }
  355. .dividend_right {
  356. flex: 1;
  357. display: flex;
  358. flex-wrap: wrap;
  359. .dividend_options{
  360. font-size: 24rpx;
  361. margin-right: 24rpx;
  362. }
  363. }
  364. }
  365. }
  366. }
  367. </style>