123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <template>
- <view>
- <u-navbar >分润详情</u-navbar>
- <view class="details" v-if="detail">
- <view class="details-head">
- <!-- <u-icon name="charging-pile-fill" custom-prefix="custom-icon" color="#27B148" size="48"></u-icon>
- --> <h4>{{detail.flowNo?detail.flowNo:'无充电单号'}}</h4>
- </view>
- <view class="details-main">
- <view class="details-price">
- <h3>{{detail.income.toFixed(2)}}<span>元</span></h3>
- </view>
- <p>分润金额</p>
- </view>
-
- <view class="details-row" v-if="detail.deviceType" ><p>订单类型 </p><span>{{options0[detail.deviceType].label}}
- </span></view>
- <view class="details-row" >
- <p>订单金额</p>
- <span>{{detail.actualFee.toFixed(2)}}元</span>
- </view>
- <view class="details-row" v-if="detail.deviceType!='0'" >
- <p>电费金额</p>
- <span>{{detail.electricityAmount.toFixed(2)}}元</span>
- </view>
- <view class="details-row" v-if="detail.deviceType!='0'" >
- <p>服务费</p>
- <span>{{detail.surplusAmount.toFixed(2)}}元
-
- <!-- <span>{{detail.surplusAmount-detail.discountAmount.toFixed(2)}}元 -->
- <!-- <span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.discountAmount}})</span>
- -->
- </span>
- </view>
- <view class="details-row" v-if="couponObj&&couponObj.status=='1'" >
- <p>优惠券 </p>
- <span>
- {{couponObj.useText}}
- </span>
- </view>
-
- <view class="details-row" v-if="detail.discountAmount" >
- <p>实际减免</p>
- <span>
- -{{detail.discountAmount.toFixed(2)}}元
- </span>
- </view>
- <view class="details-row" v-if="detail.chargingUserCardId" >
- <p>会员活动 </p>
- <span>
- 充电服务费包月卡
- </span>
- </view>
- </view>
- <view class="details" v-if="detail">
- <view class="details-title">
- <h4>用电明细</h4>
- </view>
- <view class="details-row" >
- <p>总充电量</p>
- <span >{{detail.electricQuantity/10000}}度</span>
- </view>
- <view class="details-row" v-if="detail.deviceType=='0'" >
- <p>电费单价</p>
- <span>{{detail.unitPrice.toFixed(2)}}元/小时</span>
- </view>
- <view class="details-row"><p>充电时长</p><span>{{getPercent(detail.chargingMinute)}}</span></view>
-
- <view v-for="(item,i) in chargeDetails" :key="i" v-if="detail.deviceType!=0" >
- <view class="details-row" style=" margin-top: 18px;" >
- <p>区间充电量({{item.startTime}}-{{item.endTime}})</p>
- <span >{{item.kwh }}度</span>
- </view>
-
- <view class="details-row" style="display: block;" >
- <p>
- <span style=" color: #37393c;">区间定价</span>
-
- <span style="float: right; color: #333;font-weight: normal;" v-if="!item.discountServicePrice" >{{((item.electricityPrice*100+item.servicePrice*100)/100).toFixed(2)}}元/度</span>
- <span style="float: right; color: #333;font-weight: normal;" v-if="item.discountServicePrice" >{{((item.electricityPrice*100+item.discountServicePrice*100)/100).toFixed(2)}}元/度 <span style="text-decoration:line-through;margin-left: 3px;">{{((item.electricityPrice*100+item.servicePrice*100)/100).toFixed(2)}}元/度</span></span>
-
- </p>
- <span class="details-row-sum" v-if="!item.discountServicePrice" >{{item.electricityPrice.toFixed(2)}}元/度(电费)+{{item.servicePrice.toFixed(2)}}元/度(服务费) </span>
- <span class="details-row-sum" style="float:none" v-if="item.discountServicePrice" >电费{{item.electricityPrice.toFixed(2)}}元/度|服务费{{item.discountServicePrice.toFixed(2)}}元/度(折前{{item.servicePrice.toFixed(2)}}元/度) </span>
-
- </view>
- </view>
- </view>
-
- <view class="details">
- <view class="details-title">
- <h4>分润明细</h4>
- </view>
- <view class="details-row" v-for="(item,i) in frmxList" :key="i" v-if="item.disProportion" >
- <p>{{item.merchantAccountName}}({{(item.disProportion*100).toFixed(2)}}%)</p>
- <span>{{item.shareProfitAmount.toFixed(2)}}元</span>
- </view>
-
- </view>
-
- <view class="details" v-if="detail">
- <view class="details-title">
- <h4>更多信息</h4>
- </view>
- <view class="details-row"><p>来源站点</p><span>{{detail.stationName}}</span></view>
- <view class="details-row"><p>来源充电桩</p><span>{{detail.deviceName}}</span></view>
- <view class="details-row" ><p>桩号</p><span>{{detail.deviceNo}}</span></view>
- <view class="details-row" v-if="detail.deviceType!='0'" ><p>枪号</p><span>{{detail.gunNo}}号充电枪</span></view>
- <view class="details-row" v-if="detail.deviceType=='0'" ><p>通道号</p><span>{{detail.gunNo}}号</span></view>
-
- <view class="details-row"><p>发放时间</p><span>{{detail.createTime}}</span></view>
- <view class="details-row" ><p>订单来源 </p><span>{{detail.chargingRecord?detail.chargingRecord.platformText:''}}</span></view>
-
-
- </view>
- <view class="detailsBtn">
- <u-button class="detailsBtn-btn" @click="back" type="primary" plain>返回</u-button>
- </view>
- </view>
- </template>
- <script>
- import * as API from '@/apis/finance.js'
-
- export default {
- data() {
- return {
- options0: [
-
- {
- label: '自行车充电',
- value: 0,
- },
- {
- label: '直流快充',
- value: 1,
- },
- {
- label: '交流慢充',
- value: 2,
- }
-
- ],
- chargeDetails:[],
- data:{},
- id:'',
- frmxList:[
-
- ],
- couponObj:null,
- detail:null,
- title:"",
-
- }
- },
- onLoad(op){
-
- this.data.detailId=op.id;
- this.getInfo()
- },
- methods: {
- getPercent(estimateMinute) {
- var value="";
-
- var ms =estimateMinute
- if (ms > 0) {
- var Hour = parseInt(Math.floor(ms / 60 ));
- var Fen = parseInt(Math.floor(ms % 60 ));
- // value = Hour + "小时" + Fen+"分钟"
- if(Hour){
- value += Hour + "小时"
- }
-
- if(Fen){
- value += Fen+"分钟"
- }
- }
-
- return value;
- },
- showDateMoth(date){
-
- var back=date;
- if(date){
- var k= date.slice(5,6)
- console.log(k)
- if(k=='0'){
- back= date.slice(6,7)
- }else{
- back= date.slice(5,7)
- }
-
-
- }
- return back;
- },
-
- back(){
- uni.navigateBack({
-
- })
- },
- getInfo(){
- uni.showLoading({
- title:"加载中",mask:true,
- })
- API.recordDetailData(this.data).then((res) => {
- this.detail=res.data
- this.couponObj=res.data.userCoupon;
-
- this.chargeDetails=JSON.parse(res.data.ChargeDetails)
- console.log( this.chargeDetails)
- this.frmxList=res.data.detailList
- uni.hideLoading()
-
- }).catch(error => {
- uni.showToast({
-
- title:error
- })
- })
- }
- }
- }
- </script>
- <style>
- page{
- background-color: #F7F7F7;
- }
- </style>
- <style lang="scss" scoped>
- .detailsBtn{
- margin: 16px;
- .detailsBtn-btn{
- border-color:#185AC6!important;
- border-radius: 8px!important;
- background: none!important;
- color:#185AC6!important;
- }
- }
- .details-title{
- margin-bottom: 16px;
- h4{
- font-weight: normal;
- font-size: 16px;
- position: relative;
- padding-left:10px;
- &::after{
- content: '';
- position: absolute;
- height: 12px;
- width: 4px;
- background-color: #27B148;
- left: 0;
- top:5px;
- }
- }
- }
- .details-row{
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 15px;
-
- p{
- color: #37393c;
- font-weight: bold;
- }
- }
- .details-row-sum{
- float: right;
- color: #888;
- font-size: 24rpx;
-
- }
- .details{
- margin: 34rpx;
- padding: 34rpx;
- background-color: #fff;
- border-radius: 8px;
- .details-head{
- text-align: center;
- display: flex;
- align-items: center;
- justify-content: center;
- h4{
- font-size: 18px;
- font-weight: normal;
- margin-left: 4px;
- }
- }
- .details-price{
- margin-top: 28px;
- display: flex;
- align-items: flex-end;
- justify-content: center;
- h3{
- font-size: 36px;
- color:#27B148;
- line-height: 36px;
- margin: 0 4px;
- font-weight: normal;
- }
- span{
- font-size: 20px;
- color:#27B148;
- }
- }
- .details-main{
- text-align: center;
- margin-bottom: 20px;
- p{
- color:#777;
- margin-top: 4px;
- }
- }
- }
- </style>
|