You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pj2rkg5ve/runtime/temp/887c44570a7ceda7d846cf37b29...

168 lines
7.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:97:"/alidata/www/myproject/hospital/public/../application/admin/view/patient_medical/add_medical.html";i:1590930493;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加药单</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/hospital/public/static/admin/x-admin/css/font.css">
<link rel="stylesheet" href="/hospital/public/static/admin/x-admin/css/xadmin.css">
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="/hospital/public/static/admin/x-admin/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/hospital/public/static/admin/x-admin/js/xadmin.js"></script>
<script src="/hospital/public/static/company/H_plus/js/jquery.min.js?v=2.1.4"></script>
<script src="/hospital/public/static/company/H_plus/js/bootstrap.min.js?v=3.3.6"></script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<!-- 让IE8/9支持媒体查询从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="layui-anim layui-anim-up">
<div class="x-body layui-anim layui-anim-up">
<form method="post" class="layui-form layui-col-md12 x-so" action="<?php echo url('PatientMedical/addMedical'); ?>">
<!-- <input type="hidden" class="layui-input" id="drugs" name="drugs" value="<?php echo $drugs; ?>">-->
<table class="layui-table">
<thead>
<tr>
<td style="background-color: #99CCCC">
<label class="layui-form-label">流水号:</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="code" value="" required="" aria-required="true" placeholder="请输入流水号">
</div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td style="background-color: #99CCCC">
<label class="layui-form-label">开 </label>
<div class="layui-input-block" id="">
<input type="number" class="layui-input" id="drugsNumber" name="drugsNumber" required="" aria-required="true" placeholder="请输入数量">&nbsp;&nbsp;&nbsp;种药品
</div>
</td>
</tr>
</tbody>
<tbody id="medical">
</tbody>
</table>
<div class="layui-form-item">
<input class="layui-btn" type="submit" value="添加" id="sub">
</div>
<!-- <p id="p_val" val="<?php echo json_encode($zzc);?>"></p>-->
</form>
</div>
</div>
</div>
</div>
<!--input框中输入数字动态生成内容-->
<script>
// var b = $('#p_val').attr('val');
// var b_json = eval('('+b+')');
// var test = <?php echo $test; ?>;
// var a_json = <?php echo $a; ?>;
// var test = request.getParameter("${test}");
// var medical = eval('${drugs}');
// var medical = document.getElementById("drugs");
// console.log(b_json.name);
$('#drugsNumber').bind('input propertychange',function() {
$("#medical").empty();
var text = $('input[name="drugsNumber"]').val();
//console.log(text);
for (let i =1,drugs=1,quantity=1;i<=text;i++,quantity++,drugs++){
$(" <tr><td>"
+"<label class='layui-form-label'>药单"+i+"</label>"
+"<div class='layui-input-inline'>"
+"<input type='text' class='layui-input' name='drugs["+drugs+"]' placeholder='请输入药品名称' required='' aria-required='true'>"
// +"<input type='text' class='layui-input' name='drugs"+i+"' placeholder='请输入药品名称' required='' aria-required='true'>"
// +"<select class='form-control select' name='"+drugs+"'>"
// +"<option value='0'>请选择药品</option>"
// +"<?php if(is_array($drugs) || $drugs instanceof \think\Collection || $drugs instanceof \think\Paginator): if( count($drugs)==0 ) : echo "" ;else: foreach($drugs as $key=>$v): ?>"
// +"<option value='<?php echo $v['id']; ?>' ><?php echo $v['name']; ?></option>"
// +"<?php endforeach; endif; else: echo "" ;endif; ?>"
// +"</select>"
+"</div>"
+"<div class='layui-input-inline'>"
+"<label class='layui-form-label'>数量:</label>"
+"<div class='layui-input-block'>"
+"<input type='text' class='layui-input' name='quantity["+quantity+"]' placeholder='请输入药品数量' required='' aria-required='true'>"
+"</div>"
+"</div>"
+"</td>"
+" </tr>").appendTo($('#medical'));
}
});
</script>
<script>
var num = 0
function checkStrong(sValue) {
var modes = 0;
//正则表达式验证符合要求的
if (sValue.length < 1) return modes;
if (/\d/.test(sValue)) modes++; //数字
if (/[a-z]/.test(sValue)) modes++; //小写
if (/[A-Z]/.test(sValue)) modes++; //大写
if (/\W/.test(sValue)) modes++; //特殊字符
//逻辑处理
switch (modes) {
case 1:
return 1;
break;
case 2:
return 2;
case 3:
case 4:
return sValue.length < 12 ? 3 : 4
break;
}
}
$("input[name='password']").bind("input propertychange",function(){
let val = $(this).val();//获得输入的值
num = checkStrong(val)
//修改密码颜色
let tds = document.getElementById("password")
if(num==0||num==1){
tds.style.backgroundColor="pink";
}else if (num == 2) {
tds.style.backgroundColor="lightyellow";
}
else {
tds.style.backgroundColor="lightgreen";
}
});
// $(document).ready(function () {
// $("#sub").click(function () {
// if (num <= 1) {
// $("input[name='check']").bind("input propertychange",function() {
// $(this).val() =;//获得输入的值
// })
// }
// })
// })
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>
<!-- Mirrored from www.zi-han.net/theme/hplus/form_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:15 GMT -->
</html>