浏览代码

月卡列表

zhengkaixin 2 年之前
父节点
当前提交
a5333c82ed

+ 21 - 0
apis/finance.js

@@ -320,4 +320,25 @@ export function merchantInvoiceDetail(data) {
 		data: data,
 		data: data,
 		url: '/mobile/invoiceApi/merchantInvoiceDetail'
 		url: '/mobile/invoiceApi/merchantInvoiceDetail'
 	})
 	})
+}
+
+
+export function buyCardList(data) {
+	var url='/mobile/roleSharing/buyCardList';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function buyCardDetail(data) {
+	var url='/mobile/roleSharing/buyCardDetail';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
 }
 }

+ 10 - 1
pages.json

@@ -324,7 +324,16 @@
                 "enablePullDownRefresh": false
                 "enablePullDownRefresh": false
             }
             }
             
             
-        }
+        },
+		{
+		    "path" : "pagesFinance/detailed/monthlyCardDetails",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
     ],
     ],
 	"globalStyle": {
 	"globalStyle": {
 		"navigationStyle": "custom", // 隐藏系统导航栏
 		"navigationStyle": "custom", // 隐藏系统导航栏

+ 11 - 4
pagesFinance/detailed/details.vue

@@ -24,7 +24,7 @@
  			<view class="details-row" v-if="detail.deviceType!='0'" >
  			<view class="details-row" v-if="detail.deviceType!='0'" >
  				<p>服务费</p>
  				<p>服务费</p>
    				
    				
-				<span v-if="detail.record">{{detail.surplusAmount}}元
+				<span v-if="detail.record">{{detail.surplusAmount?detail.surplusAmount:0}}元
 				
 				
 <!-- 				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.record.discountAmount}})</span>
 <!-- 				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.record.discountAmount}})</span>
  -->				
  -->				
@@ -36,12 +36,18 @@
  					{{couponObj.useText}}	
  					{{couponObj.useText}}	
  				</span>
  				</span>
  			</view>
  			</view>
-			<view class="details-row" v-if="couponObj&&couponObj.status=='1'&&detail.record" >
+			<view class="details-row" v-if="detail.record&&detail.record.discountAmount" >
 				<p>实际减免 </p>
 				<p>实际减免 </p>
 				<span>
 				<span>
 					{{detail.record.discountAmount}}元	
 					{{detail.record.discountAmount}}元	
 				</span>
 				</span>
 			</view>
 			</view>
+			<view class="details-row" v-if="detail.record&&detail.record.userCardId" >
+				<p>会员活动 </p>
+				<span>
+					充电服务费包月卡	
+				</span>
+			</view>
 		
 		
  		</view>
  		</view>
 		
 		
