luyya 2024-07-11 18:43:15 +08:00
commit c6d45bc527
8 changed files with 242 additions and 105 deletions

View File

@ -12,25 +12,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="GAJGMC" column="GAJGMC" /> <result property="GAJGMC" column="GAJGMC" />
<result property="JCZDM" column="JCZDM" /> <result property="JCZDM" column="JCZDM" />
<result property="JCZMC" column="JCZMC" /> <result property="JCZMC" column="JCZMC" />
<result property="JCSJ" column="JCSJ" /> <result property="jcsj" column="jcsj" />
<result property="jcsjStr" column="jcsjStr" />
<result property="ZJHM" column="ZJHM" /> <result property="ZJHM" column="ZJHM" />
<result property="HCRYLB" column="HCRYLB" /> <result property="HCRYLB" column="HCRYLB" />
</resultMap> </resultMap>
<sql id="selectTbChryxxbVo"> <sql id="selectTbChryxxbVo">
select HCRYBH, XZQHDM, XZQHMC, GAJGDM, GAJGMC, JCZDM, JCZMC, JCSJ, ZJHM, HCRYLB from tb_chryxxb select HCRYBH, XZQHDM, XZQHMC, GAJGDM, GAJGMC, JCZDM, JCZMC, jcsj, DATE_FORMAT(jcsj, '%Y-%m-%d') AS jcsjStr, ZJHM, HCRYLB from tb_chryxxb
</sql> </sql>
<select id="selectTbChryxxbList" parameterType="basepro.manager.pojo.TbChryxxb" resultMap="TbChryxxbResult"> <select id="selectTbChryxxbList" parameterType="basepro.manager.pojo.TbChryxxb" resultMap="TbChryxxbResult">
<include refid="selectTbChryxxbVo"/> <include refid="selectTbChryxxbVo"/>
<where> <where>
<if test="XZQHDM != null and XZQHDM != ''"> and XZQHDM = #{XZQHDM}</if> <if test="XZQHDM != null and XZQHDM != ''"> and XZQHDM = #{XZQHDM}</if>
<if test="XZQHMC != null and XZQHMC != ''"> and XZQHMC = #{XZQHMC}</if> <if test="XZQHMC != null and XZQHMC != ''"> and XZQHMC like concat('%',#{XZQHMC},'%')</if>
<if test="GAJGDM != null and GAJGDM != ''"> and GAJGDM = #{GAJGDM}</if> <if test="GAJGDM != null and GAJGDM != ''"> and GAJGDM = #{GAJGDM}</if>
<if test="GAJGMC != null and GAJGMC != ''"> and GAJGMC = #{GAJGMC}</if> <if test="GAJGMC != null and GAJGMC != ''"> and GAJGMC like concat('%',#{GAJGMC},'%')</if>
<if test="JCZDM != null and JCZDM != ''"> and JCZDM = #{JCZDM}</if> <if test="JCZDM != null and JCZDM != ''"> and JCZDM = #{JCZDM}</if>
<if test="JCZMC != null and JCZMC != ''"> and JCZMC = #{JCZMC}</if> <if test="JCZMC != null and JCZMC != ''"> and JCZMC like concat('%',#{JCZMC},'%')</if>
<if test="JCSJ != null "> and JCSJ = #{JCSJ}</if> <if test="params.beginJcsj != null and params.beginJcsj != ''"><!-- 开始时间检索 -->
AND date_format(jcsj,'%y%m%d') &gt;= date_format(#{params.beginJcsj},'%y%m%d')
</if>
<if test="params.endJcsj != null and params.endJcsj != ''"><!-- 结束时间检索 -->
AND date_format(jcsj,'%y%m%d') &lt;= date_format(#{params.endJcsj},'%y%m%d')
</if>
<if test="ZJHM != null and ZJHM != ''"> and ZJHM = #{ZJHM}</if> <if test="ZJHM != null and ZJHM != ''"> and ZJHM = #{ZJHM}</if>
<if test="HCRYLB != null and HCRYLB != ''"> and HCRYLB = #{HCRYLB}</if> <if test="HCRYLB != null and HCRYLB != ''"> and HCRYLB = #{HCRYLB}</if>
</where> </where>
@ -51,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="GAJGMC != null and GAJGMC != ''">GAJGMC,</if> <if test="GAJGMC != null and GAJGMC != ''">GAJGMC,</if>
<if test="JCZDM != null and JCZDM != ''">JCZDM,</if> <if test="JCZDM != null and JCZDM != ''">JCZDM,</if>
<if test="JCZMC != null and JCZMC != ''">JCZMC,</if> <if test="JCZMC != null and JCZMC != ''">JCZMC,</if>
<if test="JCSJ != null ">JCSJ,</if> <if test="jcsj != null ">jcsj,</if>
<if test="ZJHM != null and ZJHM != ''">ZJHM,</if> <if test="ZJHM != null and ZJHM != ''">ZJHM,</if>
<if test="HCRYLB != null and HCRYLB != ''">HCRYLB,</if> <if test="HCRYLB != null and HCRYLB != ''">HCRYLB,</if>
</trim> </trim>
@ -63,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="GAJGMC != null and GAJGMC != ''">#{GAJGMC},</if> <if test="GAJGMC != null and GAJGMC != ''">#{GAJGMC},</if>
<if test="JCZDM != null and JCZDM != ''">#{JCZDM},</if> <if test="JCZDM != null and JCZDM != ''">#{JCZDM},</if>
<if test="JCZMC != null and JCZMC != ''">#{JCZMC},</if> <if test="JCZMC != null and JCZMC != ''">#{JCZMC},</if>
<if test="JCSJ != null ">#{JCSJ},</if> <if test="jcsj != null ">#{jcsj},</if>
<if test="ZJHM != null and ZJHM != ''">#{ZJHM},</if> <if test="ZJHM != null and ZJHM != ''">#{ZJHM},</if>
<if test="HCRYLB != null and HCRYLB != ''">#{HCRYLB},</if> <if test="HCRYLB != null and HCRYLB != ''">#{HCRYLB},</if>
</trim> </trim>
@ -78,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="GAJGMC != null and GAJGMC != ''">GAJGMC = #{GAJGMC},</if> <if test="GAJGMC != null and GAJGMC != ''">GAJGMC = #{GAJGMC},</if>
<if test="JCZDM != null and JCZDM != ''">JCZDM = #{JCZDM},</if> <if test="JCZDM != null and JCZDM != ''">JCZDM = #{JCZDM},</if>
<if test="JCZMC != null and JCZMC != ''">JCZMC = #{JCZMC},</if> <if test="JCZMC != null and JCZMC != ''">JCZMC = #{JCZMC},</if>
<if test="JCSJ != null ">JCSJ = #{JCSJ},</if> <if test="jcsj != null ">jcsj = #{jcsj},</if>
<if test="ZJHM != null and ZJHM != ''">ZJHM = #{ZJHM},</if> <if test="ZJHM != null and ZJHM != ''">ZJHM = #{ZJHM},</if>
<if test="HCRYLB != null and HCRYLB != ''">HCRYLB = #{HCRYLB},</if> <if test="HCRYLB != null and HCRYLB != ''">HCRYLB = #{HCRYLB},</if>
</trim> </trim>

View File

@ -48,7 +48,20 @@ public class TbChryxxb extends BaseEntity
/** 检查时间 */ /** 检查时间 */
@Excel(name = "检查时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "检查时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date JCSJ; private Date jcsj;
public String getJcsjStr() {
return jcsjStr;
}
public void setJcsjStr(String jcsjStr) {
this.jcsjStr = jcsjStr;
}
/**
*
*/
private String jcsjStr;
/** 查获人员身份证号码 */ /** 查获人员身份证号码 */
@Excel(name = "查获人员身份证号码") @Excel(name = "查获人员身份证号码")
@ -121,14 +134,14 @@ public class TbChryxxb extends BaseEntity
{ {
return JCZMC; return JCZMC;
} }
public void setJCSJ(Date JCSJ) public void setJcsj(Date jcsj)
{ {
this.JCSJ = JCSJ; this.jcsj = jcsj;
} }
public Date getJCSJ() public Date getJcsj()
{ {
return JCSJ; return jcsj;
} }
public void setZJHM(String ZJHM) public void setZJHM(String ZJHM)
{ {
@ -149,6 +162,7 @@ public class TbChryxxb extends BaseEntity
return HCRYLB; return HCRYLB;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -159,7 +173,8 @@ public class TbChryxxb extends BaseEntity
.append("GAJGMC", getGAJGMC()) .append("GAJGMC", getGAJGMC())
.append("JCZDM", getJCZDM()) .append("JCZDM", getJCZDM())
.append("JCZMC", getJCZMC()) .append("JCZMC", getJCZMC())
.append("JCSJ", getJCSJ()) .append("jcsj", getJcsj())
.append("jcsjStr", getJcsjStr())
.append("ZJHM", getZJHM()) .append("ZJHM", getZJHM())
.append("HCRYLB", getHCRYLB()) .append("HCRYLB", getHCRYLB())
.toString(); .toString();

View File

@ -8,7 +8,7 @@ spring:
datasource: datasource:
username: root username: root
password: root password: root
url: jdbc:mysql://localhost:3306/e3?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.0.112:3306/e3?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
devtools: devtools:

View File

@ -1,5 +1,9 @@
package basepro.manager.controller; package basepro.manager.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List; import java.util.List;
import basepro.manager.common.utils.poi.ExcelUtil; import basepro.manager.common.utils.poi.ExcelUtil;
@ -86,6 +90,16 @@ public class TbChryxxbController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TbChryxxb tbChryxxb) public AjaxResult addSave(TbChryxxb tbChryxxb)
{ {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar today = Calendar.getInstance();
today.add(Calendar.DATE,-1);
Date jcsj = today.getTime();
try {
jcsj = format.parse(tbChryxxb.getJcsjStr());
} catch (ParseException e) {
throw new RuntimeException(e);
}
tbChryxxb.setJcsj(jcsj);
int insertTbChryxxb = tbChryxxbService.insertTbChryxxb(tbChryxxb); int insertTbChryxxb = tbChryxxbService.insertTbChryxxb(tbChryxxb);
return toAjax(insertTbChryxxb); return toAjax(insertTbChryxxb);
} }
@ -110,6 +124,16 @@ public class TbChryxxbController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(TbChryxxb tbChryxxb) public AjaxResult editSave(TbChryxxb tbChryxxb)
{ {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar today = Calendar.getInstance();
today.add(Calendar.DATE,-1);
Date jcsj = today.getTime();
try {
jcsj = format.parse(tbChryxxb.getJcsjStr());
} catch (ParseException e) {
throw new RuntimeException(e);
}
tbChryxxb.setJcsj(jcsj);
return toAjax(tbChryxxbService.updateTbChryxxb(tbChryxxb)); return toAjax(tbChryxxbService.updateTbChryxxb(tbChryxxb));
} }

View File

@ -45,7 +45,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://localhost:3306/e3?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.0.112:3306/e3?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: root password: root
# 从库数据源 # 从库数据源

View File

@ -13,30 +13,22 @@
<input name="HCRYBH" class="form-control" type="text" required> <input name="HCRYBH" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划代码:</label> <label class="col-sm-4 control-label is-required">查获人员身份证号码:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input name="XZQHDM" class="form-control" type="text" required> <input name="ZJHM" class="form-control" id="ZJHM" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划名称</label> <label class="col-sm-4 control-label is-required">查获人员类别</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input name="XZQHMC" class="form-control" type="text" required> <select name="HCRYLB" class="form-control m-b" th:with="type=${@dict.getType('t_dict_chrylb')}" required>
</div> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</div> </select>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关代码:</label>
<div class="col-sm-7">
<input name="GAJGDM" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关名称:</label>
<div class="col-sm-7">
<input name="GAJGMC" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">检查站代码:</label> <label class="col-sm-4 control-label">检查站代码:</label>
<div class="col-sm-7"> <div class="col-sm-7">
@ -49,29 +41,40 @@
<input name="JCZMC" class="form-control" type="text" required> <input name="JCZMC" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划代码:</label>
<div class="col-sm-7">
<input name="XZQHDM" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划名称:</label>
<div class="col-sm-7">
<input name="XZQHMC" class="form-control" type="text" required>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关代码:</label>
<div class="col-sm-7">
<input name="GAJGDM" class="form-control" type="text" required>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关:</label>
<div class="col-sm-7">
<input type="hidden" name="GAJGDM" id="treeId"/>
<input type="text" name="GAJGMC" onclick="selectDeptTree()" id="treeName" placeholder="请选择归属机构" class="form-control"/>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">检查时间:</label> <label class="col-sm-4 control-label is-required">检查时间:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<div class="input-group date"> <div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="JCSJ" class="form-control" placeholder="yyyy-MM-dd" type="text" required> <input name="jcsjStr" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">查获人员身份证号码:</label>
<div class="col-sm-7">
<input name="ZJHM" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">查获人员类别:</label>
<div class="col-sm-7">
<select name="HCRYLB" class="form-control m-b" th:with="type=${@dict.getType('t_dict_chrylb')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
@ -84,15 +87,46 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
console.log($('#form-chryxxb-add').serialize())
debugger;
$.operate.save(prefix + "/add", $('#form-chryxxb-add').serialize()); $.operate.save(prefix + "/add", $('#form-chryxxb-add').serialize());
} }
} }
$("input[name='JCSJ']").datetimepicker({ $("input[name='jcsjStr']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function selectDeptTree() {
var treeId = $("#treeId").val();
var GAJGDM = $.common.isEmpty(treeId) ? "340000000000" : $("#treeId").val();
var type = 1;
var url = ctx + "system/dept/selectDeptTree/" + GAJGDM+"/"+type;
var options = {
title: '选择机构',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
/*document.querySelector('#ZJHM').addEventListener('blur', function() {
var idCard = this.value;
var valid = /^[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/.test(idCard);
if (!valid) {
alert('身份证号码不正确!');
}
});*/
</script> </script>
</body> </body>
</html> </html>

View File

@ -10,6 +10,9 @@
margin: 5px 5px 5px 0px; margin: 5px 5px 5px 0px;
text-align:right; text-align:right;
} }
.fixed-table-toolbar .dropdown-menu{
width: 200px;
}
</style> </style>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
@ -18,29 +21,41 @@
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <!--<li>
<p>检查站所属行政区划代码:</p> <p>检查站所属行政区划代码:</p>
<input type="text" name="XZQHDM"/> <input type="text" name="XZQHDM"/>
</li>-->
<li>
<p>查获人员身份证号码:</p>
<input type="text" name="ZJHM" placeholder="请输入正确的身份证号码查询"/>
</li>
<li>
<p>检查站名称:</p>
<input type="text" name="JCZMC"/>
</li> </li>
<li> <li>
<p>检查站所属行政区划名称:</p> <p>检查站所属行政区划名称:</p>
<input type="text" name="XZQHMC"/> <input type="text" name="XZQHMC"/>
</li> </li>
<li> <li>
<p>检查站所属公安机关代码:</p> <p>检查站所属公安机关:</p>
<input type="text" name="GAJGDM"/> <input type="hidden" name="GAJGDM" id="treeId"/>
<input type="text" name="GAJGMC" onclick="selectDeptTree()" id="treeName" placeholder="请选择归属机构" class="form-control"/>
</li> </li>
<li> <!--<li>
<p>检查站所属公安机关名称:</p> <p>检查站所属公安机关名称:</p>
<input type="text" name="GAJGMC"/> <input type="text" name="GAJGMC"/>
</li> </li>-->
<li> <!--<li>
<p>检查站代码:</p> <p>检查站代码:</p>
<input type="text" name="jczdm"/> <input type="text" name="jczdm"/>
</li> </li>-->
<li> <li>
<p>检查站名称:</p> <p>查获人员类别:</p>
<input type="text" name="JCZMC"/> <select name="HCRYLB" th:with="type=${@dict.getType('t_dict_chrylb')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li> </li>
<li class="select-time"> <li class="select-time">
<p>检查时间:</p> <p>检查时间:</p>
@ -48,17 +63,6 @@
<span>-</span> <span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endJcsj]"/> <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endJcsj]"/>
</li> </li>
<li>
<p>查获人员身份证号码:</p>
<input type="text" name="zjhm"/>
</li>
<li>
<p>查获人员类别:</p>
<select name="hcrylb" th:with="type=${@dict.getType('t_dict_chrylb')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -149,7 +153,7 @@
} }
}, },
{ {
field : 'jcsj', field : 'jcsjStr',
title : '检查时间' title : '检查时间'
}, },
{ {
@ -165,6 +169,27 @@
}; };
$.table.init(options); $.table.init(options);
}); });
function selectDeptTree() {
var treeId = $("#treeId").val();
var GAJGDM = $.common.isEmpty(treeId) ? "340000000000" : $("#treeId").val();
var type = 1;
var url = ctx + "system/dept/selectDeptTree/" + GAJGDM+"/"+type;
var options = {
title: '选择机构',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -7,29 +7,26 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-chryxxb-edit" th:object="${tbChryxxb}"> <form class="form-horizontal m" id="form-chryxxb-edit" th:object="${tbChryxxb}">
<input name="HCRYBH" th:field="*{HCRYBH}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划代码</label> <label class="col-sm-4 control-label is-required">核查人员编号</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input name="XZQHDM" th:field="*{XZQHDM}" class="form-control" type="text" required> <input name="HCRYBH" disabled class="form-control" type="text" th:field="*{HCRYBH}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">查获人员身份证号码:</label>
<div class="col-sm-7">
<input name="ZJHM" th:field="*{ZJHM}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划名称:</label> <label class="col-sm-4 control-label is-required">查获人员类别</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input name="XZQHMC" th:field="*{XZQHMC}" class="form-control" type="text" required> <!-- <input name="HCRYLB" th:field="*{HCRYLB}" class="form-control" type="text" required>-->
</div> <select name="HCRYLB" class="form-control m-b" th:with="type=${@dict.getType('t_dict_chrylb')}" th:field="*{HCRYLB}" required>
</div> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<div class="form-group"> </select>
<label class="col-sm-4 control-label is-required">检查站所属公安机关代码:</label>
<div class="col-sm-7">
<input name="GAJGDM" th:field="*{GAJGDM}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关名称:</label>
<div class="col-sm-7">
<input name="GAJGMC" th:field="*{GAJGMC}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -44,27 +41,42 @@
<input name="JCZMC" th:field="*{JCZMC}" class="form-control" type="text" required> <input name="JCZMC" th:field="*{JCZMC}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划代码:</label>
<div class="col-sm-7">
<input name="XZQHDM" th:field="*{XZQHDM}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属行政区划名称:</label>
<div class="col-sm-7">
<input name="XZQHMC" th:field="*{XZQHMC}" class="form-control" type="text" required>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关代码:</label>
<div class="col-sm-7">
<input name="GAJGDM" th:field="*{GAJGDM}" class="form-control" type="text" required>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-4 control-label is-required">检查站所属公安机关:</label>
<div class="col-sm-7">
<!-- <input name="GAJGMC" th:field="*{GAJGMC}" class="form-control" type="text" required>-->
<input type="hidden" name="GAJGDM" id="treeId" th:field="*{GAJGDM}"/>
<input type="text" name="GAJGMC" onclick="selectDeptTree()" th:field="*{GAJGMC}" id="treeName" placeholder="请选择归属机构" class="form-control"/>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">检查时间:</label> <label class="col-sm-4 control-label is-required">检查时间:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<div class="input-group date"> <div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="JCSJ" th:value="${#dates.format(tbChryxxb.JCSJ, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required> <input name="jcsjStr" th:value="${#dates.format(tbChryxxb.jcsj, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">查获人员身份证号码:</label>
<div class="col-sm-7">
<input name="ZJHM" th:field="*{ZJHM}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">查获人员类别:</label>
<div class="col-sm-7">
<input name="HCRYLB" th:field="*{HCRYLB}" class="form-control" type="text" required>
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
@ -81,11 +93,32 @@
} }
} }
$("input[name='JCSJ']").datetimepicker({ $("input[name='jcsjStr']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function selectDeptTree() {
var treeId = $("#treeId").val();
var GAJGDM = $.common.isEmpty(treeId) ? "340000000000" : $("#treeId").val();
var type = 1;
var url = ctx + "system/dept/selectDeptTree/" + GAJGDM+"/"+type;
var options = {
title: '选择机构',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
</script> </script>
</body> </body>
</html> </html>