| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 | var self,	msgData,//建档信息	dataBase;//字典信息mui.plusReady(function(){	self = plus.webview.currentWebview();	// 获取字典	plus.nativeUI.showWaiting()    sendGet('doctor/patient/getArchiveComboList', {},function(){    	plus.nativeUI.closeWaiting();    	mui.toast('请求失败')    }, function(res) {    	plus.nativeUI.closeWaiting();        if (res.status==200) {        	dataBase = res.data;        	getRecord()        }else{         	mui.toast('获取数据失败')        }    })    //获取建档信息    function getRecord(){    	sendPost('doctor/archives/findArchiveDetailsByCode', {code:self.code},function(){	    	plus.nativeUI.closeWaiting();	    	mui.toast('请求失败')	    }, function(res) {	    	plus.nativeUI.closeWaiting();	        if (res.status==200) {	        	msgData = res.data				var html = template('list_tmp',{data:res.data,dataBase:dataBase})				$('.main').html(html)				bindEvent()	        }else{ 	        	mui.toast('获取数据失败')	        }	    })    }})function bindEvent(){	$(".jm-btn").on('tap',function(){		mui.openWindow({			id: "dailiqianyue",			url: "../../mine/html/dailiqianyue.html",			extras: {				name:msgData.sickName,				idCard:msgData.identityCardNo,				countryCode:msgData.zoneCode,				countryName:msgData.zoneName,				ssc:msgData.insurCardNo,				mobile:msgData.homePhone,				kind:1			}		}) 	})}	template.helper("setSex",function(s){	if(s == 1){return "男"} 	if(s == 2){return "女"}	else{return ''}})template.helper("setFamilyHis",function(p){	if(p && p != '0'){		var arr = p.split(',')		var newArr = []		$.map(arr,function(item,i){			newArr.push(_.find(dataBase.familyHistory, function(o){ return o.code == item; }).value)		})		return newArr.join(',')	}else{		return '无'	}	})template.helper('setDisable',function(p){	if(p){		return _.find(dataBase.disability, function(o){ return o.code == p; }).value	}else{		return ''	}})template.helper('setPayment',function(p){	if(p){		return _.find(dataBase.payment, function(o){ return o.code == p; }).value	}else{		return ''	}})template.helper('setJob',function(p){	if(p){		return _.find(dataBase.occupation, function(o){ return o.code == p; }).value	}else{		return ''	}})template.helper('setEdu',function(p){	if(p){		return _.find(dataBase.education, function(o){ return o.code == p; }).value	}else{		return ''	}})template.helper("setState",function(s){	if(s == 1){return "已签约"} 	if(s == 0){return "未签约"}	else{return ''}})template.helper('setTimeF',function(o){	return o.substring(0,10)})
 |