commission.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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 @click="$refs.datePicker.open()">自定义时间<i></i></text>
  15. </view>
  16. </view>
  17. <block >
  18. <view class="withdrawal-flow" >
  19. <view class="withdrawal-card j-s dis" v-for="val in withdrawalData" :key="val" @click="view(val)">
  20. <view class="dis" >
  21. <image v-if='val.industrySector==1' src="/static/image/my/qiche.png" mode=""></image>
  22. <image v-else src="/static/image/my/caixian.png" mode=""></image>
  23. <view>
  24. <view style="line-height: 18px;">{{val.industrySector==1?'汽车-车险':'保险-财险'}}</view>
  25. <text style="font-size: 10px;color: #999999;">{{val.createTime}}</text>
  26. </view>
  27. </view>
  28. <text>{{val.extractFee}}</text>
  29. </view>
  30. </view>
  31. </block>
  32. <u-loadmore style="margin-top: 5px;" v-if="directLsit.length!=0" :status="status" />
  33. <o-empty v-if="directLsit.length==0" />
  34. </view>
  35. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  36. </view>
  37. </template>
  38. <script>
  39. import myDatePicker from '../components/date-picker.vue';
  40. export default{
  41. components: {
  42. myDatePicker
  43. },
  44. data(){
  45. return{
  46. headerStyle: {
  47. backgroundColor: 'transparent',
  48. backgroundImage: 'url("/static/beijing (2).png")',
  49. backgroundSize: 'cover',
  50. backgroundPosition: '',
  51. boxShadow: ''
  52. // 其他样式属性...
  53. },
  54. directLsit: {},
  55. source:0,
  56. totalPages:0,
  57. totalSize:0,
  58. status: 'loadmore',
  59. pageRequest: { //查询的默认条件
  60. pageNum: 1,
  61. pageSize: 20,
  62. },
  63. withdrawalData:[]
  64. }
  65. },
  66. async onLoad(params) {
  67. this.queryData()
  68. },
  69. methods:{
  70. confirmPickDate(dateStr,dateStr1){
  71. if(dateStr){
  72. dateStr+=' 00:00:01'
  73. }
  74. if(dateStr1){
  75. dateStr1+=' 23:59:59'
  76. }
  77. this.queryData(dateStr ,dateStr1)
  78. },
  79. view(item) {
  80. uni.navigateTo({
  81. url: "/pages/my/commissionDetail?key="+encodeURIComponent(JSON.stringify(item))
  82. })
  83. },
  84. back() {
  85. uni.navigateBack({
  86. delta: 1, // 返回的页面数,如果是1表示返回上一页
  87. success: function() {}
  88. });
  89. },
  90. onReachBottom() {
  91. if (this.pageRequest.pageNum >= this.totalPages) return;
  92. this.status = 'loading';
  93. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  94. setTimeout(async () => {
  95. let res = await this.$http.post('/APPPartner/getCommissionInfo', {
  96. beginTime:'2024-10-08 16:21:11',
  97. endTime:'2024-10-11 16:21:11',
  98. industrySector:'1',
  99. ...this.pageRequest
  100. });
  101. if (res.code == '200') {
  102. this.totalSize = res.data.totalSize;
  103. this.directLsit = [...this.withdrawalData, ...res.data.content];
  104. }
  105. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  106. else this.status = 'loading';
  107. }, 1000)
  108. },
  109. async queryData(beginTime='',endTime='') {
  110. let params = {
  111. beginTime,
  112. endTime,
  113. industrySector:'1',
  114. ...this.pageRequest
  115. }
  116. let res = await this.$http.post('/APPPartner/getCommissionInfo', params);
  117. if (res.code == '200') {
  118. this.withdrawalData=res.data.content
  119. this.totalPages = res.data.totalPages;
  120. this.totalSize = res.data.totalSize;
  121. if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
  122. else this.status = 'loadmore';
  123. }
  124. },
  125. onShowDatePicker() { //显示
  126. this.showDatePicker = true;
  127. },
  128. }
  129. }
  130. </script>
  131. <style lang="scss" scoped>
  132. .headers {
  133. position: fixed;
  134. top: 0;
  135. left: 0;
  136. width: 100%;
  137. z-index: 999999;
  138. padding-top: 40px;
  139. height: 85px;
  140. text {
  141. font-size: 18px;
  142. font-weight: bold;
  143. }
  144. }
  145. .sum-insurance{
  146. padding: 10px 0;
  147. view{
  148. text-align: center;
  149. width: 33.33%;
  150. border-right: 1px solid #EEEEEE;
  151. text{
  152. display: block;
  153. }
  154. text:first-child{
  155. font-weight: 600;
  156. font-size: 18px;
  157. color: #333333;
  158. }
  159. text:last-child{
  160. font-size: 10px;
  161. color: #999999;
  162. }
  163. }
  164. }
  165. .withdrawal-flow{
  166. margin: 8px 16px;
  167. overflow: hidden;
  168. background: #FFFFFF;
  169. border-radius: 5px 5px 5px 5px;
  170. font-size: 16px;
  171. color: #333333;
  172. .withdrawal-card{
  173. border-bottom: 1px solid #EEEEEE;
  174. padding: 15px 0;
  175. margin: 0 15px;
  176. image{
  177. display: inline-block;
  178. width: 33px;
  179. height: 33px;
  180. margin-right: 10px;
  181. }
  182. }
  183. }
  184. .partner-head{
  185. background: #FFFFFF;
  186. color: #333333;
  187. font-size: 14px;
  188. .search-data{
  189. color: #666666;
  190. text{
  191. padding: 5px 8px;
  192. border: 1px solid #EEEEEE;
  193. }
  194. }
  195. .search{
  196. border: 1px solid #EEEEEE;
  197. padding: 10px;
  198. text{
  199. width: 49%;
  200. text-align: center;
  201. }
  202. i{
  203. margin-left: 2px;
  204. display:inline-block;
  205. width: 0;
  206. height: 0;
  207. border: 4px solid;
  208. border-color: #666666;
  209. border-bottom: 4px solid transparent;
  210. border-right: 4px solid transparent;
  211. border-left: 4px solid transparent;
  212. }
  213. }
  214. }
  215. </style>