Kaynağa Gözat

Merge branch 'master' of http://192.168.1.220:10080/Amoy2/sr-iHealthwx

lulihong 6 yıl önce
ebeveyn
işleme
cb58399883

+ 12 - 56
html/payment/html/paymentList.html

@ -20,77 +20,33 @@
	<body class="bgc-f2f3f4">
		<div id="app" v-cloak>
			<div class="bgc-fff c-f17 plr15 ptb10" >
				<span class="c-333">DC1326898&nbsp;(张峰)&nbsp;</span>
				<span class="c-333">{{data.cardNo}}&nbsp;({{data.name}})&nbsp;</span>
				<span class="qiehuan-txt" @click="changeCards">切换</span>
				<span><img src="../images/rili_icon.png" class="date-icon"/></span>				
			</div>			
			<ul class="plr15 pb15"  v-show="length!=0">		
				<li class="labelIcon weixin">
			<ul class="plr15 pb15"  v-if="length!=0">
				<li class="labelIcon" :class="payTypeList[item.payType]?payTypeList[item.payType].type:''"  v-for="(item,i) in dataList" v-key="i"  @click="gotoResult(item.seqNo)">
					<div>
						<img src="../images/weixinzhifu_icon.png" width="24" height="24"/>
						<span class="c-f14 pl10" style="position: relative;top: -2px;">微信支付</span>
						<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;100.86 元</span>
						<span class="c-f14 mt5" style="float: right;">就诊卡缴费-张峰</span>
						<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>上饶县人民医院</span>
						<span style="float: right;">2018-09-19 13:30</span>
						<span>{{item.hospitalName}}</span>
						<span style="float: right;">{{item.payTimeStart}}</span>
					</div>	
				</li>		
				<li class="labelIcon yinlian">
					<div>
						<img src="../images/yinlianzhifu_icon.png" width="24" height="24"/>
						<span class="c-f14 pl10" style="position: relative;top: -2px;">银联支付</span>
					</div>	
					<div class="mt5">
						<span class="c-f20">¥&nbsp;100.86 元</span>
						<span class="c-f14 mt5" style="float: right;">就诊卡缴费-张峰</span>
					</div>	
					<div class="mt5 c-f12">
						<span>上饶县人民医院</span>
						<span style="float: right;">2018-09-19 13:30</span>
					</div>	
				</li>		
				<li class="labelIcon xianjin">
					<div>
						<img src="../images/xianjichongzhi_icon.png" width="24" height="24"/>
						<span class="c-f14 pl10" style="position: relative;top: -2px;">现金支付</span>
					</div>	
					<div class="mt5">
						<span class="c-f20">¥&nbsp;100.86 元</span>
						<span class="c-f14 mt5" style="float: right;">就诊卡缴费-张峰</span>
					</div>	
					<div class="mt5 c-f12">
						<span>上饶县人民医院</span>
						<span style="float: right;">2018-09-19 13:30</span>
					</div>	
				</li>		
				<li class="labelIcon zhifubao">
					<div>
						<img src="../images/zhifubaozhifu_icon.png" width="24" height="24"/>
						<span class="c-f14 pl10" style="position: relative;top: -2px;">支付宝支付</span>
					</div>	
					<div class="mt5">
						<span class="c-f20">¥&nbsp;100.86 元</span>
						<span class="c-f14 mt5" style="float: right;">就诊卡缴费-张峰</span>
					</div>	
					<div class="mt5 c-f12">
						<span>上饶县人民医院</span>
						<span style="float: right;">2018-09-19 13:30</span>
					</div>	
				</li>
				</li>	
			</ul>
			<div class="default-div" v-show="length==0">
			<div class="default-div" v-else>
				<img src="../images/wushuju.png" width="222"/>
				<div class="c-999 c-f14 pt30">
					暂无该就诊卡缴费记录
				</div>
			</div>
			<div class="circle-btn" @click="gotoCards">
				 <div style="margin-top: 1px;">我的<br/>就诊卡</div>
			</div>
			<a href="javascript:;" class="circle-btn"  @click="gotoCards"><span style="margin-top: 1px;">我的<br/>就诊卡</span></a>
		</div>
		<script src="../../../js/post.js"></script>

+ 12 - 6
html/payment/html/paymentResult.html

@ -13,6 +13,7 @@
		<link rel="shortcut icon" href="../../../favicon.ico">
		<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" href="../css/payment.css" />		
	</head>
