billDetails1.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <view class="fixed">
  6. <view class="white-box">
  7. <view class="tx">
  8. <view class="tx-grid">
  9. <view class="tx-grid-text">
  10. <view class="title">可提现(元)</view>
  11. <view class="money">
  12. <text v-if="handlingFee">{{ handlingFee }}</text>
  13. <text v-else>0.00</text>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="tx-grid-comm-sign dis j-c a-c" @click="toWithdraw">
  18. <image src="/static/image/bindBank/Frame1.png" mode="" style="width: 18px;height: 18px;">
  19. </image>
  20. <text>立即提现</text>
  21. </view>
  22. </view>
  23. <view class="palace dis a-c j-s">
  24. <view class="palace-grid dis f-c">
  25. <text class="">预收金额</text>
  26. <text v-if="willHalding">{{ willHalding}}</text>
  27. <text v-else>0.00</text>
  28. </view>
  29. <view class="palace-grid dis f-c">
  30. <text class="">提现中</text>
  31. <text v-if="withdrawalHalding">{{ withdrawalHalding}}</text>
  32. <text v-else>0.00</text>
  33. </view>
  34. <view class="palace-grid dis f-c">
  35. <text class="">已提现</text>
  36. <text v-if="approvedHalding">{{ approvedHalding}}</text>
  37. <text v-else>0.00</text>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 查询区域Start -->
  42. <view class="queryCriteria dis j-s a-c ">
  43. <view class="dis a-c j-c" style="width: 49%;" @click="statusShow=true">
  44. <image src="/static/image/bindBank/time.png" mode="" style="width: 18px;height: 18px;"></image>
  45. <text>{{statusLabel}}</text>
  46. </view>
  47. <view class="" style="width: 1px;height: 90%;background-color: #D4D0D0;"></view>
  48. <view class="dis a-c j-c" style="width: 49%;" @click="timeShow=true">
  49. <image src="/static/image/bindBank/date.png" mode="" style="width: 18px;height:18px;"></image>
  50. <text>{{pageRequest.Date}}</text>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="list-view">
  55. <view v-for="(item,index) in list" :key="index" v-if="active==2 || active==3">
  56. <view class="list-item dis a-c j-s" @tap="toBillInfo(index)">
  57. <view class="content-box">
  58. <view class="des-box" v-if="active==2">
  59. <view class="tit">订单号:{{item.id }}</view>
  60. <view class="time">提现时间:{{ item.createTime }}</view>
  61. </view>
  62. <view class="des-box" v-if="active==3">
  63. <view class="tit">订单号:{{item.id }}</view>
  64. <view class="time">提现时间:{{ item.createTime }}</view>
  65. <view class="time" v-if="item.paytime">到账时间:{{ item.paytime }}</view>
  66. </view>
  67. </view>
  68. <!-- <view class="money dis f-c a-c j-s" v-if="active==1">
  69. <view
  70. style="padding: 0 10px;border: 1px solid #229805;border-radius: 30px;font-size: 12px;color: #229805;">
  71. 预收</view>
  72. <view v-if="item.amount">{{item.amount }}</view>
  73. <view v-else>0.00</view>
  74. </view> -->
  75. <view class="money dis f-c a-c j-s " v-if="active==2">
  76. <view
  77. style="padding: 0 10px;border: 1px solid #FF5600;border-radius: 30px;font-size: 12px;color: #FF5600;">
  78. 提现中</view>
  79. <view v-if="item.amount">{{item.amount }}</view>
  80. <view v-else>0.00</view>
  81. </view>
  82. <view class="money dis f-c a-c j-s" v-if="active==3">
  83. <view
  84. style="padding: 0 10px;border: 1px solid #0052FF;border-radius: 30px;font-size: 12px;color: #0052FF;">
  85. 已提现
  86. </view>
  87. <view v-if="item.amount">{{item.amount }}</view>
  88. <view v-else>0.00</view>
  89. </view>
  90. </view>
  91. </view>
  92. <view v-for="(item,index) in yushouList" :key="index" v-if="active==1">
  93. <view class="list-item dis a-c j-s" @tap="yushouInfo(index)">
  94. <view class="">
  95. <view class="des-box">
  96. <view class="tit">订单号:{{item.id }}</view>
  97. <view class="time">签单时间:{{ item.signingTime }}</view>
  98. <view class="time">车牌号:{{ item.licenseno }}</view>
  99. </view>
  100. </view>
  101. <view class="money dis f-c a-c j-s">
  102. <view
  103. style="padding: 0 10px;border: 1px solid #229805;border-radius: 30px;font-size: 12px;color: #229805;">
  104. 预收</view>
  105. <view v-if="item.willAmount">{{item.willAmount }}</view>
  106. <view v-else>0.00</view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <u-popup v-model="statusShow" mode="bottom" height="500">
  112. <view class="term dis f-c j-s">
  113. <view style="padding: 0 16px;">
  114. <view class="title dis j-c a-c">
  115. <text>状态筛选</text>
  116. </view>
  117. <text>订单状态</text>
  118. <view class="dis a-c " style="margin-top: 10px;">
  119. <view class="status-data" :class="item.value==active? 'active':''"
  120. v-for="(item,index) in statusList" @tap.stop.prevent="statusclick(item)" :key="index">
  121. {{item.label}}
  122. </view>
  123. </view>
  124. </view>
  125. <view class="operateBtn dis ">
  126. <view class="cancel dis a-c j-c" @click="statusShow=false">
  127. 取消
  128. </view>
  129. <view class="confirm dis a-c j-c" @click="stausSearch">
  130. 确定
  131. </view>
  132. </view>
  133. </view>
  134. </u-popup>
  135. <u-picker v-model="timeShow" mode="time" :params="params" @confirm="startconfirm"></u-picker>
  136. </view>
  137. </template>
  138. <script>
  139. import {
  140. mapState
  141. } from "vuex"
  142. import ZPagingMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin';
  143. export default {
  144. components: {
  145. ZPagingMixin
  146. },
  147. data() {
  148. return {
  149. statusShow: false, //状态筛选
  150. timeShow: false, //日期筛选
  151. params: {
  152. year: true, //年
  153. month: true, //月
  154. day: false, //日
  155. },
  156. //状态筛选list
  157. statusLabel: "提现中",
  158. statusList: [
  159. // {
  160. // label: '全部',
  161. // value: 0,
  162. // src: "/static/image/car-insure/state1.png"
  163. // },
  164. {
  165. label: '预收',
  166. value: 1,
  167. src: "/static/image/car-insure/state2.png"
  168. },
  169. {
  170. label: '提现中',
  171. value: 2,
  172. src: "/static/image/car-insure/state3.png"
  173. },
  174. {
  175. label: '已提现',
  176. value: 3,
  177. src: "/static/image/car-insure/state4.png"
  178. },
  179. ],
  180. /* 时间筛选相关 */
  181. pageRequest: { //查询的默认条件
  182. Date: "",
  183. pageNum: 1,
  184. pageSize: 20,
  185. },
  186. /* 查询区域Start */
  187. /* 查询区域End */
  188. currentPage: 1, //当前页码
  189. pageSize: 5, //每页展示条数
  190. totalPages: 0, //总页数
  191. totalSize: 0, //总条数
  192. list: [],
  193. loadStatus: 0,
  194. "handlingFee": 0, //可提现手续费金额
  195. willHalding: 0,
  196. withdrawalHalding: 0,
  197. approvedHalding: 0,
  198. yushouIds: '',
  199. yushouList: [],
  200. active: 1,
  201. };
  202. },
  203. onLoad(params) {
  204. this.pageRequest.Date = this.transformTime();
  205. },
  206. computed: {
  207. ...mapState(['userInfo']),
  208. getHeight() {
  209. let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(400);
  210. return `height: ${height}px`;
  211. }
  212. },
  213. onShow() {
  214. this.getCarAdvanceMoney();
  215. this.getOrdersList(1, 20);
  216. },
  217. methods: {
  218. async stausSearch() {
  219. console.log(this.active);
  220. switch (this.active) {
  221. case 1:
  222. let res = await this.$http.post('/sysUserAccount/getInsOrders', {
  223. ids: this.yushouIds,
  224. timeFiltering: this.pageRequest.Date,
  225. amountType: "1",
  226. });
  227. if (res.code == 200 && res.data) {
  228. this.yushouList = res.data.insFeeOrderNewList;
  229. this.statusShow = false;
  230. }
  231. break;
  232. case 2:
  233. case 3:
  234. await this.getOrdersList(1, 20);
  235. this.statusShow = false;
  236. break;
  237. default:
  238. break;
  239. }
  240. },
  241. async startconfirm(e) {
  242. this.pageRequest.Date = e.year + '-' + e.month;
  243. switch (this.active) {
  244. case 1:
  245. let res = await this.$http.post('/sysUserAccount/getInsOrders', {
  246. ids: this.yushouIds,
  247. timeFiltering: this.pageRequest.Date,
  248. amountType: "1",
  249. });
  250. if (res.code == 200 && res.data) {
  251. this.yushouList = res.data.insFeeOrderNewList;
  252. }
  253. break;
  254. case 2:
  255. case 3:
  256. await this.getOrdersList(1, 20);
  257. break;
  258. }
  259. },
  260. //状态筛选
  261. statusclick(e) {
  262. this.active = e.value;
  263. this.statusLabel = e.label;
  264. },
  265. async changeTab(tabIndex) {
  266. this.active = tabIndex;
  267. this.list = [];
  268. await this.getOrdersList(1, 20);
  269. },
  270. // 去提现
  271. async toWithdraw() {
  272. let res = await this.$http.get('/userBank/getUserBankList');
  273. if (res.data.length) {
  274. this.navigate({
  275. url: `/pages/wallet/withdraw?amountStatus=1&amount=${this.handlingFee}`,
  276. }, "navigateTo", true)
  277. } else {
  278. this.navigate({
  279. url: '/pages/wallet/bindBank',
  280. complete: () => {
  281. setTimeout(() => {
  282. uni.showToast({
  283. title: '请先绑定银行卡',
  284. duration: 3000,
  285. icon: "none"
  286. });
  287. }, 500);
  288. }
  289. }, "navigateTo", true)
  290. }
  291. },
  292. // 预收账户金额查询
  293. async getCarAdvanceMoney() {
  294. let res = await this.$http.get('/sysUserAccount/getSysAllAmount');
  295. // 请求失败处理
  296. if (res.code == 200 && res.data) {
  297. this.handlingFee = res.data.handlingFee; //可提现
  298. this.willHalding = res.data.willHalding; //预收
  299. this.withdrawalHalding = res.data.withdrawalHalding; //提现中
  300. this.approvedHalding = res.data.approvedHalding; //已提现
  301. this.yushouIds = res.data.ids;
  302. } else {
  303. this.handlingFee = 0; //手续费
  304. this.documentary = 0; //非跟单
  305. this.promotion = 0; //佣金
  306. }
  307. },
  308. toBillInfo(index) {
  309. this.navigate({
  310. url: '/pages/wallet/billInfo',
  311. success: (res) => {
  312. res.eventChannel.emit("acceptData", {
  313. item: this.list[index],
  314. active: this.active,
  315. })
  316. }
  317. }, "navigateTo", true)
  318. },
  319. yushouInfo(index) {
  320. this.navigate({
  321. url: '/pages/wallet/billInfo',
  322. success: (res) => {
  323. res.eventChannel.emit("acceptData", {
  324. item: this.yushouList[index],
  325. active: this.active,
  326. })
  327. }
  328. }, "navigateTo", true)
  329. },
  330. //获取订单数据Start
  331. async getOrdersList(pageNo, pageSize) {
  332. var data = {
  333. "pageNum": pageNo,
  334. "pageSize": pageSize,
  335. "amountStatus": '1',
  336. [this.active == 2 ? "withdrawalTime" : "timeFiltering"]: this.pageRequest.Date,
  337. "auditingStatus": this.active,
  338. };
  339. let res = await this.$http.post('/sysAmountAuditing/queryAppPage', data);
  340. let content = [];
  341. if (res.code == 200) {
  342. if (res.data.content.length > 0) {
  343. content = res.data.content;
  344. }
  345. }
  346. },
  347. //获取订单数据End
  348. //当前时间
  349. transformTime(day) {
  350. var date = new Date();
  351. date.setFullYear(date.getFullYear());
  352. date.setTime(date.getTime());
  353. var strYear = date.getFullYear();
  354. var strDay = day ? date.getDate() - day : date.getDate();
  355. var strMonth = date.getMonth() + 1;
  356. if (strMonth < 10) {
  357. strMonth = "0" + strMonth;
  358. }
  359. if (strDay < 10) {
  360. strDay = "0" + strDay;
  361. }
  362. var datastr = strYear + "-" + strMonth;
  363. return datastr;
  364. },
  365. transformTime1(month) {
  366. var date = new Date();
  367. date.setFullYear(date.getFullYear());
  368. date.setTime(date.getTime());
  369. var strYear = date.getFullYear();
  370. var strDay = date.getDate();
  371. var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;
  372. if (strMonth < 10) {
  373. strMonth = "0" + strMonth;
  374. }
  375. var datastr = strYear + "-" + strMonth;
  376. console.log(datastr);
  377. return datastr;
  378. },
  379. },
  380. };
  381. </script>
  382. <style lang="scss" scoped>
  383. @import '@/style/mixin.scss';
  384. page {
  385. padding: 12px 16px;
  386. background-color: #fff;
  387. }
  388. .term {
  389. height: 100%;
  390. .title {
  391. font-size: 14px;
  392. font-weight: bold;
  393. color: #232832;
  394. padding: 10px 0;
  395. border-bottom: 1px solid #f2f2f2;
  396. }
  397. >text {
  398. font-size: 13px;
  399. font-weight: bold;
  400. color: #232832;
  401. margin-bottom: 10px;
  402. }
  403. .status-data {
  404. padding: 4px 10px;
  405. box-sizing: border-box;
  406. margin-right: 10px;
  407. font-size: 12px;
  408. border: 1px solid #eee;
  409. cursor: pointer;
  410. }
  411. .operateBtn {
  412. font-weight: bold;
  413. font-size: 16px;
  414. .cancel {
  415. width: 50%;
  416. height: 46px;
  417. color: #0052FF;
  418. background-color: #EAEAEA;
  419. }
  420. .confirm {
  421. width: 50%;
  422. height: 46px;
  423. color: #fff;
  424. background-color: #0052FF;
  425. }
  426. }
  427. }
  428. .active {
  429. position: relative;
  430. background: rgba(0, 82, 255, 0.1);
  431. color: #0052FF;
  432. border: 1px solid #0052FF;
  433. font-weight: 700;
  434. }
  435. .queryCriteria {
  436. width: 100%;
  437. height: 32px;
  438. background: #FFFBF2;
  439. border-radius: 6px;
  440. margin-top: 26px;
  441. font-size: 14px;
  442. color: rgba(51, 51, 51, 0.8);
  443. text {
  444. margin-left: 5px;
  445. }
  446. }
  447. .white-box {
  448. width: 100%;
  449. height: 155px;
  450. background: linear-gradient(270deg, #F9D27B 0%, #E5B25F 100%);
  451. box-shadow: 0px 10px 20px 0px rgba(224, 179, 106, 0.4);
  452. border-radius: 6px;
  453. padding: 34rpx 40rpx;
  454. position: relative;
  455. }
  456. .palace {
  457. color: #fff;
  458. margin-top: 8px;
  459. .palace-grid {
  460. font-size: 12px;
  461. text:last-child {
  462. font-size: 14px;
  463. font-family: DIN, DIN;
  464. font-weight: bold;
  465. }
  466. }
  467. }
  468. .white-box .tx {
  469. overflow: hidden;
  470. display: flex;
  471. justify-content: space-between;
  472. align-content: center;
  473. border-bottom: 1px solid #f2f2f2;
  474. }
  475. .white-box .tx .tx-grid {
  476. box-sizing: border-box;
  477. }
  478. .tx-grid-comm-sign {
  479. width: 90px;
  480. height: 30px;
  481. background: rgba(255, 255, 255, 0.6);
  482. box-shadow: -1px 4px 4px 0px rgba(204, 149, 57, 0.2);
  483. border-radius: 14px 0px 0px 14px;
  484. font-weight: bold;
  485. position: absolute;
  486. right: 0;
  487. top: 44px;
  488. text {
  489. font-size: 14px;
  490. color: #CC9539;
  491. margin-left: 2px;
  492. }
  493. }
  494. .white-box .tx .tx-grid .tx-grid-text {
  495. display: block;
  496. color: #333;
  497. font-size: 26rpx;
  498. white-space: nowrap;
  499. text-overflow: ellipsis;
  500. overflow: hidden;
  501. }
  502. .white-box .tx .tx-grid .tx-grid-text .title {
  503. font-size: 26rpx;
  504. font-weight: normal;
  505. color: #fff;
  506. }
  507. .white-box .tx .tx-grid .tx-grid-text .money {
  508. font-size: 24px;
  509. color: #fff;
  510. }
  511. .white-box .tx .tx-grid .tx-grid-text .money-b {
  512. font-size: 28rpx;
  513. }
  514. .list-view {
  515. margin-top: 215px;
  516. }
  517. .list-item {
  518. width: 100%;
  519. padding: 30rpx 28rpx;
  520. box-sizing: border-box;
  521. background: #fff;
  522. border-bottom: 1rpx solid #eaeef1;
  523. }
  524. .item-last::after {
  525. left: 0 !important;
  526. }
  527. .des-box {
  528. min-height: 80rpx;
  529. box-sizing: border-box;
  530. vertical-align: top;
  531. color: #333;
  532. font-size: 24rpx;
  533. display: flex;
  534. flex-direction: column;
  535. justify-content: space-between;
  536. }
  537. .tit {
  538. font-size: 30rpx;
  539. max-width: 500rpx;
  540. white-space: nowrap;
  541. overflow: hidden;
  542. text-overflow: ellipsis;
  543. }
  544. .source {
  545. margin: 12rpx 0;
  546. }
  547. .time {
  548. color: #888;
  549. }
  550. .money {
  551. font-size: 38rpx;
  552. font-weight: 500;
  553. color: #333;
  554. white-space: nowrap;
  555. overflow: hidden;
  556. text-overflow: ellipsis;
  557. }
  558. .less {
  559. color: #4caf50 !important;
  560. }
  561. .tip {
  562. margin-top: 50rpx;
  563. display: flex;
  564. justify-content: center;
  565. align-content: center;
  566. font-size: 24rpx;
  567. color: #888;
  568. }
  569. .nothing {
  570. position: absolute;
  571. top: 320upx;
  572. left: 0;
  573. right: 0;
  574. bottom: 0;
  575. }
  576. .nothing>view {
  577. line-height: 1;
  578. }
  579. .nothing>view.icon {
  580. /* color: #66A3FF; */
  581. color: #989898;
  582. font-size: 260upx;
  583. }
  584. .nothing>view.text {
  585. font-size: 28upx;
  586. color: #989898;
  587. }
  588. /* 查询区域Start */
  589. .queryView {
  590. justify-content: space-around;
  591. height: 82upx;
  592. line-height: 80upx;
  593. }
  594. .queryView>view {
  595. border-top: 1px solid #FFC38F;
  596. border-bottom: 1px solid #FFC38F;
  597. border-left: 1px solid #FFC38F;
  598. box-sizing: border-box;
  599. color: #FFC38F;
  600. }
  601. .queryView>view:nth-child(1) {
  602. flex: 3;
  603. }
  604. .queryView>view:nth-child(2) {
  605. flex: 4;
  606. }
  607. .queryView>view:nth-child(3) {
  608. flex: 3;
  609. }
  610. .queryView>view:nth-child(4) {
  611. border-right: 1px solid #FFC38F;
  612. flex: 3;
  613. }
  614. .fixed {
  615. position: fixed;
  616. top: 56px;
  617. left: 0;
  618. right: 0;
  619. margin: auto;
  620. z-index: 999;
  621. padding: 0 16px;
  622. background-color: #ffffff;
  623. }
  624. /* 查询区域End */
  625. </style>