billDetails2.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <service-widget @btnClick="btn_click"></service-widget>
  5. <public-module></public-module>
  6. <view class="fixed">
  7. <view class="white-box">
  8. <view class="tx">
  9. <view class="tx-grid">
  10. <view class="tx-grid-text">
  11. <view class="title">可提现(元)</view>
  12. <view class="money">
  13. <text v-if="documentary">{{ documentary }}</text>
  14. <text v-else>0.00</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="tx-grid-comm-sign dis j-c a-c" @click="toWithdraw">
  19. <image src="/static/image/bindBank/Frame1.png" mode="" style="width: 18px;height: 18px;">
  20. </image>
  21. <text>立即提现</text>
  22. </view>
  23. </view>
  24. <view class="palace dis a-c j-s">
  25. <view class="palace-grid dis f-c">
  26. <text class="">预收金额</text>
  27. <text v-if="willDocumentary">{{ willDocumentary }}</text>
  28. <text v-else>0.00</text>
  29. </view>
  30. <view class="palace-grid dis f-c">
  31. <text class="">提现中</text>
  32. <text v-if="withdrawalDocumentary">{{ withdrawalDocumentary}}</text>
  33. <text v-else>0.00</text>
  34. </view>
  35. <view class="palace-grid dis f-c">
  36. <text class="">已提现</text>
  37. <text v-if="approvedDocumentary">{{ approvedDocumentary }}</text>
  38. <text v-else>0.00</text>
  39. </view>
  40. </view>
  41. </view>
  42. <!-- 查询区域Start -->
  43. <view class="queryCriteria dis j-s a-c ">
  44. <view class="dis a-c j-c" style="width: 49%;" @click="statusShow=true">
  45. <image src="/static/image/bindBank/time.png" mode="" style="width: 18px;height: 18px;"></image>
  46. <text>{{statusLabel}}</text>
  47. </view>
  48. <view class="" style="width: 1px;height: 90%;background-color: #D4D0D0;"></view>
  49. <view class="dis a-c j-c" style="width: 49%;" @click="timeShow=true">
  50. <image src="/static/image/bindBank/date.png" mode="" style="width: 18px;height: 18px;"></image>
  51. <text>{{pageRequest.Date}}</text>
  52. </view>
  53. </view>
  54. <!-- 查询区域End -->
  55. </view>
  56. <view class="list-view">
  57. <view v-for="(item,index) in list" :key="index" v-if="active==2 || active==3">
  58. <view class="list-item dis a-c j-s" @tap="toBillInfo(index)">
  59. <view class="">
  60. <view class="des-box" v-if="active==2">
  61. <view class="tit">订单号:{{item.id }}</view>
  62. <view class="time">提现时间:{{ item.createTime }}</view>
  63. </view>
  64. <view class="des-box" v-if="active==3">
  65. <view class="tit">订单号:{{item.id }}</view>
  66. <view class="time">提现时间:{{ item.createTime }}</view>
  67. <view class="time" v-if="item.paytime">到账时间:{{ item.paytime }}</view>
  68. </view>
  69. </view>
  70. <view class="money dis f-c a-c j-s" v-if="active==1">
  71. <view
  72. style="padding: 0 10px;border: 1px solid #229805;border-radius: 30px;font-size: 12px;color: #229805;">
  73. 预收</view>
  74. <view v-if="item.amount">{{item.amount }}</view>
  75. <view v-else>0.00</view>
  76. </view>
  77. <view class="money dis f-c a-c j-s " v-if="active==2">
  78. <view
  79. style="padding: 0 10px;border: 1px solid #FF5600;border-radius: 30px;font-size: 12px;color: #FF5600;">
  80. 提现中</view>
  81. <view v-if="item.amount">{{item.amount }}</view>
  82. <view v-else>0.00</view>
  83. </view>
  84. <view class="money dis f-c a-c j-s" v-if="active==3">
  85. <view
  86. style="padding: 0 10px;border: 1px solid #0052FF;border-radius: 30px;font-size: 12px;color: #0052FF;">
  87. 已提现
  88. </view>
  89. <view v-if="item.amount">{{item.amount }}</view>
  90. <view v-else>0.00</view>
  91. </view>
  92. </view>
  93. </view>
  94. <view v-for="(item,index) in yushouList" :key="index" v-if="active==0 || active==1">
  95. <view class="list-item dis a-c j-s" @tap="yushouInfo(index)">
  96. <view class="content-box">
  97. <view class="des-box">
  98. <view class="tit">订单号:{{item.id }}</view>
  99. <view class="time">签单时间:{{ item.signingTime }}</view>
  100. <view class="time">车牌号:{{ item.licenseno }}</view>
  101. </view>
  102. </view>
  103. <view class="money dis f-c a-c j-s" v-if="active==0">
  104. <view
  105. style="padding: 0 10px;border: 1px solid #229805;border-radius: 30px;font-size: 12px;color: #229805;">
  106. 预收</view>
  107. <view v-if="item.willAmount">{{item.willAmount }}</view>
  108. <view v-else>0.00</view>
  109. </view>
  110. <view class="money dis f-c a-c j-s" v-if="active==1">
  111. <view
  112. style="padding: 0 10px;border: 1px solid #229805;border-radius: 30px;font-size: 12px;color: #229805;">
  113. 实收</view>
  114. <view v-if="item.willAmount">{{item.willAmount }}</view>
  115. <view v-else>0.00</view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <u-popup v-model="statusShow" mode="bottom" height="500">
  121. <view class="term dis f-c j-s">
  122. <view style="padding: 0 16px;">
  123. <view class="title dis j-c a-c">
  124. <text>状态筛选</text>
  125. </view>
  126. <text>订单状态</text>
  127. <view class="dis a-c " style="margin-top: 10px;">
  128. <view class="status-data" :class="item.value==active? 'active':''"
  129. v-for="(item,index) in statusList" @tap.stop.prevent="statusclick(item)" :key="index">
  130. {{item.label}}
  131. </view>
  132. </view>
  133. </view>
  134. <view class="operateBtn dis ">
  135. <view class="cancel dis a-c j-c" @click="statusShow=false">
  136. 取消
  137. </view>
  138. <view class="confirm dis a-c j-c" @click="stausSearch">
  139. 确定
  140. </view>
  141. </view>
  142. </view>
  143. </u-popup>
  144. <u-picker v-model="timeShow" mode="time" :params="params" @confirm="startconfirm"></u-picker>
  145. </view>
  146. </template>
  147. <script>
  148. import {
  149. mapState
  150. } from "vuex"
  151. import ZPagingMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin';
  152. export default {
  153. components: {
  154. ZPagingMixin
  155. },
  156. data() {
  157. return {
  158. statusShow: false, //状态筛选
  159. timeShow: false, //日期筛选
  160. params: {
  161. year: true, //年
  162. month: true, //月
  163. day: true, //日
  164. },
  165. //状态筛选list
  166. statusLabel: "提现中",
  167. statusList: [{
  168. label: '预收',
  169. value: 0,
  170. searchType: 1,
  171. src: "/static/image/car-insure/state2.png"
  172. },
  173. {
  174. label: '实收',
  175. value: 1,
  176. searchType: 2,
  177. src: "/static/image/car-insure/state2.png"
  178. },
  179. {
  180. label: '提现中',
  181. value: 2,
  182. src: "/static/image/car-insure/state3.png"
  183. },
  184. {
  185. label: '已提现',
  186. value: 3,
  187. src: "/static/image/car-insure/state4.png"
  188. },
  189. ],
  190. /* 时间筛选相关 */
  191. pageRequest: { //查询的默认条件
  192. Date: "",
  193. pageNum: 1,
  194. pageSize: 20,
  195. },
  196. /* 查询区域Start */
  197. /* 查询区域End */
  198. currentPage: 1, //当前页码
  199. pageSize: 5, //每页展示条数
  200. totalPages: 0, //总页数
  201. totalSize: 0, //总条数
  202. list: [],
  203. loadStatus: 0,
  204. "documentary": 0, //可提现手续费金额
  205. willDocumentary: 0,
  206. withdrawalDocumentary: 0,
  207. approvedDocumentary: 0,
  208. yushouIds: '',
  209. yushouList: [],
  210. active: 2,
  211. searchType: "",
  212. };
  213. },
  214. onLoad(params) {
  215. this.pageRequest.Date = this.transformTime();
  216. },
  217. computed: {
  218. ...mapState(['userInfo']),
  219. getHeight() {
  220. let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(356);
  221. return `height: ${height}px`;
  222. }
  223. },
  224. onShow() {
  225. this.getCarAdvanceMoney();
  226. this.getOrdersList(1, 20);
  227. },
  228. methods: {
  229. btn_click() {
  230. uni.navigateTo({
  231. url: '/pages/chat/chat'
  232. })
  233. },
  234. async stausSearch() {
  235. switch (this.active) {
  236. case 0:
  237. case 1:
  238. let res = await this.$http.post('/sysUserAccount/getInsOrders', {
  239. ids: this.yushouIds,
  240. timeFiltering: this.pageRequest.Date,
  241. amountType: "2",
  242. searchType: this.searchType,
  243. });
  244. if (res.code == 200 && res.data) {
  245. this.yushouList = res.data.insFeeOrderNewList;
  246. this.statusShow = false;
  247. }
  248. break;
  249. case 2:
  250. case 3:
  251. await this.getOrdersList(1, 20);
  252. this.statusShow = false;
  253. break;
  254. default:
  255. break;
  256. }
  257. },
  258. async startconfirm(e) {
  259. this.pageRequest.Date = e.year + '-' + e.month + "-" + e.day;
  260. switch (this.active) {
  261. case 0:
  262. case 1:
  263. let res = await this.$http.post('/sysUserAccount/getInsOrders', {
  264. ids: this.yushouIds,
  265. timeFiltering: this.pageRequest.Date,
  266. amountType: "2",
  267. searchType: this.searchType,
  268. });
  269. if (res.code == 200 && res.data) {
  270. this.yushouList = res.data.insFeeOrderNewList;
  271. }
  272. break;
  273. case 2:
  274. case 3:
  275. await this.getOrdersList(1, 20);
  276. break;
  277. }
  278. },
  279. //状态筛选
  280. statusclick(e) {
  281. this.active = e.value;
  282. this.statusLabel = e.label;
  283. this.searchType = e.searchType;
  284. },
  285. async changeTab(tabIndex) {
  286. this.active = tabIndex;
  287. this.list = [];
  288. await this.getOrdersList(1, 20);
  289. },
  290. // 去提现
  291. async toWithdraw() {
  292. let res = await this.$http.post('/userBank/getUserBankList', {
  293. auditStatus: '1',
  294. });
  295. if (res.data.length) {
  296. this.navigate({
  297. url: `/pages/wallet/withdraw?amountStatus=2&amount=${this.documentary}`,
  298. }, "navigateTo", true)
  299. } else {
  300. uni.showToast({
  301. title: '暂无审核通过的银行卡,不可提现',
  302. duration: 3000,
  303. icon: "none"
  304. });
  305. // this.navigate({
  306. // url: '/pages/wallet/bindBank',
  307. // complete: () => {
  308. // setTimeout(() => {
  309. // uni.showToast({
  310. // title: '请先绑定银行卡',
  311. // duration: 3000,
  312. // icon: "none"
  313. // });
  314. // }, 500);
  315. // }
  316. // }, "navigateTo", true)
  317. }
  318. },
  319. // 预收账户金额查询
  320. async getCarAdvanceMoney() {
  321. let res = await this.$http.get('/sysUserAccount/getSysAllAmount');
  322. if (res.code == 200 && res.data) {
  323. this.documentary = res.data.documentary; //可提现
  324. this.willDocumentary = res.data.willDocumentary; //预收
  325. this.withdrawalDocumentary = res.data.withdrawalDocumentary; //提现中
  326. this.approvedDocumentary = res.data.approvedDocumentary; //已提现
  327. this.yushouIds = res.data.ids;
  328. } else {
  329. this.willDocumentary = 0; //手续费
  330. this.withdrawalDocumentary = 0; //非跟单
  331. this.approvedDocumentary = 0; //佣金
  332. }
  333. },
  334. toBillInfo(index) {
  335. this.navigate({
  336. url: '/pages/wallet/billInfo',
  337. success: (res) => {
  338. res.eventChannel.emit("acceptData", {
  339. item: this.list[index],
  340. active: this.active,
  341. })
  342. }
  343. }, "navigateTo", true)
  344. },
  345. yushouInfo(index) {
  346. this.navigate({
  347. url: "/pages/wallet/billInfo1?companyId=" + this.yushouList[index].id,
  348. },
  349. "navigateTo", true);
  350. },
  351. //获取订单数据Start
  352. async getOrdersList(pageNo, pageSize) {
  353. var data = {
  354. "pageNum": pageNo,
  355. "pageSize": pageSize,
  356. "amountStatus": '2',
  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. .content-box {
  548. display: flex;
  549. align-items: flex-start;
  550. justify-content: space-between;
  551. }
  552. .des-box {
  553. min-height: 80rpx;
  554. padding-left: 28rpx;
  555. box-sizing: border-box;
  556. vertical-align: top;
  557. color: #333;
  558. font-size: 24rpx;
  559. display: flex;
  560. flex-direction: column;
  561. justify-content: space-between;
  562. }
  563. .tit {
  564. font-size: 30rpx;
  565. max-width: 500rpx;
  566. white-space: nowrap;
  567. overflow: hidden;
  568. text-overflow: ellipsis;
  569. }
  570. .source {
  571. margin: 12rpx 0;
  572. }
  573. .time {
  574. color: #888;
  575. }
  576. .money {
  577. font-size: 38rpx;
  578. font-weight: 500;
  579. color: #333;
  580. white-space: nowrap;
  581. overflow: hidden;
  582. text-overflow: ellipsis;
  583. }
  584. .less {
  585. color: #4caf50 !important;
  586. }
  587. .tip {
  588. margin-top: 50rpx;
  589. display: flex;
  590. justify-content: center;
  591. align-content: center;
  592. font-size: 24rpx;
  593. color: #888;
  594. }
  595. .nothing {
  596. position: absolute;
  597. top: 320upx;
  598. left: 0;
  599. right: 0;
  600. bottom: 0;
  601. }
  602. .nothing>view {
  603. line-height: 1;
  604. }
  605. .nothing>view.icon {
  606. /* color: #66A3FF; */
  607. color: #989898;
  608. font-size: 260upx;
  609. }
  610. .nothing>view.text {
  611. font-size: 28upx;
  612. color: #989898;
  613. }
  614. /* 查询区域Start */
  615. .queryView {
  616. justify-content: space-around;
  617. height: 82upx;
  618. line-height: 80upx;
  619. }
  620. .queryView>view {
  621. border-top: 1px solid #FFC38F;
  622. border-bottom: 1px solid #FFC38F;
  623. border-left: 1px solid #FFC38F;
  624. box-sizing: border-box;
  625. color: #FFC38F;
  626. }
  627. .queryView>view:nth-child(1) {
  628. flex: 3;
  629. }
  630. .queryView>view:nth-child(2) {
  631. flex: 4;
  632. }
  633. .queryView>view:nth-child(3) {
  634. flex: 3;
  635. }
  636. .queryView>view:nth-child(4) {
  637. border-right: 1px solid #FFC38F;
  638. flex: 3;
  639. }
  640. .fixed {
  641. position: fixed;
  642. top: 0;
  643. left: 0;
  644. right: 0;
  645. margin: auto;
  646. z-index: 999;
  647. padding: 12px 16px 0 16px;
  648. background-color: #ffffff;
  649. }
  650. /* 查询区域End */
  651. </style>