<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>调整处方</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">
	<style>
		.ibox-content { padding: 0; }
		.ibox { margin-bottom: 0; }
		.icon-tianjia {
			display: inline-block;
			width: 15px;
			height: 15px;
			background: url(img/tianjia_icon.png) no-repeat;
			background-size: 15px;
			cursor: pointer;
		}
		.noselect {
			-webkit-touch-callout: none; /* iOS Safari */
			-webkit-user-select: none; /* Chrome/Safari/Opera */
			-khtml-user-select: none; /* Konqueror */
			-moz-user-select: none; /* Firefox */
			-ms-user-select: none; /* Internet Explorer/Edge */
			user-select: none; /* Non-prefixed version, currently */
		}
		.fa-close {
			cursor: pointer;
		}
		.icon-xinzeng {
			display: inline-block;
			width: 20px;
			height: 20px;
			background: url(img/xinzeng_icon.png) no-repeat;
			background-size: 20px;
			cursor: pointer;
		}
		.icon-jianshao {
			display: inline-block;
			width: 20px;
			height: 20px;
			background: url(img/jianshao_icon.png) no-repeat;
			background-size: 20px;
			cursor: pointer;
		}
		.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;
			cursor: pointer;
		}
		ul { list-style: none; padding-left: 0; }
		#adjustReason li{
			cursor: pointer;
		}
		#adjustReason li.active {
			background-color: #12b7f5;
			color: #fff;
		}
		.wordCount {
			position:absolute;
			bottom: 5px;
			right: 15px;
		}
		#addDrugBtn {
			cursor: pointer;
		}
		#diagnosisInput {
			display: none;
			height: 30px;
			border: 0;
		}
		.diagnosis-wrap {
			display: none;
		}
	</style>
