liwei2496 hace 2 años
padre
commit
053799d566

+ 99 - 73
pages/Workorder/Tenantbill/Tenantbill.vue

@@ -44,41 +44,41 @@
 			</t-tr>
 		</t-table> -->
 
-<view class="u-listdata">
-	
-	
-	<u-list  @scrolltolower="scrolltolower" :pagingEnabled='true'>
-		<u-list-item v-for="(item, index) in indexList" :key="index">
-			
-			<view class="companylist" @click="seedetail(item)">
-				<view class="settled" v-if="item.status==1">
-					已结清
-				</view>
-				<view class="outstanding" v-if="item.status==0">
-					未结清
-				</view>
-				<h3>{{item.name}}</h3>
-				<view class="Currentamount">
-					本期金额: <span>¥{{item.feeTotal}}</span>
-				</view>
-				<view class="Currentamount">
-					欠费天数: {{item.elecAmount}}
-				</view>
-				<view class="Currentamount">
-					账户余额:¥{{item.balance}}
-				</view>
-				<view class="Currentamount">
-					联系电话: {{item.tel}}
-				</view>
-				<view class="Callfee"  v-if="item.status==0"   @click.stop="handleClick(item.id)">
-					催费
-				</view>
-			</view>
-	
-		</u-list-item>
-	</u-list>
-	
-</view>
+		<view class="u-listdata">
+
+
+			<u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
+				<u-list-item v-for="(item, index) in indexList" :key="index">
+
+					<view class="companylist" @click="seedetail(item)">
+						<view class="settled" v-if="item.status==1">
+							已结清
+						</view>
+						<view class="outstanding" v-if="item.status==0">
+							未结清
+						</view>
+						<h3>{{item.name}}</h3>
+						<view class="Currentamount">
+							本期金额: <span>¥{{item.feeTotal}}</span>
+						</view>
+						<view class="Currentamount">
+							欠费天数: {{item.elecAmount}}
+						</view>
+						<view class="Currentamount">
+							账户余额:¥{{item.balance}}
+						</view>
+						<view class="Currentamount">
+							联系电话: {{item.tel}}
+						</view>
+						<view class="Callfee" v-if="item.status==0" @click.stop="handleClick(item.id)">
+							催费
+						</view>
+					</view>
+
+				</u-list-item>
+			</u-list>
+
+		</view>
 
 
 
@@ -141,7 +141,7 @@
 				showfloor: false,
 				loading: false,
 				columns: [],
-				pd:true,
+				pd: true,
 				columnData: [],
 				myday: '',
 				mytype: '全部',
@@ -188,45 +188,69 @@
 
 
 		methods: {
-			seedetail(e){
-				//  console.log('222',e)
+			seedetail(e) {
+				  console.log('222',e)
+let faltesdata={
+	name:e.name,
+	id:e.id,
+	cycle:e.cycle
+}
+  console.log('111111111111111111',faltesdata)
 				uni.navigateTo({
-					url: "/pages/Workorder/Tenantbill/companybill/companybill?para=" + encodeURIComponent(JSON.stringify(e))
-				})  
+					url: "/pages/Workorder/Tenantbill/companybill/companybill?para=" + encodeURIComponent(JSON.stringify(faltesdata))
+				})
 			},
-			handleClick(e){
-				  console.log('111111111111111111',e)
-				  
+			handleClick(e) {
+				console.log('111111111111111111', e)
+				this.$api.post('/expeditrecord/charge', {
+						data: e
+					})
+					.then(res => {
+						if (res.data.code == 0) {
+							uni.showToast({
+								title: '催费成功',
+								icon: 'none',
+								duration: 1500
+							})
+						} else {
+							uni.showToast({
+								title: res.data.msg,
+								icon: 'none',
+								duration: 1500
+							})
+						}
+
+					})
 			},
 			scrolltolower() {
-				if(this.pd){
+				if (this.pd) {
 					this.getalldata();
-				}else{
-					 return
+				} else {
+					return
 				}
 			},
-			
+
 			getalldata() {
-				
+
 				this.$api.get('/billinfo/paypage', this.dataForm)
 					.then(res => {
-						
+
 						if (res.data.data.list.length != 0) {
 							this.indexList.push(...res.data.data.list);
-								this.dataForm.page = this.dataForm.page + 1;
-								this.pd=true;
+							this.dataForm.page = this.dataForm.page + 1;
+							this.pd = true;
 						} else {
 							uni.showToast({
-								title:'暂无更多数据了',
+								title: '暂无更多数据了',
 								icon: 'none',
 								duration: 1500
 							})
-							this.pd=false;
-						}									
-								
+							this.pd = false;
+						}
+
 					})
 			},
-			
+
 			loadmore() {
 				// for (let i = 0; i < 30; i++) {
 				// 	this.indexList.push({
@@ -243,11 +267,11 @@
 				this.showtype = false;
 			},
 			confirmtype(e) {
-			//	console.log('111111111111111111', e.value[0])
+				//	console.log('111111111111111111', e.value[0])
 				this.showtype = false;
 				this.mytype = e.value[0].label;
 				this.dataForm.cycle = e.value[0].id;
-				this.dataForm.page=1;
+				this.dataForm.page = 1;
 				this.getalldata();
 			},
 			typechange() {
@@ -256,7 +280,7 @@
 			dateChange(e) {
 				this.myday = e.target.value;
 				this.dataForm.cycle = e.target.value;
-				this.dataForm.page=1;
+				this.dataForm.page = 1;
 				this.getalldata();
 			},
 			getDate(type) {
@@ -292,7 +316,7 @@
 							}
 							//  console.log('111111111111111111',allfloor)
 							this.columnData = allfloor;
-							this.dataForm.page=1;
+							this.dataForm.page = 1;
 							this.getalldata();
 						} else {
 							this.showdct = true
@@ -346,19 +370,21 @@
 			padding-left: 9rpx;
 		}
 	}
