|
@@ -8,7 +8,7 @@
|
|
|
<u-tabs inactive-color="#888888" active-color="#101010" :list="list" :is-scroll="true"
|
|
|
:current="current" @change="change"></u-tabs>
|
|
|
|
|
|
- <view class="carNone" v-if="list[current].length == 0">
|
|
|
+ <view class="carNone" v-if="list[current].list.length == 0">
|
|
|
<img src="static/img/暂无数据-缺省页.png" alt="">
|
|
|
<p class="oldTextjp2" oldstyle="font-size: 18px;">暂无记录</p>
|
|
|
</view>
|
|
@@ -20,43 +20,20 @@
|
|
|
<view class="radio">
|
|
|
<u-checkbox v-model="item.ck" @change="changeitem($event,item)" ></u-checkbox>
|
|
|
</view>
|
|
|
- <view class="content" @click="submit(item.id)">
|
|
|
+ <view class="content" @click="submit(item.stationId)">
|
|
|
<view class="title">
|
|
|
- 荆鹏软件园充电站 <text class="price">50.00元</text>
|
|
|
+ {{item.stationName}} <text class="price">{{item.totalActualFee}}元</text>
|
|
|
</view>
|
|
|
- <p><text class="text-1">充电电量</text> <text class="text-2">50.00度</text></p>
|
|
|
- <p><text class="text-1">充电笔数</text> <text class="text-2">10笔</text></p>
|
|
|
- <!-- <p><text class="text-1">车牌号码</text> <text class="text-2">鄂D9GX23</text></p> -->
|
|
|
- <!-- <p><text class="text-1">充电电流</text> <text class="text-2">50.00</text></p> -->
|
|
|
- <!-- <p><text class="text-1">支付号码</text> <text class="text-2">2022-06-07 16:00:00</text></p> -->
|
|
|
- <!-- <p class=order-box>
|
|
|
- <view class="order">
|
|
|
- 订单号
|
|
|
- </view>
|
|
|
- <view class="order-num">
|
|
|
- 2022060715035348150312
|
|
|
- </view>
|
|
|
- </p> -->
|
|
|
+ <p><text class="text-1">充电电量</text> <text class="text-2">{{item.totalElectricQuantity/10000}}度</text></p>
|
|
|
+ <p><text class="text-1">充电笔数</text> <text class="text-2">{{item.recordNum}}笔</text></p>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
<p class="tips" v-if="list[current].list.length == list[current].recordsTotal && list[current].recordsTotal != 0" > 已经到底了</p>
|
|
|
|
|
|
- <view class="not-invoiced-item flex">
|
|
|
- <view class="radio">
|
|
|
- <radio></radio>
|
|
|
- </view>
|
|
|
- <view class="content">
|
|
|
- <view class="title">
|
|
|
- 玉桥公园充电站 <text class="price">15.00元</text>
|
|
|
- </view>
|
|
|
- <p><text class="text-1">充电电量</text> <text class="text-2">50.00度</text></p>
|
|
|
- <p><text class="text-1">充电笔数</text> <text class="text-2">10笔</text></p>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
+
|
|
|
|
|
|
<view class="bottom">
|
|
|
<view class="radio">
|
|
@@ -74,17 +51,20 @@
|
|
|
</view>
|
|
|
<!-- 已开票 -->
|
|
|
<view class="invoiced" v-show="current==1">
|
|
|
- <view class="invoiced-item">
|
|
|
+ <view class="invoiced-item" v-for="(item,index) in list[current].list" :key="index">
|
|
|
<view class="content">
|
|
|
<view class="title">
|
|
|
- 荆鹏软件园充电站 <text class="invoice">开票中</text>
|
|
|
+ {{item.stationName}} <text :class="{
|
|
|
+ invoice:item.status==1,
|
|
|
+ 'have-invoiced':item.status==2
|
|
|
+ }">{{item.statusText}}</text>
|
|
|
</view>
|
|
|
- <p><text class="text-1">发票金额</text> <text class="text-2">50.00元</text></p>
|
|
|
- <p><text class="text-1">发票抬头</text><text class="text-2">刘德华</text></p>
|
|
|
- <p><text class="text-1">申请时间</text> <text class="text-2">2022-06-23 16:00:00</text></p>
|
|
|
+ <p><text class="text-1">发票金额</text> <text class="text-2">{{item.amount}}元</text></p>
|
|
|
+ <p><text class="text-1">发票抬头</text><text class="text-2">{{item.title}}</text></p>
|
|
|
+ <p><text class="text-1">申请时间</text> <text class="text-2">{{item.createTime}}</text></p>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="invoiced-item">
|
|
|
+ <!-- <view class="invoiced-item">
|
|
|
<view class="content">
|
|
|
<view class="title">
|
|
|
玉桥公园充电站 <text class="have-invoiced">开票成功</text>
|
|
@@ -93,7 +73,7 @@
|
|
|
<p><text class="text-1">发票抬头</text> <text class="text-2">刘德华</text></p>
|
|
|
<p><text class="text-1">申请时间</text> <text class="text-2">2022-06-23 16:00:00</text></p>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<p class="tips"> 仅展示最近12个月的发票信息</p>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -145,12 +125,24 @@
|
|
|
var obj=list[i];
|
|
|
if(obj.ck){
|
|
|
|
|
|
- sum+=obj.actualFee*100
|
|
|
+ sum+=obj.totalActualFee*100
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return sum/100
|
|
|
},
|
|
|
+ selectIds(){
|
|
|
+ var list=this.list[0].list;
|
|
|
+ var sz=[]
|
|
|
+ for(var i in list ){
|
|
|
+ var obj=list[i];
|
|
|
+ if(obj.ck){
|
|
|
+ sz.push(obj.stationId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return sz.join();
|
|
|
+ },
|
|
|
selectcount(){
|
|
|
var list=this.list[0].list;
|
|
|
var count=0
|
|
@@ -207,14 +199,22 @@
|
|
|
|
|
|
}).then((res) => {
|
|
|
uni.hideLoading();
|
|
|
- var datalist=res.data.data;
|
|
|
+
|
|
|
+ var datalist=[]
|
|
|
+ if(current==0){
|
|
|
+ datalist=res.data.station;
|
|
|
+ }
|
|
|
+ if(current==1){
|
|
|
+ datalist=res.data.data;
|
|
|
+ }
|
|
|
+
|
|
|
for(var i in datalist){
|
|
|
var obj=datalist[i]
|
|
|
obj.ck=false;
|
|
|
}
|
|
|
this.list[current].list = [
|
|
|
...list,
|
|
|
- ...res.data.data
|
|
|
+ ...datalist
|
|
|
];
|
|
|
this.list[current].recordsTotal = res.data.recordsTotal;
|
|
|
}).catch(error => {
|
|
@@ -232,10 +232,24 @@
|
|
|
},
|
|
|
change(index) {
|
|
|
this.current = index;
|
|
|
+ var list =this.list[this.current].list
|
|
|
+ if(list.length==0){
|
|
|
+ this.getlist(true);
|
|
|
+ }
|
|
|
},
|
|
|
submit(id){
|
|
|
+ if(!id){
|
|
|
+ id=this.selectIds
|
|
|
+ }
|
|
|
+ if(!id){
|
|
|
+ uni.showToast({
|
|
|
+ title:"请至少勾选一条记录"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/MyInvoice/issueInvoice'
|
|
|
+ url:'/pages/MyInvoice/issueInvoice?ids='+id
|
|
|
})
|
|
|
}
|
|
|
|