billDetails1.vue 13 KB

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