billDetails3.vue 16 KB

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