初始版本
This commit is contained in:
193
src/main/webapp/WEB-INF/template/admin/add2.html
Normal file
193
src/main/webapp/WEB-INF/template/admin/add2.html
Normal file
@@ -0,0 +1,193 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<form id="addForm" action="admin/save.html" returnUrl="admin/list.html" method="post">
|
||||
<div class="appPage addPage threeColumn">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加员工</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.return('admin/list.html')" th:text="#{common.back}"></a>
|
||||
<a class="form-setting"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=admin');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="admin">
|
||||
<div class="input-wrapper">
|
||||
<label class="required" for="username" th:text="#{admin.username}"></label>
|
||||
<input class="text" id="username"
|
||||
name="username"
|
||||
type="text" autocomplete="off">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="code">员工编号</label>-->
|
||||
<!-- <input class="text" id="code" name="code" type="text" autocomplete="off">-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper">
|
||||
<label for="name" th:text="#{admin.name}"></label>
|
||||
<input class="text" id="name"
|
||||
name="name"
|
||||
type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper"><label for="phone" th:text="#{admin.phone}"></label><input
|
||||
class="text" id="phone"
|
||||
name="phone"
|
||||
type="text" autocomplete="off">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper"><label for="sex" th:text="#{admin.sex}"></label>-->
|
||||
<!-- <select name="sex" id="sex">-->
|
||||
<!-- <option th:each="sex : ${sexs}" th:value="${sex}" th:text="${sex.message}"></option>-->
|
||||
<!-- </select></div>-->
|
||||
<div class="input-wrapper">
|
||||
<label for="isEnabled" th:text="#{admin.isEnabled}"></label>
|
||||
<div id="isEnabled" class="common-single-checkbox form-item" data-name="isEnabled"
|
||||
data-init="true"></div>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="roleId" th:text="#{admin.role}"></label>
|
||||
<select name="roleId" id="roleId" data-multiple="true">
|
||||
<option th:each="role : ${roles}" th:value="${role.id}" th:text="${role.chineseName}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="productTypeIds" >负责产品类型</label>-->
|
||||
<!-- <select name="productTypeIds" id="productTypeIds" data-multiple="true">-->
|
||||
<!-- <option th:each="productType : ${productTypeList}" th:value="${productType.id}" th:text="${productType.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="departmentId">部门</label>
|
||||
<select name="department.id" id="departmentId" data-not-select>
|
||||
<option th:each="item : ${departments}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="companyId">公司</label>-->
|
||||
<!-- <select name="company.id" id="companyId" data-not-select>-->
|
||||
<!-- <option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper">
|
||||
<label for="idCard">身份证号</label>
|
||||
<input class="text" id="idCard" name="idCard" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="email">邮箱</label>
|
||||
<input class="text" id="email" name="email" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="nationalityType">民族</label>
|
||||
<select name="nationalityType" id="nationalityType">
|
||||
<option th:each="item : ${nationalityTypes}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="education">学历</label>
|
||||
<select name="education" id="education">
|
||||
<option th:each="item : ${educations}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="workingState">在职状态</label>
|
||||
<select name="workingState" id="workingState">
|
||||
<option th:each="item : ${workingStates}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="censusRegister">户籍地址</label>
|
||||
<input class="text" id="censusRegister" name="censusRegister" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="presentAddress">现在所居地</label>
|
||||
<input class="text" id="presentAddress" name="presentAddress" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="hireDate">入职时间</label>
|
||||
<input class="text filter-date" id="hireDate" name="hireDate">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="reservoir">库区</label>-->
|
||||
<!-- <select name="reservoir" id="reservoir" data-not-select>-->
|
||||
<!-- <option th:each="item : ${reservoirs}" th:value="${item}" th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="visibleCompanyId">可见公司</label>-->
|
||||
<!-- <select name="visibleCompanyId" id="visibleCompanyId" data-multiple="true">-->
|
||||
<!-- <option value="-1">全可见</option>-->
|
||||
<!-- <option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="visibleDepartmentId">可见部门</label>-->
|
||||
<!-- <select name="visibleDepartmentId" id="visibleDepartmentId" data-multiple="true">-->
|
||||
<!-- <option value="-1">全可见</option>-->
|
||||
<!-- <option th:each="item : ${departments}" th:value="${item.id}" th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!--<div class="input-wrapper">
|
||||
<label>只能看到自己创建的合同</label>
|
||||
<div class="common-single-checkbox" data-name="onlySeeSelfFlag"></div>
|
||||
</div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="departureDate">离职时间</label>-->
|
||||
<!-- <input class="text filter-date" id="departureDate" name="departureDate">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="casualWorker">是否为临时工</label>-->
|
||||
<!-- <div id="casualWorker" class="common-single-checkbox form-item" data-name="casualWorker"-->
|
||||
<!-- data-init="false"></div>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper" th:each="data : ${session.eField.list('admin')}">
|
||||
<label th:for="${data.fieldName}" th:text="${data.name}"></label>
|
||||
<input class="text" th:id="${data.fieldName}" th:name="${data.fieldName}"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('admin/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {
|
||||
username: {
|
||||
required: true,
|
||||
remote: {
|
||||
url: "admin/usernameIsExist.html",
|
||||
type: "post"
|
||||
},
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
username: {
|
||||
required: "必填",
|
||||
remote: "[[#{admin.validate.usernameIsExist}]]"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function (result) {
|
||||
result = JSON.parse(result);
|
||||
if (result.type !== "error") {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
} else {
|
||||
Dialog.error(result.content);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user