ソースを参照

消息通知 ,账单推送,支付宝充值

zhengkaixin 1 年間 前
コミット
782e35da5f

+ 4 - 2
components/Tabbar.vue

@@ -52,7 +52,9 @@
 
 		},
 		methods: {
-			
+			setprefetchNum(c) {
+				this.tabbarList[1].count=c;
+			},
 			setcount(c) {
 				this.myCurrent = c
 			},
@@ -79,7 +81,7 @@
 		},
 		
 		mounted() {
-			//this.tabbarList[1].count=this.prefetchNum;
+			
 		},
 		destroyed() {
 

+ 1 - 1
config/.env.dev.js

@@ -14,7 +14,7 @@ const UNI_APP = {
 	//openId:"oLowyuNkSxqovYoobKbeHB1nSkm0",//测试人员 开发环境
 	openId:"oLowyuAJ1Ld0ivnLj4qp1k5Vy_l4", //王晓春
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
-	//openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
+	openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
 	//openId:"oLowyuHCGgMomNBQEXZSbb5SJxfQ",//ys
 	//openId:"oLowyuB1PliW0qAnJJ56axydeUOM",
 	//appid

+ 54 - 18
pages/deductionRecord/billPush.vue

@@ -36,14 +36,18 @@
 							¥{{detail.billAmount}}元
 						</view>
 					</view>
-					<view class="item">
+					
+				<!-- 	<view class="item" v->
 						<view class="item-title">
-							账单备注
+							账户余额
 						</view>
-						<view class="item-value">
-							{{detail.remark}}
+						<view class="item-value " :class="{
+							'billAmount':personInfo.balance<0,
+							'billAmount1':personInfo.balance>0
+						}">
+							¥{{personInfo.balance}}元
 						</view>
-					</view>
+					</view> -->
 					<!-- <view class="item"  v-if="detail.accountInfo&&detail.accountInfo.bankName" >
 						<view class="item-title">
 							开户名称
@@ -81,15 +85,22 @@
 				</view>
 				<view class="details-title">
 					<span class="name">账单明细</span>
-					<span class="remark">请在收到账单5日内缴纳如下费用</span>
+					
 					
 				</view>
 				<view class="details-list" v-for="(item,i) in detail.itemList" :key="i">
 					<view class="item-list">
 						<view class="item-title">
 							<view class="item-title-name">{{item.contractItemName}}
-							<span class="item-title-remark" v-if="item.num&&item.unit=='月'">({{item.num}}个{{item.unit}})</span></view>
+							
+							<span class="item-title-remark" v-if="item.num&&item.unit=='月'">({{item.num}}个{{item.unit}})</span>
+							<span class="item-title-remark" v-if="item.remark">({{item.remark}})</span>
+							</view>
+							
+							
 							<view class="item-title-span">收费标准:{{item.price}}元{{item.unit?'/'+item.unit:''}}</view>
+							
+							
 						</view>
 						<view class="item-value">
 							{{item.total}}元
@@ -98,15 +109,31 @@
 					<view class="item-remark" v-if="item.timeRanges&&item.timeRanges.length==2&&item.timeRanges[0]&&item.timeRanges[1]">
 						起止日期{{item.timeRanges[0]}}至{{item.timeRanges[1]}}
 					</view>
-					<view class="item-remark" v-if="item.remark">
+					<!-- <view class="item-remark" v-if="item.remark">
 						备注:{{item.remark}}
+					</view> -->
+				</view>
+				
+				
+			</view>
+		
+			<view class="details " v-if="detail.remark">
+				<view class="item">
+					<view class="item-title">
+						账单备注
+					</view>
+					<view class="item-value">
+						{{detail.remark}}
 					</view>
 				</view>
+			</view>
+			<view class="details-title">
 				
+				<span class="remark">请在收到账单5日内缴纳如下费用</span>
 				
 			</view>
 			<!--  -->
-			<view  class="main" v-if="!detail.payTime&&detail.payStatus==1" >
+			<view  class="main" v-if="!detail.payTime" >
 				
 				<!-- 缴费金额 -->
 						<view class="payment-amount" v-show="detail.billAmount<=5000">
@@ -126,7 +153,7 @@
 						<!-- 支付方式 -->
 						<view class="payment-way">
 							<view class="title">
-								支付方式
+								支付方式  <span style="float: right;font-size: 32rpx;    color: #8b898c;">支付成功后等待财务确认</span>
 							</view>
 							<view class="way">
 								<radio-group  @change="radioChange">
@@ -166,7 +193,7 @@
 									</view>
 								</view>
 				
-								<view class="way-item"  v-if="companyInfo.paymentMethod.indexOf('3')>-1"  >
+								<view class="way-item"   >
 									<view class="way-name">
 										<view class="icon">
 											<image   class="img3"
@@ -239,9 +266,9 @@
 						<!-- 按钮 -->
 						<button class="btn" @click="submit">{{submitType==2?'查看对公转账信息':'立即支付'}}</button>
 				
-				
-				<u-modal v-model="showModel" :show-cancel-button="true" @cancel="getUserInfo()" @confirm="confirm"
-					confirm-text="支付成功?" title="扫码支付">
+				<img id="qrcode" style="display: none;">
+						<u-modal v-model="showModel" :show-cancel-button="true"  @confirm="homePage"
+							confirm-text="刷新余额" title="扫码支付">
 					<view style="
 										text-align: center;
 									">
@@ -262,11 +289,14 @@
 			<view class="cashier-btn-amount">合计
 				<span  class="cashier-btn-span">¥{{detail.billAmount}}元</span>
 			</view>
-			<view class="cashier-btn-go" @click="submit" v-if="!detail.payTime&&detail.payStatus==1" >{{submitType==2?'对公转账':'立即支付'}}</view>
+			<view class="cashier-btn-go" @click="submit" v-if="!detail.payTime" >{{submitType==2?'对公转账':'立即支付'}}</view>
 			 
-			 <view class="cashier-btn-go1"  
+			<!-- <view class="cashier-btn-go1"  
 			   v-if="!detail.payTime&&detail.payStatus==0"
-			   >线下支付</view>
+			   >线下支付</view> -->
+			   <view class="cashier-btn-go1"
+			     v-if="detail.payTime"
+			     >已支付</view>
 		</view>
 		
 		
@@ -614,6 +644,10 @@
 			 font-size: 44rpx;
 			 color: red;
 		}
