details.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <view>
  3. <u-navbar >分润详情</u-navbar>
  4. <view class="details">
  5. <view class="details-head">
  6. <!-- <u-icon name="charging-pile-fill" custom-prefix="custom-icon" color="#27B148" size="48"></u-icon>
  7. --> <h4>{{detail.flowNo?detail.flowNo:'无充电单号'}}</h4>
  8. </view>
  9. <view class="details-main">
  10. <view class="details-price">
  11. <h3>{{detail.income}}元</h3>
  12. </view>
  13. <p>分润金额</p>
  14. </view>
  15. </view>
  16. <view class="details">
  17. <view class="details-title">
  18. <h4>订单明细</h4>
  19. </view>
  20. <view class="details-row" >
  21. <p>订单金额</p>
  22. <span>{{detail.actualFee }}元</span>
  23. </view>
  24. <view class="details-row" >
  25. <p>电费金额</p>
  26. <span>{{detail.electricityAmount }}元</span>
  27. </view>
  28. <view class="details-row" >
  29. <p>服务费金额</p>
  30. <span>{{detail.surplusAmount}}元</span>
  31. </view>
  32. <view class="details-row" >
  33. <p>总充电量</p>
  34. <span>{{detail.electricQuantity/10000}}度</span>
  35. </view>
  36. <view v-for="(item,i) in chargeDetails" :key="i">
  37. <view class="details-row" >
  38. <p>区间充电量({{item.startTime}}-{{item.endTime}})</p>
  39. <span>{{item.kwh }}度</span>
  40. </view>
  41. <view class="details-row" >
  42. <p>区间定价</p>
  43. <span>{{(item.electricityPrice*100+item.servicePrice*100)/100}}元</span>
  44. </view>
  45. <view class="details-row" >
  46. <p>区间定价组成</p>
  47. <span>电价{{item.electricityPrice}}元/服务费{{item.servicePrice}}元</span>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="details">
  52. <view class="details-title">
  53. <h4>分润明细</h4>
  54. </view>
  55. <view class="details-row" v-for="(item,i) in frmxList" :key="i">
  56. <p>{{item.merchantAccountName}}({{(item.disProportion*100).toFixed(2)}}%)</p>
  57. <span>{{item.shareProfitAmount}}元</span>
  58. </view>
  59. </view>
  60. <view class="details">
  61. <view class="details-title">
  62. <h4>更多信息</h4>
  63. </view>
  64. <view class="details-row"><p>来源站点</p><span>{{detail.stationName}}</span></view>
  65. <view class="details-row"><p>来源充电桩</p><span>{{detail.deviceName}}</span></view>
  66. <view class="details-row"><p>发放时间</p><span>{{detail.createTime}}</span></view>
  67. </view>
  68. <view class="detailsBtn">
  69. <u-button class="detailsBtn-btn" @click="back" type="primary" plain>返回</u-button>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. import * as API from '@/apis/finance.js'
  75. export default {
  76. data() {
  77. return {
  78. chargeDetails:[],
  79. data:{},
  80. id:'',
  81. frmxList:[
  82. ],
  83. detail:{
  84. },
  85. title:"",
  86. }
  87. },
  88. onLoad(op){
  89. this.data.detailId=op.id;
  90. this.getInfo()
  91. },
  92. methods: {
  93. showDateMoth(date){
  94. var back=date;
  95. if(date){
  96. var k= date.slice(5,6)
  97. console.log(k)
  98. if(k=='0'){
  99. back= date.slice(6,7)
  100. }else{
  101. back= date.slice(5,7)
  102. }
  103. }
  104. return back;
  105. },
  106. getPercent(estimateMinute) {
  107. var value="";
  108. var ms =estimateMinute
  109. if (ms > 0) {
  110. var Hour = parseInt(Math.floor(ms / 60 ));
  111. var Fen = parseInt(Math.floor(ms % 60 ));
  112. value = Hour + "小时" + Fen+"分钟"
  113. }
  114. return value;
  115. },
  116. back(){
  117. uni.navigateBack({
  118. })
  119. },
  120. getInfo(){
  121. uni.showLoading({
  122. title:"加载中",mask:true,
  123. })
  124. API.recordDetailData(this.data).then((res) => {
  125. this.detail=res.data
  126. this.chargeDetails=JSON.parse(res.data.ChargeDetails)
  127. console.log( this.chargeDetails)
  128. this.frmxList=res.data.detailList
  129. uni.hideLoading()
  130. }).catch(error => {
  131. uni.showToast({
  132. title:error
  133. })
  134. })
  135. }
  136. }
  137. }
  138. </script>
  139. <style>
  140. page{
  141. background-color: #F7F7F7;
  142. }
  143. </style>
  144. <style lang="scss" scoped>
  145. .detailsBtn{
  146. margin: 16px;
  147. .detailsBtn-btn{
  148. border-color:#185AC6!important;
  149. border-radius: 8px!important;
  150. background: none!important;
  151. color:#185AC6!important;
  152. }
  153. }
  154. .details-title{
  155. margin-bottom: 16px;
  156. h4{
  157. font-weight: normal;
  158. font-size: 16px;
  159. position: relative;
  160. padding-left:10px;
  161. &::after{
  162. content: '';
  163. position: absolute;
  164. height: 12px;
  165. width: 4px;
  166. background-color: #27B148;
  167. left: 0;
  168. top:5px;
  169. }
  170. }
  171. }
  172. .details-row{
  173. display: flex;
  174. justify-content: space-between;
  175. align-items: center;
  176. margin-top: 15px;
  177. p{color:#888}
  178. }
  179. .details{
  180. margin: 16px;
  181. padding: 20px;
  182. background-color: #fff;
  183. border-radius: 8px;
  184. .details-head{
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. h4{
  189. font-size: 18px;
  190. font-weight: normal;
  191. margin-left: 4px;
  192. }
  193. }
  194. .details-price{
  195. margin-top: 28px;
  196. display: flex;
  197. align-items: flex-end;
  198. justify-content: center;
  199. h3{
  200. font-size: 36px;
  201. color:#27B148;
  202. line-height: 36px;
  203. margin: 0 4px;
  204. font-weight: normal;
  205. }
  206. span{
  207. font-size: 20px;
  208. color:#27B148;
  209. }
  210. }
  211. .details-main{
  212. text-align: center;
  213. margin-bottom: 20px;
  214. p{
  215. color:#777;
  216. margin-top: 4px;
  217. }
  218. }
  219. }
  220. </style>