| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | 	var myScroll, checked= {}, num = 0, type,		docCode, teamCode, self, curDocCode;		mui.plusReady(function(){		self = plus.webview.currentWebview();		docCode = self.docCode;		teamCode = self.teamCode;		type = self.type;		num = self.num;		checked = self.checked;		searchVal = self.val;		curDocCode = getUid();		refreshTotal();				myScroll = $('#lscroller .doc-list').lscroll({style: "top: 50px;bottom: 48px", 			pullUpAction: function(g){				getDfpPatiLs(g.options.page);			}		});		getDfpPatiLs(1);		resetBack();	})		var old_back;	function resetBack(){		old_back = mui.back;		mui.back = function(){			mui.fire(self.opener(), "updateCheck", {num: num, checked: checked})			mui.later(function(){				old_back();			}, 200)		}	}		template.helper("isChecked", function(code){		if(checked[code])			return "checked";	})		function getDfpPatiLs(page){		plus.nativeUI.showWaiting();		var p = type == "sx" ? 				{doctor: curDocCode, page: page, pageSize: 50, patientName: searchVal} :				{doctor: curDocCode, page: page, pageSize: 50, patientAddr: searchVal};						sendGet("/doctor/family_contract/findNoHealthSignFamilyHealth", 			p, null, function(res){			if(res.status == 200){				console.log(JSON.stringify(res))				if(page==1 && (!res.data.list || res.data.list.length==0)){					$('#wushuju').show();					$('.lin-footer').hide();					$('#lscroller').hide();				} else {					$('#allSel').removeClass("checked").next().html("全选");					var allPage = res.data.count;					res.data = res.data.list;					res.type = type;					$('#lscroller .doc-list').append(html_encode(template('pati_tmpl', res)));					myScroll.refresh(page >= allPage);				}				plus.nativeUI.closeWaiting();			} else 				mui.toast(res.msg)		})	}
 |