@@ -204,13 +210,14 @@
 				API.incomeDetails({
 				API.incomeDetails({
 					recordId:this.id
 					recordId:this.id
 				}).then((res) => {
 				}).then((res) => {
-					this.detail=res.data	 
+					this.detail=res.data
+						 
 					//this.sprList=res.data.cdmList	
 					//this.sprList=res.data.cdmList	
 					this.couponObj=res.data.userCoupon;
 					this.couponObj=res.data.userCoupon;
 					this.chargeDetails=JSON.parse(res.data.ChargeDetails)
 					this.chargeDetails=JSON.parse(res.data.ChargeDetails)
 					this.sprList=res.data.detailList	
 					this.sprList=res.data.detailList	
 					uni.hideLoading()
 					uni.hideLoading()
-					 
+					 console.log(this.detail)
 				}).catch(error => {
 				}).catch(error => {
 						uni.showToast({
 						uni.showToast({
 							
 							

+ 121 - 6
pagesFinance/detailed/index.vue

@@ -3,7 +3,10 @@
 		<u-navbar :is-back="false">
 		<u-navbar :is-back="false">
 			<view class="navbar">
 			<view class="navbar">
 				<view class="navbar-tit"  >充电明细</view>
 				<view class="navbar-tit"  >充电明细</view>
-				<view class="navbar-screen" @click="popupShow = true"><span>筛选</span><u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon></view>
+				<view class="navbar-screen" v-show="current==0" @click="popupShow = true"><span>筛选</span>
+				<u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon>
+				</view>
+				
 			</view>
 			</view>
 		</u-navbar>
 		</u-navbar>
 		<u-popup v-model="popupShow" mode="top" height="80%" >
 		<u-popup v-model="popupShow" mode="top" height="80%" >
@@ -95,7 +98,11 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</u-popup>
 		</u-popup>
-		<view class="detailed">
+		
+		<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="change" inactive-color="#acb2af"
+			active-color="#101010"></u-tabs>
+			
+		<view class="detailed" v-show="current==0" >
 				<view style="text-align: center;margin-top: 100px" v-if="!list.length">
 				<view style="text-align: center;margin-top: 100px" v-if="!list.length">
 					<img src="@/assets/img/blankpage.png">
 					<img src="@/assets/img/blankpage.png">
 					<view>查询为空</view>
 					<view>查询为空</view>
@@ -106,7 +113,7 @@
 				:key="index">
 				:key="index">
 				<view class="detailed-time"    v-if="item.show">
 				<view class="detailed-time"    v-if="item.show">
 					<p>{{item.showtime}}</p>
 					<p>{{item.showtime}}</p>
-					<p>共收{{showMap.get(item.showtime).num}}笔,{{showMap.get(item.showtime).amount}}元</p>
+					<p  v-if="showMap">共收{{showMap.get(item.showtime).num}}笔,{{showMap.get(item.showtime).amount}}元</p>
 				</view>
 				</view>
 				<view class="detailed-item">
 				<view class="detailed-item">
 					<view class="detailed-item-name" style="
 					<view class="detailed-item-name" style="
@@ -132,6 +139,45 @@
 			
 			
 			 
 			 
 		</view>
 		</view>
+		<!-- 包月卡 -->
+		<view class="" v-show="current==1">
+			<view class="detailed-list"  v-for="(item ,index) in list2" 
+			@click="gotoUrl('pagesFinance/detailed/monthlyCardDetails?id='+item.id)"
+			
+			:key="index" >
+		
+				<view class="detailed-time"   v-if="item.show" >
+					<p>{{item.showtime}}</p>
+		
+					<p v-if="showMap2">今日办卡{{showMap2.get(item.showtime).amount}}元,{{showMap2.get(item.showtime).num}}笔</p>
+		
+				</view>
+				<view class="detailed-item">
+					<view class="detailed-item-name" style="
+								    width: 70%;
+							">
+						<h2 class="showName">{{item.monthlyRentName}}</h2>
+						<p>{{item.payTime?item.payTime.slice(11):''}}</p>
+					</view>
+					<view class="detailed-item-name" style="
+								min-width: 60px;
+								width: 30%;
+								font-size: 16px;
+								text-align: right;
+							">
+							<h2>{{item.payFee}}元</h2>
+						
+					</view>
+					<!-- <view class="sign">
+						<img src="../../assets/img/tixian.png" alt="">
+					</view> -->
+				</view> 
+				
+				 
+				
+			</view>
+		</view>
+		
 		<Tabbar :current="1" ref="tabbarMain"></Tabbar>
 		<Tabbar :current="1" ref="tabbarMain"></Tabbar>
  	</view>
  	</view>
 </template>
 </template>
@@ -160,10 +206,20 @@
 				form:{
 				form:{
 					
 					
 				},
 				},
-				 
+				// current: 0,
+				 tabList: [{
+				 	name: '充电订单'
+				 }, {
+				 	name: '月卡订单'
+				 }],
 				pageIndex: 1,
 				pageIndex: 1,
 				recordsTotal: 0,
 				recordsTotal: 0,
 				list: [],
 				list: [],
+				
+				pageIndex2: 1,
+				recordsTotal2: 0,
+				list2: [],
+				
 				popupShow: false,
 				popupShow: false,
 				tabbarList: [{
 				tabbarList: [{
 						iconPath: "bar-chart-box-fill",
 						iconPath: "bar-chart-box-fill",
@@ -190,6 +246,7 @@
 					},
 					},
 				],
 				],
 				showMap:null,
 				showMap:null,
+				showMap2:null,
 				current: 0,
 				current: 0,
 				value: '',
 				value: '',
 				type: 'select',
 				type: 'select',
@@ -230,10 +287,14 @@
 		onReady() {
 		onReady() {
 			
 			
 			this.getList()
 			this.getList()
+			this.getList2()
 			this.getStation()
 			this.getStation()
 			
 			
 		},
 		},
 		methods: {
 		methods: {
+			change(index) {
+				this.current = index;
+			},
 			changedate(e) {
 			changedate(e) {
 				this.startTime = e.startDate
 				this.startTime = e.startDate
 				this.endTime = e.endDate
 				this.endTime = e.endDate
@@ -285,11 +346,14 @@
 				
 				
 				API.incomeList(this.form).then((res) => {
 				API.incomeList(this.form).then((res) => {
 					
 					
+					var showMap=new Map()
+					
+					
 					this.list = [
 					this.list = [
 						...this.list,
 						...this.list,
 						...res.data.data
 						...res.data.data
 					];
 					];
-					var showMap=new Map()
+				
 					this.list.forEach(item=>{
 					this.list.forEach(item=>{
 						if(item.endTime){
 						if(item.endTime){
 							var ktime=item.endTime.split(" ")[0]
 							var ktime=item.endTime.split(" ")[0]
@@ -324,7 +388,58 @@
 					})
 					})
 				})
 				})
 			},
 			},
-		
+			getList2() {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+			
+				
+				API.buyCardList({
+					pageIndex:this.pageIndex2,
+					pageSize:20
+				}).then((res) => {
+					var showMap=new Map()
+					this.showMap2=showMap;
+					this.list2 = [
+						...this.list2,
+						...res.data.data
+					];
+					
+					this.list2.forEach(item=>{
+						if(item.createTime){
+							var ktime=item.createTime.split(" ")[0]
+							if(showMap.has(ktime)){
+								item.show=false;
+							
+								
+							}else{
+								var Amount=item.totalAmount 
+								var num=item.totalNum
+								showMap.set(ktime,{
+									amount:Amount,
+									num:num
+								})
+							
+								item.show=true;
+								item.showtime=ktime;
+							}
+						}
+						
+					})
+					
+					this.showMap2=showMap;
+					this.recordsTotal2 = res.data.recordsTotal
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
 			getStation(bl) {
 			getStation(bl) {
 				
 				
 				API.stationList().then((res) => {
 				API.stationList().then((res) => {

+ 231 - 0
pagesFinance/detailed/monthlyCardDetails.vue

@@ -0,0 +1,231 @@
+<template>
+	<view>
+		<u-navbar>订单详情</u-navbar>
+
+		<view class="details">
+			<view class="details-title">
+				<h4>订单明细</h4>
+			</view>
+			<view class="details-row">
+				<p>商品名称 </p>
+				<span>{{monthlyRentCard.name}}</span>
+			</view>
+			<view class="details-row">
+				<p>订单金额</p>
+				<span>{{regUserCard.payFee?regUserCard.payFee:0}}元</span>
+			</view>
+			<view class="details-row">
+				<p>包月卡卡号</p>
+				<span>{{regUserCard.cardNo}}</span>
+			</view>
+			<view class="details-row">
+				<p>订单编号</p>
+				<span>{{regUserCard.outOrderNo}}</span>
+			</view>
+			<view class="details-row">
+				<p>购买时间</p>
+				<span>{{regUserCard.payTime}}</span>
+			</view>
+		</view>
+
+		<view class="details">
+			<view class="details-title">
+				<h4>更多信息</h4>
+			</view>
+			<view class="details-row">
+				<p>用户昵称 </p>
+				<span>{{buyRegUser.nickName?buyRegUser.nickName:'未命名'}}</span>
+			</view>
+			<view class="details-row">
+				<p>联系方式</p>
+				<span>{{getPhone(buyRegUser.phone)}}</span>
+			</view>
+			
+			<view class="details-row">
+				<p>卡有效期</p>
+				<span>{{regUserCard.startTime?regUserCard.startTime.slice(0,10):''}}至{{regUserCard.endTime?regUserCard.endTime.slice(0,10):''}}</span>
+			</view>
+			
+
+
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		parseUnixTime,
+		substrMb
+	} from '@/utils'
+	
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				buyRegUser: {},
+				monthlyRentCard: {},
+				regUserCard: {},
+			}
+		},
+		onLoad(op) {
+
+
+
+			this.id = op.id;
+			this.getInfo()
+		},
+		methods: {
+	getPhone(phone){
+				var backphone="";
+				if(phone){
+					backphone=substrMb(phone,0,3)+"****"+substrMb(phone,7,4)
+				}
+				
+				return backphone;
+			},
+			getInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.buyCardDetail({
+					id: this.id
+				}).then((res) => {
+					this.buyRegUser = res.data.buyRegUser
+					this.monthlyRentCard = res.data.monthlyRentCard
+					this.regUserCard = res.data.regUserCard
+
+					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: 20px;
+
+		h4 {
+			font-weight: normal;
+			font-size: 16px;
+			position: relative;
+			padding-left: 10px;
+
+			&::after {
+				content: '';
+				position: absolute;
+				height: 12px;
+				width: 4px;
+				background-color: #185ac6;
+				left: 0;
+				top: 5px;
+			}
+		}
+	}
+
+	.details-row {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-top: 15px;
+
+		p {
+			color: #86898C;
+
+		}
+
+	}
+
+	.details-row-sum {
+		float: right;
+		color: #101010;
+		font-size: 14px;
+
+	}
+
+	.details {
+		margin: 16px;
+		padding: 20px;
+		background-color: #fff;
+		border-radius: 8px;
+		position: relative;
+
+		.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: 12px;
+			margin-bottom: 4px;
+			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;
+
+			.withdraw {
+				width: 21.3vw;
+				height: 21.3vw;
+				position: absolute;
+				top: 2vw;
+				right: 2.5vw;
+			}
+
+			p {
+				color: #777;
+				margin-top: 4px;
+			}
+		}
+	}
+</style>

+ 7 - 2
pagesFinance/share/details.vue

@@ -39,13 +39,18 @@
 				</span>
 				</span>
 			</view>
 			</view>
 			
 			
-		<view class="details-row" v-if="couponObj&&couponObj.status=='1'&&detail.discountAmount" >
+		<view class="details-row" v-if="detail.discountAmount" >
 			<p>实际减免</p>
 			<p>实际减免</p>
 			<span>
 			<span>
 				{{detail.discountAmount}}元
 				{{detail.discountAmount}}元
 			</span>
 			</span>
 		</view>
 		</view>
-			
+			<view class="details-row" v-if="detail.chargingUserCardId" >
+				<p>会员活动 </p>
+				<span>
+					充电服务费包月卡	
+				</span>
+			</view>
 		</view>
 		</view>
 		<view class="details">
 		<view class="details">
 			<view class="details-title">
 			<view class="details-title">

+ 4 - 4
pagesFinance/share/index.vue

@@ -73,7 +73,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</u-popup>
 		</u-popup>
-		<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="change" inactive-color="#acb2af"
+		<u-tabs :list="tabList" v-if="false" :is-scroll="false" :current="current" @change="change" inactive-color="#acb2af"
 			active-color="#101010"></u-tabs>
 			active-color="#101010"></u-tabs>
 		<!-- 充电订单 -->
 		<!-- 充电订单 -->
 		<view class="detailed" v-if="current==0">
 		<view class="detailed" v-if="current==0">
@@ -218,9 +218,9 @@
 				endyear: "",
 				endyear: "",
 				current: 0,
 				current: 0,
 				tabList: [{
 				tabList: [{
-					name: '充电订单'
+					name: '分润记录'
 				}, {
 				}, {
-					name: '月卡'
+					name: '月卡分润'
 				}],
 				}],
 				params: {
 				params: {
 					year: true,
 					year: true,
@@ -265,7 +265,7 @@
 					},
 					},
 				],
 				],
 				showMap: null,
 				showMap: null,
-				current: 0,
+				//current: 0,
 				value: '',
 				value: '',
 				type: 'select',
 				type: 'select',
 				show: false,
 				show: false,

+ 8 - 6
pagesFinance/user/pileManagement.vue

@@ -76,27 +76,29 @@
 				></text>
 				></text>
 			</view>
 			</view>
 			<view class="state-item">
 			<view class="state-item">
-				开放共享:{{!item.enableShare?'关闭':'开启'}} <text class="bot1 "
+				联网状态:{{!detail.online?'离线':'在线'}} <text class="bot1"
 				:class="{
 				:class="{
-					bot2:item.enableShare
+					bot2:detail.online
 				}"
 				}"
 				></text>
 				></text>
 			</view>
 			</view>
+			
 			<view class="state-item">
 			<view class="state-item">
-				开放预约:{{!item.enableAppointment ?'关闭':'开启'}} <text class="bot1 "
+				开放共享:{{!(item.enableShare&&item.enableShareWithinTime)?'关闭':'开启'}} <text class="bot1 "
 				:class="{
 				:class="{
-					bot2:item.enableAppointment
+					bot2:(item.enableShare&&item.enableShareWithinTime)
 				}"
 				}"
 				></text>
 				></text>
 			</view>
 			</view>
 			<view class="state-item">
 			<view class="state-item">
-				联网状态:{{!detail.online?'离线':'在线'}} <text class="bot1"
+				开放预约:{{!(item.enableAppointment&&item.enableAppointmentWithinTime)?'关闭':'开启'}} <text class="bot1 "
 				:class="{
 				:class="{
-					bot2:detail.online
+					bot2:(item.enableAppointment&&item.enableAppointmentWithinTime)
 				}"
 				}"
 				></text>
 				></text>
 			</view>
 			</view>
 			
 			
+			
 			<view class="iconfont more"  v-if="isAllow"	
 			<view class="iconfont more"  v-if="isAllow"	
 				 @click="gotoUrl('pagesFinance/user/chargingGunSetup?id='+item.id)" 
 				 @click="gotoUrl('pagesFinance/user/chargingGunSetup?id='+item.id)" 
 			>
 			>