</head>
<body class="white-bg plr5">
    <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">
	            <div class="pt10">
	            	<span class="c-999 c-vam c-display-ib mb10">诊断结果：</span>
		            <div class="clearfix c-display-ib c-vam">
		            	<ul id="diagnosis" class="fl">
		            		{{each diagnosis as d i}}
			            	<li data-code="{{d.code}}" class="fl bc-12b7f5 c-fff ptb5 plr10 c-b-r5 ml10" data-json="{{d | toJson}}">
			            		{{d.name}}
			            		<i class="fa fa-close"></i>
			            	</li>
			            	{{/each}}
			            </ul>
			            <div class="fl ml10 plr5 c-12b7f5 diagnosis-wrap" style="
						    border: 1px solid #12b7f5;
						    border-radius: 5px;
						"><span id="placeholdText">请输入临床诊断名称</span>
						
						<div class="input-group ">
	                        <input id="diagnosisInput" value="" type="text" class="form-control c-display-ib c-w120" autocomplete="on">
	                        <div class="input-group-btn">
	                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
	                        </div>
	                        <!-- /btn-group -->
	                    </div>
			            </div>
						
			            <div id="addDiagnosisBtn" class="mb10 fl c-b-c12b7f5 c-border c-12b7f5 c-fff ptb5 plr15 c-b-r5 ml20">
		            		<i class="icon-tianjia c-vam mr5"></i>添加
		            	</div>
		            </div>
	            </div>
	        </div>
	    </div>
	    <div id="drugs" class="ibox">
	        <div class="mt15">
	            <p class="c-333 c-f16 mb5">RP</p>
	        </div>
	        {{each prescriptionInfo as p i}}
	        <div class="ibox-content " data-json="{{p | toJson}}">
	        	<div class="pb10 plr15 mtb10 bc-f5f5fa pr" >
		        	<ul class="clearfix">
		        		<li class="fl pt10">药品： 
		        			<div class="c-w200 c-vam c-display-ib">
			        			<div class="input-group ">
			                        <input value="{{p.drugName}}" placeholder="请输入药品名称或拼音首码" type="text" class="j-drugName form-control c-display-ib c-w120" autocomplete="on">
			                        <div class="input-group-btn">
			                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
			                        </div>
			                        <!-- /btn-group -->
			                    </div>
		                    </div>
		        		</li>
		        		<li class="fl ml10 pt10">
		        			次剂量：<i class="icon-jianshao c-vam mr5 noselect"></i> 
		        			<input value="{{p.physicDose}}" type="text" placeholder="" class="j-medi-single form-control c-w80 c-display-ib c-vam">
		        			<i class="icon-xinzeng c-vam ml5 noselect"></i>
		        			<span class="j-dose-unit">{{p.physicDoseUnitName}}</span>
		        		</li>
		        		<li class="fl ml10 pt10">天数：
		        			<div class="c-w140 c-vam c-display-ib">
			        			<div class="input-group ">
			                        <input value="{{p.dayCount}}" placeholder="请输入药品天数" type="text" class="j-selDate form-control c-display-ib c-w120" autocomplete="on">
			                        <div class="input-group-btn">
			                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
			                        </div>
			                        <!-- /btn-group -->
			                    </div>
		                    </div>
		        		</li>
		        	</ul>
		        	<ul class="clearfix">
		        		<li class="fl">频次：
		        			<div class="c-w120 c-vam c-display-ib">
			        			<div class="input-group ">
			                        <input value="{{p.drugRateName}}" data-code="{{p.drugRate}}" placeholder="请输入频次" type="text" class="form-control j-selFreq form-control c-display-ib c-w120" autocomplete="on">
			                        <div class="input-group-btn">
			                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
			                        </div>
			                        <!-- /btn-group -->
			                    </div>
		                    </div>
		        		</li>
		        		<li class="fl ml10">用法：
		        			<div class="c-w120 c-vam c-display-ib">
			        			<div class="input-group ">
			                        <input value="{{p.usageName}}" data-id="{{p.drugUsage}}" placeholder="请输入用法" type="text" class="j-method form-control c-display-ib c-w120" autocomplete="on">
			                        <div class="input-group-btn">
			                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
			                        </div>
			                        <!-- /btn-group -->
			                    </div>
		                    </div>
		        		
		        		</li>
		        		<li class="fl ml10 pt7">总量：
		        			<span class="j-sumMedicine" data-name="{{p.drugNumUnitName}}" data-num="{{p.num}}" data-unit="{{p.drugNumUnit}}">{{p.num}}{{p.drugNumUnitName}}</span>
		        		</li>
		        	</ul>
		        	<i class="icon-shanchu"></i>
	        	</div>
	        </div>
	        {{/each}}
	    </div>
	    <div class="ibox">
	        <div class="ibox-content">
	            <div id="addDrugBtn" class="mt10 c-12b7f5 c-display-ib">
	            	<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" 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 ml10 mt10">
	            		{{r.value}}
	            	</li>	
	            	{{/each}}
	            </ul>
	        </div>
	        <div class="plr10 pr">
	        	<textarea id="adjustReasonTextarea" class="c-wp100 mt10 c-h100 ptb10 plr10" calcWorld="200">{{prescriptionAdjust.reason}}</textarea>
				<span class="c-999 wordCount">{{(prescriptionAdjust.reason && prescriptionAdjust.reason.length)||0}}/200</span>
	        </div>
	        <div class="c-tac mb15 mt15">
				<button id="confirmBtn" type="button" class="btn btn-w-m btn-success mlr20">确认</button>
				<button id="backBtn" type="button" class="btn btn-w-m btn-danger mlr20">返回</button>
			</div>
	    </div>
    </script>
    <script id="diagnosisTmpl" type="text/html">
    	<li data-code="{{data.code}}" class="fl bc-12b7f5 c-fff ptb5 plr10 c-b-r5 ml10" data-json="{{data | toJson}}">
			{{data.name}}
			<i class="fa fa-close"></i>
		</li>
    </script>
    <script id="drugTmpl" type="text/html">
    	<div class="ibox-content ">
        	<div class="pb10 plr15 mtb10 bc-f5f5fa pr" >
	        	<ul class="clearfix">
	        		<li class="fl pt10">药品：
	        			<div class="c-w200 c-vam c-display-ib">
		        			<div class="input-group ">
		                        <input value="" placeholder="请输入药品名称或拼音首码" type="text" class="j-drugName form-control c-display-ib c-w120" autocomplete="on">
		                        <div class="input-group-btn">
		                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
		                        </div>
		                        <!-- /btn-group -->
		                    </div>
	                    </div>
	        		</li>
	        		<li class="fl ml10 pt10">
	        			次剂量：<i class="icon-jianshao c-vam mr5 noselect"></i> 
	        			<input type="text" placeholder="" class="j-medi-single form-control c-w80 c-display-ib c-vam">
	        			<i class="icon-xinzeng c-vam ml5 noselect"></i>
	        			<span class="j-dose-unit"></span>
	        		</li>
	        		<li class="fl ml10 pt10">天数： 
	        			<div class="c-w140 c-vam c-display-ib">
		        			<div class="input-group ">
		                        <input value="" placeholder="请输入药品天数" type="text" class="j-selDate form-control c-display-ib c-w120" autocomplete="on">
		                        <div class="input-group-btn">
		                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
		                        </div>
		                        <!-- /btn-group -->
		                    </div>
	                    </div>
	        		</li>
	        	</ul>
	        	<ul class="clearfix">
	        		<li class="fl">频次： 
	        			<div class="c-w120 c-vam c-display-ib">
		        			<div class="input-group ">
		                        <input value="" placeholder="请输入频次" type="text" class="form-control j-selFreq form-control c-display-ib c-w120" autocomplete="on">
		                        <div class="input-group-btn">
		                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
		                        </div>
		                        <!-- /btn-group -->
		                    </div>
	                    </div>
	        		</li>
	        		<li class="fl ml10">用法： 
	        			<div class="c-w120 c-vam c-display-ib">
		        			<div class="input-group ">
		                        <input value="" data-code="" placeholder="请输入用法" type="text" class="j-method form-control c-display-ib c-w120" autocomplete="on">
		                        <div class="input-group-btn">
		                            <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
		                        </div>
		                        <!-- /btn-group -->
		                    </div>
	                    </div>
	        		</li>
	        		<li class="fl ml10 pt7">总量：<span class="j-sumMedicine"></span></li>
	        	</ul>
	        	<i class="icon-shanchu"></i>
        	</div>
        </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>
    <script src="js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="js/plugins/toastr/toastr.min.js"></script>
    <script src="js/plugins/suggest/bootstrap-suggest.min.js"></script>
    <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/util.js"></script>
    <script src="js/template.js"></script>
    <script src="js/prescription-detail-api.js"></script>
    <script src="js/buz/prescription-adjustment.js"></script>
</body>
</html>
