1.界面调整

2.新增参数设置控制申请最大时间
master
wangxh 6 years ago
parent 6c9cee486d
commit 66d39b597c

@ -1,6 +1,6 @@
package com.emr.controller.otherManage; package com.emr.controller.otherManage;
import com.emr.dao.EmrComomSetMapper; import com.alibaba.fastjson.JSON;
import com.emr.entity.EmrComomSet; import com.emr.entity.EmrComomSet;
import com.emr.entity.ResultUtil; import com.emr.entity.ResultUtil;
import com.emr.service.CommomSetService; import com.emr.service.CommomSetService;
@ -38,4 +38,11 @@ public class CommomSetController {
return ResultUtil.error("保存出错了,请联系系统管理员"); return ResultUtil.error("保存出错了,请联系系统管理员");
} }
} }
@RequestMapping(value = "getCommomSetList")
@ResponseBody
public String getCommomSetList(){
EmrComomSet comomSet = commomSetService.selectByPrimaryKey(1);
return JSON.toJSONString(comomSet);
}
} }

@ -7,6 +7,10 @@ public class EmrComomSet implements Serializable {
private Short times; private Short times;
private int defaultDay;
private int maxDay;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Integer getId() { public Integer getId() {
@ -25,6 +29,22 @@ public class EmrComomSet implements Serializable {
this.times = times; this.times = times;
} }
public int getDefaultDay() {
return defaultDay;
}
public void setDefaultDay(int defaultDay) {
this.defaultDay = defaultDay;
}
public int getMaxDay() {
return maxDay;
}
public void setMaxDay(int maxDay) {
this.maxDay = maxDay;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -33,6 +53,8 @@ public class EmrComomSet implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", times=").append(times); sb.append(", times=").append(times);
sb.append(", defaultDay=").append(defaultDay);
sb.append(", maxDay=").append(maxDay);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

@ -4,9 +4,11 @@
<resultMap id="BaseResultMap" type="com.emr.entity.EmrComomSet" > <resultMap id="BaseResultMap" type="com.emr.entity.EmrComomSet" >
<id column="id" property="id" jdbcType="INTEGER" /> <id column="id" property="id" jdbcType="INTEGER" />
<result column="times" property="times" jdbcType="SMALLINT" /> <result column="times" property="times" jdbcType="SMALLINT" />
<result column="defaultDay" property="defaultDay" jdbcType="INTEGER" />
<result column="maxDay" property="maxDay" jdbcType="INTEGER" />
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, times id, times, defaultDay, maxDay
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
@ -19,8 +21,8 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.emr.entity.EmrComomSet" > <insert id="insert" parameterType="com.emr.entity.EmrComomSet" >
insert into emr_comom_set (id, times) insert into emr_comom_set (id, times, defaultDay, maxDay)
values (#{id,jdbcType=INTEGER}, #{times,jdbcType=SMALLINT}) values (#{id,jdbcType=INTEGER}, #{times,jdbcType=SMALLINT}, #{defaultDay,jdbcType=INTEGER}, #{maxDay,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.emr.entity.EmrComomSet" > <insert id="insertSelective" parameterType="com.emr.entity.EmrComomSet" >
insert into emr_comom_set insert into emr_comom_set
@ -31,6 +33,12 @@
<if test="times != null" > <if test="times != null" >
times, times,
</if> </if>
<if test="defaultDay != null" >
defaultDay,
</if>
<if test="maxDay != null" >
maxDay,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" > <if test="id != null" >
@ -39,6 +47,12 @@
<if test="times != null" > <if test="times != null" >
#{times,jdbcType=SMALLINT}, #{times,jdbcType=SMALLINT},
</if> </if>
<if test="defaultDay != null" >
#{defaultDay,jdbcType=INTEGER},
</if>
<if test="maxDay != null" >
#{maxDay,jdbcType=INTEGER},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.EmrComomSet" > <update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.EmrComomSet" >
@ -47,12 +61,18 @@
<if test="times != null" > <if test="times != null" >
times = #{times,jdbcType=SMALLINT}, times = #{times,jdbcType=SMALLINT},
</if> </if>
<if test="defaultDay != null" >
#{defaultDay,jdbcType=INTEGER},
</if>
<if test="maxDay != null" >
#{maxDay,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.EmrComomSet" > <update id="updateByPrimaryKey" parameterType="com.emr.entity.EmrComomSet" >
update emr_comom_set update emr_comom_set
set times = #{times,jdbcType=SMALLINT} set times = #{times,jdbcType=SMALLINT}, defaultDay = #{defaultDay,jdbcType=INTEGER}, maxDay = #{maxDay,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
</mapper> </mapper>

@ -98,12 +98,32 @@
name="times" id="times" oninput="if(value.length>1)value=value.slice(0,1)"> name="times" id="times" oninput="if(value.length>1)value=value.slice(0,1)">
</div> </div>
</div> </div>
<div class="searchInputElement left" style="margin-left: 10px; margin-top: 20px;">
<div class="searchElement left">
<label class="labelDiv">申请日期默认可申请天数:</label>
</div>
<div class="searchInput left">
<input type="number" min="1" max="365" class="form-control input-sm" value="${comomSet.defaultDay}"
name="defaultDay" id="defaultDay" onblur="checkNum('defaultDay')">
</div>
</div>
<div class="searchInputElement left" style="margin-left: 10px; margin-top: 20px;">
<div class="searchElement left">
<label class="labelDiv">申请日期最大可申请天数:</label>
</div>
<div class="searchInput left">
<input type="number" min="1" max="365" class="form-control input-sm" value="${comomSet.maxDay}"
name="maxDay" id="maxDay" onblur="checkNum('maxDay')">
</div>
</div>
</form> </form>
</div> </div>
<div class="btnsDiv"> <div class="btnsDiv">
<shiro:hasPermission name="/commomSet/update"> <div style="margin-top: 130px;">
<button type="button" class="btn btn-sm btn-primary btns" onclick="save()">保存</button> <shiro:hasPermission name="/commomSet/update">
</shiro:hasPermission> <button type="button" class="btn btn-sm btn-primary btns" onclick="save()">保存</button>
</shiro:hasPermission>
</div>
</div> </div>
</div> </div>
<script type="text/javascript" src="${path}/static/js/otherManage/commomSet.js?t=4"></script> <script type="text/javascript" src="${path}/static/js/otherManage/commomSet.js?t=4"></script>

@ -100,18 +100,18 @@
<div class="searchDiv"> <div class="searchDiv">
<div class="searchInput left"> <div class="searchInput left">
<div class="searchElement left"> <div class="searchElement left">
<label class="labelDiv">姓名</label> <label class="labelDiv">病案号</label>
</div> </div>
<div class="searchInputElement left"> <div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="name"> <input type="text" class="form-control input-sm" id="inpatientNo">
</div> </div>
</div> </div>
<div class="searchInput left"> <div class="searchInput left">
<div class="searchElement left"> <div class="searchElement left">
<label class="labelDiv">病案号</label> <label class="labelDiv">姓名</label>
</div> </div>
<div class="searchInputElement left"> <div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="inpatientNo"> <input type="text" class="form-control input-sm" id="name">
</div> </div>
</div> </div>
<div class="searchInput left"> <div class="searchInput left">

@ -100,18 +100,18 @@
<div class="searchDiv"> <div class="searchDiv">
<div class="searchInput left"> <div class="searchInput left">
<div class="searchElement left"> <div class="searchElement left">
<label class="labelDiv">姓名</label> <label class="labelDiv">病案号</label>
</div> </div>
<div class="searchInputElement left"> <div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="name"> <input type="text" class="form-control input-sm" id="inpatientNo">
</div> </div>
</div> </div>
<div class="searchInput left"> <div class="searchInput left">
<div class="searchElement left"> <div class="searchElement left">
<label class="labelDiv">病案号</label> <label class="labelDiv">姓名</label>
</div> </div>
<div class="searchInputElement left"> <div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="inpatientNo"> <input type="text" class="form-control input-sm" id="name">
</div> </div>
</div> </div>
<div class="searchInput left"> <div class="searchInput left">

@ -12,7 +12,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7> <meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bower_components/bootstrap-table/bootstrap-table.min.css" type="text/css"> <link rel="stylesheet"
href="${path}/static/bootstrap-3.3.7/bower_components/bootstrap-table/bootstrap-table.min.css"
type="text/css">
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.css" type="text/css"> <link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.css" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet"/> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet"/>
@ -220,13 +222,13 @@
</div> </div>
<!--表格头--> <!--表格头-->
<input type="hidden" id="tableThNames" <input type="hidden" id="tableThNames"
value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,联系地址,入院日期,出院日期,出院科室,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,是否有手术"> value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,是否有手术">
<!--查询字段--> <!--查询字段-->
<input type="hidden" id="englishFields" <input type="hidden" id="englishFields"
value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.home_addr,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper"> value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper">
<!--数据字段--> <!--数据字段-->
<input type="hidden" id="fields" <input type="hidden" id="fields"
value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,homeAddr,admissDate,disDate,disDept,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,isOper"> value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,isOper">
<!--显示字段--> <!--显示字段-->
<input type="hidden" id="fieldCns"> <input type="hidden" id="fieldCns">
<!--查询总行数--> <!--查询总行数-->

@ -246,8 +246,17 @@ function refreshTable(){
}) })
} }
//批量添加按钮
function addApproves(){
pickTime("effeTime5");
form5.reset();
//加载申请原因模板
loadSelect(path+ '/approve/loadReasonModle','parentId5','');
}
//添加按钮 //添加按钮
function addApprove(){ function addApprove(){
pickTime("effeTime");
setFormToken(); setFormToken();
$("#inpatientNo").removeAttr("readonly"); $("#inpatientNo").removeAttr("readonly");
$("#name").removeAttr("readonly"); $("#name").removeAttr("readonly");
@ -326,6 +335,7 @@ function addSimple(){
} }
//编辑 //编辑
function updateApprove(id){ function updateApprove(id){
pickTime("effeTime")
//加载申请原因模板 //加载申请原因模板
loadSelect(path+ '/approve/loadReasonModle','parentId',''); loadSelect(path+ '/approve/loadReasonModle','parentId','');
$("#inpatientNo").prop("readonly",true); $("#inpatientNo").prop("readonly",true);

@ -11,7 +11,6 @@ function add(){
//封装模态框保存公共方法applyState:提交状态1保存未提交2已提交.msg:操作后提示信息 //封装模态框保存公共方法applyState:提交状态1保存未提交2已提交.msg:操作后提示信息
function saveMethod(applyState){ function saveMethod(applyState){
debugger
var inpatientNo = $("#inpatientNo").val(); var inpatientNo = $("#inpatientNo").val();
var name = $("#name").val(); var name = $("#name").val();
if($("#effeTime").val() != ''){ if($("#effeTime").val() != ''){

@ -88,6 +88,23 @@ $('#mytab').bootstrapTable({
title:'有效天数', title:'有效天数',
field:'effeDays', field:'effeDays',
}, },
{
title:'审批状态',
field:'approveState',
formatter: function (value, row, index) {
var spanValue;
if(value == '已过期'){
spanValue = '<p class="text-danger">已过期</p>';
}else if(value == '待审批'){
spanValue = '<p style="color:grey">待审批</p>';
}else if(value == '审核通过'){
spanValue = '<p class="text-success">审核通过</p>';
}else if(value == '审核不通过'){
spanValue = '<p class="text-danger">审核不通过</p>';
}
return spanValue;
}
},
{ {
title:'姓名', title:'姓名',
field:'name', field:'name',
@ -113,23 +130,6 @@ $('#mytab').bootstrapTable({
title:'申请类型', title:'申请类型',
field:'applyType', field:'applyType',
}, },
{
title:'审批状态',
field:'approveState',
formatter: function (value, row, index) {
var spanValue;
if(value == '已过期'){
spanValue = '<p class="text-danger">已过期</p>';
}else if(value == '待审批'){
spanValue = '<p style="color:grey">待审批</p>';
}else if(value == '审核通过'){
spanValue = '<p class="text-success">审核通过</p>';
}else if(value == '审核不通过'){
spanValue = '<p class="text-danger">审核不通过</p>';
}
return spanValue;
}
},
{ {
title:'审批时间', title:'审批时间',
field:'approveTime', field:'approveTime',

@ -54,4 +54,33 @@ function showTime(days){
} }
var eDate = year + "-" + month + "-" + strDate; var eDate = year + "-" + month + "-" + strDate;
return eDate; return eDate;
} }
function pickTime(info){
var defaultDay = new Date();
var maxDay = new Date();
$.ajax({
type:'get',
url:path+'/commomSet/getCommomSetList',
dataType:'json',
success:function(data){
if(data != null || data != ''){
defaultDay.setDate(defaultDay.getDate() + data.defaultDay);
maxDay.setDate(maxDay.getDate() + data.maxDay);
console.log("defaultDay = " + defaultDay);
console.log("maxDay =" + maxDay);
$('#'+info).datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true,//选中之后自动隐藏日期选择框,
})
$('#'+info).datepicker('setDate', defaultDay);
$('#'+info).datepicker('setEndDate', maxDay);
}
}
})
}
function getDefaultNumAndMaxNum() {
}

@ -132,7 +132,6 @@ function onloadJpgForPdf(){
} }
//记录打印记录 //记录打印记录
function printInfoBlood(){ function printInfoBlood(){
debugger
alert(2) alert(2)
var patientId = "'"+$("#patientId").val()+"'"; var patientId = "'"+$("#patientId").val()+"'";
var assortIds = $("#assortIds").val(); var assortIds = $("#assortIds").val();

@ -23,3 +23,19 @@ function save(){
toastr.warning("保存失败,组数不能为空"); toastr.warning("保存失败,组数不能为空");
} }
} }
function checkNum(numName) {
var maxNum = Number($("#maxDay").val());
var defaultNum = Number($("#defaultDay").val());
if (numName == 'defaultDay') {
if (defaultNum > maxNum) {
$("#defaultDay").val(maxNum);
}
}
if (numName == 'maxDay') {
if (maxNum < defaultNum) {
$("#maxDay").val(defaultNum);
}
}
}

@ -64,14 +64,14 @@ $('#mytab').bootstrapTable({
title:'操作人', title:'操作人',
field:'creater', field:'creater',
}, },
{
title:'姓名',
field:'name',
},
{ {
title:'病案号', title:'病案号',
field:'inpatientNo', field:'inpatientNo',
}, },
{
title:'姓名',
field:'name',
},
{ {
title:'住院次数', title:'住院次数',
field:'admissTimes', field:'admissTimes',

@ -689,7 +689,6 @@ function insertContent(content, id) {
clearContent(id); clearContent(id);
setLocation(id); setLocation(id);
var json = JSON.parse(content); var json = JSON.parse(content);
debugger
for (key in json) { for (key in json) {
console.log(key) console.log(key)
console.log(json[key]) console.log(json[key])

@ -142,7 +142,6 @@ function getSql() {
var age_month = ''; var age_month = '';
var age_day = ''; var age_day = '';
$("#block").children().find('div').each(function () { $("#block").children().find('div').each(function () {
debugger
var val = $(this).children().val(); var val = $(this).children().val();
var className = $(this).children().attr('class'); var className = $(this).children().attr('class');
if (className == 'select2') { if (className == 'select2') {
@ -237,7 +236,6 @@ function getSql() {
var orderBys = " order by " + commomtable + ".inpatient_no," + commomtable + ".admiss_times"; var orderBys = " order by " + commomtable + ".inpatient_no," + commomtable + ".admiss_times";
var sql = selectNames + fromTableNames + whereNames; var sql = selectNames + fromTableNames + whereNames;
$("#orderBys").val(orderBys); $("#orderBys").val(orderBys);
debugger
$("#sql").val(sql); $("#sql").val(sql);
console.log("sql = " + $("#sql").val()); console.log("sql = " + $("#sql").val());
//console.log(sql); //console.log(sql);

@ -759,7 +759,6 @@ function add(){
//封装模态框保存公共方法applyState:提交状态1保存未提交2已提交.msg:操作后提示信息 //封装模态框保存公共方法applyState:提交状态1保存未提交2已提交.msg:操作后提示信息
function saveMethod(applyState,msg,typeId){ function saveMethod(applyState,msg,typeId){
debugger
if($("#effeTime").val() != ''){ if($("#effeTime").val() != ''){
var patientIds = $("#check").val(); var patientIds = $("#check").val();
if(patientIds == '') { if(patientIds == '') {
@ -1032,7 +1031,6 @@ function getLockPatientIds(){
} }
//过滤下载导出pdf查看详情的patientId集合:typeId:已借阅审批病案id集合或已下载审批病案id集合 //过滤下载导出pdf查看详情的patientId集合:typeId:已借阅审批病案id集合或已下载审批病案id集合
function powerPotient(patientIds,flag,typeId){ function powerPotient(patientIds,flag,typeId){
debugger
//有权限的过滤 //有权限的过滤
//通过且未过期的可查看的 //通过且未过期的可查看的
var approves = $("#"+typeId).val(); var approves = $("#"+typeId).val();

@ -622,6 +622,7 @@ function borrowing(patientId){
//批量申请借阅 //批量申请借阅
function borrowings(){ function borrowings(){
pickTime("effeTime");
$("#typeId").val('approves'); $("#typeId").val('approves');
//加载申请借阅类型 //加载申请借阅类型
loadApplyType(1); loadApplyType(1);

Loading…
Cancel
Save