-.Callfee{
-	width: 100rpx;
-	height: 45rpx;
-	text-align: center;
-	line-height:45rpx;
-	color: #5C8FFF;
-	border: 1px solid #5C8FFF;
-	font-size: 22rpx;
-	position: absolute;
-	bottom: 10rpx;
-	right: 10px;
-	font-weight: bold;
-}
+
+	.Callfee {
+		width: 100rpx;
+		height: 45rpx;
+		text-align: center;
+		line-height: 45rpx;
+		color: #5C8FFF;
+		border: 1px solid #5C8FFF;
+		font-size: 22rpx;
+		position: absolute;
+		bottom: 10rpx;
+		right: 10px;
+		font-weight: bold;
+	}
+
 	.companylist {
 		margin: 20rpx 30rpx;
 		background: #fff;

+ 36 - 20
pages/Workorder/Tenantbill/companybill/companybill.vue

@@ -40,16 +40,16 @@
 						待支付
 					</view>
 					<view class="Currentamount">
-						物业费: <span>¥{{amount}}</span>
+						物业费: <span>¥{{zddata.amount}}</span>
 					</view>
 					<view class="Currentamount">
-						管理费:¥ {{glf}}
+						管理费:¥ {{zddata.glf}}
 					</view>
 					<view class="Currentamount">
-						中央空调使用费:¥ {{ktf}}
+						中央空调使用费:¥ {{zddata.ktf}}
 					</view>
 					<view class="Currentamount">
-						电梯费:¥ {{dtf}}
+						电梯费:¥ {{zddata.dtf}}
 					</view>
 				</view>
 			</view>			
@@ -71,24 +71,24 @@
 				<u-list  @scrolltolower="scrolltolower" :pagingEnabled='true'>
 					<u-list-item v-for="(item, index) in indexList" :key="index">
 						
-						<view class="companylist" @click="seedetail(item)">
+						<view class="companylist" >
 							<view class="settled" v-if="item.status==1">
 								预存
 							</view>
 							<h3>{{item.tenantInfo.name}}</h3>
-							<view class="Currentamount">
+							<view class="Currentamount1">
 								扣缴金额: <span>¥{{item.amount}}</span>
 							</view>
-							<view class="Currentamount">
+							<view class="Currentamount1">
 								账户余额: {{item.surplus}}
 							</view>
-							<view class="Currentamount">
+							<view class="Currentamount1">
 								租户电话:¥{{item.tenantInfo.tel}}
 							</view>
-							<view class="Currentamount">
+							<view class="Currentamount1">
 								操作人: {{item.creator}}
 							</view>
-							<view class="Currentamount">
+							<view class="Currentamount1">
 								扣缴时间: {{item.createDate}}
 							</view>
 						</view>
@@ -128,10 +128,12 @@
 				},
 				indexList: [],
 				payStatusList: [],
-				amount:'',
-				dtf:'',
-				ktf:'',
-				glf:'',
+				zddata:{
+					amount:'',
+					dtf:'',
+					ktf:'',
+					glf:'',
+				},
 				nodata:true,
 				pd:true,
 				columnstype: [],
@@ -149,8 +151,8 @@
 		onLoad: function(options) { //option为object类型,会序列化上个页面传递的参数
 			//	console.log(options); //打印出上个页面传递的参数。
 			this.fatherparameter = JSON.parse(decodeURIComponent(options.para));
-			//	console.log('userInfo', this.fatherparameter);
-
+			
+			
 			this.dataForm.tenantId = this.fatherparameter.id;
 			this.dataForm.costCycle = this.fatherparameter.cycle;
 			this.dataForm.page = 1;
@@ -273,12 +275,13 @@
 					//	console.log('222222', this.indexList)
 					if(res.data.data.length==0){
 						//  console.log('111111111111111111',)
+						this.zddata={};
 						  this.nodata=true;
 					}else{
-						this.amount=res.data.data[0].amount;
-						this.glf=res.data.data[0].billLists[0].amount;
-						this.ktf=res.data.data[0].billLists[1].amount;
-						this.dtf=res.data.data[0].billLists[2].amount;
+						this.zddata.amount=res.data.data[0].amount;
+						this.zddata.glf=res.data.data[0].billLists[0].amount;
+						this.zddata.ktf=res.data.data[0].billLists[1].amount;
+						this.zddata.dtf=res.data.data[0].billLists[2].amount;
 						 this.nodata=false;
 					}	
 					})
@@ -325,6 +328,18 @@
 		border-bottom-left-radius: 10rpx;
 	}
 	.Currentamount {
+		padding-left: 30rpx;
+		height: 50rpx;
+		line-height: 50rpx;
+		color: #BCB3A7;
+	
+		span {
+			color: #FA5555;
+			padding-left: 9rpx;
+		}
+	}
+	
+	.Currentamount1 {
 		padding-left: 30rpx;
 		height: 40rpx;
 		line-height: 40rpx;
@@ -335,6 +350,7 @@
 			padding-left: 9rpx;
 		}
 	}
+	
 	.records1{
 		background-color: #FA5555;
 		width: 100rpx;