12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- var Request = GetRequest();
- var checktype=false;
- (function() {
- myvue=new Vue({
- el: "#app",
- data: {
- dataList:[],
- code:"",
- divClass:"jiuzhen",
- divName:"就诊"
- },
- mounted:function(){
- var vm = this
- checkUserAgent();
- vm.code=JSON.parse(localStorage.getItem("wlyyAgent")).uid
- vm.checkType()
- },
- methods: {
- //获取列表数据
- getData:function(){
- var vm=this
- var loading = dialog({
- contentType: 'load',
- skin: 'bk-popup'
- });
- sendPost("patient/card/getCardList", {patient:vm.code}, "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
- if(Request.paytype==2){
- vm.divClass="zhuyuan"
- vm.divName="住院"
- vm.dataList=res.data.filter(function(item){
- item.cardNo=item.inpCardNo
- return item.inpCardNo
- })
- $(document).attr('title','选择住院号');
- }
- }else{
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
- }
- })
- },
- //设置默认就诊卡
- setDefault:function(id,isDefault){
- var vm=this
- sendPost("/patient/card/defaultOpe", {id:id,isDefault:isDefault}, "json", "post",function(){
- }, function(res){
- if(res.status == 200){
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res.msg}).show();
- vm.getData()
- }else{
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
- }
- })
- },
- gotoPage:function(id){
- if(Request.pre=="paymentList"){ //跳到缴费查询页面
- window.location.href='../../payment/html/paymentList.html?id='+id;
- }else if(Request.pre=="waitingDoctorList"){ //跳到候诊查询页面
- window.location.href='../../informationSearch/html/waitingDoctorList.html?id='+id;
- }else if(Request.pre=="payment"){ //跳到支付页面
- window.location.href='../../payment/html/payment.html?id='+id+"&paytype="+Request.paytype;
- }else{ //默认跳转缴费查询页面
- window.location.href='../../payment/html/paymentList.html?id='+id;
- }
- },
- //判断是否验证登录通过
- checkType:function(){
- var vm=this
- var timer = setInterval(function(){
- if(checktype){
- clearInterval(timer);
- vm.getData()
- }
- },10);
- },
- },
- })
- })()
- function queryInit(){
- checktype=true
- }
|