businessView-1.vue 13 KB

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