123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- var Request = GetRequest();
- var checktype=false;
- var loading = dialog({
- contentType: 'load',
- skin: 'bk-popup',
- });
- (function() {
- new Vue({
- el: "#app",
- data: {
- result:{},
- successResult:{
- status:"success-pay",
- msg:"恭喜您缴费成功,您将享有医院在线的所有服务,以下为您的缴费信息。",
- Img:"../images/jiaofeichengong_icon.png",
- txt:"缴费成功",
- },
- synchronizationResult:{
- status:"synchronization-pay",
- msg:"系统繁忙,请重新充值缴费。",
- Img:"../images/jiaofeishibai_icon.png",
- txt:"缴费失败",
- },
- failureResult:{
- status:"failure-pay",
- msg:"系统繁忙,请重新充值缴费。",
- Img:"../images/jiaofeishibai_icon.png",
- txt:"缴费失败",
- },
- healthType:["","门诊缴费充值","住院缴费充值"],
- initdata:{seqNo:"","patientName":"","healthNo":"","healthType":1,"payAmount":"","createDate":"",},
- data:{},
- frompay:false,
- queryList:{
- month:"",
- healthNo:"",
- chargeType:"1", //1:门诊,2:住院,
- pageNo:1,
- pageSize:1,
- },
- 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:"支付宝支付"}],
- },
- mounted: function() {
- var vm = this
- checkUserAgent();
- vm.checkType()
- },
- 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(){
- loading.close();
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
- }, function(res){
- loading.close();
- if(res.status == 200){
- vm.data=res.data
- vm.filterData()
- }else{
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res.msg}).show();
- }
- })
- },
- //从缴费列表进入
- gerPayOrderList:function(){
- var vm=this
- vm.data={seqNo:Request.seqNo,"patientName":getQueryString('patientName'),"healthNo":Request.healthNo,"healthType":Request.healthType,"payAmount":Request.payAmount,"createDate":getQueryString('createDate'),"payStatus":Request.payStatus,"payType":Request.payType}
- vm.result=vm.successResult
- // if(Request.hyStatus==1){
- // vm.result=vm.successResult
- // }else{
- // vm.result=vm.synchronizationResult
- // }
- },
- filterData:function(){
- var vm=this
- if(!vm.data){vm.data=vm.initdata}
- if(Request.payStatus==1){ //充值状态,0未完成,1已完成,2失败
- vm.result=vm.successResult
- }else{
- // if(vm.data.wechatStatus==1){ //未同步
- // vm.result=vm.successResult
- // vm.data.hyStatus=0
- // }else{
- vm.result=vm.failureResult
- // }
- }
- },
- //
- backClick:function(){
- window.location.href='../../payment/html/patientIDCards-pay.html?id='+Request.cardId;
- },
- //判断是否验证登录通过
- checkType:function(){
- var vm=this
- var timer = setInterval(function(){
- if(checktype){
- clearInterval(timer);
- vm.getData()
- }
- },10);
- },
- },
- })
- })()
- 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;
- }
|