@ -26,35 +27,40 @@
				</div>
			</div>
			<div class="p30 failure-btn">
				<button type="button" class="c-btn-4dcd70 c-btn-arc c-btn-full  c-btn-big" style="height: 45px;">返回</button>
				<button type="button" class="c-btn-4dcd70 c-btn-arc c-btn-full  c-btn-big" style="height: 45px;" @click="backClick">返回</button>
			</div>
			<div class="mt10 success-list">				
				<ul class="c-list  c-border-b">
					<li class="ptb13">
						<div class="c-list-info">缴费说明</div>
			            <div class="c-list-key c-999">就诊卡缴费充值</div>					
			            <div class="c-list-key c-999">{{healthType[data.healthType]}}</div>					
					</li>
					<li class="ptb13">
						<div class="c-list-info">就诊人</div>
			            <div class="c-list-key c-999">张三</div>					
			            <div class="c-list-key c-999">{{data.patientName}}</div>					
					</li>
					<li class="ptb13">
						<div class="c-list-info">就诊卡号</div>
			            <div class="c-list-key c-999">D123132135</div>					
			            <div class="c-list-key c-999">{{data.healthNo}}</div>					
					</li>
					<li class="ptb13">
						<div class="c-list-info">充值金额</div>
			            <div class="c-list-key c-999">¥&nbsp;{{data.payAmount}} 元</div>					
					</li>
					<li class="ptb13">
						<div class="c-list-info">充值时间</div>
			            <div class="c-list-key c-999">2018-12-30 20:00</div>					
			            <div class="c-list-key c-999">{{data.payTimeStart}}</div>					
					</li>
					<li class="ptb13">
						<div class="c-list-info">充值流水号</div>
			            <div class="c-list-key c-999">20181230230232</div>					
			            <div class="c-list-key c-999">{{data.seqNo}}</div>					
					</li>
				</ul>
			</div>
		</div>
		<script src="../../../js/post.js"></script>
		<script src="../../../widget/artDialog/6.0.5/js/dialog-plus.js"></script>
		<script src="../js/paymentResult.js"></script>
	</body>

+ 3 - 3
html/payment/js/bindingCard.js

@ -28,7 +28,7 @@ var checktype=false;
						skin: 'bk-popup',
						content:'校验中...'
					});
					loading.show();
					loading.showModal();
					sendPost("patient/card/validByCard", {cardNo:vm.cardNo}, "json", "get",function(){
					 	loading.close();
				    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
@ -60,7 +60,7 @@ var checktype=false;
					skin: 'bk-popup',
					content:'绑定中...'
				});
				loading.show();
				loading.showModal();
				sendPost("patient/card/bindCard", {cardNo:vm.cardNo,patient:vm.code}, "json", "post",function(){
				 	loading.close();
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
@ -101,7 +101,7 @@ var checktype=false;
			back:function(){
				setTimeout(function(){
					window.location.href='../../payment/html/patientIDCards.html';
				},2000)
				},500)
			},
		},
	})

+ 2 - 2
html/payment/js/patientIDCards-pay.js

