businessView.vue 17 KB

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