billDetails1.vue 16 KB

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