zhengkaixin 3 年之前
父節點
當前提交
7320604759

+ 23 - 5
pagesFinance/detailed/details.vue

@@ -15,6 +15,9 @@
 				</view>
 				<p>本单收益</p>
 			</view>
+			<view class="details-row" v-if="detail.deviceType"   ><p>订单类型 </p><span>{{options0[detail.deviceType]}}
+			</span></view>
+			
 			<view class="details-row"  v-if="detail.deviceType!='0'" ><p>电费 </p><span>{{detail.electricityAmount?detail.electricityAmount:0}}元</span></view>
 		
 			
@@ -49,7 +52,7 @@
 			<view class="details-row"><p>结束时间</p><span>{{detail.endTime}}</span></view>
 			<view class="details-row"><p>充电时长</p><span>{{getPercent(detail.chargingMinute)}}</span></view>
 		
-		<view class="details-row" v-if="detail.unitPrice" >
+		<view class="details-row" v-if="detail.deviceType=='0'" >
 			<p>电费单价</p>
 			<span>{{detail.unitPrice}}元/小时</span>
 		</view>
@@ -123,6 +126,22 @@
 				detail:{
 					
 				},
+				options0: [
+				
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '直流快充',
+						value: 1,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					}
+					
+				],
 				title:"",
 				 couponObj:null,
 			}
@@ -141,7 +160,8 @@
 				var ms =estimateMinute
 				if (ms > 0) {
 					var Hour = parseInt(Math.floor(ms / 60 ));
-					var Fen = parseInt(Math.floor(ms % 60 ));
+					var Fen = parseInt(Math.floor(ms % 60 ));	
+				
 					if(Hour){
 						value += Hour + "小时" 
 					}
@@ -149,10 +169,8 @@
 					if(Fen){
 						value += Fen+"分钟"
 					}
-					 
-					
 				}else{
-					value="0分钟";
+					value="0分钟"
 				}
 			
 				return value;

+ 1 - 1
pagesFinance/detailed/index.vue

@@ -118,7 +118,7 @@
 						">
 						
 						<h2 style="   text-align: end;">{{item.actualFee?item.actualFee:0}}元</h2>
-						<p style="   text-align: end;" >{{item.createTime?item.createTime.slice(11,16):''}}</p>
+						<p style="   text-align: end;" >{{item.createTime?item.createTime.slice(11):''}}</p>
 					</view>
 				</view>
 				

+ 21 - 4
pagesFinance/share/details.vue

@@ -13,16 +13,17 @@
 				<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  }}元</span>
 			</view>
-			<view class="details-row"  v-if="chargeDetails"  >
+			<view class="details-row"  v-if="detail.deviceType!='0'"  >
 				<p>电费金额</p>
 				<span>{{detail.electricityAmount }}元</span>
 			</view>
-			<view class="details-row"  v-if="chargeDetails"  >
+			<view class="details-row"   v-if="detail.deviceType!='0'"  >
 				<p>服务费</p>
 				<span>{{detail.surplusAmount-detail.discountAmount}}元
 				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.discountAmount}})</span>
@@ -47,7 +48,7 @@
 				<p>总充电量</p>
 				<span>{{detail.electricQuantity/10000}}度</span>
 			</view>
-					<view class="details-row" v-if="!chargeDetails" >
+					<view class="details-row" v-if="detail.deviceType=='0'" >
 						<p>电费单价</p>
 						<span>{{detail.unitPrice}}元/小时</span>
 					</view>
@@ -103,6 +104,22 @@
 	export default {
 		data() {
 			return {
+				options0: [
+				
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '直流快充',
+						value: 1,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					}
+					
+				],
 				chargeDetails:[],
 				data:{},
 				id:'',

+ 118 - 8
pagesFinance/user/withdraw.vue

@@ -5,6 +5,17 @@
 			<view class="withdraw-head">
 				<b>提现至</b><span>{{code}}</span>
 			</view>
+			<view class="withdraw-head">
+				<b>选择提现站点</b>
+				<span  >
+					<picker @change="bindPickerChange" range-key="name" :range="stationList">
+							<view class="uni-input">{{stationObj.name?stationObj.name:'无站点'}}<text class="iconfont more">
+					&#xe600;
+				</text></view>
+					</picker>
+									
+				</span>
+			</view>
 			<view class="withdraw-head">
 				<b>上次提现时间</b><span>{{info.startTime}}</span>
 			</view>
@@ -25,15 +36,54 @@
 					<u-input v-model="value" :type="type" placeholder-style="font-size:28px;height:40px;line-height:40px;color:#ccc;" />
 				</view>
 			</view>
-			<view class="withdraw-foot"  v-if="false">
-				<p>可提现余额 ¥{{home.accountBalance}}</p>
-				<span @click="value=home.accountBalance">全部提现</span>
+			<view class="withdraw-head">
+				<b>是否开票</b><span style="width: 125px;" >
+				<u-radio-group v-model="invoiceRequired" >
+				
+					<u-radio  v-for="(item, index) in list2" :key="index+'a'" :name="item.value"
+						:disabled="item.disabled" active-color="#00b962">
+				
+						{{item.name}}
+				
+					</u-radio>
+				
+				</u-radio-group>
+				</span>
+			</view>
+			<view class="withdraw-head">
+				<b>发票类型</b><span>
+				<u-radio-group v-model="invoiceType" >
+				
+					<u-radio  v-for="(item, index) in list1" :key="index+'a'" :name="item.value"
+						:disabled="item.disabled" active-color="#00b962">
+				
+						{{item.name}}
+				
+					</u-radio>
+				
+				</u-radio-group>
+				</span>
+			</view>
+			
+			<view class="withdraw-head" >
+				<b>开票税率(%)</b>
+				<span class="withdraw-input">
+				  <u-input
+				    placeholder="请输入内容"
+					input-align="right"
+			type="digit"
+				    v-model="taxRate"
+				 
+				  ></u-input>	
+					
+				</span>
 			</view>
 		</view>
+		
 		<view class="applyBtn">
 			<u-button :class="{
 				'applyBtn-btn':!info.amount
-			}" @click="submit()" type="primary">申请提现,7日内到账</u-button>
+			}" @click="submit()" type="primary">申请提现,等待财务转账</u-button>
 		</view>
 		<view class="withdraw-tips">
 			<h4>提现说明:</h4>
