billDetails3.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <template>
  2. <view>
  3. <view class="white-box">
  4. <view class="tx">
  5. <view class="tx-grid">
  6. <view class="tx-grid-text">
  7. <view class="title">可提现推广费</view>
  8. <view class="money">
  9. <text>{{ extendMoney }}</text>
  10. <text class="money-b">元</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="tx-grid" @click="toWithdraw"><span class="tx-grid-comm-sign">立即提现</span></view>
  15. </view>
  16. <view class="palace palace-one">
  17. <view class="palace-grid">
  18. <view class="palace-grid-text" :class="active==0?'active':''" @tap="changeTab(0)">
  19. <view class="palace-grid-text-data">
  20. <text>{{ carExtendMoney }}</text>
  21. <text class="palace-grid-text-data-b">元</text>
  22. </view>
  23. <view class="palace-grid-text-name">车险推广订单</view>
  24. </view>
  25. </view>
  26. <view class="palace-grid">
  27. <view class="palace-grid-text" :class="active==1?'active':''" @tap="changeTab(1)">
  28. <view class="palace-grid-text-data">
  29. <text>{{ applyExtendMoney }}</text>
  30. <text class="palace-grid-text-data-b">元</text>
  31. </view>
  32. <view class="palace-grid-text-name">提现中订单</view>
  33. </view>
  34. </view>
  35. <view class="palace-grid">
  36. <view class="palace-grid-text" :class="active==2?'active':''" @tap="changeTab(2)">
  37. <view class="palace-grid-text-data">
  38. <text>{{ payExtendMoney }}</text>
  39. <text class="palace-grid-text-data-b">元</text>
  40. </view>
  41. <view class="palace-grid-text-name">已到账订单</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <z-paging auto-show-back-to-top ref="paging" @query="getOrdersList" v-model="list" :default-page-size="10" :mounted-auto-call-reload="true" :style="getHeight">
  47. <view class="list-view">
  48. <!-- 查询区域Start -->
  49. <!-- <view class="queryView d-flex">
  50. <view class="d-flex a-center j-center">
  51. <picker @change="bindPickerTypeChange" :value="typeIndex" :range="typeArray">
  52. <view class="d-flex a-center">{{typeArray[typeIndex]}} <view class="icon iconfont icon-xiala"></view></view>
  53. </picker>
  54. </view>
  55. <view class="d-flex a-center j-center">
  56. <picker @change="bindPickerYearChange" :value="yearIndex" :range="yearArray">
  57. <view class="d-flex a-center">{{yearArray[yearIndex]}}年 <view class="icon iconfont icon-xiala"></view></view>
  58. </picker>
  59. </view>
  60. <view class="d-flex a-center j-center">
  61. <picker @change="bindPickerMonthChange" :value="monthIndex" :range="monthArray">
  62. <view class="d-flex a-center">{{monthArray[monthIndex]}}月 <view class="icon iconfont icon-xiala"></view></view>
  63. </picker>
  64. </view>
  65. <view class="d-flex a-center j-center">
  66. <picker @change="bindPickerDateChange" :value="dateIndex" :range="dateArray">
  67. <view class="d-flex a-center">{{dateArray[dateIndex]}}日 <view class="icon iconfont icon-xiala"></view></view>
  68. </picker>
  69. </view>
  70. <view class="d-flex a-center j-center">
  71. <view class="d-flex a-center px-2">合计:0.00</view>
  72. </view>
  73. </view> -->
  74. <!-- 查询区域End -->
  75. <block v-for="(item,index) in list" :key="index">
  76. <view class="list-item">
  77. <view class="content-box">
  78. <view class="des-box" v-if="active==0">
  79. <view class="tit">订单号:{{item.orderno }}</view>
  80. <view class="tit">佣金级别:{{item.level}}</view>
  81. <view class="tit">佣金比例:{{ item.commissionrate*100 }}%</view>
  82. <view class="time">签单时间:{{ item.insuredtime }}</view>
  83. </view>
  84. <view class="des-box" v-if="active==1" @tap="toBillInfo(index)">
  85. <view class="tit">订单号:{{item.applyno }}</view>
  86. <view class="time">提现时间:{{ item.createtime }}</view>
  87. </view>
  88. <view class="des-box" v-if="active==2" @tap="toBillInfo(index)">
  89. <view class="tit">订单号:{{item.applyno }}</view>
  90. <view class="time">提现时间:{{ item.createtime }}</view>
  91. <view class="time">到账时间:{{ item.paytime }}</view>
  92. </view>
  93. </view>
  94. <view class="money d-flex a-center j-center flex-column" v-if="active==0">
  95. <view>+{{item.commissionamount}}</view>
  96. <view>推广佣金</view>
  97. </view>
  98. <view class="money d-flex a-center j-center flex-column" v-if="active==1">
  99. <view>{{item.applyamount}}</view>
  100. <view>佣金提现中</view>
  101. </view>
  102. <view class="money d-flex a-center j-center flex-column" v-if="active==2">
  103. <view>-{{item.applyamount}}</view>
  104. <view>提现成功</view>
  105. </view>
  106. </view>
  107. </block>
  108. </view>
  109. </z-paging>
  110. </view>
  111. </template>
  112. <script>
  113. import {mapState} from "vuex"
  114. import ZPagingMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin';
  115. export default {
  116. components: {
  117. ZPagingMixin
  118. },
  119. computed:{
  120. ...mapState(['userInfo']),
  121. getHeight() {
  122. let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(356);
  123. return `height: ${height}px`;
  124. }
  125. },
  126. onLoad() {
  127. // 搜索年选项Start
  128. this.yearArray=[(new Date().getFullYear()-2),(new Date().getFullYear()-1),new Date().getFullYear(),]
  129. this.yearIndex=this.yearArray.length-1;
  130. // 搜索年选项End
  131. // 搜索月选项Start
  132. var month = new Date().getMonth()+1;
  133. for(var i=1;i<=month;i++){
  134. if(i<10){
  135. this.monthArray.push('0'+i);
  136. }else{
  137. this.monthArray.push(i);
  138. }
  139. }
  140. this.monthIndex=this.monthArray.length-1;
  141. // 搜索月选项End
  142. // 搜索日选项Start
  143. var date = new Date().getDate();
  144. for(var i=1;i<=date;i++){
  145. if(i<10){
  146. this.dateArray.push('0'+i);
  147. }else{
  148. this.dateArray.push(i);
  149. }
  150. }
  151. this.dateIndex=this.dateArray.length-1;
  152. // 搜索日选项End
  153. },
  154. data() {
  155. return {
  156. /* 查询区域Start */
  157. typeIndex:0, //订单的类型选择
  158. typeArray:['车险','意外险','寿险'], //订单的类型
  159. yearArray:[], //订单的查询年份
  160. yearIndex:0, //订单的年份选择
  161. monthArray:[], //订单的查询月份
  162. monthIndex:0, //订单的月份选择
  163. dateArray:[], //订单的查询月份
  164. dateIndex:0, //订单的月份选择
  165. /* 查询区域End */
  166. active:0,
  167. list: [],
  168. extendMoney: 0, //预收金额
  169. carExtendMoney: 0, //车险预收金额
  170. applyExtendMoney: 0, //提现中金额
  171. payExtendMoney: 0, //已到账金额
  172. };
  173. },
  174. onShow() {
  175. this.getCarExtendMoney();
  176. },
  177. methods: {
  178. bindPickerTypeChange(e){
  179. this.typeIndex = e.target.value;
  180. },
  181. //搜索年发生变化
  182. bindPickerYearChange(e) {
  183. this.yearIndex = e.target.value;
  184. this.monthArray=[];
  185. if(this.yearIndex == (this.yearArray.length-1)){
  186. var month = new Date().getMonth()+1;
  187. for(var i=1;i<=month;i++){
  188. if(i<10){
  189. this.monthArray.push('0'+i);
  190. }else{
  191. this.monthArray.push(i);
  192. }
  193. }
  194. this.monthIndex=this.monthArray.length-1;
  195. }else{
  196. for(var i=1;i<=12;i++){
  197. if(i<10){
  198. this.monthArray.push('0'+i);
  199. }else{
  200. this.monthArray.push(i);
  201. }
  202. }
  203. this.monthIndex=0;
  204. }
  205. },
  206. //搜索月发生变化
  207. bindPickerMonthChange(e) {
  208. this.monthIndex = e.target.value;
  209. },
  210. bindPickerDateChange(e){
  211. this.dateIndex = e.target.value;
  212. },
  213. async changeTab(tabIndex){
  214. this.active = tabIndex;
  215. this.list = [];
  216. await this.getOrdersList(1,10);
  217. },
  218. // 可提现推广费查询
  219. async getCarExtendMoney() {
  220. let res= await this.$http.get('/insPayApply/extendAccount?userid=' + this.userInfo.sysUser.id, {}, {load:false});
  221. if (res.code == 200) {
  222. this.carExtendMoney = ((res.data.totalAmount-0)+(res.data.accountBalance-0)).toFixed(2);
  223. this.extendMoney = res.data.accountBalance;
  224. this.applyExtendMoney = res.data.applyAmount;
  225. this.payExtendMoney = res.data.payamount;
  226. }
  227. },
  228. //获取订单数据Start
  229. async getOrdersList(pageNo, pageSize) {
  230. let result;
  231. if(this.active ==0){
  232. var data = {
  233. "columnFilters": {
  234. "userid": {
  235. "name": "userid",
  236. "value": this.userInfo.sysUser.id
  237. },
  238. "auditstatus": {
  239. "name": "auditstatus",
  240. "value": "1"
  241. }
  242. },
  243. "pageNum": pageNo,
  244. "pageSize": pageSize
  245. };
  246. result = await this.$http.post('/insFeeDetail/queryCommission', data);
  247. }else if(this.active ==1){
  248. var data = {
  249. "columnFilters": {
  250. "userid": {
  251. "name": "userid",
  252. "value": this.userInfo.sysUser.id
  253. },
  254. "applytype": {
  255. "name": "applytype",
  256. "value": 'B'
  257. },
  258. "applystatus":{
  259. "name":"applystatus",
  260. "value":"0"
  261. }
  262. },
  263. "pageNum": this.currentPage,
  264. "pageSize": this.pageSize
  265. };
  266. result = await this.$http.post('/insPayApply/findPage', data);
  267. }else if(this.active ==2){
  268. var data = {
  269. "columnFilters": {
  270. "userid": {
  271. "name": "userid",
  272. "value": this.userInfo.sysUser.id
  273. },
  274. "applytype": {
  275. "name": "applytype",
  276. "value": 'B'
  277. },
  278. "applystatus": {
  279. "name": "applystatus",
  280. "value": '2'
  281. }
  282. },
  283. "pageNum": this.currentPage,
  284. "pageSize": this.pageSize
  285. };
  286. result = await this.$http.post('/insPayApply/findPage', data);
  287. }
  288. let res = result;
  289. let content = [];
  290. if (res.code == 200) {
  291. if(res.data.content.length>0){
  292. content = res.data.content;
  293. }
  294. }
  295. this.$refs.paging.complete(content);
  296. },
  297. //获取订单数据End
  298. //获取订单数据End
  299. // 去提现
  300. toWithdraw(){
  301. if((!!this.userInfo.esmUserInternal) && (!!this.userInfo.esmUserInternal.accountno)){
  302. this.navigate({
  303. url:'/pages/wallet/withdraw1'
  304. },"navigateTo",true)
  305. }else{
  306. this.navigate({
  307. url:'/pages/wallet/bindBank',
  308. complete:() => {
  309. setTimeout(() => {
  310. uni.showToast({ title: '请先绑定银行卡',duration:3000,icon:"none"});
  311. }, 500);
  312. }
  313. },"navigateTo",true)
  314. }
  315. },
  316. toBillInfo(index){
  317. this.navigate({
  318. url:'/pages/wallet/billInfo',
  319. success:(res) => {
  320. res.eventChannel.emit("acceptData",{
  321. item:this.list[index]
  322. })
  323. }
  324. },"navigateTo",true)
  325. }
  326. }
  327. };
  328. </script>
  329. <style lang="scss" scoped>
  330. @import '@/style/mixin.scss';
  331. page {
  332. background-color: #fff;
  333. }
  334. .white-box {
  335. width: 94%;
  336. background: white;
  337. border-radius: 10rpx;
  338. margin: 20rpx auto 20rpx;
  339. box-shadow: 0 6rpx 20rpx #e7e7e7;
  340. }
  341. .white-box .tx {
  342. padding-top: 26rpx;
  343. overflow: hidden;
  344. display: flex;
  345. justify-content: space-between;
  346. align-content: center;
  347. }
  348. .white-box .tx .tx-grid {
  349. box-sizing: border-box;
  350. }
  351. .white-box .tx .tx-grid:first-child {
  352. margin-left: 40rpx;
  353. }
  354. .white-box .tx .tx-grid .tx-grid-comm-sign {
  355. display: block;
  356. border-radius: 40rpx 0 0 40rpx;
  357. font-size: 26rpx;
  358. padding: 16rpx 44rpx;
  359. background: linear-gradient(to right, rgba($themeColor,0.8), rgba($themeColor,0.6));
  360. color: #fff;
  361. font-weight: bold;
  362. }
  363. .white-box .tx .tx-grid .tx-grid-text {
  364. display: block;
  365. color: #333;
  366. font-size: 26rpx;
  367. white-space: nowrap;
  368. text-overflow: ellipsis;
  369. overflow: hidden;
  370. }
  371. .white-box .palace .palace-grid .palace-grid-text.active{
  372. background-color: rgba($themeColor,0.6);
  373. }
  374. .white-box .palace .palace-grid .palace-grid-text.active>view{
  375. color: #FFFFFF;
  376. }
  377. .white-box .tx .tx-grid .tx-grid-text .title {
  378. font-size: 26rpx;
  379. font-weight: normal;
  380. color: $themeColor;
  381. }
  382. .white-box .tx .tx-grid .tx-grid-text .money {
  383. font-size: 60rpx;
  384. color: $themeColor;
  385. letter-spacing: 2rpx;
  386. margin-bottom: 10rpx;
  387. }
  388. .white-box .tx .tx-grid .tx-grid-text .money-b {
  389. font-size: 28rpx;
  390. }
  391. .white-box .palace {
  392. padding-bottom: 20rpx;
  393. overflow: hidden;
  394. display: flex;
  395. justify-content: center;
  396. }
  397. .white-box .palace .palace-grid {
  398. flex: 1;
  399. position: relative;
  400. box-sizing: border-box;
  401. }
  402. .white-box .palace .palace-grid .palace-grid-text {
  403. display: block;
  404. text-align: center;
  405. color: #333;
  406. font-size: 32rpx;
  407. white-space: nowrap;
  408. text-overflow: ellipsis;
  409. overflow: hidden;
  410. }
  411. .white-box .palace .palace-grid .palace-grid-text .palace-grid-text-name {
  412. font-size: 26rpx;
  413. font-weight: normal;
  414. color: $themeColor;
  415. }
  416. .white-box .palace .palace-grid .palace-grid-text .palace-grid-text-data {
  417. font-size: 32rpx;
  418. color: $themeColor;
  419. letter-spacing: 2rpx;
  420. margin-bottom: 5rpx;
  421. }
  422. .white-box .palace .palace-grid .palace-grid-text .palace-grid-text-data .palace-grid-text-data-b {
  423. font-size: 20rpx;
  424. }
  425. .list-view {
  426. position: relative;
  427. width: 100%;
  428. overflow: hidden;
  429. }
  430. .list-item {
  431. width: 100%;
  432. padding: 30rpx 28rpx;
  433. box-sizing: border-box;
  434. background: #fff;
  435. display: flex;
  436. align-items: flex-start;
  437. justify-content: space-between;
  438. border-bottom: 1rpx solid #eaeef1;
  439. }
  440. .item-last::after {
  441. left: 0 !important;
  442. }
  443. .content-box {
  444. display: flex;
  445. align-items: flex-start;
  446. justify-content: space-between;
  447. }
  448. .des-box {
  449. min-height: 80rpx;
  450. padding-left: 28rpx;
  451. box-sizing: border-box;
  452. vertical-align: top;
  453. color: #333;
  454. font-size: 24rpx;
  455. display: flex;
  456. flex-direction: column;
  457. justify-content: space-between;
  458. }
  459. .tit {
  460. font-size: 30rpx;
  461. max-width: 500rpx;
  462. white-space: nowrap;
  463. overflow: hidden;
  464. text-overflow: ellipsis;
  465. }
  466. .time {
  467. color: #888;
  468. }
  469. .money {
  470. font-size: 38rpx;
  471. font-weight: 500;
  472. color: $themeColor;
  473. white-space: nowrap;
  474. overflow: hidden;
  475. text-overflow: ellipsis;
  476. padding-left: 20rpx;
  477. }
  478. /* 查询区域Start */
  479. .queryView {
  480. justify-content: space-around;
  481. height: 82upx;
  482. line-height: 80upx;
  483. }
  484. .queryView>view{
  485. border-top: 1px solid #FFC38F;
  486. border-bottom: 1px solid #FFC38F;
  487. border-left: 1px solid #FFC38F;
  488. box-sizing: border-box;
  489. color: #FFC38F;
  490. }
  491. .queryView>view:nth-child(1){
  492. flex: 3;
  493. }
  494. .queryView>view:nth-child(2){
  495. flex: 4;
  496. }
  497. .queryView>view:nth-child(3){
  498. flex: 3;
  499. }
  500. .queryView>view:nth-child(4){
  501. border-right: 1px solid #FFC38F;
  502. flex: 3;
  503. }
  504. /* 查询区域End */
  505. </style>