billDetails3.vue 16 KB

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