+		.billAmount1{
+			 font-size: 44rpx;
+			 color: #2196f3;
+		}
 		.item{
 			display: flex;
 			 justify-content: space-between;
@@ -757,7 +791,9 @@
  							display: flex;
  							align-items: center;
  							color: rgb(51, 51, 51);
-                             
+                             .text{
+								 font-size: 36rpx;
+							 }
  							.img {
  								width: 48rpx;
  								height: 48rpx;

+ 9 - 5
pages/index/index.vue

@@ -56,21 +56,21 @@
 						<view class="grid-text">计费规则
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=AA')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=AA&typeName=账单提醒')">
 						<view class="icon icon3">
 							<image class="img" src="@/assets/img/antFill-account-book.svg" mode=""></image>
 						</view>
 						<view class="grid-text">账单提醒
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=3')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=3&typeName=断电提醒')">
 						<view class="icon icon9">
 							<image class="img" src="@/assets/img/fas fa-exclamation-triangle.svg" mode=""></image>
 						</view>
 						<view class="grid-text">断电提醒
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=5')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=5&typeName=停电通知')">
 						<view class="icon icon5">
 							<image class="img" src="@/assets/img/antFill-notification.svg" mode=""></image>
 						</view>
@@ -78,7 +78,7 @@
 
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=4')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=4?type=5&typeName=故障警报')">
 						<view class="icon icon6">
 							<image class="img" src="@/assets/img/fas fa-exclamation-triangle.svg" mode=""></image>
 						</view>
@@ -126,7 +126,7 @@
 		 @click="openModalBl=true"
 		 color="#777777">荆鹏电管家 服务热线 <text
 				class="tel">400-8899-619</text></u-divider>
