123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
- <head>
- <th:block th:include="include :: header('修改网格人员管理')" />
- <th:block th:include="include :: datetimepicker-css" />
- </head>
- <body class="white-bg">
- <div class="wrapper wrapper-content animated fadeInRight ibox-content">
- <form class="form-horizontal m" id="form-gridPerson-edit" th:object="${busGridPersonInfo}">
- <input name="gridPersonId" th:field="*{gridPersonId}" type="hidden">
- <input name="deptId" th:field="*{deptId}" class="form-control" type="hidden" id="treeId">
- <div class="form-group">
- <label class="col-sm-3 control-label">归属部门:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{deptName}" required>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">网格人员姓名:</label>
- <div class="col-sm-8">
- <input name="personName" th:field="*{personName}" class="form-control" type="text">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">性别:</label>
- <div class="col-sm-8">
- <select name="personSex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{personSex}"></option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">手机号:</label>
- <div class="col-sm-8">
- <input name="personPhone" th:field="*{personPhone}" class="form-control" type="text">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">身份证号:</label>
- <div class="col-sm-8">
- <input name="personIdcard" th:field="*{personIdcard}" class="form-control" type="text">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">所属岗位:</label>
- <div class="col-sm-8">
- <select name="postId" class="form-control m-b" th:with="type=${@dict.getType('grid_person_type')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{postId}"></option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">入职时间:</label>
- <div class="col-sm-8">
- <div class="input-group date">
- <input name="wordTime" th:value="${#dates.format(busGridPersonInfo.wordTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <th:block th:include="include :: footer" />
- <th:block th:include="include :: datetimepicker-js" />
- <script th:inline="javascript">
- var prefix = ctx + "grid/gridPerson";
- $("#form-gridPerson-edit").validate({
- focusCleanup: true
- });
- function submitHandler() {
- if ($.validate.form()) {
- $.operate.save(prefix + "/edit", $('#form-gridPerson-edit').serialize());
- }
- }
- $("input[name='wordTime']").datetimepicker({
- format: "yyyy-mm-dd",
- minView: "month",
- autoclose: true
- });
- /*网格人员管理-修改-选择部门树*/
- function selectDeptTree() {
- var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
- var url = ctx + "system/dept/selectDeptTree/" + deptId;
- var options = {
- title: '选择部门',
- width: "380",
- url: url,
- callBack: doSubmit
- };
- $.modal.openOptions(options);
- }
- function doSubmit(index, layero){
- var tree = layero.find("iframe")[0].contentWindow.$._tree;
- if ($.tree.notAllowParents(tree)) {
- var body = layer.getChildFrame('body', index);
- $("#treeId").val(body.find('#treeId').val());
- $("#treeName").val(body.find('#treeName').val());
- layer.close(index);
- }
- }
- </script>
- </body>
- </html>
|