commission.vue 8.8 KB

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