chenyue 6 rokov pred
rodič
commit
1e77f7871f

+ 26 - 0
html/payment/css/payment.css

@ -22,6 +22,10 @@
	padding-left: 30px;
	padding-right: 30px;	
}
.ptb3{
	padding-top: 3px;
	padding-bottom: 3px;
}
.p30{
	padding: 30px;
}
@ -168,6 +172,28 @@
    border-bottom: 0px solid #dbdbdb;
}
.c-lab-mor li{
	border-bottom: 0px;
	padding-top: 5px;
	padding-bottom: 5px;
}
.c-lab-mor li.curr{
	color: #4DCD70;
}
.c-lab-mor li.curr:after {
    content: '';
    display: block;
    width: 25%;
    height: .15rem;
    background: #4DCD70;
    margin: 9px auto;
}
.c-lab-mor li:first-child {
   /*border-right: 1px solid #E1E1E1;*/
}
/*缴费查询*/
/*就诊卡缴费*/

+ 26 - 17
html/payment/html/paymentList.html

@ -14,6 +14,7 @@
		<link rel="shortcut icon" href="../../../favicon.ico">
		<link rel="stylesheet" type="text/css" href="../../../css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
		<link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
		<link rel="stylesheet" type="text/css" href="../../../css/mobiscroll.css" />
		<link rel="stylesheet" href="../css/payment.css" />		
@ -26,29 +27,37 @@
				<span v-if="cardlenght>1" class="qiehuan-txt" @click="changeCards">切换</span>
				<img src="../images/rili_icon.png" class="date-icon"/>			
			</div>
			<div id="wrapper" class="mui-scroll-wrapper" style="top: 50px;">
			<div class="c-mor-hold c-border-tb">
		        <ul class="c-lab-mor c-f15">
		            <li :class="{curr:queryList.chargeType==1}" @click="queryList.chargeType=1;getList(1)">门诊缴费</li>
		            <li :class="{curr:queryList.chargeType==2}" @click="queryList.chargeType=2;getList(1)">住院缴费</li>
		        </ul>
		    </div>
			<div id="wrapper" class="mui-scroll-wrapper" style="top: 90px;">
				<div class="mui-scroll">
					<ul class="plr15 pb15" v-if="length!=0">
						<li  v-for="(item,i) in dataList" v-key="i" class="labelIcon" :class="payTypeList[item.payType]?payTypeList[item.payType].type:''"  @tap="gotoResult(item.seqNo)">
							<div>
								<img :src="payTypeList[item.payType]?payTypeList[item.payType].Img:''" width="24" height="24"/>
								<span class="c-f14 pl10" style="position: relative;top: -2px;">{{payTypeList[item.payType]?payTypeList[item.payType].text:''}}</span>
							</div>	
							<div class="mt5">
								<span class="c-f20">¥&nbsp;{{item.payAmount}} 元</span>
								<span class="c-f14 mt5" style="float: right;">{{healthType[item.healthType]}}-{{item.patientName}}</span>
							</div>	
							<div class="mt5 c-f12">
								<span>{{item.hospitalName}}</span>
								<span style="float: right;">{{item.payTimeStart}}</span>
							</div>
							<div v-if="item.hyStatus!=1" class="mask">正在同步至医院... ...</div>
						</li>					
						<template  v-for="(item,i) in dataList" v-key="i">
							<li  class="labelIcon" :class="payTypeList[item.payType]?payTypeList[item.payType].type:''" :data-id="i" @tap="gotoResult(i)">
								<div>
									<img :src="payTypeList[item.payType]?payTypeList[item.payType].Img:''" width="24" height="24"/>
									<span class="c-f14 pl10" style="position: relative;top: -2px;">{{payTypeList[item.payType]?payTypeList[item.payType].text:''}}</span>
								</div>	
								<div class="mt5">
									<span class="c-f20">¥&nbsp;{{item.payAmount}} 元</span>
									<span class="c-f14 mt5" style="float: right;">{{healthType[item.healthType]}}-{{item.patientName}}</span>
								</div>	
								<div class="mt5 c-f12">
									<span>{{item.hospitalName}}</span>
									<span style="float: right;">{{item.createDate}}</span>
								</div>
								<div v-if="item.hyStatus!=1" class="mask">正在同步至医院... ...</div>
							</li>							
						</template>					
					</ul>					
					<div class="default-div" v-else>
						<img src="../images/wushuju.png" width="222"/>
						<div class="c-999 c-f14 pt30">
							暂无该就诊卡缴费记录
							暂无该就诊卡{{healthType[queryList.chargeType]}}记录
						</div>
					</div>
				</div>

+ 1 - 1
html/payment/html/paymentResult.html

