billDetails2.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  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==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. "documentary": 0, //可提现手续费金额
  204. willDocumentary: 0,
  205. withdrawalDocumentary: 0,
  206. approvedDocumentary: 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: "2",
  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: "2",
  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=2&amount=${this.documentary}`,
  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. if (res.code == 200 && res.data) {
  317. this.documentary = res.data.documentary; //可提现
  318. this.willDocumentary = res.data.willDocumentary; //预收
  319. this.withdrawalDocumentary = res.data.withdrawalDocumentary; //提现中
  320. this.approvedDocumentary = res.data.approvedDocumentary; //已提现
  321. this.yushouIds = res.data.ids;
  322. } else {
  323. this.willDocumentary = 0; //手续费
  324. this.withdrawalDocumentary = 0; //非跟单
  325. this.approvedDocumentary = 0; //佣金
  326. }
  327. },
  328. toBillInfo(index) {
  329. this.navigate({
  330. url: '/pages/wallet/billInfo',
  331. success: (res) => {
  332. res.eventChannel.emit("acceptData", {
  333. item: this.list[index],
  334. active: this.active,
  335. })
  336. }
  337. }, "navigateTo", true)
  338. },
  339. yushouInfo(index) {
  340. this.navigate({
  341. url: "/pages/wallet/billInfo1?companyId=" + this.yushouList[index].id,
  342. },
  343. "navigateTo", true);
  344. },
  345. //获取订单数据Start
  346. async getOrdersList(pageNo, pageSize) {
  347. var data = {
  348. "pageNum": pageNo,
  349. "pageSize": pageSize,
  350. "amountStatus": '2',
  351. [this.active == 2 ? "withdrawalTime" : "timeFiltering"]: this.pageRequest.Date,
  352. "auditingStatus": this.active,
  353. };
  354. let res = await this.$http.post('/sysAmountAuditing/queryAppPage', data);
  355. if (res.code == 200) {
  356. this.list = res.data.content;
  357. }
  358. },
  359. //获取订单数据End
  360. //当前时间
  361. transformTime(day) {
  362. var date = new Date();
  363. date.setFullYear(date.getFullYear());
  364. date.setTime(date.getTime());
  365. var strYear = date.getFullYear();
  366. var strDay = day ? date.getDate() - day : date.getDate();
  367. var strMonth = date.getMonth() + 1;
  368. if (strMonth < 10) {
  369. strMonth = "0" + strMonth;
  370. }
  371. if (strDay < 10) {
  372. strDay = "0" + strDay;
  373. }
  374. var datastr = strYear + "-" + strMonth + "-" + strDay;
  375. return datastr;
  376. },
  377. transformTime1(month) {
  378. var date = new Date();
  379. date.setFullYear(date.getFullYear());
  380. date.setTime(date.getTime());
  381. var strYear = date.getFullYear();
  382. var strDay = date.getDate();
  383. var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;
  384. if (strMonth < 10) {
  385. strMonth = "0" + strMonth;
  386. }
  387. var datastr = strYear + "-" + strMonth;
  388. console.log(datastr);
  389. return datastr;
  390. },
  391. },
  392. };
  393. </script>
  394. <style lang="scss" scoped>
  395. @import '@/style/mixin.scss';
  396. page {
  397. padding: 12px 16px;
  398. background-color: #fff;
  399. }
  400. .term {
  401. height: 100%;
  402. .title {
  403. font-size: 14px;
  404. font-weight: bold;
  405. color: #232832;
  406. padding: 10px 0;
  407. border-bottom: 1px solid #f2f2f2;
  408. }
  409. >text {
  410. font-size: 13px;
  411. font-weight: bold;
  412. color: #232832;
  413. margin-bottom: 10px;
  414. }
  415. .status-data {
  416. padding: 4px 10px;
  417. box-sizing: border-box;
  418. margin-right: 10px;
  419. font-size: 12px;
  420. border: 1px solid #eee;
  421. cursor: pointer;
  422. }
  423. .operateBtn {
  424. font-weight: bold;
  425. font-size: 16px;
  426. .cancel {
  427. width: 50%;
  428. height: 46px;
  429. color: #0052FF;
  430. background-color: #EAEAEA;
  431. }
  432. .confirm {
  433. width: 50%;
  434. height: 46px;
  435. color: #fff;
  436. background-color: #0052FF;
  437. }
  438. }
  439. }
  440. .active {
  441. position: relative;
  442. background: rgba(0, 82, 255, 0.1);
  443. color: #0052FF;
  444. border: 1px solid #0052FF;
  445. font-weight: 700;
  446. }
  447. .queryCriteria {
  448. width: 100%;
  449. height: 32px;
  450. background: #FFFBF2;
  451. border-radius: 6px;
  452. margin-top: 26px;
  453. font-size: 14px;
  454. color: rgba(51, 51, 51, 0.8);
  455. text {
  456. margin-left: 5px;
  457. }
  458. }
  459. .white-box {
  460. width: 100%;
  461. height: 155px;
  462. background: linear-gradient(270deg, #F9D27B 0%, #E5B25F 100%);
  463. box-shadow: 0px 10px 20px 0px rgba(224, 179, 106, 0.4);
  464. border-radius: 6px;
  465. padding: 34rpx 40rpx;
  466. position: relative;
  467. }
  468. .palace {
  469. color: #fff;
  470. margin-top: 8px;
  471. .palace-grid {
  472. font-size: 12px;
  473. text:last-child {
  474. font-size: 14px;
  475. font-family: DIN, DIN;
  476. font-weight: bold;
  477. }
  478. }
  479. }
  480. .white-box .tx {
  481. overflow: hidden;
  482. display: flex;
  483. justify-content: space-between;
  484. align-content: center;
  485. border-bottom: 1px solid #f2f2f2;
  486. }
  487. .white-box .tx .tx-grid {
  488. box-sizing: border-box;
  489. }
  490. .tx-grid-comm-sign {
  491. width: 90px;
  492. height: 30px;
  493. background: rgba(255, 255, 255, 0.6);
  494. box-shadow: -1px 4px 4px 0px rgba(204, 149, 57, 0.2);
  495. border-radius: 14px 0px 0px 14px;
  496. font-weight: bold;
  497. position: absolute;
  498. right: 0;
  499. top: 44px;
  500. text {
  501. font-size: 14px;
  502. color: #CC9539;
  503. margin-left: 2px;
  504. }
  505. }
  506. .white-box .tx .tx-grid .tx-grid-text {
  507. display: block;
  508. color: #333;
  509. font-size: 26rpx;
  510. white-space: nowrap;
  511. text-overflow: ellipsis;
  512. overflow: hidden;
  513. }
  514. .white-box .tx .tx-grid .tx-grid-text .title {
  515. font-size: 26rpx;
  516. font-weight: normal;
  517. color: #fff;
  518. }
  519. .white-box .tx .tx-grid .tx-grid-text .money {
  520. font-size: 24px;
  521. color: #fff;
  522. }
  523. .white-box .tx .tx-grid .tx-grid-text .money-b {
  524. font-size: 28rpx;
  525. }
  526. .list-view {
  527. height: 100vh;
  528. overflow-y: auto;
  529. padding-top: 225px;
  530. }
  531. .list-item {
  532. width: 100%;
  533. padding: 30rpx 28rpx;
  534. box-sizing: border-box;
  535. background: #fff;
  536. border-bottom: 1rpx solid #eaeef1;
  537. }
  538. .item-last::after {
  539. left: 0 !important;
  540. }
  541. .content-box {
  542. display: flex;
  543. align-items: flex-start;
  544. justify-content: space-between;
  545. }
  546. .des-box {
  547. min-height: 80rpx;
  548. padding-left: 28rpx;
  549. box-sizing: border-box;
  550. vertical-align: top;
  551. color: #333;
  552. font-size: 24rpx;
  553. display: flex;
  554. flex-direction: column;
  555. justify-content: space-between;
  556. }
  557. .tit {
  558. font-size: 30rpx;
  559. max-width: 500rpx;
  560. white-space: nowrap;
  561. overflow: hidden;
  562. text-overflow: ellipsis;
  563. }
  564. .source {
  565. margin: 12rpx 0;
  566. }
  567. .time {
  568. color: #888;
  569. }
  570. .money {
  571. font-size: 38rpx;
  572. font-weight: 500;
  573. color: #333;
  574. white-space: nowrap;
  575. overflow: hidden;
  576. text-overflow: ellipsis;
  577. }
  578. .less {
  579. color: #4caf50 !important;
  580. }
  581. .tip {
  582. margin-top: 50rpx;
  583. display: flex;
  584. justify-content: center;
  585. align-content: center;
  586. font-size: 24rpx;
  587. color: #888;
  588. }
  589. .nothing {
  590. position: absolute;
  591. top: 320upx;
  592. left: 0;
  593. right: 0;
  594. bottom: 0;
  595. }
  596. .nothing>view {
  597. line-height: 1;
  598. }
  599. .nothing>view.icon {
  600. /* color: #66A3FF; */
  601. color: #989898;
  602. font-size: 260upx;
  603. }
  604. .nothing>view.text {
  605. font-size: 28upx;
  606. color: #989898;
  607. }
  608. /* 查询区域Start */
  609. .queryView {
  610. justify-content: space-around;
  611. height: 82upx;
  612. line-height: 80upx;
  613. }
  614. .queryView>view {
  615. border-top: 1px solid #FFC38F;
  616. border-bottom: 1px solid #FFC38F;
  617. border-left: 1px solid #FFC38F;
  618. box-sizing: border-box;
  619. color: #FFC38F;
  620. }
  621. .queryView>view:nth-child(1) {
  622. flex: 3;
  623. }
  624. .queryView>view:nth-child(2) {
  625. flex: 4;
  626. }
  627. .queryView>view:nth-child(3) {
  628. flex: 3;
  629. }
  630. .queryView>view:nth-child(4) {
  631. border-right: 1px solid #FFC38F;
  632. flex: 3;
  633. }
  634. .fixed {
  635. position: fixed;
  636. top: 0;
  637. left: 0;
  638. right: 0;
  639. margin: auto;
  640. z-index: 999;
  641. padding: 12px 16px 0 16px;
  642. background-color: #ffffff;
  643. }
  644. /* 查询区域End */
  645. </style>