businessView.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. <template>
  2. <view>
  3. <ujp-navbar title="申请单详情" v-if="!onReadyId"></ujp-navbar>
  4. <u-tabs name="cate_name" gutter="200" bar-width="100" active-color="#101010" inactive-color="#A1A1A1"
  5. :list="tabList" :is-scroll="false" :current="current" @change="change"></u-tabs>
  6. <template v-if="current==0">
  7. <view class="withdraw">
  8. <view class="withdraw-head">
  9. <b>申请站点</b>
  10. <span>
  11. <view class="uni-input">{{info.stationName}}</view>
  12. </span>
  13. </view>
  14. <!-- <view class="withdraw-head">
  15. <b>申请时间</b>
  16. <span>
  17. <view class="uni-input">{{info.updateTime}}</view>
  18. </span>
  19. </view> -->
  20. <view class="withdraw-head">
  21. <b>提现事由</b>
  22. <span>
  23. <view class="uni-input">{{info.applicationTypeText}}</view>
  24. </span>
  25. </view>
  26. <view class="withdraw-head " v-if="info.applicationType!=3">
  27. <b>提现账户</b><span>
  28. <view class="uni-input">{{info.merchantAccountName}}</view>
  29. </span>
  30. </view>
  31. <view class="withdraw-head">
  32. <b>提现月份</b>
  33. <span>
  34. <view class="uni-input">{{showTime(info.applicationMonth)}}</view>
  35. </span>
  36. </view>
  37. <view class="withdraw-head">
  38. <b>抄表开始日期</b>
  39. <span>
  40. <view class="uni-input">{{showTime2(info.startTime2)}}</view>
  41. </span>
  42. </view>
  43. <view class="withdraw-head">
  44. <b>抄表结束日期</b>
  45. <span>
  46. <view class="uni-input">{{showTime2(info.endTime2)}}</view>
  47. </span>
  48. </view>
  49. <!-- <view class="withdraw-head border-n" v-if="info.applicationType==2" >
  50. <b>桩主/站主收益</b>
  51. <span class="download" @click="ckdownload">
  52. <view class="uni-input">{{info.totalProfitAmount?info.totalProfitAmount.toFixed(2):0}}元<span class="download" style="width: 220rpx;" ><u-icon name="download"></u-icon> 下载收益明细</span> </view>
  53. </span>
  54. </view> -->
  55. <view class="withdraw-head border-n" >
  56. <b>分润提现明细表</b><span class="download"
  57. @click="ckdownload">
  58. <u-icon name="download"></u-icon> 下载
  59. </span>
  60. </view>
  61. <view class="withdraw-head border-n" v-if="info.applicationType==2">
  62. <b>市场奖励比例
  63. </b>
  64. <span>
  65. <view class="uni-input">{{info.rewardProportion}}%</view>
  66. </span>
  67. </view>
  68. <view class="withdraw-head border-n" v-if="info.applicationType==2" >
  69. <b>奖励金额
  70. <view class="tooltip">
  71. <u-icon name="info-circle"></u-icon>
  72. <view class="tooltiptext" style="width: 220px;">奖励金额=总收益*市场奖励比例</view>
  73. </view>
  74. </b>
  75. <span>
  76. <view class="uni-input">
  77. {{info.applicationAmount}}元
  78. </view>
  79. </span>
  80. </view>
  81. <view class="withdraw-head border-n" v-if="info.applicationType==2" >
  82. <b>大写金额</b>
  83. <span>
  84. <view class="uni-input">{{applicationAmountDX}}</view>
  85. </span>
  86. </view>
  87. </view>
  88. <view class="withdraw" >
  89. <view class="withdraw-head">
  90. <b>电单价</b>
  91. <span>
  92. <view class="uni-input">{{info.electricityPrice}}元/度</view>
  93. </span>
  94. </view>
  95. <view class="withdraw-head ">
  96. <b>实际电量</b>
  97. <span>
  98. <view class="uni-input">{{info.electricQuantity}}度</view>
  99. </span>
  100. </view>
  101. <view class="withdraw-head border-n">
  102. <b>电费成本
  103. <view class="tooltip">
  104. <u-icon name="info-circle"></u-icon>
  105. <view class="tooltiptext">电费成本=电单价*实际电量</view>
  106. </view>
  107. </b>
  108. <span>
  109. <view class="uni-input">{{info.electricityCost}}元</view>
  110. </span>
  111. </view>
  112. </view>
  113. <view class="withdraw" >
  114. <view class="withdraw-head ">
  115. <b>充电分成比例</b>
  116. <span>
  117. <view class="uni-input">{{info.chargingPercent}}%</view>
  118. </span>
  119. </view>
  120. <view class="withdraw-head ">
  121. <b>充电分成</b>
  122. <span>
  123. <view class="uni-input">{{info.chargingProfitAmount?info.chargingProfitAmount.toFixed(2):0}}元</view>
  124. </span>
  125. </view>
  126. <view class="withdraw-head border-n">
  127. <b>充电服务收益
  128. <view class="tooltip tooltiplong">
  129. <u-icon name="info-circle"></u-icon>
  130. <view class="tooltiptext" style="width: 220px;" >充电服务收益=充电分成-电费成本</view>
  131. </view>
  132. </b>
  133. <span>
  134. <view class="uni-input">
  135. {{info.chargingServiceProfitAmount?info.chargingServiceProfitAmount.toFixed(2):0}}元
  136. </view>
  137. </span>
  138. </view>
  139. </view>
  140. <view class="withdraw" >
  141. <view class="withdraw-head">
  142. <b>月卡分润笔数</b>
  143. <span>
  144. <view class="uni-input">{{info.monthlyCardTotal}}笔</view>
  145. </span>
  146. </view>
  147. <view class="withdraw-head border-n">
  148. <b>月卡收益</b>
  149. <span>
  150. <view class="uni-input">{{info.monthlyCardIncome?info.monthlyCardIncome.toFixed(2):0}}元</view>
  151. </span>
  152. </view>
  153. </view>
  154. <view class="withdraw" >
  155. <view class="withdraw-head">
  156. <b>桩主/站主总收入
  157. <view class="tooltip tooltiplong">
  158. <u-icon name="info-circle"></u-icon>
  159. <view class="tooltiptext" >总收入=充电分成+月卡收益</view>
  160. </view>
  161. </b>
  162. <span>
  163. <view class="uni-input">{{info.totalIncome?info.totalIncome.toFixed(2):0}}元</view>
  164. </span>
  165. </view>
  166. <view class="withdraw-head border-n">
  167. <b>桩主/站主收益
  168. <view class="tooltip tooltiplong ">
  169. <u-icon name="info-circle"></u-icon>
  170. <view class="tooltiptext">收益=总收入-电费成本</view>
  171. </view>
  172. </b>
  173. <span>
  174. <view class="uni-input">{{info.totalProfitAmount?info.totalProfitAmount.toFixed(2):0}}元</view>
  175. </span>
  176. </view>
  177. </view>
  178. <view class="withdraw" v-if="info.applicationType==3&&(info.applyAmount1||info.applyAmount2)" >
  179. <view class="withdraw-head" v-if="info.applyAmount1">
  180. <b>物业可提现金额</b>
  181. <span>
  182. <view class="uni-input">{{info.applyAmount1}}元</view>
  183. </span>
  184. </view>
  185. <view class="withdraw-head border-n" v-if="info.applyAmount2">
  186. <b>市场可提现金额</b>
  187. <span>
  188. <view class="uni-input">{{info.applyAmount2}}元</view>
  189. </span>
  190. </view>
  191. </view>
  192. <view class="withdraw" v-if="info.applicationType==1">
  193. <view class="withdraw-head">
  194. <b>提现类型</b>
  195. <span>
  196. <view class="uni-input">{{info.withdrawalType?list3[info.withdrawalType].name:''}}</view>
  197. </span>
  198. </view>
  199. <view class="withdraw-head border-n" v-if="info.withdrawalType==0">
  200. <b>提成比例</b>
  201. <span>
  202. <view class="uni-input">{{info.rewardProportion}}%</view>
  203. </span>
  204. </view>
  205. <view class="withdraw-head border-n" v-if="info.withdrawalType==0">
  206. <b>服务费</b>
  207. <span>
  208. <view class="uni-input">{{(info.totalProfitAmount*info.rewardProportion/100).toFixed(2)}}元</view>
  209. </span>
  210. </view>
  211. <view class="withdraw-head border-n" v-if="info.withdrawalType==1">
  212. <b>停车费</b>
  213. <span>
  214. <view class="uni-input">{{info.parkingFee}}元</view>
  215. </span>
  216. </view>
  217. </view>
  218. <view class="withdraw" v-if="info.applicationType==3">
  219. <view class="withdraw-head ">
  220. <b>是否开票</b>
  221. <span>
  222. <view class="uni-input">{{info.invoiceRequired?'是':'否'}}</view>
  223. </span>
  224. </view>
  225. <view class="withdraw-head ">
  226. <b>发票类型</b>
  227. <span>
  228. <view class="uni-input" v-if="!info.invoiceType">无</view>
  229. <view class="uni-input" v-else>{{invoiceTypeName}}</view>
  230. </span>
  231. </view>
  232. <view class="withdraw-head border-n ">
  233. <b>发票税率</b>
  234. <span>
  235. <view class="uni-input">{{info.taxRate?info.taxRate+'%':''}}</view>
  236. </span>
  237. </view>
  238. </view>
  239. <view class="withdraw" v-if="info.applicationType!=2" >
  240. <view class="withdraw-head ">
  241. <b class="asterisk" >{{!onReadyId?'申请提现金额':'可提现金额'}}</b>
  242. <span>
  243. <view class="uni-input">{{info.applicationAmount}}元</view>
  244. </span>
  245. </view>
  246. <view class="withdraw-head border-n">
  247. <b>大写金额</b>
  248. <span>
  249. <view class="uni-input">{{applicationAmountDX}}</view>
  250. </span>
  251. </view>
  252. </view>
  253. <view class="withdraw" v-if="info.applicationType==3">
  254. <view class="withdraw-head ">
  255. <b class="asterisk">收款户名</b>
  256. <p class="uni-input">{{info.accountName}}</p>
  257. </view>
  258. <view class="withdraw-head ">
  259. <b class="asterisk">收款银行</b>
  260. <p class="uni-input">{{info.bankName}}</p>
  261. </view>
  262. <view class="withdraw-head border-n">
  263. <b class="asterisk">收款账号</b>
  264. <p class="uni-input">{{info.accountNo}}</p>
  265. </view>
  266. </view>
  267. </template>
  268. <template v-if="current==1">
  269. <view class="margin">
  270. <view style="text-align: center;margin-top: 100px" v-if="!detailList.length">
  271. <img src="@/assets/img/blankpage.png">
  272. <view>未填写提现明细</view>
  273. </view>
  274. <view class="details " v-for="(item,i) in detailList" :key="i">
  275. <p>{{item.itemName}}</p>
  276. <view class="withdraw">
  277. <view class="withdraw-head ">
  278. <b class="asterisk">金额</b>
  279. <span>
  280. <view class="uni-input">{{item.itemAmount}}元</view>
  281. </span>
  282. </view>
  283. <view class="withdraw-head ">
  284. <b class="asterisk">备注</b>
  285. <span>
  286. <view class="uni-input">{{item.itemRemark?item.itemRemark:'无'}}</view>
  287. </span>
  288. </view>
  289. </view>
  290. </view>
  291. </view>
  292. </template>
  293. </view>
  294. </template>
  295. <script>
  296. import * as API from '@/apis/finance.js'
  297. import {
  298. parseUnixTime,
  299. DX
  300. } from '@/utils'
  301. export default {
  302. data() {
  303. return {
  304. isPt: false,
  305. id: '',
  306. detailList: [],
  307. info: {
  308. electricityPrice: '',
  309. electricQuantity: '',
  310. stationId: "",
  311. applicationType: '1'
  312. },
  313. stationList: [],
  314. stationObj: {},
  315. current: 0, // tabs组件的current值,表示当前活动的tab选项
  316. list1: [{
  317. name: '普票',
  318. value: "1"
  319. }, {
  320. name: '专票',
  321. value: "2"
  322. }, {
  323. name: '收据',
  324. value: "3"
  325. }],
  326. list2: [{
  327. name: '是',
  328. value: "1"
  329. }, {
  330. name: '否 ',
  331. value: "0"
  332. }],
  333. list3: [{
  334. name: '服务费提成',
  335. value: "0"
  336. }, {
  337. name: '停车费',
  338. value: "1"
  339. }],
  340. tabList: [{
  341. name: '申请单主表'
  342. }, {
  343. name: '提现明细'
  344. }],
  345. }
  346. },
  347. props: {
  348. onReadyId: '',
  349. },
  350. created() {
  351. if (this.onReadyId) {
  352. this.id = this.onReadyId;
  353. this.getInfo()
  354. }
  355. //this.getInfo()
  356. },
  357. onLoad(op) {
  358. if (op.id) {
  359. this.id = op.id
  360. this.getInfo()
  361. }
  362. },
  363. computed: {
  364. invoiceTypeName() {
  365. var info = this.list1.find(item => {
  366. console.log(item.value == this.info.invoiceType)
  367. return item.value == this.info.invoiceType
  368. })
  369. if (info) {
  370. return info.name
  371. }
  372. return ''
  373. },
  374. applicationAmountDX() {
  375. if (this.info.applicationAmount) {
  376. var c = DX(this.info.applicationAmount)
  377. return c
  378. } else {
  379. return ''
  380. }
  381. },
  382. },
  383. watch: {
  384. detailList(nVal, oVal) {
  385. console.log(nVal)
  386. var obj = [{
  387. name: '申请单主表'
  388. }, {
  389. name: '提现明细'
  390. }]
  391. if (nVal && nVal.length) {
  392. obj[1].count = nVal.length
  393. }
  394. this.tabList = obj
  395. }
  396. },
  397. methods: {
  398. showTime2(name) {
  399. if (!name) {
  400. return ''
  401. }
  402. return parseUnixTime(new Date(name), '{y}年{m}月{d}日{h}:{i}');
  403. },
  404. showTime(name) {
  405. if (!name) {
  406. return ''
  407. }
  408. return name.replace('-', '年') + '月';
  409. },
  410. ckdownload() {
  411. uni.showLoading({
  412. title: "加载中",
  413. mask: true,
  414. })
  415. API.profitDetailsExcelByAccounting({
  416. recordId:this.info.id,
  417. stationId:this.info.stationId,
  418. startDate:this.info.startTime2+":00",
  419. endDate:this.info.endTime2+":00",
  420. }).then((resDown) => {
  421. uni.hideLoading()
  422. if (resDown.data) {
  423. window.location.href = resDown.data
  424. } else {
  425. uni.showToast({
  426. title: "无文件下载"
  427. })
  428. }
  429. }).catch(error => {
  430. uni.showToast({
  431. title: error
  432. })
  433. })
  434. },
  435. getInfo() {
  436. uni.showLoading({
  437. title: "加载中",
  438. mask: true,
  439. })
  440. API.getWithdrawInfoByAccounting(this.id).then((res) => {
  441. this.info = res.data.record
  442. this.detailList = res.data.detailList
  443. uni.hideLoading()
  444. }).catch(error => {
  445. uni.showToast({
  446. title: error
  447. })
  448. })
  449. },
  450. change(index) {
  451. this.current = index;
  452. this.$emit("changetabs_app",index)
  453. }
  454. }
  455. }
  456. </script>
  457. <style>
  458. page {
  459. background-color: #F7F7F7;
  460. padding-bottom: 65px;
  461. }
  462. </style>
  463. <style lang="scss" scoped>
  464. .jputabs {
  465. //position: absolute;
  466. position: fixed;
  467. background-color: #FFF;
  468. width: 100%;
  469. top: 45px;
  470. z-index: 99;
  471. }
  472. .classFFF {
  473. color: #607d8b !important;
  474. }
  475. .download {
  476. color: #185AC6 !important;
  477. }
  478. .download5 {
  479. width: 160rpx !important;
  480. float: right;
  481. color: #185AC6 !important;
  482. }
  483. /deep/.u-tab-bar {
  484. background-color: #0076FF !important;
  485. }
  486. /deep/.u-tabs-scorll-flex {
  487. width: 56%;
  488. margin: 0 auto;
  489. }
  490. .withdraw-tips {
  491. margin: 24px 16px;
  492. p {
  493. color: #999;
  494. margin-top: 4px;
  495. }
  496. }
  497. .uni-input {
  498. font-size: 16px;
  499. color: #333333;
  500. }
  501. @media screen and (max-width:320px) {
  502. .uni-input {
  503. font-size: 36rpx;
  504. }
  505. }
  506. .withdraw {
  507. margin-bottom: 8px;
  508. background-color: #fff;
  509. padding: 0px 16px 0 16px;
  510. .withdraw-head {
  511. padding: 24rpx 0;
  512. border-bottom: 1px solid #E5E7EA;
  513. align-items: center;
  514. position: relative;
  515. .unit {
  516. position: absolute;
  517. top: 34rpx;
  518. right: 0;
  519. }
  520. b {
  521. font-weight: normal;
  522. color: rgba(119, 119, 119, 100);
  523. font-size: 36rpx;
  524. min-width: 40%;
  525. }
  526. span {
  527. max-width: 60%;
  528. min-width: 55%;
  529. float: right;
  530. text-align: left;
  531. font-size: 32rpx;
  532. color: #333333;
  533. }
  534. @media screen and (max-width:319px) {
  535. span {
  536. max-width: 60%;
  537. min-width: 50%;
  538. }
  539. }
  540. }
  541. .withdraw-main {
  542. border-top: 1px solid #f7f7f7;
  543. border-bottom: 1px solid #f7f7f7;
  544. margin: 16px 0;
  545. padding: 16px 0;
  546. .withdraw-input {
  547. width: 63%;
  548. margin-top: 64rpx;
  549. display: flex;
  550. align-items: center;
  551. font-size: 56rpx;
  552. /deep/.uni-input-input {
  553. font-size: 28rpx;
  554. }
  555. }
  556. }
  557. .withdraw-foot {
  558. display: flex;
  559. align-items: center;
  560. p {
  561. color: #999
  562. }
  563. span {
  564. color: #2979FF;
  565. margin-left: 16px;
  566. }
  567. }
  568. }
  569. .more {
  570. color: #B3B3B3;
  571. font-size: 24px
  572. }
  573. .applyBtn {
  574. padding: 0 16px;
  575. display: flex;
  576. background-color: #FFF;
  577. font-size: 16px;
  578. line-height: 44px;
  579. height: 60px;
  580. position: fixed;
  581. bottom: 0;
  582. left: 0;
  583. right: 0;
  584. .save {
  585. width: 33.6%;
  586. border-radius: 8px 0px 0px 8px;
  587. background-color: rgba(0, 185, 98, 100);
  588. color: rgba(255, 255, 255, 100);
  589. }
  590. .submit {
  591. width: 66.4%;
  592. border-radius: 0px 8px 8px 0px;
  593. background-color: rgba(24, 90, 198, 100);
  594. color: rgba(255, 255, 255, 100);
  595. }
  596. }
  597. /deep/.uni-input-input {
  598. text-align: start !important;
  599. }
  600. .border-n {
  601. //border: none !important;
  602. }
  603. .textarea {
  604. background-color: rgba(242, 242, 242, 100);
  605. margin-top: 12px;
  606. line-height: 20px;
  607. border-radius: 4px;
  608. color: rgba(136, 136, 136, 100);
  609. .uni-textarea-placeholder {
  610. padding: 0 16rpx;
  611. }
  612. /deep/.uni-textarea-textarea {
  613. width: 90%;
  614. padding: 0 16rpx;
  615. }
  616. }
  617. .withdrawHead {
  618. padding: 15px;
  619. font-size: 14px;
  620. .red {
  621. color: red;
  622. }
  623. }
  624. .details {
  625. margin: 16px;
  626. border-radius: 8px;
  627. background-color: #fff;
  628. overflow: hidden;
  629. }
  630. .asterisk {
  631. position: relative;
  632. text {
  633. position: absolute;
  634. top: 0px;
  635. left: -14rpx;
  636. color: #EE3138;
  637. }
  638. }
  639. .add {
  640. text-align: center;
  641. font-size: 18px;
  642. color: #101010;
  643. display: flex;
  644. align-items: center;
  645. justify-content: center;
  646. .ri-add-circle-fill {
  647. font-size: 24px;
  648. color: #44B371;
  649. margin: auto 0;
  650. margin-right: 4rpx;
  651. }
  652. }
  653. /deep/.u-input__input {
  654. font-size: 16px !important
  655. }
  656. .uni-time {
  657. font-size: 32rpx;
  658. }
  659. .uni-input {
  660. display: flex;
  661. justify-content: space-between;
  662. }
  663. .input-text {
  664. white-space: nowrap;
  665. overflow: hidden;
  666. text-overflow: ellipsis;
  667. }
  668. .tooltip {
  669. position: relative;
  670. display: inline-flex;
  671. width: 36rpx;
  672. height: 36rpx;
  673. }
  674. .tooltip .tooltiptext {
  675. min-width: 180px;
  676. min-height: 20px;
  677. position: absolute;
  678. visibility: hidden;
  679. top: -30px;
  680. left: -10px;
  681. padding: 1px 20rpx;
  682. line-height: 20px;
  683. font-size: 24rpx;
  684. color: #fff;
  685. background-color: #333333;
  686. border-radius: 10px;
  687. text-align: center;
  688. z-index: 1;
  689. }
  690. .tooltip:hover .tooltiptext {
  691. visibility: visible;
  692. }
  693. .tooltiptext:before {
  694. z-index: 1;
  695. content: "";
  696. position: absolute;
  697. top: 20px;
  698. //right: 5px;
  699. left: 10px;
  700. border-top: 5px solid #333333;
  701. border-right: 5px solid transparent;
  702. border-left: 5px solid transparent;
  703. }
  704. .margin{
  705. margin-top: 12px !important;
  706. }
  707. .details {
  708. margin: 0 16px;
  709. margin-bottom: 8px ;
  710. border-radius: 8px;
  711. background-color: #fff;
  712. padding:0 12px 0px 12px;
  713. p{
  714. font-size: 16px;
  715. color: #333333;
  716. line-height: 50px;
  717. border-bottom: solid 1px #E5E7EA;
  718. padding-left: 16px;
  719. }
  720. span{
  721. width: 75% !important;
  722. }
  723. }
  724. </style>