businessView-3.vue 15 KB

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