var self; var checkeds = {}, num = 0; var docInfo; mui.plusReady(function(){ self = plus.webview.currentWebview(); docInfo = JSON.parse(plus.storage.getItem('docInfo')); getGroups(); }) function getGroups(){ plus.nativeUI.showWaiting(); sendPost("/doctor/family_contract/getPatientByLevel", {doctorCode: self.docCode, team: self.teamCode}, null, function(res){ var html = ""; if(res.status==200){ if(!res.data.jk){ res.data.jk = []; } if(self.level==2 && !res.data.qk){ res.data.qk = []; } $('.content').html(template('pati_group_tmpl', res.data)); mui(document).imageLazyload({ placeholder: '../../../images/morenjiazhai_icon.png' }); if(self.level == 2){ $('.l-tab').css('display', '-webkit-box'); $('#qkqx_list').show(); $('#qk_nodata').show(); } else { $('.content').css('padding-top', '45px'); $('#jgqx_list').show(); $('#jg_nodata').show(); } plus.nativeUI.closeWaiting(); } else { queryErr(res); } }) } function queryErr(res){ plus.nativeUI.closeWaiting(); if(res.msg) mui.toast(res.msg); else mui.toast('程序开了点小差,请稍后重试!'); } $('.l-tab li').on('tap', function(){ if($(this).hasClass('l-tab-cur')) return; var i =$(this).addClass('l-tab-cur').siblings().removeClass('l-tab-cur').index(); if(i == 1){ $('#qkqx_list').show(); $('#qk_nodata').show(); $('#jgqx_list').hide(); $('#jg_nodata').hide(); } else { $('#jgqx_list').show(); $('#jg_nodata').show(); $('#qkqx_list').hide(); $('#qk_nodata').hide(); } }) function selectZy(){ if(self.level == 2){ mui.openWindow({ id: "zyjm-layer.html", url: "zyjm-layer.html", styles: { background: 'transparent' }, show:{aniShow: "none"}, waiting:{autoShow: false}, extras: { teamCode: self.teamCode, docCode: self.docCode } }) } else{ mui.openWindow({ id: "zhuanyijumin", url: "../../search/html/zhuanyijumin.html", extras: { level: 3, teamCode: self.teamCode, docCode: self.docCode, type:'转移' } }); } } template.helper("setPhoto", function(p) { return getImgUrl(p); });