billDetails2.vue 16 KB

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