my.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <!-- 头部信息Start -->
  6. <view class="headers " :style="headerStyle">
  7. <view class="dis a-c j-c">
  8. <text>我的</text>
  9. <image @click="tool" src="/static/image/my/Frame.png" mode="">
  10. </image>
  11. </view>
  12. </view>
  13. <view class="Personnel" :style="{ 'background-image': 'url(' + backImage + ')' }">
  14. <!-- <view class="Personnel-title">
  15. 职位/职级
  16. </view> -->
  17. <view class="dis a-c Personnel-info" >
  18. <view class="Personnel-img">
  19. <image :src="avatar" class="avatar" mode=""></image>
  20. <image :src="backLogo" mode=""></image>
  21. </view>
  22. <view class="full-name" >
  23. <text>{{userInfo.sysUser.userName}}</text>
  24. <!-- <text >司龄 1年</text> -->
  25. </view>
  26. <text style="line-height: 17px;">{{userInfo.sysUser.deptName}}</text>
  27. <view class=" dis j-s digit">
  28. <view class=" dis a-c">
  29. <image src="/static/icon/电话.png" mode=""></image>
  30. <text>{{userInfo.sysUser.mobile}}</text>
  31. </view>
  32. <view v-if="userInfo.sysUser.weChat" class=" dis" style="padding-left: 20%;">
  33. <image src="/static/icon/微信.png" mode=""></image>
  34. <text>{{userInfo.sysUser.weChat}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="withdrawal-box">
  39. <view class="dis a-c j-c withdrawal-title">
  40. <text >可提现总金额</text>
  41. <text @tap="accountTool('/pages/wallet/bankCard')">银行卡</text>
  42. </view>
  43. <view class="dis a-s j-c withdrawal-sum">
  44. <text>¥</text>
  45. <text>{{getApplication.cashFee || 0}} </text>
  46. </view>
  47. <view class="withdrawal-income dis">
  48. <view style="border-right: 1px solid #C5E7FF;">
  49. <text @click="incomeClick">佣金总收入金额
  50. <image style="display: inline-block; width: 9px;height:9px;vertical-align: -1px;" src="/static/icon/向右.png" mode=""></image>
  51. </text>
  52. <text>¥{{getApplication.extractFee || 0}} </text>
  53. </view>
  54. <view>
  55. <text>已经提现金额</text>
  56. <text>¥{{getApplication.historyFee || 0}}</text>
  57. </view>
  58. </view>
  59. <view class="withdrawal-fun" @click="toWithdraw">提现</view>
  60. </view>
  61. </view>
  62. <view class=" dis a-c j-s" style="margin: 0px 16px;">
  63. <view class="withdrawal-record">
  64. <i></i>
  65. <text>提现记录</text>
  66. </view>
  67. <view class="search" @click="searchPopup">
  68. <text>自定义时间<i></i></text>
  69. </view>
  70. </view>
  71. <view class="withdrawal-flow" >
  72. <!-- <view style="border-bottom: 1px solid #EEEEEE;padding: 15px 0;
  73. margin: 0 15px;" v-for="val in withdrawalData" :key="val"> -->
  74. <view class="withdrawal-card" v-for="val in withdrawalData" :key="val" @click="viewWithdrawal(val)">
  75. <view class="dis j-s" >
  76. <view>
  77. <view style="line-height: 18px;" >提现</view>
  78. <text style="font-size: 10px;color: #999999;">{{val.createTime}}</text>
  79. </view>
  80. <view class="dis a-c">
  81. <view style="text-align: right;">
  82. <view style="line-height: 18px;">-{{val.cashFee}}</view>
  83. <text class="withdrawal-status" v-if="val.status=='0'" style="background: #EAF0FF;color: #2D6DFF;">提现中</text>
  84. <text class="withdrawal-status" v-if="val.status=='1'" style="background: #E3FBE7;color: #18B63B;">已提现</text>
  85. <text class="withdrawal-status" v-if="val.status=='2'" style="background: #FFECEC ;color: #F74141;">提现失败</text>
  86. </view>
  87. <image src="/static/icon/you.png" mode=""></image>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  93. </view>
  94. </template>
  95. <script>
  96. import myDatePicker from '../components/date-picker.vue';
  97. import {
  98. mapState,
  99. mapMutations
  100. } from "vuex"
  101. export default {
  102. components: {
  103. myDatePicker
  104. },
  105. data() {
  106. return {
  107. info: ["", ""],
  108. current: 0,
  109. mode: 'default',
  110. headerStyle: {
  111. backgroundColor: '',
  112. backgroundImage: '',
  113. backgroundSize: '',
  114. backgroundPosition: '',
  115. boxShadow: ''
  116. // 其他样式属性...
  117. },
  118. showBackground: false,
  119. prevScrollTop: 0,
  120. avatar: "/static/image/my/无性别.png",
  121. getApplication:{},
  122. withdrawalData:[],
  123. backImage:'',
  124. backLogo:'',
  125. }
  126. },
  127. computed: {
  128. ...mapState(['userInfo', "userCheckInfo", ]),
  129. },
  130. async onShow() {
  131. console.log(this.userInfo,222222)
  132. this.backImage= this.userInfo.sysUser.sysPartnerConfig.image
  133. this.backLogo=this.userInfo.sysUser.sysPartnerConfig.logo
  134. let res = await this.$http.get('/APPPartner/getFee');
  135. if (res.code == 200) {
  136. this.getApplication = res.data;
  137. }
  138. if (this.userInfo.sysUser.sex=='F') {
  139. this.avatar = "/static/image/my/女.png"
  140. }
  141. if (this.userInfo.sysUser.sex=='M') {
  142. this.avatar = "/static/image/my/男.png"
  143. }
  144. this.WithdrawalqueryData()
  145. // if (this.userInfo.sysUser.headSculpture) {
  146. // this.avatar = this.$base.baseUrl + this.userInfo.sysUser.headSculpture;
  147. // } else {
  148. // this.avatar = "/static/image/my/avatar1.png"
  149. // }
  150. },
  151. onPageScroll(e) {
  152. this.handleScroll(e);
  153. },
  154. mounted() {
  155. uni.pageScrollTo({
  156. scrollTop: 0,
  157. duration: 0
  158. });
  159. uni.$on('scroll', this.handleScroll);
  160. },
  161. destroyed() {
  162. uni.$off('scroll', this.handleScroll);
  163. },
  164. methods: {
  165. ...mapMutations(['setUserModules', 'setOrderType', 'setOrderStage']),
  166. searchPopup() {
  167. this.$refs.datePicker.open()
  168. },
  169. confirmPickDate(dateStr,dateStr1){
  170. if(dateStr){
  171. dateStr+=' 00:00:01'
  172. }
  173. if(dateStr1){
  174. dateStr1+=' 23:59:59'
  175. }
  176. this.WithdrawalqueryData(dateStr ,dateStr1)
  177. },
  178. viewWithdrawal(item){
  179. uni.navigateTo({
  180. url: "/pages/my/withdrawalDetail?key="+encodeURIComponent(JSON.stringify(item))
  181. })
  182. },
  183. async toWithdraw() {
  184. let res = await this.$http.post('/userBank/getUserBankList', {
  185. auditStatus: "1",
  186. delFlag: '0'
  187. });
  188. if (res.data.length) {
  189. this.navigate({
  190. url: `/pages/wallet/withdraw?amount=${this.getApplication.cashFee}`,
  191. }, "navigateTo", true)
  192. } else {
  193. uni.showToast({
  194. title: '暂无审核通过的银行卡,不可提现',
  195. duration: 3000,
  196. icon: "none"
  197. });
  198. }
  199. },
  200. async accountTool(path) {
  201. if (path) {
  202. if (path == '/pages/wallet/bankCard') {
  203. let res = await this.$http.post('/userBank/getUserBankList', {
  204. auditStatus: '',
  205. });
  206. if (!res.data.length) {
  207. this.navigate({
  208. url: '/pages/wallet/bindBank',
  209. complete: () => {
  210. setTimeout(() => {
  211. uni.showToast({
  212. title: '请先绑定银行卡',
  213. duration: 3000,
  214. icon: "none"
  215. });
  216. }, 500);
  217. }
  218. }, "navigateTo", true)
  219. } else {
  220. this.navigate({
  221. url: path,
  222. }, "navigateTo", true)
  223. }
  224. } else {
  225. this.navigate({
  226. url: path,
  227. }, "navigateTo", true)
  228. }
  229. } else {
  230. uni.showToast({
  231. title: '功能待开发...',
  232. icon: "none"
  233. });
  234. }
  235. },
  236. async WithdrawalqueryData(beginTime,endTime) {
  237. let params = {
  238. "endTime": endTime || '',
  239. "beginTime": beginTime || '',
  240. }
  241. let res = await this.$http.post('/sysAgencyFeeApproval/queryOperateInfo', params);
  242. if (res.code == '200') {
  243. this.withdrawalData=res.data
  244. }
  245. },
  246. handleScroll(e) {
  247. const scrollTop = e.scrollTop;
  248. if (scrollTop > this.prevScrollTop) {
  249. // 向下滚动
  250. this.showBackground = true; // 显示背景图
  251. } else if (scrollTop < 50) {
  252. // 在顶部附近,隐藏背景图
  253. this.showBackground = false;
  254. } else {
  255. // 向上滚动
  256. this.showBackground = true; // 显示背景图
  257. }
  258. this.headerStyle.backgroundColor = this.showBackground ? '#fff' : 'transparent';
  259. this.headerStyle.backgroundImage = this.showBackground ? 'url("/static/image/my/背景.png")' : '';
  260. this.headerStyle.backgroundSize = this.showBackground ? 'cover' : '';
  261. // this.headerStyle.backgroundPosition = this.showBackground ? 'center' : '';
  262. this.prevScrollTop = scrollTop;
  263. },
  264. tool() {
  265. uni.navigateTo({
  266. url: "/pages/set/set"
  267. })
  268. },
  269. incomeClick() {
  270. uni.navigateTo({
  271. url: "/pages/my/commission"
  272. })
  273. },
  274. // 去账单明细
  275. toBillDetails(type) {
  276. this.navigate({
  277. url: `/pages/wallet/billDetails${type}`,
  278. }, "navigateTo", true)
  279. },
  280. // 去账单明细
  281. toWallet(type) {
  282. this.navigate({
  283. url: "/pages/wallet/wallet"
  284. }, "navigateTo", true)
  285. },
  286. //跳转个人信息页面
  287. openDetail() {
  288. this.navigate({
  289. url: "/pages/user/userInfo"
  290. }, "navigateTo", false)
  291. },
  292. }
  293. }
  294. </script>
  295. <style lang="scss" scoped>
  296. .headers {
  297. position: fixed;
  298. top: 0;
  299. left: 0;
  300. height: auto;
  301. width: 100%;
  302. z-index: 999999;
  303. padding: 16px;
  304. padding-top: 40px;
  305. >view {
  306. width: 100%;
  307. height: 100%;
  308. position: relative;
  309. }
  310. text {
  311. font-size: 18px;
  312. font-weight: 700;
  313. color: #333333;
  314. }
  315. image {
  316. position: absolute;
  317. right: 0;
  318. width: 20px;
  319. height: 20px;
  320. }
  321. }
  322. .Personnel {
  323. height: auto;
  324. width: 100%;
  325. background: #F7F7F7;
  326. background-size: 100% 100%;
  327. padding: 90px 16px 8px 16px;
  328. position: relative;
  329. }
  330. .Personnel-title{
  331. position: absolute;
  332. right: 0;
  333. top: 135px;
  334. background: linear-gradient( 132deg, #2DD9FF 0%, #2D6DFF 100%);
  335. border-radius: 16px 0px 0px 16px;
  336. color: #fff;
  337. padding: 2px 6px 2px 10px;
  338. }
  339. .Personnel-img{
  340. position: relative;
  341. .avatar {
  342. width: 60px;
  343. height: 60px;
  344. border-radius: 50%;
  345. }
  346. image:last-child{
  347. display:inline-block;
  348. width: 30px;
  349. height: 30px;
  350. position: absolute;
  351. bottom: -5px;
  352. right: -8px;
  353. }
  354. }
  355. /* 我的钱包Start */
  356. .my-wallet {
  357. .wallet-body {
  358. width: 100%;
  359. height: auto;
  360. padding: 8px 16px;
  361. background: #FFFFFF;
  362. box-shadow: 0px 4px 10px 0px #DAE3F4;
  363. border-radius: 6px;
  364. margin-top: 10px;
  365. .route {
  366. text {
  367. font-size: 12px;
  368. color: #333;
  369. font-weight: 400;
  370. }
  371. image {
  372. width: 45px;
  373. height: 40px;
  374. }
  375. }
  376. .money {
  377. padding: 8px 0;
  378. background-color: #F9F8FD;
  379. border-radius: 4px;
  380. margin-top: 8px;
  381. text {
  382. font-size: 12px;
  383. color: #333;
  384. font-weight: 400;
  385. }
  386. }
  387. }
  388. }
  389. .Personnel-info{
  390. flex-direction: column;
  391. font-size: 14px;
  392. color: #152F63;
  393. }
  394. .full-name{
  395. margin-top: 8px;
  396. // margin-left: 12%;
  397. color: #152F63;
  398. text:first-child{
  399. font-weight: 700;
  400. font-size: 18px;
  401. line-height: 22px;
  402. }
  403. // text:last-child{
  404. // margin-left: 10px;
  405. // font-weight: 400;
  406. // font-size: 10px;
  407. // line-height: 12px;
  408. // }
  409. }
  410. .digit{
  411. margin-top: 8px;
  412. view{
  413. // width: 110px;
  414. }
  415. image{
  416. width: 20px;
  417. height: 20px;
  418. display: inline-block;
  419. }
  420. }
  421. .withdrawal-box{
  422. margin-top: 13px;
  423. background: #FFFFFF;
  424. border-radius: 5px 5px 5px 5px;
  425. padding: 18px 16px;
  426. .withdrawal-title {
  427. width: 100%;
  428. height: 100%;
  429. position: relative;
  430. text:first-child {
  431. font-weight: 400;
  432. font-size: 12px;
  433. color: #999999;
  434. }
  435. text:last-child {
  436. position: absolute;
  437. right: 0;
  438. font-size: 10px;
  439. color: #2D6DFF;
  440. line-height: 12px;
  441. }
  442. }
  443. .withdrawal-sum{
  444. color: #333333 ;
  445. font-weight: bold;
  446. line-height: 32px;
  447. text:first-child {
  448. font-size: 17px;
  449. line-height: 38px;
  450. }
  451. text:last-child {
  452. font-size: 26px;
  453. }
  454. }
  455. .withdrawal-income{
  456. margin: 10px 0;
  457. background: rgba(240,248,255,0.5);
  458. border-radius: 2px 2px 2px 2px;
  459. padding: 10px;
  460. view{
  461. width: 50%;
  462. text-align: center;
  463. text:first-child{
  464. font-weight: 400;
  465. font-size: 10px;
  466. color: #666666;
  467. display: block;
  468. }
  469. text:last-child{
  470. margin-top: 3px;
  471. font-weight: 700;
  472. font-size: 17px;
  473. color: #333333;
  474. line-height: 20px;
  475. display: block;
  476. }
  477. }
  478. }
  479. .withdrawal-fun{
  480. background: linear-gradient( 132deg, #2DD9FF 0%, #2D6DFF 100%);
  481. border-radius: 5px 5px 5px 5px;
  482. color: #fff;
  483. font-size: 16px;
  484. text-align: center;
  485. line-height: 42px;
  486. }
  487. }
  488. .withdrawal-record{
  489. font-weight: 700;
  490. font-size: 16px;
  491. color: #333333;
  492. i{
  493. display: inline-block;
  494. margin-right: 5px;
  495. width: 2px;
  496. height: 20px;
  497. background: linear-gradient( 132deg, #2DD9FF 0%, #2D6DFF 100%);
  498. }
  499. }
  500. .withdrawal-flow{
  501. margin: 8px 16px;
  502. overflow: hidden;
  503. background: #FFFFFF;
  504. border-radius: 5px 5px 5px 5px;
  505. font-size: 16px;
  506. color: #333333;
  507. .withdrawal-card{
  508. border-bottom: 1px solid #EEEEEE;
  509. padding: 15px 0;
  510. margin: 0 15px;
  511. image{
  512. display: inline-block;
  513. width: 11px;
  514. height: 11px;
  515. margin-left: 5px;
  516. }
  517. .withdrawal-status{
  518. padding:2px 5px;
  519. font-size: 10px;
  520. border-radius: 1px 1px 1px 1px;
  521. }
  522. }
  523. }
  524. .search{
  525. text{
  526. font-size: 14px;
  527. color: #666666;
  528. }
  529. i{
  530. margin-left: 2px;
  531. display:inline-block;
  532. width: 0;
  533. height: 0;
  534. border: 4px solid;
  535. border-color: #666666;
  536. border-bottom: 4px solid transparent;
  537. border-right: 4px solid transparent;
  538. border-left: 4px solid transparent;
  539. }
  540. }
  541. </style>