-		<Tabbar :current="0"  :prefetchNum="prefetchNum" ></Tabbar>
+		<Tabbar :current="0" ref="tabbarMain"  :prefetchNum="prefetchNum" ></Tabbar>
 	</view>
 
 </template>
@@ -161,6 +161,10 @@
 					
 				}).then((response) => {
 					//this.prefetchNum=response.data
+					if (this.$refs.tabbarMain) {
+						this.$refs.tabbarMain.setprefetchNum(response.data);
+					}
+					
 				}).catch(error => {
 					//uni.hideLoading();
 					

+ 16 - 8
pages/message/message.vue

@@ -31,9 +31,11 @@
 		<view class="message-list"  v-if="messageList.length"  >
 			<view class="message-item"  v-for="(item,i) in messageList"  :key="i"
 			v-show="item.message"
-			  @click="gotoUrl('/pages/message/messageList?type='+item.typeId)" >
-				<view class="icon">
-					<image class="img" src="@/assets/img/antFill-notification.svg" mode=""></image>
+			  @click="gotoUrl('/pages/message/messageList?type='+item.typeId+'&typeName='+item.typeName)" >
+				<view class="icon" :class="'icon'+item.typeId">
+					<image class="img" v-if="item.iconUrl" :src="item.iconUrl" mode=""></image>
+					
+					<image class="img" v-else src="@/assets/img/antFill-notification.svg" mode=""></image>
 				<view class="dot" v-if="item.unReadtNum">
 					
 				</view>
@@ -47,8 +49,8 @@
 							{{item.message.createTime}}
 						</view>
 					</view>
-					<view class="value" v-if="item.message">
-						{{item.message.content}}
+					<view class="value" v-if="item.message" v-html="item.message.content">
+						 
 					</view>
 				</view>
 			</view>
@@ -154,7 +156,7 @@
 		</view>
 		<u-divider :isnone="list.length==0&&messageList.length==0"  nonetext="没有找到相关内容"
 			border-color="#CFD2D5">已经到底了</u-divider>
-		<Tabbar :current="1"  :prefetchNum="prefetchNum" ></Tabbar>
+		<Tabbar :current="1"  ref="tabbarMain"   :prefetchNum="prefetchNum" ></Tabbar>
 	</view>
 </template>
 
@@ -174,9 +176,12 @@
 			}
 		},
 		onLoad() {
+		
+			
+		},
+		onShow() {
 			this.getBillList()
 			this.prefetch()
-			
 		},
 		methods: {
 			prefetch(){
@@ -184,6 +189,9 @@
 					
 				}).then((response) => {
 					//this.prefetchNum=response.data
+					if (this.$refs.tabbarMain) {
+						this.$refs.tabbarMain.setprefetchNum(response.data);
+					}
 					this.getMessageTypeList()
 				}).catch(error => {
 					//uni.hideLoading();
@@ -195,7 +203,7 @@
 					this.gotoUrl('/pages/deductionRecord/billPush?site=1&id='+this.list[0].id)
 					
 				}else{
-					this.gotoUrl('/pages/message/messageList?type=1')
+					this.gotoUrl('/pages/message/messageList?type=AA&typeName=账单提醒')
 				}
 			},
 			getMessageTypeList(){

+ 12 - 8
pages/message/messageList.vue

@@ -11,8 +11,11 @@
 					<view>{{item.name}}</view>
 					<view class="billAmount">¥{{item.billAmount}}元</view>
 				</view>
-				<view class="item-time">
-					{{item.createTime}}  <!-- {{item.tenantName}} -->
+				<view class="item-time" style="display: flex;justify-content: space-between;">
+					  <!-- {{item.tenantName}} -->
+					
+					<view>{{item.createTime}}</view>
+					<view >{{item.payTime?'已支付':''}}</view>
 				</view>
 			</view>
 			<u-divider :isnone="list.length==0"   nonetext="没有找到相关内容"
@@ -45,6 +48,7 @@
 					pageIndex:1,
 					pageSize:20,
 				},
+				typeName:"",
 				list:[],
 				recordsTotal:0
 			}