@ -50,7 +50,7 @@
					</li>
					<li class="ptb13">
						<div class="c-list-info">充值时间</div>
			            <div class="c-list-key c-999">{{data.payTimeStart}}</div>					
			            <div class="c-list-key c-999">{{data.createDate}}</div>					
					</li>
					<li class="ptb13">
						<div class="c-list-info">充值流水号</div>

+ 6 - 2
html/payment/js/payment.js

@ -149,8 +149,12 @@ var loading = dialog({
				var myreg=/^[0][0-9]{1}$/; 
				if(myreg.test(payMoney)){
					payMoney="0"
				}
		        this.payMoney= (payMoney.match(/^\d*(\.?\d{0,2})/g)[0]) || null                  
				}			
		        this.payMoney= (payMoney.match(/^\d*(\.?\d{0,2})/g)[0]) || null
		        if(this.payMoney>50000){
		        	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:"微信支付金额不得超过50000"}).show();
		        	this.payMoney=50000
		        }
		    },
			//判断是否验证登录通过
			checkType:function(){

+ 53 - 26
html/payment/js/paymentList.js

@ -17,12 +17,11 @@ var iscrollState='';//判断滑动方向
			    contentrefresh : "正在刷新...",
			    callback: function(){		    		
			    	iscrollState='down'
			    	myVue.getList()
			    	myVue.isdown()
				}
		    },
		    up : {
			    height:50,
		    	height:50,
			    contentinit: '',
				contentdown: '',
			    contentrefresh : "正在加载...",
@ -45,11 +44,15 @@ var iscrollState='';//判断滑动方向
			id:"",
			queryList:{
				month:"",
				healthNo:""
				healthNo:"",
				chargeType:"1",   //1:门诊,2:住院,
				pageNo:1,
				pageSize:10,
			},
			code:"",
			payTypeList:[{},{type:"weixin",Img:"../images/weixinzhifu_icon.png",text:"微信支付"},{type:"xianjin",Img:"../images/xianjichongzhi_icon.png",text:"现金支付"},{type:"yinlian",Img:"../images/yinlianzhifu_icon.png",text:"银联支付"},{type:"zhifubao",Img:"../images/zhifubaozhifu_icon.png",text:"支付宝支付"}],
			healthType:["","就诊卡缴费","住院缴费"],
			healthType:["","门诊缴费","住院缴费"],
			isUPsuccess:true,   //上拉锁,搜索成功则释放   
		},
		mounted: function() {
			var vm = this
@ -79,12 +82,12 @@ var iscrollState='';//判断滑动方向
				        		vm.data=res.data.filter(function(item){
				        			return item.isDefault==1
				        		})[0]
				        		if(!vm.data){
				        			vm.data=res.data[0]
				        		}
							}
							if(!vm.data){
			        			vm.data=res.data[0]
			        		}
			        		vm.queryList.healthNo=vm.data.cardNo
			        		vm.getList()
			        		vm.getList(1)
			        	}else{
			        		dialog({
					            content: "请先绑定就诊卡,再查看就诊缴费信息!", 
@ -103,24 +106,47 @@ var iscrollState='';//判断滑动方向
			    })
			},
			//获取列表数据
			getList:function(){
			getList:function(pageNo){
				var vm=this
				 sendPost("third/hy/pay/gerPayOrderList", vm.queryList, "json", "get",function(){
				if(pageNo){
					vm.queryList.pageNo=pageNo
					vm.dataList=[]
				}
				sendPost("third/hy/pay/gerPayOrderList", vm.queryList, "json", "get",function(){
			   		loading.close();
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
			      }, function(res){
			   		loading.close();
			        if(res.status == 200){ 
			        	vm.dataList=res.data
			        	vm.length=vm.dataList.length
			   		loading.close();			   		
					if(vm.queryList.pageNo==1){
						vm.length=0
					}
			        if(res.status == 200){	
			        	vm.isUPsuccess=true
			        	vm.dataList.push.apply(vm.dataList,res.data)
			        	vm.length+=vm.dataList.length
			        	if(iscrollState=="down"){
			        		mui('#wrapper').pullRefresh().endPulldownToRefresh(false);
							mui('#wrapper').pullRefresh().enablePullupToRefresh();//重置
			        	}else{
			        		if(res.data.length<vm.queryList.pageSize){
			        			mui('#wrapper').pullRefresh().enablePullupToRefresh(true);
			        		}else{
			        			mui('#wrapper').pullRefresh().enablePullupToRefresh(false);
			        		}
			        	}
			        }else{
			          dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
			            dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();			          
		        		mui('#wrapper').pullRefresh().endPulldownToRefresh(false);
						mui('#wrapper').pullRefresh().enablePullupToRefresh();//重置
			        }
			    })
			},
			//跳转到订单结果页
			gotoResult:function(seqNo){
				window.location.href='../../payment/html/paymentResult.html?seqNo='+seqNo;
			gotoResult:function(index){
				var vm=this
//				console.log($($(index)[0].currentTarget).attr("data-id"))
				var item=vm.dataList[index]
				window.location.href='../../payment/html/paymentResult.html?healthType='+item.healthType+"&patientName="+item.patientName+"&healthNo="+item.healthNo+"&payAmount="+item.payAmount+"&seqNo="+item.seqNo+"&createDate="+item.createDate;
			},
			//跳转切换就诊卡
			changeCards:function(){
@ -140,7 +166,7 @@ var iscrollState='';//判断滑动方向
			        onSelect: function(valueText, inst){
						if(vm.queryList.month!=valueText){
							vm.queryList.month=valueText	
							vm.getList()							
							vm.getList(1)							
						}
					},
	           });
@ -159,16 +185,17 @@ var iscrollState='';//判断滑动方向
					}
				},10);
			},
			isdown:function(){
//				setTimeout(function(){
					mui('#wrapper').pullRefresh().endPulldownToRefresh(false);
					mui('#wrapper').pullRefresh().enablePullupToRefresh();//重置
//				},1000)
			isdown:function(){	
				alert(12)			
			    this.getList(1)
			},
			isup:function(){
//				setTimeout(function(){
					mui('#wrapper').pullRefresh().endPullupToRefresh(true);//true表示没有更多数据了
//				},1000)
				alert(13)
				if(this.isUPsuccess){
					this.queryList.pageNo++
					this.isUPsuccess=false
				}				
				this.getList()
			},
		},
	})

