初始版本
This commit is contained in:
BIN
src/main/webapp/WEB-INF/lib/IKAnalyzer2012_u6.jar
Normal file
BIN
src/main/webapp/WEB-INF/lib/IKAnalyzer2012_u6.jar
Normal file
Binary file not shown.
BIN
src/main/webapp/WEB-INF/lib/core.jar
Normal file
BIN
src/main/webapp/WEB-INF/lib/core.jar
Normal file
Binary file not shown.
147
src/main/webapp/WEB-INF/template/admin/add.html
Normal file
147
src/main/webapp/WEB-INF/template/admin/add.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<!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">
|
||||
<style>
|
||||
.input-wrapper {
|
||||
padding: 15px 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div style="display: block;width:100%;border-bottom: 2px solid #E9E9E9;padding: 0 30px;margin-bottom: 15px"><span style="font-weight: bold;font-size: 16px;line-height: 40px">基本信息</span></div>
|
||||
<div class="input-wrapper">
|
||||
<label class="required" th:text="#{admin.username}"></label>
|
||||
<input class="text" id="username"
|
||||
name="username"
|
||||
type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label th:text="#{admin.name}"></label>
|
||||
<input class="text" id="name"
|
||||
name="name"
|
||||
type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper"><label th:text="#{admin.phone}"></label><input
|
||||
class="text" id="phone"
|
||||
name="phone"
|
||||
type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label 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>部门</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 th:text="|账号#{admin.isEnabled}|"></label>
|
||||
<div id="isEnabled" class="common-single-checkbox form-item" data-name="isEnabled"
|
||||
data-init="true"></div><span style="vertical-align: middle;">正常</span>
|
||||
</div>
|
||||
|
||||
<div style="display: block;width:100%;border-bottom: 2px solid #E9E9E9;padding: 0 30px;margin-bottom: 15px"><span style="font-weight: bold;font-size: 16px;line-height: 40px">详细信息</span></div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label>身份证号</label>
|
||||
<input class="text" id="idCard" name="idCard" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label >邮箱</label>
|
||||
<input class="text" id="email" name="email" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>民族</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>学历</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>在职状态</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 >户籍地址</label>
|
||||
<input class="text" id="censusRegister" name="censusRegister" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>现在所居地</label>
|
||||
<input class="text" id="presentAddress" name="presentAddress" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label >入职时间</label>
|
||||
<input class="text filter-date" id="hireDate" name="hireDate">
|
||||
</div>
|
||||
<div class="input-wrapper" th:each="data : ${session.eField.list('admin')}">
|
||||
<label th:text="${data.name}"></label>
|
||||
<input class="text" th:id="${data.fieldName}" th:name="${data.fieldName}"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="formBtns formBtnsExtra">
|
||||
<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>
|
||||
|
||||
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>
|
||||
|
||||
205
src/main/webapp/WEB-INF/template/admin/edit.html
Normal file
205
src/main/webapp/WEB-INF/template/admin/edit.html
Normal file
@@ -0,0 +1,205 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="admin" moduleName="管理员"-->
|
||||
<form id="addForm" action="admin/update.html" method="post" returnUrl="admin/list.html">
|
||||
<input type="hidden" name="id" th:value="${admin.id}">
|
||||
<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')">返回</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">
|
||||
<style>
|
||||
.input-wrapper {
|
||||
padding: 15px 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div style="display: block;width:100%;border-bottom: 2px solid #E9E9E9;padding: 0 30px;margin-bottom: 15px"><span style="font-weight: bold;font-size: 16px;line-height: 40px">基本信息</span></div>
|
||||
<div class="input-wrapper"><label th:text="#{admin.username}"></label>
|
||||
<input class="text" name="username" id="username"
|
||||
type="text" autocomplete="off" th:value="${admin.username}" readonly></div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="code">员工编号</label>-->
|
||||
<!-- <input class="text" id="code" name="code" type="text" autocomplete="off" th:value="${admin.code}">-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper"><label th:text="#{admin.name}"></label><input class="text" name="name"
|
||||
id="name"
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
th:value="${admin.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label th:text="#{admin.phone}"></label>
|
||||
<input class="text" name="phone" id="phone"
|
||||
type="text" autocomplete="off" th:value="${admin.phone}">
|
||||
</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}"-->
|
||||
<!-- th:selected="${admin.sex == sex}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper">
|
||||
<label th:text="#{admin.role}"></label>
|
||||
<select name="roleId" id="roleId" data-multiple="true">
|
||||
<option th:data-select="${admin.roles.contains(role)}" 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:data-select="${admin.productTypeIds.contains(productType.id)}" th:each="productType : ${productTypeList}"-->
|
||||
<!-- th:value="${productType.id}" th:text="${productType.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label>部门</label>
|
||||
<select name="department.id" id="departmentId"
|
||||
th:data-init="${admin.department != null ? admin.department.id : '-1'}">
|
||||
<option th:each="item : ${departments}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label th:text="|账号#{admin.isEnabled}|"></label>
|
||||
<div id="isEnabled" class="common-single-checkbox form-item" data-name="isEnabled"
|
||||
th:data-init="${admin.isEnabled}"></div><span style="vertical-align: middle;">正常</span>
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="companyId">公司</label>-->
|
||||
<!-- <select name="company.id" id="companyId"-->
|
||||
<!-- th:data-init="${admin.company != null ? admin.company.id : '-1'}">-->
|
||||
<!-- <option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div style="display: block;width:100%;border-bottom: 2px solid #E9E9E9;padding: 0 30px;margin-bottom: 15px"><span style="font-weight: bold;font-size: 16px;line-height: 40px">详细信息</span></div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label>身份证号</label>
|
||||
<input class="text" id="idCard" name="idCard" type="text" autocomplete="off" th:value="${admin.idCard}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>邮箱</label>
|
||||
<input class="text" id="email" th:value="${admin.email}" name="email" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>民族</label>
|
||||
<select name="nationalityType" id="nationalityType" th:data-init="${admin.nationalityType}">
|
||||
<option th:each="item : ${nationalityTypes}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>学历</label>
|
||||
<select name="education" id="education" th:data-init="${admin.education}">
|
||||
<option th:each="item : ${educations}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>在职状态</label>
|
||||
<select name="workingState" id="workingState" th:data-init="${admin.workingState}">
|
||||
<option th:each="item : ${workingStates}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>户籍地址</label>
|
||||
<input class="text" id="censusRegister" name="censusRegister" type="text" autocomplete="off"
|
||||
th:value="${admin.censusRegister}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>现在所居地</label>
|
||||
<input class="text" id="presentAddress" name="presentAddress" type="text" autocomplete="off"
|
||||
th:value="${admin.presentAddress}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>入职时间</label>
|
||||
<input class="text filter-date" id="hireDate" name="hireDate"
|
||||
th:value="${#dates.format(admin.hireDate, 'yyyy-MM-dd')}">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="reservoir">库区</label>-->
|
||||
<!-- <select name="reservoir" id="reservoir"-->
|
||||
<!-- th:data-init="${admin.reservoir != null ? admin.reservoir : '-1'}">-->
|
||||
<!-- <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 th:data-select="${#arrays.contains(admin.visibleCompanyIdsStr.split(','), -1)}" value="-1">-->
|
||||
<!-- 全可见-->
|
||||
<!-- </option>-->
|
||||
<!-- <option th:data-select="${#arrays.contains(admin.visibleCompanyIdsStr.split(','), item.id.toString())}"-->
|
||||
<!-- 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 th:data-select="${#arrays.contains(admin.visibleDepartmentIdsStr.split(','), -1)}" value="-1">-->
|
||||
<!-- 全可见-->
|
||||
<!-- </option>-->
|
||||
<!-- <option th:data-select="${#arrays.contains(admin.visibleDepartmentIdsStr.split(','), item.id.toString())}"-->
|
||||
<!-- 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" th:data-init="${admin.onlySeeSelfFlag}"></div>
|
||||
</div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="departureDate">离职时间</label>-->
|
||||
<!-- <input class="text filter-date" id="departureDate" name="departureDate"-->
|
||||
<!-- th:value="${#dates.format(admin.departureDate, 'yyyy-MM-dd')}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="casualWorker">是否为临时工</label>-->
|
||||
<!-- <div id="casualWorker" class="common-single-checkbox form-item" data-name="casualWorker"-->
|
||||
<!-- th:data-init="${admin.casualWorker}"></div>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper" th:each="data : ${session.eField.list('admin')}">
|
||||
<label th:text="${data.name}"></label>
|
||||
<input class="text" th:id="${data.fieldName}" th:name="${data.fieldName}"
|
||||
th:value="${admin.extraField(data.fieldName)}" type="text">
|
||||
</div>
|
||||
<div class="formBtns formBtnsExtra">
|
||||
<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({
|
||||
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>
|
||||
196
src/main/webapp/WEB-INF/template/admin/edit2.html
Normal file
196
src/main/webapp/WEB-INF/template/admin/edit2.html
Normal file
@@ -0,0 +1,196 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="admin" moduleName="管理员"-->
|
||||
<form id="addForm" action="admin/update.html" method="post" returnUrl="admin/list.html">
|
||||
<input type="hidden" name="id" th:value="${admin.id}">
|
||||
<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')">返回</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 for="username" th:text="#{admin.username}"></label>
|
||||
<input class="text" name="username" id="username"
|
||||
type="text" autocomplete="off" th:value="${admin.username}" readonly></div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="code">员工编号</label>-->
|
||||
<!-- <input class="text" id="code" name="code" type="text" autocomplete="off" th:value="${admin.code}">-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper"><label for="name" th:text="#{admin.name}"></label><input class="text" name="name"
|
||||
id="name"
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
th:value="${admin.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="phone" th:text="#{admin.phone}"></label>
|
||||
<input class="text" name="phone" id="phone"
|
||||
type="text" autocomplete="off" th:value="${admin.phone}">
|
||||
</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}"-->
|
||||
<!-- th:selected="${admin.sex == sex}"></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"
|
||||
th:data-init="${admin.isEnabled}"></div>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="roleId" th:text="#{admin.role}"></label>
|
||||
<select name="roleId" id="roleId" data-multiple="true">
|
||||
<option th:data-select="${admin.roles.contains(role)}" 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:data-select="${admin.productTypeIds.contains(productType.id)}" 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"
|
||||
th:data-init="${admin.department != null ? admin.department.id : '-1'}">
|
||||
<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"-->
|
||||
<!-- th:data-init="${admin.company != null ? admin.company.id : '-1'}">-->
|
||||
<!-- <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" th:value="${admin.idCard}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="email">邮箱</label>
|
||||
<input class="text" id="email" th:value="${admin.email}" name="email" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="nationalityType">民族</label>
|
||||
<select name="nationalityType" id="nationalityType" th:data-init="${admin.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" th:data-init="${admin.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" th:data-init="${admin.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"
|
||||
th:value="${admin.censusRegister}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="presentAddress">现在所居地</label>
|
||||
<input class="text" id="presentAddress" name="presentAddress" type="text" autocomplete="off"
|
||||
th:value="${admin.presentAddress}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="hireDate">入职时间</label>
|
||||
<input class="text filter-date" id="hireDate" name="hireDate"
|
||||
th:value="${#dates.format(admin.hireDate, 'yyyy-MM-dd')}">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="reservoir">库区</label>-->
|
||||
<!-- <select name="reservoir" id="reservoir"-->
|
||||
<!-- th:data-init="${admin.reservoir != null ? admin.reservoir : '-1'}">-->
|
||||
<!-- <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 th:data-select="${#arrays.contains(admin.visibleCompanyIdsStr.split(','), -1)}" value="-1">-->
|
||||
<!-- 全可见-->
|
||||
<!-- </option>-->
|
||||
<!-- <option th:data-select="${#arrays.contains(admin.visibleCompanyIdsStr.split(','), item.id.toString())}"-->
|
||||
<!-- 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 th:data-select="${#arrays.contains(admin.visibleDepartmentIdsStr.split(','), -1)}" value="-1">-->
|
||||
<!-- 全可见-->
|
||||
<!-- </option>-->
|
||||
<!-- <option th:data-select="${#arrays.contains(admin.visibleDepartmentIdsStr.split(','), item.id.toString())}"-->
|
||||
<!-- 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" th:data-init="${admin.onlySeeSelfFlag}"></div>
|
||||
</div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="departureDate">离职时间</label>-->
|
||||
<!-- <input class="text filter-date" id="departureDate" name="departureDate"-->
|
||||
<!-- th:value="${#dates.format(admin.departureDate, 'yyyy-MM-dd')}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="casualWorker">是否为临时工</label>-->
|
||||
<!-- <div id="casualWorker" class="common-single-checkbox form-item" data-name="casualWorker"-->
|
||||
<!-- th:data-init="${admin.casualWorker}"></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}"
|
||||
th:value="${admin.extraField(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({
|
||||
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>
|
||||
79
src/main/webapp/WEB-INF/template/admin/import.html
Normal file
79
src/main/webapp/WEB-INF/template/admin/import.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="400" data-height="200">
|
||||
<div class="title">
|
||||
<span>客户导入</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<form id="excelForm" action="admin/doImport.html"
|
||||
enctype="multipart/form-data" method="post">
|
||||
<div class="simpleAddBody">
|
||||
<div class="form-inputs-wrapper single" id="formTable" data-id="warehouse-dialog">
|
||||
<div class="input-wrapper">
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
var file = $.trim($("#excel_file").val()).split("\\")[2]; //获取上传文件
|
||||
File = $("#excel_file")[0].files;
|
||||
console.log(File)
|
||||
console.log(File[0])
|
||||
var fromData = new FormData();
|
||||
fromData.append("excel_file", File[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: '/admin/admin/importExcel.html',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.type === "success") {
|
||||
Dialog.success(res.content);
|
||||
$(".refresh").click();
|
||||
}
|
||||
Dialog.close($dialog);
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file == "" || excel_file.length == 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else if (!/.(xls|xlsx)$/.test(excel_file)) {
|
||||
//alert("请选择excel文件");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
195
src/main/webapp/WEB-INF/template/admin/list.html
Normal file
195
src/main/webapp/WEB-INF/template/admin/list.html
Normal file
@@ -0,0 +1,195 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="admin" moduleName="管理员"-->
|
||||
<style>
|
||||
.main-body {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.main-body .list-left-wrapper {
|
||||
display: none;
|
||||
vertical-align: top;
|
||||
width: 180px;
|
||||
margin: 12px 0 0 14px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 0;
|
||||
border: 1px solid #eaeef1;
|
||||
overflow: hidden;
|
||||
z-index: 101;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.appBody.separate .main-body .list-left-wrapper {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.main-body.slide-bar .list-left-wrapper {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.main-body.slide-bar #listForm {
|
||||
display: inline-block;
|
||||
width: calc(100% - 194px);
|
||||
}
|
||||
</style>
|
||||
<div class="appPage listPage ">
|
||||
<h1 class="page-title">员工列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
|
||||
<div class="main-body" th:classappend="${session.systemSetting.departmentSidebar ? 'slide-bar' : ''}">
|
||||
<div class="list-left-wrapper">
|
||||
<ul id="departmentTree" class="ztree type-tree"></ul>
|
||||
</div>
|
||||
<form id="listForm" action="admin/list.html" method="post">
|
||||
<!-- <input type="hidden" id="treeId" name="treeId" th:value="${treeId}">-->
|
||||
<!-- <input type="hidden" id="departmentChain" name="departmentChain" th:value="${departmentChain}">-->
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="admin:add">
|
||||
<a data-permission="admin:add" class="btn activeBtn "
|
||||
href="javascript:Nav.go('admin/add.html')">添加员工
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<a class="btn" href="javascript:exportExcel('/admin/admin/export.html')">导出</a>
|
||||
<a class="btn"
|
||||
href="javascript:Dialog.functionDialog(null, null, 'excel/dialog/defaultImport.html?id=admin&name=员工');">导入</a>
|
||||
<div class="filter-wrapper" data-columns="admin-table">
|
||||
<div class="filter-item" data-column="username">
|
||||
<label>用户名:</label>
|
||||
<input class="filter-input" type="text" name="username" th:value="${query.username}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="name">
|
||||
<label>姓名:</label>
|
||||
<input class="filter-input" type="text" name="name" th:value="${query.name}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="phone">
|
||||
<label>手机号:</label>
|
||||
<input class="filter-input" type="text" name="phone" th:value="${query.phone}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="sex">
|
||||
<label>性别:</label>
|
||||
<select class="filter-select" name="sex" th:data-init="${query.sex}">
|
||||
<option value="">全部</option>
|
||||
<option value="unknown">未知</option>
|
||||
<option value="Male">男</option>
|
||||
<option value="female">女</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item" data-column="createDate">
|
||||
<label>创建日期:</label>
|
||||
<input class="filter-date" type="text" name="createDateStart"
|
||||
th:value="${#dates.format(query.createDateStart, 'yyyy-MM-dd')}" readonly> -
|
||||
<input class="filter-date" type="text" name="createDateEnd"
|
||||
th:value="${#dates.format(query.createDateEnd, 'yyyy-MM-dd')}" readonly>
|
||||
</div>
|
||||
<div class="filter-item" data-column="isEnabled">
|
||||
<label>是否可用:</label>
|
||||
<select class="filter-select" name="isEnabled" th:data-init="${query.isEnabled}">
|
||||
<option value="">全部</option>
|
||||
<option value="true">是</option>
|
||||
<option value="false">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <div class="filter-item" data-column="companyId">-->
|
||||
<!-- <label>公司:</label>-->
|
||||
<!-- <select class="filter-input" type="text" name="companyId" th:data-init="${query.companyId}">-->
|
||||
<!-- <option value="">全部</option>-->
|
||||
<!-- <option th:each="item : ${companyList}" th:value="${item.id}"-->
|
||||
<!-- th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<div class="filter-item" data-column="departmentId">
|
||||
<label>部门:</label>
|
||||
<select class="filter-input" type="text" name="departmentId"
|
||||
th:data-init="${query.departmentId}">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${departmentList}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="username">用户名</th>
|
||||
<th class="sort-bar" data-column="name">姓名</th>
|
||||
<th class="sort-bar" data-column="phone">手机号</th>
|
||||
<!-- <th data-column="role">角色</th>-->
|
||||
<th class="sort-bar" data-column="isEnabled">状态</th>
|
||||
<!-- <th data-column="company">公司</th>-->
|
||||
<th data-column="department">专业</th>
|
||||
<!-- <th data-column="mpBindingCode">微信绑定码</th>-->
|
||||
<th th:each="data : ${session.eField.list('admin')}"
|
||||
th:text="${data.name}" th:data-column="${data.fieldName}"></th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="admin : ${page.content}" th:id="${admin.id}" url="admin/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${admin.id}">
|
||||
</td>
|
||||
<td th:text="${admin.username}"></td>
|
||||
<td th:text="${admin.name}"></td>
|
||||
<td th:text="${admin.phone}"></td>
|
||||
<!-- <td>-->
|
||||
<!-- <span style="margin-right: 10px;" th:each="role : ${admin.roles}"-->
|
||||
<!-- th:text="${role.chineseName}"></span>-->
|
||||
<!-- </td>-->
|
||||
<td>
|
||||
<span class="status-dot" th:classappend="${!admin.isEnabled?'red':''}"></span>
|
||||
[[${admin.isEnabled?'启用':'禁用'}]]
|
||||
</td>
|
||||
<!-- <td th:text="${admin.company?.name}"></td>-->
|
||||
<td th:text="${admin.department?.fullName}"></td>
|
||||
<!-- <td th:text="${admin.mpBindingCode}"></td>-->
|
||||
<td th:each="data : ${session.eField.list('admin')}"
|
||||
th:text="${admin.extraField(data.fieldName)}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="admin:reset">
|
||||
<a data-permission="admin:reset#重置密码"
|
||||
th:href="|javascript:resetConfirm('${admin.id}','/admin/admin/reset.html')|">重置密码</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="admin:edit">
|
||||
<a data-permission="admin:edit"
|
||||
th:href="|javascript:Nav.go('admin/edit.html?id=${admin.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="admin:remove">
|
||||
<a data-permission="admin:remove"
|
||||
th:href="|javascript:deleteConfirm('${admin.id}','/admin/admin/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="/resources/js/z-tree/department-view.js"></script>
|
||||
<script>
|
||||
listAllType('[[${treeId}]]');
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('[[${page.orderProperty}]]', '[[${page.orderDirection}]]');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
|
||||
58
src/main/webapp/WEB-INF/template/adminPurchase/add.html
Normal file
58
src/main/webapp/WEB-INF/template/adminPurchase/add.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="adminPurchase" moduleName="设备"-->
|
||||
<form id="addForm" action="adminPurchase/save.html" returnUrl="adminPurchase/list.html" method="post">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加采购权限</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('adminPurchase/list.html')">返回</a>
|
||||
<!-- <a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=adminPurchase');">表单设置</a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="adminPurchase">
|
||||
<input hidden name="progressId" th:value="${progressId}"/>
|
||||
<div class="input-wrapper">
|
||||
<label for="adminId">员工</label>
|
||||
<select class="progress" id="adminId" name="admin.id" data-not-select="">
|
||||
<option th:each="item : ${adminList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="productTypeIds">可采购类别</label>
|
||||
<!-- <select name="productType.id" id="productType" data-not-select-->
|
||||
<!-- data-tree="productType/selectTree.html"></select>-->
|
||||
<select name="productTypeIds" style="width:500px" id="productTypeIds" data-not-select data-multiple="true">
|
||||
<option value=""></option>
|
||||
<option th:each="item : ${productTypeList}" th:value="${item.id}" th:text="|${item.name}${item.typeDescribe==null?'':('('+item.typeDescribe+')')}|"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('adminPurchase/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: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="500" data-height="350">
|
||||
<style>
|
||||
.simpleAddBody .template-btn {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>导入采购权限<a onclick="downloadTemplate()">(下载模板)</a></span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form id="excelForm" enctype="multipart/form-data" method="post">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label>导入文件</label>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
</div>
|
||||
<input hidden id="progressId" th:value="${progressId}"/>
|
||||
</div>
|
||||
<!-- <div id="formTable">-->
|
||||
<!-- <div>-->
|
||||
<!-- <input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"-->
|
||||
<!-- class="serachBarBtn iBtn"/>-->
|
||||
<!-- <input hidden id="adminId" th:value="${adminId}"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var flag = true;
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
if (flag){
|
||||
flag = false;
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
fromData.append("progressId",$("#progressId").val());
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: 'adminPurchase/import',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.close($dialog);
|
||||
Dialog.success('导入成功');
|
||||
Nav.refresh();
|
||||
flag = true;
|
||||
} else {
|
||||
flag = true;
|
||||
Dialog.error(res.errorInfo);
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
flag = true;
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Dialog.error("正在上传");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
|
||||
function downloadTemplate() {
|
||||
window.open("../../../resources/template/采购权限导入模板.xlsx")
|
||||
}
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
58
src/main/webapp/WEB-INF/template/adminPurchase/edit.html
Normal file
58
src/main/webapp/WEB-INF/template/adminPurchase/edit.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="adminPurchase" moduleName="设备"-->
|
||||
<form id="addForm" action="adminPurchase/update.html" method="post" returnUrl="adminPurchase/list.html">
|
||||
<input type="hidden" name="id" th:value="${adminPurchase.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">编辑采购权限</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('adminPurchase/list.html')">返回</a>
|
||||
<a class="form-setting"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=adminPurchase');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="adminPurchase">
|
||||
<input hidden name="progressId" th:value="${progressId}"/>
|
||||
<div class="input-wrapper">
|
||||
<label for="adminId">员工</label>
|
||||
<select class="progress" id="adminId" name="admin.id" th:data-init="${adminPurchase.admin.id}">
|
||||
<option th:each="item : ${adminList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="productTypeIds">类别</label>
|
||||
<!-- <select name="productType.id" id="productType" th:data-init="${adminPurchase.productType?.id}"-->
|
||||
<!-- data-tree="productType/selectTree.html"></select>-->
|
||||
<select name="productTypeIds" id="productTypeIds" data-multiple="true">
|
||||
<option value=""></option>
|
||||
<option th:data-select="${ids.contains(item.id)}" th:each="item : ${productTypeList}"
|
||||
th:value="${item.id}" th:text="|${item.name}${item.typeDescribe==null?'':('('+item.typeDescribe+')')}|"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('adminPurchase/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
97
src/main/webapp/WEB-INF/template/adminPurchase/list.html
Normal file
97
src/main/webapp/WEB-INF/template/adminPurchase/list.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="adminPurchase" moduleName="设备"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">采购权限列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="adminPurchase/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="adminPurchase:add">
|
||||
<a data-permission="adminPurchase:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('adminPurchase/add.html')">添加采购权限
|
||||
</a>
|
||||
<a class="btn" href="javascript:Dialog.functionDialog(null, null, 'adminPurchase/dialog/addFile.html');">导入</a>
|
||||
<!-- <a class="btn"-->
|
||||
<!-- href="javascript:Dialog.functionDialog(null, null, 'excel/dialog/defaultImport.html?id=adminPurchase&name=公称直径');">导入</a>-->
|
||||
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<th:block th:if="${company}">
|
||||
<div class="filter-wrapper" data-columns="adminPurchase-table">
|
||||
<div class="filter-item" data-column="progressId">
|
||||
<label>项目:</label>
|
||||
<select class="filter-input" type="text" name="progressId" th:data-init="${progressId}">
|
||||
<option value="">公司</option>
|
||||
<option th:each="item : ${progressList}" th:value="${item.id}" th:text="|${item.code}(${item.name})|"></option>
|
||||
</select>
|
||||
</div>
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="adminPurchase-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th:block th:if="${company}">
|
||||
<th data-column="progressCode">项目号</th>
|
||||
<th data-column="progressName">项目名称</th>
|
||||
</th:block>
|
||||
<th data-column="name">管理员</th>
|
||||
<th data-column="value">可采购类别</th>
|
||||
<th class="sort-bar" data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="adminPurchase : ${page.content}" th:id="${adminPurchase.id}"
|
||||
url="adminPurchase/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${adminPurchase.id}">
|
||||
</td>
|
||||
<th:block th:if="${company}">
|
||||
<td th:text="${adminPurchase.progressCode}"></td>
|
||||
<td th:text="${adminPurchase.progressName}"></td>
|
||||
</th:block>
|
||||
<td th:text="${adminPurchase.admin.name}"></td>
|
||||
<!-- <td th:text="${adminPurchase.productType.name}"></td>-->
|
||||
<td th:utext="${map.get(adminPurchase.id)}"></td>
|
||||
<td th:text="${#dates.format(adminPurchase.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="adminPurchase:edit">
|
||||
<a data-permission="adminPurchase:edit"
|
||||
th:href="|javascript:Nav.go('adminPurchase/edit.html?id=${adminPurchase.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="adminPurchase:remove">
|
||||
<a data-permission="adminPurchase:remove"
|
||||
th:href="|javascript:deleteConfirm('${adminPurchase.id}','/admin/adminPurchase/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,286 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="orderFileDialog" class="dialog functionDialog" data-width="700" data-height="600">
|
||||
<style>
|
||||
.functionDialog .dialogBody {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.functionDialog .dialogContent {
|
||||
background: #fdfdfd;
|
||||
}
|
||||
|
||||
.functionDialog .right-wrapper {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 465px;
|
||||
}
|
||||
|
||||
.functionDialog .main-body .head {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0 15px;
|
||||
height: 40px;
|
||||
border-bottom: 1px solid #d5d5d4;
|
||||
}
|
||||
|
||||
.functionDialog .main-body .the-title {
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.functionDialog .main-body .content {
|
||||
height: 423px;
|
||||
}
|
||||
|
||||
.functionDialog .right-wrapper .content {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.dialogFooter .confirmAndUpdate {
|
||||
display: inline-block;
|
||||
margin: 12px 15px 0 0;
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
background: #fff;
|
||||
border: 1px solid #409eff;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.layui-upload-drag {
|
||||
display: block;
|
||||
margin: 10px auto 10px auto;
|
||||
width: 258px;
|
||||
}
|
||||
|
||||
#orderFileDialog .orderAttachFileTypes {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span class="">附件</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<div class="main-body">
|
||||
<div class="right-wrapper">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th th:if="${contractFlag}">类型</th>-->
|
||||
<th>名称</th>
|
||||
<th>大小</th>
|
||||
<th>日期</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="attachFileList">
|
||||
<tr th:each="item : ${attachFileList}" th:fileId="${item.id}">
|
||||
<!-- <td th:if="${contractFlag}">-->
|
||||
<!-- <select class="orderAttachFileTypes" th:data-init="${item.orderAttachFileType}"-->
|
||||
<!-- data-change="orderAttachFileTypeChange">-->
|
||||
<!-- <option value="normal">原始合同</option>-->
|
||||
<!-- <option value="twoChapterContract">双章合同</option>-->
|
||||
<!-- <option value="twoChapterStatement">双章结算单</option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </td>-->
|
||||
<td th:text="${item.name}"></td>
|
||||
<td th:text="${item.formatSize}"></td>
|
||||
<td th:text="${#dates.format(item.date, 'yyyy-MM-dd')}"></td>
|
||||
<td>
|
||||
<i class="fa fa-eye" th:onclick="|viewFile('${item.path}')|"></i>
|
||||
<i class="fa fa-download" th:onclick="|downloadFile('${item.path}')|"></i>
|
||||
<i class="fa fa-trash" th:onclick="|deleteFile(${item.id})|"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="layui-upload-drag">
|
||||
<i class="layui-icon-upload-drag layui-icon"></i>
|
||||
<p>点击上传,或将文件拖拽到此处</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
<th:block th:if="${source != null && contentId != null}">
|
||||
<a class="confirmAndUpdate">确认并更新</a>
|
||||
</th:block>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $dialog = $("#orderFileDialog");
|
||||
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
beforeClose();
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
});
|
||||
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
upload.render({
|
||||
elem: '.layui-upload-drag',
|
||||
url: 'attachFile/uploadOss.html',
|
||||
accept: 'file',
|
||||
multiple: true,
|
||||
drag: true,
|
||||
size: FILE_UPLOAD_SIZE_LIMIT,
|
||||
data:{
|
||||
source: '[[${source}]]',
|
||||
},
|
||||
done: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
addAttachFileDom(res.data.attachFile)
|
||||
Dialog.success("上传成功");
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
before: function () {
|
||||
Dialog.waiting("文件上传中...");
|
||||
},
|
||||
error: function () {
|
||||
Dialog.error("上传失败");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var $confirmAndUpdate = $dialog.find('.confirmAndUpdate');
|
||||
$confirmAndUpdate.on('click', function () {
|
||||
var ids = [];
|
||||
var $attachFileList = $dialog.find(".attachFileList");
|
||||
$attachFileList.find('tr').each(function () {
|
||||
var id = $(this).attr('fileId');
|
||||
ids.push(id);
|
||||
});
|
||||
$.ajax({
|
||||
url: 'attachFile/updateSourceAttachFiles.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
source: '[[${source}]]',
|
||||
contentId: '[[${contentId}]]',
|
||||
attachFieldsStr: JSON.stringify(ids)
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
beforeClose();
|
||||
Dialog.close($dialog);
|
||||
Dialog.success('操作成功');
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function beforeClose() {
|
||||
var fileListDom = '';
|
||||
var i = 0;
|
||||
$(".attachFileList").find("tr").each(function () {
|
||||
var id = $(this).attr('fileId');
|
||||
if (id) {
|
||||
fileListDom += '<input type="text" name="attachFileIds" value="' + id + '" hidden>\n'
|
||||
i++;
|
||||
}
|
||||
});
|
||||
|
||||
if ('[[${attachFileWrapper}]]') {
|
||||
$("." + '[[${attachFileWrapper}]]').html(fileListDom)
|
||||
} else {
|
||||
$(".attachFileWrapper").html(fileListDom)
|
||||
}
|
||||
}
|
||||
|
||||
function addAttachFileDom(attachFile) {
|
||||
var orderAttachFileTypeHtml = '';
|
||||
if ('[[${contractFlag}]]' === 'true') {
|
||||
var $orderAttachFileType = $('<td><select class="orderAttachFileTypes" data-change="orderAttachFileTypeChange">' +
|
||||
' <option value="normal">原始合同</option>' +
|
||||
' <option value="twoChapterContract">双章合同</option>' +
|
||||
' <option value="twoChapterStatement">双章结算单</option>' +
|
||||
'</select></td>>');
|
||||
orderAttachFileTypeHtml = $orderAttachFileType.prop("outerHTML");
|
||||
}
|
||||
|
||||
$(".attachFileList").append('<tr fileId="' + attachFile.id + '">\n' +
|
||||
orderAttachFileTypeHtml +
|
||||
' <td>' + attachFile.name + '</td>\n' +
|
||||
' <td>' + attachFile.formatSize + '</td>\n' +
|
||||
' <td>' + attachFile.date + '</td>\n' +
|
||||
' <td>\n' +
|
||||
' <i class="fa fa-eye" onclick="viewFile(\'' + attachFile.path + '\')"></i> \n' +
|
||||
' <i class="fa fa-download" onclick="downloadFile(\'' + attachFile.path + '\')"></i> \n' +
|
||||
' <i class="fa fa-trash" onclick="deleteFile(' + attachFile.id + ')"></i> \n' +
|
||||
' </td>\n' +
|
||||
' </tr>')
|
||||
initSelectAction($(".attachFileList").find('tr').last().find('select'));
|
||||
}
|
||||
})
|
||||
|
||||
function viewFile(path) {
|
||||
var fileUrl = SHIYOU_DOMAIN + '/filePreview/onlinePreview?url=' + encodeURIComponent(path);
|
||||
window.open(fileUrl);
|
||||
}
|
||||
|
||||
function downloadFile(path) {
|
||||
window.open(path);
|
||||
}
|
||||
|
||||
function deleteFile(id) {
|
||||
$.ajax({
|
||||
url: "attachFile/deleteFileOss.html",
|
||||
type: "post",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.success("删除成功");
|
||||
$("tr[fileId='" + id + "']").remove();
|
||||
} else {
|
||||
Dialog.success(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
Dialog.error("删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function orderAttachFileTypeChange(e) {
|
||||
$.ajax({
|
||||
url: 'attachFile/updateOrderAttachFileType.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: e.parents('tr').attr('fileId'),
|
||||
orderAttachFileType: e.val(),
|
||||
},
|
||||
success: function (res) {
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="orderFileDialog" class="dialog functionDialog" data-width="700" data-height="600">
|
||||
<style>
|
||||
.functionDialog .dialogBody {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.functionDialog .dialogContent {
|
||||
background: #fdfdfd;
|
||||
}
|
||||
|
||||
.functionDialog .right-wrapper {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 465px;
|
||||
}
|
||||
|
||||
.functionDialog .main-body .head {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0 15px;
|
||||
height: 40px;
|
||||
border-bottom: 1px solid #d5d5d4;
|
||||
}
|
||||
|
||||
.functionDialog .main-body .the-title {
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.functionDialog .main-body .content {
|
||||
height: 423px;
|
||||
}
|
||||
|
||||
.functionDialog .right-wrapper .content {
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span class="">附件</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<div class="main-body">
|
||||
<div class="right-wrapper">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th th:if="${contractFlag}">类型</th>-->
|
||||
<th>名称</th>
|
||||
<th>大小</th>
|
||||
<th>日期</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="attachFileList">
|
||||
<tr th:each="item : ${attachFileList}" th:fileId="${item.id}">
|
||||
<!-- <td th:if="${contractFlag}" th:text="${item.orderAttachFileType.name}"></td>-->
|
||||
<td th:text="${item.name}"></td>
|
||||
<td th:text="${item.formatSize}"></td>
|
||||
<td th:text="${#dates.format(item.date, 'yyyy-MM-dd')}"></td>
|
||||
<td>
|
||||
<i class="fa fa-eye" th:onclick="|viewFile('${item.path}')|"></i>
|
||||
<i class="fa fa-download" th:onclick="|downloadFile('${item.path}')|"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $("#orderFileDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
});
|
||||
|
||||
function viewFile(path) {
|
||||
var fileUrl = SHIYOU_DOMAIN + '/filePreview/onlinePreview?url=' + encodeURIComponent(path);
|
||||
window.open(fileUrl);
|
||||
}
|
||||
|
||||
function downloadFile(path) {
|
||||
window.open(path);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
89
src/main/webapp/WEB-INF/template/attachFile/list.html
Normal file
89
src/main/webapp/WEB-INF/template/attachFile/list.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="attachFile" moduleName="设备"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">附件列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="attachFile/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
|
||||
<a class="btn refresh">刷新</a>
|
||||
<!-- <div class="filter-wrapper" data-columns="attachFile-table">-->
|
||||
<!-- <div class="filter-item" data-column="code">-->
|
||||
<!-- <label>编号</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="code" th:value="${code}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="filter-item" data-column="name">-->
|
||||
<!-- <label>名称</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="name" th:value="${name}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="filter-item" data-column="createDate">-->
|
||||
<!-- <label>创建日期:</label>-->
|
||||
<!-- <input class="filter-date" type="text" name="createDateStart"-->
|
||||
<!-- th:value="${#dates.format(createDateStart, 'yyyy-MM-dd')}" readonly> - -->
|
||||
<!-- <input class="filter-date" type="text" name="createDateEnd"-->
|
||||
<!-- th:value="${#dates.format(createDateEnd, 'yyyy-MM-dd')}" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a class="confirm-button">搜索</a>-->
|
||||
<!-- <a class="clear-filter">清除搜索</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="attachFile-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<!-- <th data-column="type">类型</th>-->
|
||||
<th data-column="name">名称</th>
|
||||
<th data-column="size">大小</th>
|
||||
<th data-column="createDate">日期</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${page.content}" th:id="${item.id}" url="attachFile/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${item.id}">
|
||||
</td>
|
||||
<!-- <td th:text="${item.orderAttachFileType.name}"></td>-->
|
||||
<td th:text="${item.name}"></td>
|
||||
<td th:text="${item.formatSize}"></td>
|
||||
<td th:text="${#dates.format(item.date, 'yyyy-MM-dd')}"></td>
|
||||
<td>
|
||||
<i class="fa fa-eye" th:onclick="|viewFile('${item.path}')|"></i>
|
||||
<i class="fa fa-download" th:onclick="|downloadFile('${item.path}')|"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
|
||||
function viewFile(path) {
|
||||
var fileUrl = SHIYOU_DOMAIN + '/filePreview/onlinePreview?url=' + encodeURIComponent(path);
|
||||
window.open(fileUrl);
|
||||
}
|
||||
|
||||
function downloadFile(path) {
|
||||
window.open(path);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
207
src/main/webapp/WEB-INF/template/bidArea/add.html
Normal file
207
src/main/webapp/WEB-INF/template/bidArea/add.html
Normal file
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="bidArea" moduleName="工序"-->
|
||||
<!--<form id="addForm" action="bidArea/save.html" th:returnUrl="|bidArea/list.html?supplierId=${supplier.id}|" method="post">-->
|
||||
<form id="addForm" action="bidArea/save.html" returnUrl="bidArea/list.html" method="post">
|
||||
<!-- <input hidden name="supplierId" th:value="${supplier.id}"/>-->
|
||||
<input type="hidden" name="progressId" th:value="${progressId}">
|
||||
<style>
|
||||
#addForm .submitBody label{
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加评标范围</h1>
|
||||
<div class="btnGroup">
|
||||
<!-- <a class="btn" th:href="|javascript:Nav.return('bidArea/list.html?supplierId=${supplier.id}')|">返回</a>-->
|
||||
<a class="btn" href="javascript:Nav.return('bidArea/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=bidArea');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="bidArea">
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="productType">类别</label>-->
|
||||
<!-- <select name="productType.id" id="productType" data-not-select data-tree="productType/selectTree.html"></select>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="diameterL">公称直径(L)</label>-->
|
||||
<!-- <input class="text" id="diameterL" name="diameterL"-->
|
||||
<!-- type="number">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="diameterS">公称直径(S)</label>-->
|
||||
<!-- <input class="text" id="diameterS" name="diameterS"-->
|
||||
<!-- type="number">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="wallThicknessL">壁厚(L)</label>-->
|
||||
<!-- <input class="text" id="wallThicknessL" name="wallThicknessL"-->
|
||||
<!-- type="number">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="wallThicknessS">壁厚(S)</label>-->
|
||||
<!-- <input class="text" id="wallThicknessS" name="wallThicknessS"-->
|
||||
<!-- type="number">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="pressureLevel">压力等级</label>-->
|
||||
<!-- <input class="text" id="pressureLevel" name="pressureLevel"-->
|
||||
<!-- type="text">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="material">材质</label>-->
|
||||
<!-- <input class="text" id="material" name="material"-->
|
||||
<!-- type="text">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="size">尺寸标准</label>-->
|
||||
<!-- <input class="text" id="size" name="size"-->
|
||||
<!-- type="text">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="endFace">端面</label>-->
|
||||
<!-- <input class="text" id="endFace" name="endFace"-->
|
||||
<!-- type="text">-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper">
|
||||
<label class="required" for="bigTypeId">大类</label>
|
||||
<select class="progress" id="bigTypeId" name="bigTypeId" data-not-select="">
|
||||
<option th:each="item : ${productTypeList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="bigTypeDes">大类描述</label>
|
||||
<input class="text" id="bigTypeDes" name="bigTypeDes"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="smallTypeId">小类</label>
|
||||
<select class="progress" id="smallTypeId" name="smallTypeId" data-not-select="">
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="smallTypeDes">小类描述</label>
|
||||
<input class="text" id="smallTypeDes" name="smallTypeDes"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="makeCode">制造形式代号</label>
|
||||
<input class="text" id="makeCode" name="makeCode"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="makeName">制造形式描述</label>
|
||||
<input class="text" id="makeName" name="makeName"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="diameterL">公称直径(L)</label>
|
||||
<select class="progress" id="diameterL" name="diameterLId" data-not-select="">
|
||||
<option th:each="item : ${diameterList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="diameterS">公称直径(S)</label>
|
||||
<select class="progress" id="diameterS" name="diameterSId" data-not-select="">
|
||||
<option th:each="item : ${diameterList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="wallThicknessL">壁厚(L)</label>
|
||||
<select class="progress" id="wallThicknessL" name="wallThicknessLId" data-not-select="">
|
||||
<option th:each="item : ${wallThicknessList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="wallThicknessS">壁厚(S)</label>
|
||||
<select class="progress" id="wallThicknessS" name="wallThicknessSId" data-not-select="">
|
||||
<option th:each="item : ${wallThicknessList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="pressureLevel">压力等级</label>
|
||||
<select class="progress" id="pressureLevel" name="pressureLevel" data-not-select="">
|
||||
<option th:each="item : ${pressureLevelList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="material">材质</label>
|
||||
<select class="progress" id="material" name="material" data-not-select="">
|
||||
<option th:each="item : ${materialList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="materialType">材质类型</label>
|
||||
<input class="text" id="materialType" name="materialType"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="size">尺寸标准</label>
|
||||
<select class="progress" id="size" name="size" data-not-select="">
|
||||
<option th:each="item : ${sizeStandardList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="endFace">端面</label>
|
||||
<select class="progress" id="endFace" name="endFace" data-not-select="">
|
||||
<option th:each="item : ${endFaceList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="formBtns">
|
||||
<!-- <a th:href="|javascript:Nav.return('bidArea/list.html?supplierId=${supplier.id}')|" class="btn">取消</a>-->
|
||||
<a href="javascript:Nav.return('bidArea/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: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.type === 'error') {
|
||||
Dialog.error(res.content)
|
||||
} else {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#bigTypeId").on("change",function () {
|
||||
$.ajax({
|
||||
url: "/admin/productType/getChild.html",
|
||||
dataType: "json",
|
||||
data:{
|
||||
id:$(this).val(),
|
||||
},
|
||||
success: function (res) {
|
||||
var tempOptions = "<option value=''></option>";
|
||||
res.data.forEach(function (item) {
|
||||
tempOptions += "<option value='" + item.id + "'>" + item.name + "</option>"
|
||||
});
|
||||
$("#smallTypeId").append(tempOptions);
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
111
src/main/webapp/WEB-INF/template/bidArea/dialog/addFile.html
Normal file
111
src/main/webapp/WEB-INF/template/bidArea/dialog/addFile.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="500" data-height="300">
|
||||
<style>
|
||||
.simpleAddBody .template-btn {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>导入供货<a onclick="downloadTemplate()">(下载模板)</a></span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form id="excelForm" enctype="multipart/form-data" method="post">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label>导入文件</label>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
</div>
|
||||
|
||||
<!-- <div id="formTable">-->
|
||||
<!-- <div>-->
|
||||
<!-- <input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"-->
|
||||
<!-- class="serachBarBtn iBtn"/>-->
|
||||
<input hidden id="adminId" th:value="${adminId}"/>
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var flag = true;
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
if (flag){
|
||||
flag = false;
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
fromData.append("adminId", $("#adminId").val());
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: 'bidArea/uploadExcel',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.close($dialog);
|
||||
Dialog.success(res.data.msg);
|
||||
Nav.refresh();
|
||||
// Dialog.functionDialog(null,null,'bidArea/uploadResult.html?successNum='+res.data.successNum+"&repeatNum="+res.data.repeatNum+"&failNum="+res.data.failNum)
|
||||
// window.open("bidArea/exportNotFund")
|
||||
flag = true;
|
||||
}else if (res.errorCode === "1") {
|
||||
Dialog.close($dialog);
|
||||
Dialog.error(res.data.msg);
|
||||
Nav.refresh();
|
||||
Dialog.functionDialog(null,null,'bidArea/uploadResult.html?successNum='+res.data.successNum+"&repeatNum="+res.data.repeatNum+"&failNum="+res.data.failNum)
|
||||
// window.open("bidArea/exportNotFund")
|
||||
flag = true;
|
||||
} else {
|
||||
flag = true;
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
flag = true;
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Dialog.error("正在上传");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
|
||||
function downloadTemplate() {
|
||||
window.open("../../../resources/template/评标范围模板.xlsx")
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="500" data-height="350">
|
||||
<style>
|
||||
.simpleAddBody .template-btn {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>导入结果</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form id="excelForm" enctype="multipart/form-data" method="post">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label>成功数量</label>-->
|
||||
<!-- <input type="text" th:value="${successNum}" class="text"/>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper">
|
||||
<label>重复数量</label>
|
||||
<input type="text" th:value="${repeatNum}" class="text"/>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>失败数量</label>
|
||||
<input type="text" th:value="${failNum}" class="text"/><a id="downLoadFail">下载</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div id="formTable">-->
|
||||
<!-- <div>-->
|
||||
<!-- <input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"-->
|
||||
<!-- class="serachBarBtn iBtn"/>-->
|
||||
<!-- <input hidden id="adminId" th:value="${adminId}"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">关闭</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var flag = true;
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#downLoadFail").on("click",function () {
|
||||
window.open("bidArea/exportNotFund.html")
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
207
src/main/webapp/WEB-INF/template/bidArea/edit.html
Normal file
207
src/main/webapp/WEB-INF/template/bidArea/edit.html
Normal file
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="bidArea" moduleName="工序"-->
|
||||
<!--<form id="addForm" action="bidArea/update.html" method="post" th:returnUrl="|bidArea/list.html?supplierId=${bidArea.supplier.id}|">-->
|
||||
<form id="addForm" action="bidArea/update.html" method="post" returnUrl="bidArea/list.html">
|
||||
<input type="hidden" name="id" th:value="${bidArea.id}">
|
||||
<input type="hidden" name="progressId" th:value="${bidArea.progressId}">
|
||||
<!-- <input type="hidden" name="supplierId" th:value="${bidArea.supplier.id}">-->
|
||||
<style>
|
||||
#addForm .submitBody label{
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">编辑产品</h1>
|
||||
<div class="btnGroup">
|
||||
<!-- <a class="btn" th:href="|javascript:Nav.go('bidArea/list.html?supplierId=${bidArea.supplier.id}')|">返回</a>-->
|
||||
<a class="btn" href="javascript:Nav.go('bidArea/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=bidArea');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="bidArea">
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="productType">类别</label>-->
|
||||
<!-- <select name="productType.id" id="productType" th:data-init="${bidArea.productType?.id}" data-tree="productType/selectTree.html"></select>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="diameterL">公称直径(L)</label>-->
|
||||
<!-- <input class="text" id="diameterL" name="diameterL"-->
|
||||
<!-- type="number" th:value="${bidArea.diameterL}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="diameterS">公称直径(S)</label>-->
|
||||
<!-- <input class="text" id="diameterS" name="diameterS"-->
|
||||
<!-- type="number" th:value="${bidArea.diameterS}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="wallThicknessL">壁厚(L)</label>-->
|
||||
<!-- <input class="text" id="wallThicknessL" name="wallThicknessL"-->
|
||||
<!-- type="number" th:value="${bidArea.wallThicknessL}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="wallThicknessS">壁厚(S)</label>-->
|
||||
<!-- <input class="text" id="wallThicknessS" name="wallThicknessS"-->
|
||||
<!-- type="number" th:value="${bidArea.wallThicknessS}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="pressureLevel">压力等级</label>-->
|
||||
<!-- <input class="text" id="pressureLevel" name="pressureLevel"-->
|
||||
<!-- type="text" th:value="${bidArea.pressureLevel}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="material">材质</label>-->
|
||||
<!-- <input class="text" id="material" name="material"-->
|
||||
<!-- type="text" th:value="${bidArea.material}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="size">尺寸标准</label>-->
|
||||
<!-- <input class="text" id="size" name="size"-->
|
||||
<!-- type="text" th:value="${bidArea.size}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="endFace">端面</label>-->
|
||||
<!-- <input class="text" id="endFace" name="endFace"-->
|
||||
<!-- type="text" th:value="${bidArea.endFace}">-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper">
|
||||
<label class="required" for="bigTypeId">大类</label>
|
||||
<select class="progress" id="bigTypeId" name="bigTypeId" th:data-init="${bidArea.bigTypeId}">
|
||||
<option th:each="item : ${bigTypeList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="bigTypeDes">大类描述</label>
|
||||
<input class="text" id="bigTypeDes" th:value="${bidArea.bigTypeDes}" name="bigTypeDes"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="smallTypeId">小类</label>
|
||||
<select class="progress" id="smallTypeId" name="smallTypeId" th:data-init="${bidArea.smallTypeId}">
|
||||
<option th:each="item : ${smallTypeList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="smallTypeDes">小类描述</label>
|
||||
<input class="text" id="smallTypeDes" th:value="${bidArea.smallTypeDes}" name="smallTypeDes"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="makeCode">制造形式代号</label>
|
||||
<input class="text" id="makeCode" name="makeCode" th:value="${bidArea.makeCode}"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="makeName">制造形式描述</label>
|
||||
<input class="text" id="makeName" name="makeName" th:value="${bidArea.makeName}"
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="diameterL">公称直径(L)</label>
|
||||
<select class="progress" id="diameterL" name="diameterLId" th:data-init="${bidArea.diameterLId}">
|
||||
<option th:each="item : ${diameterList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="diameterS">公称直径(S)</label>
|
||||
<select class="progress" id="diameterS" name="diameterSId" th:data-init="${bidArea.diameterSId}">
|
||||
<option th:each="item : ${diameterList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="wallThicknessL">壁厚(L)</label>
|
||||
<select class="progress" id="wallThicknessL" name="wallThicknessLId" th:data-init="${bidArea.wallThicknessLId}">
|
||||
<option th:each="item : ${wallThicknessList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="wallThicknessS">壁厚(S)</label>
|
||||
<select class="progress" id="wallThicknessS" name="wallThicknessSId" th:data-init="${bidArea.wallThicknessSId}">
|
||||
<option th:each="item : ${wallThicknessList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="pressureLevel">压力等级</label>
|
||||
<select class="progress" id="pressureLevel" name="pressureLevel" th:data-init="${bidArea.pressureLevel}">
|
||||
<option th:each="item : ${pressureLevelList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="material">材质</label>
|
||||
<select class="progress" id="material" name="material" th:data-init="${bidArea.material}">
|
||||
<option th:each="item : ${materialList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="materialType">材质类型</label>
|
||||
<input class="text" id="materialType" th:value="${bidArea.materialType}" name="materialType"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="size">尺寸标准</label>
|
||||
<select class="progress" id="size" name="size" th:data-init="${bidArea.size}">
|
||||
<option th:each="item : ${sizeStandardList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="endFace">端面</label>
|
||||
<select class="progress" id="endFace" name="endFace" th:data-init="${bidArea.endFace}">
|
||||
<option th:each="item : ${endFaceList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<!-- <a th:href="|javascript:Nav.go('bidArea/list.html?supplierId=${bidArea.supplier.id}')|" class="btn">取消</a>-->
|
||||
<a href="javascript:Nav.go('bidArea/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.type === 'error') {
|
||||
Dialog.error(res.content)
|
||||
} else {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#bigTypeId").on("change",function () {
|
||||
$.ajax({
|
||||
url: "/admin/productType/getChild.html",
|
||||
dataType: "json",
|
||||
data:{
|
||||
id:$(this).val(),
|
||||
},
|
||||
success: function (res) {
|
||||
var tempOptions = "<option value=''></option>";
|
||||
res.data.forEach(function (item) {
|
||||
tempOptions += "<option value='" + item.id + "'>" + item.name + "</option>"
|
||||
});
|
||||
$("#smallTypeId").append(tempOptions);
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
170
src/main/webapp/WEB-INF/template/bidArea/list.html
Normal file
170
src/main/webapp/WEB-INF/template/bidArea/list.html
Normal file
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="bidArea" moduleName="工序"-->
|
||||
<div class="appPage listPage">
|
||||
<!-- <h1 class="page-title" th:text="|供应商${supplierName}产品列表|"></h1>-->
|
||||
<h1 class="page-title" >评标范围列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<!-- <form id="listForm" th:action="|bidArea/list.html?supplierId=${supplierId}|" method="post">-->
|
||||
<form id="listForm" action="bidArea/list.html" method="post">
|
||||
<input hidden name="supplierId" th:value="${supplierId}"/>
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="bidArea:add">
|
||||
<!-- <a data-permission="bidArea:add" class="btn activeBtn"-->
|
||||
<!-- th:href="|javascript:Nav.go('bidArea/add.html?supplierId=${supplierId}')|">添加产品-->
|
||||
<!-- </a>-->
|
||||
<a data-permission="bidArea:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('bidArea/add.html')">添加评标范围
|
||||
</a>
|
||||
<a data-permission="bidArea:add" class="btn activeBtn "
|
||||
th:href="|javascript:Dialog.functionDialog(null,null,'bidArea/dialog/addFile.html')|">导入评标范围
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<shiro:hasPermission name="bidArea:remove">
|
||||
<a data-permission="bidArea:remove" class="btn batch-delete">批量删除</a>
|
||||
</shiro:hasPermission>
|
||||
<div class="filter-wrapper" data-columns="bidArea-table">
|
||||
<div class="filter-item" data-column="bigType">
|
||||
<label>大类</label>
|
||||
<input class="filter-input" type="text" name="bigType" th:value="${bigType}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="smallType">
|
||||
<label>小类</label>
|
||||
<input class="filter-input" type="text" name="smallType" th:value="${smallType}">
|
||||
</div>
|
||||
<!-- <div class="filter-item" data-column="createDate">-->
|
||||
<!-- <label>创建日期:</label>-->
|
||||
<!-- <input class="filter-date" type="text" name="createDateStart"-->
|
||||
<!-- th:value="${#dates.format(createDateStart, 'yyyy-MM-dd')}" readonly> - -->
|
||||
<!-- <input class="filter-date" type="text" name="createDateEnd"-->
|
||||
<!-- th:value="${#dates.format(createDateEnd, 'yyyy-MM-dd')}" readonly>-->
|
||||
<!-- </div>-->
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="bidArea-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th data-column="bigType">大类</th>
|
||||
<th class="sort-bar" data-column="bigDes">大类描述</th>
|
||||
<th data-column="smallType">小类</th>
|
||||
<th class="sort-bar" data-column="smallDes">小类描述</th>
|
||||
<th class="sort-bar" data-column="makeCode">制造形式代号</th>
|
||||
<th class="sort-bar" data-column="makeName">制造形式描述</th>
|
||||
<th class="sort-bar" data-column="diameterL">公称直径L</th>
|
||||
<th class="sort-bar" data-column="diameterS">公称直径S</th>
|
||||
<th class="sort-bar" data-column="wallThicknessL">壁厚L</th>
|
||||
<th class="sort-bar" data-column="wallThicknessS">壁厚S</th>
|
||||
<th class="sort-bar" data-column="pressureLevel">压力等级</th>
|
||||
<th class="sort-bar" data-column="material">材质</th>
|
||||
<th class="sort-bar" data-column="materialType">材质类型</th>
|
||||
<th class="sort-bar" data-column="size">尺寸标准</th>
|
||||
<th class="sort-bar" data-column="endFace">端面</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr th:each="bidArea : ${page.content}" th:id="${bidArea.id}" url="bidArea/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${bidArea.id}">
|
||||
</td>
|
||||
<!-- <td th:text="${typeChan.get(bidArea.id)}"></td>-->
|
||||
<td th:text="${bidArea.bigTypeName}"></td>
|
||||
<td th:text="${bidArea.bigTypeDes}"></td>
|
||||
<td th:text="${bidArea.smallTypeName}"></td>
|
||||
<td th:text="${bidArea.smallTypeDes}"></td>
|
||||
<td th:text="${bidArea.makeCode}"></td>
|
||||
<td th:text="${bidArea.makeName}"></td>
|
||||
<td th:text="${bidArea.diameterLName}"></td>
|
||||
<td th:text="${bidArea.diameterSName}"></td>
|
||||
<td th:text="${bidArea.wallThicknessLName}"></td>
|
||||
<td th:text="${bidArea.wallThicknessSName}"></td>
|
||||
<td th:text="${bidArea.pressureLevel}"></td>
|
||||
<td th:text="${bidArea.material}"></td>
|
||||
<td th:text="${bidArea.materialType}"></td>
|
||||
<td th:text="${bidArea.size}"></td>
|
||||
<td th:text="${bidArea.endFace}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="bidArea:edit">
|
||||
<a data-permission="bidArea:edit"
|
||||
th:href="|javascript:Nav.go('bidArea/edit.html?id=${bidArea.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="bidArea:remove">
|
||||
<a data-permission="bidArea:remove"
|
||||
th:href="|javascript:deleteConfirm('${bidArea.id}','/admin/bidArea/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
|
||||
$(".batch-delete").on('click', function () {
|
||||
var selectedIds = $table.selectedIds();
|
||||
if (selectedIds.length > 0) {
|
||||
var queryStr = '';
|
||||
for (var i in selectedIds) {
|
||||
if (queryStr === '') {
|
||||
queryStr += '?';
|
||||
} else {
|
||||
queryStr += '&';
|
||||
}
|
||||
queryStr += ('ids=' + selectedIds[i]);
|
||||
}
|
||||
layui.use('layer', function () {
|
||||
layer.open({
|
||||
type: 0,
|
||||
title: '提示',
|
||||
content: '确认删除' + selectedIds.length + '记录',
|
||||
btn: ['确认', '取消'],
|
||||
btn1: function (index, layero) {
|
||||
$.ajax({
|
||||
url: 'bidArea/delete.html' + queryStr,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.type === 'success') {
|
||||
layer.msg('删除成功', {icon: 1});
|
||||
layer.close(index);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
layer.msg(res.content, {icon: 2});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
btn2: function (index, layero) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
247
src/main/webapp/WEB-INF/template/client/add.html
Normal file
247
src/main/webapp/WEB-INF/template/client/add.html
Normal file
@@ -0,0 +1,247 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<form id="addForm" action="client/save.html" returnUrl="client/list.html" method="post">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加客户</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('client/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=client');" th:text="#{page.formSetting}">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch">
|
||||
<li tagindex="1" class="tag active">基本信息</li>
|
||||
<li tagindex="2" class="tag">联系人</li>
|
||||
<li tagindex="3" class="tag">银行账号</li>
|
||||
<li tagindex="4" class="tag">收货地址</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent submitBody active" data-id="client">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="taxpayerSn">税务登记号</label>
|
||||
<input class="text" id="taxpayerSn" name="taxpayerSn"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="sn">编号</label>
|
||||
<input class="text" id="sn" name="sn"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortName">简称</label>
|
||||
<input class="text" id="shortName" name="shortName"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" id="address" name="address"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="contact">联系人</label>
|
||||
<input class="text" id="contact" name="contact"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="phone">联系电话</label>
|
||||
<input class="text" id="phone" name="phone"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="landLinePhone">固定电话</label>
|
||||
<input class="text" id="landLinePhone" name="landLinePhone"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="memo">备注</label>
|
||||
<input class="text" id="memo" name="memo"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="email">邮箱</label>
|
||||
<input class="text" id="email" name="email"
|
||||
type="text">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="initialArrears">初期欠款</label>-->
|
||||
<!-- <input class="text" id="initialArrears" name="initialArrears"-->
|
||||
<!-- type="number">-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper" th:each="data : ${session.eField.list('client')}">
|
||||
<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('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="2" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>名称</label>
|
||||
<input class="text" type="text" name="contactList[0].name">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label >联系电话</label>
|
||||
<input class="text" type="text" name="contactList[0].phone">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>电子邮件</label>
|
||||
<input class="text" type="text" name="contactList[0].email">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>职位</label>
|
||||
<input class="text" type="text" name="contactList[0].position">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>传真</label>
|
||||
<input class="text" type="text" name="contactList[0].fax">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>备注</label>
|
||||
<input class="text" type="text" name="contactList[0].memo">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">删除</div>
|
||||
</div>
|
||||
<div class="addBtn">添加一行</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="3" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>银行账号</label>
|
||||
<input class="text long-input" type="text" name="bankAccountList[0].account">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>开户银行</label>
|
||||
<input class="text long-input" type="text" name="bankAccountList[0].bank">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>收款人</label>
|
||||
<input class="text long-input" type="text" name="bankAccountList[0].receiver">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">删除</div>
|
||||
</div>
|
||||
<div class="addBtn">添加一行</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="4" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>省</label>
|
||||
<select class="provinceSelect" name="cargoAddressList[0].provinceId" style="width: 150px;" data-change="provinceChange">
|
||||
<option th:each="item : ${provinceList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>市</label>
|
||||
<select class="citySelect" name="cargoAddressList[0].cityId" style="width: 150px;" data-change="cityChange">
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>区/县</label>
|
||||
<select class="countySelect" name="cargoAddressList[0].countyId" style="width: 150px;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>详细地址</label>
|
||||
<input class="text long-input" type="text" name="cargoAddressList[0].address">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">删除</div>
|
||||
</div>
|
||||
<div class="addBtn">添加一行</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").eq(0).formSetting();
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.type === 'success') {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
} else {
|
||||
Dialog.error(res.content);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
fillFirstPinyin($("#name"), $("#sn"));
|
||||
|
||||
provinceChange($(".provinceSelect"));
|
||||
function provinceChange(e) {
|
||||
var $select = e.parents('.addable-line').find('.citySelect');
|
||||
dynamicLoading(e.val(), 1, $select);
|
||||
}
|
||||
|
||||
function cityChange(e) {
|
||||
var $select = e.parents('.addable-line').find('.countySelect');
|
||||
dynamicLoading(e.val(), 2, $select);
|
||||
}
|
||||
|
||||
function dynamicLoading(parentId, grade, $select) {
|
||||
$.ajax({
|
||||
url: '/area/dynamicLoading.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
parentId: parentId,
|
||||
grade: grade
|
||||
},
|
||||
success: function (res) {
|
||||
$select.find('option').remove();
|
||||
res.forEach(function (item) {
|
||||
$select.append('<option value="' + item.id + '">' + item.name + '</option>');
|
||||
});
|
||||
$select.trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
163
src/main/webapp/WEB-INF/template/client/dialog/detail.html
Normal file
163
src/main/webapp/WEB-INF/template/client/dialog/detail.html
Normal file
@@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="salesOrderDialogInvoices" class="dialog functionDialog" data-width="900" data-height="600">
|
||||
<style>
|
||||
.main-body .content {
|
||||
max-height: 480px;
|
||||
}
|
||||
|
||||
.tool-btn {
|
||||
cursor: pointer;
|
||||
color: #1E9FFF;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>客户详情</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<div class="main-body">
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch">
|
||||
<li tagindex="1" class="tag active">合同列表</li>
|
||||
<li tagindex="2" class="tag">发票记录</li>
|
||||
<li tagindex="3" class="tag">收款列表</li>
|
||||
<li tagindex="4" class="tag">付款列表</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent active">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>合同号</th>
|
||||
<th>公司</th>
|
||||
<th>数量</th>
|
||||
<th>金额</th>
|
||||
<th>状态</th>
|
||||
<th>签订时间</th>
|
||||
<th>签订人</th>
|
||||
<th>创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${contractList}">
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${item.companyName}"></td>
|
||||
<td th:text="${item.totalCount}"></td>
|
||||
<td th:text="${item.totalAmount}"></td>
|
||||
<td th:text="${item.status.name}"></td>
|
||||
<td th:text="${#dates.format(item.orderDate, 'yyyy-MM-dd')}"></td>
|
||||
<td th:text="${item.adminName}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="2" class="tagContent">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>发票号</th>
|
||||
<th>公司</th>
|
||||
<th>数量</th>
|
||||
<th>金额</th>
|
||||
<th>状态</th>
|
||||
<th>开票时间</th>
|
||||
<th>开票人</th>
|
||||
<th>创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${invoiceList}">
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${item.companyName}"></td>
|
||||
<td th:text="${item.totalCount}"></td>
|
||||
<td th:text="${item.totalAmount}"></td>
|
||||
<td th:text="${item.status.name}"></td>
|
||||
<td th:text="${#dates.format(item.orderDate, 'yyyy-MM-dd')}"></td>
|
||||
<td th:text="${item.adminName}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="3" class="tagContent">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>公司</th>
|
||||
<th>金额</th>
|
||||
<th>状态</th>
|
||||
<th>申请时间</th>
|
||||
<th>经办人</th>
|
||||
<th>创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${receiveList}">
|
||||
<td th:text="${item.companyName}"></td>
|
||||
<td th:text="${item.amount}"></td>
|
||||
<td th:text="${item.status.name}"></td>
|
||||
<td th:text="${#dates.format(item.applyDate, 'yyyy-MM-dd')}"></td>
|
||||
<td th:text="${item.adminName}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="4" class="tagContent">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>公司</th>
|
||||
<th>金额</th>
|
||||
<th>状态</th>
|
||||
<th>申请时间</th>
|
||||
<th>经办人</th>
|
||||
<th>创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${refundApplyList}">
|
||||
<td th:text="${item.companyName}"></td>
|
||||
<td th:text="${item.amount}"></td>
|
||||
<td th:text="${item.status.name}"></td>
|
||||
<td th:text="${#dates.format(item.applyDate, 'yyyy-MM-dd')}"></td>
|
||||
<td th:text="${item.adminName}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="progressTable"></table>
|
||||
<script>
|
||||
$(function () {
|
||||
var $dialog = $("#salesOrderDialogInvoices");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
250
src/main/webapp/WEB-INF/template/client/dialog/receipt.html
Normal file
250
src/main/webapp/WEB-INF/template/client/dialog/receipt.html
Normal file
@@ -0,0 +1,250 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog">
|
||||
<style>
|
||||
.main-body .content {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.main-body .top-wrapper {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.main-body .top-wrapper .input-wrapper {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.left-wrapper .content {
|
||||
background: #f3fded;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.tableWrap .content {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.content.listBody {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content tr {
|
||||
border-bottom: 1px solid #d0d0d0;
|
||||
background: initial !important;
|
||||
}
|
||||
|
||||
.content th,
|
||||
.content td {
|
||||
border-right: 1px solid #d0d0d0;
|
||||
}
|
||||
|
||||
input.common-erp-input {
|
||||
box-sizing: border-box;
|
||||
padding: 0 13px;
|
||||
width: 200px;
|
||||
height: 33px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 3px;
|
||||
border: 1px solid rgba(231, 231, 231, 1);
|
||||
}
|
||||
|
||||
select.common-erp-select {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span th:text="#{client.collectMoney}">客户收款</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input type="hidden" name="id" th:value="${client.id}">
|
||||
<div class="main-body">
|
||||
<div class="top-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<label for="totalAmount" style="margin-right: 10px" th:text="#{client.receivingAmount}">收款金额</label>
|
||||
<input type="number" id="totalAmount" class="common-erp-input" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="accountSelector" style="margin-right: 10px" th:text="#{client.receivingAccount}">收款账号</label>
|
||||
<select id="accountSelector" class="common-erp-select">
|
||||
<option th:each="item : ${paymentAccounts}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<div class="content listBody">
|
||||
<table id="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th th:text="${receiptPoint.name() == 'order' ? '销售合同' : '销售订单单'}"></th>
|
||||
<th th:text="#{page.createDate}">创建时间</th>
|
||||
<th th:text="#{client.amountToBeReceived}">待收金额</th>
|
||||
<th th:text="#{client.theAmountOfThisCollection}">本次收款金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${list}" th:if="${item.payedAmount < item.totalAmount}">
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="amount-td" th:text="${item.totalAmount - item.payedAmount}"></td>
|
||||
<td><input th:data-id="${item.id}" class="amount-input" type="number"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel" th:text="#{page.cancel}">取消</a>
|
||||
<a class="confirm" th:text="#{page.save}">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
// $dialog.find("form").submit();
|
||||
var totalAmount = $totalAmount.val();
|
||||
var list = [];
|
||||
var account = $("#accountSelector").val();
|
||||
|
||||
if (!totalAmount) {
|
||||
Dialog.error("请输入正确的金额");
|
||||
return
|
||||
}
|
||||
|
||||
if (!account) {
|
||||
Dialog.error("请选择收款账号");
|
||||
return
|
||||
}
|
||||
|
||||
$amountInput.each(function () {
|
||||
if (parseFloat($(this).val()) > 0) {
|
||||
list.push({
|
||||
id: $(this).attr('data-id'),
|
||||
amount: $(this).val()
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
console.log(list);
|
||||
|
||||
$.ajax({
|
||||
url: '/admin/client/receipt.html',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
clientId: '[[${client.id}]]',
|
||||
totalAmount: totalAmount,
|
||||
list: list,
|
||||
account: account
|
||||
}),
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Nav.refresh();
|
||||
Dialog.exeClose($dialog, undefined, true);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
$dialog.find("form").validate({
|
||||
rules: {
|
||||
amount: {
|
||||
required: true,
|
||||
number: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
amount: {
|
||||
required: "金额不能为空",
|
||||
number: "金额为数字"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
url: "client/receipt.html",
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.close($dialog);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(resp.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
var $totalAmount = $("#totalAmount");
|
||||
var $amountInput = $(".amount-input");
|
||||
|
||||
$totalAmount.on('input', function () {
|
||||
var val = $(this).val();
|
||||
if (val < 0) {
|
||||
val = 0;
|
||||
$(this).val(val)
|
||||
}
|
||||
|
||||
if (!val) {
|
||||
$amountInput.each(function () {
|
||||
$(this).val('')
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
var sum = parseFloat(val);
|
||||
$amountInput.each(function () {
|
||||
var amountTd = parseFloat($(this).parent().siblings('.amount-td').text());
|
||||
if (sum >= amountTd) {
|
||||
$(this).val(amountTd.toFixed(3));
|
||||
sum -= amountTd;
|
||||
} else {
|
||||
$(this).val(sum.toFixed(3));
|
||||
sum = 0;
|
||||
}
|
||||
if (sum === 0) {
|
||||
return
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$amountInput.on('input', function () {
|
||||
var val = $(this).val();
|
||||
var max = parseFloat($(this).parent().siblings('.amount-td').text());
|
||||
if (val < 0) {
|
||||
val = 0;
|
||||
$(this).val(val)
|
||||
}
|
||||
|
||||
if (val > max) {
|
||||
val = max;
|
||||
$(this).val(val)
|
||||
}
|
||||
|
||||
var sum = 0;
|
||||
$amountInput.each(function () {
|
||||
var val = $(this).val();
|
||||
if (val) {
|
||||
sum += parseFloat(val);
|
||||
}
|
||||
});
|
||||
$("#totalAmount").val(sum.toFixed(3));
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
284
src/main/webapp/WEB-INF/template/client/edit.html
Normal file
284
src/main/webapp/WEB-INF/template/client/edit.html
Normal file
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="client" moduleName="客户"-->
|
||||
<form id="addForm" action="client/update.html" method="post" returnUrl="client/list.html">
|
||||
<input type="hidden" name="id" th:value="${client.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">编辑客户</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('client/list.html')">返回</a>
|
||||
<a class="form-setting"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=client');" th:text="#{page.formSetting}">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch">
|
||||
<li tagindex="1" class="tag active">基本信息</li>
|
||||
<li tagindex="2" class="tag">联系人</li>
|
||||
<li tagindex="3" class="tag">银行账号</li>
|
||||
<li tagindex="4" class="tag">收货地址</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent submitBody active" data-id="client">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name"
|
||||
type="text" th:value="${client.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="taxpayerSn">税务登记号</label>
|
||||
<input class="text" id="taxpayerSn" name="taxpayerSn"
|
||||
type="text" th:value="${client.taxpayerSn}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="sn">编号</label>
|
||||
<input class="text" id="sn" name="sn"
|
||||
type="text" th:value="${client.sn}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortName">简称</label>
|
||||
<input class="text" id="shortName" name="shortName"
|
||||
type="text" th:value="${client.shortName}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" id="address" name="address"
|
||||
type="text" th:value="${client.address}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="contact">联系人</label>
|
||||
<input class="text" id="contact" name="contact"
|
||||
type="text" th:value="${client.contact}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="phone">联系电话</label>
|
||||
<input class="text" id="phone" name="phone"
|
||||
type="text" th:value="${client.phone}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="landLinePhone">固定电话</label>
|
||||
<input class="text" id="landLinePhone" name="landLinePhone"
|
||||
type="text" th:value="${client.landLinePhone}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="memo">备注</label>
|
||||
<input class="text" id="memo" name="memo"
|
||||
type="text" th:value="${client.memo}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="email">邮箱</label>
|
||||
<input class="text" id="email" name="email"
|
||||
type="text" th:value="${client.email}">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="initialArrears">初期欠款</label>-->
|
||||
<!-- <input class="text" id="initialArrears" name="initialArrears"-->
|
||||
<!-- type="number" th:value="${client.initialArrears}" readonly>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper" th:each="data : ${session.eField.list('client')}">
|
||||
<label th:for="${data.fieldName}" th:text="${data.name}"></label>
|
||||
<input class="text" th:id="${data.fieldName}" th:name="${data.fieldName}"
|
||||
th:value="${client.extraField(data.fieldName)}" type="text">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" />
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="2" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line" th:each="contact, stat : ${client.contactList}">
|
||||
<input type="hidden" th:name="'contactList[' + ${stat.index} + '].id'"
|
||||
th:value="${contact.id}">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>名称</label>
|
||||
<input class="text" type="text" th:name="'contactList[' + ${stat.index} + '].name'"
|
||||
th:value="${contact.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>联系电话</label>
|
||||
<input class="text" type="text"
|
||||
th:name="'contactList[' + ${stat.index} + '].phone'"
|
||||
th:value="${contact.phone}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>电子邮件</label>
|
||||
<input class="text" type="text"
|
||||
th:name="'contactList[' + ${stat.index} + '].email'"
|
||||
th:value="${contact.email}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>职位</label>
|
||||
<input class="text" type="text"
|
||||
th:name="'contactList[' + ${stat.index} + '].position'"
|
||||
th:value="${contact.position}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>传真</label>
|
||||
<input class="text" type="text" th:name="'contactList[' + ${stat.index} + '].fax'"
|
||||
th:value="${contact.fax}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>备注</label>
|
||||
<input class="text" type="text" th:name="'contactList[' + ${stat.index} + '].memo'"
|
||||
th:value="${contact.memo}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">删除</div>
|
||||
</div>
|
||||
<div class="addBtn">添加一行</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" />
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="3" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line" th:each="bankAccount, stat : ${client.bankAccountList}">
|
||||
<input type="hidden" th:name="'bankAccountList[' + ${stat.index} + '].id'"
|
||||
th:value="${bankAccount.id}">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>银行账号</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'bankAccountList[' + ${stat.index} + '].account'"
|
||||
th:value="${bankAccount.account}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>开户银行</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'bankAccountList[' + ${stat.index} + '].bank'"
|
||||
th:value="${bankAccount.bank}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>收款人</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'bankAccountList[' + ${stat.index} + '].receiver'"
|
||||
th:value="${bankAccount.receiver}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">删除</div>
|
||||
</div>
|
||||
<div class="addBtn">添加一行</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="4" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line" th:each="cargoAddress, stat : ${client.cargoAddressList}">
|
||||
<input type="hidden" th:name="'cargoAddressList[' + ${stat.index} + '].id'"
|
||||
th:value="${cargoAddress.id}">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>省</label>
|
||||
<select class="provinceSelect"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].provinceId'"
|
||||
style="width: 150px;" data-change="provinceChange"
|
||||
th:data-init="${cargoAddress.provinceId}">
|
||||
<option th:each="item : ${provinceList}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>市</label>
|
||||
<select class="citySelect"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].cityId'"
|
||||
style="width: 150px;" data-change="cityChange"
|
||||
th:data-init="${cargoAddress.cityId}">
|
||||
<option th:each="item : ${areaService.parentList(cargoAddress.cityId)}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>区/县</label>
|
||||
<select class="countySelect"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].countyId'"
|
||||
style="width: 150px;" th:data-init="${cargoAddress.countyId}">
|
||||
<option th:each="item : ${areaService.parentList(cargoAddress.countyId)}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>详细地址</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].address'"
|
||||
th:value="${cargoAddress.address}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">删除</div>
|
||||
</div>
|
||||
<div class="addBtn">添加一行</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").eq(0).formSetting();
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.type === 'success') {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
} else {
|
||||
Dialog.error(res.content);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
fillFirstPinyin($("#name"), $("#sn"));
|
||||
|
||||
function provinceChange(e) {
|
||||
var $select = e.parents('.addable-line').find('.citySelect');
|
||||
dynamicLoading(e.val(), 1, $select);
|
||||
}
|
||||
|
||||
function cityChange(e) {
|
||||
var $select = e.parents('.addable-line').find('.countySelect');
|
||||
dynamicLoading(e.val(), 2, $select);
|
||||
}
|
||||
|
||||
function dynamicLoading(parentId, grade, $select) {
|
||||
$.ajax({
|
||||
url: '/area/dynamicLoading.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
parentId: parentId,
|
||||
grade: grade
|
||||
},
|
||||
success: function (res) {
|
||||
$select.find('option').remove();
|
||||
res.forEach(function (item) {
|
||||
$select.append('<option value="' + item.id + '">' + item.name + '</option>');
|
||||
});
|
||||
$select.trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
143
src/main/webapp/WEB-INF/template/client/list.html
Normal file
143
src/main/webapp/WEB-INF/template/client/list.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="client" moduleName="客户"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title" th:text="#{client.list}">客户列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|#{page.sum1}${page.total}#{page.sum2}|"></h1>
|
||||
<form id="listForm" action="client/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="client:add">
|
||||
<a data-permission="client:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('client/add.html')">添加客户
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<a class="btn" href="javascript:exportExcel('/admin/client/export.html')">导出</a>
|
||||
<a class="btn"
|
||||
href="javascript:Dialog.functionDialog(null, null, 'excel/dialog/defaultImport.html?id=client&name=客户');">导入</a>
|
||||
<div class="filter-wrapper" data-columns="client-table">
|
||||
<div class="filter-item" data-column="sn">
|
||||
<label>编号</label>
|
||||
<input class="filter-input" type="text" name="sn" th:value="${sn}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="name">
|
||||
<label>名称</label>
|
||||
<input class="filter-input" type="text" name="name" th:value="${name}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="address">
|
||||
<label>地址</label>
|
||||
<input class="filter-input" type="text" name="address" th:value="${address}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="contact">
|
||||
<label>联系人</label>
|
||||
<input class="filter-input" type="text" name="contact" th:value="${contact}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="phone">
|
||||
<label>联系电话</label>
|
||||
<input class="filter-input" type="text" name="phone" th:value="${phone}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="landLinePhone">
|
||||
<label>固定电话</label>
|
||||
<input class="filter-input" type="text" name="landLinePhone" th:value="${landLinePhone}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="memo">
|
||||
<label>备注</label>
|
||||
<input class="filter-input" type="text" name="memo" th:value="${memo}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="email">
|
||||
<label>邮箱</label>
|
||||
<input class="filter-input" type="text" name="email" th:value="${email}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="createDate">
|
||||
<label>创建日期:</label>
|
||||
<input class="filter-date" type="text" name="createDateStart"
|
||||
th:value="${#dates.format(createDateStart, 'yyyy-MM-dd')}" readonly> -
|
||||
<input class="filter-date" type="text" name="createDateEnd"
|
||||
th:value="${#dates.format(createDateEnd, 'yyyy-MM-dd')}" readonly>
|
||||
</div>
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="client-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="sn">编号</th>
|
||||
<th class="sort-bar" data-column="name">名称</th>
|
||||
<th class="sort-bar" data-column="shortName">简称</th>
|
||||
<th class="sort-bar" data-column="address">地址</th>
|
||||
<th class="sort-bar" data-column="contact">联系人</th>
|
||||
<th class="sort-bar" data-column="phone">联系电话</th>
|
||||
<th class="sort-bar" data-column="landLinePhone">固定电话</th>
|
||||
<th class="sort-bar" data-column="memo">备注</th>
|
||||
<th class="sort-bar" data-column="email">邮箱</th>
|
||||
<!-- <th class="sort-bar total-th" data-column="balance">余额</th>-->
|
||||
<!-- <th class="sort-bar" data-column="initialArrears">初期欠款</th>-->
|
||||
<th th:each="data : ${session.eField.list('client')}"
|
||||
th:text="${data.name}" th:data-column="${data.fieldName}"></th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="client : ${page.content}" th:id="${client.id}" url="client/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${client.id}">
|
||||
</td>
|
||||
<td th:text="${client.sn}"></td>
|
||||
<td th:text="${client.name}"></td>
|
||||
<td th:text="${client.shortName}"></td>
|
||||
<td th:text="${client.address}"></td>
|
||||
<td th:text="${client.contact}"></td>
|
||||
<td th:text="${client.phone}"></td>
|
||||
<td th:text="${client.landLinePhone}"></td>
|
||||
<td th:text="${client.memo}"></td>
|
||||
<td th:text="${client.email}"></td>
|
||||
<!-- <td th:text="${client.balance}"></td>-->
|
||||
<!-- <td th:text="${client.initialArrears}"></td>-->
|
||||
<td th:each="data : ${session.eField.list('client')}"
|
||||
th:text="${client.extraField(data.fieldName)}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="client:list">
|
||||
<a data-permission="client:list"
|
||||
th:href="|javascript:Nav.go('client/view.html?id=${client.id}');|"> 查看</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="client:edit">
|
||||
<a data-permission="client:edit"
|
||||
th:href="|javascript:Nav.go('client/edit.html?id=${client.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="client:remove">
|
||||
<a data-permission="client:remove"
|
||||
th:href="|javascript:deleteConfirm('${client.id}','/admin/client/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
<!--<a th:href="|javascript:Dialog.functionDialog(null, null, 'excel/dialog/uploadTemplate.html?name=salesOrder_owner_${client.id}');|" th:text="#{client.exportTemplate}"> 销售合同导出模板</a>-->
|
||||
<a th:href="|javascript:Dialog.functionDialog(null, null, 'client/dialog/detail.html?id=${client.id}')|"> 详情</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter();
|
||||
|
||||
setTableTotal($table, {balance: '[[${totalBalance}]]'});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
63
src/main/webapp/WEB-INF/template/client/salesReceivable.html
Normal file
63
src/main/webapp/WEB-INF/template/client/salesReceivable.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="client" moduleName="客户"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title" th:text="#{client.salesReceivable}">销售应收</h1>
|
||||
<h1 class="page-sub-title" th:text="|#{page.sum1}${page.total}#{page.sum2}|"></h1>
|
||||
<form id="listForm" action="client/salesReceivable.html" method="post">
|
||||
<div class="toolBar">
|
||||
<a class="btn refresh" th:text="#{page.refresh}">刷新</a>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="salesReceivable-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="sn" th:text="#{client.sn}">编号</th>
|
||||
<th class="sort-bar" data-column="name" th:text="#{client.name}">名称</th>
|
||||
<th class="sort-bar" data-column="contact" th:text="#{client.contact}">联系人</th>
|
||||
<th class="sort-bar" data-column="phone" th:text="#{client.phone}">联系电话</th>
|
||||
<th class="sort-bar" data-column="balance" th:text="#{client.receivables}">应收款</th>
|
||||
<th data-column="##" class="options fixed" th:text="#{page.action}">操作</th>
|
||||
</tr>
|
||||
<tr th:each="client : ${page.content}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${client.id}">
|
||||
</td>
|
||||
<td th:text="${client.sn}"></td>
|
||||
<td th:text="${client.name}"></td>
|
||||
<td th:text="${client.contact}"></td>
|
||||
<td th:text="${client.phone}"></td>
|
||||
<td th:text="${-client.balance}"></td>
|
||||
<td class="fixed">
|
||||
<a data-permission="client:edit"
|
||||
th:href="|javascript:Dialog.functionDialog(null, null, '/admin/client/dialog/receipt.html?id=${client.id}')|" th:text="#{page.collectMoney}"> 收款</a>
|
||||
<!-- <a data-permission="client:edit"-->
|
||||
<!-- th:href="|javascript:Nav.go('/admin/balanceRecord/list.html?clientId=${client.id}&mode=client')|"> 对账</a>-->
|
||||
<a th:href="|javascript:Dialog.functionDialog(null, null, 'balanceRecord/dialog/list.html?ownerId=${client.id}&mode=client')|" th:text="#{page.reconciliation}">对账</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
222
src/main/webapp/WEB-INF/template/client/view.html
Normal file
222
src/main/webapp/WEB-INF/template/client/view.html
Normal file
@@ -0,0 +1,222 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="client" moduleName="客户"-->
|
||||
<form id="addForm" action="client/update.html" method="post" returnUrl="client/list.html">
|
||||
<input type="hidden" name="id" th:value="${client.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">查看客户</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('client/list.html')">返回</a>
|
||||
<a class="form-setting"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=client');" th:text="#{page.formSetting}">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch">
|
||||
<li tagindex="1" class="tag active">基本信息</li>
|
||||
<li tagindex="2" class="tag">联系人</li>
|
||||
<li tagindex="3" class="tag">银行账号</li>
|
||||
<li tagindex="4" class="tag">收货地址</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent submitBody active" data-id="client">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name"
|
||||
type="text" th:value="${client.name}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="taxpayerSn">税务登记号</label>
|
||||
<input class="text" id="taxpayerSn" name="taxpayerSn"
|
||||
type="text" th:value="${client.taxpayerSn}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="sn">编号</label>
|
||||
<input class="text" id="sn" name="sn"
|
||||
type="text" th:value="${client.sn}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortName">简称</label>
|
||||
<input class="text" id="shortName" name="shortName"
|
||||
type="text" th:value="${client.shortName}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" id="address" name="address"
|
||||
type="text" th:value="${client.address}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="contact">联系人</label>
|
||||
<input class="text" id="contact" name="contact"
|
||||
type="text" th:value="${client.contact}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="phone">联系电话</label>
|
||||
<input class="text" id="phone" name="phone"
|
||||
type="text" th:value="${client.phone}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="landLinePhone">固定电话</label>
|
||||
<input class="text" id="landLinePhone" name="landLinePhone"
|
||||
type="text" th:value="${client.landLinePhone}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="memo">备注</label>
|
||||
<input class="text" id="memo" name="memo"
|
||||
type="text" th:value="${client.memo}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="email">邮箱</label>
|
||||
<input class="text" id="email" name="email"
|
||||
type="text" th:value="${client.email}" readonly>
|
||||
</div>
|
||||
<!-- <div class="input-wrapper">-->
|
||||
<!-- <label for="initialArrears">初期欠款</label>-->
|
||||
<!-- <input class="text" id="initialArrears" name="initialArrears"-->
|
||||
<!-- type="number" th:value="${client.initialArrears}" readonly>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-wrapper" th:each="data : ${session.eField.list('client')}">
|
||||
<label th:for="${data.fieldName}" th:text="${data.name}"></label>
|
||||
<input class="text" th:id="${data.fieldName}" th:name="${data.fieldName}"
|
||||
th:value="${client.extraField(data.fieldName)}" type="text" readonly>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="2" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line" th:each="contact, stat : ${client.contactList}">
|
||||
<input type="hidden" th:name="'contactList[' + ${stat.index} + '].id'"
|
||||
th:value="${contact.id}">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>名称</label>
|
||||
<input class="text" type="text" th:name="'contactList[' + ${stat.index} + '].name'"
|
||||
th:value="${contact.name}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>联系电话</label>
|
||||
<input class="text" type="text"
|
||||
th:name="'contactList[' + ${stat.index} + '].phone'"
|
||||
th:value="${contact.phone}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>电子邮件</label>
|
||||
<input class="text" type="text"
|
||||
th:name="'contactList[' + ${stat.index} + '].email'"
|
||||
th:value="${contact.email}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>职位</label>
|
||||
<input class="text" type="text"
|
||||
th:name="'contactList[' + ${stat.index} + '].position'"
|
||||
th:value="${contact.position}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>传真</label>
|
||||
<input class="text" type="text" th:name="'contactList[' + ${stat.index} + '].fax'"
|
||||
th:value="${contact.fax}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>备注</label>
|
||||
<input class="text" type="text" th:name="'contactList[' + ${stat.index} + '].memo'"
|
||||
th:value="${contact.memo}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="3" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line" th:each="bankAccount, stat : ${client.bankAccountList}">
|
||||
<input type="hidden" th:name="'bankAccountList[' + ${stat.index} + '].id'"
|
||||
th:value="${bankAccount.id}">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>银行账号</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'bankAccountList[' + ${stat.index} + '].account'"
|
||||
th:value="${bankAccount.account}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>开户银行</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'bankAccountList[' + ${stat.index} + '].bank'"
|
||||
th:value="${bankAccount.bank}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>收款人</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'bankAccountList[' + ${stat.index} + '].receiver'"
|
||||
th:value="${bankAccount.receiver}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="4" class="tagContent submitBody">
|
||||
<div class="addable-wrapper">
|
||||
<div class="addable-line" th:each="cargoAddress, stat : ${client.cargoAddressList}">
|
||||
<input type="hidden" th:name="'cargoAddressList[' + ${stat.index} + '].id'"
|
||||
th:value="${cargoAddress.id}">
|
||||
<div class="roll-box">
|
||||
<div class="input-wrapper">
|
||||
<label>省</label>
|
||||
<select class="provinceSelect"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].provinceId'"
|
||||
style="width: 150px;" data-change="provinceChange"
|
||||
th:data-init="${cargoAddress.provinceId}" disabled>
|
||||
<option th:each="item : ${provinceList}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>市</label>
|
||||
<select class="citySelect"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].cityId'"
|
||||
style="width: 150px;" data-change="cityChange"
|
||||
th:data-init="${cargoAddress.cityId}" disabled>
|
||||
<option th:each="item : ${areaService.parentList(cargoAddress.cityId)}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>区/县</label>
|
||||
<select class="countySelect"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].countyId'"
|
||||
style="width: 150px;" th:data-init="${cargoAddress.countyId}" disabled>
|
||||
<option th:each="item : ${areaService.parentList(cargoAddress.countyId)}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>详细地址</label>
|
||||
<input class="text long-input" type="text"
|
||||
th:name="'cargoAddressList[' + ${stat.index} + '].address'"
|
||||
th:value="${cargoAddress.address}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('client/list.html')" class="btn">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").eq(0).formSetting();
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<style>
|
||||
.switch-bar {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
left: 185px;
|
||||
z-index: 1000;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.switch-bar .switch-item {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.switch-bar .switch-item.active {
|
||||
color: #317ae3;
|
||||
}
|
||||
|
||||
.the-block {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
<th:block th:if="${session.curDeptName == '总经办' || session.curAdmin.name == '潘彦娜'}">
|
||||
<div class="the-block"></div>
|
||||
<ul class="switch-bar">
|
||||
<li class="switch-item" data-value="business">商务执行部</li>
|
||||
<li class="switch-item" data-value="market">市场营销部</li>
|
||||
<li class="switch-item" data-value="internationalTrade">国际贸易部</li>
|
||||
<li class="switch-item" data-value="transport">物流品控部</li>
|
||||
<li class="switch-item" data-value="production">生产运行部</li>
|
||||
<li class="switch-item" data-value="invoice">单证综合部</li>
|
||||
<li class="switch-item" data-value="financial">财务部</li>
|
||||
</ul>
|
||||
</th:block>
|
||||
<script>
|
||||
$(".switch-bar .switch-item[data-value='[[${departmentValue}]]']").addClass('active');
|
||||
|
||||
$(".switch-bar .switch-item").on('click', function () {
|
||||
if (!$(this).hasClass('active')) {
|
||||
$(this).addClass('active');
|
||||
$(this).siblings('.switch-item').removeClass('active');
|
||||
Nav.go('home/department/' + $(this).attr('data-value') + '.html');
|
||||
}
|
||||
});
|
||||
|
||||
$(".appBody").scroll(function () {
|
||||
var scrollHeight = $(".appBody").scrollTop();
|
||||
if (scrollHeight >= 25) {
|
||||
$(".switch-bar").hide();
|
||||
} else {
|
||||
$(".switch-bar").show();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
85
src/main/webapp/WEB-INF/template/common/dialog/adminLog.html
Normal file
85
src/main/webapp/WEB-INF/template/common/dialog/adminLog.html
Normal file
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog common_dialog_adminLog_functionDialog">
|
||||
<style>
|
||||
.common_dialog_adminLog_functionDialog {
|
||||
width: 880px;
|
||||
height: 614px;
|
||||
}
|
||||
|
||||
.common_dialog_adminLog_functionDialog .listBody.listItems{
|
||||
height: 456px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>操作日志</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<form id="functionDialogListForm" action="log/dialogList.html" method="get">
|
||||
<div class="listBody">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="80">IP</th>
|
||||
<th width="183">创建日期</th>
|
||||
<th width="90">操作帐号</th>
|
||||
<th width="244">访问地址</th>
|
||||
<th>提交参数</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="listBody listItems">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr style="height: 0">
|
||||
<th width="80"></th>
|
||||
<th width="183"></th>
|
||||
<th width="90"></th>
|
||||
<th width="244"></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<!-- <c:forEach items="${page.content}" var="log">-->
|
||||
<tr th:each="log : ${page.content}">
|
||||
<td th:text="${log.ip}"></td>
|
||||
<td th:text="${#dates.format(log.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td th:text="${log.operator}"></td>
|
||||
<td th:text="${log.operation}"></td>
|
||||
<td th:text="${log.parameter}<"></td>
|
||||
</tr>
|
||||
<!-- </c:forEach>-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- <jsp:include page="../dialogPagination.jsp" flush="true" />-->
|
||||
<div th:replace="common/dialogPagination" ></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$dialog = $(".common_dialog_adminLog_functionDialog");
|
||||
|
||||
// 关闭窗口
|
||||
function closeDialog(){
|
||||
Dialog.exeClose(
|
||||
$dialog,
|
||||
function(){
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// 绑定关闭窗口事件
|
||||
$dialog.find(".dialogClose").click(function(){
|
||||
closeDialog();
|
||||
});
|
||||
|
||||
// 显示对话框
|
||||
Dialog.show( $dialog, null);
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
106
src/main/webapp/WEB-INF/template/common/dialog/arrangePlan.html
Normal file
106
src/main/webapp/WEB-INF/template/common/dialog/arrangePlan.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="470" data-height="316">
|
||||
<style>
|
||||
.arrange {
|
||||
display: inline-block;
|
||||
margin: 12px 15px 0 20px;
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border: 1px solid #f05050;
|
||||
color: #f05050;
|
||||
}
|
||||
|
||||
.arrange:hover {
|
||||
color: #f05050;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>安排计划</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<input type="hidden" id="transportContractId" th:value="${transportContractId}">
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<div class="submitBody">
|
||||
<div>
|
||||
<label for="content">内容</label>
|
||||
<textarea name="content" id="content" cols="30" rows="10"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确定</a>
|
||||
<a class="arrange">安排就绪</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
Dialog.waiting();
|
||||
if ($("#content").val().length === 0) {
|
||||
Dialog.error('内容不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "arrangementPlan/create.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
content: $("#content").val(),
|
||||
transportContractId: $("#transportContractId").val()
|
||||
},
|
||||
success: function (re) {
|
||||
if (re.errorCode === "0") {
|
||||
Dialog.success("操作成功");
|
||||
Dialog.close($dialog);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(re.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(".arrange").on('click', function () {
|
||||
Dialog.waiting();
|
||||
|
||||
if ($("#content").val().length === 0) {
|
||||
Dialog.error('内容不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "arrangementPlan/create.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
ready: true,
|
||||
content: $("#content").text(),
|
||||
transportContractId: $("#transportContractId").val()
|
||||
},
|
||||
success: function (re) {
|
||||
if (re.errorCode === "0") {
|
||||
Dialog.success("操作成功");
|
||||
Dialog.close($dialog);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(re.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="470" data-height="316">
|
||||
<style>
|
||||
.functionDialog .notMatch {
|
||||
border-color: red !important;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>修改密码</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<div class="submitBody">
|
||||
<div>
|
||||
<label for="oldPass">原密码</label>
|
||||
<input class="text" name="oldPass" id="oldPass"
|
||||
type="password" autocomplete="off">
|
||||
</div>
|
||||
<div>
|
||||
<label for="newPass">新密码</label>
|
||||
<input class="text" name="newPass" id="newPass"
|
||||
type="password" autocomplete="off">
|
||||
</div>
|
||||
<div>
|
||||
<label for="confirmPass">重复新密码</label>
|
||||
<input class="text" name="confirmPass" id="confirmPass"
|
||||
type="password" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
var checkResult = checkFormat();
|
||||
if (checkResult) {
|
||||
alert(checkResult);
|
||||
return false;
|
||||
}
|
||||
Dialog.waiting();
|
||||
$.ajax({
|
||||
url: "admin/doChangePass.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
oldPass: $oldPass.val(),
|
||||
newPass: $newPass.val()
|
||||
},
|
||||
success: function (re) {
|
||||
if (re.type === "error") {
|
||||
Dialog.error(re.content);
|
||||
} else if (re.type === "success") {
|
||||
Dialog.success("修改成功");
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var $oldPass = $dialog.find("#oldPass");
|
||||
var $newPass = $dialog.find("#newPass");
|
||||
var $confirmPass = $dialog.find("#confirmPass");
|
||||
|
||||
// 重复密码验证
|
||||
$confirmPass.keyup(function () {
|
||||
if ($confirmPass.val() !== $newPass.val()) {
|
||||
$confirmPass.addClass("notMatch");
|
||||
} else {
|
||||
$confirmPass.removeClass("notMatch");
|
||||
}
|
||||
});
|
||||
|
||||
// 数据格式验证
|
||||
function checkFormat() {
|
||||
if ($oldPass.val() === "") {
|
||||
return "原密码不能为空";
|
||||
}
|
||||
if ($newPass.val() === "") {
|
||||
return "新密码不能为空";
|
||||
}
|
||||
if ($confirmPass.val() !== $newPass.val()) {
|
||||
return "重复密码与新密码不一致";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="470" data-height="316">
|
||||
<style>
|
||||
.functionDialog .notMatch {
|
||||
border-color: red !important;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>切换项目</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<div class="submitBody">
|
||||
<div>
|
||||
<label>项目</label>
|
||||
<select id="progressId" name="progressId" th:data-init="${nowProgressId}">
|
||||
<th:block th:if="${showCompany}">
|
||||
<option value="">公司</option>
|
||||
</th:block>
|
||||
<option th:each="item : ${progressList}" th:value="${item.id}"
|
||||
th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
var checkResult = checkFormat();
|
||||
if (checkResult) {
|
||||
alert(checkResult);
|
||||
return false;
|
||||
}
|
||||
Dialog.waiting();
|
||||
$.ajax({
|
||||
url: "admin/doChangeProgress.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
progressId:$("#progressId").val()
|
||||
},
|
||||
success: function (re) {
|
||||
if (re.type === "error") {
|
||||
Dialog.error(re.content);
|
||||
} else if (re.type === "success") {
|
||||
Dialog.success("修改成功");
|
||||
Dialog.close($dialog);
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var $oldPass = $dialog.find("#oldPass");
|
||||
var $newPass = $dialog.find("#newPass");
|
||||
var $confirmPass = $dialog.find("#confirmPass");
|
||||
|
||||
// 重复密码验证
|
||||
$confirmPass.keyup(function () {
|
||||
if ($confirmPass.val() !== $newPass.val()) {
|
||||
$confirmPass.addClass("notMatch");
|
||||
} else {
|
||||
$confirmPass.removeClass("notMatch");
|
||||
}
|
||||
});
|
||||
|
||||
// 数据格式验证
|
||||
function checkFormat() {
|
||||
if ($oldPass.val() === "") {
|
||||
return "原密码不能为空";
|
||||
}
|
||||
if ($newPass.val() === "") {
|
||||
return "新密码不能为空";
|
||||
}
|
||||
if ($confirmPass.val() !== $newPass.val()) {
|
||||
return "重复密码与新密码不一致";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
210
src/main/webapp/WEB-INF/template/common/dialog/fieldControl.html
Normal file
210
src/main/webapp/WEB-INF/template/common/dialog/fieldControl.html
Normal file
@@ -0,0 +1,210 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="650" data-height="515">
|
||||
<style>
|
||||
.dialogContent .label {
|
||||
margin-bottom: 5px;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li {
|
||||
display: inline-block;
|
||||
padding: 0 15px;
|
||||
line-height: 38px;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select .reset {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: #91c573;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-list {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #e1e1e1;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item {
|
||||
margin-bottom: 15px;
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item .name {
|
||||
margin-top: 2px;
|
||||
width: 80%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.functionDialog .common-single-checkbox {
|
||||
margin: initial;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>显示设置</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent appBody" style="left: 0; padding-top: 0;">
|
||||
<div class="appPage" style="min-width: 100% !important; border-top: 0;">
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch noBorder">
|
||||
<li tagindex="1" class="tag active">基本设置</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent active">
|
||||
<div class="listBody">
|
||||
<div id="fieldsSelect1" class="fields-select">
|
||||
<div class="label">显示列</div>
|
||||
<div class="field-list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $table = '[[${table}]]';
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$.ajax({
|
||||
url: "/tableStorage/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name: 'role_' + '[[${roleId}]]' + "_" + $table + '_fields',
|
||||
content: JSON.stringify(fields1)
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode !== "0") {
|
||||
Dialog.error(res.errorInfo);
|
||||
} else {
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log("ajax error")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var storeFields1 = {};
|
||||
var fields1 = [];
|
||||
|
||||
initData();
|
||||
$(".fields-select").find(".reset").on("click", initData);
|
||||
|
||||
// 初始加载数据
|
||||
function initData() {
|
||||
$.ajax({
|
||||
url: '/tableStorage/fieldControl/getByName.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
name: $table + '_fields',
|
||||
roleId: '[[${roleId}]]'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
var content = res.data.value.content;
|
||||
storeFields1 = JSON.parse(content);
|
||||
storeFields1.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
});
|
||||
fields1 = objDeepCopy(storeFields1);
|
||||
initCheckbox(storeFields1, $("#fieldsSelect1"));
|
||||
} else {
|
||||
console.log(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化 checkbox
|
||||
function initCheckbox(storeFields, $dom) {
|
||||
var fieldItemHtml = '';
|
||||
storeFields.forEach(function (field) {
|
||||
var disabled = field.required ? 'disabled' : '';
|
||||
var $commonFieldItem = $('<div class="field-item">' +
|
||||
' <span class="common-single-checkbox" ' + disabled + '></span>' +
|
||||
' <span class="name"></span>' +
|
||||
' </div>');
|
||||
var $checkbox = $commonFieldItem.find('.common-single-checkbox');
|
||||
$checkbox.attr('data-name', field.id);
|
||||
if (!field.fieldInvalid) {
|
||||
$checkbox.attr('data-init', true);
|
||||
}
|
||||
$commonFieldItem.find(".name").text(field.name);
|
||||
fieldItemHtml += $commonFieldItem.prop("outerHTML");
|
||||
});
|
||||
$dom.find(".field-list").html(fieldItemHtml);
|
||||
|
||||
initSingleCheckboxAction($dom.find('.common-single-checkbox'));
|
||||
$dom.find('.common-single-checkbox').on('clickCheckbox', clickCheckbox);
|
||||
}
|
||||
|
||||
// 点击 checkbox
|
||||
function clickCheckbox() {
|
||||
var fieldsArr = fields1;
|
||||
var hide = $(this).attr('data-flag') === 'false';
|
||||
var index = findIndexById(fieldsArr, $(this).attr('data-name'));
|
||||
if (index !== -1) {
|
||||
fieldsArr[index].fieldInvalid = hide;
|
||||
}
|
||||
}
|
||||
|
||||
// 深拷贝对象数据
|
||||
function objDeepCopy(source) {
|
||||
var sourceCopy = source instanceof Array ? [] : {};
|
||||
for (var item in source) {
|
||||
sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item];
|
||||
}
|
||||
return sourceCopy;
|
||||
}
|
||||
|
||||
function findIndexById(arr, id) {
|
||||
for (var i in arr) {
|
||||
if (arr[i].id === id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
247
src/main/webapp/WEB-INF/template/common/dialog/formSetting.html
Normal file
247
src/main/webapp/WEB-INF/template/common/dialog/formSetting.html
Normal file
@@ -0,0 +1,247 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="650" data-height="515">
|
||||
<style>
|
||||
.functionDialog .dialogContent .label {
|
||||
margin-bottom: 5px;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.functionDialog .fields-display {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.functionDialog .field-table {
|
||||
margin-bottom: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li {
|
||||
display: inline-block;
|
||||
padding: 0 15px;
|
||||
line-height: 38px;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select .reset {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: #91c573;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-list {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #e1e1e1;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item {
|
||||
margin-bottom: 15px;
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item .name {
|
||||
margin-top: 2px;
|
||||
width: 80%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.functionDialog .checkbox-icon {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
</style>
|
||||
<div class="title" style="text-align: center">
|
||||
<span>表单设置</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<div class="listBody">
|
||||
<div class="fields-display">
|
||||
<div class="label">拖动区块调整顺序:</div>
|
||||
<ul id="fieldTable" class="field-table"></ul>
|
||||
</div>
|
||||
<div id="fieldsSelect1" class="fields-select">
|
||||
<div class="label">显示列</div>
|
||||
<div class="field-list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter center">
|
||||
<a class="confirm">确定</a>
|
||||
<a class="cancel">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var name = '[[${name}]]';
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$.ajax({
|
||||
url: "/admin/formStorage/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name: name + '_fields',
|
||||
content: JSON.stringify(fields)
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode !== "0") {
|
||||
Dialog.error(res.errorInfo);
|
||||
} else {
|
||||
Nav.refresh();
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log("ajax error")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var fields = [];
|
||||
var $fieldTable = $(".field-table");
|
||||
|
||||
initData();
|
||||
|
||||
// 初始加载数据
|
||||
function initData() {
|
||||
$.ajax({
|
||||
url: '/admin/formStorage/getByName.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
name: name + '_fields'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
var content = res.data.value.content;
|
||||
var storeFields = JSON.parse(content);
|
||||
storeFields.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
});
|
||||
fields = objDeepCopy(storeFields);
|
||||
createTable(storeFields);
|
||||
initCheckbox(storeFields, $("#fieldsSelect1"));
|
||||
} else {
|
||||
console.log(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createTable(fields) {
|
||||
var thHtml = '';
|
||||
fields.forEach(function (field) {
|
||||
if (!field.hide) {
|
||||
thHtml += '<li data-id="' + field.id + '">' + field.name + '</li>';
|
||||
}
|
||||
});
|
||||
$fieldTable.html(thHtml);
|
||||
}
|
||||
|
||||
// 初始化 checkbox
|
||||
function initCheckbox(storeFields, $dom) {
|
||||
var fieldItemHtml = '';
|
||||
storeFields.forEach(function (field) {
|
||||
var disabled = field.required ? 'disabled' : '';
|
||||
var $commonFieldItem = $('<div class="field-item">' +
|
||||
' <span class="common-single-checkbox" ' + disabled + '></span>' +
|
||||
' <span class="name"></span>' +
|
||||
' </div>');
|
||||
var $checkbox = $commonFieldItem.find('.common-single-checkbox');
|
||||
$checkbox.attr('data-name', field.id);
|
||||
if (!field.hide) {
|
||||
$checkbox.attr('data-init', true);
|
||||
}
|
||||
$commonFieldItem.find(".name").text(field.name);
|
||||
fieldItemHtml += $commonFieldItem.prop("outerHTML");
|
||||
});
|
||||
$dom.find(".field-list").html(fieldItemHtml);
|
||||
|
||||
initSingleCheckboxAction($dom.find('.common-single-checkbox'));
|
||||
$dom.find('.common-single-checkbox').on('clickCheckbox', clickCheckbox);
|
||||
}
|
||||
|
||||
// 点击 checkbox
|
||||
function clickCheckbox() {
|
||||
var fieldsArr = fields;
|
||||
|
||||
var hide = $(this).attr('data-flag') === 'false';
|
||||
var index = findIndexById(fieldsArr, $(this).attr('data-name'));
|
||||
if (index !== -1) {
|
||||
fieldsArr[index].hide = hide;
|
||||
}
|
||||
createTable(fieldsArr, $(this).parents('.listBody').find('.field-table'));
|
||||
}
|
||||
|
||||
// 深拷贝对象数据
|
||||
function objDeepCopy(source) {
|
||||
var sourceCopy = source instanceof Array ? [] : {};
|
||||
for (var item in source) {
|
||||
sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item];
|
||||
}
|
||||
return sourceCopy;
|
||||
}
|
||||
|
||||
function findIndexById(arr, id) {
|
||||
for (var i in arr) {
|
||||
if (arr[i].id === id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Sortable.create(document.getElementById('fieldTable'), {
|
||||
onEnd: function () {
|
||||
var arr = [];
|
||||
$fieldTable.find('li').each(function (index) {
|
||||
arr.push({
|
||||
id: $(this).attr('data-id'),
|
||||
index: index,
|
||||
name: $(this).text()
|
||||
})
|
||||
});
|
||||
fields = arr;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
78
src/main/webapp/WEB-INF/template/common/dialog/import.html
Normal file
78
src/main/webapp/WEB-INF/template/common/dialog/import.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="400" data-height="200">
|
||||
<style>
|
||||
.simpleAddBody .template-btn {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span th:text="|导入${name}|"></span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<form id="excelForm" enctype="multipart/form-data" method="post">
|
||||
<div class="simpleAddBody">
|
||||
<div id="formTable">
|
||||
<div>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
</div>
|
||||
<a th:href="${template}" class="template-btn">下载导入模板</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: '[[${url}]]',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.close($dialog);
|
||||
Dialog.success('导入成功');
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
55
src/main/webapp/WEB-INF/template/common/dialog/orderLog.html
Normal file
55
src/main/webapp/WEB-INF/template/common/dialog/orderLog.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="900" data-height="600">
|
||||
<style>
|
||||
.main-body .content {
|
||||
max-height: 480px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span class="">合同记录</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<div class="main-body">
|
||||
<div class="content tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>合同编号</th>
|
||||
<th>操作动作</th>
|
||||
<th>操作人</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${list}">
|
||||
<th th:text="${item.sn}"></th>
|
||||
<th th:text="${item.type.name}"></th>
|
||||
<th th:text="${item.adminName}"></th>
|
||||
<th th:text="${#dates.format(item.createDate, 'yyyy-MM-dd HH:mm')}"></th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
129
src/main/webapp/WEB-INF/template/common/dialog/otherCost.html
Normal file
129
src/main/webapp/WEB-INF/template/common/dialog/otherCost.html
Normal file
@@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog">
|
||||
<style>
|
||||
.main-body .content {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.main-body .top-wrapper {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.main-body .top-wrapper .input-wrapper {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.left-wrapper .content {
|
||||
background: #f3fded;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.tableWrap .content {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.content.listBody {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content tr {
|
||||
border-bottom: 1px solid #d0d0d0;
|
||||
background: initial !important;
|
||||
}
|
||||
|
||||
.content th,
|
||||
.content td {
|
||||
border-right: 1px solid #d0d0d0;
|
||||
}
|
||||
|
||||
input.common-erp-input {
|
||||
box-sizing: border-box;
|
||||
padding: 0 13px;
|
||||
width: 200px;
|
||||
height: 33px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 3px;
|
||||
border: 1px solid rgba(231, 231, 231, 1);
|
||||
}
|
||||
|
||||
select.common-erp-select {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>其他费用</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input id="sn" type="hidden" name="sn" th:value="${sn}">
|
||||
<div class="main-body">
|
||||
<div class="top-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<label for="amount" style="margin-right: 10px">金额</label>
|
||||
<input type="number" id="amount" class="common-erp-input">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="remark" style="margin-right: 10px">备注</label>
|
||||
<input type="text" id="remark" class="common-erp-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<div class="content listBody">
|
||||
<table id="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>金额</th>
|
||||
<th>备注</th>
|
||||
<th>创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${list}">
|
||||
<td th:text="${item.amount}"></td>
|
||||
<td th:text="${item.remark}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$.ajax({
|
||||
url: '/admin/otherCost/save.html',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
sn: $("#sn").val(),
|
||||
amount: $("#amount").val(),
|
||||
remark: $("#remark").val()
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Nav.refresh();
|
||||
Dialog.close($dialog);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,263 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="productQualityDialog" class="dialog functionDialog threeColumn" data-width="900">
|
||||
<style>
|
||||
#productQualityDialog .input-wrapper input.text {
|
||||
width: 132px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>产品质量</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input type="hidden" name="id" th:value="${quality?.id}">
|
||||
<div class="simpleAddBody submitBody" style="padding-bottom: 60px;">
|
||||
<div class="input-wrapper">
|
||||
<label for="ron">研究法辛烷值(RON)</label>
|
||||
<input class="text" id="ron" name="ron" type="number"
|
||||
th:value="${quality?.ron}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="density">密度(20°C)</label>
|
||||
<input class="text" id="density" name="density" type="number"
|
||||
th:value="${quality?.density}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="vaporPressure">蒸汽压(37.8°C)</label>
|
||||
<input class="text" id="vaporPressure" name="vaporPressure" type="number"
|
||||
th:value="${quality?.vaporPressure}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="aromaticContent">芳烃含量</label>
|
||||
<input class="text" id="aromaticContent" name="aromaticContent" type="number"
|
||||
th:value="${quality?.aromaticContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="olefinContent">烯烃含量</label>
|
||||
<input class="text" id="olefinContent" name="olefinContent" type="number"
|
||||
th:value="${quality?.olefinContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evapTempStart">初馏点</label>
|
||||
<input class="text" id="evapTempStart" name="evapTempStart" type="number"
|
||||
th:value="${quality?.evapTempStart}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evapTemp10">10%(蒸发百分数)</label>
|
||||
<input class="text" id="evapTemp10" name="evapTemp10" type="number"
|
||||
th:value="${quality?.evapTemp10}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evapTemp50">50%(蒸发百分数)</label>
|
||||
<input class="text" id="evapTemp50" name="evapTemp50" type="number"
|
||||
th:value="${quality?.evapTemp50}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evapTemp90">90%(蒸发百分数)</label>
|
||||
<input class="text" id="evapTemp90" name="evapTemp90" type="number"
|
||||
th:value="${quality?.evapTemp90}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evapTempEnd">终馏点</label>
|
||||
<input class="text" id="evapTempEnd" name="evapTempEnd" type="number"
|
||||
th:value="${quality?.evapTempEnd}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evapResidual">残留量</label>
|
||||
<input class="text" id="evapResidual" name="evapResidual" type="number"
|
||||
th:value="${quality?.evapResidual}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="gumLevelNotWash">实际胶质(未洗)</label>
|
||||
<input class="text" id="gumLevelNotWash" name="gumLevelNotWash" type="number"
|
||||
th:value="${quality?.gumLevelNotWash}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="gumLevel">实际胶质(洗后)</label>
|
||||
<input class="text" id="gumLevel" name="gumLevel" type="number"
|
||||
th:value="${quality?.gumLevel}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="methylaniline">N-甲基苯胺</label>
|
||||
<input class="text" id="methylaniline" name="methylaniline" type="number"
|
||||
th:value="${quality?.methylaniline}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="secButylAcetate">乙酸仲丁酯</label>
|
||||
<input class="text" id="secButylAcetate" name="secButylAcetate" type="number"
|
||||
th:value="${quality?.secButylAcetate}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="methylal">甲缩醛</label>
|
||||
<input class="text" id="methylal" name="methylal" type="number"
|
||||
th:value="${quality?.methylal}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="dimethylCarbonate">碳酸二甲酯</label>
|
||||
<input class="text" id="dimethylCarbonate" name="dimethylCarbonate" type="number"
|
||||
th:value="${quality?.dimethylCarbonate}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="chlorineContent">氯含量</label>
|
||||
<input class="text" id="chlorineContent" name="chlorineContent" type="number"
|
||||
th:value="${quality?.chlorineContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="sulfurContent">硫含量</label>
|
||||
<input class="text" id="sulfurContent" name="sulfurContent" type="number"
|
||||
th:value="${quality?.sulfurContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="silicaContent">硅含量</label>
|
||||
<input class="text" id="silicaContent" name="silicaContent" type="number"
|
||||
th:value="${quality?.silicaContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="manganeseContent">锰含量</label>
|
||||
<input class="text" id="manganeseContent" name="manganeseContent" type="number"
|
||||
th:value="${quality?.manganeseContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="ironContent">铁含量</label>
|
||||
<input class="text" id="ironContent" name="ironContent" type="number"
|
||||
th:value="${quality?.ironContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="leadContent">铅含量</label>
|
||||
<input class="text" id="leadContent" name="leadContent" type="number"
|
||||
th:value="${quality?.leadContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="doctorTest">博士试验</label>
|
||||
<input class="text" id="doctorTest" name="doctorTest" type="number"
|
||||
th:value="${quality?.doctorTest}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="mercaptanSulfurContent">硫醇硫含量</label>
|
||||
<input class="text" id="mercaptanSulfurContent" name="mercaptanSulfurContent"
|
||||
type="number" th:value="${quality?.mercaptanSulfurContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="copperCorrosion">铜片腐蚀(50°C,3h)</label>
|
||||
<input class="text" id="copperCorrosion" name="copperCorrosion" type="number"
|
||||
th:value="${quality?.copperCorrosion}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="waterSolubleAcidBase">水溶性酸碱</label>
|
||||
<input class="text" id="waterSolubleAcidBase" name="waterSolubleAcidBase" type="number"
|
||||
th:value="${quality?.waterSolubleAcidBase}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="mechanicalImpuritiesAndMoisture">机械杂质及水分</label>
|
||||
<input class="text" id="mechanicalImpuritiesAndMoisture"
|
||||
name="mechanicalImpuritiesAndMoisture" type="number"
|
||||
th:value="${quality?.mechanicalImpuritiesAndMoisture}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="benzeneContent">苯含量</label>
|
||||
<input class="text" id="benzeneContent" name="benzeneContent" type="number"
|
||||
th:value="${quality?.benzeneContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="oxygenContent">氧含量</label>
|
||||
<input class="text" id="oxygenContent" name="oxygenContent" type="number"
|
||||
th:value="${quality?.oxygenContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="methanol">甲醇</label>
|
||||
<input class="text" id="methanol" name="methanol" type="number"
|
||||
th:value="${quality?.methanol}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="ethanol">乙醇</label>
|
||||
<input class="text" id="ethanol" name="ethanol" type="number"
|
||||
th:value="${quality?.ethanol}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="dieneCalue">二烯值</label>
|
||||
<input class="text" id="dieneCalue" name="dieneCalue" type="number"
|
||||
th:value="${quality?.dieneCalue}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="evaporationIndex">蒸发指数(DI值)</label>
|
||||
<input class="text" id="evaporationIndex" name="evaporationIndex" type="number"
|
||||
th:value="${quality?.evaporationIndex}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="inductionPeriod">诱导期</label>
|
||||
<input class="text" id="inductionPeriod" name="inductionPeriod" type="number"
|
||||
th:value="${quality?.inductionPeriod}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$dialog.find("form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
var extraData = '[[${extraData}]]';
|
||||
if (extraData) {
|
||||
extraData = extraData.replace(/"/g, "\"");
|
||||
var obj = JSON.parse(extraData);
|
||||
if (obj.readonly) {
|
||||
$(".confirm").remove();
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
$dialog.find("form").validate({
|
||||
ignore: ':hidden',
|
||||
errorPlacement: function (error, element) {
|
||||
if (element.is("select")) {
|
||||
$(element).parent().after(error);
|
||||
} else {
|
||||
error.insertAfter(element)
|
||||
}
|
||||
},
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
var url = '[[${quality?.id}]]' ? 'productQuality/update.html' : 'productQuality/save.html';
|
||||
$(form).ajaxSubmit({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.close($dialog);
|
||||
var callback = '[[${callback}]]';
|
||||
if (callback) {
|
||||
var extraData = '[[${extraData}]]';
|
||||
if (extraData) {
|
||||
extraData = extraData.replace(/"/g, "\"");
|
||||
var obj = JSON.parse(extraData);
|
||||
obj.id = resp.data;
|
||||
window[callback](obj);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Dialog.error(resp.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,336 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="productQualityDialog" class="dialog functionDialog threeColumn" data-width="1000">
|
||||
<style>
|
||||
#productQualityDialog .input-wrapper input.text {
|
||||
width: 80px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>产品质量</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input type="hidden" name="minQuality.id" th:value="${minQuality?.id}">
|
||||
<input type="hidden" name="maxQuality.id" th:value="${maxQuality?.id}">
|
||||
<div class="simpleAddBody submitBody" style="padding-bottom: 60px;">
|
||||
<div class="input-wrapper">
|
||||
<label>研究法辛烷值(RON)</label>
|
||||
<input class="text" name="minQuality.ron" type="number"
|
||||
th:value="${minQuality?.ron}"> -
|
||||
<input class="text" name="maxQuality.ron" type="number"
|
||||
th:value="${maxQuality?.ron}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>密度(20°C)</label>
|
||||
<input class="text" name="minQuality.density" type="number"
|
||||
th:value="${minQuality?.density}"> -
|
||||
<input class="text" name="maxQuality.density" type="number"
|
||||
th:value="${maxQuality?.density}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>蒸汽压(37.8°C)</label>
|
||||
<input class="text" name="minQuality.vaporPressure" type="number"
|
||||
th:value="${minQuality?.vaporPressure}"> -
|
||||
<input class="text" name="maxQuality.vaporPressure" type="number"
|
||||
th:value="${maxQuality?.vaporPressure}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>芳烃含量</label>
|
||||
<input class="text" name="minQuality.aromaticContent" type="number"
|
||||
th:value="${minQuality?.aromaticContent}"> -
|
||||
<input class="text" name="maxQuality.aromaticContent" type="number"
|
||||
th:value="${maxQuality?.aromaticContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>烯烃含量</label>
|
||||
<input class="text" name="minQuality.olefinContent" type="number"
|
||||
th:value="${minQuality?.olefinContent}"> -
|
||||
<input class="text" name="maxQuality.olefinContent" type="number"
|
||||
th:value="${maxQuality?.olefinContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>初馏点</label>
|
||||
<input class="text" name="minQuality.evapTempStart" type="number"
|
||||
th:value="${minQuality?.evapTempStart}"> -
|
||||
<input class="text" name="maxQuality.evapTempStart" type="number"
|
||||
th:value="${maxQuality?.evapTempStart}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>10%(蒸发百分数)</label>
|
||||
<input class="text" name="minQuality.evapTemp10" type="number"
|
||||
th:value="${minQuality?.evapTemp10}"> -
|
||||
<input class="text" name="maxQuality.evapTemp10" type="number"
|
||||
th:value="${maxQuality?.evapTemp10}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>50%(蒸发百分数)</label>
|
||||
<input class="text" name="minQuality.evapTemp50" type="number"
|
||||
th:value="${minQuality?.evapTemp50}"> -
|
||||
<input class="text" name="maxQuality.evapTemp50" type="number"
|
||||
th:value="${maxQuality?.evapTemp50}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>90%(蒸发百分数)</label>
|
||||
<input class="text" name="minQuality.evapTemp90" type="number"
|
||||
th:value="${minQuality?.evapTemp90}"> -
|
||||
<input class="text" name="maxQuality.evapTemp90" type="number"
|
||||
th:value="${maxQuality?.evapTemp90}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>终馏点</label>
|
||||
<input class="text" name="minQuality.evapTempEnd" type="number"
|
||||
th:value="${minQuality?.evapTempEnd}"> -
|
||||
<input class="text" name="maxQuality.evapTempEnd" type="number"
|
||||
th:value="${maxQuality?.evapTempEnd}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>残留量</label>
|
||||
<input class="text" name="minQuality.evapResidual" type="number"
|
||||
th:value="${minQuality?.evapResidual}"> -
|
||||
<input class="text" name="maxQuality.evapResidual" type="number"
|
||||
th:value="${maxQuality?.evapResidual}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>实际胶质(未洗)</label>
|
||||
<input class="text" name="minQuality.gumLevelNotWash" type="number"
|
||||
th:value="${minQuality?.gumLevelNotWash}"> -
|
||||
<input class="text" name="maxQuality.gumLevelNotWash" type="number"
|
||||
th:value="${maxQuality?.gumLevelNotWash}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>实际胶质(洗后)</label>
|
||||
<input class="text" name="minQuality.gumLevel" type="number"
|
||||
th:value="${minQuality?.gumLevel}"> -
|
||||
<input class="text" name="maxQuality.gumLevel" type="number"
|
||||
th:value="${maxQuality?.gumLevel}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>N-甲基苯胺</label>
|
||||
<input class="text" name="minQuality.methylaniline" type="number"
|
||||
th:value="${minQuality?.methylaniline}"> -
|
||||
<input class="text" name="maxQuality.methylaniline" type="number"
|
||||
th:value="${maxQuality?.methylaniline}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>乙酸仲丁酯</label>
|
||||
<input class="text" name="minQuality.secButylAcetate" type="number"
|
||||
th:value="${minQuality?.secButylAcetate}"> -
|
||||
<input class="text" name="maxQuality.secButylAcetate" type="number"
|
||||
th:value="${maxQuality?.secButylAcetate}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>甲缩醛</label>
|
||||
<input class="text" name="minQuality.methylal" type="number"
|
||||
th:value="${minQuality?.methylal}"> -
|
||||
<input class="text" name="maxQuality.methylal" type="number"
|
||||
th:value="${maxQuality?.methylal}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>碳酸二甲酯</label>
|
||||
<input class="text" name="minQuality.dimethylCarbonate" type="number"
|
||||
th:value="${minQuality?.dimethylCarbonate}"> -
|
||||
<input class="text" name="maxQuality.dimethylCarbonate" type="number"
|
||||
th:value="${maxQuality?.dimethylCarbonate}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>氯含量</label>
|
||||
<input class="text" name="minQuality.chlorineContent" type="number"
|
||||
th:value="${minQuality?.chlorineContent}"> -
|
||||
<input class="text" name="maxQuality.chlorineContent" type="number"
|
||||
th:value="${maxQuality?.chlorineContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>硫含量</label>
|
||||
<input class="text" name="minQuality.sulfurContent" type="number"
|
||||
th:value="${minQuality?.sulfurContent}"> -
|
||||
<input class="text" name="maxQuality.sulfurContent" type="number"
|
||||
th:value="${maxQuality?.sulfurContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>硅含量</label>
|
||||
<input class="text" name="minQuality.silicaContent" type="number"
|
||||
th:value="${minQuality?.silicaContent}"> -
|
||||
<input class="text" name="maxQuality.silicaContent" type="number"
|
||||
th:value="${maxQuality?.silicaContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>锰含量</label>
|
||||
<input class="text" name="minQuality.manganeseContent" type="number"
|
||||
th:value="${minQuality?.manganeseContent}"> -
|
||||
<input class="text" name="maxQuality.manganeseContent" type="number"
|
||||
th:value="${maxQuality?.manganeseContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>铁含量</label>
|
||||
<input class="text" name="minQuality.ironContent" type="number"
|
||||
th:value="${minQuality?.ironContent}"> -
|
||||
<input class="text" name="maxQuality.ironContent" type="number"
|
||||
th:value="${maxQuality?.ironContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>铅含量</label>
|
||||
<input class="text" name="minQuality.leadContent" type="number"
|
||||
th:value="${minQuality?.leadContent}"> -
|
||||
<input class="text" name="maxQuality.leadContent" type="number"
|
||||
th:value="${maxQuality?.leadContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>博士试验</label>
|
||||
<input class="text" name="minQuality.doctorTest" type="number"
|
||||
th:value="${minQuality?.doctorTest}"> -
|
||||
<input class="text" name="maxQuality.doctorTest" type="number"
|
||||
th:value="${maxQuality?.doctorTest}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>硫醇硫含量</label>
|
||||
<input class="text" name="minQuality.mercaptanSulfurContent"
|
||||
type="number" th:value="${minQuality?.mercaptanSulfurContent}"> -
|
||||
<input class="text" name="maxQuality.mercaptanSulfurContent"
|
||||
type="number" th:value="${maxQuality?.mercaptanSulfurContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>铜片腐蚀(50°C,3h)</label>
|
||||
<input class="text" name="minQuality.copperCorrosion" type="number"
|
||||
th:value="${minQuality?.copperCorrosion}"> -
|
||||
<input class="text" name="maxQuality.copperCorrosion" type="number"
|
||||
th:value="${maxQuality?.copperCorrosion}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>水溶性酸碱</label>
|
||||
<input class="text" name="minQuality.waterSolubleAcidBase" type="number"
|
||||
th:value="${minQuality?.waterSolubleAcidBase}"> -
|
||||
<input class="text" name="maxQuality.waterSolubleAcidBase" type="number"
|
||||
th:value="${maxQuality?.waterSolubleAcidBase}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>机械杂质及水分</label>
|
||||
<input class="text"
|
||||
name="minQuality.mechanicalImpuritiesAndMoisture" type="number"
|
||||
th:value="${minQuality?.mechanicalImpuritiesAndMoisture}"> -
|
||||
<input class="text"
|
||||
name="maxQuality.mechanicalImpuritiesAndMoisture" type="number"
|
||||
th:value="${maxQuality?.mechanicalImpuritiesAndMoisture}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>苯含量</label>
|
||||
<input class="text" name="minQuality.benzeneContent" type="number"
|
||||
th:value="${minQuality?.benzeneContent}"> -
|
||||
<input class="text" name="maxQuality.benzeneContent" type="number"
|
||||
th:value="${maxQuality?.benzeneContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>氧含量</label>
|
||||
<input class="text" name="minQuality.oxygenContent" type="number"
|
||||
th:value="${minQuality?.oxygenContent}"> -
|
||||
<input class="text" name="maxQuality.oxygenContent" type="number"
|
||||
th:value="${maxQuality?.oxygenContent}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>甲醇</label>
|
||||
<input class="text" name="minQuality.methanol" type="number"
|
||||
th:value="${minQuality?.methanol}"> -
|
||||
<input class="text" name="maxQuality.methanol" type="number"
|
||||
th:value="${maxQuality?.methanol}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>乙醇</label>
|
||||
<input class="text" name="minQuality.ethanol" type="number"
|
||||
th:value="${minQuality?.ethanol}"> -
|
||||
<input class="text" name="maxQuality.ethanol" type="number"
|
||||
th:value="${maxQuality?.ethanol}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>二烯值</label>
|
||||
<input class="text" name="minQuality.dieneCalue" type="number"
|
||||
th:value="${minQuality?.dieneCalue}"> -
|
||||
<input class="text" name="maxQuality.dieneCalue" type="number"
|
||||
th:value="${maxQuality?.dieneCalue}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>蒸发指数(DI值)</label>
|
||||
<input class="text" name="minQuality.evaporationIndex" type="number"
|
||||
th:value="${minQuality?.evaporationIndex}"> -
|
||||
<input class="text" name="maxQuality.evaporationIndex" type="number"
|
||||
th:value="${maxQuality?.evaporationIndex}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>诱导期</label>
|
||||
<input class="text" name="minQuality.inductionPeriod" type="number"
|
||||
th:value="${minQuality?.inductionPeriod}"> -
|
||||
<input class="text" name="maxQuality.inductionPeriod" type="number"
|
||||
th:value="${maxQuality?.inductionPeriod}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$dialog.find("form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
var extraData = '[[${extraData}]]';
|
||||
if (extraData) {
|
||||
extraData = extraData.replace(/"/g, "\"");
|
||||
var obj = JSON.parse(extraData);
|
||||
if (obj.readonly) {
|
||||
$(".confirm").remove();
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
$dialog.find("form").validate({
|
||||
ignore: ':hidden',
|
||||
errorPlacement: function (error, element) {
|
||||
if (element.is("select")) {
|
||||
$(element).parent().after(error);
|
||||
} else {
|
||||
error.insertAfter(element)
|
||||
}
|
||||
},
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
var url = '[[${minQuality?.id}]]' ? 'productQuality/rangeUpdate.html' : 'productQuality/rangeSave.html';
|
||||
$(form).ajaxSubmit({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.close($dialog);
|
||||
var callback = '[[${callback}]]';
|
||||
if (callback) {
|
||||
var extraData = '[[${extraData}]]';
|
||||
if (extraData) {
|
||||
extraData = extraData.replace(/"/g, "\"");
|
||||
var obj = JSON.parse(extraData);
|
||||
obj.range = resp.data;
|
||||
obj.type = 'range';
|
||||
window[callback](obj);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Dialog.error(resp.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,421 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="650" data-height="515">
|
||||
<style>
|
||||
.dialogContent .label {
|
||||
margin-bottom: 5px;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.functionDialog .fields-display {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.functionDialog .field-table {
|
||||
margin-bottom: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li {
|
||||
display: inline-block;
|
||||
padding: 0 15px;
|
||||
line-height: 38px;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select .reset {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: #91c573;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-list {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #e1e1e1;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item {
|
||||
margin-bottom: 15px;
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item .name {
|
||||
margin-top: 2px;
|
||||
width: 80%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.functionDialog .checkbox-icon {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.functionDialog .range-item .name {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
vertical-align: top;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.functionDialog .range-item .irs {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>显示设置</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent appBody" style="left: 0; padding-top: 0;">
|
||||
<div class="appPage" style="min-width: 100% !important; border-top: 0;">
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch noBorder">
|
||||
<li tagindex="1" class="tag active">基本设置</li>
|
||||
<li tagindex="2" class="tag">字段设置</li>
|
||||
<li tagindex="3" class="tag">输入框设置</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent active">
|
||||
<div class="listBody">
|
||||
<div class="fields-display">
|
||||
<div class="label">拖动区块调整顺序:</div>
|
||||
<ul id="fieldTable" class="field-table"></ul>
|
||||
</div>
|
||||
|
||||
<div id="fieldsSelect1" class="fields-select">
|
||||
<div class="label">显示列</div>
|
||||
<div class="field-list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="2" class="tagContent">
|
||||
<div class="listBody">
|
||||
<div class="fields-display">
|
||||
<div class="label">拖动区块调整顺序:</div>
|
||||
<ul id="filterField" class="field-table"></ul>
|
||||
</div>
|
||||
|
||||
<div id="fieldsSelect2" class="fields-select">
|
||||
<div class="label">显示列</div>
|
||||
<div class="field-list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="3" class="tagContent">
|
||||
<div class="range-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $table = '[[${table}]]';
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$.ajax({
|
||||
url: "/tableStorage/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name: $table + '_fields',
|
||||
content: JSON.stringify(fields1)
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode !== "0") {
|
||||
Dialog.error(res.errorInfo);
|
||||
} else {
|
||||
var $reloadBtn = $(".refresh");
|
||||
if ($reloadBtn.length !== 0) {
|
||||
$reloadBtn.click();
|
||||
|
||||
} else {
|
||||
if (selectFieldConfirmCallback && typeof selectFieldConfirmCallback === 'function') {
|
||||
selectFieldConfirmCallback($table);
|
||||
}
|
||||
}
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log("ajax error")
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: "/tableStorage/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name: $table + '_filters',
|
||||
content: JSON.stringify(fields2)
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var storeFields1 = {};
|
||||
var fields1 = [];
|
||||
|
||||
var storeFields2 = {};
|
||||
var fields2 = [];
|
||||
|
||||
initData();
|
||||
$(".fields-select").find(".reset").on("click", initData);
|
||||
|
||||
// 初始加载数据
|
||||
function initData() {
|
||||
$.ajax({
|
||||
url: '/tableStorage/getByName.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
name: $table + '_fields'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
var content = res.data.value.content;
|
||||
storeFields1 = JSON.parse(content);
|
||||
storeFields1.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
});
|
||||
fields1 = objDeepCopy(storeFields1);
|
||||
createTable(storeFields1, $("#fieldTable"));
|
||||
initCheckbox(storeFields1, $("#fieldsSelect1"));
|
||||
} else {
|
||||
console.log(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '/tableStorage/getByName.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
name: $table + '_filters'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
var content = res.data.value.content;
|
||||
storeFields2 = JSON.parse(content);
|
||||
storeFields2.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
});
|
||||
fields2 = objDeepCopy(storeFields2);
|
||||
createTable(storeFields2, $("#filterField"));
|
||||
initCheckbox(storeFields2, $("#fieldsSelect2"));
|
||||
initRange(storeFields2);
|
||||
} else {
|
||||
console.log(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createTable(fieldsArr, $dom) {
|
||||
var thHtml = '';
|
||||
fieldsArr.forEach(function (field) {
|
||||
if (!field.hide) {
|
||||
thHtml += '<li data-id="' + field.id + '">' + field.name + '</li>';
|
||||
}
|
||||
});
|
||||
$dom.html(thHtml);
|
||||
}
|
||||
|
||||
// 初始化 checkbox
|
||||
function initCheckbox(storeFields, $dom) {
|
||||
var fieldItemHtml = '';
|
||||
storeFields.forEach(function (field) {
|
||||
var disabled = field.required ? 'disabled' : '';
|
||||
var $commonFieldItem = $('<div class="field-item">' +
|
||||
' <span class="common-single-checkbox" ' + disabled + '></span>' +
|
||||
' <span class="name"></span>' +
|
||||
' </div>');
|
||||
var $checkbox = $commonFieldItem.find('.common-single-checkbox');
|
||||
$checkbox.attr('data-name', field.id);
|
||||
if (!field.hide) {
|
||||
$checkbox.attr('data-init', true);
|
||||
}
|
||||
$commonFieldItem.find(".name").text(field.name);
|
||||
fieldItemHtml += $commonFieldItem.prop("outerHTML");
|
||||
});
|
||||
$dom.find(".field-list").html(fieldItemHtml);
|
||||
|
||||
initSingleCheckboxAction($dom.find('.common-single-checkbox'));
|
||||
$dom.find('.common-single-checkbox').on('clickCheckbox', clickCheckbox);
|
||||
}
|
||||
|
||||
// 点击 checkbox
|
||||
function clickCheckbox() {
|
||||
var tagindex = $(".tagSwitch .tag.active").attr('tagindex');
|
||||
var fieldsArr = [];
|
||||
if (tagindex === '1') {
|
||||
fieldsArr = fields1;
|
||||
} else if (tagindex === '2') {
|
||||
fieldsArr = fields2;
|
||||
}
|
||||
|
||||
var hide = $(this).attr('data-flag') === 'false';
|
||||
var index = findIndexById(fieldsArr, $(this).attr('data-name'));
|
||||
if (index !== -1) {
|
||||
fieldsArr[index].hide = hide;
|
||||
}
|
||||
createTable(fieldsArr, $(this).parents('.listBody').find('.field-table'));
|
||||
}
|
||||
|
||||
// 深拷贝对象数据
|
||||
function objDeepCopy(source) {
|
||||
var sourceCopy = source instanceof Array ? [] : {};
|
||||
for (var item in source) {
|
||||
sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item];
|
||||
}
|
||||
return sourceCopy;
|
||||
}
|
||||
|
||||
function findIndexById(arr, id) {
|
||||
for (var i in arr) {
|
||||
if (arr[i].id === id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function initRange(storeFields) {
|
||||
storeFields.forEach(function (item) {
|
||||
var width = store.get($table + '_width-' + item.id);
|
||||
if (width) {
|
||||
var id = "range-" + item.id.split('.').join('-');
|
||||
$('.range-list').append('<div class="range-item">' +
|
||||
' <span class="name">' + item.name + '</span>' +
|
||||
' <input class="range" id="' + id + '"/>' +
|
||||
' </div>');
|
||||
$("#" + id).ionRangeSlider({
|
||||
min: 100,
|
||||
max: 400,
|
||||
from: width,
|
||||
onChange: function (data) {
|
||||
var select = false;
|
||||
var $wrapper = $('.filter-wrapper').find('[data-column="' + item.id + '"]');
|
||||
var $target = $wrapper.find('input.filter-input');
|
||||
if ($target.length === 0) {
|
||||
$target = $wrapper.find('input.filter-date,input.filter-datetime');
|
||||
if ($target.length === 0) {
|
||||
$target = $wrapper.find('select.filter-input');
|
||||
select = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (select) {
|
||||
$target.select2({
|
||||
width: data.from
|
||||
})
|
||||
} else {
|
||||
$target.css('width', data.from + 'px');
|
||||
}
|
||||
},
|
||||
onFinish: function (data) {
|
||||
store.set($table + '_width-' + item.id, data.from);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Sortable.create(document.getElementById('fieldTable'), {
|
||||
onEnd: function (e) {
|
||||
var arr = [];
|
||||
$("#fieldTable").find('li').each(function (index) {
|
||||
arr.push({
|
||||
id: $(this).attr('data-id'),
|
||||
index: index,
|
||||
name: $(this).text(),
|
||||
hide: false
|
||||
})
|
||||
});
|
||||
fields1.forEach(function (item) {
|
||||
if (item.hide) {
|
||||
arr.push({
|
||||
id: item.id,
|
||||
index: arr.length,
|
||||
name: item.name,
|
||||
hide: true
|
||||
});
|
||||
}
|
||||
});
|
||||
fields1 = arr;
|
||||
}
|
||||
});
|
||||
|
||||
Sortable.create(document.getElementById('filterField'), {
|
||||
onEnd: function (e) {
|
||||
var arr = [];
|
||||
$("#filterField").find('li').each(function (index) {
|
||||
arr.push({
|
||||
id: $(this).attr('data-id'),
|
||||
index: index,
|
||||
name: $(this).text(),
|
||||
hide: false
|
||||
})
|
||||
});
|
||||
fields2.forEach(function (item) {
|
||||
if (item.hide) {
|
||||
arr.push({
|
||||
id: item.id,
|
||||
index: arr.length,
|
||||
name: item.name,
|
||||
hide: true
|
||||
});
|
||||
}
|
||||
});
|
||||
fields2 = arr;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="selectReceiptPoint" class="dialog functionDialog" data-width="400" data-height="300">
|
||||
<div class="title">
|
||||
<span>选择收/付款方式</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label for="receiptPoint">选择方式</label>
|
||||
<select id="receiptPoint">
|
||||
<option value="order">合同</option>
|
||||
<option value="stock">出/入库</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$.ajax({
|
||||
url: 'system/setReceiptPoint.html',
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
data: {
|
||||
receiptPoint: $("#receiptPoint").val()
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
Dialog.success('操作成功');
|
||||
Dialog.close($dialog);
|
||||
} else {
|
||||
Dialog.error('操作失败');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,437 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div id="selectTableField" class="dialog functionDialog" data-width="650" data-height="515">
|
||||
<style>
|
||||
.dialogContent .label {
|
||||
margin-bottom: 5px;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.functionDialog .fields-display {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.functionDialog .field-table {
|
||||
margin-bottom: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li {
|
||||
display: inline-block;
|
||||
padding: 0 15px;
|
||||
line-height: 38px;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-table li:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.functionDialog .fields-select .reset {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: #91c573;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.functionDialog .field-list {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #e1e1e1;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item {
|
||||
margin-bottom: 15px;
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.functionDialog .field-list .field-item .name {
|
||||
margin-top: 2px;
|
||||
width: 80%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.functionDialog .checkbox-icon {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.functionDialog .range-item .name {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
vertical-align: top;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.functionDialog .range-item .irs {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>显示设置</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent appBody" style="left: 0; padding-top: 0;">
|
||||
<div class="appPage" style="min-width: 100% !important; border-top: 0;">
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch noBorder">
|
||||
<li tagindex="1" class="tag active">基本设置</li>
|
||||
<li tagindex="2" th:if="${filter}" class="tag">筛选设置</li>
|
||||
<li tagindex="3" class="tag" th:if="${range}">输入框设置</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div tagindex="1" class="tagContent active">
|
||||
<div class="listBody">
|
||||
<div class="fields-display">
|
||||
<div class="label">拖动区块调整顺序:</div>
|
||||
<ul id="fieldTable" class="field-table"></ul>
|
||||
</div>
|
||||
|
||||
<div id="fieldsSelect1" class="fields-select">
|
||||
<div class="label">显示列</div>
|
||||
<div class="field-list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="2" class="tagContent">
|
||||
<div class="listBody">
|
||||
<div class="fields-display">
|
||||
<div class="label">拖动区块调整顺序:</div>
|
||||
<ul id="filterField" class="field-table"></ul>
|
||||
</div>
|
||||
|
||||
<div id="fieldsSelect2" class="fields-select">
|
||||
<div class="label">显示列</div>
|
||||
<div class="field-list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tagindex="3" class="tagContent">
|
||||
<div class="range-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $table = '[[${table}]]';
|
||||
var fieldControl = '[[${fieldControl}]]';
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$.ajax({
|
||||
url: "/tableStorage/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name: $table + '_fields',
|
||||
content: JSON.stringify(fields1)
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode !== "0") {
|
||||
Dialog.error(res.errorInfo);
|
||||
} else {
|
||||
var $reloadBtn = $(".refresh");
|
||||
if ($reloadBtn.length !== 0) {
|
||||
$reloadBtn.click();
|
||||
|
||||
} else {
|
||||
if (selectFieldConfirmCallback && typeof selectFieldConfirmCallback === 'function') {
|
||||
selectFieldConfirmCallback($table);
|
||||
}
|
||||
}
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log("ajax error")
|
||||
}
|
||||
});
|
||||
|
||||
if ('[[${filter}]]' === 'true') {
|
||||
$.ajax({
|
||||
url: "/tableStorage/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name: $table + '_filters',
|
||||
content: JSON.stringify(fields2)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var storeFields1 = {};
|
||||
var fields1 = [];
|
||||
|
||||
var storeFields2 = {};
|
||||
var fields2 = [];
|
||||
|
||||
initData();
|
||||
$(".fields-select").find(".reset").on("click", initData);
|
||||
|
||||
// 初始加载数据
|
||||
function initData() {
|
||||
$.ajax({
|
||||
url: '/tableStorage/getByName.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
name: $table + '_fields',
|
||||
fieldControl: fieldControl
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
var content = res.data.value.content;
|
||||
var temp = JSON.parse(content);
|
||||
if (fieldControl === 'true') {
|
||||
var invalidFieldList = res.data.value.invalidFieldList;
|
||||
storeFields1 = [];
|
||||
for (var i in temp) {
|
||||
var flag = true;
|
||||
for (var j in invalidFieldList) {
|
||||
if (temp[i].id === invalidFieldList[j]) {
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
storeFields1.push(temp[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
storeFields1 = temp;
|
||||
}
|
||||
|
||||
storeFields1.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
});
|
||||
fields1 = objDeepCopy(storeFields1);
|
||||
createTable(storeFields1, $("#fieldTable"));
|
||||
initCheckbox(storeFields1, $("#fieldsSelect1"));
|
||||
initRange(storeFields1);
|
||||
} else {
|
||||
console.log(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
|
||||
if ('[[${filter}]]' === 'true') {
|
||||
$.ajax({
|
||||
url: '/tableStorage/getByName.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
name: $table + '_filters'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
var content = res.data.value.content;
|
||||
storeFields2 = JSON.parse(content);
|
||||
storeFields2.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
});
|
||||
fields2 = objDeepCopy(storeFields2);
|
||||
createTable(storeFields2, $("#filterField"));
|
||||
initCheckbox(storeFields2, $("#fieldsSelect2"));
|
||||
initRange(storeFields2);
|
||||
} else {
|
||||
console.log(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function createTable(fieldsArr, $dom) {
|
||||
var thHtml = '';
|
||||
fieldsArr.forEach(function (field) {
|
||||
if (!field.hide) {
|
||||
thHtml += '<li data-id="' + field.id + '">' + field.name + '</li>';
|
||||
}
|
||||
});
|
||||
$dom.html(thHtml);
|
||||
}
|
||||
|
||||
// 初始化 checkbox
|
||||
function initCheckbox(storeFields, $dom) {
|
||||
var fieldItemHtml = '';
|
||||
storeFields.forEach(function (field) {
|
||||
var disabled = field.required ? 'disabled' : '';
|
||||
var $commonFieldItem = $('<div class="field-item">' +
|
||||
' <span class="common-single-checkbox" ' + disabled + '></span>' +
|
||||
' <span class="name"></span>' +
|
||||
' </div>');
|
||||
var $checkbox = $commonFieldItem.find('.common-single-checkbox');
|
||||
$checkbox.attr('data-name', field.id);
|
||||
if (!field.hide) {
|
||||
$checkbox.attr('data-init', true);
|
||||
}
|
||||
$commonFieldItem.find(".name").text(field.name);
|
||||
fieldItemHtml += $commonFieldItem.prop("outerHTML");
|
||||
});
|
||||
$dom.find(".field-list").html(fieldItemHtml);
|
||||
|
||||
initSingleCheckboxAction($dom.find('.common-single-checkbox'));
|
||||
$dom.find('.common-single-checkbox').on('clickCheckbox', clickCheckbox);
|
||||
}
|
||||
|
||||
// 点击 checkbox
|
||||
function clickCheckbox() {
|
||||
var tagindex = $("#selectTableField .tagSwitch .tag.active").attr('tagindex');
|
||||
var fieldsArr = [];
|
||||
if (tagindex === '1') {
|
||||
fieldsArr = fields1;
|
||||
} else if (tagindex === '2') {
|
||||
fieldsArr = fields2;
|
||||
}
|
||||
|
||||
var hide = $(this).attr('data-flag') === 'false';
|
||||
var index = findIndexById(fieldsArr, $(this).attr('data-name'));
|
||||
if (index !== -1) {
|
||||
fieldsArr[index].hide = hide;
|
||||
}
|
||||
createTable(fieldsArr, $(this).parents('.listBody').find('.field-table'));
|
||||
}
|
||||
|
||||
// 深拷贝对象数据
|
||||
function objDeepCopy(source) {
|
||||
var sourceCopy = source instanceof Array ? [] : {};
|
||||
for (var item in source) {
|
||||
sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item];
|
||||
}
|
||||
return sourceCopy;
|
||||
}
|
||||
|
||||
function findIndexById(arr, id) {
|
||||
for (var i in arr) {
|
||||
if (arr[i].id === id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function initRange(storeFields) {
|
||||
storeFields.forEach(function (item) {
|
||||
var width = store.get($table + '_width-' + item.id);
|
||||
if (width) {
|
||||
var id = "range-" + item.id.split('.').join('-');
|
||||
$('.range-list').append('<div class="range-item">' +
|
||||
' <span class="name">' + item.name + '</span>' +
|
||||
' <input class="range" id="' + id + '"/>' +
|
||||
' </div>');
|
||||
$("#" + id).ionRangeSlider({
|
||||
min: 100,
|
||||
max: 400,
|
||||
from: width,
|
||||
onChange: function (data) {
|
||||
var $wrapper = $('.im-table-header').find('[data-column="' + item.id + '"]');
|
||||
var $target = $wrapper.find('.im-form-header-input');
|
||||
if ($target.length === 0) {
|
||||
$target = $wrapper.find('im-select');
|
||||
}
|
||||
|
||||
$target.css('width', data.from + 'px');
|
||||
},
|
||||
onFinish: function (data) {
|
||||
store.set($table + '_width-' + item.id, data.from);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Sortable.create(document.getElementById('fieldTable'), {
|
||||
onEnd: function (e) {
|
||||
var arr = [];
|
||||
$("#fieldTable").find('li').each(function (index) {
|
||||
arr.push({
|
||||
id: $(this).attr('data-id'),
|
||||
index: index,
|
||||
name: $(this).text(),
|
||||
hide: false
|
||||
})
|
||||
});
|
||||
fields1.forEach(function (item) {
|
||||
if (item.hide) {
|
||||
arr.push({
|
||||
id: item.id,
|
||||
index: arr.length,
|
||||
name: item.name,
|
||||
hide: true
|
||||
});
|
||||
}
|
||||
});
|
||||
fields1 = arr;
|
||||
}
|
||||
});
|
||||
|
||||
Sortable.create(document.getElementById('filterField'), {
|
||||
onEnd: function (e) {
|
||||
var arr = [];
|
||||
$("#filterField").find('li').each(function (index) {
|
||||
arr.push({
|
||||
id: $(this).attr('data-id'),
|
||||
index: index,
|
||||
name: $(this).text(),
|
||||
hide: false
|
||||
})
|
||||
});
|
||||
fields2.forEach(function (item) {
|
||||
if (item.hide) {
|
||||
arr.push({
|
||||
id: item.id,
|
||||
index: arr.length,
|
||||
name: item.name,
|
||||
hide: true
|
||||
});
|
||||
}
|
||||
});
|
||||
fields2 = arr;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-width="400" data-height="200">
|
||||
<style>
|
||||
.simpleAddBody .template-btn {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span th:text="|上传导出模板|"></span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<form id="excelForm" enctype="multipart/form-data" method="post">
|
||||
<div class="simpleAddBody">
|
||||
<div id="formTable">
|
||||
<div>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
</div>
|
||||
<a th:if="${template != null}" th:href="'excelTemplate/default.html?name=' + ${template}"
|
||||
class="template-btn">下载默认导出模板</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: '[[${url}]]',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.close($dialog);
|
||||
Dialog.success('上传成功');
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
31
src/main/webapp/WEB-INF/template/common/dialogModel.html
Normal file
31
src/main/webapp/WEB-INF/template/common/dialogModel.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="globalTip" id="globalTip">
|
||||
<div class="text"></div>
|
||||
</div>
|
||||
<div class="globalLayer" id="globalLayer">
|
||||
<div class="dialog dialogAlert" id="dialogAlert">
|
||||
<div class="dialogClose">╳</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<i class="fa fa-exclamation-circle"></i>
|
||||
<span class="text">确定删除吗? </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="yes">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog confirmDialog">
|
||||
<div class="dialogClose">╳</div>
|
||||
<div class="dialogBody">
|
||||
<div class="dialogContent">
|
||||
<i class="fa fa-exclamation-circle"></i>
|
||||
<span class="text">确定删除吗? </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="no">取消</a><a class="yes">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="functionDialogContenter" id="functionDialogContenter"></div>
|
||||
<div class="secondary-dialog" id="secondaryDialog"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<input type="hidden" id="dialogPageSize" name="pageSize"
|
||||
th:value="${page.pageSize}" />
|
||||
<input type="hidden" id="dialogOrderProperty" name="orderProperty"
|
||||
th:value="${page.orderProperty}" />
|
||||
<input type="hidden" id="dialogOrderDirection" name="orderDirection"
|
||||
th:value="${page.orderDirection}" />
|
||||
<input type="hidden" id="dialogTotal" name="total"
|
||||
th:value="${page.total}" />
|
||||
<input type="hidden" id="dialogPageCount" name="pageCount"
|
||||
value="1" />
|
||||
<input type="hidden" id="dialogPageNumber" name="pageNumber"
|
||||
th:value="${page.pageNumber}" />
|
||||
<div class="pageToolBar" id="functionDialogPageToolBar">
|
||||
<div class="pageSizeBox">
|
||||
<span>每页显示</span><span th:text="${page.pageSize}"></span><span>项</span>
|
||||
</div>
|
||||
<div class="pageInfo">
|
||||
<span th:text="|共 ${page.total} 项|"></span> <span th:text="|第 ${page.pageNumber}/|"><span id = "_pageCount"></span> 页</span>
|
||||
</div>
|
||||
<div class="preNextPageBox">
|
||||
<a class="prevPage">上一页</a> <a href="#" class="nextPage">下一页</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var $functionDialogListForm = $("#functionDialogListForm");
|
||||
$functionDialogListForm.submit(function() {
|
||||
$(this).ajaxSubmit(function(data){
|
||||
$("#functionDialogContenter").html(data);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
var $total = $("#dialogTotal");
|
||||
var $pageSize = $("#dialogPageSize");
|
||||
var $pageCount = $("#dialogPageCount");
|
||||
var $pageNumber = $("#dialogPageNumber");
|
||||
var $prevPage = $("#functionDialogPageToolBar").find(".prevPage");
|
||||
var $nextPage = $("#functionDialogPageToolBar").find(".nextPage");
|
||||
|
||||
$pageCount.val(Math.floor($total.val()/$pageSize.val() + 1));
|
||||
$("#_pageCount").html($pageCount.val());
|
||||
|
||||
$nextPage.click(function(){
|
||||
if($pageNumber.val() != $pageCount.val()){
|
||||
$pageNumber.val(parseInt($pageNumber.val()) + 1);
|
||||
}
|
||||
$functionDialogListForm.submit();
|
||||
});
|
||||
|
||||
$prevPage.click(function(){
|
||||
if($pageNumber.val() != 1){
|
||||
$pageNumber.val(parseInt($pageNumber.val()) - 1);
|
||||
}
|
||||
$functionDialogListForm.submit();
|
||||
});
|
||||
|
||||
$(".reloadBtn").click(function(){
|
||||
$pageNumber.val("1");
|
||||
$("#searchValue").val("");
|
||||
$functionDialogListForm.submit();
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
8
src/main/webapp/WEB-INF/template/common/dot-box.html
Normal file
8
src/main/webapp/WEB-INF/template/common/dot-box.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dot-box">
|
||||
</div>
|
||||
<script>
|
||||
initStatusDot();
|
||||
</script>
|
||||
</html>
|
||||
250
src/main/webapp/WEB-INF/template/common/index-gai.html
Normal file
250
src/main/webapp/WEB-INF/template/common/index-gai.html
Normal file
@@ -0,0 +1,250 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title th:text="${systemSetting.siteName}"></title>
|
||||
<link rel="shortcut icon" th:href="@{${systemSetting.ico}}"/>
|
||||
<link th:href="@{../resources/css/font-awesome.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/select2.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/jquery.orgchart.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/layui/css/layui.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/style.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/select2totree.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/jquery-ui.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/jquery.datetimepicker.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/zTreeStyle.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/ion.rangeSlider.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/viewer.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/js/um/themes/default/css/umeditor.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/fullcalendar/core/main.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/fullcalendar/daygrid/main.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/css/theme/blue.css}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
.ImgShow {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 8888;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ImgShow img {
|
||||
width: 60%;
|
||||
margin-left: 20%;
|
||||
margin-top: 10%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.appHeader {
|
||||
background: #317ae3 !important;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.appSideBar {
|
||||
padding-top: 50px;
|
||||
width: 170px;
|
||||
background: #273544;
|
||||
}
|
||||
|
||||
.appSideBar .user-info {
|
||||
padding: 40px 0 0 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.appSideBar .user-info .avatar {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.appSideBar .user-info .name-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 8px 0 0 4px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.appSideBar .user-info .name-wrapper .top {
|
||||
font-size: 16px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.appSideBar .user-info .name-wrapper .bottom {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.appSideBar .button-wrapper {
|
||||
margin-top: 30px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.appSideBar .button-wrapper .button-item {
|
||||
display: inline-block;
|
||||
width: 33.3%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.appSideBar .button-wrapper .button-item .logo {
|
||||
display: block;
|
||||
margin: 0 auto 4px auto;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.appSideBar .button-wrapper .button-item .text {
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.appSideBar .menuBar {
|
||||
margin-top: 0;
|
||||
height: calc(100% - 209px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.appSideBar .menuBar .single a {
|
||||
padding-left: 14px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
#header-fixed .top-menu-wrapper .top-menu-item {
|
||||
color: #c9e0fb;
|
||||
}
|
||||
|
||||
#header-fixed .top-menu-wrapper .top-menu-item.active {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#header-fixed .top-menu-wrapper .top-menu-item.active::after {
|
||||
background: #ffffff;
|
||||
top: 24px;
|
||||
width: 30px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="ImgShow">
|
||||
<img>
|
||||
</div>
|
||||
<div class="appHeader separate" id="appHeader">
|
||||
<div id="header-fixed" class="separate">
|
||||
<div class="page-back-btn-wrapper">
|
||||
<a class="page-back-btn disabled"><i class="fa fa-angle-left"></i></a>
|
||||
</div>
|
||||
<div class="top-title-wrapper">
|
||||
<div class="title"></div>
|
||||
<span class="sub-title"></span>
|
||||
<a class="icon-wrapper setting-wrapper" href="#">
|
||||
<i class="fa fa-cog"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="top-menu-wrapper">
|
||||
<span class="top-menu-item" data-id="home">我的主页</span>
|
||||
<span class="top-menu-item" data-id="workplace">工作台</span>
|
||||
<span class="top-menu-item" data-id="administrative">行政</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="appSideBar" id="appSideBar">
|
||||
<div class="user-info">
|
||||
<img class="avatar" th:src="@{${systemSetting.logo}}">
|
||||
<div class="name-wrapper">
|
||||
<div class="top" th:text="${admin.name}"></div>
|
||||
<div class="bottom" th:text="${admin.department.name}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-wrapper">
|
||||
<a class="button-item" href="javascript:$('.top-menu-wrapper .top-menu-item:eq(0)').click()">
|
||||
<img class="logo" src="/resources/images/home/home.png">
|
||||
<span class="text">主页</span>
|
||||
</a>
|
||||
<a class="button-item" href="javascript:Dialog.functionDialog(600, 400, 'admin/changePass.html');">
|
||||
<img class="logo" src="/resources/images/home/password.png">
|
||||
<span class="text">密码</span>
|
||||
</a>
|
||||
<a class="button-item" href="/admin/logout.html">
|
||||
<img class="logo" src="/resources/images/home/logout.png">
|
||||
<span class="text">注销</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="menuBar">
|
||||
<th:block th:each="menu : ${systemMenu}">
|
||||
<li th:each=" menuItem : ${menu.children}" th:if="${menuItem.show}" class="single"
|
||||
th:data-parent="${menu.name}">
|
||||
<a th:href="|javascript:Nav.go('${menuItem.url}')|" th:text="${menuItem.name}"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="appContent" id="appContent">
|
||||
<div class="appBody separate" id="appBody">
|
||||
|
||||
</div>
|
||||
<div class="hover-image-wrapper">
|
||||
<img class="hover-image"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.validate.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.form.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/select2.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/select2totree.js}"></script>
|
||||
<script>
|
||||
document.write('<script src="../resources/js/base.js?rand=' + Math.random() + '"><\/script>');
|
||||
</script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/highcharts.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/echarts.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/layui/layui.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery-ui.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.datetimepicker.full.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.slimscroll.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.orgchart.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/colResizable-1.6.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/select-field.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/select-filter.js}"></script>
|
||||
<script>
|
||||
document.write('<script src="../resources/js/complex-add.js?rand=' + Math.random() + '"><\/script>');
|
||||
</script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/store.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/jquery.ztree.all-3.5.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/slide-bar.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/form-setting.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/Sortable.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/fullcalendar/core/main.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/fullcalendar/daygrid/main.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/fullcalendar/core/locales/zh-cn.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/ion.rangeSlider.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/viewer.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/lodop/LodopFuncs.js}"></script>
|
||||
<!-- 引入 etpl -->
|
||||
<script type="text/javascript" th:src="@{../resources/js/um/third-party/esl-1.6.6.js}"></script>
|
||||
<!-- 配置文件 -->
|
||||
<script type="text/javascript" th:src="@{../resources/js/um/umeditor.config.js}"></script>
|
||||
<!-- 编辑器源码文件 -->
|
||||
<script type="text/javascript" th:src="@{../resources/js/um/umeditor.js}"></script>
|
||||
<!-- 语言包文件 -->
|
||||
<script type="text/javascript" th:src="@{../resources/js/um/lang/zh-cn/zh-cn.js}"></script>
|
||||
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=IS62lQB2z5dotDqvDYfr8PNuZE6wm8Ou"></script>
|
||||
|
||||
<script>
|
||||
initSlideBarGai('[[${session.curDeptName}]]');
|
||||
$(".ImgShow").click(function () {
|
||||
$(".ImgShow").hide();
|
||||
})
|
||||
</script>
|
||||
<div th:replace="common/dialogModel"></div>
|
||||
</body>
|
||||
</html>
|
||||
411
src/main/webapp/WEB-INF/template/common/index.html
Normal file
411
src/main/webapp/WEB-INF/template/common/index.html
Normal file
@@ -0,0 +1,411 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title th:text="${systemSetting.siteName}"></title>
|
||||
<!-- <link rel="shortcut icon" th:href="@{${systemSetting.ico}}"/>-->
|
||||
<link rel="shortcut icon" href="../resources/images/zhsh.ico"/>
|
||||
<link th:href="@{../resources/css/font-awesome.min.css}" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/select2.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/select2.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/jquery.orgchart.min.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/jquery.orgchart.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{../resources/layui/css/layui.css}" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{'../resources/css/style.css' + '?v=2'}" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/select2totree.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/select2totree.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/jquery-ui.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/jquery.datetimepicker.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/jquery.datetimepicker.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/zTreeStyle.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/zTreeStyle.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/ion.rangeSlider.min.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/ion.rangeSlider.min.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/css/viewer.min.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/css/viewer.min.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/js/um/themes/default/css/umeditor.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/um/themes/default/css/umeditor.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/fullcalendar/core/main.min.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/fullcalendar/core/main.min.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- <link th:href="@{../resources/fullcalendar/daygrid/main.min.css}" rel="stylesheet" type="text/css"/>-->
|
||||
<link href="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/fullcalendar/daygrid/main.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="@{'../resources/css/theme/' + ${systemSetting.themeScheme} + '.css'}" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<style>
|
||||
.ImgShow {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 8888;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ImgShow img {
|
||||
width: 60%;
|
||||
margin-left: 20%;
|
||||
margin-top: 10%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.logo-img{
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
margin: unset;
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
border-radius: 15px 15px 0px 0px;
|
||||
}
|
||||
|
||||
.userBox img{
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.version{
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
bottom: 0px;
|
||||
position: fixed;
|
||||
background: #0D153A;
|
||||
}
|
||||
|
||||
.version span{
|
||||
font-size: 10px;
|
||||
display: block;
|
||||
width: 200px;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="ImgShow">
|
||||
<img>
|
||||
</div>
|
||||
<div class="appHeader" id="appHeader" style="box-shadow: 200px 5px 5px #e3e3e3;" th:classappend="${systemSetting.navigateMode}">
|
||||
<div id="header-side-bar" th:classappend="${systemSetting.navigateMode}">
|
||||
<img class="logo" th:src="@{${systemSetting.logo}}"/>
|
||||
<!-- <img class="logo" src="../resources/images/bgLogo.jpeg"/>-->
|
||||
<!-- <span class="name" th:text="${systemSetting.siteName}" th:title="${systemSetting.siteName}"></span>-->
|
||||
</div>
|
||||
<div id="header-fixed" th:classappend="${systemSetting.navigateMode}">
|
||||
<div class="page-back-btn-wrapper">
|
||||
<a class="page-back-btn disabled"><i class="fa fa-angle-left"></i></a>
|
||||
</div>
|
||||
<div class="top-title-wrapper">
|
||||
<div class="title"></div>
|
||||
<span class="sub-title"></span>
|
||||
<a class="icon-wrapper setting-wrapper" href="#">
|
||||
<i class="fa fa-cog"></i>
|
||||
</a>
|
||||
</div>
|
||||
<shiro:hasPermission name="system:search">
|
||||
<div class="global-search-wrapper">
|
||||
<div class="drop-down">
|
||||
<i class="fa fa-sort-down"></i>
|
||||
</div>
|
||||
<div class="drop-down-list">
|
||||
<div class="item" data-name="productCode">
|
||||
<div class="text">物料编号</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div class="item" data-name="name">
|
||||
<div class="text">专业名称</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div class="item" data-name="areaAccount">
|
||||
<div class="text">主项号</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div class="item" data-name="unitAccount">
|
||||
<div class="text">单元号</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div class="item" data-name="siteAccount">
|
||||
<div class="text">分区号</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div class="item" data-name="lineAccount">
|
||||
<div class="text">管线号</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div class="item" data-name="longDescription">
|
||||
<div class="text">长描述</div>
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="text" style="border-radius: 3px 0px 0px 3px">
|
||||
<!-- <a type="button">搜索</a>-->
|
||||
<a style="border-radius: 0px 3px 3px 0px;width: 60px" ><img src="../resources/images/searchIcon.png"/>搜索</a>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
<div class="navBar">
|
||||
<div class="userBox">
|
||||
<a href="#">
|
||||
<th:block th:if="${showProgress}">
|
||||
<span class="username" id="progress"><img src="../resources/images/home/top/项目.png"/><span th:text='|当前项目:${progress==null?"公司":progress.code+"("+progress.name+")"}|'></span><span style="margin-left: 5px"><img src="../resources/images/home/top/切换.png"/>切换项目</span></span>
|
||||
</th:block>
|
||||
<span class="username" ><img src="../resources/images/home/top/用户.png"/><span th:text='|当前用户:"${admin.username}"|'></span></span>
|
||||
<!-- <span class="email">-->
|
||||
<!-- <i class="layui-icon-email layui-icon"></i>-->
|
||||
<!-- <span class="red-dot"></span>-->
|
||||
<!-- </span>-->
|
||||
<span class="changePwd" onclick="Dialog.functionDialog(600, 400, 'admin/changePass.html')"><img src="../resources/images/home/top/修改密码.png"/>修改密码</span>
|
||||
</a>
|
||||
<a href="/admin/logout.html">
|
||||
<span class="logout"><img src="../resources/images/home/top/退出.png"/>退出</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="appContent" id="appContent">
|
||||
<div class="appSideBar" style="box-shadow: 5px 0px 5px #e3e3e3;height: 100%;overflow: auto;" th:classappend="${systemSetting.navigateMode}" id="appSideBar">
|
||||
<div class="logo-box">
|
||||
<!-- <img class="logo" th:src="@{${systemSetting.logo}}"/>-->
|
||||
<img class="logo" src="../resources/images/home/bgLogo2.png"/>
|
||||
</div>
|
||||
|
||||
<ul class="menuBar" style="overflow:auto;background: #0D153A;padding-bottom: 20px">
|
||||
<li class="unit" th:each="menu : ${systemMenu}" th:shiro:hasAnyPermissions="${menu.permissions}"
|
||||
th:if="${menu.show}">
|
||||
<div class="icon-wrapper">
|
||||
<img class="img-icon" th:src="${menu.icon}">
|
||||
<div class="icon-info" th:text="${menu.name}"></div>
|
||||
</div>
|
||||
<a class="title">
|
||||
<img th:src="${menu.icon}" /><span th:text="${menu.name}"></span>
|
||||
<i class="fa fa-angle-left rightIcon"></i>
|
||||
</a>
|
||||
<ul class="itemList">
|
||||
<th:block th:each="menuItem : ${menu.children}">
|
||||
<th:block th:if="${menuItem.children.size() == 0}">
|
||||
<li th:if="${menuItem.show}" th:shiro:hasPermission="${menuItem.permission}">
|
||||
<a th:href="|javascript:Nav.go('${menuItem.url}')|">
|
||||
<i class="fa fa-angle-right leftIcon"></i>
|
||||
<span th:text="${menuItem.name}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:if="${menuItem.children.size() > 0}">
|
||||
<li class="unit sub" th:if="${menuItem.show}"
|
||||
th:shiro:hasAnyPermissions="${menuItem.permissions}">
|
||||
<a class="title" style="padding-left: unset">
|
||||
<i style="margin: unset" class="fa fa-angle-right leftIcon"></i>
|
||||
<span style="padding-left: unset" th:text="${menuItem.name}"></span>
|
||||
<!-- <i class="fa fa-angle-left rightIcon"></i>-->
|
||||
</a>
|
||||
<ul class="itemList">
|
||||
<li th:each="item : ${menuItem.children}"
|
||||
th:shiro:hasPermission="${item.permission}">
|
||||
<a th:href="|javascript:Nav.go('${item.url}')|">
|
||||
<i class="fa fa-angle-right leftIcon"></i>
|
||||
<span th:text="${item.name}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="version"><span th:text="|版本:${systemSetting.appVersion}|"></span></div>
|
||||
</div>
|
||||
<div class="appBody" th:classappend="${systemSetting.navigateMode}" id="appBody">
|
||||
|
||||
</div>
|
||||
<div class="hover-image-wrapper">
|
||||
<img class="hover-image"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.validate.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.validate.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.form.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.form.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/select2.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/select2.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/select2totree.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/select2totree.js"></script>
|
||||
<script>
|
||||
document.write('<script src="../resources/js/base.js?rand=' + Math.random() + '"><\/script>');
|
||||
</script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/highcharts.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/highcharts.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/echarts.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/echarts.min.js"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/layui/layui.js}"></script>
|
||||
<!--<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/layui/layui.js"></script>-->
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery-ui.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery-ui.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.datetimepicker.full.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.datetimepicker.full.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.slimscroll.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.slimscroll.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.orgchart.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.orgchart.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/colResizable-1.6.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/colResizable-1.6.js"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/select-field.js?v=1}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/select-filter.js}"></script>
|
||||
<script>
|
||||
document.write('<script src="../resources/js/complex-add.js?rand=' + Math.random() + '"><\/script>');
|
||||
</script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/store.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/store.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/jquery.ztree.all-3.5.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/jquery.ztree.all-3.5.min.js"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/slide-bar.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/form-setting.js}"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/Sortable.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/Sortable.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/fullcalendar/core/main.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/fullcalendar/core/main.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/fullcalendar/daygrid/main.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/fullcalendar/daygrid/main.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/fullcalendar/core/locales/zh-cn.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/fullcalendar/core/locales/zh-cn.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/ion.rangeSlider.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/ion.rangeSlider.min.js"></script>
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/viewer.min.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/viewer.min.js"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/js/autocomplete.js}"></script>
|
||||
<script type="text/javascript" th:src="@{../resources/lodop/LodopFuncs.js}"></script>
|
||||
<!-- 引入 etpl -->
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/um/third-party/esl-1.6.6.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/um/third-party/esl-1.6.6.js"></script>
|
||||
<!-- 配置文件 -->
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/um/umeditor.config.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/um/umeditor.config.js"></script>
|
||||
<!-- 编辑器源码文件 -->
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/um/umeditor.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/um/umeditor.js"></script>
|
||||
<!-- 语言包文件 -->
|
||||
<!--<script type="text/javascript" th:src="@{../resources/js/um/lang/zh-cn/zh-cn.js}"></script>-->
|
||||
<script type="text/javascript" src="https://runyi-static.oss-cn-hangzhou.aliyuncs.com/js/um/lang/zh-cn/zh-cn.js"></script>
|
||||
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=IS62lQB2z5dotDqvDYfr8PNuZE6wm8Ou"></script>
|
||||
|
||||
<script>
|
||||
if ('[[${ systemSetting.navigateMode}]]' === 'separate') {
|
||||
initSeparateSlideBar();
|
||||
} else {
|
||||
initSlideBar();
|
||||
}
|
||||
$(window).resize(function () {
|
||||
$('body').trigger('slideBarSwitched');
|
||||
});
|
||||
|
||||
if (!'[[${ systemSetting.receiptPoint}]]') {
|
||||
setTimeout(function () {
|
||||
Dialog.functionDialog(null, null, "/admin/system/selectReceiptPoint.html");
|
||||
}, 1500);
|
||||
}
|
||||
$(".ImgShow").click(function () {
|
||||
$(".ImgShow").hide();
|
||||
})
|
||||
|
||||
store.set('lastedNavUrlArr', []);
|
||||
|
||||
initDebug();
|
||||
|
||||
layui.config({
|
||||
base: '/resources/layui/static/modules/', // 第三方模块所在目录
|
||||
version: 'v1.5.21' // 插件版本号
|
||||
}).extend({
|
||||
soulTable: 'soulTable/soulTable',
|
||||
tableChild: 'soulTable/tableChild',
|
||||
tableMerge: 'soulTable/tableMerge',
|
||||
tableFilter: 'soulTable/tableFilter',
|
||||
excel: 'soulTable/excel',
|
||||
});
|
||||
|
||||
$(".appHeader .navBar .userBox .email").on('click', function () {
|
||||
$.ajax({
|
||||
url: 'mail/loginAuth.html',
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
window.open(res.data.jump_url);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var ewoMailUidNext = null
|
||||
// mailNewMessage()
|
||||
// setInterval(function () {
|
||||
// mailNewMessage()
|
||||
// }, 1000 * 10)
|
||||
|
||||
function mailNewMessage() {
|
||||
$.ajax({
|
||||
url: 'mail/newMessage.html',
|
||||
dataType: "json",
|
||||
data: {
|
||||
uidNext: ewoMailUidNext
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
ewoMailUidNext = res.data.uidNext
|
||||
var unseenCount = res.data.unseenCount;
|
||||
var $redDot = $(".appHeader .navBar .userBox .email .red-dot");
|
||||
$redDot.text(unseenCount);
|
||||
if (unseenCount > 0) {
|
||||
$redDot.show();
|
||||
} else {
|
||||
$redDot.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#progress").on("click",function () {
|
||||
Dialog.functionDialog(600, 400, 'admin/changeProgress.html')
|
||||
})
|
||||
|
||||
$(function () {
|
||||
var $globalSearchWrapper = $("#header-fixed > .global-search-wrapper");
|
||||
var $dropDownList = $globalSearchWrapper.children('.drop-down-list');
|
||||
$globalSearchWrapper.children("input").keydown(function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
search()
|
||||
}
|
||||
})
|
||||
$globalSearchWrapper.children("a").on('click', search)
|
||||
$globalSearchWrapper.find('input,.drop-down,.drop-down-list').hover(function () {
|
||||
$dropDownList.show();
|
||||
}, function () {
|
||||
$dropDownList.hide();
|
||||
})
|
||||
$dropDownList.children('.item').on('click', function () {
|
||||
$(this).toggleClass('active');
|
||||
})
|
||||
|
||||
function search() {
|
||||
var arr = []
|
||||
if ($dropDownList.children(".item.active").length === 0) {
|
||||
$dropDownList.children(".item").eq(0).addClass('active');
|
||||
}
|
||||
$dropDownList.children(".item.active").each(function () {
|
||||
arr.push($(this).attr('data-name'))
|
||||
})
|
||||
var value = $globalSearchWrapper.children('input').val()
|
||||
Nav.go('home/allList.html?key=' + arr.join(",") + '&value=' + value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<div th:replace="common/dialogModel"></div>
|
||||
</body>
|
||||
</html>
|
||||
16
src/main/webapp/WEB-INF/template/common/layuiTable.html
Normal file
16
src/main/webapp/WEB-INF/template/common/layuiTable.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<script>
|
||||
var $listForm = $("#listForm");
|
||||
$listForm.submit(function () {
|
||||
$(this).ajaxSubmit(function (data) {
|
||||
$("#appBody").html(data);
|
||||
$(".appPage .searchBar .searchInput input").trigger("keyup");
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$(".refresh").click(function () {
|
||||
Nav.refresh();
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
88
src/main/webapp/WEB-INF/template/common/pageBox.html
Normal file
88
src/main/webapp/WEB-INF/template/common/pageBox.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title th:text="${systemSetting.siteName}"></title>
|
||||
<link rel="shortcut icon" th:href="@{${systemSetting.ico}}"/>
|
||||
<link href="/resources/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/select2.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/jquery.orgchart.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/layui/css/layui.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/style.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/select2totree.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/jquery.datetimepicker.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/zTreeStyle.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/ion.rangeSlider.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/css/viewer.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/js/um/themes/default/css/umeditor.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/fullcalendar/core/main.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/resources/fullcalendar/daygrid/main.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link th:href="'/resources/css/theme/' + ${systemSetting.themeScheme} + '.css'" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
|
||||
</div>
|
||||
<script type="text/javascript" src="/resources/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery.validate.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/select2.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/select2totree.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/base.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/highcharts.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/echarts.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery.datetimepicker.full.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery.slimscroll.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery.orgchart.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/colResizable-1.6.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/select-field.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/select-filter.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/complex-add.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/store.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/jquery.ztree.all-3.5.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/slide-bar.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/form-setting.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/Sortable.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/fullcalendar/core/main.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/fullcalendar/daygrid/main.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/fullcalendar/core/locales/zh-cn.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/ion.rangeSlider.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/js/viewer.min.js"></script>
|
||||
<script type="text/javascript" src="/resources/lodop/LodopFuncs.js"></script>
|
||||
<!-- 引入 etpl -->
|
||||
<script type="text/javascript" src="/resources/js/um/third-party/esl-1.6.6.js"></script>
|
||||
<!-- 配置文件 -->
|
||||
<script type="text/javascript" src="/resources/js/um/umeditor.config.js"></script>
|
||||
<!-- 编辑器源码文件 -->
|
||||
<script type="text/javascript" src="/resources/js/um/umeditor.js"></script>
|
||||
<!-- 语言包文件 -->
|
||||
<script type="text/javascript" src="/resources/js/um/lang/zh-cn/zh-cn.js"></script>
|
||||
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=IS62lQB2z5dotDqvDYfr8PNuZE6wm8Ou"></script>
|
||||
<script>
|
||||
initPage('[[${url.replaceAll("&", "&")}]]');
|
||||
|
||||
console.log('[[${url}]]')
|
||||
console.log('[[${url.replaceAll("&", "&")}]]')
|
||||
|
||||
function initPage(url) {
|
||||
var loading = "<div style = 'text-align:center;margin-top:20px;'><i id = 'loading' class='fa-li fa fa-spinner fa-spin'></i>正在加载...</div>";
|
||||
// var error = "<div style = 'text-align:center;margin-top:20px;'>加载失败!</div>";
|
||||
var error = "<div style = 'text-align:center;margin-top:20px'>" +
|
||||
"<img style='width: 300px;margin-top: 100px' src='/resources/images/404.png'/>"+
|
||||
"</div>";
|
||||
$(".content").html(loading);
|
||||
$(".content").load(url, {}, function (response, status, xhr) {
|
||||
if (status === "success") {
|
||||
Nav.initPage();
|
||||
} else {
|
||||
$("#appBody").html(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
114
src/main/webapp/WEB-INF/template/common/pagination.html
Normal file
114
src/main/webapp/WEB-INF/template/common/pagination.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<input type="hidden" id="pageSize" name="pageSize"
|
||||
th:value="${page.pageSize}"/>
|
||||
<input type="hidden" id="total" name="total"
|
||||
th:value="${page.total}"/>
|
||||
<input type="hidden" id="pageCount" name="pageCount"
|
||||
th:value="1"/>
|
||||
<input type="hidden" id="pageNumber" name="pageNumber"
|
||||
th:value="${page.pageNumber}"/>
|
||||
<input type="hidden" id="orderProperty" name="orderProperty"
|
||||
th:value="${page.orderProperty}" />
|
||||
<input type="hidden" id="orderDirection" name="orderDirection"
|
||||
th:value="${page.orderDirection}" />
|
||||
<!--<c:if test="${page.total!=0}">-->
|
||||
<div class="pageToolBar" th:if="${page.total!=0}">
|
||||
<div class="page-info">
|
||||
<div class="page-size-wrapper">
|
||||
<select id="selectPageSize" th:data-init="${page.pageSize}">
|
||||
<option value="20">20 条/每页</option>
|
||||
<option value="50">50 条/每页</option>
|
||||
<option value="100">100 条/每页</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="total-count">共<span class="highlight" th:text="${page.total}"></span>条</div>
|
||||
</div>
|
||||
<div class="page-tool">
|
||||
<div class="page-input">
|
||||
<input id="pageCountInput" type="text" th:value="${page.pageNumber}">
|
||||
<span id="totalPage" class="page-count">/ </span>
|
||||
</div>
|
||||
<div class="control">
|
||||
<a class="prevPage"><i class="fa fa-angle-left"></i></a>
|
||||
<a class="nextPage"><i class="fa fa-angle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</c:if>-->
|
||||
<script>
|
||||
var $listForm = $("#listForm");
|
||||
$listForm.submit(function () {
|
||||
$(this).ajaxSubmit(function (data) {
|
||||
$("#appBody").html(data);
|
||||
$(".appPage .searchBar .searchInput input").trigger("keyup");
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
var $total = $("#total");
|
||||
var $pageSize = $("#pageSize");
|
||||
var $pageCount = $("#pageCount");
|
||||
var $pageNumber = $("#pageNumber");
|
||||
var $prevPage = $(".prevPage");
|
||||
var $nextPage = $(".nextPage");
|
||||
var $pageCountInput = $("#pageCountInput");
|
||||
|
||||
var pageCountNum = $total.val() % $pageSize.val() == 0 ? $total.val() / $pageSize.val() : Math.floor($total.val() / $pageSize.val() + 1);
|
||||
$pageCount.val(pageCountNum);
|
||||
|
||||
var $select = $("#selectPageSize");
|
||||
$select.each(function () {
|
||||
var init = $(this).attr('data-init');
|
||||
$(this).select2();
|
||||
if (init) {
|
||||
$(this).val(init).trigger('change');
|
||||
}
|
||||
});
|
||||
|
||||
$("#totalPage").html('/' + pageCountNum + ' 页');
|
||||
|
||||
$("#_pageCount").html($pageCount.val());
|
||||
|
||||
$nextPage.click(function () {
|
||||
if ($pageNumber.val() != $pageCount.val()) {
|
||||
$pageNumber.val(parseInt($pageNumber.val()) + 1);
|
||||
}
|
||||
$listForm.submit();
|
||||
});
|
||||
|
||||
$prevPage.click(function () {
|
||||
if ($pageNumber.val() != 1) {
|
||||
$pageNumber.val(parseInt($pageNumber.val()) - 1);
|
||||
}
|
||||
$listForm.submit();
|
||||
});
|
||||
|
||||
$pageCountInput.on('change', function () {
|
||||
var value = parseInt($(this).val());
|
||||
var pageCount = parseInt($pageCount.val());
|
||||
if (isNaN(value) || value < 1) {
|
||||
value = 1
|
||||
}
|
||||
|
||||
if (value > pageCount) {
|
||||
value = pageCount
|
||||
}
|
||||
|
||||
$pageCountInput.val(value);
|
||||
$pageNumber.val(value);
|
||||
$listForm.submit();
|
||||
});
|
||||
|
||||
$("#selectPageSize").on("change", function () {
|
||||
var targetPageSize = $(this).val();
|
||||
$("#pageSize").val(targetPageSize);
|
||||
$listForm.submit();
|
||||
});
|
||||
|
||||
$(".refresh").click(function () {
|
||||
var url = $listForm.attr("action");
|
||||
Nav.go(url);
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
172
src/main/webapp/WEB-INF/template/company/add.html
Normal file
172
src/main/webapp/WEB-INF/template/company/add.html
Normal file
@@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<form id="addForm" action="company/save.html" returnUrl="company/list.html" method="post">
|
||||
<style>
|
||||
#map {
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
right: 20px;
|
||||
}
|
||||
</style>
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加公司</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('company/list.html')">返回</a>
|
||||
<a class="form-setting"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=company');"
|
||||
th:text="#{page.formSetting}">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortName">简称</label>
|
||||
<input class="text" id="shortName" name="shortName"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortNameCode">简称编码</label>
|
||||
<input class="text" id="shortNameCode" name="shortNameCode"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="taxpayerSn">税务登记号</label>
|
||||
<input class="text" id="taxpayerSn" name="taxpayerSn"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" id="address" name="address"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="lat">纬度</label>
|
||||
<input class="text" type="text" id="lat" name="lat" autocomplete="off" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="lng">经度</label>
|
||||
<input class="text" type="text" id="lng" name="lng" autocomplete="off" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="scope">签到范围(km)</label>
|
||||
<input class="text" type="number" id="scope" name="scope" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="onWorkDateStr">上班时间</label>
|
||||
<input class="text" id="onWorkDateStr" name="onWorkDateStr"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="offWorkDateStr">下班时间</label>
|
||||
<input class="text" id="offWorkDateStr" name="offWorkDateStr"
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="phone">电话</label>
|
||||
<input class="text" type="text" id="phone" name="phone" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="fax">传真</label>
|
||||
<input class="text" type="text" id="fax" name="fax" autocomplete="off">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('company/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
fillFirstPinyin($("#shortName"), $("#shortNameCode"));
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
address: {
|
||||
required: true
|
||||
},
|
||||
scope: {
|
||||
required: true,
|
||||
min: 0
|
||||
},
|
||||
lat: {
|
||||
required: true
|
||||
},
|
||||
lng: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: "名称不能为空"
|
||||
},
|
||||
address: {
|
||||
required: "地址不能为空"
|
||||
},
|
||||
scope: {
|
||||
required: "签到范围不能为空",
|
||||
min: "必须大于0"
|
||||
},
|
||||
lat: {
|
||||
required: "纬度不能为空"
|
||||
},
|
||||
lng: {
|
||||
required: "经度不能为空"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
commonSubmitHandler(form);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#address").on('change', function () {
|
||||
$.ajax({
|
||||
url: 'address/search.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
address: $(this).val()
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data) {
|
||||
$("#lng").val(res.data.lng.toFixed(6));
|
||||
$("#lat").val(res.data.lat.toFixed(6));
|
||||
|
||||
var point = new BMap.Point(res.data.lng, res.data.lat);
|
||||
map.clearOverlays();
|
||||
map.centerAndZoom(point, 18);
|
||||
map.addOverlay(new BMap.Marker(point));
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var map = new BMap.Map("map");
|
||||
map.enableScrollWheelZoom(true);
|
||||
map.addEventListener("click", function (e) {
|
||||
map.clearOverlays();
|
||||
map.addOverlay(new BMap.Marker(e.point));
|
||||
$("#lng").val(e.point.lng);
|
||||
$("#lat").val(e.point.lat);
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
180
src/main/webapp/WEB-INF/template/company/edit.html
Normal file
180
src/main/webapp/WEB-INF/template/company/edit.html
Normal file
@@ -0,0 +1,180 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<form id="addForm" action="company/update.html" returnUrl="company/list.html" method="post">
|
||||
<input type="hidden" name="id" th:value="${company.id}">
|
||||
<style>
|
||||
#map {
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
right: 20px;
|
||||
}
|
||||
</style>
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">编辑公司</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('company/list.html')">返回</a>
|
||||
<a class="form-setting"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=company');"
|
||||
th:text="#{page.formSetting}">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" type="text" th:value="${company.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortName">简称</label>
|
||||
<input class="text" id="shortName" name="shortName"
|
||||
type="text" th:value="${company.shortName}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="shortNameCode">简称编码</label>
|
||||
<input class="text" id="shortNameCode" name="shortNameCode"
|
||||
type="text" th:value="${company.shortNameCode}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="taxpayerSn">税务登记号</label>
|
||||
<input class="text" id="taxpayerSn" name="taxpayerSn"
|
||||
type="text" th:value="${company.taxpayerSn}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" id="address" name="address" type="text" th:value="${company.address}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="lat">纬度</label>
|
||||
<input class="text" type="text" id="lat" name="lat" autocomplete="off" readonly
|
||||
th:value="${company.lat}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="lng">经度</label>
|
||||
<input class="text" type="text" id="lng" name="lng" autocomplete="off" readonly
|
||||
th:value="${company.lng}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="scope">签到范围(km)</label>
|
||||
<input class="text" type="number" id="scope" name="scope" autocomplete="off"
|
||||
th:value="${company.scope}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="onWorkDateStr">上班时间</label>
|
||||
<input class="text" id="onWorkDateStr" name="onWorkDateStr"
|
||||
type="text" th:value="${company.onWorkDateStr}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="offWorkDateStr">下班时间</label>
|
||||
<input class="text" id="offWorkDateStr" name="offWorkDateStr"
|
||||
type="text" th:value="${company.offWorkDateStr}">
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="phone">电话</label>
|
||||
<input class="text" type="text" id="phone" name="phone" th:value="${company.phone}" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="fax">传真</label>
|
||||
<input class="text" type="text" id="fax" name="fax" th:value="${company.fax}" autocomplete="off">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('company/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
fillFirstPinyin($("#shortName"), $("#shortNameCode"));
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
address: {
|
||||
required: true
|
||||
},
|
||||
scope: {
|
||||
required: true,
|
||||
min: 0
|
||||
},
|
||||
lat: {
|
||||
required: true
|
||||
},
|
||||
lng: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: "名称不能为空"
|
||||
},
|
||||
address: {
|
||||
required: "地址不能为空"
|
||||
},
|
||||
scope: {
|
||||
required: "签到范围不能为空",
|
||||
min: "必须大于0"
|
||||
},
|
||||
lat: {
|
||||
required: "纬度不能为空"
|
||||
},
|
||||
lng: {
|
||||
required: "经度不能为空"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
commonSubmitHandler(form);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#address").on('change', function () {
|
||||
$.ajax({
|
||||
url: 'address/search.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
address: $(this).val()
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data) {
|
||||
$("#lng").val(res.data.lng.toFixed(6));
|
||||
$("#lat").val(res.data.lat.toFixed(6));
|
||||
|
||||
var point = new BMap.Point(res.data.lng, res.data.lat);
|
||||
map.clearOverlays();
|
||||
map.centerAndZoom(point, 18);
|
||||
map.addOverlay(new BMap.Marker(point));
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var map = new BMap.Map("map");
|
||||
var initPoint = new BMap.Point('[[${company.lng}]]', '[[${company.lat}]]');
|
||||
map.clearOverlays();
|
||||
map.centerAndZoom(initPoint, 18);
|
||||
map.addOverlay(new BMap.Marker(initPoint));
|
||||
|
||||
map.enableScrollWheelZoom(true);
|
||||
map.addEventListener("click", function (e) {
|
||||
map.clearOverlays();
|
||||
map.addOverlay(new BMap.Marker(e.point));
|
||||
$("#lng").val(e.point.lng);
|
||||
$("#lat").val(e.point.lat);
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
367
src/main/webapp/WEB-INF/template/company/index.html
Normal file
367
src/main/webapp/WEB-INF/template/company/index.html
Normal file
@@ -0,0 +1,367 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
html.body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.tongji{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0;
|
||||
background: #fff;
|
||||
color: #FFFFFF;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tongji a{
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
.tongji .t-o,.tongji .t-o{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tongji .content{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
}
|
||||
.tongji .content-right{
|
||||
width: 100%;
|
||||
/* width: calc(100% - 170px); */
|
||||
height: 100%;
|
||||
background-color: #0B1B2B;
|
||||
position: relative;
|
||||
}
|
||||
.tongji .main-container{
|
||||
margin: 30px 40px 30px 20px;
|
||||
}
|
||||
.tongji .main-c-name{
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.tongji .main-amount-title{
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.tongji .amount-title-title{
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #BFD5EB;
|
||||
padding-left: 4px;
|
||||
}
|
||||
.tongji .amount-title-date{
|
||||
font-size: 12px;
|
||||
color: #BFD5EB;
|
||||
padding-left: 33px;
|
||||
}
|
||||
.tongji .main-amount-number{
|
||||
display: flex;
|
||||
margin-top: 11px;
|
||||
}
|
||||
.tongji .number-item{
|
||||
width: 30px;
|
||||
height: 43px;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
background-image: url(img/amount_bg.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
text-align: center;
|
||||
line-height: 43px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.tongji .number-comma{
|
||||
height: 43px;
|
||||
width: 22px;
|
||||
line-height: 43px;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.tongji .box-title{
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.tongji .main-provider{
|
||||
width: 316px;
|
||||
height: 260px;
|
||||
background-image: url(img/bg-1.png);
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
left: 30px;
|
||||
}
|
||||
.tongji .provider-info{
|
||||
max-height: 190px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tongji .provider-info-item{
|
||||
margin: 7px 0;
|
||||
display: flex;
|
||||
padding-left: 60px;
|
||||
position: relative;
|
||||
}
|
||||
.tongji .provider-info-item:before{
|
||||
content: "";
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: #00CFFF;
|
||||
border-radius: 8px;
|
||||
position: absolute;
|
||||
top: calc(50% - 4px);
|
||||
left: 29px;
|
||||
}
|
||||
.tongji .provider-info-content{
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #7B96D7;
|
||||
}
|
||||
.tongji .provider-info-title{
|
||||
display: flex;
|
||||
padding: 15px 0;
|
||||
padding-left: 60px;
|
||||
}
|
||||
.tongji .provider-info-title-title{
|
||||
width: 120px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.tongji .main-client-top{
|
||||
width: 316px;
|
||||
height: 208px;
|
||||
background-image: url(img/bg-2.png);
|
||||
background-position: center;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
top: 30px;
|
||||
z-index: 10;
|
||||
}
|
||||
.tongji .client-top-item-container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.tongji .client-top-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 6px 0;
|
||||
}
|
||||
.tongji .client-top-item-left{
|
||||
width: 67px;
|
||||
}
|
||||
.tongji .client-top-item-right,.tongji .client-top-item-left{
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #B1E7FF;
|
||||
}
|
||||
.tongji .client-top-item-middle{
|
||||
width: 171px;
|
||||
height: 6px;
|
||||
border-radius: 3px;
|
||||
background-color: #0C1D4A;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tongji .client-top-item-middle>.progress{
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg,rgba(43,90,255,1),rgba(25,170,255,1));
|
||||
border-radius: 3px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.tongji .progress.progress-50{
|
||||
width: 40%;
|
||||
}
|
||||
.tongji .client-top-item-right{
|
||||
width: 51px;
|
||||
}
|
||||
.tongji .main-client-bottom{
|
||||
width: 316px;
|
||||
height: 360px;
|
||||
background-image: url(img/bg-3.png);
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
bottom: 30px;
|
||||
z-index: 10;
|
||||
}
|
||||
.tongji .main-homeland{
|
||||
width: 565px;
|
||||
heibght:467px;
|
||||
position: absolute;
|
||||
left: 380px;
|
||||
top: 171px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="tongji">
|
||||
<div class="content">
|
||||
<div class="content-right">
|
||||
<div class="main-container">
|
||||
<div class="main-left">
|
||||
<p class="main-c-name">浙江亿润能源有限公司</p>
|
||||
</div>
|
||||
<div class="main-amount-container">
|
||||
<div class="main-amount-title">
|
||||
<p class="amount-title-title">累计销售额 (¥)</p>
|
||||
<p class="amount-title-date">2020-10-20 10:34:23</p>
|
||||
</div>
|
||||
<div class="main-amount-number">
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-comma">,</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-comma">,</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-amount-container">
|
||||
<div class="main-amount-title">
|
||||
<p class="amount-title-title">预计利润额 (¥)</p>
|
||||
<p class="amount-title-date">2020-10-20 10:34:23</p>
|
||||
</div>
|
||||
<div class="main-amount-number">
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-comma">,</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-comma">,</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
<div class="number-item">2</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 供应商 -->
|
||||
<div class="main-provider">
|
||||
<div class="box-title">合作供应商</div>
|
||||
<div class="provider-info-title">
|
||||
<div class="provider-info-title-title">公司</div>
|
||||
<div class="provider-info-title-title">公司交易额 (¥)</div>
|
||||
</div>
|
||||
<div class="provider-info">
|
||||
<div class="provider-info-item">
|
||||
<div class="provider-info-content">天御天御有限公司</div>
|
||||
<div class="provider-info-content">55.99</div>
|
||||
</div>
|
||||
<div class="provider-info-item">
|
||||
<div class="provider-info-content">天御天御有限公司</div>
|
||||
<div class="provider-info-content">55.99</div>
|
||||
</div>
|
||||
<div class="provider-info-item">
|
||||
<div class="provider-info-content">天御天御有限公司</div>
|
||||
<div class="provider-info-content">55.99</div>
|
||||
</div>
|
||||
<div class="provider-info-item">
|
||||
<div class="provider-info-content">天御天御有限公司</div>
|
||||
<div class="provider-info-content">55.99</div>
|
||||
</div>
|
||||
<div class="provider-info-item">
|
||||
<div class="provider-info-content">天御天御有限公司</div>
|
||||
<div class="provider-info-content">55.99</div>
|
||||
</div>
|
||||
<div class="provider-info-item">
|
||||
<div class="provider-info-content">天御天御有限公司</div>
|
||||
<div class="provider-info-content">55.99</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 合作客户上 -->
|
||||
<div class="main-client-top">
|
||||
<div class="box-title">合作客户</div>
|
||||
<div class="client-top-item-container">
|
||||
<div class="client-top-item">
|
||||
<div class="client-top-item-left">1 鄞州</div>
|
||||
<div class="client-top-item-middle">
|
||||
<div class="progress progress-50"></div>
|
||||
</div>
|
||||
<div class="client-top-item-right">155</div>
|
||||
</div>
|
||||
<div class="client-top-item">
|
||||
<div class="client-top-item-left">1 鄞州</div>
|
||||
<div class="client-top-item-middle">
|
||||
<div class="progress progress-50"></div>
|
||||
</div>
|
||||
<div class="client-top-item-right">155</div>
|
||||
</div>
|
||||
<div class="client-top-item">
|
||||
<div class="client-top-item-left">1 鄞州</div>
|
||||
<div class="client-top-item-middle">
|
||||
<div class="progress progress-50"></div>
|
||||
</div>
|
||||
<div class="client-top-item-right">155</div>
|
||||
</div>
|
||||
<div class="client-top-item">
|
||||
<div class="client-top-item-left">1 鄞州</div>
|
||||
<div class="client-top-item-middle">
|
||||
<div class="progress progress-50"></div>
|
||||
</div>
|
||||
<div class="client-top-item-right">155</div>
|
||||
</div>
|
||||
<div class="client-top-item">
|
||||
<div class="client-top-item-left">1 鄞州</div>
|
||||
<div class="client-top-item-middle">
|
||||
<div class="progress progress-50"></div>
|
||||
</div>
|
||||
<div class="client-top-item-right">155</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 合作客户下 -->
|
||||
<div class="main-client-bottom">
|
||||
<div class="box-title">合作客户</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 中国地图 -->
|
||||
<img src="img/bg.png" class="main-homeland"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
77
src/main/webapp/WEB-INF/template/company/list.html
Normal file
77
src/main/webapp/WEB-INF/template/company/list.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="company" moduleName="公司"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">公司列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|#{page.sum1}${page.total}#{page.sum2}|"></h1>
|
||||
<form id="listForm" action="company/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="company:add">
|
||||
<a data-permission="company:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('company/add.html')">添加公司
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="company-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="name">名称</th>
|
||||
<th class="sort-bar" data-column="shortName">简称</th>
|
||||
<th class="sort-bar" data-column="shortNameCode">简称编码</th>
|
||||
<th class="sort-bar" data-column="address">地址</th>
|
||||
<th class="sort-bar" data-column="phone">电话</th>
|
||||
<th class="sort-bar" data-column="fax">传真</th>
|
||||
<th class="sort-bar" data-column="scope">签到范围</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="company : ${page.content}" th:id="${company.id}" url="company/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${company.id}">
|
||||
</td>
|
||||
<td th:text="${company.name}"></td>
|
||||
<td th:text="${company.shortName}"></td>
|
||||
<td th:text="${company.shortNameCode}"></td>
|
||||
<td th:text="${company.address}"></td>
|
||||
<td th:text="${company.phone}"></td>
|
||||
<td th:text="${company.fax}"></td>
|
||||
<td th:text="${company.scope}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="company:edit">
|
||||
<a data-permission="company:edit"
|
||||
th:href="|javascript:Nav.go('company/edit.html?id=${company.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="company:remove">
|
||||
<a data-permission="company:remove"
|
||||
th:href="|javascript:deleteConfirm('${company.id}','/admin/company/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter();
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
176
src/main/webapp/WEB-INF/template/department/dialog/add.html
Normal file
176
src/main/webapp/WEB-INF/template/department/dialog/add.html
Normal file
@@ -0,0 +1,176 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog" data-height="600">
|
||||
<div class="title">
|
||||
<span th:text="|添加${level}级类别|"></span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input type="hidden" name="level" th:value="${level}">
|
||||
<input type="hidden" name="parentId" th:value="${parentId}">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper required">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" type="text" id="name" name="name" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="directorEntity">主管</label>
|
||||
<select id="directorEntity" class="filter-input" type="text" name="directorEntity.id">
|
||||
<option th:each="item : ${adminList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="companyFlag">是否为公司</label>
|
||||
<div id="companyFlag" class="common-single-checkbox" data-name="companyFlag"></div>
|
||||
</div>
|
||||
<div class="input-wrapper" style="display: none">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" type="text" id="address" name="address" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-wrapper" style="display: none">
|
||||
<label for="lat">纬度</label>
|
||||
<input class="text" type="text" id="lat" name="lat" autocomplete="off" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper" style="display: none">
|
||||
<label for="lng">经度</label>
|
||||
<input class="text" type="text" id="lng" name="lng" autocomplete="off" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper" style="display: none">
|
||||
<label for="scope">签到范围(km)</label>
|
||||
<input class="text" type="number" id="scope" name="scope" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="map" style="height: 280px; display: none;"></div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$dialog.find("form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
// 提交表单
|
||||
$dialog.find("form").validate({
|
||||
ignore: ':hidden',
|
||||
errorPlacement: function (error, element) {
|
||||
if (element.is("select")) {
|
||||
$(element).parent().after(error);
|
||||
} else {
|
||||
error.insertAfter(element)
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
address: {
|
||||
required: true
|
||||
},
|
||||
scope: {
|
||||
required: true,
|
||||
min: 0
|
||||
},
|
||||
lat: {
|
||||
required: true
|
||||
},
|
||||
lng: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: "名称不能为空"
|
||||
},
|
||||
address: {
|
||||
required: "地址不能为空"
|
||||
},
|
||||
scope: {
|
||||
required: "签到范围不能为空",
|
||||
min: "必须大于0"
|
||||
},
|
||||
lat: {
|
||||
required: "纬度不能为空"
|
||||
},
|
||||
lng: {
|
||||
required: "经度不能为空"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
url: "department/save.html",
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.exeClose($dialog, undefined, true);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(resp.data);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#companyFlag").on('clickCheckbox', function () {
|
||||
var flag = $(this).attr('data-flag');
|
||||
if (flag === 'true') {
|
||||
$("#address").parent().show()
|
||||
$("#scope").parent().show()
|
||||
$("#lat").parent().show()
|
||||
$("#lng").parent().show()
|
||||
$("#map").show()
|
||||
} else {
|
||||
$("#address").parent().hide()
|
||||
$("#scope").parent().hide()
|
||||
$("#lat").parent().hide()
|
||||
$("#lng").parent().hide()
|
||||
$("#map").hide()
|
||||
}
|
||||
})
|
||||
|
||||
$("#address").on('change', function () {
|
||||
$.ajax({
|
||||
url: 'address/search.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
address: $(this).val()
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data) {
|
||||
$("#lng").val(res.data.lng.toFixed(6));
|
||||
$("#lat").val(res.data.lat.toFixed(6));
|
||||
|
||||
var point = new BMap.Point(res.data.lng, res.data.lat);
|
||||
map.clearOverlays();
|
||||
map.centerAndZoom(point, 18);
|
||||
map.addOverlay(new BMap.Marker(point));
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var map = new BMap.Map("map");
|
||||
map.enableScrollWheelZoom(true);
|
||||
map.addEventListener("click", function (e) {
|
||||
map.clearOverlays();
|
||||
map.addOverlay(new BMap.Marker(e.point));
|
||||
$("#lng").val(e.point.lng);
|
||||
$("#lat").val(e.point.lat);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
194
src/main/webapp/WEB-INF/template/department/dialog/edit.html
Normal file
194
src/main/webapp/WEB-INF/template/department/dialog/edit.html
Normal file
@@ -0,0 +1,194 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<div class="dialog functionDialog" data-height="600">
|
||||
<style>
|
||||
#map {
|
||||
height: 280px;
|
||||
}
|
||||
</style>
|
||||
<div class="title">
|
||||
<span>编辑菜单</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input type="hidden" name="id" th:value="${department.id}">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper required">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" type="text" id="name" name="name" autocomplete="off"
|
||||
th:value="${department.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="directorEntity">主管</label>
|
||||
<select id="directorEntity" class="filter-input" type="text" name="directorEntity.id"
|
||||
th:data-init="${department.directorEntity != null ? department.directorEntity.id : '-1'}">
|
||||
<option th:each="item : ${adminList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="companyFlag">是否为公司</label>
|
||||
<div id="companyFlag" class="common-single-checkbox" data-name="companyFlag"
|
||||
th:data-init="${department.companyFlag}"></div>
|
||||
</div>
|
||||
<div class="input-wrapper" th:style="${!department.companyFlag ? 'display: none' : ''}">
|
||||
<label for="address">地址</label>
|
||||
<input class="text" type="text" id="address" name="address" autocomplete="off"
|
||||
th:value="${department.address}">
|
||||
</div>
|
||||
<div class="input-wrapper" th:style="${!department.companyFlag ? 'display: none' : ''}">
|
||||
<label for="lat">纬度</label>
|
||||
<input class="text" type="text" id="lat" name="lat" autocomplete="off"
|
||||
th:value="${department.lat}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper" th:style="${!department.companyFlag ? 'display: none' : ''}">
|
||||
<label for="lng">经度</label>
|
||||
<input class="text" type="text" id="lng" name="lng" autocomplete="off"
|
||||
th:value="${department.lng}" readonly>
|
||||
</div>
|
||||
<div class="input-wrapper" th:style="${!department.companyFlag ? 'display: none' : ''}">
|
||||
<label for="scope">签到范围(km)</label>
|
||||
<input class="text" type="number" id="scope" name="scope" autocomplete="off"
|
||||
th:value="${department.scope}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="map" th:style="${!department.companyFlag ? 'display: none' : ''}"></div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$dialog.find("form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
// 提交表单
|
||||
$dialog.find("form").validate({
|
||||
ignore: ':hidden',
|
||||
errorPlacement: function (error, element) {
|
||||
if (element.is("select")) {
|
||||
$(element).parent().after(error);
|
||||
} else {
|
||||
error.insertAfter(element)
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
address: {
|
||||
required: true
|
||||
},
|
||||
scope: {
|
||||
required: true,
|
||||
min: 0
|
||||
},
|
||||
lat: {
|
||||
required: true
|
||||
},
|
||||
lng: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: "名称不能为空"
|
||||
},
|
||||
address: {
|
||||
required: "地址不能为空"
|
||||
},
|
||||
scope: {
|
||||
required: "签到范围不能为空",
|
||||
min: "必须大于0"
|
||||
},
|
||||
lat: {
|
||||
required: "纬度不能为空"
|
||||
},
|
||||
lng: {
|
||||
required: "经度不能为空"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
url: "department/update.html",
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.exeClose($dialog, undefined, true);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(resp.data);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#companyFlag").on('clickCheckbox', function () {
|
||||
var flag = $(this).attr('data-flag');
|
||||
if (flag === 'true') {
|
||||
$("#address").parent().show()
|
||||
$("#scope").parent().show()
|
||||
$("#lat").parent().show()
|
||||
$("#lng").parent().show()
|
||||
$("#map").show()
|
||||
} else {
|
||||
$("#address").parent().hide()
|
||||
$("#scope").parent().hide()
|
||||
$("#lat").parent().hide()
|
||||
$("#lng").parent().hide()
|
||||
$("#map").hide()
|
||||
}
|
||||
})
|
||||
|
||||
$("#address").on('change', function () {
|
||||
$.ajax({
|
||||
url: 'address/search.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
address: $(this).val()
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data) {
|
||||
$("#lng").val(res.data.lng.toFixed(6));
|
||||
$("#lat").val(res.data.lat.toFixed(6));
|
||||
|
||||
var point = new BMap.Point(res.data.lng, res.data.lat);
|
||||
map.clearOverlays();
|
||||
map.centerAndZoom(point, 18);
|
||||
map.addOverlay(new BMap.Marker(point));
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var map = new BMap.Map("map");
|
||||
var initPoint = new BMap.Point('[[${department.lng}]]', '[[${department.lat}]]');
|
||||
map.clearOverlays();
|
||||
map.centerAndZoom(initPoint, 18);
|
||||
map.addOverlay(new BMap.Marker(initPoint));
|
||||
|
||||
map.enableScrollWheelZoom(true);
|
||||
map.addEventListener("click", function (e) {
|
||||
map.clearOverlays();
|
||||
map.addOverlay(new BMap.Marker(e.point));
|
||||
$("#lng").val(e.point.lng);
|
||||
$("#lat").val(e.point.lat);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
12
src/main/webapp/WEB-INF/template/department/list.html
Normal file
12
src/main/webapp/WEB-INF/template/department/list.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="appPage">
|
||||
<div class="common-tree-wrapper">
|
||||
<ul id="departmentTree" class="ztree"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/resources/js/z-tree/department.js"></script>
|
||||
<script>
|
||||
listAllType()
|
||||
</script>
|
||||
</html>
|
||||
154
src/main/webapp/WEB-INF/template/department/structure.html
Normal file
154
src/main/webapp/WEB-INF/template/department/structure.html
Normal file
@@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
.chart-wrapper {
|
||||
padding: 0 10px 10px 10px;
|
||||
}
|
||||
|
||||
#chartContainer {
|
||||
height: 300px;
|
||||
border: 2px dashed #aaa;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#chartContainer .orgchart {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#chartContainer .orgchart > table {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#chartContainer .edge {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="appPage listPage ">
|
||||
<h1 class="page-title">组织架构</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
|
||||
<div class="chart-wrapper">
|
||||
<div id="chartContainer"></div>
|
||||
</div>
|
||||
|
||||
<form id="listForm" action="department/structure.html" method="post">
|
||||
<input type="hidden" id="treeId" name="treeId" th:value="${treeId}">
|
||||
<input type="hidden" id="departmentChain" name="departmentChain" th:value="${departmentChain}">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="admin:add">
|
||||
<a data-permission="admin:add" class="btn activeBtn "
|
||||
href="javascript:Nav.go('admin/add.html')">添加员工
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<a class="btn" href="/admin/admin/export.html">导出</a>
|
||||
<a class="btn" href="javascript:Dialog.functionDialog(null, null, 'admin/import.html');">导入</a>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="username">工号</th>
|
||||
<th class="sort-bar" data-column="name">姓名</th>
|
||||
<th class="sort-bar" data-column="phone">手机号</th>
|
||||
<th class="sort-bar" data-column="role">角色</th>
|
||||
<th class="sort-bar" data-column="isEnabled">状态</th>
|
||||
<th class="sort-bar" data-column="department">部门</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="admin : ${page.content}" th:id="${admin.id}" url="admin/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${admin.id}">
|
||||
</td>
|
||||
<td th:text="${admin.username}"></td>
|
||||
<td th:text="${admin.name}"></td>
|
||||
<td th:text="${admin.phone}"></td>
|
||||
<td><span th:each="role : ${admin.roles}" th:text="${role.chineseName}"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="status-dot" th:classappend="${!admin.isEnabled?'red':''}"></span>
|
||||
[[${admin.isEnabled?'启用':'禁用'}]]
|
||||
</td>
|
||||
<td th:text="${admin.department?.name}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="admin:reset">
|
||||
<a data-permission="admin:reset#重置密码"
|
||||
th:href="|javascript:resetConfirm('${admin.id}','/admin/admin/reset.html')|">重置密码</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="admin:edit">
|
||||
<a data-permission="admin:edit"
|
||||
th:href="|javascript:Nav.go('admin/edit.html?id=${admin.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="admin:remove">
|
||||
<a data-permission="admin:remove"
|
||||
th:href="|javascript:deleteConfirm('${admin.id}','/admin/admin/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('[[${page.orderProperty}]]', '[[${page.orderDirection}]]');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
|
||||
$.ajax({
|
||||
url: 'department/departmentTree.html',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
var list = res.data.list
|
||||
var data = {
|
||||
name: '全部部门'
|
||||
};
|
||||
data.children = list;
|
||||
createChart(data)
|
||||
}
|
||||
});
|
||||
|
||||
function createChart(data) {
|
||||
var oc = $('#chartContainer').orgchart({
|
||||
data: data,
|
||||
nodeContent: 'director',
|
||||
pan: true,
|
||||
verticalLevel: 3,
|
||||
createNode: function($node, data) {
|
||||
$node.attr('data-chain', data.chain)
|
||||
$node.attr('id', 'tree#' + data.id)
|
||||
}
|
||||
});
|
||||
oc.$chart.find('.node').on('click', function () {
|
||||
var id = $(this).attr('id').split('#')[1];
|
||||
if (!isNaN(id)) {
|
||||
var chain = $(this).attr('data-chain');
|
||||
$("#departmentChain").val(chain);
|
||||
$("#treeId").val(id);
|
||||
} else {
|
||||
$("#departmentChain").val('');
|
||||
$("#treeId").val('');
|
||||
}
|
||||
$("#listForm").submit();
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
52
src/main/webapp/WEB-INF/template/diameter/add.html
Normal file
52
src/main/webapp/WEB-INF/template/diameter/add.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="diameter" moduleName="设备"-->
|
||||
<form id="addForm" action="diameter/save.html" returnUrl="diameter/list.html" method="post">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加公称直径</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('diameter/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=diameter');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="diameter">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="value">值</label>
|
||||
<input class="text" id="value" name="value" value="" placeholder=""
|
||||
type="number">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('diameter/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: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
51
src/main/webapp/WEB-INF/template/diameter/edit.html
Normal file
51
src/main/webapp/WEB-INF/template/diameter/edit.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="diameter" moduleName="设备"-->
|
||||
<form id="addForm" action="diameter/update.html" method="post" returnUrl="diameter/list.html">
|
||||
<input type="hidden" name="id" th:value="${diameter.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">编辑公称直径</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('diameter/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=diameter');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="diameter">
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" placeholder=""
|
||||
type="text" th:value="${diameter.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="value">值</label>
|
||||
<input class="text" id="value" name="value" placeholder=""
|
||||
type="number" th:value="${diameter.value}">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('diameter/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
81
src/main/webapp/WEB-INF/template/diameter/list.html
Normal file
81
src/main/webapp/WEB-INF/template/diameter/list.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="diameter" moduleName="设备"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">公称直径列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="diameter/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="diameter:add">
|
||||
<a data-permission="diameter:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('diameter/add.html')">添加公称直径
|
||||
</a>
|
||||
<a class="btn"
|
||||
href="javascript:Dialog.functionDialog(null, null, 'excel/dialog/defaultImport.html?id=diameter&name=公称直径');">导入</a>
|
||||
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<div class="filter-wrapper" data-columns="diameter-table">
|
||||
<div class="filter-item" data-column="searchValue">
|
||||
<label>名称</label>
|
||||
<input class="filter-input" type="text" name="searchValue" th:value="${page.searchValue}">
|
||||
<input class="filter-input" type="text" name="searchProperty" hidden th:value="name">
|
||||
</div>
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="diameter-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="name">名称</th>
|
||||
<th class="sort-bar" data-column="value">值</th>
|
||||
<th class="sort-bar" data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="diameter : ${page.content}" th:id="${diameter.id}" url="diameter/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${diameter.id}">
|
||||
</td>
|
||||
<td th:text="${diameter.name}"></td>
|
||||
<td th:text="${diameter.value}"></td>
|
||||
<td th:text="${#dates.format(diameter.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="diameter:edit">
|
||||
<a data-permission="diameter:edit"
|
||||
th:href="|javascript:Nav.go('diameter/edit.html?id=${diameter.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="diameter:remove">
|
||||
<a data-permission="diameter:remove"
|
||||
th:href="|javascript:deleteConfirm('${diameter.id}','/admin/diameter/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
53
src/main/webapp/WEB-INF/template/endFace/add.html
Normal file
53
src/main/webapp/WEB-INF/template/endFace/add.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="endFace" moduleName="设备"-->
|
||||
<form id="addForm" action="endFace/save.html" returnUrl="endFace/list.html" method="post">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加端面</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('endFace/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=endFace');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="endFace">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="code">代号</label>
|
||||
<input class="text" id="code" name="code" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('endFace/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: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
51
src/main/webapp/WEB-INF/template/endFace/edit.html
Normal file
51
src/main/webapp/WEB-INF/template/endFace/edit.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="endFace" moduleName="设备"-->
|
||||
<form id="addForm" action="endFace/update.html" method="post" returnUrl="endFace/list.html">
|
||||
<input type="hidden" name="id" th:value="${endFace.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">编辑端面</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('endFace/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=endFace');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="endFace">
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" placeholder=""
|
||||
type="text" th:value="${endFace.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="code">代号</label>
|
||||
<input class="text" id="code" th:value="${endFace.code}" name="code" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('endFace/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
91
src/main/webapp/WEB-INF/template/endFace/list.html
Normal file
91
src/main/webapp/WEB-INF/template/endFace/list.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="endFace" moduleName="设备"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">端面列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="endFace/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="endFace:add">
|
||||
<a data-permission="endFace:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('endFace/add.html')">添加端面
|
||||
</a>
|
||||
<a class="btn"
|
||||
href="javascript:Dialog.functionDialog(null, null, 'excel/dialog/defaultImport.html?id=endFace&name=端面');">导入</a>
|
||||
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<!-- <div class="filter-wrapper" data-columns="endFace-table">-->
|
||||
<!-- <div class="filter-item" data-column="code">-->
|
||||
<!-- <label>编号</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="code" th:value="${code}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="filter-item" data-column="name">-->
|
||||
<!-- <label>名称</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="name" th:value="${name}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="filter-item" data-column="createDate">-->
|
||||
<!-- <label>创建日期:</label>-->
|
||||
<!-- <input class="filter-date" type="text" name="createDateStart"-->
|
||||
<!-- th:value="${#dates.format(createDateStart, 'yyyy-MM-dd')}" readonly> - -->
|
||||
<!-- <input class="filter-date" type="text" name="createDateEnd"-->
|
||||
<!-- th:value="${#dates.format(createDateEnd, 'yyyy-MM-dd')}" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a class="confirm-button">搜索</a>-->
|
||||
<!-- <a class="clear-filter">清除搜索</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="endFace-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="name">名称</th>
|
||||
<th class="sort-bar" data-column="code">代号</th>
|
||||
<th class="sort-bar" data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="endFace : ${page.content}" th:id="${endFace.id}" url="endFace/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${endFace.id}">
|
||||
</td>
|
||||
<td th:text="${endFace.name}"></td>
|
||||
<td th:text="${endFace.code}"></td>
|
||||
<td th:text="${#dates.format(endFace.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="endFace:edit">
|
||||
<a data-permission="endFace:edit"
|
||||
th:href="|javascript:Nav.go('endFace/edit.html?id=${endFace.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="endFace:remove">
|
||||
<a data-permission="endFace:remove"
|
||||
th:href="|javascript:deleteConfirm('${endFace.id}','/admin/endFace/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
69
src/main/webapp/WEB-INF/template/extraField/dialog/edit.html
Normal file
69
src/main/webapp/WEB-INF/template/extraField/dialog/edit.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="dialog functionDialog common_dialog_functionDialog" th:data-width="800" th:data-height="600">
|
||||
<div class="title">
|
||||
<span th:text="${title}"></span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<form>
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div th:each="item : ${list}" class="input-wrapper">
|
||||
<label>显示:</label>
|
||||
<div class="common-single-checkbox" th:data-init="${item.available}"></div>
|
||||
<input class="text data-input" type="text" th:name="${item.fieldName}" th:value="${item.name}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$dialog = $(".common_dialog_functionDialog");
|
||||
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function (close) {
|
||||
submit();
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
function submit() {
|
||||
var extraFields = [];
|
||||
$dialog.find('.input-wrapper').each(function () {
|
||||
extraFields.push({
|
||||
fieldName: $(this).find('.data-input').attr('name'),
|
||||
name: $(this).find('.data-input').val(),
|
||||
available: $(this).find('.common-single-checkbox').attr('data-flag')
|
||||
})
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '/admin/extraField/extend.html',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
space: '[[${space}]]',
|
||||
extraFields: JSON.stringify(extraFields)
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode !== '0') {
|
||||
Dialog.error(res.errorInfo);
|
||||
} else {
|
||||
Dialog.success("保存成功");
|
||||
Dialog.close($dialog);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
27
src/main/webapp/WEB-INF/template/extraField/list.html
Normal file
27
src/main/webapp/WEB-INF/template/extraField/list.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<div class="appPage listPage">
|
||||
<form id="listForm">
|
||||
<div class="tableWrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort-bar">名称</th>
|
||||
<th class="options">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${list}">
|
||||
<td th:text="${item.name}"></td>
|
||||
<td>
|
||||
<shiro:hasPermission name="extraField:edit">
|
||||
<a data-permission="extraField:edit" th:href="|javascript:Dialog.functionDialog(null, null, 'extraField/dialog/edit.html?space=${item.key}&title=${item.name}')|"> 设置</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<div class="dialog functionDialog" data-width="500" data-height="370">
|
||||
<div class="title">
|
||||
<span>添加代码生成规则</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label>主包</label>
|
||||
<input class="text" type="text" name="basePackage">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>作者</label>
|
||||
<input class="text" type="text" name="author">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>实体类类名</label>
|
||||
<input class="text" type="text" name="entity">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>中文名</label>
|
||||
<input class="text" type="text" name="name">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>是否创建dao</label>
|
||||
<div class="common-single-checkbox" data-name="dao"
|
||||
></div>
|
||||
<input class="text" type="text" name="dao">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$dialog.find("form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
// 提交表单
|
||||
$dialog.find("form").validate({
|
||||
ignore: ':hidden',
|
||||
errorPlacement: function (error, element) {
|
||||
if (element.is("select")) {
|
||||
$(element).parent().after(error);
|
||||
} else {
|
||||
error.insertAfter(element)
|
||||
}
|
||||
},
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
url: "generateSetting/save.html",
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.close($dialog);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(resp.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<div class="dialog functionDialog" data-width="500" data-height="370">
|
||||
<div class="title">
|
||||
<span>编辑代码生成规则</span>
|
||||
<div class="dialogClose">╳</div>
|
||||
</div>
|
||||
<div class="dialogBody addPage">
|
||||
<div class="dialogContent">
|
||||
<form>
|
||||
<input type="hidden" name="id" th:value="${generateSetting.id}">
|
||||
<div class="simpleAddBody submitBody">
|
||||
<div class="input-wrapper">
|
||||
<label></label>
|
||||
<input class="text" type="text" name="" value="">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<a class="cancel">取消</a>
|
||||
<a class="confirm">确认</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var $dialog = $(".functionDialog");
|
||||
Dialog.start({
|
||||
dialog: $dialog,
|
||||
confirm: function () {
|
||||
$dialog.find("form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
// 提交表单
|
||||
$dialog.find("form").validate({
|
||||
ignore: ':hidden',
|
||||
errorPlacement: function (error, element) {
|
||||
if (element.is("select")) {
|
||||
$(element).parent().after(error);
|
||||
} else {
|
||||
error.insertAfter(element)
|
||||
}
|
||||
},
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
url: "generateSetting/update.html",
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.errorCode === "0") {
|
||||
Dialog.success();
|
||||
Dialog.close($dialog);
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(resp.errorInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
64
src/main/webapp/WEB-INF/template/generateSetting/list.html
Normal file
64
src/main/webapp/WEB-INF/template/generateSetting/list.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">代码生成规则列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="generateSetting/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<a class="btn activeBtn"
|
||||
href="javascript:quickDialog('generateSetting/dialog/add.html')">添加代码生成规则
|
||||
</a>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<div class="filter-wrapper" data-columns="generateSetting-table">
|
||||
<div class="filter-item" data-column="">
|
||||
<label></label>
|
||||
<input class="filter-input" type="text" name="">
|
||||
</div>
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="generateSetting-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th data-column=""></th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${page.content}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${item.id}">
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="fixed">
|
||||
<a th:href="|javascript:quickDailog('generateSetting/dialog/edit.html?id=${item.id}');|"> 编辑</a>
|
||||
<a th:href="|javascript:deleteConfirm('${item.id}','/admin/generateSetting/delete.html')|"> 删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter();
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
64
src/main/webapp/WEB-INF/template/helpInformation/add.html
Normal file
64
src/main/webapp/WEB-INF/template/helpInformation/add.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="helpInformation" moduleName="通知"-->
|
||||
<form id="addForm" action="helpInformation/save.html" method="post" returnUrl="helpInformation/list.html">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加帮助</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('helpInformation/list.html')">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody" data-id="helpInformation">
|
||||
<div class="input-wrapper">
|
||||
<label for="title">标题</label>
|
||||
<input class="text" id="title" name="title" type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label style="vertical-align: top;">内容</label>
|
||||
<div th:id="'editor' + ${time}" name="content" style="width:660px !important;height: 300px;"></div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('helpInformation/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
var editorId = 'editor[[${time}]]';
|
||||
var ue = UM.getEditor(editorId);
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {
|
||||
title: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
title: {
|
||||
required: "标题不能为空"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.type === "success") {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
} else {
|
||||
Dialog.error(resp.content);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
65
src/main/webapp/WEB-INF/template/helpInformation/edit.html
Normal file
65
src/main/webapp/WEB-INF/template/helpInformation/edit.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="helpInformation" moduleName="通知"-->
|
||||
<form id="addForm" action="helpInformation/update.html" method="post" returnUrl="helpInformation/list.html">
|
||||
<input type="hidden" name="id" th:value="${helpInformation.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加帮助</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('helpInformation/list.html')">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody" data-id="helpInformation">
|
||||
<div class="input-wrapper">
|
||||
<label for="title">标题</label>
|
||||
<input class="text" id="title" name="title" type="text" th:value="${helpInformation.title}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label style="vertical-align: top;">内容</label>
|
||||
<div th:id="'editor' + ${time}" name="content" th:utext="${helpInformation.content}" style="width:660px !important;height: 300px;"></div>
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('helpInformation/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
var editorId = 'editor[[${time}]]';
|
||||
var ue = UM.getEditor(editorId);
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {
|
||||
title: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
title: {
|
||||
required: "标题不能为空"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit({
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.type === "success") {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
} else {
|
||||
Dialog.error(resp.content);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
64
src/main/webapp/WEB-INF/template/helpInformation/list.html
Normal file
64
src/main/webapp/WEB-INF/template/helpInformation/list.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="helpInformation" moduleName="通知"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">帮助列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="helpInformation/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<!-- <shiro:hasPermission name="helpInformation:add">-->
|
||||
<a data-permission="helpInformation:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('helpInformation/add.html')">添加帮助
|
||||
</a>
|
||||
<!-- </shiro:hasPermission>-->
|
||||
<a class="btn refresh">刷新</a>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="helpInformation-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox"></th>
|
||||
<th data-column="title">标题</th>
|
||||
<th data-column="createDate">日期</th>
|
||||
<th data-column="##" class="options">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="helpInformation : ${page.content}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${helpInformation.id}">
|
||||
</td>
|
||||
<td th:text="${helpInformation.title}"></td>
|
||||
<td th:text="${#dates.format(helpInformation.createDate, 'yyyy-MM-dd HH:mm:ss')}"></td>
|
||||
<td>
|
||||
<!-- <shiro:hasPermission name="helpInformation:edit">-->
|
||||
<a data-permission="helpInformation:edit" th:href="|javascript:Nav.go('helpInformation/edit.html?id=${helpInformation.id}');|"> 编辑</a>
|
||||
<!-- </shiro:hasPermission>-->
|
||||
<!-- <shiro:hasPermission name="helpInformation:remove">-->
|
||||
<a data-permission="helpInformation:remove" th:href="|javascript:deleteConfirm('${helpInformation.id}','/admin/helpInformation/delete.html')|"> 删除</a>
|
||||
<!-- </shiro:hasPermission>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('[[${page.orderProperty}]]', '[[${page.orderDirection}]]');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="helpInformation" moduleName="通知"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">帮助列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="helpInformation/listForView.html" method="post">
|
||||
<div class="toolBar">
|
||||
<a class="btn refresh">刷新</a>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="helpInformation-forView-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox"></th>
|
||||
<th data-column="title">标题</th>
|
||||
<th data-column="createDate">日期</th>
|
||||
<th data-column="##" class="options">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="helpInformation : ${page.content}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${helpInformation.id}">
|
||||
</td>
|
||||
<td th:text="${helpInformation.title}"></td>
|
||||
<td th:text="${#dates.format(helpInformation.createDate, 'yyyy-MM-dd HH:mm:ss')}"></td>
|
||||
<td>
|
||||
<a th:href="|javascript:viewNotice('${helpInformation.id}')|"> 内容</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('[[${page.orderProperty}]]', '[[${page.orderDirection}]]');
|
||||
}
|
||||
});
|
||||
|
||||
function viewNotice(id) {
|
||||
$.ajax({
|
||||
url: 'helpInformation/getData.html',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success: function (res) {
|
||||
layui.use('layer', function () {
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '公告通知',
|
||||
area: ['1067px', '600px'],
|
||||
// content: SHIYOU_DOMAIN + '/wx/viewNotice.html?id=' + id
|
||||
content: ""+res.data
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// function viewNotice(id) {
|
||||
// console.log(id)
|
||||
// layui.use('layer', function () {
|
||||
// var layer = layui.layer;
|
||||
// layer.open({
|
||||
// type: 1,
|
||||
// title: '公告通知',
|
||||
// area: ['1067px', '600px'],
|
||||
// // content: SHIYOU_DOMAIN + '/wx/viewNotice.html?id=' + id
|
||||
// content: id
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
210
src/main/webapp/WEB-INF/template/home/allList.html
Normal file
210
src/main/webapp/WEB-INF/template/home/allList.html
Normal file
@@ -0,0 +1,210 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="material" moduleName="设备"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">全局搜索</h1>
|
||||
<!-- <h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>-->
|
||||
<form id="listForm" action="home/allList.html" method="post">
|
||||
<div class="toolBar">
|
||||
<a class="btn refresh">刷新</a>
|
||||
<!-- <div class="filter-wrapper" data-columns="item-table">-->
|
||||
<!-- <div class="filter-item" data-column="code">-->
|
||||
<!-- <label>料号</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="code" th:value="${code}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– <div class="filter-item" data-column="name">–>-->
|
||||
<!-- <!– <label>名称</label>–>-->
|
||||
<!-- <!– <input class="filter-input" type="text" name="name" th:value="${name}">–>-->
|
||||
<!-- <!– </div>–>-->
|
||||
<!-- <!– <div class="filter-item" data-column="createDate">–>-->
|
||||
<!-- <!– <label>创建日期:</label>–>-->
|
||||
<!-- <!– <input class="filter-date" type="text" name="createDateStart"–>-->
|
||||
<!-- <!– th:value="${#dates.format(createDateStart, 'yyyy-MM-dd')}" readonly> - –>-->
|
||||
<!-- <!– <input class="filter-date" type="text" name="createDateEnd"–>-->
|
||||
<!-- <!– th:value="${#dates.format(createDateEnd, 'yyyy-MM-dd')}" readonly>–>-->
|
||||
<!-- <!– </div>–>-->
|
||||
<!-- <a class="confirm-button">搜索</a>-->
|
||||
<!-- <a class="clear-filter">清除搜索</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="tabBody">
|
||||
<ul class="tagSwitch">
|
||||
<li class="tag active" tagindex="1">综合材料明细表</li>
|
||||
<li class="tag" tagindex="2">请购单</li>
|
||||
<li class="tag" tagindex="3">发货记录</li>
|
||||
<li class="tag" tagindex="4">采购合同</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div class="tagContent submitBody active" data-id="salesMode" tagindex="1">
|
||||
<div class="tableWrap">
|
||||
<table id="material" data-columns="item-material-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th data-column="name">编号</th>
|
||||
<th data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${page1.content}" th:id="${item.id}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox"
|
||||
th:data-id="${item.id}">
|
||||
</td>
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<a th:href="|javascript:Nav.go('materialOrder/view.html?id=${item.id}&key=${key}&value=${value}');|"> 查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tagContent submitBody" data-id="salesMode" tagindex="2">
|
||||
<div id="apply" class="tableWrap">
|
||||
<table data-columns="item-apply-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th data-column="name">编号</th>
|
||||
<th data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${page2.content}" th:id="${item.id}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox"
|
||||
th:data-id="${item.id}">
|
||||
</td>
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<a th:href="|javascript:Nav.go('purchaseApplyOrder/view.html?id=${item.id}&key=${key}&value=${value}');|"> 查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tagContent submitBody" data-id="salesMode" tagindex="3">
|
||||
<div id="stock" class="tableWrap">
|
||||
<table data-columns="item-stock-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th data-column="name">编号</th>
|
||||
<th data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${page3.content}" th:id="${item.id}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox"
|
||||
th:data-id="${item.id}">
|
||||
</td>
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<a th:href="|javascript:Nav.go('purchaseStock/view.html?id=${item.id}');|"> 查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tagContent submitBody" data-id="salesMode" tagindex="4">
|
||||
<div id="order" class="tableWrap">
|
||||
<table data-columns="item-order-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th data-column="name">编号</th>
|
||||
<th data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item : ${page4.content}" th:id="${item.id}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox"
|
||||
th:data-id="${item.id}">
|
||||
</td>
|
||||
<td th:text="${item.sn}"></td>
|
||||
<td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<a th:href="|javascript:Nav.go('purchaseOrder/view.html?id=${item.id}');|"> 查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
initTagSwitch();
|
||||
|
||||
// var $table = $(".tableWrap table");
|
||||
// $table.selectField({
|
||||
// multiSelect: true,
|
||||
// resizable: true,
|
||||
// resizeMode: 'overflow',
|
||||
// success: function () {
|
||||
// initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
// }
|
||||
// });
|
||||
|
||||
var $table = $(".tableWrap #material");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $table2 = $(".tableWrap #apply");
|
||||
$table2.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $table3 = $(".tableWrap #stock");
|
||||
$table3.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $table4 = $(".tableWrap #order");
|
||||
$table3.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
10
src/main/webapp/WEB-INF/template/home/dataBoard.html
Normal file
10
src/main/webapp/WEB-INF/template/home/dataBoard.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>数据看板</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="../../resources/images/home/showDataBoard.jpg" />
|
||||
</body>
|
||||
</html>
|
||||
475
src/main/webapp/WEB-INF/template/home/department/business.html
Normal file
475
src/main/webapp/WEB-INF/template/home/department/business.html
Normal file
@@ -0,0 +1,475 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<style>
|
||||
.table-wrapper {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.table-wrapper .center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bottom-wrapper {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-wrapper .table-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.table-wrapper td input {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.filter-wrapper {
|
||||
padding: 0 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.filter-wrapper .filter-item {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.filter-wrapper .filter-item select {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.layui-table, .layui-table-view {
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
|
||||
.layui-table td > input:focus {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.daily-record td > input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="appPage listPage">
|
||||
<div th:replace="common/departmentHomeSwitch"></div>
|
||||
|
||||
<div class="filter-wrapper">
|
||||
<div class="filter-item">
|
||||
<label>合同类型:</label>
|
||||
<select class="filter-select" id="source">
|
||||
<option value="salesOrder">销售合同</option>
|
||||
<option value="purchaseOrder">采购合同</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="table1"></table>
|
||||
</div>
|
||||
|
||||
<div class="filter-wrapper">
|
||||
<div class="filter-item">
|
||||
<label>公司:</label>
|
||||
<select class="filter-select" id="company">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>产品:</label>
|
||||
<select class="filter-select" id="product">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${productList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="invoiceInventoryTable"></table>
|
||||
</div>
|
||||
|
||||
<div class="filter-wrapper">
|
||||
<div class="filter-item">
|
||||
<label>公司:</label>
|
||||
<select class="filter-select" id="company2">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="beInputInvoiceTable"></table>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table daily-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11">每日接收发票列表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>接收日期</th>
|
||||
<th>客户公司</th>
|
||||
<th>所属公司</th>
|
||||
<th>品名</th>
|
||||
<th>吨数</th>
|
||||
<th>份数</th>
|
||||
<th>单价</th>
|
||||
<th>金额总计</th>
|
||||
<th>开票时间</th>
|
||||
<th>票号</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="text" id="riDate" th:value="${dailyRecord?.riDate}"></td>
|
||||
<td><input type="text" id="riOwnerName" th:value="${dailyRecord?.riOwnerName}"></td>
|
||||
<td><input type="text" id="riCompanyName" th:value="${dailyRecord?.riCompanyName}"></td>
|
||||
<td><input type="text" id="riProductName" th:value="${dailyRecord?.riProductName}"></td>
|
||||
<td><input type="number" id="riDun" th:value="${dailyRecord?.riDun}"></td>
|
||||
<td><input type="number" id="riFen" th:value="${dailyRecord?.riFen}"></td>
|
||||
<td><input type="number" id="riPrice" th:value="${dailyRecord?.riPrice}"></td>
|
||||
<td><input type="number" id="riAmount" th:value="${dailyRecord?.riAmount}"></td>
|
||||
<td><input type="text" id="riInvoiceDate" th:value="${dailyRecord?.riInvoiceDate}"></td>
|
||||
<td><input type="text" id="riInvoiceNo" th:value="${dailyRecord?.riInvoiceNo}"></td>
|
||||
<td><input type="text" id="riRemark" th:value="${dailyRecord?.riRemark}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="filter-wrapper">
|
||||
<div class="filter-item">
|
||||
<label>公司:</label>
|
||||
<select class="filter-select" id="company3">
|
||||
<option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table id="makeInvoiceTable" class="layui-table daily-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6">每日开出发票列表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>客户公司</th>
|
||||
<th>品名</th>
|
||||
<th>开出数量(吨)</th>
|
||||
<th>含税单价(元/吨)</th>
|
||||
<th>含税总金额(元)</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="text" id="miOwnerName"></td>
|
||||
<td><input type="text" id="miProductName"></td>
|
||||
<td><input type="text" id="miCount"></td>
|
||||
<td><input type="text" id="miPrice"></td>
|
||||
<td><input type="text" id="miAmount"></td>
|
||||
<td><input type="text" id="miRemark"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table daily-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="8">每日收付款列表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>收付款单位</th>
|
||||
<th>付款金额</th>
|
||||
<th>收款金额</th>
|
||||
<th>付款单位</th>
|
||||
<th>收款单位</th>
|
||||
<th>备注</th>
|
||||
<th>合同号</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="text" id="prDate" th:value="${dailyRecord?.prDate}"></td>
|
||||
<td><input type="text" id="prUnitName" th:value="${dailyRecord?.prUnitName}"></td>
|
||||
<td><input type="number" id="prPayAmount" th:value="${dailyRecord?.prPayAmount}"></td>
|
||||
<td><input type="number" id="prGetAmount" th:value="${dailyRecord?.prGetAmount}"></td>
|
||||
<td><input type="text" id="prPayName" th:value="${dailyRecord?.prPayName}"></td>
|
||||
<td><input type="text" id="prGetName" th:value="${dailyRecord?.prGetName}"></td>
|
||||
<td><input type="text" id="prRemark" th:value="${dailyRecord?.prRemark}"></td>
|
||||
<td><input type="text" id="prContractSn" th:value="${dailyRecord?.prContractSn}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bottom-wrapper">
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">个人计划</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="3">本周计划</td>
|
||||
<td>预开票</td>
|
||||
<td><input type="text" id="thisWeekPreInvoice" th:value="${workPlan?.thisWeekPreInvoice}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预付款</td>
|
||||
<td><input type="text" id="thisWeekPrePayment" th:value="${workPlan?.thisWeekPrePayment}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合同跟踪情况</td>
|
||||
<td><input type="text" id="thisWeekContractTracking"
|
||||
th:value="${workPlan?.thisWeekContractTracking}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">下周计划</td>
|
||||
<td>预开票</td>
|
||||
<td><input type="text" id="nextWeekPreInvoice" th:value="${workPlan?.nextWeekPreInvoice}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预付款</td>
|
||||
<td><input type="text" id="nextWeekPrePayment" th:value="${workPlan?.nextWeekPrePayment}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合同跟踪情况</td>
|
||||
<td><input type="text" id="nextWeekContractTracking"
|
||||
th:value="${workPlan?.nextWeekContractTracking}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">日志</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>本周工作心得</td>
|
||||
<td><input type="text" id="thisWeekWorkExperience" th:value="${workPlan?.thisWeekWorkExperience}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>工作所见见闻</td>
|
||||
<td><input type="text" id="thisWeekWatch" th:value="${workPlan?.thisWeekWatch}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
initTable1();
|
||||
initInvoiceInventory();
|
||||
initBeInputInvoice();
|
||||
|
||||
$("#source").on('change', function () {
|
||||
initTable1();
|
||||
});
|
||||
|
||||
$("#product, #company").on('change', function () {
|
||||
initInvoiceInventory();
|
||||
});
|
||||
|
||||
$("#company2").on('change', function () {
|
||||
initBeInputInvoice();
|
||||
});
|
||||
|
||||
function initTable1() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = 320;
|
||||
table.render({
|
||||
elem: '#table1',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'salesOrder/business.html',
|
||||
where: {
|
||||
source: $("#source").val()
|
||||
},
|
||||
page: true,
|
||||
cols: [[{title: '合同执行情况', colspan: 9, align: 'center'}],
|
||||
[
|
||||
{field: 'sn', title: '合同编号'},
|
||||
{field: 'companyName', title: '所属公司'},
|
||||
{field: 'ownerName', title: '客户公司'},
|
||||
{field: 'productInfo', title: '合同品名'},
|
||||
{field: 'paymentAmount', title: '已付款'},
|
||||
{field: 'amountPayable', title: '未付款'},
|
||||
{field: 'invoiceAmount', title: '已开票'},
|
||||
{field: 'invoicePayable', title: '未开票'},
|
||||
{field: 'remark', title: '备注'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function initInvoiceInventory() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $(window).height() - 350 - 120 - 70;
|
||||
|
||||
table.render({
|
||||
elem: '#invoiceInventoryTable',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
where: {
|
||||
companyId: $("#company").val(),
|
||||
productId: $("#product").val()
|
||||
},
|
||||
url: 'invoiceInventory/listAll.html',
|
||||
page: true,
|
||||
cols: [[{title: '发票现有库存', colspan: 5, align: 'center'}],
|
||||
[
|
||||
{field: 'company', title: '公司'},
|
||||
{field: 'product', title: '品名'},
|
||||
{field: 'count', title: '现有库存数量(吨)'},
|
||||
{field: 'movingAverageUnitPrice', title: '平均单价(元/吨)'},
|
||||
{field: 'costBalanceWithTax', title: '含税总金额(元)'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function initBeInputInvoice() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $(window).height() - 350 - 120 - 70;
|
||||
|
||||
table.render({
|
||||
elem: '#beInputInvoiceTable',
|
||||
totalRow: true,
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.page.total,
|
||||
"data": res.data.page.content,
|
||||
"totalRow": {
|
||||
beInputCount: res.data.beInputCountSum
|
||||
}
|
||||
};
|
||||
},
|
||||
where: {
|
||||
companyId: $("#company2").val(),
|
||||
},
|
||||
url: 'purchaseOrder/beInputInvoice.html',
|
||||
page: true,
|
||||
cols: [[{title: '待进项发票', colspan: 7, align: 'center'}],
|
||||
[
|
||||
{field: 'companyName', title: '所属公司', totalRowText: '合计'},
|
||||
{field: 'ownerName', title: '客户公司'},
|
||||
{field: 'productName', title: '品名'},
|
||||
{field: 'beInputCount', title: '待进项数量(吨)', totalRow: true},
|
||||
{field: 'taxPrice', title: '含税单价(元/吨)'},
|
||||
{field: 'subtotal', title: '含税总金额(元)'},
|
||||
{field: 'remark', title: '备注'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(".bottom-wrapper .table-wrapper td input").on('input', function () {
|
||||
var field = $(this).attr('id');
|
||||
var value = $(this).val();
|
||||
$.ajax({
|
||||
url: 'workPlan/updateByField.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
field: field,
|
||||
value: value
|
||||
},
|
||||
success: function (res) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$("table.daily-record td input").on('input', function () {
|
||||
var companyId = $(this).parents('table').attr('data-company');
|
||||
var field = $(this).attr('id');
|
||||
var value = $(this).val();
|
||||
$.ajax({
|
||||
url: 'dailyRecord/updateByField.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
companyId: companyId,
|
||||
field: field,
|
||||
value: value
|
||||
},
|
||||
success: function (res) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$("#company3").on('change', function () {
|
||||
$('#makeInvoiceTable td > input').val('');
|
||||
initMakeInvoiceTable();
|
||||
});
|
||||
|
||||
initMakeInvoiceTable();
|
||||
|
||||
function initMakeInvoiceTable() {
|
||||
var $table = $("#makeInvoiceTable");
|
||||
var companyId = $("#company3").val();
|
||||
$table.attr('data-company', companyId);
|
||||
$.ajax({
|
||||
url: 'dailyRecord/makeInvoiceList.html',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
companyId: companyId
|
||||
},
|
||||
success: function (res) {
|
||||
for (var k in res.data) {
|
||||
$table.find("#" + k).val(res.data[k]);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
441
src/main/webapp/WEB-INF/template/home/department/financial.html
Normal file
441
src/main/webapp/WEB-INF/template/home/department/financial.html
Normal file
@@ -0,0 +1,441 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_234130_nem7eskcrkpdgqfr.css">
|
||||
<link rel="stylesheet" href="/resources/css/date-schedule.css">
|
||||
<style>
|
||||
.main-body {
|
||||
background: #f3f3f3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.center-box-wrapper {
|
||||
height: 52%;
|
||||
margin-bottom: 24px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper {
|
||||
height: calc(48% - 24px);
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.center-box-wrapper .left-wrapper {
|
||||
width: 60%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .right-wrapper {
|
||||
width: calc(40% - 20px);
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .left-wrapper {
|
||||
width: 60%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .right-wrapper {
|
||||
width: calc(40% - 20px);
|
||||
}
|
||||
|
||||
.common-box-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.common-box-wrapper.table-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .more-button {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
color: #4687e6;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-input,
|
||||
.common-box-wrapper .search-select {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select {
|
||||
top: 2px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select select {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content {
|
||||
height: calc(100% - 61px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content.adapt {
|
||||
height: calc(100% - 41px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-body">
|
||||
<div th:replace="common/departmentHomeSwitch"></div>
|
||||
|
||||
<script type="text/html" id="todoWrapperOption">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
|
||||
</script>
|
||||
|
||||
<div class="center-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper">
|
||||
<div class="search-select" style="right: 200px;">
|
||||
<select id="guaZhangCompanySelect">
|
||||
<option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="search-select" style="right: 90px;">
|
||||
<select id="guaZhangOwnerSelect">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${ownerList}" th:value="${item.name}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<a class="more-button" href="javascript:Nav.go('guaZhang/list.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">挂账统计</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="guaZhangTable" lay-filter="guaZhangTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('fundBalance/list.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">资金余额</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="fundBalanceTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('invoiceInventory/list2.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">发票库存</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="invoiceInventoryTable" lay-filter="invoiceInventoryTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('taxEntity/list.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">税费统计</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="taxStatisticsTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper table-wrapper">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">当日发票</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="todayInvoiceTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">当日收/付款</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="todayPaymentTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
initSelectAction($(".search-select select"));
|
||||
|
||||
// 进行中合同
|
||||
initGuaZhangTable();
|
||||
// 发票库存
|
||||
initInvoiceInventoryTable();
|
||||
// 资金余额
|
||||
initFundBalanceTable();
|
||||
// 罐体库存
|
||||
initTaxStatisticsTable();
|
||||
// 当日发票
|
||||
initTodayInvoiceTable();
|
||||
// 当日收/付款
|
||||
initTodayPaymentTable();
|
||||
|
||||
$("#guaZhangCompanySelect, #guaZhangOwnerSelect").on('change', function () {
|
||||
initGuaZhangTable();
|
||||
});
|
||||
|
||||
function initGuaZhangTable() {
|
||||
var companyId = $("#guaZhangCompanySelect").val();
|
||||
var ownerName = $("#guaZhangOwnerSelect").val();
|
||||
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'guaZhangTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
where: {
|
||||
companyId: companyId,
|
||||
ownerName: ownerName
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
page: true,
|
||||
url: 'guaZhang/detail.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'companyName', title: '公司'},
|
||||
{field: 'ownerName', title: '客户'},
|
||||
{field: 'balance', title: '结余'}
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initInvoiceInventoryTable() {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'invoiceInventoryTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'invoiceInventory/listAll.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'company', title: '公司'},
|
||||
{field: 'product', title: '品名'},
|
||||
{field: 'count', title: '现有库存数量(吨)'},
|
||||
{field: 'movingAverageUnitPrice', title: '平均单价(元/吨)'},
|
||||
{field: 'costBalanceWithTax', title: '含税总金额(元)'}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
table.on('row(' + key + ')', function (obj) {
|
||||
var url = '';
|
||||
var item = obj.data;
|
||||
if (item.name === '销售合同') {
|
||||
url = 'salesOrder/view.html?id=' + item.id
|
||||
} else if (item.name === '采购合同') {
|
||||
url = 'purchaseOrder/view.html?id=' + item.id
|
||||
}
|
||||
if (url) {
|
||||
Nav.go(url)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initFundBalanceTable() {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'fundBalanceTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'fundBalance/data.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'account', title: '账户'},
|
||||
{field: 'bankAccount', title: '银行账号'},
|
||||
{field: 'todayIncome', title: '当日收入'},
|
||||
{field: 'todayExpend', title: '当日支出'},
|
||||
{field: 'balance', title: '账户余额'}
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initTaxStatisticsTable() {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'taxStatisticsTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'taxEntity/data.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'companyName', title: '公司名'},
|
||||
{field: 'categoryName', title: '类别'},
|
||||
{field: 'dateStr', title: '日期'},
|
||||
{field: 'amount', title: '金额'}
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initTodayInvoiceTable() {
|
||||
layui.use(['table'], function () {
|
||||
var key = 'todayInvoiceTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'finance/todayInvoice.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'seller', title: '销售方'},
|
||||
{field: 'buyer', title: '购买方'},
|
||||
{field: 'product', title: '详情'},
|
||||
{field: 'status', title: '状态'}
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initTodayPaymentTable() {
|
||||
layui.use(['table'], function () {
|
||||
var key = 'todayPaymentTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'finance/todayPayment.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'companyName', title: '公司名'},
|
||||
{field: 'ownerName', title: '客户'},
|
||||
{field: 'receivePayment', title: '类别'},
|
||||
{field: 'amount', title: '金额'}
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<style>
|
||||
.table-wrapper {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.table-wrapper .center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bottom-wrapper {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-wrapper .table-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.table-wrapper td input {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.filter-wrapper {
|
||||
padding: 0 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.filter-wrapper .filter-item {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.filter-wrapper .filter-item select {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.layui-table, .layui-table-view {
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
|
||||
.layui-table td > input:focus {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.daily-record td > input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dollar {
|
||||
margin: 15px 0;
|
||||
padding: 0 18px;
|
||||
}
|
||||
|
||||
.dollar > span {
|
||||
display: inline-block;
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.dollar .label {
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.dollar .value {
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="appPage listPage">
|
||||
<div th:replace="common/departmentHomeSwitch"></div>
|
||||
|
||||
<div class="dollar">
|
||||
<span>
|
||||
<span class="label">美元汇率: </span>
|
||||
<span class="value">[[${session.systemSetting.usdToCnyExchange}]]</span>
|
||||
</span>
|
||||
<span>
|
||||
<span class="label">布伦特原油价: </span>
|
||||
<span class="value">[[${session.systemSetting.brentOilPrice}]]</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="table1"></table>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7" style="text-align: center;">未完成合同点价情况</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>合同编号</th>
|
||||
<th>所属公司</th>
|
||||
<th>客户公司</th>
|
||||
<th>桶数</th>
|
||||
<th>成交价</th>
|
||||
<th>时间</th>
|
||||
<th>指令要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:each="pricing : ${pricingList}">
|
||||
<tr th:each="item, stat : ${pricing.list}">
|
||||
<th:block th:if="${stat.index == 0}">
|
||||
<td th:rowspan="${pricing.list.size() + 1}" th:text="${pricing.sn}"></td>
|
||||
<td th:rowspan="${pricing.list.size() + 1}" th:text="${pricing.companyName}"></td>
|
||||
<td th:rowspan="${pricing.list.size() + 1}" th:text="${pricing.ownerName}"></td>
|
||||
</th:block>
|
||||
<td th:text="${item.barrelCount}"></td>
|
||||
<td th:text="${item.valence}"></td>
|
||||
<td th:text="${item.date}"></td>
|
||||
<td th:text="${item.directive}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background: #F56C6C; color: #ffffff;" th:text="${pricing.needBarrelCount}"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
initTable1();
|
||||
|
||||
// initTable2();
|
||||
|
||||
function initTable1() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = 320;
|
||||
table.render({
|
||||
elem: '#table1',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'internationalTrade/orderList.html',
|
||||
where: {},
|
||||
page: true,
|
||||
cols: [[{title: '合同执行情况', colspan: 9, align: 'center'}],
|
||||
[
|
||||
{field: 'sn', title: '合同编号'},
|
||||
{field: 'companyName', title: '所属公司'},
|
||||
{field: 'ownerName', title: '客户公司'},
|
||||
{field: 'productInfo', title: '合同品名'},
|
||||
{field: 'paymentAmount', title: '已付款'},
|
||||
{field: 'amountPayable', title: '未付款'},
|
||||
{field: 'invoiceAmount', title: '已开票'},
|
||||
{field: 'invoicePayable', title: '未开票'},
|
||||
{field: 'remark', title: '备注'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function initTable2() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var tableMerge = layui.tableMerge;
|
||||
var height = 640;
|
||||
table.render({
|
||||
elem: '#table2',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'internationalTrade/pricingList.html',
|
||||
where: {},
|
||||
page: true,
|
||||
cols: [[{title: '未完成合同点价情况', colspan: 7, align: 'center'}],
|
||||
[
|
||||
{field: 'sn', title: '合同编号', merge: true},
|
||||
{field: 'companyName', title: '所属公司', merge: ['sn']},
|
||||
{field: 'ownerName', title: '客户公司', merge: ['sn']},
|
||||
{field: 'barrelCount', title: '桶数'},
|
||||
{field: 'valence', title: '成交价'},
|
||||
{field: 'date', title: '时间'},
|
||||
{field: 'directive', title: '指令要求'}
|
||||
]
|
||||
],
|
||||
done: function () {
|
||||
tableMerge.render(this)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
386
src/main/webapp/WEB-INF/template/home/department/market.html
Normal file
386
src/main/webapp/WEB-INF/template/home/department/market.html
Normal file
@@ -0,0 +1,386 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_234130_nem7eskcrkpdgqfr.css">
|
||||
<link rel="stylesheet" href="/resources/css/date-schedule.css">
|
||||
<style>
|
||||
.main-body {
|
||||
background: #f3f3f3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.center-box-wrapper {
|
||||
height: 52%;
|
||||
margin-bottom: 24px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper {
|
||||
height: calc(48% - 24px);
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.center-box-wrapper .left-wrapper {
|
||||
width: 60%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .right-wrapper {
|
||||
width: calc(40% - 20px);
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .left-wrapper {
|
||||
width: 60%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .right-wrapper {
|
||||
width: calc(40% - 20px);
|
||||
}
|
||||
|
||||
.common-box-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.common-box-wrapper.table-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .more-button {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
color: #4687e6;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-input,
|
||||
.common-box-wrapper .search-select {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select {
|
||||
top: 2px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select select {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content {
|
||||
height: calc(100% - 61px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content.adapt {
|
||||
height: calc(100% - 41px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-body">
|
||||
<div th:replace="common/departmentHomeSwitch"></div>
|
||||
|
||||
<script type="text/html" id="todoWrapperOption">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
|
||||
</script>
|
||||
|
||||
<div class="center-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper">
|
||||
<input type="text" class="search-input" id="ongoingContractTableSearch" placeholder="输入公司名搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">进行中合同</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="ongoingContractTable" lay-filter="ongoingContractTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<!-- <a class="more-button" href="javascript:Nav.go('fundBalance/list.html')">查看更多 ></a>-->
|
||||
<input type="text" class="search-input" id="amountNotClearTableSearch" placeholder="输入公司名搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">货款未清合同</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="amountNotClearTable" lay-filter="amountNotClearTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper table-wrapper">
|
||||
<input type="text" class="search-input" id="amountClearNotInvoiceTableSearch" placeholder="输入公司名搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">已结算未开票合同</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="amountClearNotInvoiceTable" lay-filter="amountClearNotInvoiceTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<div class="search-select" style="right: 10px;">
|
||||
<select id="productSelect">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${productList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">产品价格</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="productPriceTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
initSelectAction($(".search-select select"));
|
||||
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
});
|
||||
|
||||
// 进行中合同
|
||||
initOngoingContractTable();
|
||||
// 审批中合同
|
||||
initAmountClearNotInvoiceTable();
|
||||
// 货款未清合同
|
||||
initAmountNotClearTable();
|
||||
// 产品价格
|
||||
initProductPriceTable();
|
||||
|
||||
$("#ongoingContractTableSearch").on('input', function () {
|
||||
initOngoingContractTable($(this).val());
|
||||
});
|
||||
|
||||
$("#amountNotClearTableSearch").on('input', function () {
|
||||
initAmountNotClearTable($(this).val());
|
||||
});
|
||||
|
||||
$("#amountClearNotInvoiceTableSearch").on('input', function () {
|
||||
initAmountClearNotInvoiceTable($(this).val());
|
||||
});
|
||||
|
||||
$("#productSelect").on('change', function () {
|
||||
initProductPriceTable($(this).val());
|
||||
})
|
||||
|
||||
function initOngoingContractTable(companyOwner) {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'ongoingContractTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
where: {
|
||||
companyOwner: companyOwner,
|
||||
departmentName: '市场营销部'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'salesOrder/ongoingContract.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'name', title: '名称'},
|
||||
{
|
||||
title: '公司',
|
||||
templet: '<div>{{ d.seller + "-" + d.buyer }}</div>'
|
||||
},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
table.on('row(' + key + ')', function (obj) {
|
||||
navToContract(obj);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initAmountClearNotInvoiceTable(companyOwner) {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'amountClearNotInvoiceTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
where: {
|
||||
companyOwner: companyOwner,
|
||||
departmentName: '市场营销部'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'salesOrder/amountClearNotInvoiceTable.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'name', title: '名称'},
|
||||
{
|
||||
title: '公司',
|
||||
templet: '<div>{{ d.seller + "-" + d.buyer }}</div>'
|
||||
},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
table.on('row(' + key + ')', function (obj) {
|
||||
navToContract(obj);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initAmountNotClearTable(companyOwner) {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'amountNotClearTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
where: {
|
||||
companyOwner: companyOwner,
|
||||
departmentName: '市场营销部'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'salesOrder/amountNotClearTable.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'name', title: '名称'},
|
||||
{
|
||||
title: '公司',
|
||||
templet: '<div>{{ d.seller + "-" + d.buyer }}</div>'
|
||||
},
|
||||
{field: 'amountPayable', title: '待收/付款金额'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
table.on('row(' + key + ')', function (obj) {
|
||||
navToContract(obj);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function initProductPriceTable(productId) {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var key = 'productPriceTable';
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
where: {
|
||||
productId: productId
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'productDayPrice/data.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'productName', title: '产品名称'},
|
||||
{field: 'price', title: '价格'},
|
||||
{field: 'remark', title: '备注'},
|
||||
{field: 'date', title: '日期'},
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function navToContract(obj) {
|
||||
var url = '';
|
||||
var item = obj.data;
|
||||
if (item.name === '销售合同') {
|
||||
url = 'salesOrder/view.html?id=' + item.id
|
||||
} else if (item.name === '采购合同') {
|
||||
url = 'purchaseOrder/view.html?id=' + item.id
|
||||
}
|
||||
if (url) {
|
||||
Nav.go(url)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
208
src/main/webapp/WEB-INF/template/home/department/production.html
Normal file
208
src/main/webapp/WEB-INF/template/home/department/production.html
Normal file
@@ -0,0 +1,208 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_234130_nem7eskcrkpdgqfr.css">
|
||||
<link rel="stylesheet" href="/resources/css/date-schedule.css">
|
||||
<style>
|
||||
.main-body {
|
||||
background: #f3f3f3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.center-box-wrapper {
|
||||
height: 52%;
|
||||
margin-bottom: 24px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper {
|
||||
height: calc(48% - 24px);
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.center-box-wrapper .left-wrapper {
|
||||
width: 100%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
|
||||
.bottom-box-wrapper .left-wrapper {
|
||||
width: 100%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.common-box-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.common-box-wrapper.table-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .more-button {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
color: #4687e6;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-input {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content {
|
||||
height: calc(100% - 61px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content.adapt {
|
||||
height: calc(100% - 41px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-body">
|
||||
<div th:replace="common/departmentHomeSwitch"></div>
|
||||
|
||||
<script type="text/html" id="todoWrapperOption">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
|
||||
</script>
|
||||
|
||||
<div class="center-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper">
|
||||
<input type="text" class="search-input" id="dischargingPlanTableSearch" placeholder="输入船编号搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">待执行卸船计划</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="dischargingPlanTable" lay-filter="dischargingPlanTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper table-wrapper">
|
||||
<input type="text" class="search-input" id="shipmentPlanTableTableSearch" placeholder="输入船编号搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">待执行装船计划</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show order-wrapper">
|
||||
<table id="shipmentPlanTable" lay-filter="shipmentPlanTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
});
|
||||
|
||||
// 待执行卸船计划
|
||||
initPlanTable('dischargingPlanTable', 'outStock');
|
||||
// 待执行装船计划
|
||||
initPlanTable('shipmentPlanTable', 'inStock');
|
||||
|
||||
$("#dischargingPlanTableSearch").on('input', function () {
|
||||
initPlanTable('dischargingPlanTable', 'outStock', $(this).val());
|
||||
});
|
||||
|
||||
$("#shipmentPlanTableTableSearch").on('input', function () {
|
||||
initPlanTable('shipmentPlanTable', 'inStock', $(this).val());
|
||||
});
|
||||
|
||||
function initPlanTable(key, stockType, shipNumber) {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var table = layui.table;
|
||||
var height = $("#" + key).parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#' + key,
|
||||
height: height,
|
||||
where: {
|
||||
transportType: 'shipping',
|
||||
stockType: stockType,
|
||||
shipNumber: shipNumber
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'loadVehiclePlan/data.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'productInfo', title: '名称'},
|
||||
{field: 'lossType', title: '损耗类型'},
|
||||
{field: 'payMethod', title: '结算方式'},
|
||||
{field: 'waybillNumber', title: '运单号'},
|
||||
{field: 'shipNumber', title: '船编号'},
|
||||
{field: 'status', title: '装卸状态'},
|
||||
{field: 'inspectionStatus', title: '质检状态'},
|
||||
{field: 'planCount', title: '计划数量'},
|
||||
{field: 'planDate', title: '计划日期'}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// table.on('row(' + key + ')', function (obj) {
|
||||
// var url = '';
|
||||
// var item = obj.data;
|
||||
// if (item.name === '销售合同') {
|
||||
// url = 'salesOrder/view.html?id=' + item.id
|
||||
// } else if (item.name === '采购合同') {
|
||||
// url = 'purchaseOrder/view.html?id=' + item.id
|
||||
// }
|
||||
// if (url) {
|
||||
// Nav.go(url)
|
||||
// }
|
||||
// });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
504
src/main/webapp/WEB-INF/template/home/department/transport.html
Normal file
504
src/main/webapp/WEB-INF/template/home/department/transport.html
Normal file
@@ -0,0 +1,504 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<style>
|
||||
.filter-wrapper {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.table-wrapper .center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bottom-wrapper {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-wrapper .table-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.calendar-wrapper {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.fc-title {
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="appPage listPage">
|
||||
<div th:replace="common/departmentHomeSwitch"></div>
|
||||
<div class="calendar-wrapper">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
|
||||
<form id="listForm">
|
||||
<div class="toolBar">
|
||||
<div class="filter-wrapper" style="margin-top: 10px !important;">
|
||||
<div class="filter-item">
|
||||
<label>出/入库:</label>
|
||||
<select class="filter-select" id="transportSource">
|
||||
<option value="salesOrder">销售出库</option>
|
||||
<option value="purchaseOrder">采购入库</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>外贸/内贸:</label>
|
||||
<select class="filter-select" id="inOutSelect">
|
||||
<option value="in">内贸</option>
|
||||
<option value="out">外贸</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>是否出库:</label>
|
||||
<select class="filter-select" id="outboundSelect">
|
||||
<option value="unOutbound">未出库</option>
|
||||
<option value="outbound">出库</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>库区:</label>
|
||||
<select name="reservoir" class="filter-select" id="reservoir">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${reservoirs}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <a class="confirm-button">搜索</a>-->
|
||||
<!-- <a class="clear-filter">清除搜索</a>-->
|
||||
<!-- <a class="btn" href="javascript:Nav.refresh();">刷新</a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="table1" lay-filter="table1"></table>
|
||||
</div>
|
||||
|
||||
<div class="toolBar">
|
||||
<div class="filter-wrapper" style="margin-top: 10px !important;">
|
||||
<div class="filter-item" data-column="invoiceStatus">
|
||||
<label>开票筛选:</label>
|
||||
<select class="filter-input" type="text" id="invoiceStatus">
|
||||
<option value="">全部</option>
|
||||
<option value="invoicePay">开票已付</option>
|
||||
<option value="invoiceNotPay">开票未付</option>
|
||||
<option value="notInvoice">未开票</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="feeTable" lay-filter="feeTable"></table>
|
||||
</div>
|
||||
|
||||
<div class="toolBar">
|
||||
<div class="filter-wrapper">
|
||||
<div class="filter-item">
|
||||
<label>是否开发票:</label>
|
||||
<select class="filter-select" id="invoiceFlag">
|
||||
<option value="">全部</option>
|
||||
<option value="invoicePay">开票已付</option>
|
||||
<option value="invoiceNotPay">开票未付</option>
|
||||
<option value="notInvoice">未开票</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-wrapper">
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="shippingTable"></table>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="layui-table" id="carrierTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="finish">完结</a>
|
||||
</script>
|
||||
<script type="text/html" id="table1NameTemplet">
|
||||
<a href="javascript:Nav.go('{{d.source}}/view.html?id={{d.orderId}}')" class="layui-table-link">{{ d.name }}</a>
|
||||
</script>
|
||||
<script type="text/html" id="table1DeliveryTypeTemplet">
|
||||
{{# if((d.source == 'salesOrder' && d.deliveryType == '送到') || (d.source == 'purchaseOrder' && d.deliveryType != '送到')){ }}
|
||||
<a href="javascript:quickDialog('transportAssociated/dialog/transportList.html?contentId={{d.orderId}}&source={{d.source}}')"
|
||||
class="layui-table-link">{{ d.deliveryType }}</a>
|
||||
{{# } else { }}
|
||||
<a href="javascript:quickDialog('loadVehiclePlan/dialog/listByTask.html?transportTaskId={{d.taskId}}')"
|
||||
class="layui-table-link">{{ d.deliveryType }}</a>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script>
|
||||
initTable1();
|
||||
initFeeTable();
|
||||
initTable2('shipping');
|
||||
initTable2('carrier');
|
||||
|
||||
$("#transportSource").on('change', function () {
|
||||
initTable1();
|
||||
});
|
||||
|
||||
$("#inOutSelect, #outboundSelect, #reservoir").on('change', function () {
|
||||
initTable1();
|
||||
});
|
||||
|
||||
$("#invoiceStatus").on('change', function () {
|
||||
initFeeTable();
|
||||
});
|
||||
|
||||
$("#invoiceFlag").on('change', function () {
|
||||
initTable2('shipping');
|
||||
initTable2('carrier');
|
||||
});
|
||||
|
||||
function initTable1() {
|
||||
var transportSource = $("#transportSource").val();
|
||||
var data = {
|
||||
transportSource: transportSource,
|
||||
reservoir: $("#reservoir").val()
|
||||
};
|
||||
|
||||
data.inOutType = $("#inOutSelect").val();
|
||||
data.boundType = $("#outboundSelect").val();
|
||||
|
||||
layui.use(['table', 'layer', 'soulTable'], function () {
|
||||
var table = layui.table;
|
||||
var layer = layui.layer;
|
||||
var soulTable = layui.soulTable;
|
||||
|
||||
layui.soulTable.config({
|
||||
drag: false,
|
||||
rowDrag: true
|
||||
})
|
||||
|
||||
var height = 320;
|
||||
var tableln = table.render({
|
||||
elem: '#table1',
|
||||
height: height,
|
||||
// request: {
|
||||
// pageName: 'pageNumber',
|
||||
// limitName: 'pageSize'
|
||||
// },
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'transportContract/contractData.html',
|
||||
where: data,
|
||||
// page: true,
|
||||
cols: [[{title: '台账表', colspan: 10, align: 'center'}],
|
||||
[
|
||||
{field: 'name', title: '合同品名', templet: '#table1NameTemplet'},
|
||||
{field: 'realName', title: '实际品名'},
|
||||
{field: 'companyName', title: '货主单位'},
|
||||
{field: 'taxPrice', title: '合同价格'},
|
||||
{field: 'contractDeadline', title: '合同执行期'},
|
||||
{field: 'deliveryType', title: '物流方式', templet: '#table1DeliveryTypeTemplet'},
|
||||
{field: 'boundCount', title: '执行量'},
|
||||
{field: 'unBoundCount', title: '未执行量'},
|
||||
{field: 'planCount', title: '预计计划'},
|
||||
{field: 'dynamicInfo', title: '动态信息', edit: 'text', width: 300}
|
||||
]
|
||||
],
|
||||
done: function () {
|
||||
soulTable.render(this)
|
||||
}
|
||||
});
|
||||
|
||||
table.on('edit(table1)', function (obj) {
|
||||
var data = obj.data;
|
||||
var url = data.source + '/updateDynamicInfo.html';
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: data.contentId,
|
||||
text: obj.value
|
||||
},
|
||||
success: function (res) {
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
table.on('row(table1)', function () {
|
||||
var tableData = layui.table.cache['table1']
|
||||
var arr = [];
|
||||
for (var i in tableData) {
|
||||
var item = tableData[i];
|
||||
arr.push({
|
||||
source: item.source + "Item",
|
||||
contentId: item.contentId,
|
||||
sortFactor: i
|
||||
})
|
||||
}
|
||||
$.ajax({
|
||||
url: 'transportHomeSort/syncData.html',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(arr),
|
||||
success: function (res) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
table.on('tool(table1)', function (obj) {
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
if (layEvent === 'finish') {
|
||||
layer.open({
|
||||
type: 0,
|
||||
title: '提示',
|
||||
content: '确认完结吗?',
|
||||
btn: ['确认', '取消'],
|
||||
btn1: function (index) {
|
||||
var url = data.source + '/finishWarehouseStateForItem.html';
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: data.contentId
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
layer.close(index);
|
||||
layer.msg('操作成功', {icon: 1})
|
||||
tableln.reload({where: data})
|
||||
} else {
|
||||
layer.msg(res.errorInfo, {icon: 2})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
btn2: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function initFeeTable() {
|
||||
var data = {
|
||||
invoiceStatus: $("#invoiceStatus").val()
|
||||
};
|
||||
|
||||
layui.use(['table', 'layer'], function () {
|
||||
var table = layui.table;
|
||||
var height = 320;
|
||||
table.render({
|
||||
elem: '#feeTable',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'inspectionLog/feeData.html',
|
||||
where: data,
|
||||
page: true,
|
||||
cols: [[{title: '商检', colspan: 11, align: 'center'}],
|
||||
[
|
||||
{field: 'reservoir', title: '库区'},
|
||||
{
|
||||
field: 'invoiceFlag',
|
||||
title: '是否开票',
|
||||
templet: '<div>{{ d.invoiceFlag ? "是" : "否" }}</div>'
|
||||
},
|
||||
{field: 'belongsToPhase', title: '所属期'},
|
||||
{field: 'companyName', title: '公司'},
|
||||
{field: 'ownerName', title: '商检公司'},
|
||||
{
|
||||
field: 'invoiceDate',
|
||||
title: '开票日期',
|
||||
templet: '<div>{{ layui.util.toDateString(d.invoiceDate,"yyyy-MM-dd") }}</div>'
|
||||
},
|
||||
{field: 'testFee', title: '检测费用'},
|
||||
{field: 'shipTestFee', title: '船检费用'},
|
||||
{
|
||||
field: 'paymentDate',
|
||||
title: '付款日期',
|
||||
templet: '<div>{{ layui.util.toDateString(d.paymentDate,"yyyy-MM-dd") }}</div>'
|
||||
},
|
||||
{field: 'invoiceCompanyName', title: '收票公司'},
|
||||
{field: 'remark', title: '备注'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function initTable2(transportType) {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $(window).height() - 350 - 120;
|
||||
table.render({
|
||||
elem: '#' + transportType + 'Table',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) {
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'transportContract/data.html',
|
||||
where: {
|
||||
transportType: transportType,
|
||||
invoiceStatus: $("#invoiceFlag").val()
|
||||
},
|
||||
page: true,
|
||||
cols: [[{title: transportType === 'shipping' ? '船运' : '车运', colspan: 6, align: 'center'}],
|
||||
[
|
||||
{field: 'companyName', title: '公司'},
|
||||
{field: 'ownerName', title: '承运商'},
|
||||
{field: 'sn', title: '运输合同编号'},
|
||||
{field: 'totalAmount', title: '运费'},
|
||||
{field: 'invoiceDate', title: '收票时间'},
|
||||
{field: 'remark', title: '备注'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#belongsToPhase',
|
||||
type: 'month'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var colorArr = ['#0099CC', '#99CC33', '#336699', '#999999', '#003366', '#669999', '#003399', '#993333', '#333333',
|
||||
'#333366', '#CC9933', '#336666', '#996633', '#CCCC33', '#336633', '#990033', '#FFCC99', '#333300', '#663366'];
|
||||
|
||||
var $calendar = $("#calendar");
|
||||
var height = $(window).height() - $calendar.offset().top - 15;
|
||||
|
||||
var year = '0';
|
||||
var month;
|
||||
var day;
|
||||
|
||||
function initCalendar(defaultDate) {
|
||||
var calendarEl = $calendar[0];
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
plugins: ['dayGrid'],
|
||||
locale: 'zh-cn',
|
||||
height: height,
|
||||
defaultDate: defaultDate,
|
||||
eventOrder: 'serialNumber',
|
||||
events: function (info, successCallback, failureCallback) {
|
||||
var startDate = dateFormat("YYYY-mm-dd", info.start);
|
||||
var endDate = dateFormat("YYYY-mm-dd", info.end);
|
||||
year = startDate.split("-")[0];
|
||||
month = startDate.split("-")[1];
|
||||
day = startDate.split("-")[2];
|
||||
$.ajax({
|
||||
url: 'calendar/getThisDayMemoByMonth.html',
|
||||
dataType: 'json',
|
||||
data: {"startDate": startDate, "endDate": endDate},
|
||||
success: function (data) {
|
||||
var events = [];
|
||||
var colorMap = createColorMap(data);
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var item = data[i];
|
||||
var title = item.content;
|
||||
if (title.length > 12) {
|
||||
title = title.substring(0, 12) + "..."
|
||||
}
|
||||
item.title = title
|
||||
|
||||
item.backgroundColor = colorMap[item.contentSn];
|
||||
item.borderColor = colorMap[item.contentSn];
|
||||
|
||||
events.push(item);
|
||||
}
|
||||
successCallback(events)
|
||||
}
|
||||
});
|
||||
},
|
||||
eventClick: function (info) {
|
||||
var dateStr = dateFormat("YYYY-mm-dd", info.event.start);
|
||||
Dialog.functionDialog(null, null, 'calendar/getThisDayMemoDialog.html?date=' + dateStr)
|
||||
},
|
||||
navLinks: true,
|
||||
navLinkDayClick: function (date) {//空白的日期区,单击时触发
|
||||
var dateStr = dateFormat("YYYY-mm-dd", date)
|
||||
Dialog.functionDialog(null, null, 'calendar/getThisDayMemoDialog.html?date=' + dateStr)
|
||||
}
|
||||
});
|
||||
calendar.render();
|
||||
}
|
||||
|
||||
function createColorMap(arr) {
|
||||
var map = {};
|
||||
let set = new Set();
|
||||
for (var i in arr) {
|
||||
var item = arr[i];
|
||||
set.add(item.contentSn);
|
||||
}
|
||||
|
||||
var j = 0;
|
||||
for (let item of set) {
|
||||
map[item] = colorArr[j % colorArr.length];
|
||||
j++;
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
function getDay() {
|
||||
if (year === '0') {
|
||||
var date = new Date();
|
||||
var dateStr = dateFormat("YYYY-mm-dd", date);
|
||||
var strList = dateStr.split("-");
|
||||
dateStr = strList[0] + "-" + strList[1] + "-01";
|
||||
return dateStr
|
||||
} else {
|
||||
if (parseInt(day) > 15) {
|
||||
if (parseInt(month) === 12) {
|
||||
var yearNum = parseInt(year) + 1;
|
||||
return yearNum + "-01-01";
|
||||
} else {
|
||||
var monthNum = parseInt(month) + 1
|
||||
monthNum = monthNum > 10 ? monthNum : "0" + monthNum
|
||||
return year + "-" + monthNum + "-01";
|
||||
}
|
||||
} else {
|
||||
return year + "-" + month + "-01"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
initCalendar(getDay())
|
||||
</script>
|
||||
</html>
|
||||
540
src/main/webapp/WEB-INF/template/home/index.html
Normal file
540
src/main/webapp/WEB-INF/template/home/index.html
Normal file
@@ -0,0 +1,540 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_234130_nem7eskcrkpdgqfr.css">
|
||||
<link rel="stylesheet" href="/resources/css/date-schedule.css">
|
||||
<style>
|
||||
.main-body {
|
||||
background: #f3f3f3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.top-button-wrapper {
|
||||
padding: 0 40px;
|
||||
height: 16%;
|
||||
margin-bottom: 20px;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item {
|
||||
margin: 20px 40px 0 0;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item .image {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item .text {
|
||||
font-size: 13px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.center-box-wrapper {
|
||||
width: calc(100% - 330px);
|
||||
height: 100%;
|
||||
/*margin-bottom: 24px;*/
|
||||
font-size: 0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper {
|
||||
height: calc(100% - 30px);
|
||||
width: 310px;
|
||||
font-size: 0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/*.center-box-wrapper .left-wrapper {*/
|
||||
/* width: 70%;*/
|
||||
/* margin-right: 20px;*/
|
||||
/*}*/
|
||||
|
||||
/*.center-box-wrapper .right-wrapper {*/
|
||||
/* width: calc(30% - 20px);*/
|
||||
/*}*/
|
||||
|
||||
/*.bottom-box-wrapper .left-wrapper {*/
|
||||
/* width: 35%;*/
|
||||
/* margin-right: 20px;*/
|
||||
/*}*/
|
||||
|
||||
/*.bottom-box-wrapper .center-wrapper {*/
|
||||
/* width: calc(35% - 20px);*/
|
||||
/* margin-right: 20px;*/
|
||||
/*}*/
|
||||
|
||||
/*.bottom-box-wrapper .right-wrapper {*/
|
||||
/* width: calc(30% - 20px);*/
|
||||
/*}*/
|
||||
|
||||
.bottom-box-wrapper .common-box-wrapper {
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 33%;
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .left-wrapper{
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 36%;
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .right-wrapper{
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 56%;
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper .item {
|
||||
display: inline-block;
|
||||
/*margin-top: 25px;*/
|
||||
width: 19%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*.center-box-wrapper .common-box-wrapper .item1 {*/
|
||||
/* display: inline-block;*/
|
||||
/* width: 19%;*/
|
||||
/* margin-top: 10px;*/
|
||||
/* text-align: center;*/
|
||||
/*}*/
|
||||
|
||||
.center-box-wrapper .common-box-wrapper .title{
|
||||
/*height: 30px;*/
|
||||
/*vertical-align: middle;*/
|
||||
display: flex;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
padding-top: 0.93rem;
|
||||
padding-left: 1.2rem;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper a{
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.common-box-wrapper.table-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .more-button {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
color: #4687e6;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-input {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select-wrapper {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 120px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select {
|
||||
width: 120px;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content {
|
||||
height: calc(100% - 61px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content.adapt {
|
||||
height: calc(100% - 41px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*.common-box-wrapper .layui-tab-content.adapt .layui-table, .layui-table-view {*/
|
||||
/* margin: 0;*/
|
||||
/* border: 0;*/
|
||||
/*}*/
|
||||
|
||||
.notice-wrapper .notice-item ,
|
||||
.help-wrapper .help-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.notice-wrapper .notice-item .text ,
|
||||
.help-wrapper .help-item .text {
|
||||
width: calc(100% - 76px);
|
||||
color: #262626;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.notice-wrapper .notice-item .date ,
|
||||
.help-wrapper .help-item .date {
|
||||
position: absolute;
|
||||
color: #a2a2a2;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.approval-wrapper .approval-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.order-wrapper .order-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
|
||||
.box-title-point{
|
||||
/*width: 0.2rem;*/
|
||||
width: 3px;
|
||||
height: 0.8rem;
|
||||
background-color: #3179E3;
|
||||
margin-right: 0.3rem;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
|
||||
.layui-tab-title-new{
|
||||
display: flex;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
padding-left: 1.2rem;
|
||||
position: relative;
|
||||
left: 0;
|
||||
height: 40px;
|
||||
white-space: nowrap;
|
||||
/*font-size: 0;*/
|
||||
border-bottom: 1px #e6e6e6 solid;
|
||||
transition: all .2s;
|
||||
-webkit-transition: all .2s;
|
||||
}
|
||||
.tagContents img{
|
||||
margin-left: 10%;
|
||||
width: 70% !important;
|
||||
height: 80% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-body">
|
||||
<!-- <div class="top-button-wrapper">-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('approval/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">待办审批</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('signInRecord/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">考勤</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('reimbursement/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">报销</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('vacate/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">请假</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<script type="text/html" id="todoWrapperOption">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
|
||||
</script>
|
||||
|
||||
<div class="center-box-wrapper">
|
||||
<!-- <div class="common-box-wrapper left-wrapper" style="min-height: 250px">-->
|
||||
<!-- <div class="title">-->
|
||||
<!-- <div class="box-title-point"></div>-->
|
||||
<!-- <p class="box-title">常用功能</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="height: 40%;margin-top: 20px">-->
|
||||
<!-- <div class="item" onclick="jumpUrl('admin/list.html','admin:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/admin.png" alt="">-->
|
||||
<!-- <a >人员管理</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('department/list.html','department:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/department.png" alt="">-->
|
||||
<!-- <a>部门管理</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('supplier/list.html','supplier:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/supplier.png" alt="">-->
|
||||
<!-- <a>采购商管理</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('purchaseApplyOrder/list.html?applyType=conduit','purchaseApplyOrder:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/cApply.png" alt="">-->
|
||||
<!-- <a>管道请购单</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('purchaseApplyOrder/list.html?applyType=device','purchaseApplyOrder:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/dApply.png" alt="">-->
|
||||
<!-- <a>设备请购单</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="height: 40%">-->
|
||||
<!-- <div class="item" onclick="jumpUrl('materialOrder/list.html?materialType=conduit','materialOrder:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/cMaterial.png" alt="">-->
|
||||
<!-- <a>管道综合明细表</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('materialOrder/list.html?materialType=device','materialOrder:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/dMaterial.png" alt="">-->
|
||||
<!-- <a>设备综合明细表</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('purchaseStock/list.html','purchaseStock:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/stock.png" alt="">-->
|
||||
<!-- <a>发货管理</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('paymentApply/list.html?receivePayment=payment','paymentApply:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/payment.png" alt="">-->
|
||||
<!-- <a>财务管理</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="item" onclick="jumpUrl('attachFile/list.html','attachFile:list')">-->
|
||||
<!-- <img class="icon" src="/resources/images/home/file.png" alt="">-->
|
||||
<!-- <a>附件管理</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="common-box-wrapper left-wrapper" style="height: 98%">
|
||||
<div class="tabBody" style="margin-left: 10px;height: 90%">
|
||||
<ul class="tagSwitch">
|
||||
<li class="tag active" tagindex="1">ZPEC材料管理系统业务流程及功能构架</li>
|
||||
<!-- <li class="tag" tagindex="2">设备专业流程</li>-->
|
||||
</ul>
|
||||
<div class="tagContents" style="height: 100%">
|
||||
<div class="tagContent submitBody active" style="height: 100%" data-id="salesMode" tagindex="1">
|
||||
<img src="/resources/images/home/ZPEC.png">
|
||||
</div>
|
||||
<!-- <div class="tagContent submitBody " style="height: 100%" data-id="salesMode" tagindex="2">-->
|
||||
<!-- <img style="width: 85%!important;margin-left: 5%;height: 50%!important;" src="/resources/images/home/dFlow.png">-->
|
||||
<!-- <img src="/resources/images/home/dFlow.png">-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('helpInformation/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title-new">
|
||||
<div style="display: inline-block" class="box-title-point"></div>
|
||||
<p style="display: inline-block" class="box-title">帮助中心</p>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show help-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('notice/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title-new">
|
||||
<div style="display: inline-block" class="box-title-point"></div>
|
||||
<p style="display: inline-block" class="box-title">公告通知</p>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show notice-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('notice/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title-new">
|
||||
<div style="display: inline-block" class="box-title-point"></div>
|
||||
<p style="display: inline-block" class="box-title">意见反馈</p>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show feedBack-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function jumpUrl(url,power) {
|
||||
$.ajax({
|
||||
url: 'admin/checkRole.html',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
power:power
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data) {
|
||||
Nav.go(url);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
});
|
||||
|
||||
todoList();
|
||||
|
||||
function todoList() {
|
||||
$.ajax({
|
||||
url: 'notice/dataList.html',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
res.data.content.forEach(function (item) {
|
||||
$(".notice-wrapper").append('<div class="notice-item">' +
|
||||
' <a href="javascript:viewNotice(' + item.id+')" class="text">' + item.title + '</a>' +
|
||||
' <span class="date">' + item.date + '</span>' +
|
||||
'</div>');
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
url: 'helpInformation/dataList.html',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
res.data.content.forEach(function (item) {
|
||||
$(".help-wrapper").append('<div class="help-item">' +
|
||||
' <a href="javascript:viewHelp(' + item.id+')" class="text">' + item.title + '</a>' +
|
||||
// ' <span class="date">' + item.date + '</span>' +
|
||||
'</div>');
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function viewNotice(id) {
|
||||
$.ajax({
|
||||
url: 'notice/getData.html',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success: function (res) {
|
||||
layui.use('layer', function () {
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '公告通知',
|
||||
area: ['1067px', '600px'],
|
||||
// content: SHIYOU_DOMAIN + '/wx/viewNotice.html?id=' + id
|
||||
content: ""+res.data
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function viewHelp(id) {
|
||||
$.ajax({
|
||||
url: 'helpInformation/getData.html',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success: function (res) {
|
||||
layui.use('layer', function () {
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '帮助',
|
||||
area: ['1067px', '600px'],
|
||||
// content: SHIYOU_DOMAIN + '/wx/viewNotice.html?id=' + id
|
||||
content: ""+res.data
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script src="/resources/js/date-schedule.js"></script>
|
||||
</html>
|
||||
749
src/main/webapp/WEB-INF/template/home/index2.html
Normal file
749
src/main/webapp/WEB-INF/template/home/index2.html
Normal file
@@ -0,0 +1,749 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_234130_nem7eskcrkpdgqfr.css">
|
||||
<link rel="stylesheet" href="/resources/css/date-schedule.css">
|
||||
<style>
|
||||
.main-body {
|
||||
background: #f3f3f3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.top-button-wrapper {
|
||||
padding: 0 40px;
|
||||
height: 16%;
|
||||
margin-bottom: 20px;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item {
|
||||
margin: 20px 40px 0 0;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item .image {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item .text {
|
||||
font-size: 13px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.center-box-wrapper {
|
||||
height: 52%;
|
||||
margin-bottom: 24px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper {
|
||||
height: calc(48% - 24px);
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.center-box-wrapper .left-wrapper {
|
||||
width: 70%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .right-wrapper {
|
||||
width: calc(30% - 20px);
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .left-wrapper {
|
||||
width: 35%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .center-wrapper {
|
||||
width: calc(35% - 20px);
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper .right-wrapper {
|
||||
width: calc(30% - 20px);
|
||||
}
|
||||
|
||||
.common-box-wrapper {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.common-box-wrapper.table-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .more-button {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
color: #4687e6;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-input {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select-wrapper {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 120px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select {
|
||||
width: 120px;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content {
|
||||
height: calc(100% - 61px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content.adapt {
|
||||
height: calc(100% - 41px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*.common-box-wrapper .layui-tab-content.adapt .layui-table, .layui-table-view {*/
|
||||
/* margin: 0;*/
|
||||
/* border: 0;*/
|
||||
/*}*/
|
||||
|
||||
.notice-wrapper .notice-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.notice-wrapper .notice-item .text {
|
||||
width: calc(100% - 76px);
|
||||
color: #262626;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.notice-wrapper .notice-item .date {
|
||||
position: absolute;
|
||||
color: #a2a2a2;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.approval-wrapper .approval-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.order-wrapper .order-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-body">
|
||||
<!-- <div class="top-button-wrapper">-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('approval/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">待办审批</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('signInRecord/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">考勤</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('reimbursement/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">报销</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('vacate/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">请假</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<script type="text/html" id="todoWrapperOption">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
|
||||
</script>
|
||||
|
||||
<div class="center-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper">
|
||||
<div class="search-select-wrapper">
|
||||
<label style="color: #333333">来源:</label>
|
||||
<select class="search-select" name="source">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${sources}" th:value="${item}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="search-select-wrapper" style="left: 285px;">
|
||||
<label style="color: #333333">公司:</label>
|
||||
<select class="search-select" name="contentCompanyId">
|
||||
<option value="">全部</option>
|
||||
<option th:each="item : ${companyList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<a class="more-button" href="javascript:Nav.goX('approval/todo.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">我的待办</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show todo-wrapper">
|
||||
<table id="todoTable" lay-filter="todoTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('notice/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">公告通知</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show notice-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<!-- <div class="common-box-wrapper left-wrapper">-->
|
||||
<!-- <a class="more-button" href="javascript:zoomInDate()">放大</a>-->
|
||||
<!-- <div class="layui-tab layui-tab-brief">-->
|
||||
<!-- <ul class="layui-tab-title">-->
|
||||
<!-- <li class="layui-this">我的考勤</li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- <div class="layui-tab-content">-->
|
||||
<!-- <div class="layui-tab-item layui-show date-schedule-wrapper">-->
|
||||
<!-- <div id='schedule-box' class="box-shadow">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="common-box-wrapper center-wrapper table-wrapper" style="width: 70%;">
|
||||
<input type="text" class="search-input" id="myContractSearchInput" placeholder="输入编号搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">我创建的合同</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show order-wrapper">
|
||||
<table id="myContractTable" lay-filter="myContract"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<input type="text" class="search-input" id="approvalSearchInput" placeholder="输入编号搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">我的申请</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show approval-wrapper">
|
||||
<table id="approvalTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:if="${session.curAdmin.containsRole('商务部经理')}" class="bottom-box-wrapper" style="margin-top: 24px;">
|
||||
<div class="common-box-wrapper left-wrapper table-wrapper">
|
||||
<input type="text" class="search-input" id="inApprovalContractSearchInput" placeholder="输入编号搜索">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">审批中合同</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="inApprovalContractTable" lay-filter="inApprovalContract"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper center-wrapper table-wrapper">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">资金情况</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="paymentAccountTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">发票库存</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content adapt">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="invoiceInventoryTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
});
|
||||
|
||||
|
||||
todoList();
|
||||
$(".search-select").on('change', function () {
|
||||
todoList();
|
||||
})
|
||||
|
||||
function todoList() {
|
||||
layui.use(['layer', 'table'], function () {
|
||||
var layer = layui.layer;
|
||||
var table = layui.table;
|
||||
var height = $(".todo-wrapper").parent().height() - 20;
|
||||
|
||||
var data = {}
|
||||
$(".search-select").each(function () {
|
||||
data[$(this).attr('name')] = $(this).val()
|
||||
})
|
||||
|
||||
table.render({
|
||||
elem: '#todoTable',
|
||||
height: height,
|
||||
request: {
|
||||
pageName: 'pageNumber',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'approval/todoList.html',
|
||||
where: data,
|
||||
cols: [
|
||||
[
|
||||
{field: 'source', title: '来源'},
|
||||
{field: 'contentSn', title: '来源编号'},
|
||||
{field: 'originator', title: '发起人', width: 100},
|
||||
{field: 'createDate', title: '发起时间'},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'extraInfo', title: '额外信息'},
|
||||
{fixed: 'right', title: '操作', toolbar: '#todoWrapperOption', width: 70}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
//监听行工具事件
|
||||
table.on('tool(todoTable)', function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '查看审批',
|
||||
area: ['600px', '650px'],
|
||||
content: SHIYOU_DOMAIN + '/wx/approval.html?id=' + obj.data.id + '&adminId=[[${session.curAdmin.id}]]'
|
||||
});
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'notice/dataList.html',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
res.data.content.forEach(function (item) {
|
||||
$(".notice-wrapper").append('<div class="notice-item">' +
|
||||
' <a href="javascript:viewNotice(' + item.id + ')" class="text">' + item.title + '</a>' +
|
||||
' <span class="date">' + item.date + '</span>' +
|
||||
'</div>');
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function viewNotice(id) {
|
||||
layui.use('layer', function () {
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '公告通知',
|
||||
area: ['1067px', '600px'],
|
||||
content: SHIYOU_DOMAIN + '/wx/viewNotice.html?id=' + id
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $(".approval-wrapper").parent().height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#approvalTable',
|
||||
height: height,
|
||||
// skin: 'nob',
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'approval/myApprovalList.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'source', title: '来源'},
|
||||
{field: 'contentSn', title: '编号'},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
initMyContractTable();
|
||||
initApprovalTable();
|
||||
|
||||
if ('[[${session.curAdmin.containsRole("商务部经理")}]]' === 'true') {
|
||||
initInApprovalContractTable();
|
||||
initPaymentAccountTable();
|
||||
initInvoiceInventory();
|
||||
}
|
||||
|
||||
$("#myContractSearchInput").on('input', function () {
|
||||
initMyContractTable($(this).val());
|
||||
});
|
||||
$("#approvalSearchInput").on('input', function () {
|
||||
initApprovalTable($(this).val());
|
||||
});
|
||||
$("#inApprovalContractSearchInput").on('input', function () {
|
||||
initApprovalTable($(this).val());
|
||||
});
|
||||
|
||||
// 我的合同
|
||||
function initMyContractTable(sn) {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $("#myContractTable").parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#myContractTable',
|
||||
height: height,
|
||||
// skin: 'nob',
|
||||
where: {
|
||||
sn: sn
|
||||
},
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'salesOrder/myContract.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'name', title: '名称'},
|
||||
{field: 'sn', title: '编号'},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
table.on('row(myContract)', function (obj) {
|
||||
var url = '';
|
||||
var item = obj.data;
|
||||
if (item.name === '销售合同') {
|
||||
url = 'salesOrder/view.html?id=' + item.id
|
||||
} else if (item.name === '采购合同') {
|
||||
url = 'purchaseOrder/view.html?id=' + item.id
|
||||
}
|
||||
if (url) {
|
||||
Nav.go(url)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 我的申请
|
||||
function initApprovalTable(sn) {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $(".approval-wrapper").parent().height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#approvalTable',
|
||||
height: height,
|
||||
// skin: 'nob',
|
||||
where: {
|
||||
sn: sn
|
||||
},
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'approval/myApprovalList.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'source', title: '来源'},
|
||||
{field: 'contentSn', title: '编号'},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 审批中合同
|
||||
function initInApprovalContractTable(sn) {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $("#inApprovalContractTable").parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#inApprovalContractTable',
|
||||
height: height,
|
||||
// skin: 'nob',
|
||||
where: {
|
||||
sn: sn
|
||||
},
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'salesOrder/inApprovalContract.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'name', title: '名称'},
|
||||
{field: 'sn', title: '编号'},
|
||||
{field: 'status', title: '状态'},
|
||||
{field: 'date', title: '时间'},
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
table.on('row(inApprovalContract)', function (obj) {
|
||||
var url = '';
|
||||
var item = obj.data;
|
||||
if (item.name === '销售合同') {
|
||||
url = 'salesOrder/view.html?id=' + item.id
|
||||
} else if (item.name === '采购合同') {
|
||||
url = 'purchaseOrder/view.html?id=' + item.id
|
||||
}
|
||||
if (url) {
|
||||
Nav.go(url)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 资金情况
|
||||
function initPaymentAccountTable() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $("#paymentAccountTable").parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#paymentAccountTable',
|
||||
height: height,
|
||||
// skin: 'nob',
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"data": res.data
|
||||
};
|
||||
},
|
||||
url: 'paymentAccount/listAll.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'name', title: '收款名称'},
|
||||
{field: 'account', title: '收款账号'},
|
||||
{field: 'bankName', title: '开户行'},
|
||||
{field: 'balance', title: '期末余款'},
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 发票库存
|
||||
function initInvoiceInventory() {
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
var height = $("#invoiceInventoryTable").parents('.layui-tab-content').height() - 20;
|
||||
|
||||
table.render({
|
||||
elem: '#invoiceInventoryTable',
|
||||
height: height,
|
||||
// skin: 'nob',
|
||||
parseData: function (res) { //res 即为原始返回的数据
|
||||
return {
|
||||
"code": res.errorCode,
|
||||
"msg": res.errorInfo,
|
||||
"count": res.data.total,
|
||||
"data": res.data.content
|
||||
};
|
||||
},
|
||||
url: 'invoiceInventory/listAll.html',
|
||||
cols: [
|
||||
[
|
||||
{field: 'company', title: '公司'},
|
||||
{field: 'product', title: '品名'},
|
||||
{field: 'count', title: '库存量'}
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="/resources/js/date-schedule.js"></script>
|
||||
<script>
|
||||
// var date = new Date();
|
||||
//
|
||||
// var mySchedule = new DateSchedule({
|
||||
// el: '#schedule-box', //容器元素
|
||||
// // date: '2018-09-20', //当前日期
|
||||
// // disabledBefore: '2018-07-10', //禁用此日期之前
|
||||
// // disabledAfter: '2018-11-15', //禁用此日期之后
|
||||
// // disabledDate: ['2018-8-20', '2018-8-2', '2018-8-23'], //禁用的日期
|
||||
// // selectedDate: ['2018-10-21', '2018-10-22', '2018-10-23'], //选中的日期
|
||||
// // showToday: true, //回到今天
|
||||
// clickCb: function (date) {
|
||||
// // document.querySelector('#h3Ele').innerHTML = '日期:' + date
|
||||
// },
|
||||
// nextMonthCb: function (currentYear, currentMonth) {
|
||||
// setSignColor(currentYear, currentMonth);
|
||||
// },
|
||||
// nextYeayCb: function (currentYear, currentMonth) {
|
||||
// setSignColor(currentYear, currentMonth);
|
||||
// },
|
||||
// prevMonthCb: function (currentYear, currentMonth) {
|
||||
// setSignColor(currentYear, currentMonth);
|
||||
// },
|
||||
// prevYearCb: function (currentYear, currentMonth) {
|
||||
// setSignColor(currentYear, currentMonth);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// var $scheduleBox = $("#schedule-box");
|
||||
//
|
||||
// function setSignColor(currentYear, currentMonth) {
|
||||
// $.ajax({
|
||||
// url: 'signIn/records.html',
|
||||
// dataType: 'json',
|
||||
// data: {
|
||||
// year: currentYear,
|
||||
// month: currentMonth
|
||||
// },
|
||||
// success: function (res) {
|
||||
// if (res.errorCode === '0') {
|
||||
// setSignColorHelper(res.data);
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// function setSignColorHelper(arr) {
|
||||
// $scheduleBox.find('.current-month span').each(function () {
|
||||
// var title = ($(this)).attr('title');
|
||||
// if (arr.indexOf(title) !== -1) {
|
||||
// $(this).addClass('sign-style');
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// setSignColor(new Date().getFullYear(), new Date().getMonth() + 1)
|
||||
//
|
||||
// function zoomInDate() {
|
||||
// layui.use('layer', function () {
|
||||
// var layer = layui.layer;
|
||||
// layer.open({
|
||||
// type: 1,
|
||||
// shade: 0,
|
||||
// title: '我的考勤',
|
||||
// area: ['400px', '450px'],
|
||||
// content: $("#schedule-box"),
|
||||
// btn: ['确认'],
|
||||
// btn1: function (index, layero) {
|
||||
// layer.close(index);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
</script>
|
||||
</html>
|
||||
481
src/main/webapp/WEB-INF/template/home/index3.html
Normal file
481
src/main/webapp/WEB-INF/template/home/index3.html
Normal file
@@ -0,0 +1,481 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_234130_nem7eskcrkpdgqfr.css">
|
||||
<link rel="stylesheet" href="/resources/css/date-schedule.css">
|
||||
<style>
|
||||
.main-body {
|
||||
background: #f3f3f3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.top-button-wrapper {
|
||||
padding: 0 40px;
|
||||
height: 16%;
|
||||
margin-bottom: 20px;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item {
|
||||
margin: 20px 40px 0 0;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item .image {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.top-button-wrapper .button-item .text {
|
||||
font-size: 13px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.center-box-wrapper {
|
||||
width: calc(100% - 330px);
|
||||
height: 100%;
|
||||
/*margin-bottom: 24px;*/
|
||||
font-size: 0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.bottom-box-wrapper {
|
||||
height: calc(100% - 30px);
|
||||
width: 310px;
|
||||
font-size: 0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/*.center-box-wrapper .left-wrapper {*/
|
||||
/* width: 70%;*/
|
||||
/* margin-right: 20px;*/
|
||||
/*}*/
|
||||
|
||||
/*.center-box-wrapper .right-wrapper {*/
|
||||
/* width: calc(30% - 20px);*/
|
||||
/*}*/
|
||||
|
||||
/*.bottom-box-wrapper .left-wrapper {*/
|
||||
/* width: 35%;*/
|
||||
/* margin-right: 20px;*/
|
||||
/*}*/
|
||||
|
||||
/*.bottom-box-wrapper .center-wrapper {*/
|
||||
/* width: calc(35% - 20px);*/
|
||||
/* margin-right: 20px;*/
|
||||
/*}*/
|
||||
|
||||
/*.bottom-box-wrapper .right-wrapper {*/
|
||||
/* width: calc(30% - 20px);*/
|
||||
/*}*/
|
||||
|
||||
.bottom-box-wrapper .common-box-wrapper {
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 32%;
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .left-wrapper{
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 36%;
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .right-wrapper{
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
height: 56%;
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper .item {
|
||||
display: inline-block;
|
||||
margin-top: 25px;
|
||||
width: 19%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper .item1 {
|
||||
display: inline-block;
|
||||
width: 19%;
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper .title{
|
||||
/*height: 30px;*/
|
||||
/*vertical-align: middle;*/
|
||||
display: flex;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
padding-top: 0.93rem;
|
||||
padding-left: 1.2rem;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.center-box-wrapper .common-box-wrapper a{
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.common-box-wrapper.table-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-this::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.common-box-wrapper .more-button {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
color: #4687e6;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-input {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select-wrapper {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 120px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.common-box-wrapper .search-select {
|
||||
width: 120px;
|
||||
padding: 4px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content {
|
||||
height: calc(100% - 61px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.common-box-wrapper .layui-tab-content.adapt {
|
||||
height: calc(100% - 41px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*.common-box-wrapper .layui-tab-content.adapt .layui-table, .layui-table-view {*/
|
||||
/* margin: 0;*/
|
||||
/* border: 0;*/
|
||||
/*}*/
|
||||
|
||||
.notice-wrapper .notice-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.notice-wrapper .notice-item .text {
|
||||
width: calc(100% - 76px);
|
||||
color: #262626;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.notice-wrapper .notice-item .date {
|
||||
position: absolute;
|
||||
color: #a2a2a2;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.approval-wrapper .approval-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.order-wrapper .order-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background: #fbfbfb;
|
||||
}
|
||||
|
||||
.box-title-point{
|
||||
/*width: 0.2rem;*/
|
||||
width: 3px;
|
||||
height: 0.8rem;
|
||||
background-color: #3179E3;
|
||||
margin-right: 0.3rem;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
|
||||
.layui-tab-title-new{
|
||||
display: flex;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
padding-left: 1.2rem;
|
||||
position: relative;
|
||||
left: 0;
|
||||
height: 40px;
|
||||
white-space: nowrap;
|
||||
/*font-size: 0;*/
|
||||
border-bottom: 1px #e6e6e6 solid;
|
||||
transition: all .2s;
|
||||
-webkit-transition: all .2s;
|
||||
}
|
||||
.tagContents img{
|
||||
width: 100% !important;
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-body">
|
||||
<!-- <div class="top-button-wrapper">-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('approval/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">待办审批</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('signInRecord/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">考勤</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('reimbursement/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">报销</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button-item" href="javascript:Nav.go('vacate/list.html')">-->
|
||||
<!-- <img class="image" src="/resources/images/order/approved.png" alt="">-->
|
||||
<!-- <span class="text">请假</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<script type="text/html" id="todoWrapperOption">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
|
||||
</script>
|
||||
|
||||
<div class="center-box-wrapper">
|
||||
<div class="common-box-wrapper left-wrapper">
|
||||
<div class="title">
|
||||
<div class="box-title-point"></div>
|
||||
<p class="box-title">常用功能</p>
|
||||
</div>
|
||||
<div class="item1" onclick="jumpUrl('/admin/admin/list.html')">
|
||||
<img class="icon" src="/resources/images/home/admin.png" alt="">
|
||||
<a >人员管理</a>
|
||||
</div>
|
||||
<div class="item1" onclick="jumpUrl('/admin/department/list.html')">
|
||||
<img class="icon" src="/resources/images/home/department.png" alt="">
|
||||
<a>部门管理</a>
|
||||
</div>
|
||||
<div class="item1" onclick="jumpUrl('/admin/supplier/list.html')">
|
||||
<img class="icon" src="/resources/images/home/supplier.png" alt="">
|
||||
<a>采购商管理</a>
|
||||
</div>
|
||||
<div class="item1" onclick="jumpUrl('/admin/purchaseApplyOrder/list.html?applyType=conduit')">
|
||||
<img class="icon" src="/resources/images/home/cApply.png" alt="">
|
||||
<a>管道请购单</a>
|
||||
</div>
|
||||
<div class="item1" onclick="jumpUrl('admin/purchaseApplyOrder/list.html?applyType=device')">
|
||||
<img class="icon" src="/resources/images/home/dApply.png" alt="">
|
||||
<a>设备请购单</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="item" onclick="jumpUrl('admin/materialOrder/list.html?materialType=conduit')">
|
||||
<img class="icon" src="/resources/images/home/cMaterial.png" alt="">
|
||||
<a>管道综合明细表</a>
|
||||
</div>
|
||||
<div class="item" onclick="jumpUrl('admin/materialOrder/list.html?materialType=device')">
|
||||
<img class="icon" src="/resources/images/home/dMaterial.png" alt="">
|
||||
<a>设备综合明细表</a>
|
||||
</div>
|
||||
<div class="item" onclick="jumpUrl('admin/purchaseStock/list.html')">
|
||||
<img class="icon" src="/resources/images/home/stock.png" alt="">
|
||||
<a>发货管理</a>
|
||||
</div>
|
||||
<div class="item" onclick="jumpUrl('admin/paymentApply/list.html?receivePayment=payment')">
|
||||
<img class="icon" src="/resources/images/home/payment.png" alt="">
|
||||
<a>财务管理</a>
|
||||
</div>
|
||||
<div class="item" onclick="jumpUrl('admin/attachFile/list.html')">
|
||||
<img class="icon" src="/resources/images/home/file.png" alt="">
|
||||
<a>附件管理</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper" style="margin-top: 18px">
|
||||
<div class="tabBody" style="margin-left: 10px">
|
||||
<ul class="tagSwitch">
|
||||
<li class="tag active" tagindex="1">管道专业流程</li>
|
||||
<li class="tag" tagindex="2">设备专业流程</li>
|
||||
</ul>
|
||||
<div class="tagContents">
|
||||
<div class="tagContent submitBody active" data-id="salesMode" tagindex="1">
|
||||
<img src="/resources/images/home/cFlow.png">
|
||||
</div>
|
||||
<div class="tagContent submitBody " data-id="salesMode" tagindex="2">
|
||||
<img src="/resources/images/home/dFlow.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-box-wrapper">
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('notice/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title-new">
|
||||
<div style="display: inline-block" class="box-title-point"></div>
|
||||
<p style="display: inline-block" class="box-title">帮助中心</p>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show help-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('notice/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title-new">
|
||||
<div style="display: inline-block" class="box-title-point"></div>
|
||||
<p style="display: inline-block" class="box-title">公告通知</p>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show notice-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-box-wrapper right-wrapper table-wrapper">
|
||||
<a class="more-button" href="javascript:Nav.go('notice/listForView.html')">查看更多 ></a>
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title-new">
|
||||
<div style="display: inline-block" class="box-title-point"></div>
|
||||
<p style="display: inline-block" class="box-title">意见反馈</p>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show feedBack-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function jumpUrl(url) {
|
||||
Nav.go(url);
|
||||
}
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
});
|
||||
|
||||
todoList();
|
||||
|
||||
function todoList() {
|
||||
$.ajax({
|
||||
url: 'notice/dataList.html',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
res.data.content.forEach(function (item) {
|
||||
$(".notice-wrapper").append('<div class="notice-item">' +
|
||||
' <a href="javascript:viewNotice(' + item.id+')" class="text">' + item.title + '</a>' +
|
||||
' <span class="date">' + item.date + '</span>' +
|
||||
'</div>');
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function viewNotice(id) {
|
||||
$.ajax({
|
||||
url: 'notice/getData.html',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success: function (res) {
|
||||
layui.use('layer', function () {
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '公告通知',
|
||||
area: ['1067px', '600px'],
|
||||
// content: SHIYOU_DOMAIN + '/wx/viewNotice.html?id=' + id
|
||||
content: ""+res.data
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script src="/resources/js/date-schedule.js"></script>
|
||||
</html>
|
||||
54
src/main/webapp/WEB-INF/template/information/index.html
Normal file
54
src/main/webapp/WEB-INF/template/information/index.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
.content-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
<div class="appPage addPage">
|
||||
<input hidden name="title" th:value="${title}"/>
|
||||
<div class="head">
|
||||
<h1 class="page-title" th:text="${name}"></h1>
|
||||
<div class="btnGroup">
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<div th:id="'editor' + ${time}" name="content" th:utext="${information[title]}"
|
||||
style="height: 500px;"></div>
|
||||
</div>
|
||||
<button class="layui-btn preview">预览</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var editorId = 'editor[[${time}]]';
|
||||
var ue = UM.getEditor(editorId);
|
||||
$(".btnGroup .submit").click(function () {
|
||||
$.ajax({
|
||||
url: "information/save.html",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
title: $("input[name='title']").val(),
|
||||
content: $("#" + editorId).html()
|
||||
},
|
||||
success: function (msg) {
|
||||
if (msg.errorCode === '0') {
|
||||
Dialog.success();
|
||||
} else {
|
||||
Dialog.error(msg.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
Dialog.error("保存失败");
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$(".preview").on('click', function () {
|
||||
window.open('/information/[[${title}]].html');
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
10
src/main/webapp/WEB-INF/template/information/preview.html
Normal file
10
src/main/webapp/WEB-INF/template/information/preview.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div th:utext="${information[title]}"></div>
|
||||
</body>
|
||||
</html>
|
||||
94
src/main/webapp/WEB-INF/template/log/list.html
Normal file
94
src/main/webapp/WEB-INF/template/log/list.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="log" moduleName="日志"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">日志记录</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="log/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<div class='btnGroup' style="margin-left:4px">
|
||||
<a class="btn refresh">刷新</a>
|
||||
<div class="filter-wrapper" data-columns="log-table">
|
||||
<div class="filter-item" data-column="operation">
|
||||
<label>操作:</label>
|
||||
<input class="filter-input" type="text" name="operation" th:value="${query.operation}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="operator">
|
||||
<label>操作人:</label>
|
||||
<input class="filter-input" type="text" name="operator" th:value="${query.operator}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="content">
|
||||
<label>内容:</label>
|
||||
<input class="filter-input" type="text" name="content" th:value="${query.content}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="parameter">
|
||||
<label>请求参数:</label>
|
||||
<input class="filter-input" type="text" name="parameter" th:value="${query.parameter}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="ip">
|
||||
<label>ip:</label>
|
||||
<input class="filter-input" type="text" name="ip" th:value="${query.ip}">
|
||||
</div>
|
||||
<div class="filter-item" data-column="createDate">
|
||||
<label>创建日期:</label>
|
||||
<input class="filter-date" type="text" name="createDateStart"
|
||||
th:value="${#dates.format(query.createDateStart, 'yyyy-MM-dd')}" readonly> -
|
||||
<input class="filter-date" type="text" name="createDateEnd"
|
||||
th:value="${#dates.format(query.createDateEnd, 'yyyy-MM-dd')}" readonly>
|
||||
</div>
|
||||
<a class="confirm-button">搜索</a>
|
||||
<a class="clear-filter">清除搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="log-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="operation">访问链接</th>
|
||||
<th class="sort-bar" data-column="operator">操作员</th>
|
||||
<th class="sort-bar" data-column="ip">IP地址</th>
|
||||
<th class="sort-bar" data-column="createDate">操作时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="log : ${page.content}">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${log.id}">
|
||||
</td>
|
||||
<td th:text="${log.operation}"></td>
|
||||
<td th:text="${log.operator}"></td>
|
||||
<td th:text="${log.ip}"></td>
|
||||
<td th:text="${#dates.format(log.createDate, 'yyyy-MM-dd HH:mm:ss')}"></td>
|
||||
<shiro:hasPermission name="log:list">
|
||||
<td class="fixed">
|
||||
<a data-permission="log:list" th:href="|javascript:Nav.go('log/view.html?id=${log.id}');|">查看</a>
|
||||
</td>
|
||||
</shiro:hasPermission>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('[[${page.orderProperty}]]', '[[${page.orderDirection}]]');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</html>
|
||||
58
src/main/webapp/WEB-INF/template/log/view.html
Normal file
58
src/main/webapp/WEB-INF/template/log/view.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<form id="addForm" action="log/save.html" method="post" returnUrl="log/list.html">
|
||||
<div class="appPage addPage notOne">
|
||||
<div class="head">
|
||||
<h1 class="page-title">查看日志</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.return('log/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=log');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="log">
|
||||
<div class="input-wrapper">
|
||||
<label>操作人</label>
|
||||
<input type="text" readonly class="text" name="operator" autocomplete="off"
|
||||
th:value="${log.operator}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>访问链接</label>
|
||||
<input type="text" readonly class="text" name="operation" autocomplete="off"
|
||||
th:value="${log.operation}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>IP地址</label>
|
||||
<input type="text" readonly class="text" name="ip" autocomplete="off" th:value="${log.ip}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>操作时间</label>
|
||||
<input type="text" readonly class="text" name="createDate" autocomplete="off"
|
||||
th:value="${#dates.format(log.createDate, 'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>操作参数</label>
|
||||
<textarea style="width: 400px; height: 500px;" name="parameter" th:text="${log.parameter}" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<style>
|
||||
.submitBox {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 0 !important;
|
||||
height: 39px;
|
||||
line-height: 39px;
|
||||
}
|
||||
|
||||
.submitBox a {
|
||||
margin-top: 6px;
|
||||
margin-right: 7px;
|
||||
width: 70px !important;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
</style>
|
||||
</html>
|
||||
234
src/main/webapp/WEB-INF/template/login/index.html
Normal file
234
src/main/webapp/WEB-INF/template/login/index.html
Normal file
@@ -0,0 +1,234 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<!-- <link rel="shortcut icon" th:href="${systemSetting.ico}"/>-->
|
||||
<link rel="shortcut icon" href="../resources/images/zhsh.ico"/>
|
||||
<!--<link rel="stylesheet" href="../resources/css/style.css">-->
|
||||
<title th:text="|${systemSetting.siteName}-登录|">登录</title>
|
||||
<style type="text/css">
|
||||
*{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
font: 400 12px "Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Heiti,"黑体",sans-serif;
|
||||
color: #fff;
|
||||
}
|
||||
.container{
|
||||
min-width: 1200px;
|
||||
min-height: 550px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-image: url(../resources/images/login/bg-2.png);
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
}
|
||||
.log-pic{
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.log-box{
|
||||
width: 330px;
|
||||
height: 450px;
|
||||
border-radius: 15px;
|
||||
/*background-color: rgba(17, 34, 78, 0.71);*/
|
||||
background-color: #112647;
|
||||
border: 1px solid rgba(131, 194, 255, 0.22);
|
||||
position: absolute;
|
||||
right: 10%;
|
||||
top: calc(50% - 200px);
|
||||
}
|
||||
.log-logo{
|
||||
margin: 30px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.log-logo-icon{
|
||||
width: 250px;
|
||||
height: 130px;
|
||||
}
|
||||
.log-logo-name {
|
||||
padding-top: 20px;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
/*padding-top: 5px;*/
|
||||
}
|
||||
.log-input-container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.log-input-box {
|
||||
/*background: white;*/
|
||||
width: 250px;
|
||||
height: 36px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
/*border-bottom: 1px solid #a0a6b1;*/
|
||||
border: 1px solid #2b4976;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.log-input-icon {
|
||||
padding-left: 20px;
|
||||
width: 26px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.log-input-icon-account{
|
||||
width: 16px;
|
||||
height: 17px;
|
||||
}
|
||||
.log-input-icon-pwd{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.log-input{
|
||||
height: 36px;
|
||||
width: 224px;
|
||||
border: none;
|
||||
background: none;
|
||||
text-indent: 5px;
|
||||
color: #a0a6b1;
|
||||
}
|
||||
|
||||
.log-input:-webkit-autofill {
|
||||
box-shadow: 0 0 0 1000px #0f2045 inset !important;
|
||||
text-fill-color: #a0a6b1;
|
||||
-webkit-text-fill-color: #a0a6b1;
|
||||
}
|
||||
|
||||
input:-webkit-autofill {
|
||||
-webkit-animation: autofill-fix 1s infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes autofill-fix {
|
||||
from {
|
||||
background-color: transparent
|
||||
}
|
||||
to {
|
||||
background-color: transparent
|
||||
}
|
||||
}
|
||||
.log-input:focus{
|
||||
outline:none;
|
||||
}
|
||||
.log-btn {
|
||||
width: 260px;
|
||||
height: 30px;
|
||||
border-radius: 20px;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #FFFFFF;
|
||||
background-color: #3685f2;
|
||||
box-shadow: 0 5px 15px 0 rgba(54, 133, 242, 0.2);
|
||||
cursor: pointer;
|
||||
}
|
||||
.footer{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
}
|
||||
.footer-company,.footer-ipc{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-company {
|
||||
color: #FFFFFF;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.footer-ipc {
|
||||
color: #3685F2;
|
||||
}
|
||||
|
||||
/*.log-input{*/
|
||||
/*box-shadow: 0 0 0px 1000px transparent inset;*/
|
||||
/*background: none;*/
|
||||
/*}*/
|
||||
|
||||
.log-btn {
|
||||
outline: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- <img src="../resources/images/login/bg.png" class="log-pic">-->
|
||||
<img style="width: 67%;height: 100%;" src="../resources/images/login/bg-img.png">
|
||||
<div class="log-box">
|
||||
<div class="log-logo">
|
||||
<!-- <img class="log-logo-icon" src="../resources/images/login/defaultLogo.png">-->
|
||||
<img class="log-logo-icon" src="../resources/images/bgLogo.png">
|
||||
<!-- <p class="log-logo-name">生产管理系统</p>-->
|
||||
<p class="log-logo-name">EPCMS管理系统</p>
|
||||
</div>
|
||||
<form id="loginForm" action="/admin/login.html" method="post">
|
||||
<input type="password" autocomplete="new-password" style="position: absolute; top: -999px;">
|
||||
<div class="log-input-container">
|
||||
<div class="log-input-box">
|
||||
<div class="log-input-icon">
|
||||
<img class="log-input-icon-account" src="../resources/images/login/account.png">
|
||||
</div>
|
||||
<input autocomplete="off" class="log-input" id="username" maxlength="20" name="username"
|
||||
placeholder="请输入账号" style="width: 190px;" type="text"/>
|
||||
</div>
|
||||
<div class="log-input-box">
|
||||
<div class="log-input-icon">
|
||||
<img class="log-input-icon-pwd" src="../resources/images/login/log-pwd.png">
|
||||
</div>
|
||||
<input autocomplete="off" class="log-input" id="password" maxlength="20" name="password"
|
||||
placeholder="请输入密码" style="width: 190px;" type="password"/>
|
||||
</div>
|
||||
<div style="height: 30px;"></div>
|
||||
<input type="submit" class="log-btn" value="登录"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-company">Copyright©2022 EPCMS</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="../resources/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../resources/js/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="../resources/js/jquery.validate.min.js"></script>
|
||||
<script type="text/javascript" th:inline="javascript">
|
||||
var $loginForm = $("#loginForm");
|
||||
var $username = $("#username");
|
||||
var $password = $("#password");
|
||||
|
||||
$loginForm.submit(function () {
|
||||
if ($username.val() === "") {
|
||||
alert("用户名不能为空");
|
||||
return false;
|
||||
}
|
||||
if ($password.val() === "") {
|
||||
alert("密码不能为空");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if([[${ failureMessage != null}]]){
|
||||
alert([[${failureMessage}]]);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
239
src/main/webapp/WEB-INF/template/login/index2.html
Normal file
239
src/main/webapp/WEB-INF/template/login/index2.html
Normal file
@@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="no-siteapp" http-equiv="Cache-Control"/>
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
||||
name="viewport">
|
||||
<link rel="shortcut icon" th:href="${systemSetting.ico}"/>
|
||||
<!--<link rel="stylesheet" href="../resources/css/style.css">-->
|
||||
<title th:text="|${systemSetting.siteName}-登录|">登录</title>
|
||||
<style type="text/css">
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
font: 400 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
min-width: 1200px;
|
||||
min-height: 550px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-image: url(../resources/images/login/bg-1.png);
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.log-pic {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.log-box {
|
||||
width: 330px;
|
||||
height: 400px;
|
||||
border-radius: 15px;
|
||||
background-color: rgba(17, 34, 78, 0.71);
|
||||
border: 1px solid rgba(131, 194, 255, 0.22);
|
||||
position: absolute;
|
||||
right: 10%;
|
||||
top: calc(50% - 200px);
|
||||
}
|
||||
|
||||
.log-logo {
|
||||
margin: 30px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.log-logo-icon {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.log-logo-name {
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.log-input-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.log-input-box {
|
||||
width: 250px;
|
||||
height: 36px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
border-bottom: 1px solid #a0a6b1;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.log-input-icon {
|
||||
width: 26px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.log-input-icon-account {
|
||||
width: 16px;
|
||||
height: 17px;
|
||||
}
|
||||
|
||||
.log-input-icon-pwd {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.log-input {
|
||||
height: 36px;
|
||||
width: 224px;
|
||||
border: none;
|
||||
background: none;
|
||||
text-indent: 5px;
|
||||
color: #a0a6b1;
|
||||
}
|
||||
|
||||
.log-input:-webkit-autofill {
|
||||
box-shadow: 0 0 0 1000px #0f2045 inset !important;
|
||||
text-fill-color: #a0a6b1;
|
||||
-webkit-text-fill-color: #a0a6b1;
|
||||
}
|
||||
|
||||
input:-webkit-autofill {
|
||||
-webkit-animation: autofill-fix 1s infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes autofill-fix {
|
||||
from {
|
||||
background-color: transparent
|
||||
}
|
||||
to {
|
||||
background-color: transparent
|
||||
}
|
||||
}
|
||||
|
||||
.log-input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.log-btn {
|
||||
width: 190px;
|
||||
height: 40px;
|
||||
border-radius: 20px;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
color: #FFFFFF;
|
||||
background-color: #3685f2;
|
||||
box-shadow: 0 5px 15px 0 rgba(54, 133, 242, 0.2);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
}
|
||||
|
||||
.footer-company, .footer-ipc {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-company {
|
||||
color: #FFFFFF;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.footer-ipc {
|
||||
color: #3685F2;
|
||||
}
|
||||
|
||||
/*.log-input{*/
|
||||
/*box-shadow: 0 0 0px 1000px transparent inset;*/
|
||||
/*background: none;*/
|
||||
/*}*/
|
||||
|
||||
.log-btn {
|
||||
outline: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<img class="log-pic" src="../resources/images/login/bg.png">
|
||||
<div class="log-box">
|
||||
<div class="log-logo">
|
||||
<img class="log-logo-icon" src="../resources/images/defaultLogo.png">
|
||||
<p class="log-logo-name">润亿能源管理系统</p>
|
||||
</div>
|
||||
<form action="/admin/login.html" id="loginForm" method="post">
|
||||
<input autocomplete="new-password" style="position: absolute; top: -999px;" type="password">
|
||||
<div class="log-input-container">
|
||||
<div class="log-input-box">
|
||||
<div class="log-input-icon">
|
||||
<img class="log-input-icon-account" src="../resources/images/login/account.jpg">
|
||||
</div>
|
||||
<input autocomplete="off" class="log-input" id="username" maxlength="20" name="username"
|
||||
placeholder="用户名" type="text"/>
|
||||
</div>
|
||||
<div class="log-input-box">
|
||||
<div class="log-input-icon">
|
||||
<img class="log-input-icon-pwd" src="../resources/images/login/log-pwd.jpg">
|
||||
</div>
|
||||
<input autocomplete="off" class="log-input" id="password" maxlength="20" name="password"
|
||||
placeholder="密码" type="password"/>
|
||||
</div>
|
||||
<div style="height: 30px;"></div>
|
||||
<input class="log-btn" type="submit" value="登录"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-company">Copyright©2021 浙江润亿能源管理系统</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../resources/js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/jquery.form.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script th:inline="javascript" type="text/javascript">
|
||||
var $loginForm = $("#loginForm");
|
||||
var $username = $("#username");
|
||||
var $password = $("#password");
|
||||
|
||||
$loginForm.submit(function () {
|
||||
if ($username.val() === "") {
|
||||
alert("用户名不能为空");
|
||||
return false;
|
||||
}
|
||||
if ($password.val() === "") {
|
||||
alert("密码不能为空");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if ([[${ failureMessage != null}]]) {
|
||||
alert([[${failureMessage}]]);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
58
src/main/webapp/WEB-INF/template/material/add.html
Normal file
58
src/main/webapp/WEB-INF/template/material/add.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="material" moduleName="设备"-->
|
||||
<form id="addForm" action="material/save.html" returnUrl="material/list.html" method="post">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">添加材质</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('material/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=material');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="material">
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="code">代号</label>
|
||||
<input class="text" id="code" name="code" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="materialType">材质类型</label>
|
||||
<input class="text" id="materialType" name="materialType" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('material/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: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
56
src/main/webapp/WEB-INF/template/material/edit.html
Normal file
56
src/main/webapp/WEB-INF/template/material/edit.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="material" moduleName="设备"-->
|
||||
<form id="addForm" action="material/update.html" method="post" returnUrl="material/list.html">
|
||||
<input type="hidden" name="id" th:value="${material.id}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title">材质等级</h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.go('material/list.html')">返回</a>
|
||||
<a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=material');">表单设置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody" data-id="material">
|
||||
|
||||
<div class="input-wrapper">
|
||||
<label for="name">名称</label>
|
||||
<input class="text" id="name" name="name" placeholder=""
|
||||
type="text" th:value="${material.name}">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="code">代号</label>
|
||||
<input class="text" id="code" th:value="${material.code}" name="code" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label for="materialType">材质类型</label>
|
||||
<input class="text" id="materialType" th:value="${material.materialType}" name="materialType" value="" placeholder=""
|
||||
type="text">
|
||||
</div>
|
||||
<div class="formBtns">
|
||||
<a href="javascript:Nav.return('material/list.html')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
$(form).ajaxSubmit(function () {
|
||||
Dialog.success();
|
||||
var returnUrl = $(form).attr("returnUrl");
|
||||
Nav.go(returnUrl);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
92
src/main/webapp/WEB-INF/template/material/list.html
Normal file
92
src/main/webapp/WEB-INF/template/material/list.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="material" moduleName="设备"-->
|
||||
<div class="appPage listPage">
|
||||
<h1 class="page-title">材质列表</h1>
|
||||
<h1 class="page-sub-title" th:text="|共${page.total}条记录|"></h1>
|
||||
<form id="listForm" action="material/list.html" method="post">
|
||||
<div class="toolBar">
|
||||
<shiro:hasPermission name="material:add">
|
||||
<a data-permission="material:add" class="btn activeBtn"
|
||||
href="javascript:Nav.go('material/add.html')">添加材质
|
||||
</a>
|
||||
<a class="btn"
|
||||
href="javascript:Dialog.functionDialog(null, null, 'excel/dialog/defaultImport.html?id=material&name=材质');">导入</a>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn refresh">刷新</a>
|
||||
<!-- <div class="filter-wrapper" data-columns="material-table">-->
|
||||
<!-- <div class="filter-item" data-column="code">-->
|
||||
<!-- <label>编号</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="code" th:value="${code}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="filter-item" data-column="name">-->
|
||||
<!-- <label>名称</label>-->
|
||||
<!-- <input class="filter-input" type="text" name="name" th:value="${name}">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="filter-item" data-column="createDate">-->
|
||||
<!-- <label>创建日期:</label>-->
|
||||
<!-- <input class="filter-date" type="text" name="createDateStart"-->
|
||||
<!-- th:value="${#dates.format(createDateStart, 'yyyy-MM-dd')}" readonly> - -->
|
||||
<!-- <input class="filter-date" type="text" name="createDateEnd"-->
|
||||
<!-- th:value="${#dates.format(createDateEnd, 'yyyy-MM-dd')}" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a class="confirm-button">搜索</a>-->
|
||||
<!-- <a class="clear-filter">清除搜索</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table data-columns="material-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col" data-column="#"><input class="checkbox" type="checkbox">
|
||||
</th>
|
||||
<th class="sort-bar" data-column="name">名称</th>
|
||||
<th class="sort-bar" data-column="code">代号</th>
|
||||
<th class="sort-bar" data-column="type">类型</th>
|
||||
<th class="sort-bar" data-column="createDate">创建时间</th>
|
||||
<th data-column="##" class="options fixed">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="material : ${page.content}" th:id="${material.id}" url="material/delete.html">
|
||||
<td class="checkbox-col"><input class="checkbox" type="checkbox" th:data-id="${material.id}">
|
||||
</td>
|
||||
<td th:text="${material.name}"></td>
|
||||
<td th:text="${material.code}"></td>
|
||||
<td th:text="${material.materialType}"></td>
|
||||
<td th:text="${#dates.format(material.createDate, 'yyyy-MM-dd')}"></td>
|
||||
<td class="fixed">
|
||||
<shiro:hasPermission name="material:edit">
|
||||
<a data-permission="material:edit"
|
||||
th:href="|javascript:Nav.go('material/edit.html?id=${material.id}');|"> 编辑</a>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="material:remove">
|
||||
<a data-permission="material:remove"
|
||||
th:href="|javascript:deleteConfirm('${material.id}','/admin/material/delete.html')|"> 删除</a>
|
||||
</shiro:hasPermission>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="common/pagination"></div>
|
||||
</form>
|
||||
<script>
|
||||
initFilterWrapper();
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.selectField({
|
||||
multiSelect: true,
|
||||
resizable: true,
|
||||
resizeMode: 'overflow',
|
||||
success: function () {
|
||||
initSortBar('${page.orderProperty}', '${page.orderDirection}');
|
||||
}
|
||||
});
|
||||
|
||||
var $filterWrapper = $(".toolBar .filter-wrapper");
|
||||
$filterWrapper.selectFilter()
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
.downloadTemplate{
|
||||
display: inline-block;
|
||||
padding: 4px 14px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
font-size: 12px;
|
||||
border: 1px solid #DBE2E6;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<form id="addForm" action="product/save.html" th:returnUrl="|product/list.html?type=${type}|" method="post" style="height: 100%;">
|
||||
<div class="appPage addPage" style="height: 100%;">
|
||||
<div class="head">
|
||||
<h1 class="page-title">设备专业导入</h1>
|
||||
<!-- <div class="btnGroup">-->
|
||||
<!-- <a class="btn" th:href="|javascript:Nav.return('product/list.html?type=${type}')|">返回</a>-->
|
||||
<!-- <a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=product');">表单设置</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="submitBody" data-id="addDevice" style="position:absolute;top: 20%;">
|
||||
<style>
|
||||
.input-wrapper {
|
||||
float: left;
|
||||
/*margin-right: 10%;*/
|
||||
}
|
||||
</style>
|
||||
<div class="submitBody-row">
|
||||
<!-- <div class="submitBody-row-position" style="margin-left: 400px;">-->
|
||||
<div class="submitBody-row-position" >
|
||||
<div class="input-wrapper">
|
||||
<label>导入文件</label>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="searchBarBtn iBtn"/>
|
||||
<input hidden id="adminId" th:value="${adminId}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper" style="width: 400px;">
|
||||
<label>前缀</label>
|
||||
<input class="text" type="text" id="preTitle" name="preTitle" >
|
||||
</div>
|
||||
<div class="input-wrapper" style="width: 400px;">
|
||||
<label>流水号长度</label>
|
||||
<input class="text" type="number" id="flowNum" name="flowNum">
|
||||
</div>
|
||||
<!-- <div class="input-wrapper required" style="width: 400px">-->
|
||||
<!-- <label>阶段</label>-->
|
||||
<!-- <select id="stage" name="stage" data-not-select="">-->
|
||||
<!-- <option th:each="item : ${stageList}" th:value="${item.id}" th:text="${item.name}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
|
||||
<div class="input-wrapper required" style="width: 400px">
|
||||
<label>阶段</label>
|
||||
<select id="stage" name="stage" data-not-select="">
|
||||
<option th:each="item : ${stageList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper" style="width: 400px;">
|
||||
<label>料单名称</label>
|
||||
<input class="text" type="text" id="name" name="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<!-- <div class="input-wrapper" style="margin-left: 400px">-->
|
||||
<div class="input-wrapper" >
|
||||
<label>综合材料明细表编号</label>
|
||||
<input class="text" readonly style="width: 500px;" type="text" id="showCode" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="formBtns formBtnsExtra">
|
||||
<!-- <a th:href="|javascript:Nav.return('product/list.html?type=${type}')|" class="btn">取消</a>-->
|
||||
<a class="btn" onclick="downloadTemplate()">下载模板</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
var flag = true;
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
if (flag){
|
||||
flag = false;
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
fromData.append("adminId", $("#adminId").val());
|
||||
fromData.append("preTitle", $("#preTitle").val());
|
||||
fromData.append("flowNum", $("#flowNum").val());
|
||||
// fromData.append("code", $("#code").val());
|
||||
fromData.append("stage", $("#stage").val());
|
||||
fromData.append("name", $("#name").val());
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: 'materialOrder/uploadDeviceExcel',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.success('导入成功');
|
||||
Nav.refresh();
|
||||
flag = true;
|
||||
} else {
|
||||
flag = true;
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
flag = true;
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Dialog.error("正在上传");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
|
||||
function downloadTemplate() {
|
||||
window.open("../../../resources/template/综合材料明细模板.xlsx")
|
||||
}
|
||||
$("#preTitle").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#flowNum").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#stage").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
|
||||
function showCode() {
|
||||
var preTitle =$("#preTitle").val();
|
||||
var flowNum =$("#flowNum").val();
|
||||
var stage =$("#stage").val();
|
||||
if (preTitle == null || flowNum == null || stage == null || preTitle == "" || flowNum == "" || stage == ""){
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'materialOrder/getCode',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
preTitle:preTitle,
|
||||
flowNum:flowNum,
|
||||
stage:stage,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
$("#showCode").val(res.data);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
237
src/main/webapp/WEB-INF/template/materialOrder/addFile.html
Normal file
237
src/main/webapp/WEB-INF/template/materialOrder/addFile.html
Normal file
@@ -0,0 +1,237 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
.downloadTemplate{
|
||||
display: inline-block;
|
||||
padding: 4px 14px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
font-size: 12px;
|
||||
border: 1px solid #DBE2E6;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<form id="addForm" action="product/save.html" th:returnUrl="|product/list.html?type=${type}|" method="post" style="height: 100%">
|
||||
<div class="appPage addPage" style="height: 100%;">
|
||||
<div class="head">
|
||||
<h1 class="page-title">配管专业导入</h1>
|
||||
<!-- <div class="btnGroup">-->
|
||||
<!-- <a class="btn" th:href="|javascript:Nav.return('product/list.html?type=${type}')|">返回</a>-->
|
||||
<!-- <a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=product');">表单设置</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="submitBody" data-id="addFile" style="position:absolute;top: 20%;">
|
||||
<style>
|
||||
.input-wrapper {
|
||||
float: left;
|
||||
margin-right: 160px;
|
||||
}
|
||||
</style>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper">
|
||||
<label>导入文件</label>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
<input hidden id="adminId" th:value="${adminId}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper">
|
||||
<label>前缀</label>
|
||||
<input class="text" type="text" id="preTitle" name="preTitle" >
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>流水号长度</label>
|
||||
<input class="text" type="number" id="flowNum" name="flowNum">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper required">
|
||||
<label>阶段</label>
|
||||
<select id="stage" name="stage" data-not-select="">
|
||||
<option th:each="item : ${stageList}" th:value="${item.id}" th:text="|${item.name}(阶段${item.stageNum})|"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>料单描述</label>
|
||||
<input class="text" type="text" id="memo" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper">
|
||||
<label>综合材料明细表编号</label>
|
||||
<!-- <input class="text" style="width: 500px" readonly type="text" id="showCode" >-->
|
||||
<input class="text" readonly type="text" id="showCode" >
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<label>料单名称</label>
|
||||
<input class="text" type="text" id="name" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input hidden name="progressId" id="progressId" th:value="${progressId}"/>
|
||||
<div class="formBtns formBtnsExtra">
|
||||
<!-- <a th:href="|javascript:Nav.return('product/list.html?type=${type}')|" class="btn">取消</a>-->
|
||||
<a class="btn" style="width: 100px;margin-right: 10px;" onclick="findPrevStageList()">查看以往阶段</a>
|
||||
<a class="btn" onclick="downloadTemplate()">下载模板</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
var flag = true;
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
if ($("#stage").val() == null ||$("#stage").val() == "null"){
|
||||
Dialog.error("阶段不能为空");
|
||||
return;
|
||||
}
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
if (flag){
|
||||
flag = false;
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
fromData.append("adminId", $("#adminId").val());
|
||||
fromData.append("preTitle", $("#preTitle").val());
|
||||
fromData.append("flowNum", $("#flowNum").val());
|
||||
// fromData.append("code", $("#code").val());
|
||||
fromData.append("stage", $("#stage").val());
|
||||
fromData.append("memo", $("#memo").val());
|
||||
fromData.append("name", $("#name").val());
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: 'materialOrder/uploadOrderExcel',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.success('导入成功');
|
||||
Nav.refresh();
|
||||
flag = true;
|
||||
} else if (res.errorCode === "1") {
|
||||
Dialog.success("导入成功,存在异常数量");
|
||||
Nav.refresh();
|
||||
Dialog.functionDialog(null,null,'materialOrder/uploadResult.html');
|
||||
flag = true;
|
||||
} else if (res.errorCode === "3") {
|
||||
Dialog.error(res.errorInfo);
|
||||
Nav.refresh();
|
||||
Dialog.functionDialog(null,null,'materialOrder/uploadResult2.html?successNum='+res.data.successNum+"&importErrorExcel="+res.data.importErrorExcel+"&failNum="+res.data.failNum);
|
||||
flag = true;
|
||||
} else {
|
||||
flag = true;
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
flag = true;
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Dialog.error("正在上传");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
|
||||
function findPrevStageList() {
|
||||
var adminId = $("#adminId").val();
|
||||
var preTitle = $("#preTitle").val();
|
||||
var stage = $("#stage").val();
|
||||
|
||||
if (preTitle == null || preTitle === '' || stage == null || stage === '') {
|
||||
Dialog.error("前缀或阶段不能为空");
|
||||
} else {
|
||||
Dialog.functionDialog(null, null, 'materialOrder/findPrevStageListDialog.html?adminId=' + adminId + "&preTitle=" + preTitle + "&stage=" + stage);
|
||||
}
|
||||
}
|
||||
|
||||
function downloadTemplate() {
|
||||
window.open("../../../resources/template/综合材料明细模板.xlsx")
|
||||
}
|
||||
$("#preTitle").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#flowNum").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#stage").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
|
||||
$("#excel_file").on("change",function () {
|
||||
// $("#memo").val($(this).filename)
|
||||
var upload = document.getElementById('excel_file');
|
||||
var fileName = upload.files[0].name;
|
||||
$("#memo").val(fileName)
|
||||
$("#name").val(fileName)
|
||||
})
|
||||
|
||||
function showCode() {
|
||||
var preTitle =$("#preTitle").val();
|
||||
var flowNum =$("#flowNum").val();
|
||||
var stage =$("#stage").val();
|
||||
if (preTitle == null || flowNum == null || stage == null || preTitle == "" || flowNum == "" || stage == ""){
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'materialOrder/getCode',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
preTitle:preTitle,
|
||||
flowNum:flowNum,
|
||||
stage:stage,
|
||||
progressId:$("#progressId").val(),
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
$("#showCode").val(res.data);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
196
src/main/webapp/WEB-INF/template/materialOrder/addFile2.html
Normal file
196
src/main/webapp/WEB-INF/template/materialOrder/addFile2.html
Normal file
@@ -0,0 +1,196 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
.downloadTemplate{
|
||||
display: inline-block;
|
||||
padding: 4px 14px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
font-size: 12px;
|
||||
border: 1px solid #DBE2E6;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<form id="addForm" action="product/save.html" th:returnUrl="|product/list.html?type=${type}|" method="post" style="height: 100%">
|
||||
<div class="appPage addPage" style="height: 100%;">
|
||||
<div class="head">
|
||||
<h1 class="page-title">配管专业导入</h1>
|
||||
<!-- <div class="btnGroup">-->
|
||||
<!-- <a class="btn" th:href="|javascript:Nav.return('product/list.html?type=${type}')|">返回</a>-->
|
||||
<!-- <a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=product');">表单设置</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="submitBody" data-id="addFile" style="position:absolute;top: 20%;">
|
||||
<style>
|
||||
.input-wrapper {
|
||||
float: left;
|
||||
/*margin-right: 10%;*/
|
||||
}
|
||||
</style>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper" style="margin-left: 400px">
|
||||
<label>导入文件</label>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
<input hidden id="adminId" th:value="${adminId}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
<div class="input-wrapper" style=" width: 400px;">
|
||||
<label>前缀</label>
|
||||
<input class="text" type="text" id="preTitle" name="preTitle" >
|
||||
</div>
|
||||
<div class="input-wrapper" style=" width: 400px;">
|
||||
<label>流水号长度</label>
|
||||
<input class="text" type="number" id="flowNum" name="flowNum">
|
||||
</div>
|
||||
<div class="input-wrapper required" style=" width: 400px;">
|
||||
<label>阶段</label>
|
||||
<select id="stage" name="stage" data-not-select="">
|
||||
<option th:each="item : ${stageList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position">
|
||||
|
||||
<div class="input-wrapper" style="margin-left: 400px">
|
||||
<label>综合材料明细表编号</label>
|
||||
<input class="text" readonly style="width: 500px" type="text" id="showCode" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="formBtns formBtnsExtra">
|
||||
<!-- <a th:href="|javascript:Nav.return('product/list.html?type=${type}')|" class="btn">取消</a>-->
|
||||
<a class="btn" onclick="downloadTemplate()">下载模板</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
var flag = true;
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel文件");
|
||||
} else {
|
||||
if (flag){
|
||||
flag = false;
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
fromData.append("adminId", $("#adminId").val());
|
||||
fromData.append("preTitle", $("#preTitle").val());
|
||||
fromData.append("flowNum", $("#flowNum").val());
|
||||
// fromData.append("code", $("#code").val());
|
||||
fromData.append("stage", $("#stage").val());
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: 'materialOrder/uploadOrderExcel',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
Dialog.success('导入成功');
|
||||
Nav.refresh();
|
||||
flag = true;
|
||||
} else if (res.errorCode === "1") {
|
||||
Dialog.success("导入成功,存在异常数量");
|
||||
Nav.refresh();
|
||||
Dialog.functionDialog(null,null,'materialOrder/uploadResult.html');
|
||||
flag = true;
|
||||
} else if (res.errorCode === "3") {
|
||||
Dialog.error(res.errorInfo);
|
||||
Nav.refresh();
|
||||
Dialog.functionDialog(null,null,'materialOrder/uploadResult2.html?successNum='+res.data.successNum+"&importErrorExcel="+res.data.importErrorExcel+"&failNum="+res.data.failNum);
|
||||
flag = true;
|
||||
} else {
|
||||
flag = true;
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
flag = true;
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Dialog.error("正在上传");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx)$/.test(excel_file);
|
||||
}
|
||||
|
||||
function downloadTemplate() {
|
||||
window.open("../../../resources/template/综合材料明细模板.xlsx")
|
||||
}
|
||||
$("#preTitle").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#flowNum").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#stage").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
|
||||
function showCode() {
|
||||
var preTitle =$("#preTitle").val();
|
||||
var flowNum =$("#flowNum").val();
|
||||
var stage =$("#stage").val();
|
||||
if (preTitle == null || flowNum == null || stage == null || preTitle == "" || flowNum == "" || stage == ""){
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'materialOrder/getCode',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
preTitle:preTitle,
|
||||
flowNum:flowNum,
|
||||
stage:stage,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
$("#showCode").val(res.data);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
151
src/main/webapp/WEB-INF/template/materialOrder/addPrice.html
Normal file
151
src/main/webapp/WEB-INF/template/materialOrder/addPrice.html
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
.downloadTemplate{
|
||||
display: inline-block;
|
||||
padding: 4px 14px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
font-size: 12px;
|
||||
border: 1px solid #DBE2E6;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<form id="addForm" action="product/save.html" th:returnUrl="|product/list.html?type=${type}|" method="post" style="height: 100%">
|
||||
<div class="appPage addPage" style="height: 100%;">
|
||||
<div class="head">
|
||||
<h1 class="page-title">导入报价</h1>
|
||||
<!-- <div class="btnGroup">-->
|
||||
<!-- <a class="btn" th:href="|javascript:Nav.return('product/list.html?type=${type}')|">返回</a>-->
|
||||
<!-- <a class="form-setting" href="javascript:Dialog.functionDialog(null, null, '/admin/common/formSetting.html?name=product');">表单设置</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="submitBody" data-id="addFile" style="position:absolute;top: 20%;">
|
||||
<style>
|
||||
.input-wrapper {
|
||||
float: left;
|
||||
margin-right: 10%;
|
||||
}
|
||||
</style>
|
||||
<div class="submitBody-row">
|
||||
<div class="submitBody-row-position" style="text-align: center;width: 100%;">
|
||||
<div class="input-wrapper" style="text-align: center;width: 100%">
|
||||
<label>导入文件</label>
|
||||
<input id="excel_file" type="file" name="excel_file" accept="xlsx" size="80"
|
||||
class="serachBarBtn iBtn"/>
|
||||
<input hidden id="adminId" th:value="${adminId}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="formBtns formBtnsExtra">
|
||||
<!-- <a th:href="|javascript:Nav.return('product/list.html?type=${type}')|" class="btn">取消</a>-->
|
||||
<!-- <a class="btn" onclick="downloadTemplate()">下载模板</a>-->
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(".submitBody").formSetting();
|
||||
|
||||
var flag = true;
|
||||
|
||||
var $addForm = $("#addForm");
|
||||
$addForm.validate({
|
||||
rules: {},
|
||||
messages: {},
|
||||
submitHandler: function (form) {
|
||||
Dialog.waiting();
|
||||
if (!check()) {
|
||||
Dialog.error("请选择Excel或者zip文件");
|
||||
} else {
|
||||
if (flag) {
|
||||
flag = false;
|
||||
var File = $("#excel_file")[0].files;
|
||||
var fromData = new FormData();
|
||||
fromData.append("file", File[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: 'materialOrder/uploadExcel',
|
||||
dataType: 'json',
|
||||
data: fromData,
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
// Dialog.close($dialog);
|
||||
Dialog.success('导入成功');
|
||||
Nav.refresh();
|
||||
flag = true;
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
flag = true;
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function check() {
|
||||
var excel_file = $("#excel_file").val();
|
||||
if (excel_file === "" || excel_file.length === 0) {
|
||||
//alert("请选择文件路径!");
|
||||
return false;
|
||||
} else return /.(xls|xlsx|zip)$/.test(excel_file);
|
||||
}
|
||||
|
||||
function downloadTemplate() {
|
||||
window.open("../../../resources/template/综合材料明细模板.xlsx")
|
||||
}
|
||||
$("#preTitle").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#flowNum").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
$("#stage").on("change",function () {
|
||||
showCode()
|
||||
})
|
||||
|
||||
function showCode() {
|
||||
var preTitle =$("#preTitle").val();
|
||||
var flowNum =$("#flowNum").val();
|
||||
var stage =$("#stage").val();
|
||||
if (preTitle == null || flowNum == null || stage == null || preTitle == "" || flowNum == "" || stage == ""){
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'materialOrder/getCode',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
preTitle:preTitle,
|
||||
flowNum:flowNum,
|
||||
stage:stage,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === "0") {
|
||||
$("#showCode").val(res.data);
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
console.log('ajax error');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
145
src/main/webapp/WEB-INF/template/materialOrder/conduit/add.html
Normal file
145
src/main/webapp/WEB-INF/template/materialOrder/conduit/add.html
Normal file
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<style>
|
||||
#addTable td{
|
||||
min-width: 100px;
|
||||
}
|
||||
</style>
|
||||
<form id="addForm" action="materialOrder/save.html" returnUrl="back" method="post">
|
||||
<input type="hidden" name="internationalTradeFlag" th:value="${internationalTradeFlag}">
|
||||
<input type="hidden" name="type" th:value="${type}">
|
||||
<input type="hidden" name="progressId" th:value="${progressId}">
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title" th:text="|添加${type.message}|"></h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.return('back')" th:text="#{common.back}"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="complexAddBody">
|
||||
<div class="filter-wrapper variable" data-columns="inside-materialOrder-table">
|
||||
<div class="filter-item" data-column="sn">
|
||||
<label>明细单号:</label>
|
||||
<input class="filter-input" type="text" name="sn">
|
||||
</div>
|
||||
<div class="filter-item" data-column="adminId">
|
||||
<label>请购人:</label>
|
||||
<select class="filter-input" type="text" name="adminId" th:data-init="${session.curAdmin.id}">
|
||||
<option th:each="item : ${adminList}" th:value="${item.id}" th:text="${item.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-item" data-column="remark">
|
||||
<label>备注:</label>
|
||||
<input class="filter-input" style="width: 400px;" name="remark" id="remark" type="text" >
|
||||
<!-- <textarea style="border: 1px solid #DBE2E6;border-radius: 3px;vertical-align: top" id="remark"-->
|
||||
<!-- name="remark" cols="160" rows="4"></textarea>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableWrap">
|
||||
<table id="addTable" data-columns="inside-materialOrder-table" data-inside>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="minimum" data-column="#"><a class="addBtn"
|
||||
href="javascript:Dialog.functionDialog(null, null, '/admin/common/selectInsideField.html?name=inside-materialOrder-table');">
|
||||
<i class="fa fa-cog"></i>
|
||||
</a></th>
|
||||
<th style="min-width: 200px" data-column="productId">采购码</th>
|
||||
<th data-column="name">专业名称</th>
|
||||
<th data-column="areaAccount">主项号</th>
|
||||
<th data-column="unitAccount">单元号</th>
|
||||
<th data-column="siteAccount">分区号</th>
|
||||
<th style="min-width: 150px" data-column="lineAccount">管线号</th>
|
||||
<th data-column="codeType">编码类型</th>
|
||||
<th style="min-width: 200px" data-column="shortDescription">短描述</th>
|
||||
<th style="min-width: 200px" data-column="longDescription">长描述</th>
|
||||
<th data-column="gWeight">单重</th>
|
||||
<th data-column="totalWeight">总重</th>
|
||||
<th data-column="count">数量</th>
|
||||
<th data-column="unit">单位</th>
|
||||
<!-- <th data-column="versionNum">版本</th>-->
|
||||
<th data-column="bigProductType">大类</th>
|
||||
<th data-column="smallProductType">小类</th>
|
||||
<th data-column="diameterL">公称直径(L)</th>
|
||||
<th data-column="diameterS">公称直径(S)</th>
|
||||
<th data-column="wallThicknessL">壁厚(L)</th>
|
||||
<th data-column="wallThicknessS">壁厚(S)</th>
|
||||
<th data-column="size">尺寸标准</th>
|
||||
<th data-column="pressureLevel">压力等级</th>
|
||||
<th data-column="endFace">端面</th>
|
||||
<th data-column="material">材质</th>
|
||||
<th data-column="insulationCode">隔热代号</th>
|
||||
<th data-column="specialRequest">特殊要求</th>
|
||||
<th data-column="memo">备注</th>
|
||||
<th th:each="data : ${session.eField.list('materialOrderItem')}"
|
||||
th:text="${data.name}" th:data-column="${data.fieldName}"></th>
|
||||
<th class="fixed" data-column="##">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="index : ${#numbers.sequence(1,5)}">
|
||||
<td style="min-width: 20px" th:text="${index}"></td>
|
||||
<td>
|
||||
<select class="part-product-select" data-not-select data-change="selectChange">
|
||||
<option th:each="item : ${productList}" th:value="${item.id}"
|
||||
th:text="${item.code}"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input data-input="name" type="text" readonly></td>
|
||||
<td><input data-input="areaAccount" type="text" readonly></td>
|
||||
<td><input data-input="unitAccount" type="text" readonly></td>
|
||||
<td><input data-input="siteAccount" type="text" readonly></td>
|
||||
<td><input data-input="lineAccount" type="text" readonly></td>
|
||||
<td><input data-input="codeType" type="text" readonly></td>
|
||||
<td><input data-input="shortDescription" type="text" readonly></td>
|
||||
<td><input data-input="longDescription" type="text" readonly></td>
|
||||
<td><input data-input="gWeight" type="number" readonly></td>
|
||||
<td><input data-input="totalWeight" class="subtotalWeight" type="number" readonly></td>
|
||||
<td><input data-input="count" type="number" ></td>
|
||||
<td><input data-input="unit" type="text" readonly></td>
|
||||
<!-- <td><input data-input="versionNum" type="text" ></td>-->
|
||||
<td><input data-input="bigProductType" class="bigName" type="text" readonly></td>
|
||||
<td><input data-input="smallProductType" class="smallName" type="text" readonly></td>
|
||||
<td><input data-input="diameterL" type="number" ></td>
|
||||
<td><input data-input="diameterS" type="number" ></td>
|
||||
<td><input data-input="wallThicknessL" type="number" ></td>
|
||||
<td><input data-input="wallThicknessS" type="number" ></td>
|
||||
<td><input data-input="size" type="text" ></td>
|
||||
<td><input data-input="pressureLevel" type="text" ></td>
|
||||
<td><input data-input="endFace" type="text" ></td>
|
||||
<td><input data-input="material" type="text" ></td>
|
||||
<td><input data-input="insulationCode" type="text" ></td>
|
||||
<td><input data-input="specialRequest" type="text" ></td>
|
||||
<td><input data-input="memo" type="text" ></td>
|
||||
<td th:each="data : ${session.eField.list('materialOrderItem')}">
|
||||
<input th:data-input="${data.fieldName}" type="text">
|
||||
</td>
|
||||
<td class="fixed"><span class="remove">X</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="buttonWrp">
|
||||
<a href="javascript:Nav.return('back')" class="btn">取消</a>
|
||||
<input type="submit" class="btn submit" value="保存"/>
|
||||
</div>
|
||||
<!-- <div class="infoWrapper">-->
|
||||
<!-- <div class="info-item">合计数量: <span class="totalCount">0</span></div>-->
|
||||
<!-- <div class="info-item">合计金额: <span class="totalAmount">0</span></div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var $table = $(".tableWrap table");
|
||||
$table.complexAdd({
|
||||
entity: 'materialOrder',
|
||||
baseSelect:'.part-product-select'
|
||||
});
|
||||
var selectChange = $table.selectChange;
|
||||
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,695 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
|
||||
<!--module="materialOrder" moduleName="采购合同"-->
|
||||
|
||||
<style>
|
||||
#addTable th {
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.different {
|
||||
background: #00B83F;
|
||||
}
|
||||
.different-Update {
|
||||
background-color: #56e185 !important;
|
||||
}
|
||||
.different-Add {
|
||||
background-color: #00CCFF !important;
|
||||
}
|
||||
.different-Delete {
|
||||
background-color: #FF0000 !important;
|
||||
}
|
||||
|
||||
.normal {
|
||||
background: white;
|
||||
}
|
||||
|
||||
.noShow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#tableView td{
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
#addTable > .top-line {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#addTable > thead {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#tableHeaderWrapper {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tableHeader {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#tableHeader > .item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border-right: 1px solid #dadada;
|
||||
border-bottom: 1px solid #dadada;
|
||||
color: #828282;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
#tableHeader > .item:last-child {
|
||||
border-right: 0;
|
||||
}
|
||||
</style>
|
||||
<form id="addForm" action="materialOrder/save.html" returnUrl="back" method="post">
|
||||
<input id="id" hidden th:value="${materialOrder.id}"/>
|
||||
<div class="appPage addPage">
|
||||
<div class="head">
|
||||
<h1 class="page-title" th:text="|查看${type.message}|"></h1>
|
||||
<div class="btnGroup">
|
||||
<a class="btn" href="javascript:Nav.return('back')" th:text="#{common.back}"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="complexAddBody">
|
||||
<div class="option-wrapper">
|
||||
<a class="option-item" th:onclick="|exportView(${materialOrder.id})|">
|
||||
<img class="icon" src="/resources/images/order/icon_export.png"/>导出筛选结果</a>
|
||||
<!-- <a class="option-item"-->
|
||||
<!-- th:href="'materialOrder/exportSupplier.html?id=' + ${materialOrder.id}">-->
|
||||
<!-- <img class="icon" src="/resources/images/order/icon_export.png"/>导出供应商文件</a>-->
|
||||
<!-- <a class="option-item"-->
|
||||
<!-- th:href="|javascript:Dialog.functionDialog(null, null, 'materialOrder/dialog/addPrice.html?id=${materialOrder.id}');|">-->
|
||||
<!-- <img class="icon" src="/resources/images/order/ticket.png">导入供应商报价</a> -->
|
||||
<a class="option-item"
|
||||
th:href="|javascript:Dialog.functionDialog(null, null, 'materialOrder/dialog/selectSupplier.html?id=${materialOrder.id}');|">
|
||||
<img class="icon" src="/resources/images/order/ticket.png">智能筛选</a>
|
||||
</div>
|
||||
<div class="filter-wrapper variable" data-columns="inside-materialOrder_view-table">
|
||||
<div class="filter-item" data-column="sn">
|
||||
<label>明细单号:</label>
|
||||
<input class="filter-input" type="text" th:value="${materialOrder.sn}" readonly>
|
||||
</div>
|
||||
<div class="filter-item" data-column="adminId">
|
||||
<label>请购人:</label>
|
||||
<input class="filter-input" type="text" th:value="${materialOrder.adminName}" readonly>
|
||||
</div>
|
||||
<div class="filter-item" data-column="totalWeight">
|
||||
<label>总重量:</label>
|
||||
<input class="filter-input" type="text" th:value="${materialOrder.totalWeight}" readonly>
|
||||
</div>
|
||||
<div class="filter-item" data-column="versionNum">
|
||||
<label>版本号:</label>
|
||||
<select class="filter-input" type="text" th:data-init="${nowVersion}"
|
||||
name="versionNum" id="versionNum">
|
||||
<option th:each="item : ${allVersionList}" th:value="${item}"
|
||||
th:text="${item}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item" data-column="oldVersion">
|
||||
<label>对比版本:</label>
|
||||
<select class="filter-input" type="text" th:data-init="${oldVersion}" name="oldVersion"
|
||||
id="oldVersion">
|
||||
<option value="">不对比</option>
|
||||
<option th:each="item : ${versionList}" th:value="${item}"
|
||||
th:text="${item}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-item" data-column="attachFile">
|
||||
<label>附件:</label>
|
||||
<i class="fa fa-paperclip" onclick="attachFileDialogView()"></i>
|
||||
<div class="attachFileWrapper">
|
||||
<input th:each="item : ${materialOrder.attachFileIds}" type="text" name="attachFileIds"
|
||||
th:value="${item}" hidden>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-item" data-column="remark">
|
||||
<label>原料单号:</label>
|
||||
<input class="filter-input" style="width: 400px" id="remark" type="text" th:value="${materialOrder.remark}" >
|
||||
<!-- <textarea style="border: 1px solid #DBE2E6;border-radius: 3px;vertical-align: top" id="remark"-->
|
||||
<!-- cols="160" rows="4" th:text="${materialOrder.remark}"></textarea>-->
|
||||
</div>
|
||||
</div>
|
||||
<div id="tableView" class="tableWrap" style="max-height: 650px">
|
||||
<div id="tableHeaderWrapper">
|
||||
<div id="tableHeader"></div>
|
||||
</div>
|
||||
<table id="addTable" data-columns="inside-materialOrder_view-table" data-custom-header data-inside>
|
||||
<thead>
|
||||
<tr class="titleTr">
|
||||
<th style="min-width: 20px" class="minimum" data-column="#"><a class="addBtn"
|
||||
href="javascript:quickDialog('/admin/common/selectInsideField.html?name=inside-materialOrder_view-table');">
|
||||
<i class="fa fa-cog"></i>
|
||||
</a></th>
|
||||
<th style="min-width: 200px" data-column="productId">采购码</th>
|
||||
<th data-column="name">专业名称</th>
|
||||
<th data-column="areaAccount">主项号</th>
|
||||
<th data-column="unitAccount">单元号</th>
|
||||
<th data-column="siteAccount">分区号</th>
|
||||
<th style="min-width: 150px" data-column="lineAccount">管线号</th>
|
||||
<th data-column="codeType">编码类型</th>
|
||||
<th style="min-width: 200px" data-column="shortDescription">短描述</th>
|
||||
<th style="min-width: 200px" data-column="longDescription">长描述</th>
|
||||
<th data-column="gWeight">单重</th>
|
||||
<th data-column="totalWeight">总重</th>
|
||||
<th data-column="needCount">设计数量</th>
|
||||
<th data-column="count">采购数量</th>
|
||||
<th data-column="useStockCount">库存使用量</th>
|
||||
<th data-column="unit">单位</th>
|
||||
<!-- <th data-column="versionNum">版本</th>-->
|
||||
<th data-column="bigProductType">大类</th>
|
||||
<th data-column="bigProductDes">大类描述</th>
|
||||
<th data-column="smallProductType">小类</th>
|
||||
<th data-column="smallProductDes">小类描述</th>
|
||||
<th data-column="makeCode">制造形式代号</th>
|
||||
<th data-column="makeType">制造形式描述</th>
|
||||
<th data-column="diameterL">公称直径(L)</th>
|
||||
<th data-column="diameterS">公称直径(S)</th>
|
||||
<th data-column="wallThicknessL">壁厚(L)</th>
|
||||
<th data-column="wallThicknessS">壁厚(S)</th>
|
||||
<th data-column="size">尺寸标准</th>
|
||||
<th data-column="pressureLevel">压力等级</th>
|
||||
<th data-column="endFace">端面</th>
|
||||
<th data-column="material">材质</th>
|
||||
<th data-column="materialType">材质类型</th>
|
||||
<th data-column="insulationCode">隔热代号</th>
|
||||
<th data-column="specialRequest">特殊要求</th>
|
||||
<th data-column="memo">备注</th>
|
||||
<th data-column="supplierIds">供应商列表</th>
|
||||
<th data-column="confirmSuppliers">确认供应商列表</th>
|
||||
<th data-column="supplierName">中标供应商</th>
|
||||
<th data-column="price">中标价格</th>
|
||||
<th th:each="data : ${session.eField.list('materialOrderItem')}"
|
||||
th:text="${data.name}" th:data-column="${data.fieldName}"></th>
|
||||
<th data-column="##">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="searchTr">
|
||||
<td></td>
|
||||
<td><input data-code="productCode" th:value="${key.contains('productCode')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="name" th:value="${key.contains('name')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="areaAccount" th:value="${key.contains('areaAccount')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="unitAccount" th:value="${key.contains('unitAccount')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="siteAccount" th:value="${key.contains('siteAccount')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="lineAccount" th:value="${key.contains('lineAccount')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="codeType" placeholder="搜索"/></td>
|
||||
<td><input data-code="shortDescription" placeholder="搜索"/></td>
|
||||
<td><input data-code="longDescription" th:value="${key.contains('longDescription')?value:''}" placeholder="搜索"/></td>
|
||||
<td><input data-code="gWeight" placeholder="搜索"/></td>
|
||||
<td><input data-code="totalWeight" placeholder="搜索"/></td>
|
||||
<td></td>
|
||||
<td><input data-code="count" placeholder="搜索"/></td>
|
||||
<td></td>
|
||||
<td><input data-code="unit" placeholder="搜索"/></td>
|
||||
<td><input data-code="bigProductType" placeholder="搜索"/></td>
|
||||
<td><input data-code="bigProductDes" placeholder="搜索"/></td>
|
||||
<td><input data-code="smallProductType" placeholder="搜索"/></td>
|
||||
<td><input data-code="smallProductDes" placeholder="搜索"/></td>
|
||||
<td><input data-code="makeCode" placeholder="搜索"/></td>
|
||||
<td><input data-code="makeName" placeholder="搜索"/></td>
|
||||
<td><input data-code="diameterL" placeholder="搜索"/></td>
|
||||
<td><input data-code="diameterS" placeholder="搜索"/></td>
|
||||
<td><input data-code="wallThicknessL" placeholder="搜索"/></td>
|
||||
<td><input data-code="wallThicknessS" placeholder="搜索"/></td>
|
||||
<td><input data-code="size" placeholder="搜索"/></td>
|
||||
<td><input data-code="pressureLevel" placeholder="搜索"/></td>
|
||||
<td><input data-code="endFace" placeholder="搜索"/></td>
|
||||
<td><input data-code="material" placeholder="搜索"/></td>
|
||||
<td><input data-code="materialType" placeholder="搜索"/></td>
|
||||
<td><input data-code="insulationCode" placeholder="搜索"/></td>
|
||||
<td><input data-code="specialRequest" placeholder="搜索"/></td>
|
||||
<td><input data-code="memo" placeholder="搜索"/></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><input data-code="supplierName" placeholder="搜索"/></td>
|
||||
<td><input data-code="price" placeholder="搜索"/></td>
|
||||
<th:block th:each="data : ${session.eField.list('materialOrderItem')}">
|
||||
<td><input th:data-code="${data.fieldName}" placeholder="搜索"/></td>
|
||||
</th:block>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!-- <tr class="dataTr" th:each="item, status : ${materialOrder.materialOrderItemList}">-->
|
||||
<!-- <td data-code="id" th:text="${status.index + 1}"></td>-->
|
||||
<!-- <td data-code="productCode"-->
|
||||
<!-- th:class="|${(showDifferent && item.productCode!=map.get(item.ind).productCode)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.productCode}"></td>-->
|
||||
<!-- <td data-code="name"-->
|
||||
<!-- th:class="|${(showDifferent && item.name!=map.get(item.ind).name)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.name}"></td>-->
|
||||
<!-- <td data-code="areaAccount"-->
|
||||
<!-- th:class="|${(showDifferent && item.areaAccount!=map.get(item.ind).areaAccount)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.areaAccount}"></td>-->
|
||||
<!-- <td data-code="unitAccount"-->
|
||||
<!-- th:class="|${(showDifferent && item.unitAccount!=map.get(item.ind).unitAccount)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.unitAccount}"></td>-->
|
||||
<!-- <td data-code="siteAccount"-->
|
||||
<!-- th:class="|${(showDifferent && item.siteAccount!=map.get(item.ind).siteAccount)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.siteAccount}"></td>-->
|
||||
<!-- <td data-code="lineAccount"-->
|
||||
<!-- th:class="|${(showDifferent && item.lineAccount!=map.get(item.ind).lineAccount)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.lineAccount}"></td>-->
|
||||
<!-- <td data-code="codeType"-->
|
||||
<!-- th:class="|${(showDifferent && item.codeType!=map.get(item.ind).codeType)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.codeType}"></td>-->
|
||||
<!-- <td data-code="shortDescription"-->
|
||||
<!-- th:class="|${(showDifferent && item.shortDescription!=map.get(item.ind).shortDescription)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.shortDescription}"></td>-->
|
||||
<!-- <td data-code="longDescription"-->
|
||||
<!-- th:class="|${(showDifferent && item.longDescription!=map.get(item.ind).longDescription)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.longDescription}"></td>-->
|
||||
<!-- <td data-code="gWeight"-->
|
||||
<!-- th:class="|${(showDifferent && item.gWeight!=map.get(item.ind).gWeight)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.gWeight==null?'':item.gWeight.stripTrailingZeros().toPlainString()}"></td>-->
|
||||
<!-- <td data-code="totalWeight"-->
|
||||
<!-- th:class="|${(showDifferent && (item.gWeight * item.count).setScale(2, 4)!=(map.get(item.ind).gWeight * map.get(item.ind).count).setScale(2, 4))?'different':'normal'}|"-->
|
||||
<!-- th:text="${(item.gWeight * item.count).setScale(2, 4)?.stripTrailingZeros().toPlainString()}"></td>-->
|
||||
<!-- <td data-code="count"-->
|
||||
<!-- th:class="|${(showDifferent && item.count!=map.get(item.ind).count)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.count?.stripTrailingZeros().toPlainString()}"></td>-->
|
||||
<!-- <td data-code="unit"-->
|
||||
<!-- th:class="|${(showDifferent && item.unit!=map.get(item.ind).unit)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.unit}"></td>-->
|
||||
<!-- <!– <td><input data-input="versionNum" th:value="${item.versionNum}" type="text" ></td>–>-->
|
||||
<!-- <td data-code="bigProductType"-->
|
||||
<!-- th:class="|${(showDifferent && item.bigProductType!=map.get(item.ind).bigProductType)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.bigProductType}"></td>-->
|
||||
<!-- <td data-code="bigProductDes"-->
|
||||
<!-- th:class="|${(showDifferent && item.bigProductDes!=map.get(item.ind).bigProductDes)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.bigProductDes}"></td>-->
|
||||
<!-- <td data-code="smallProductType"-->
|
||||
<!-- th:class="|${(showDifferent && item.smallProductType!=map.get(item.ind).smallProductType)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.smallProductType}"></td>-->
|
||||
<!-- <td data-code="smallProductDes"-->
|
||||
<!-- th:class="|${(showDifferent && item.smallProductDes!=map.get(item.ind).smallProductDes)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.smallProductDes}"></td>-->
|
||||
|
||||
<!-- <td data-code="makeCode"-->
|
||||
<!-- th:class="|${(showDifferent && item.makeCode!=map.get(item.ind).makeCode)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.makeCode}"></td>-->
|
||||
<!-- <td data-code="makeName"-->
|
||||
<!-- th:class="|${(showDifferent && item.makeName!=map.get(item.ind).makeName)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.makeName}"></td>-->
|
||||
<!-- <td data-code="diameterL"-->
|
||||
<!-- th:class="|${(showDifferent && item.diameterL!=map.get(item.ind).diameterL)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.diameterL==null?'':item.diameterL.stripTrailingZeros().toPlainString()}"></td>-->
|
||||
<!-- <td data-code="diameterS"-->
|
||||
<!-- th:class="|${(showDifferent && item.diameterS!=map.get(item.ind).diameterS)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.diameterS==null?'':item.diameterS.stripTrailingZeros().toPlainString()}"></td>-->
|
||||
<!-- <td data-code="wallThicknessL"-->
|
||||
<!-- th:class="|${(showDifferent && item.wallThicknessL!=map.get(item.ind).wallThicknessL)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.wallThicknessL}"></td>-->
|
||||
<!-- <td data-code="wallThicknessS"-->
|
||||
<!-- th:class="|${(showDifferent && item.wallThicknessS!=map.get(item.ind).wallThicknessS)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.wallThicknessS}"></td>-->
|
||||
<!-- <td data-code="size"-->
|
||||
<!-- th:class="|${(showDifferent && item.size!=map.get(item.ind).size)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.size}"></td>-->
|
||||
<!-- <td data-code="pressureLevel"-->
|
||||
<!-- th:class="|${(showDifferent && item.pressureLevel!=map.get(item.ind).pressureLevel)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.pressureLevel}"></td>-->
|
||||
<!-- <td data-code="endFace"-->
|
||||
<!-- th:class="|${(showDifferent && item.endFace!=map.get(item.ind).endFace)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.endFace}"></td>-->
|
||||
<!-- <td data-code="material"-->
|
||||
<!-- th:class="|${(showDifferent && item.material!=map.get(item.ind).material)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.material}"></td>-->
|
||||
<!-- <td data-code="materialType"-->
|
||||
<!-- th:class="|${(showDifferent && item.materialType!=map.get(item.ind).materialType)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.materialType}"></td>-->
|
||||
<!-- <td data-code="insulationCode"-->
|
||||
<!-- th:class="|${(showDifferent && item.insulationCode!=map.get(item.ind).insulationCode)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.insulationCode}"></td>-->
|
||||
<!-- <td data-code="specialRequest"-->
|
||||
<!-- th:class="|${(showDifferent && item.specialRequest!=map.get(item.ind).specialRequest)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.specialRequest}"></td>-->
|
||||
<!-- <td data-code="memo"-->
|
||||
<!-- th:class="|${(showDifferent && item.memo!=map.get(item.ind).memo)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.memo}"></td>-->
|
||||
<!-- <td th:text="${item.supplierNameList}"></td>-->
|
||||
<!-- <td th:data-confirm-supplier="${item.confirmSuppliers == null || !item.confirmSuppliers ? item.id : -1}" th:text="${item.confirmSuppliers != null && item.confirmSuppliers ? '是' : '否'}"></td>-->
|
||||
<!-- <td data-code="supplierName"-->
|
||||
<!-- th:class="|${(showDifferent && item.supplierName!=map.get(item.ind).supplierName)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.supplierName}"></td>-->
|
||||
<!-- <td data-code="price"-->
|
||||
<!-- th:class="|${(showDifferent && item.price!=map.get(item.ind).price)?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.price}"></td>-->
|
||||
<!-- <!– <td th:each="data : ${session.eField.list('materialOrderItem')}">–>-->
|
||||
<!-- <!– <span style="height: 100%;width: 100%" th:class="|${(showDifferent && item.extraField(data.fieldName)!=map.get(item.ind).extraField(data.fieldName))?'different':'normal'}|" th:text="${item.extraField(data.fieldName)}"></span>–>-->
|
||||
<!-- <!– <input th:data-input="${data.fieldName}" th:value="${item.extraField(data.fieldName)}" type="text">–>-->
|
||||
<!-- <!– </td>–>-->
|
||||
<!-- <th:block th:each="data : ${session.eField.list('materialOrderItem')}">-->
|
||||
<!-- <td th:data-code="${item.extraField(data.fieldName)}"-->
|
||||
<!-- th:class="|${(showDifferent && item.extraField(data.fieldName)!=map.get(item.ind).extraField(data.fieldName))?'different':'normal'}|"-->
|
||||
<!-- th:text="${item.extraField(data.fieldName)}"></td>-->
|
||||
<!-- <!– <input th:data-input="${data.fieldName}" th:value="${item.extraField(data.fieldName)}" type="text">–>-->
|
||||
<!-- </th:block>-->
|
||||
<!-- <td>-->
|
||||
<!-- <a th:href="|javascript:Dialog.functionDialog(null, null, 'materialOrder/dialog/priceView.html?id=${item.id}');|">查看报价</a>-->
|
||||
<!-- <a th:href="|javascript:Dialog.functionDialog(null, null, 'materialOrder/dialog/changeSupplier.html?id=${item.id}');|">供应商列表</a>-->
|
||||
<!-- <a class="confirmSupplier" th:onclick="|confirmSupplier('${item.id}')|" th:if="${item.confirmSuppliers == null || !item.confirmSuppliers}">确认供应商</a>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="buttonWrp">
|
||||
<a style="border: none; cursor: initial;" href="#" class="btn"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var allShow = false
|
||||
|
||||
var $table = $(".tableWrap table");
|
||||
$table.complexAdd({
|
||||
entity: 'materialOrder'
|
||||
});
|
||||
var selectChange = $table.selectChange;
|
||||
|
||||
$("#versionNum").on("change", function () {
|
||||
var id = $("#id").val();
|
||||
var versionNum = $("#versionNum").val();
|
||||
var oldVersion = $("#oldVersion").val();
|
||||
if (oldVersion == null || oldVersion == "") {
|
||||
Nav.go("/admin/materialOrder/view.html?id=" + id + "&nowVersion=" + versionNum)
|
||||
} else {
|
||||
Nav.go("/admin/materialOrder/view.html?id=" + id + "&nowVersion=" + versionNum + "&oldVersion=" + oldVersion + "&showDifferent=true")
|
||||
}
|
||||
})
|
||||
|
||||
$("#oldVersion").on("change", function () {
|
||||
var id = $("#id").val();
|
||||
var versionNum = $("#versionNum").val();
|
||||
var oldVersion = $("#oldVersion").val();
|
||||
if (oldVersion == null || oldVersion == "") {
|
||||
Nav.go("/admin/materialOrder/view.html?id=" + id + "&nowVersion=" + versionNum)
|
||||
allShow = false;
|
||||
} else {
|
||||
Nav.go("/admin/materialOrder/view.html?id=" + id + "&nowVersion=" + versionNum + "&oldVersion=" + oldVersion + "&showDifferent=true")
|
||||
allShow = false;
|
||||
}
|
||||
})
|
||||
|
||||
// loadShow()
|
||||
|
||||
function loadShow() {
|
||||
$(".dataTr").each(function () {
|
||||
$(this).removeClass("noShow")
|
||||
})
|
||||
$(".searchTr").find("input").each(function () {
|
||||
var className = $(this).attr("data-code");
|
||||
var searchValue = $(this).val();
|
||||
if (searchValue != "") {
|
||||
var str = "[data-code=" + className + "]";
|
||||
$(".dataTr").find(str).each(function () {
|
||||
var val = $(this).text();
|
||||
if (className.indexOf('diameter') != -1){
|
||||
if (searchValue.indexOf("-") != -1){
|
||||
var low = searchValue.split("-")[0];
|
||||
var height = searchValue.split("-")[1];
|
||||
if (Number(val)<Number(low) || Number(val)>Number(height)){
|
||||
$(this).parents("tr").addClass("noShow");
|
||||
}
|
||||
}else {
|
||||
if (Number(val) != Number(searchValue)) {
|
||||
$(this).parents("tr").addClass("noShow");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (val.indexOf(searchValue) == -1) {
|
||||
$(this).parents("tr").addClass("noShow");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
setHeader()
|
||||
$(".tableWrap").scroll()
|
||||
}
|
||||
|
||||
$(".searchTr input").on("change", function () {
|
||||
loadShow()
|
||||
})
|
||||
|
||||
function exportView(id) {
|
||||
var url = "materialOrder/printView.html?id=" + id;
|
||||
var name = "";
|
||||
var value = "";
|
||||
var $inputItems = $(".searchTr").find('input');
|
||||
$inputItems.each(function () {
|
||||
name = $(this).attr("data-code");
|
||||
value = $(this).val();
|
||||
url = url + "&" + name + "=" + value;
|
||||
});
|
||||
|
||||
window.open(url)
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
var canLoad = true;
|
||||
// 每页显示的条数
|
||||
var everyPageNum = 20;
|
||||
// 当前的页数
|
||||
var current_Num = 1;
|
||||
$(".tableWrap").scroll(function () {
|
||||
/*滚动事件*/
|
||||
var scrollTop = $(this).scrollTop();
|
||||
var scrollHeight = $("#addTable").height();
|
||||
var windowHeight = $(this).height();
|
||||
if (scrollHeight < scrollTop + windowHeight) { //最底部
|
||||
current_Num += 1;
|
||||
//获取该页显示的起始范围和结束范围
|
||||
var start = everyPageNum * (current_Num - 1);
|
||||
var end = everyPageNum * current_Num;
|
||||
// 判断在start和end中间的显示,其余隐藏
|
||||
// $("#addTable tr").hide();
|
||||
for (var i = start; i < end; i++) {
|
||||
if(!allShow && canLoad){
|
||||
canLoad = false;
|
||||
loadItem()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var $tbody = $("#tableView tbody");
|
||||
var itemSize = 0
|
||||
|
||||
var adminPurchaseList = "[[${adminPurchaseList}]]"
|
||||
console.log(adminPurchaseList)
|
||||
|
||||
var tableFieldList = ['productCode', 'name', 'areaAccount', 'unitAccount', 'siteAccount', 'lineAccount', 'codeType',
|
||||
'shortDescription', 'longDescription', 'gWeight', 'totalWeight','needCount', 'count','useStockCount', 'unit', 'bigProductType',
|
||||
'bigProductDes', 'smallProductType', 'smallProductDes', 'makeCode', 'makeName', 'diameterL', 'diameterS',
|
||||
'wallThicknessL', 'wallThicknessS', 'size', 'pressureLevel', 'endFace', 'material', 'materialType',
|
||||
'insulationCode', 'specialRequest', 'memo', 'supplierNameList', 'confirmSuppliers', 'supplierName', 'price']
|
||||
function loadItem() {
|
||||
var thisName
|
||||
var thisValue
|
||||
var data = {};
|
||||
data["id"]=$("#id").val();
|
||||
data["nowVersion"]=$("#versionNum").val();
|
||||
data["oldVersion"]=$("#oldVersion").val();
|
||||
data["nowSize"]=itemSize;
|
||||
var $inputItems = $(".searchTr").find('input');
|
||||
$inputItems.each(function () {
|
||||
thisName = $(this).attr("data-code");
|
||||
thisValue = $(this).val();
|
||||
data[thisName]=thisValue;
|
||||
});
|
||||
$.ajax({
|
||||
url: 'materialOrder/loadDiffItem',
|
||||
dataType: 'json',
|
||||
data:data,
|
||||
// data: {
|
||||
// id: $("#id").val(),
|
||||
// nowVersion: $("#versionNum").val(),
|
||||
// oldVersion: $("#oldVersion").val(),
|
||||
// size: itemSize,
|
||||
// },
|
||||
success: function (res) {
|
||||
if (res.data.list.length<1){
|
||||
allShow = true;
|
||||
return;
|
||||
}
|
||||
loadFlag = false;
|
||||
var map = res.data.diffMap;
|
||||
var htmlAll = "";
|
||||
if (res.data.showDiff){
|
||||
res.data.list.forEach(function (item) {
|
||||
if(adminPurchaseList.indexOf(item.bigProductTypeId) > -1 || adminPurchaseList.indexOf(item.smallTypeId)>-1){
|
||||
let recDiff = map[item.id] != null;
|
||||
let recDiffStatus = recDiff ? map[item.id].diffStatus : null;
|
||||
let recDiffUpdate = recDiffStatus === 'Update';
|
||||
var html = "<tr class='dataTr " + (item.noShow ? 'noShow' : '') + " " + (recDiff ? 'different-'+recDiffStatus : '') + "'data-id='"+item.id+"'><td>" + (Number(itemSize) + 1) + "</td>\n";
|
||||
for (var field of tableFieldList) {
|
||||
if (field.name === 'supplierNameList') {
|
||||
html += "<td>" + (item.supplierNameList == null ? '' : item.supplierNameList) + "</td>\n"
|
||||
} else if (field.name === 'confirmSuppliers') {
|
||||
html += "<td data-confirm-supplier=" + ((item.confirmSuppliers == null || !item.confirmSuppliers ? item.id : -1)) + "> " + ((item.confirmSuppliers != null && item.confirmSuppliers) ? '是' : '否') + "</td>\n"
|
||||
} else {
|
||||
let fieldUpdate = recDiffUpdate && map[item.id][field.name] != null;
|
||||
let fieldUpdateOldVal = fieldUpdate ? map[item.id][field.name] : '';
|
||||
html += "<td data-code='" + field.name + "'\n" +
|
||||
// " class='" + ((item[field.name] != map[item.ind][field.name]) ? 'different' : 'normal') + "'\n" +
|
||||
" class='" + (fieldUpdate ? 'different' : (!recDiff ? 'normal' : '')) + "'\n" +
|
||||
" >" + (item[field.name] !== null ? item[field.name] : '') + (fieldUpdate ? fieldUpdateOldVal : '') + "</td>\n"
|
||||
}
|
||||
}
|
||||
html = html +
|
||||
" <td class='fixed'>\n" +
|
||||
" <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/priceView.html?id="+item.id+"\");'>查看报价</a>\n" ;
|
||||
|
||||
html = html+" "+
|
||||
" </td></tr>"
|
||||
|
||||
htmlAll += html;
|
||||
}
|
||||
itemSize++;
|
||||
})
|
||||
$tbody.append(htmlAll)
|
||||
}else {
|
||||
res.data.list.forEach(function (item) {
|
||||
if(adminPurchaseList.indexOf(item.bigProductTypeId) > -1 || adminPurchaseList.indexOf(item.smallTypeId)>-1) {
|
||||
var html = "<tr class='dataTr " + (item.noShow ? 'noShow' : '') + "' data-id='"+item.id+"'><td>" + (Number(itemSize) + 1) + "</td>\n";
|
||||
for (var field of tableFieldList) {
|
||||
if (field.name === 'supplierNameList') {
|
||||
html += "<td>" + (item.supplierNameList == null ? '' : item.supplierNameList) + "</td>\n"
|
||||
} else if (field.name === 'confirmSuppliers') {
|
||||
html += "<td data-confirm-supplier=" + ((item.confirmSuppliers == null || !item.confirmSuppliers) ? item.id : -1) + ">" + ((item.confirmSuppliers != null && item.confirmSuppliers) ? '是' : '否') + "</td>\n"
|
||||
} else {
|
||||
html += "<td data-code='" + field.name + "'\n" +
|
||||
" class='normal'\n" +
|
||||
" >" + (item[field.name] !== null ? item[field.name] : '') + "</td>\n"
|
||||
}
|
||||
}
|
||||
html = html +
|
||||
" <td class='fixed'>\n" +
|
||||
" <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/priceView.html?id="+item.id+"\");'>查看报价</a>\n" ;
|
||||
html = html+" "+
|
||||
" </td></tr>"
|
||||
htmlAll += html;
|
||||
|
||||
}
|
||||
itemSize++;
|
||||
|
||||
})
|
||||
$tbody.append(htmlAll)
|
||||
}
|
||||
setHeader()
|
||||
canLoad = true;
|
||||
if (!res.data.loadFlag){
|
||||
allShow = true;
|
||||
Dialog.success("已全部显示")
|
||||
}else {
|
||||
loadItem()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
// 确认供应商列表
|
||||
function confirmSupplier(id) {
|
||||
doConfirmSupplier(id)
|
||||
}
|
||||
function batchConfirmSupplier(dom) {
|
||||
var id = "";
|
||||
$(dom).closest('tbody').find('td[data-confirm-supplier][data-confirm-supplier!="-1"]').each(function (index, item) {
|
||||
let val = $(item).attr('data-confirm-supplier');
|
||||
if (val != null && val !== "" && val !== "null" && val !== "undefined") {
|
||||
id += ((id !== "" ? ',' : '') + val);
|
||||
}
|
||||
});
|
||||
doConfirmSupplier(id, true)
|
||||
}
|
||||
function doConfirmSupplier(id, batch) {
|
||||
if (id == null || id === "") {
|
||||
return;
|
||||
}
|
||||
Dialog.confirm("是否确认?", function () {
|
||||
$.ajax({
|
||||
url: batch ? 'materialOrder/batchConfirmSupplierList.html' : 'materialOrder/confirmSupplierList.html',
|
||||
dataType: 'json',
|
||||
type:"post",
|
||||
data: {
|
||||
ids: id,
|
||||
id:'[[${materialOrder.id}]]'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.errorCode === '0') {
|
||||
Dialog.success('操作成功');
|
||||
Nav.refresh();
|
||||
} else {
|
||||
Dialog.error(res.errorInfo);
|
||||
}
|
||||
}
|
||||
})
|
||||
}, function () {
|
||||
});
|
||||
}
|
||||
|
||||
var $tableHeaderWrapper = $("#tableHeaderWrapper");
|
||||
var $tableHeader = $("#tableHeader");
|
||||
var $addTable = $("#addTable");
|
||||
|
||||
function setHeader(init) {
|
||||
$tableHeader.html("");
|
||||
$addTable.find("thead > tr > th").each(function () {
|
||||
var $that = $(this);
|
||||
if ($that.css('display') !== 'none') {
|
||||
var width = $that.css('width');
|
||||
$tableHeader.append('<div class="item" style="width: ' + width + ';">' + $(this).html() + '</div>')
|
||||
}
|
||||
})
|
||||
$tableHeader.css('width', $addTable.width() + 10 + 'px')
|
||||
if (init) {
|
||||
$tableHeaderWrapper.css({
|
||||
top: $addTable.offset().top + 'px',
|
||||
left: $addTable.offset().left + 'px',
|
||||
width: $(".tableWrap").width() + 'px'
|
||||
})
|
||||
$tableHeader.attr('data-left', $addTable.offset().left)
|
||||
}
|
||||
setTimeout(function () {
|
||||
$tableHeaderWrapper.show()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
$addTable.on('loadComplete', function () {
|
||||
$addTable.find("thead > tr > th").each(function () {
|
||||
var $that = $(this);
|
||||
var dataSourceIndex = $that.attr('data-source-index');
|
||||
if (dataSourceIndex) {
|
||||
tableFieldList[dataSourceIndex] = {
|
||||
name: tableFieldList[dataSourceIndex],
|
||||
index: $that.attr('data-index'),
|
||||
show: $that.css('display') !== 'none'
|
||||
}
|
||||
}
|
||||
})
|
||||
tableFieldList.sort(function (a, b) {
|
||||
return parseInt(a.index) - parseInt(b.index)
|
||||
})
|
||||
setHeader(true)
|
||||
loadItem();
|
||||
})
|
||||
|
||||
$(".appBody").scroll(function () {
|
||||
$tableHeaderWrapper.css({
|
||||
top: $(".tableWrap").offset().top + 'px',
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user