billDetails3.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. <template>
  2. <view>
  3. <view class="white-box">
  4. <view class="tx">
  5. <view class="tx-grid">
  6. <view class="tx-grid-text">
  7. <view class="title">可提现推广费</view>
  8. <view class="money">
  9. <text>{{ promotion }}</text>
  10. <text class="money-b">元</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="tx-grid" @click="toWithdraw"><span class="tx-grid-comm-sign">立即提现</span></view>
  15. </view>
  16. <view class="palace palace-one">
  17. <view class="palace-grid">
  18. <view class="palace-grid-text" :class="active==2?'active':''" @tap="changeTab(2)">
  19. <view class="palace-grid-text-data">
  20. <text>{{ applyAmount }}</text>
  21. <text class="palace-grid-text-data-b">元</text>
  22. </view>
  23. <view class="palace-grid-text-name">提现中</view>
  24. </view>
  25. </view>
  26. <view class="palace-grid">
  27. <view class="palace-grid-text" :class="active==1?'active':''" @tap="changeTab(1)">
  28. <view class="palace-grid-text-data">
  29. <text>{{ totalAmount }}</text>
  30. <text class="palace-grid-text-data-b">元</text>
  31. </view>
  32. <view class="palace-grid-text-name">累计提现</view>
  33. </view>
  34. </view>
  35. <view class="palace-grid">
  36. <view class="palace-grid-text" :class="active==3?'active':''" @tap="changeTab(3)">
  37. <view class="palace-grid-text-data">
  38. <text>{{ payamount }}</text>
  39. <text class="palace-grid-text-data-b">元</text>
  40. </view>
  41. <view class="palace-grid-text-name">已到账</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <z-paging auto-show-back-to-top ref="paging" @query="getOrdersList" v-model="list" :default-page-size="20"
  47. :mounted-auto-call-reload="true" :style="getHeight">
  48. <view class="list-view">
  49. <!-- 查询区域Start -->
  50. <!-- <view class="queryView d-flex">
  51. <view class="d-flex a-center j-center">
  52. <picker @change="bindPickerTypeChange" :value="typeIndex" :range="typeArray">
  53. <view class="d-flex a-center">{{typeArray[typeIndex]}} <view class="icon iconfont icon-xiala"></view></view>
  54. </picker>
  55. </view>
  56. <view class="d-flex a-center j-center">
  57. <picker @change="bindPickerYearChange" :value="yearIndex" :range="yearArray">
  58. <view class="d-flex a-center">{{yearArray[yearIndex]}}年 <view class="icon iconfont icon-xiala"></view></view>
  59. </picker>
  60. </view>
  61. <view class="d-flex a-center j-center">
  62. <picker @change="bindPickerMonthChange" :value="monthIndex" :range="monthArray">
  63. <view class="d-flex a-center">{{monthArray[monthIndex]}}月 <view class="icon iconfont icon-xiala"></view></view>
  64. </picker>
  65. </view>
  66. <view class="d-flex a-center j-center">
  67. <picker @change="bindPickerDateChange" :value="dateIndex" :range="dateArray">
  68. <view class="d-flex a-center">{{dateArray[dateIndex]}}日 <view class="icon iconfont icon-xiala"></view></view>
  69. </picker>
  70. </view>
  71. <view class="d-flex a-center j-center">
  72. <view class="d-flex a-center px-2">合计:0.00</view>
  73. </view>
  74. </view> -->
  75. <!-- 查询区域End -->
  76. <block v-for="(item,index) in list" :key="index">
  77. <view class="list-item">
  78. <view class="content-box">
  79. <view class="des-box" v-if="active==0">
  80. <view class="tit">订单号:{{item.orderno }}</view>
  81. <view class="tit">佣金级别:{{item.level}}</view>
  82. <view class="tit">佣金比例:{{ item.commissionrate*100 }}%</view>
  83. <view class="time">签单时间:{{ item.insuredtime }}</view>
  84. </view>
  85. <view class="des-box" v-if="active==2" @tap="toBillInfo(index)">
  86. <view class="tit">订单号:{{item.id }}</view>
  87. <view class="time">提现时间:{{ item.createTime }}</view>
  88. </view>
  89. <view class="des-box" v-if="active==3" @tap="toBillInfo(index)">
  90. <view class="tit">订单号:{{item.id }}</view>
  91. <view class="time">提现时间:{{ item.createTime }}</view>
  92. <view class="time">到账时间:{{ item.paytime }}</view>
  93. </view>
  94. </view>
  95. <view class="money d-flex a-center j-center flex-column" v-if="active==0">
  96. <view>+{{item.commissionamount}}</view>
  97. <view>推广佣金</view>
  98. </view>
  99. <view class="money d-flex a-center j-center flex-column" v-if="active==2">
  100. <view>{{item.amount}}</view>
  101. <view>佣金提现中</view>
  102. </view>
  103. <view class="money d-flex a-center j-center flex-column" v-if="active==3">
  104. <view>-{{item.amount}}</view>
  105. <view>提现成功</view>
  106. </view>
  107. </view>
  108. </block>
  109. </view>
  110. </z-paging>
  111. </view>
  112. </template>
  113. <script>
  114. import {
  115. mapState
  116. } from "vuex"
  117. import ZPagingMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin';
  118. export default {
  119. components: {
  120. ZPagingMixin
  121. },
  122. computed: {
  123. ...mapState(['userInfo']),
  124. getHeight() {
  125. let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(356);
  126. return `height: ${height}px`;
  127. }
  128. },
  129. onLoad() {
  130. // 搜索年选项Start
  131. this.yearArray = [(new Date().getFullYear() - 2), (new Date().getFullYear() - 1), new Date().getFullYear(), ]
  132. this.yearIndex = this.yearArray.length - 1;
  133. // 搜索年选项End
  134. // 搜索月选项Start
  135. var month = new Date().getMonth() + 1;
  136. for (var i = 1; i <= month; i++) {
  137. if (i < 10) {
  138. this.monthArray.push('0' + i);
  139. } else {
  140. this.monthArray.push(i);
  141. }
  142. }
  143. this.monthIndex = this.monthArray.length - 1;
  144. // 搜索月选项End
  145. // 搜索日选项Start
  146. var date = new Date().getDate();
  147. for (var i = 1; i <= date; i++) {
  148. if (i < 10) {
  149. this.dateArray.push('0' + i);
  150. } else {
  151. this.dateArray.push(i);
  152. }
  153. }
  154. this.dateIndex = this.dateArray.length - 1;
  155. // 搜索日选项End
  156. },
  157. data() {
  158. return {
  159. /* 查询区域Start */
  160. typeIndex: 0, //订单的类型选择
  161. typeArray: ['车险', '意外险', '寿险'], //订单的类型
  162. yearArray: [], //订单的查询年份
  163. yearIndex: 0, //订单的年份选择
  164. monthArray: [], //订单的查询月份
  165. monthIndex: 0, //订单的月份选择
  166. dateArray: [], //订单的查询月份
  167. dateIndex: 0, //订单的月份选择
  168. /* 查询区域End */
  169. active: 2,
  170. list: [],
  171. promotion: 0, //预收金额
  172. "totalAmount": 0, //总计提现
  173. "applyAmount": 0, //提现中
  174. "payamount": 0 //已到账
  175. };
  176. },
  177. onShow() {
  178. this.getCarExtendMoney();
  179. this.getOrdersList(1, 20);
  180. },
  181. methods: {
  182. // 去提现
  183. async toWithdraw() {
  184. let res = await this.$http.get('/userBank/getUserBankList');
  185. if (res.data) {
  186. this.navigate({
  187. url: `/pages/wallet/withdraw?amountStatus=3&amount=${this.promotion}`,
  188. }, "navigateTo", true)
  189. } else {
  190. this.navigate({
  191. url: '/pages/wallet/bindBank',
  192. complete: () => {
  193. setTimeout(() => {
  194. uni.showToast({
  195. title: '请先绑定银行卡',
  196. duration: 3000,
  197. icon: "none"
  198. });
  199. }, 500);
  200. }
  201. }, "navigateTo", true)
  202. }
  203. },
  204. bindPickerTypeChange(e) {
  205. this.typeIndex = e.target.value;
  206. },
  207. //搜索年发生变化
  208. bindPickerYearChange(e) {
  209. this.yearIndex = e.target.value;
  210. this.monthArray = [];
  211. if (this.yearIndex == (this.yearArray.length - 1)) {
  212. var month = new Date().getMonth() + 1;
  213. for (var i = 1; i <= month; i++) {
  214. if (i < 10) {
  215. this.monthArray.push('0' + i);
  216. } else {
  217. this.monthArray.push(i);
  218. }
  219. }
  220. this.monthIndex = this.monthArray.length - 1;
  221. } else {
  222. for (var i = 1; i <= 12; i++) {
  223. if (i < 10) {
  224. this.monthArray.push('0' + i);
  225. } else {
  226. this.monthArray.push(i);
  227. }
  228. }
  229. this.monthIndex = 0;
  230. }
  231. },
  232. //搜索月发生变化
  233. bindPickerMonthChange(e) {
  234. this.monthIndex = e.target.value;
  235. },
  236. bindPickerDateChange(e) {
  237. this.dateIndex = e.target.value;
  238. },
  239. async changeTab(tabIndex) {
  240. this.active = tabIndex;
  241. this.list = [];
  242. await this.getOrdersList(1, 20);
  243. },
  244. // 可提现推广费查询
  245. async getCarExtendMoney() {
  246. let res = await this.$http.get('/sysUserAccount/getSysUserAmount?userid=' + this.userInfo.sysUser.id);
  247. if (res.code == 200) {
  248. this.promotion = res.data.promotion;
  249. }
  250. },
  251. //获取订单数据Start
  252. async getOrdersList(pageNo, pageSize) {
  253. var data = {
  254. "pageNum": pageNo,
  255. "pageSize": pageSize,
  256. "amountStatus": '3',
  257. "auditingStatus": this.active,
  258. };
  259. let res = await this.$http.post('/sysAmountAuditing/queryAppPage', data);
  260. let content = [];
  261. if (res.code == 200) {
  262. if (res.data.content.length > 0) {
  263. content = res.data.content;
  264. this.applyAmount = content[0].amount
  265. }
  266. }
  267. this.$refs.paging.complete(content);
  268. },
  269. //获取订单数据End
  270. toBillInfo(index) {
  271. this.navigate({
  272. url: '/pages/wallet/billInfo',
  273. success: (res) => {
  274. res.eventChannel.emit("acceptData", {
  275. item: this.list[index]
  276. })
  277. }
  278. }, "navigateTo", true)
  279. }
  280. }
  281. };
  282. </script>
  283. <style lang="scss" scoped>
  284. @import '@/style/mixin.scss';
  285. page {
  286. background-color: #fff;
  287. }
  288. .white-box {
  289. width: 94%;
  290. background: white;
  291. border-radius: 10rpx;
  292. margin: 20rpx auto 20rpx;
  293. box-shadow: 0 6rpx 20rpx #e7e7e7;
  294. }
  295. .white-box .tx {
  296. padding-top: 26rpx;
  297. overflow: hidden;
  298. display: flex;
  299. justify-content: space-between;
  300. align-content: center;
  301. }
  302. .white-box .tx .tx-grid {
  303. box-sizing: border-box;
  304. }
  305. .white-box .tx .tx-grid:first-child {
  306. margin-left: 40rpx;
  307. }
  308. .white-box .tx .tx-grid .tx-grid-comm-sign {
  309. display: block;
  310. border-radius: 40rpx 0 0 40rpx;
  311. font-size: 26rpx;
  312. padding: 16rpx 44rpx;
  313. background: linear-gradient(to right, rgba($themeColor, 0.8), rgba($themeColor, 0.6));
  314. color: #fff;
  315. font-weight: bold;
  316. }
  317. .white-box .tx .tx-grid .tx-grid-text {
  318. display: block;
  319. color: #333;
  320. font-size: 26rpx;
  321. white-space: nowrap;
  322. text-overflow: ellipsis;
  323. overflow: hidden;
  324. }
  325. .white-box .palace .palace-grid .palace-grid-text.active {
  326. background-color: rgba($themeColor, 0.6);
  327. }
  328. .white-box .palace .palace-grid .palace-grid-text.active>view {
  329. color: #FFFFFF;
  330. }
  331. .white-box .tx .tx-grid .tx-grid-text .title {
  332. font-size: 26rpx;
  333. font-weight: normal;
  334. color: $themeColor;
  335. }
  336. .white-box .tx .tx-grid .tx-grid-text .money {
  337. font-size: 60rpx;
  338. color: $themeColor;
  339. letter-spacing: 2rpx;
  340. margin-bottom: 10rpx;
  341. }
  342. .white-box .tx .tx-grid .tx-grid-text .money-b {
  343. font-size: 28rpx;
  344. }
  345. .white-box .palace {
  346. padding-bottom: 20rpx;
  347. overflow: hidden;
  348. display: flex;
  349. justify-content: center;
  350. }
  351. .white-box .palace .palace-grid {
  352. flex: 1;
  353. position: relative;
  354. box-sizing: border-box;
  355. }
  356. .white-box .palace .palace-grid .palace-grid-text {
  357. display: block;
  358. text-align: center;
  359. color: #333;
  360. font-size: 32rpx;
  361. white-space: nowrap;
  362. text-overflow: ellipsis;
  363. overflow: hidden;
  364. }
  365. .white-box .palace .palace-grid .palace-grid-text .palace-grid-text-name {
  366. font-size: 26rpx;
  367. font-weight: normal;
  368. color: $themeColor;
  369. }
  370. .white-box .palace .palace-grid .palace-grid-text .palace-grid-text-data {
  371. font-size: 32rpx;
  372. color: $themeColor;
  373. letter-spacing: 2rpx;
  374. margin-bottom: 5rpx;
  375. }
  376. .white-box .palace .palace-grid .palace-grid-text .palace-grid-text-data .palace-grid-text-data-b {
  377. font-size: 20rpx;
  378. }
  379. .list-view {
  380. position: relative;
  381. width: 100%;
  382. overflow: hidden;
  383. }
  384. .list-item {
  385. width: 100%;
  386. padding: 30rpx 28rpx;
  387. box-sizing: border-box;
  388. background: #fff;
  389. display: flex;
  390. align-items: flex-start;
  391. justify-content: space-between;
  392. border-bottom: 1rpx solid #eaeef1;
  393. }
  394. .item-last::after {
  395. left: 0 !important;
  396. }
  397. .content-box {
  398. display: flex;
  399. align-items: flex-start;
  400. justify-content: space-between;
  401. }
  402. .des-box {
  403. min-height: 80rpx;
  404. padding-left: 28rpx;
  405. box-sizing: border-box;
  406. vertical-align: top;
  407. color: #333;
  408. font-size: 24rpx;
  409. display: flex;
  410. flex-direction: column;
  411. justify-content: space-between;
  412. }
  413. .tit {
  414. font-size: 30rpx;
  415. max-width: 500rpx;
  416. white-space: nowrap;
  417. overflow: hidden;
  418. text-overflow: ellipsis;
  419. }
  420. .time {
  421. color: #888;
  422. }
  423. .money {
  424. font-size: 38rpx;
  425. font-weight: 500;
  426. color: $themeColor;
  427. white-space: nowrap;
  428. overflow: hidden;
  429. text-overflow: ellipsis;
  430. padding-left: 20rpx;
  431. }
  432. /* 查询区域Start */
  433. .queryView {
  434. justify-content: space-around;
  435. height: 82upx;
  436. line-height: 80upx;
  437. }
  438. .queryView>view {
  439. border-top: 1px solid #FFC38F;
  440. border-bottom: 1px solid #FFC38F;
  441. border-left: 1px solid #FFC38F;
  442. box-sizing: border-box;
  443. color: #FFC38F;
  444. }
  445. .queryView>view:nth-child(1) {
  446. flex: 3;
  447. }
  448. .queryView>view:nth-child(2) {
  449. flex: 4;
  450. }
  451. .queryView>view:nth-child(3) {
  452. flex: 3;
  453. }
  454. .queryView>view:nth-child(4) {
  455. border-right: 1px solid #FFC38F;
  456. flex: 3;
  457. }
  458. /* 查询区域End */
  459. </style>