+ 43 - 11
html/payment/js/paymentResult.js

@ -22,10 +22,17 @@ var loading = dialog({
				Img:"../images/jiaofeishibai_icon.png",	
				txt:"缴费失败",				
			},
			healthType:["","就诊卡缴费充值","住院缴费充值"],
			initdata:{seqNo:"","patientName":"","healthNo":"","healthType":1,"payAmount":"","payTimeStart":"",},
			healthType:["","门诊缴费充值","住院缴费充值"],
			initdata:{seqNo:"","patientName":"","healthNo":"","healthType":1,"payAmount":"","createDate":"",},
			data:{},
			frompay:false,
			frompay:false,			
			queryList:{
				month:"",
				healthNo:"",
				chargeType:"1",   //1:门诊,2:住院,
				pageNo:1,
				pageSize:1,
			},
		},
		mounted: function() {
			var vm = this
@ -35,26 +42,45 @@ var loading = dialog({
		methods: {
			//获取数据
			getData:function(){
				var vm=this
				if(!Request.healthNo){
					vm.gerPayOrder()   //从缴费列表进入
				}else{
					vm.gerPayOrderList()  //从支付进入
				}
			},
			//从支付进入
			gerPayOrder:function(){
				var vm=this
				loading.showModal();
				 sendPost("third/hy/pay/gerPayOrder", {seqNo:Request.seqNo}, "json", "get",function(){
				sendPost("third/hy/pay/gerPayOrder", {seqNo:Request.seqNo}, "json", "get",function(){
				 	loading.close();
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
			       }, function(res){
				 	loading.close();
			        if(res.status == 200){
			        if(res.status == 200){    		
			        	vm.data=res.data
			        	if(!vm.data){vm.data=vm.initdata}
			        	if(vm.data.payStatus==1){   //充值状态,0未完成,1已完成,2失败
			        		vm.result=vm.successResult
			        	}else{
			        		vm.result=vm.failureResult
			        	}
		        	    vm.filterData()
			        }else{
			          dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
			        }
			    })
			},
			//从缴费列表进入
			gerPayOrderList:function(){
				var vm=this
				vm.data={seqNo:Request.seqNo,"patientName":getQueryString('patientName'),"healthNo":Request.healthNo,"healthType":Request.healthType,"payAmount":Request.payAmount,"createDate":Request.createDate}
				vm.result=vm.successResult
			},
			filterData:function(){				
				var vm=this
				if(!vm.data){vm.data=vm.initdata}
	        	if(vm.data.payStatus==1){   //充值状态,0未完成,1已完成,2失败
	        		vm.result=vm.successResult
	        	}else{
	        		vm.result=vm.failureResult
	        	}
			},
			//
			backClick:function(){
				window.history.back();
@ -77,4 +103,10 @@ var loading = dialog({
function queryInit(){
	checktype=true
}
function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");   
      var r = window.location.search.substr(1).match(reg);   
      if (r != null) return decodeURI(r[2]); return null;   
}