@@ -53,12 +57,8 @@
 			title(){
 				if(this.type=='AA'){
 					return  '账单提醒'
-				}else if(this.type==5){
-					return  '停电通知'
-				}else if(this.type==4){
-					return  '故障警报'
-				}else if(this.type==3){
-					return  '断电通知'
+				}else if(this.typeName){
+					return  this.typeName
 				}else{
 					return  '消息提醒'
 				}
@@ -69,6 +69,10 @@
 				this.type=op.type;
 				this.formData.type=op.type;
 			}
+			if(op.typeName){
+				this.typeName=op.typeName;
+				
+			}
 			
 			this.getList()
 		},

+ 28 - 4
pages/mine/mine.vue

@@ -135,13 +135,14 @@
 			
 		</view>
 		
-		<Tabbar :current="2" :prefetchNum="prefetchNum" ></Tabbar>
+		<Tabbar :current="2"  ref="tabbarMain"  :prefetchNum="prefetchNum" ></Tabbar>
 	</view>
 </template>
 
 <script>
 	import * as API from '@/apis/pagejs/index.js'
 	import * as API_user from '@/apis/pagejs/user.js'
+	import * as API_deduction from '@/apis/pagejs/deduction.js'
 	
 	import * as API_message from '@/apis/pagejs/message.js'
 	
@@ -160,23 +161,44 @@
 				prefetchNum:0,
 				personInfo:{
 					
-				}
+				},
+				contractList:[]
 			}
 		},
 		onLoad() {
 			this.personInfo=this.carhelp.getPersonInfo()
-			this.homePage()
+			//this.homePage()
 			
 			this.userList=this.carhelp.getPersonInfoPlus().userList
-			this.prefetch()
+			//this.prefetch()
 			//this.personalCenter()
+			this.getContractList()
+		},
+		onShow() {
+			this.query()
 		},
 		methods: {
+			getContractList() {
+			
+				API_deduction.contractList({
+					pageIndex: 1,
+					pageSize: 9999
+				}).then((response) => {
+					uni.hideLoading();
+					this.contractList = response.data.data;
+				}).catch(error => {
+					uni.hideLoading();
+			
+				})
+			},
 			prefetch(){
 				API_message.prefetch({
 					
 				}).then((response) => {
 					//this.prefetchNum=response.data
+					if (this.$refs.tabbarMain) {
+						this.$refs.tabbarMain.setprefetchNum(response.data);
+					}
 				}).catch(error => {
 					//uni.hideLoading();
 					
@@ -263,6 +285,8 @@
 					mask: true,
 				})
 				
+			
+				
 				API.homePage({
 					
 				}).then((response) => {

+ 8 - 5
pages/recharge/accountRecharge.vue

@@ -80,7 +80,7 @@
 					</view>
 					<view class="item">
 						<view class="item-title">
-							业
+							业方
 						</view>
 
 						<view class="item-value">
@@ -227,12 +227,13 @@
 				<button class="btn" @click="submit">{{submitType==2?'查看对公转账信息':'立即支付'}}</button>
 			</view>
 		</view>
-
-		<u-modal v-model="showModel" :show-cancel-button="true" @cancel="getUserInfo()" @confirm="confirm"
-			confirm-text="支付成功?" title="扫码支付">
+<img id="qrcode" style="display: none;">
+		<u-modal v-model="showModel" :show-cancel-button="true"  @confirm="homePage"
+			confirm-text="刷新余额" title="扫码支付">
 			<view style="
 								text-align: center;
 							">
+								
 				<img id="qrcode2" :src="qrCodeImg">
 			</view>
 			<view style="
@@ -652,7 +653,9 @@ border-bottom: 1px solid rgba(242,242,242,1);
 							display: flex;
 							align-items: center;
 							color: rgb(51, 51, 51);
-                            
+                            .text{
+                            	 font-size: 36rpx;
+                            }
 							.img {
 								width: 48rpx;
 								height: 48rpx;

+ 1 - 1
uni_modules/uview-ui/components/u-divider/u-divider.vue

@@ -101,7 +101,7 @@ export default {
 		// 上边距
 		marginTop: {
 			type: [String, Number],
-			default: 0
+			default: 20
 		},
 		// 下边距
 		marginBottom: {