Browse Source

续方详情

yezehua 7 năm trước cách đây
mục cha
commit
2294e3bbc4

+ 9 - 0
css/style.css

@ -5719,6 +5719,8 @@ input[type="checkbox"], input[type="radio"] {
}
/* spacing
-----------------------------------------------------------------------------*/
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.mt5 {margin-top:5px;}.mt10 {margin-top:10px;}.mt15 {margin-top:15px;}.mt20 {margin-top:20px;}.mt30 {margin-top:30px;}.mt50 {margin-top:50px;}.mt100 {margin-top:100px;}
.mb5 {margin-bottom:5px;}.mb10 {margin-bottom:10px;}.mb15 {margin-bottom:15px;}.mb20 {margin-bottom:20px;}.mb30 {margin-bottom:30px;}.mb50 {margin-bottom:50px;}.mb100 {margin-bottom:100px;}
.ml5 {margin-left:5px;}.ml10 {margin-left:10px;}.ml15 {margin-left:15px;}.ml20 {margin-left:20px;}.ml30 {margin-left:30px;}.ml50 {margin-left:50px;}.ml100 {margin-left:100px;}
@ -5745,12 +5747,16 @@ input[type="checkbox"], input[type="radio"] {
.c-w120 { width: 120px; }
.c-w140 { width: 140px; }
.c-w200 { width: 200px; }
.c-w270 { width: 270px; }
.c-h100 { height: 100px; }
.c-fff { color: #fff; }
.c-12b7f5 { color: #12b7f5; }
.c-f96565 { color: #f96565; }
.bc-12b7f5 { background-color: #12b7f5; }
.bc-f5f5fa { background-color: #f5f5fa; }
.pr { position: relative; }
.clearfix:after {visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0;}
.clearfix {zoom:1;}
.fl,.fr {display:inline;}
@ -5758,8 +5764,11 @@ input[type="checkbox"], input[type="radio"] {
.fr {float:right;}
.c-display-ib { display: inline-block; }
.c-vam { vertical-align: middle; }
.c-vat { vertical-align: top; }
.c-tac { text-align: center; }
.c-b-r5 { border-radius: 5px; }
.c-b-r10 { border-radius: 10px; }
.c-b-r20 { border-radius: 20px; }
.c-b-c12b7f5 { border-color: #12b7f5; }
.c-border { border: 1px solid; }

+ 1 - 0
index.html

@ -111,6 +111,7 @@
    <script src="js/plugins/toastr/toastr.min.js"></script>
    <script src="js/es6-promise.js"></script>
    <script src="js/api-service.js"></script>
    <script src="js/util.js"></script>
    <script src="js/buz/index.js"></script>
</body>

+ 11 - 11
js/api-service.js

@ -9,7 +9,7 @@
		
	} else { // 测试环境配置
        server = "http://172.19.103.88:9092/wlyy/"
        // server = "http://192.168.131.127:8060/"; //逸祥
         server = "http://192.168.131.127:8060/"; //逸祥
        // server = "http://192.168.131.24:8080/"; //仕杰
        imserver = "http://172.19.103.88:3000/api/v2";
        socketUrl = "http://172.19.103.88:3000";
@ -20,20 +20,20 @@
    userAgent = localStorage.getItem(agentName)
    //hard code userAgent for test
    //全科
    // userAgent = {"id":4800,"uid":"zbqD201703150222","imei":"864394010176834","token":"3e1795bd21c466eb749480c37847c8b1","platform":2,"hospital":"3502050100"};
     userAgent = {"id":4798,"uid":"hxmD201703150222","imei":"864394010176834","token":"d4e0d92a3bc210cb140bbdc0068ea873","platform":2,"hospital":"3502050100"};
    //健管
    // userAgent = {"id":4821,"uid":"zbqD201703150228","imei":"864394010176834","token":"73f5ace5c7d4cdb811f743902fd705d9","platform":2,"hospital":"3502050100"}; 
    // userAgent = JSON.stringify(userAgent);
     
	if(userAgent) {
		try{
			userAgent = JSON.parse(userAgent)
		}catch(e){
			location.replace(loginUrl+'?redirect_url='+encodeURIComponent(location.href))
		}
	} else {
		location.replace(loginUrl+'?redirect_url='+encodeURIComponent(location.href))
	}
//	if(userAgent) {
//		try{
//			userAgent = JSON.parse(userAgent)
//		}catch(e){
//			location.replace(loginUrl+'?redirect_url='+encodeURIComponent(location.href))
//		}
//	} else {
//		location.replace(loginUrl+'?redirect_url='+encodeURIComponent(location.href))
//	}
	
	function httpGet(url,options) {
		//发送ajax请求

+ 259 - 4
js/buz/prescription-detail.js

@ -1,10 +1,265 @@
$(function(){
	//获取团队信息
	var request = getRequest(),
	    teamCode = request.id,
	    isLeader = request.isLeader || true;
	    isLeader = isTeamLeader(),
	    prescriptionCode = request.code;
    
	$('select').on('change',function() {
		
	})
    var $main = $('#main');
    
    var jwHospital = '',
    	jwDoctorCode = '';
    // 认证专用
    var strOriginalData;
    
    template.helper('idcardWidthStar',function(idcard) {
    	if(idcard) {
    		if(idcard.length == 18) {
    			return idcard.substring(0,8) +'********'+idcard.substring(16,18)
    		} else {
    			idcard.substring(0,5) +'********'+idcard.substring(16,18)
    		} 
    	}
    	return "";
    })
    
    template.helper('getStatusName',function(status) {
    	return getStatusName(status)
    })
    
    template.helper('getReviewResultName',function(status) {
    	return getReviewResultName(status)
    })
    
    prescriptionDetailApis.getContinuedPrescriptionAsDoctor({
    	data: {
    		code: prescriptionCode, // 续方CODE
    		type: isLeader?1:2 // 是否为团队长,1:是,2:否
    	}
    }).then(function(res) {
    	if(res.status == 200) {
    		var data = res.data;
	    	var prescription = data.prescription;
	    	var diagnosis = data.diagnosis;
	    	strOriginalData = data;
	    	jwHospital = prescription.jwHospital;
	    	jwDoctorCode = prescription.jwDoctorCode;
	    	var diagnosisNames = _.pluck(diagnosis,'name').join('、')
	    	
	    	if(isLeader) {
	    		getDataPromises().then(function(responses) {
		    		var deptRes = responses[0],
		    			feeRes = responses[1],
		    			authRes = responses[2],
		    			reasonRes = responses[3];
		    			
		    		$main.html(template('detailTmpl',$.extend({}, data , {
		    			diagnosisNames: diagnosisNames,
		    			depts: deptRes.data,
		    			feeRes: feeRes.data,
		    			isAuthentication: authRes.data.type == 4,
		    			isLeader: isLeader,
		    			reasonTypes: reasonRes.data
		    		})))
		    		
		    		bindEvents()
		    	}).catch(function(e) {
		    		showErrorMsg('初始化失败')
		    	})
	    	} else {
	    		$main.html(template('detailTmpl',$.extend({}, data , {
	    			diagnosisNames: diagnosisNames,
	    			isLeader: isLeader
	    		})))
	    		bindEvents()
	    	}
	    	
    	} else {
    		showErrorMsg(res.msg)
    	}
    	
    })
    
    function bindEvents() {
    	$('#auditResultSel').on('change',function() {
			var value = $(this).val();
			if(value == 1) {
				$('#disagreeAudit').hide();
				$('#agreeAudit').show();
			} else if(value == 2) {
				$('#agreeAudit').hide();
				$('#disagreeAudit').show();
			} else {
				$('#agreeAudit').hide();
				$('#disagreeAudit').hide();
			}
		})
    	
    	$('#reviewBtn').on('click',function() {
    		var result = $('#auditResultSel').val();
    		var data = {
    				code: prescriptionCode, // 续方CODE
    				reason: '', // 不同意原因
    				reasonCode: '', // 不同意原因CODE
    				state: '', // 1同意,2不同意
    				dept: '', // 科室
    				registerFee: '', // 诊金
    				rateTypeCode: '' // 诊金类型
    			}
    		if(result == 1) { // 审核通过
    			if(!checkAgreeInputs()) {
    				return ;
    			}
    			$('#reviewBtn').attr('disabled','disabled')
    			var params ={
	    			strRealNameSoftCertCalledPasswd: $('#reviewPassword').val(),
	    			strOriginalData:JSON.stringify(getStrOriginalData()),
	    			prescriptionCode:prescriptionCode
	    		}
    			prescriptionDetailApis.requestRealNameSoftCertAndSign({
    				data: params
    			}).then(function(res) {
    				if(res.status==200 && res.data){
    					var feesel = $('#feeSel').val().split(' ');
    					prescriptionDetailApis.reviewPrescription({
			    			data: {
			    				code: prescriptionCode, // 续方CODE
			    				state: 1, // 1同意,2不同意
			    				dept: $('#deptSel').val(), // 科室
			    				registerFee: feesel[1], // 诊金
			    				rateTypeCode: feesel[0] // 诊金类型
			    			}
			    		}).then(function(res) {
			    			if(res.status == 200 && res.data){
			    				showSuccessMsg(res.msg || '操作成功')
			    				setTimeout(function() {
			    					location.reload(true)
			    				}, 2000)
			    			} else {
			    				$('#reviewBtn').removeAttr('disabled')
			    			}
			    		})
    				} else {
    					showErrorMsg(res.msg)
    					$('#reviewBtn').removeAttr('disabled')
    				}
    			}).catch(function(e) {
    				showErrorMsg(e)
    			})
    		} else { // 审核不通过
    			if(!checkDisAgreeInputs()) {
    				return ;
    			}
    			var reasonType = $('#adjustReason li.active').text();
				var reason = $('#disagreeReason').val();
    			prescriptionDetailApis.reviewPrescription({
	    			data: {
	    				code: prescriptionCode, // 续方CODE
	    				state: 2, // 1同意,2不同意
	    				reason: reasonType, // 不同意原因
    					reasonCode: reason, // 不同意原因CODE
	    			}
	    		}).then(function(res) {
	    			if(res.status == 200 && res.data){
	    				showSuccessMsg(res.msg || '操作成功')
	    				setTimeout(function() {
	    					location.reload(true)
	    				}, 2000)
	    			} else {
	    				$('#reviewBtn').removeAttr('disabled')
	    			}
	    		}).catch(function(e) {
    				showErrorMsg(e)
    			})
    		}
    		
    	})
    	
    	$('#editBtn').on('click',function() {
    		location.href = 'prescription-adjustment.html'
    	})
    	
    	$('#backBtn').on('click',function() {
    		history.go(-1);
    	})
    	
    	$('#adjustReason').on('click','li',function() {
    		$(this).siblings().removeClass('active');
    		$(this).addClass('active')
    	})
    	
    	calcWorldWithTextarea()
    }
	
	function getStrOriginalData() {
		var imporMsg = {
				prescription: {}
		};
    	imporMsg.prescription.jwCode = strOriginalData.prescription.jwCode;
    	imporMsg.prescription.patientName = strOriginalData.prescription.patientName;
    	imporMsg.prescription.doctorName = strOriginalData.prescription.doctorName;
    	imporMsg.prescription.diagnosis = strOriginalData.diagnosis;
    	var arr = _.map(strOriginalData.prescriptionInfo,function(item){
    	 	return _.pick(item, 'drugCode','drugName','jwSubCode','physicAmount','physicAmountUnit','physicAmountUnitName');
    	})
    	imporMsg.prescription.prescriptionInfo = arr;
    	
    	return imporMsg;
	}
	
	function checkAgreeInputs() {
		var fee = $('#feeSel').val();
		var dept = $('#deptSel').val();
		var pwd = $('#reviewPassword').val();
		if(!fee) {
			showErrorMsg("请选择诊查费用")
			return false;
		} else if(!dept) {
			showErrorMsg("请选择开方科室")
			return false;
		} else if(!pwd) {
			showErrorMsg("请输入审方密码")
			return false;
		} 
		return true;
	}
	
	function checkDisAgreeInputs() {
		var reasonType = $('#adjustReason li.active').text();
		var reason = $('#disagreeReason').val();
		if(!reasonType) {
			showErrorMsg("请选择不通过原因")
			return false;
		} else if(!reason) {
			showErrorMsg("请输入不通过原因")
			return false;
		} 
		return true;
	}
	
	function getDataPromises() {
		return Promise.all([
		    prescriptionDetailApis.getDeptList({
		    	data: {
		    		jwHospital: jwHospital,
		    		jwDoctorCode: jwDoctorCode
		    	}
		    }),
		    prescriptionDetailApis.getRegisterRee({
		    	data: {
		    		jwHospital: jwHospital,
		    		jwDoctorCode: jwDoctorCode
		    	}
		    }),
		    prescriptionDetailApis.isAuthentication({}),
		    prescriptionDetailApis.getReasonByType({
		    	data: {
		    		type: '0'
		    	}
		    })
		])
	}
})

+ 2 - 2
js/buz/prescription-management.js

@ -1,7 +1,7 @@
//获取团队信息
var request = getRequest(),
    teamCode = request.id,
    isLeader = request.isLeader || true;
    isLeader = isTeamLeader();
//记录页面控件的值
var startDate = '', 
    endDate = '',
@ -70,7 +70,7 @@ function getPrescriptionList( refresh){
                        o.statusName = getStatusName(o.status);
                        o.drugs = getDrugs(o.prescriptionInfo);
                        o.daysRemaining = getDaysRemaining(o)
                        o.action = '<a class="c-12b7f5" href="">查看</a>';
                        o.action = '<a class="c-12b7f5" href="prescription-detail.html?code='+o.code+'">查看</a>';
                        return o;
                    });
                    

+ 28 - 0
js/prescription-detail-api.js

@ -0,0 +1,28 @@
(function(){
    var prescriptionDetailApis = {
    	getContinuedPrescriptionAsDoctor: function(data) {
    		return APIService.httpGet('doctor/prescriptionInfo/getContinuedPrescriptionAsDoctor', data);
    	},
    	getDeptList:function(data) {
    		return APIService.httpGet('doctor/prescriptionInfo/getDeptList', data);
    	},
    	getRegisterRee:function(data) {
    		return APIService.httpGet('doctor/prescriptionInfo/getRegisterRee', data);
    	},
    	reviewPrescription:function(data) {
    		return APIService.httpPost('doctor/prescriptionInfo/reviewPrescription', data);
    	},
    	isAuthentication:function(data) {
    		return APIService.httpGet('doctor/isAuthentication', data);
    	},
    	requestRealNameSoftCertAndSign:function(data) {
    		return APIService.httpPost('doctor/requestRealNameSoftCertAndSign', data);
    	},
    	getReasonByType:function(data) {
    		return APIService.httpGet('doctor/prescriptionInfo/getReasonByType', data);
    	}
    };
    window.prescriptionDetailApis = prescriptionDetailApis;
})(jQuery)

+ 62 - 2
js/util.js

@ -1,4 +1,9 @@
Date.prototype.format = function(formatStr)   
toastr.options = {
	"closeButton": true,
	"positionClass": "toast-top-center"
}
Date.prototype.format = function(formatStr)
{   
    var str = formatStr;   
    var Week = ['日','一','二','三','四','五','六'];  
@ -170,8 +175,63 @@ function getDaysRemaining(item) {
		presCreateTime = item.presCreateTime,
		curTime = new Date().getTime();
	if(minDrugDay && presCreateTime) {
		return minDrugDay - ((curTime - presCreateTime)/(24 * 3600 * 1000)).toFixed(1)
		var preTime = new Date(presCreateTime.replace(/-/g,'/')).getTime()
		return minDrugDay - ((curTime - preTime)/(24 * 3600 * 1000)).toFixed(1)
	} else {
		return ""
	}
}
function getReviewResultName(status) {
	if(status == -2) {
		return "删除"
	} else if(status == -1) {
		return "审核失败"
	} else if(status == 0) {
		return "待审核"
	} else if(status == 1) {
		return "审核成功"
	} else {
		return ""
	}
}
function showErrorMsg(msg) {
	if(top.toastr) {
		top.toastr.error(msg)
	}
}
function showSuccessMsg(msg) {
	if(top.toastr) {
		top.toastr.success(msg)
	}
}
function showWarningMsg(msg) {
	if(top.toastr) {
		top.toastr.warning(msg)
	}
}
function calcWorldWithTextarea() {
	var preVule = ''
	$('textarea[calcWorld]').on('input',function() {
		var num = $(this).attr('calcWorld');
		var len = $(this).val().length;
		var value = $(this).val();
		var $tip = $(this).parent().find('.wordCount'); 
		if(num >= len) {
			$tip.text(len+' / '+ num)
			preVule = value
		} else {
			$(this).val(preVule)
		}
	})
}
function isTeamLeader() {
	var docInfo = JSON.parse(window.localStorage.getItem('docInfo'))
    return docInfo.isLeader == '1'? true: false;
}

+ 61 - 5
prescription-adjustment.html

@ -37,7 +37,26 @@
			background: url(img/jianshao_icon.png) no-repeat;
			background-size: 20px;
		}
		.icon-shanchu {
			position: absolute;
			top: 50%;
			right: 10px;
			width: 20px;
			height: 20px;
			margin-top: -10px;
			background: url(img/qingchu_icon.png) no-repeat;
			background-size: 20px;
		}
		ul { list-style: none; padding-left: 0; }
		#adjustReason li.active {
			background-color: #12b7f5;
			color: #fff;
		}
		.wordCount {
			position:absolute;
			bottom: 5px;
			right: 15px;
		}
	</style>
</head>
<body class="white-bg plr5">
@ -67,24 +86,61 @@
            <p class="c-333 c-f16 mb5">RP</p>
        </div>
        <div class="ibox-content ">
        	<div class="ptb10 plr15 mtb10 bc-f5f5fa">
        	<div class="pb10 plr15 mtb10 bc-f5f5fa pr">
	        	<ul class="clearfix">
	        		<li class="fl">药品: <input type="text" placeholder="请输入药品名称或拼音首码" class="form-control c-w200 c-display-ib"></li>
	        		<li class="fl ml10">
	        		<li class="fl pt10">药品: <input type="text" placeholder="请输入药品名称或拼音首码" class="form-control c-w200 c-display-ib"></li>
	        		<li class="fl ml10 pt10">
	        			次剂量:<i class="icon-jianshao c-vam mr5"></i> 
	        			<input type="text" placeholder="" class="form-control c-w80 c-display-ib c-vam">
	        			<i class="icon-xinzeng c-vam ml5"></i>
	        		</li>
	        		<li class="fl ml10">天数: <input type="text" placeholder="请输入药品天数" class="form-control c-w140 c-display-ib"></li>
	        		<li class="fl ml10 pt10">天数: <input type="text" placeholder="请输入药品天数" class="form-control c-w140 c-display-ib"></li>
	        	</ul>
	        	<ul class="clearfix">
	        	<ul class="clearfix mb0">
	        		<li class="fl">频次: <input type="text" placeholder="请输入频次" class="form-control c-display-ib c-w120"></li>
	        		<li class="fl ml10">用法: <input type="text" placeholder="请输入用法" class="form-control c-display-ib c-w120"></li>
	        		<li class="fl ml10 pt7">总量:28片</li>
	        	</ul>
	        	<i class="icon-shanchu"></i>
        	</div>
        </div>
    </div>
    <div class="ibox">
        <div class="ibox-content">
            <div class="mt10 c-12b7f5">
            	<i class="icon-xinzeng c-vam ml5 mr5"></i>新增药品
            </div>
        </div>
    </div>
    <div class="ibox">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">调整原因</p>
        </div>
        <div class="ibox-content">
            <ul id="adjustReason">
            	<li class="fl c-b-c12b7f5 c-border c-12b7f5 ptb5 plr20 c-b-r20 mt10">
            		原处方药品库存不足
            	</li>
            	<li class="fl c-b-c12b7f5 c-border c-12b7f5 c-fff ptb5 plr20 c-b-r20 ml10 mt10">
            		居民体征有变化,调整用药
            	</li>
            	<li class="fl c-b-c12b7f5 c-border c-12b7f5 c-fff ptb5 plr20 c-b-r20 ml10 mt10">
            		居民要求变更处方药品
            	</li>
            	<li class="fl c-b-c12b7f5 c-border c-12b7f5 c-fff ptb5 plr20 c-b-r20 ml10 mt10">
            		其它
            	</li>
            </ul>
        </div>
        <div class="plr10 pr">
        	<textarea class="c-wp100 mt10 c-h100 ptb10 plr10"></textarea>
        	<span class="c-999 wordCount">0/200</span>
        </div>
        <div class="c-tac mb15 mt15">
			<button type="button" class="btn btn-w-m btn-success mlr20">确认</button>
			<button type="button" class="btn btn-w-m btn-danger mlr20">返回</button>
		</div>
    </div>
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/content.min.js?v=1.0.0"></script>

+ 225 - 137
prescription-detail.html

@ -17,144 +17,232 @@
		table td { padding-top: 5px; padding-bottom: 5px; }
		.ibox-content { padding-left: 0; padding-bottom: 0; }
		.ibox { margin-bottom: 0; }
		#adjustReason { padding: 0; }
		#adjustReason li.active {
			background-color: #12b7f5;
			color: #fff;
		}
		.wordCount {
			position:absolute;
			bottom: 5px;
			right: 15px;
		}
		#disagreeAudit, #agreeAudit { display: none; }
	</style>
</head>
<body class="white-bg plr5">
    <div class="ibox">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">原处方记录</p>
        </div>
        <div class="ibox-content">
            <table class="c-wp100 c-999">
            	<tr>
            		<td>开方时间:2017-07-04 08:00:25</td>
            		<td>开方医生:李四</td>
            	</tr>
            	<tr>
            		<td>剩余药品可用天数:2天</td>
            		<td>科室/医生:海沧区嵩屿街道社区卫生服务中心</td>
            	</tr>
            </table>
        </div>
    </div>
	<div class="ibox">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">居民信息</p>
        </div>
        <div class="ibox-content">
            <table class="c-wp100 c-999">
            	<tr>
            		<td>续方居民:张三</td>
            		<td>医保卡号:D1029381</td>
            		<td>身份证号:1301291817*******98</td>
            	</tr>
            </table>
        </div>
    </div>
    <div class="ibox mb5">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">临床诊断</p>
        </div>
        <div class="ibox-content">
            <table class="c-wp100 c-999">
            	<tr>
            		<td>诊断结果:<span class="c-333">高血压病</span></td>
            	</tr>
            </table>
        </div>
    </div>
    <div class="ibox">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">RP</p>
        </div>
        <div class="ibox-content">
            <table ble class="c-wp100 c-999">
            	<tr>
            		<td class="c-333">药品名称1</td>
            		<td>用法: <span class="c-333">口服 每次1.25mg    q.d.</span></td>
            		<td>总量:<span class="c-333">40片</span></td>
            		<td>规格:<span class="c-333">2.5mg*90片/盒</span></td>
            	</tr>
            	<tr>
            		<td class="c-333">药品名称1</td>
            		<td>用法: <span class="c-333">口服 每次1.25mg    q.d.</span></td>
            		<td>总量:<span class="c-333">40片</span></td>
            		<td>规格:<span class="c-333">2.5mg*90片/盒</span></td>
            	</tr>
            </table>
        </div>
    </div>
    <div class="ibox mb5">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">续方信息</p>
        </div>
        <div class="ibox-content">
            <table class="c-wp100 c-999">
            	<tr>
            		<td>续方状态:<span class="c-333">审核中</span></td>
            	</tr>
            	<tr>
            		<td>续方说明:<span class="c-333">审核中</span></td>
            	</tr>
            </table>
        </div>
    </div>
    <div class="ibox mb5">
        <div class="mt15">
            <p class="c-333 c-f16 mb5">续方审核</p>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal" style="width:370px;">
                <div class="form-group">
                    <label class="col-sm-3 control-label">审核结果:</label>
                    <div class="col-sm-8">
                        <select id="auditResultSel" class="form-control" name="auditResultSel">
                            <option>请选择审核结果</option>
                            <option>选项 1</option>
                            <option>选项 2</option>
                            <option>选项 3</option>
                            <option>选项 4</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">诊查费用:</label>
                    <div class="col-sm-8">
                        <select id="feeSel" class="form-control" name="feeSel">
                            <option>请按医生级别选择诊查费用</option>
                            <option>选项 1</option>
                            <option>选项 2</option>
                            <option>选项 3</option>
                            <option>选项 4</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">开方科室:</label>
                    <div class="col-sm-8">
                        <select id="deptSel" class="form-control" name="deptSel">
                            <option>请选择你所在的科室</option>
                            <option>选项 1</option>
                            <option>选项 2</option>
                            <option>选项 3</option>
                            <option>选项 4</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">审方密码:</label>
                    <div class="col-sm-8">
                        <input type="password" placeholder="请输入审方密码" class="form-control">
                    </div>
                </div>
            </form>
        </div>
    </div>
	<div class="c-tac mb15">
		<button type="button" class="btn btn-w-m btn-success mlr20">确认</button>
		<button type="button" class="btn btn-w-m btn-primary mlr20">调整处方</button>
		<button type="button" class="btn btn-w-m btn-danger mlr20">返回</button>
	</div>
<body class="white-bg plr10">
    
    <div id="main"></div>
    
    <script id="detailTmpl" type="text/html">
    	<div class="ibox">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">原处方记录</p>
	        </div>
	        <div class="ibox-content">
	            <table class="c-wp100 c-999">
	            	<tr>
	            		<td>开方时间:{{prescription.presCreateTime}}</td>
	            		<td>开方医生:{{prescription.doctorName}}</td>
	            	</tr>
	            	<tr>
	            		<td>剩余药品可用天数:2天</td>
	            		<td>医院/科室:{{prescription.hospitalName}} / {{prescription.deptName}}</td>
	            	</tr>
	            </table>
	        </div>
	    </div>
		<div class="ibox">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">居民信息</p>
	        </div>
	        <div class="ibox-content">
	            <table class="c-wp100 c-999">
	            	<tr>
	            		<td>续方居民:{{patient.name}}</td>
	            		<td>医保卡号:{{patient.ssc}}</td>
	            		<td>身份证号:{{patient.idcard | idcardWidthStar}}</td>
	            	</tr>
	            </table>
	        </div>
	    </div>
	    <div class="ibox mb5">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">临床诊断</p>
	        </div>
	        <div class="ibox-content">
	            <table class="c-wp100 c-999">
	            	<tr>
	            		<td>诊断结果:<span class="c-333">{{diagnosisNames}}</span></td>
	            	</tr>
	            </table>
	        </div>
	    </div>
	    <div class="ibox">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">RP
	            	{{if prescriptionAdjust && prescriptionAdjust.id }}
	            	<span class="fr c-f14 c-12b7f5">已调整</span>
	            	{{/if}}
	            </p>
	        </div>
	        <div class="ibox-content">
	            <table ble class="c-wp100 c-999">
	            	{{each prescriptionInfo as p i}}
	            	<tr>
	            		<td class="c-333">{{p.drugName}}</td>
	            		<td>用法: <span class="c-333">{{p.direction}} {{p.drugRate}}</span></td>
	            		<td>总量:<span class="c-333">{{p.num}}{{p.drugNumUnitName}}</span></td>
	            		<td>规格:<span class="c-333">{{p.drugFormat}}</span></td>
	            	</tr>
	            	{{/each}}
	            </table>
	            {{if prescriptionAdjust && prescriptionAdjust.id }}
	            	<p class="c-999 mt10">调整原因:{{prescriptionAdjust.reason || '-'}}</p>
	            {{/if}}
	        </div>
	    </div>
	    <div class="ibox mb5">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">续方信息</p>
	        </div>
	        <div class="ibox-content">
	        	{{if prescription.status == '31' }}
	        	<table class="c-wp100 c-999">
	            	<tr>
	            		<td>续方状态:<span class="c-333">{{prescription.status | getStatusName}}</span></td>
	            		<td>失败时间:<span class="c-333">{{prescription.failTime || ''}}</span></td>
	            	</tr>
	            	<tr>
	            		<td colspan="2">续方说明:<span class="c-333">{{prescription.reason}}</span></td>
	            	</tr>
	            	<tr>
	            		<td colspan="2">失败原因:<span class="c-333">{{prescription.failReason}}</span></td>
	            	</tr>
	            </table>
	        	{{else}}
	            <table class="c-wp100 c-999">
	            	<tr>
	            		<td>续方状态:<span class="c-333">{{prescription.status | getStatusName}}</span></td>
	            	</tr>
	            	<tr>
	            		<td>续方说明:<span class="c-333">{{prescription.reason}}</span></td>
	            	</tr>
	            </table>
	            {{/if}}
	        </div>
	    </div>
	    {{if prescription.status >= 0 && prescription.status <= 10 && isLeader }}
	    <div id="presctiptionAudit" class="ibox mb5">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">续方审核</p>
	        </div>
	        <div class="ibox-content">
	            <form class="form-horizontal">
	                <div class="form-group">
	                    <label class="col-sm-3 control-label c-w100">审核结果:</label>
	                    <div class="col-sm-8 c-w270">
	                        <select id="auditResultSel" class="form-control" name="auditResultSel">
	                            <option>请选择审核结果</option>
	                            <option value="1">审核通过</option>
	                            <option value="2">审核不通过</option>
	                        </select>
	                    </div>
	                </div>
	                <div id="agreeAudit">
	                	<div class="form-group">
		                    <label class="col-sm-3 control-label c-w100" >诊查费用:</label>
		                    <div class="col-sm-8 c-w270">
		                        <select id="feeSel" class="form-control" name="feeSel">
		                            <option>请按医生级别选择诊查费用</option>
		                            {{each feeRes as fee i}}
		                            <option value="{{fee.deptCode}} {{fee.registerFee}}">{{fee.registerTypeName}} {{fee.registerFee?fee.registerFee+'元': ''}}</option>
		                            {{/each}}
		                        </select>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-sm-3 control-label c-w100">开方科室:</label>
		                    <div class="col-sm-8 c-w270">
		                        <select id="deptSel" class="form-control" name="deptSel">
		                            {{if depts.length == 1}}
		                            	<option value="{{depts[0].deptCode}}">{{depts[0].deptName}}</option>
	                            	{{else}}
		                            	<option>请选择你所在的科室</option>
		                            {{each depts as dept i}}
		                            	<option value="{{dept.deptCode}}">{{dept.deptName}}</option>
		                            {{/each}}
		                            {{/if}}
		                        </select>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-sm-3 control-label c-w100" >审方密码:</label>
		                    <div class="col-sm-8" >
		                    	{{if isAuthentication}}
		                    	<input id="reviewPassword" type="password" placeholder="请输入审方密码" class="form-control" style="width: 240px;">
		                        {{else}}
		                        <div class="pt7 c-f96565">审方密码:您暂未申请CA认证,请先在i健康APP上完成CA认证,认证路径:我的——设置——CA认证</div>
		                    	{{/if}}
		                    </div>
		                </div>
	                </div>
	                <div id="disagreeAudit">
				    	<table style="width: 80%">
				    		<tr>
				    			<td class="c-w100 pt10 c-vat">
				    				不通过原因:
				    			</td>
				    			<td>
					        		<ul id="adjustReason" class="clearfix">
					        			{{each reasonTypes as r i}}
						            	<li data-code="{{r.code}}" class="fl c-b-c12b7f5 c-border c-12b7f5 ptb5 plr20 c-b-r20 mt10 mr10">
						            		{{r.value}}
						            	</li>
						            	{{/each}}
						            </ul>
						            <div class="pr">
							        	<textarea id="disagreeReason" class="c-wp100 mt10 c-h100 ptb10 plr10" calcWorld="200"></textarea>
							        	<span class="c-999 wordCount">0/200</span>
							        </div>
				    			</td>
				    		</tr>
				    	</table>	
				    </div>
	            </form>
	        </div>
	    </div>
	    
	    {{else if reviewed && reviewed.id}}
	    	<div class="ibox mb5">
		        <div class="mt15">
		            <p class="c-333 c-f16 mb5">审核记录</p>
		        </div>
		        <div class="ibox-content">
		            <table class="c-wp100 c-999">
		            	<tr>
		            		<td>申请时间:<span class="c-333">{{reviewed.createTime}}</span></td>
		            		<td>审核医生:<span class="c-333">{{reviewed.doctorName}}</span></td>
		            	</tr>
		            	<tr>
		            		<td>审核机构:<span class="c-333">{{reviewed.hospitalName}}</span></td>
		            		<td>审核时间:<span class="c-333">{{reviewed.reviewedTime}}</span></td>
		            	</tr>
		            	<tr>
		            		<td>审核结果:<span class="c-333">{{reviewed.status | getReviewResultName}}</span></td>
		            		<td></td>
		            	</tr>
		            </table>
		        </div>
		    </div>
	    
	    {{/if}}
		<div class="c-tac mb20 mt20">
			<button id="reviewBtn" type="button" class="btn btn-w-m btn-success mlr20">确认</button>
			<!--<button id="editBtn" type="button" class="btn btn-w-m btn-primary mlr20">调整处方</button>-->
			<button id="backBtn" type="button" class="btn btn-w-m btn-danger mlr20">返回</button>
		</div>
    </script>
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/content.min.js?v=1.0.0"></script>
@ -165,7 +253,7 @@
    <script src="js/es6-promise.js"></script>
    <script src="js/underscore.js"></script>
    <script src="js/api-service.js"></script>
    <script src="js/management-api.js"></script>
    <script src="js/prescription-detail-api.js"></script>
    <script src="js/util.js"></script>
    <script src="js/template.js"></script>
    <script src="js/buz/prescription-detail.js"></script>