zhengkaixin vor 2 Jahren
Ursprung
Commit
4903aede03

+ 2 - 2
.env.dev.js

@@ -10,8 +10,8 @@ const UNI_APP = {
 	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr56yEh-TbCvUg3s9LYQSL8tM",//提现
-	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s", //杨所
-	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
+	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s", //杨所
+	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	//openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",
 	//小鹏管家appid
 	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",

+ 11 - 0
apis/finance.js

@@ -420,6 +420,17 @@ export function cardProfitDataDetail(data) {
 	})
 }
 
+
+export function profitDetailsExcelByPersonal(data) {
+	var url='/mobile/withdrawal/profitDetailsExcelByPersonal';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
 export function profitDetailsExcel(data) {
 	var url='/mobile/roleSharing/profitDetailsExcel';
 	return request({

+ 16 - 1
main.js

@@ -38,7 +38,22 @@ Vue.mixin({
         }
 		
     } ,methods:{
-	
+		showNumJP(val){
+			if(val||val==0){
+				val=""+val
+				if(val.indexOf(".")>-1){
+					val= val.substring(0,val.indexOf(".")+3);
+				}
+				
+				try{
+					val = parseFloat(val).toFixed(2);
+				}catch(e){
+					console.log("error +++"+e)
+				}
+			
+			}
+			return val
+		},
 		gotoUrl(url){
 			uni.navigateTo({
 				url:"/"+url

+ 10 - 1
pagesFinance/user/applyResult.vue

@@ -4,7 +4,7 @@
 		<view class="applyResult">
 			<u-icon name="chenggong" custom-prefix="custom-icon" color="#27B148" size="150"></u-icon>
 			<h3>申请成功</h3>
-			<p v-if="value">申请提现 ¥{{(value).toFixed(2)}}元</p>
+			<p v-if="value">申请提现 ¥{{showNumJP(value)}}元</p>
 		</view>
 		<view class="applySpeed">
 			<view class="applySpeed-item">
@@ -41,6 +41,15 @@
 			}
 		},
 		methods: {
+			showNum(val){
+				if(val){
+					val=""+val
+					if(val.indexOf(".")>-1){
+						return val.substring(0,val.indexOf(".")+3);
+					}
+				}
+				return val
+			},
 			back(){
 				uni.navigateBack()
 			}

+ 3 - 3
pagesFinance/user/index.vue

@@ -33,7 +33,7 @@
 		<view class="userInfo" v-if="home">
 			<view class="userInfo-head"><p>可提现金额</p></view>
 			<view class="userInfo-main">
-				<h2>{{home.accountBalance.toFixed(2)}}元 
+				<h2>{{showNumJP(home.accountBalance)}}元 
 				
 							<view class="withdraw"   v-if="info.status&&info.accountType!=3"  @click="gotoUrl('pagesFinance/user/withdrawRecord')" >
 								账户提现
@@ -53,11 +53,11 @@
 				</view> -->
 				<view class="userInfo-item">
 					<p>冻结金额(提现中)</p>
-					<h4>{{home.waitingAmount.toFixed(2)}}元</h4>
+					<h4>{{showNumJP(home.waitingAmount)}}元</h4>
 				</view>
 				<view class="userInfo-item">
 					<p>已提现</p>
-					<h4>{{home.withdrawnAmount.toFixed(2)}}元</h4>
+					<h4>{{showNumJP(home.withdrawnAmount)}}元</h4>
 				</view>
 			</view>
 		</view>

+ 24 - 14
pagesFinance/user/withdrawal/cashoutInfo.vue

@@ -105,7 +105,7 @@
 						<view class="withdraw-head" >
 							<b class="asterisk">可提现金额</b>
 							<span>
-									<view class="uni-input">{{info.chargingProfitAmount?info.chargingProfitAmount.toFixed(2):0}}元</view>
+									<view class="uni-input">{{info.chargingProfitAmount?showNumJP(info.chargingProfitAmount):0}}元</view>
 							
 							</span>
 						</view>
@@ -316,7 +316,8 @@
 			 
 			
 		},
-		methods: {
+		methods: {
+			
 			init() {
 				var _this=this.$refs.ucalendar
 				_this.init=()=>{
@@ -520,10 +521,10 @@
 					mask: true,
 				})
 				
-				API.profitDetailsExcel({
+				API.profitDetailsExcelByPersonal({
 					stationId:this.stationObj.id,
-					yearMonth:this.queryTime,
-				
+					endDate:this.endTime,
+					startDate:this.info.startTime
 				}).then((resDown) => {
 						uni.hideLoading()
 					if(resDown.data){
@@ -559,12 +560,19 @@
 					title: "加载中",
 					mask: true,
 				})
+				
+				
+				
+				var obj={
+					stationId: this.stationObj.id,
+					accountType:this.userType,
+					endDate:this.endTime,
+				}
+				if(this.id){
+					obj.recordId=this.id
+				}
 				
-				API.queryWithdrawInfoByPersonal({
-					stationId: this.stationObj.id,
-				
-					accountType:this.userType,
-				}).then((res) => {
+				API.queryWithdrawInfoByPersonal(obj).then((res) => {
 					this.info = res.data.record;
 					this.info.endTime=this.endTime
 					this.info.stationName=this.stationObj.name
@@ -603,7 +611,8 @@
 				})
 				API.getWithdrawInfoByPersonal(this.id).then((res) => {
 					
-					this.info=res.data.record
+					this.info=res.data.record
+					this.endTime=this.info.endTime;
 					this.detailList=res.data.detailList
 					uni.hideLoading()
 				
@@ -673,9 +682,10 @@
 			bindPickerChange4(e) {
 				var nowTime=new Date(this.nowTime)
 				var result=new Date(e.result)
-				if(result<=nowTime){
-					this.endTime =result;
-					this.info.endTime= result;
+				if(result<=nowTime){
+					
+					this.endTime =e.result;
+					this.info.endTime= e.result;
 					this.queryWithdrawInfo()
 				}
 			

+ 3 - 2
pagesFinance/user/withdrawal/cashoutList.vue

@@ -11,7 +11,7 @@
 			v-for="(item ,index) in list" >
 				<view class="detailed-time"  v-if="item.show">
 					<p>{{showTime(item.showtime)}}</p>
-					<p>共提现 {{showMap.get(item.showtime).toFixed(2)}}元</p>
+					<p>共提现 {{showNumJP(showMap.get(item.showtime))}}元</p>
 				</view>
 				<view class="detailed-item"  @click="gotoItem(item)" >
 					<view class="detailed-item-name">
@@ -27,7 +27,7 @@
 						<p>{{item.stationName}}</p>
 					</view>
 					<view class="detailed-item-num">
-						<h2>{{item.applicationAmount?item.applicationAmount.toFixed(2):'0'}}元</h2>
+						<h2>{{item.applicationAmount?showNumJP(item.applicationAmount):'0'}}元</h2>
 						
 						<p>{{showTime2(item.createTime)}}</p>
 					</view>
@@ -90,6 +90,7 @@
 			}
 		},
 		methods: {
+			
 			myLoadmore() {
 			
 				

+ 2 - 1
pagesFinance/user/withdrawal/signReceipt.vue

@@ -27,7 +27,7 @@
 					<view class="name">人民币(大写)</view><view class="text">{{getDX(obj.chargingProfitAmount)}}</view>
 					</view>
 					<view class="right">
-						<view class="name">¥</view><view class="text">{{obj.chargingProfitAmount?obj.chargingProfitAmount.toFixed(2):0}}</view>
+						<view class="name">¥</view><view class="text">{{obj.chargingProfitAmount?showNumJP(obj.chargingProfitAmount):0}}</view>
 					</view>
 				</view>
 				<view class="">
@@ -136,6 +136,7 @@
 			console.log(this.nowTime)
 		},
 		methods: {
+			
 			showTime(name) {
 				if (!name) {
 					return ''