@ -38,7 +38,7 @@ var checktype=false;
					contentType: 'load',
					skin: 'bk-popup'
				});
				loading.show();
				loading.showModal();
				 sendPost("patient/card/getCardInfo", {id:vm.cardId}, "json", "get",function(){
				 	loading.close();
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
@ -86,7 +86,7 @@ var checktype=false;
			backtoCards:function(){
				setTimeout(function(){
					window.location.href='../../payment/html/patientIDCards.html';
				},2000)
				},500)
			},
			//屏幕高度太矮,下方按钮随页面滚动,反之固定底部
			setBtnClass:function(){

+ 1 - 1
html/payment/js/patientIDCards.js

@ -23,7 +23,7 @@ var checktype=false;
					contentType: 'load',
					skin: 'bk-popup'
				});
				loading.show();
				loading.showModal();
				 sendPost("patient/card/getCardList", {patient:vm.code}, "json", "get",function(){
				 	loading.close();
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();

+ 116 - 4
html/payment/js/paymentList.js

@ -1,16 +1,128 @@
var Request = GetRequest();
var checktype=false;
var loading = dialog({
	contentType: 'load',
	skin: 'bk-popup',
});
(function() {
	new Vue({
		el: "#app",
		data: {
			data:{},
			dataList:[],
			length:1
			length:1,
			id:"",
			queryList:{
				month:"",
				healthNo:""
			},
			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:["","就诊卡缴费","住院缴费"],
		},
		mounted: function() {
			var vm = this
			checkUserAgent();
			vm.checkType()
			vm.code=JSON.parse(localStorage.getItem("wlyyAgent")).uid
			vm.queryList.month=new Date().getFullYear()+"-"+new Date().getMonth()			
			vm.eventClick()
		},
		methods: {
			
		methods: {	
			//获取就诊卡
			getData:function(){
				var vm=this
				loading.showModal();
				 sendPost("patient/card/getCardList", {patient:vm.code}, "json", "get",function(){
				 	loading.close();
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
			       }, function(res){
			        if(res.status == 200){ 
			        	if(res.data.length>0){			        		
							if(Request.id){																
				        		vm.data=res.data.filter(function(item){
				        			return item.id==Request.id
				        		})[0]
							}else{								
				        		vm.data=res.data.filter(function(item){
				        			return item.isDefault==1
				        		})[0]
				        		if(!vm.data){
				        			vm.data=res.data[0]
				        		}
							}
			        		vm.queryList.healthNo=vm.data.cardNo
			        		vm.getList()
			        	}else{
			        		vm.gotoCards()
			        	}
			        }else{
			          dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
			        }
			    })
			},
			//获取列表数据
			getList:function(){
				var vm=this
				 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=JSON.parse(res.data)
			        	vm.length=vm.dataList.length
			        }else{
			          dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
			        }
			    })
			},
			//跳转到订单结果页
			gotoResult:function(seqNo){
				window.location.href='../../payment/html/paymentResult.html?seqNo='+seqNo;
			},
			//跳转切换就诊卡
			changeCards:function(){
				window.location.href='../../payment/html/changeCards.html?pre=paymentList';
			},
			//绑定事件-时间
			eventClick:function(){
				var vm=this
				$('.date-icon').mobiscroll({
	                preset: 'date',
			        dateOrder: 'yymm',
			        dateFormat: 'yy-mm',
			        theme: 'ios',
			        lang:'zh',
			        minDate: new Date(2017,1),
			        maxDate: new Date(),
			        onSelect: function(valueText, inst){
						console.info(valueText)						
						vm.queryList.month=valueText	
						vm.getList()
					},
	           });
			},
			//跳转我的就诊卡页面
			gotoCards:function(){
				window.location.href='../../payment/html/patientIDCards.html';
			},
			//判断是否验证登录通过
			checkType:function(){
				var vm=this
				var timer = setInterval(function(){
					if(checktype){
						clearInterval(timer);
						vm.getData()
					}
				},10);
			},
		},
	})
})()
})()
function queryInit(){
	checktype=true
}

+ 59 - 6
html/payment/js/paymentResult.js

@ -1,22 +1,75 @@
var Request = GetRequest();
var checktype=false;
var loading = dialog({
	contentType: 'load',
	skin: 'bk-popup',
});
(function() {
	new Vue({
		el: "#app",
		data: {
			result:{
			result:{},
			successResult:{
				status:"success-pay",
				msg:"恭喜您缴费成功,您将享有医院在线的所有服务,以下为您的缴费信息。",
				Img:"../images/jiaofeichengong_icon.png",	
				txt:"缴费成功",				
			},
			failureResult:{
				status:"failure-pay",
				msg:"恭喜您缴费成功,您将享有医院在线的所有服务,以下为您的缴费信息。",
				Img:"../images/jiaofeishibai_icon.png",	
				txt:"缴费失败",
				txt:"缴费失败",				
			},
			successImg:"../images/jiaofeishibai_icon.png",
			failureImg:"../images/jiaofeichengong_icon.png",
			healthType:["","就诊卡缴费充值","住院缴费充值"],
			initdata:{seqNo:"","patientName":"","healthNo":"","healthType":1,"payAmount":"","payTimeStart":"",},
			data:{}
		},
		mounted: function() {
			var vm = this
			checkUserAgent();
			vm.checkType()
		},
		methods: {
			
			//获取数据
			getData:function(){
				var vm=this
				loading.showModal();
				 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){
			        	vm.data=JSON.parse(res.data)
			        	if(!vm.data){vm.data=vm.initdata}
			        	vm.result=vm.successResult
			        }else{
			          dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
			        }
			    })
			},
			//
			backClick:function(){
				window.history.back();
			},
			//判断是否验证登录通过
			checkType:function(){
				var vm=this
				var timer = setInterval(function(){
					if(checktype){
						clearInterval(timer);
						vm.getData()
					}
				},10);
			},
		},
	})
})()
})()
function queryInit(){
	checktype=true
}