@@ -56,6 +106,27 @@
 				value: '',
 				type: 'number',
 				nowTime:"",
+				taxRate:"",
+				invo:"",
+				invoiceRequired:"1",
+				invoiceType:"1",
+				stationList:[],
+				stationObj:{},
+				list1: [{
+					name: '普票',
+					value:"1"
+				}, {
+					name: '专票',
+					value:"2"
+				}],
+				list2: [{
+					name: '是',
+					value:"1"
+				}, {
+					name: '否  ',
+					value:"0"
+				}],
+				
 					home:{
 						accountBalance:0
 					},
@@ -70,8 +141,22 @@
 			this.getHomePage()
 		},
 		methods: {
+			bindPickerChange(e){
+				console.log(e)
+				if(this.stationList[e.detail.value]){
+					this.stationObj=this.stationList[e.detail.value];
+				}
+			},
+			selectStation(){},
 			submit(){
 				//this.value=this.info.amount
+				if(!this.stationObj.id){
+						uni.showToast({
+							title: "请选择站点"
+						})
+				
+					return
+				}
 				if(!this.info.amount){
 						uni.showToast({
 							title: "可提现金额为0"
@@ -84,10 +169,14 @@
 					title: "加载中",
 					mask: true,
 				})
+				this.info.invoiceRequired=this.invoiceRequired
+				this.info.invoiceType=this.invoiceType
+				this.info.taxRate=this.taxRate
+				this.info.stationId=this.stationObj.id;
 				API.applyWithdraw(this.info).then((res) => {
 					
 						uni.redirectTo({
-							url:"/pagesFinance/user/applyResult?value="+this.value
+							url:"/pagesFinance/user/applyResult?value="+this.info.amount
 						})
 					
 				}).catch(error => {
@@ -96,12 +185,14 @@
 					})
 				})
 			},
-			queryWithdrawInfo(){
+			queryWithdrawInfo(id){
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-				API.queryWithdrawInfo().then((res) => {
+				API.queryWithdrawInfo({
+					stationId:id
+				}).then((res) => {
 					this.info=res.data;
 					
 					uni.hideLoading()
@@ -112,6 +203,25 @@
 					})
 				})
 			},
+			getStationList(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.stationList().then((res) => {
+					this.stationList=res.data.stationList;
+					if(this.stationList.length){
+						this.stationObj=this.stationList[0];
+						this.queryWithdrawInfo(this.stationList[0].id)
+					}
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
 			getHomePage(){
 				uni.showLoading({
 					title: "加载中",
@@ -129,7 +239,7 @@
 					}
 					
 					uni.hideLoading()
-					this.queryWithdrawInfo()
+					this.getStationList()
 				}).catch(error => {
 					uni.showToast({
 						title: error

+ 2 - 2
pagesFinance/user/withdrawRecord.vue

@@ -11,7 +11,7 @@
 			v-for="(item ,index) in list" >
 				<view class="detailed-time"  v-if="item.show">
 					<p>{{item.showtime}}</p>
-					<p>共提现 {{showMap.get(item.showtime)}}</p>
+					<p>共提现 {{showMap.get(item.showtime)}}</p>
 				</view>
 				<view class="detailed-item">
 					<view class="detailed-item-name">
@@ -25,7 +25,7 @@
 						<p>{{item.createTime}}</p>
 					</view>
 					<view class="detailed-item-num">
-						<h2>{{item.applicationAmount}}</h2>
+						<h2>{{item.applicationAmount}}</h2>
 					</view>
 				</view>