businessView-2.vue 11 KB

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