279 lines
14 KiB
Plaintext
279 lines
14 KiB
Plaintext
<#assign base=request.contextPath />
|
|
<#import "../common/defaultLayout.ftl" as defaultLayout>
|
|
<@defaultLayout.layout>
|
|
<link rel="stylesheet" href="../assets/css/amazeui.switch.css"/>
|
|
<div class="admin-content">
|
|
<div class="am-cf am-padding" style="padding:1rem 1.6rem 1.6rem 1rem;margin:0px;">
|
|
<!-- padding:1px 2px 3px 4px;上、右、下,和左 -->
|
|
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目管理</strong> /
|
|
<small>项目管理</small>
|
|
</div>
|
|
</div>
|
|
<div class="am-g">
|
|
<div class="am-u-sm-12">
|
|
<form class="am-form" id="listForm" action="${base}/project/list" method="POST">
|
|
<input type="hidden" id="keywords" name="keywords" value='${keywords!""}'/>
|
|
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
|
|
<tbody>
|
|
<tr>
|
|
<th class="am-text-middle">项目名称</th>
|
|
<td>
|
|
<div class="am-u-sm-10">
|
|
<input type="text" id="name" class="am-form-field am-input-sm"
|
|
value="${name!}"/>
|
|
</div>
|
|
</td>
|
|
<th class="am-text-middle">项目创建者</th>
|
|
<td>
|
|
<div class="am-u-sm-10">
|
|
<input type="text" id="creatorName" class="am-form-field am-input-sm"
|
|
value="${creatorName!}"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="am-text-middle">项目类型</th>
|
|
<td>
|
|
<div class="am-u-sm-10">
|
|
<select data-am-selected id="type" name="type">
|
|
<option value="-1">全部</option>
|
|
<option value="1" <#if type?? && type='1'>selected</#if>>工程集成类</option>
|
|
<option value="2" <#if type?? && type='2'>selected</#if>>设备集成类</option>
|
|
<option value="3" <#if type?? && type='3'>selected</#if>>战略合作类</option>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
<th class="am-text-middle">部门名称</th>
|
|
<td>
|
|
<div class="am-u-sm-10">
|
|
<select data-am-selected id="deptId" name="deptId">
|
|
<option value="-1">全部</option>
|
|
<#list deptList as dept>
|
|
<option value=${dept.id!} <#if deptId! =="${dept.id}" >
|
|
selected
|
|
</#if>>${dept.name!}</option>
|
|
</#list>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="am-text-middle">项目状态</th>
|
|
<td>
|
|
<div class="am-u-sm-10">
|
|
<select data-am-selected id="status" name="status">
|
|
<option value="-1">全部</option>
|
|
<option value="1" <#if status?? && status='1'>selected</#if>>项目创建</option>
|
|
<option value="5" <#if status?? && status='5'>selected</#if>>概算完成</option>
|
|
<option value="10" <#if status?? && status='10'>selected</#if>>预算完成</option>
|
|
<option value="15" <#if status?? && status='15'>selected</#if>>结算中</option>
|
|
<option value="20" <#if status?? && status='20'>selected</#if>>决算完成</option>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
<th class="am-text-middle">审核状态</th>
|
|
<td>
|
|
<div class="am-u-sm-10">
|
|
<select data-am-selected id="approveStatus" name="approveStatus">
|
|
<option value="-1">全部</option>
|
|
<option value="0" <#if approveStatus?? && approveStatus='0'>selected</#if>>草稿</option>
|
|
<option value="1" <#if approveStatus?? && approveStatus='1'>selected</#if>>待审核</option>
|
|
<option value="2" <#if approveStatus?? && approveStatus='2'>selected</#if>>审核通过</option>
|
|
<option value="3" <#if approveStatus?? && approveStatus='3'>selected</#if>>审核不通过</option>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="am-text-middle">项目周期</th>
|
|
<td colspan="3">
|
|
<div class="am-u-sm-10">
|
|
<div class="am-form am-form-inline">
|
|
<div class="am-form-group am-form-icon">
|
|
<i class="am-icon-calendar"></i>
|
|
<input type="text" class="am-form-field am-input-sm" id="startDate"
|
|
value="${startDate!}" placeholder="开始日期" data-am-datepicker>
|
|
</div>
|
|
<div class="am-form-group">至</div>
|
|
<div class="am-form-group am-form-icon">
|
|
<i class="am-icon-calendar"></i>
|
|
<input type="text" class="am-form-field am-input-sm" id="endDate"
|
|
value="${endDate!}"
|
|
placeholder="结束日期" data-am-datepicker>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div align='right'>
|
|
<@shiro.hasPermission name="PROJECT_QUERY">
|
|
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
|
|
id="submit-btn">搜索
|
|
</button>
|
|
</@shiro.hasPermission>
|
|
<@shiro.hasPermission name="PROJECT_EXPORT">
|
|
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
|
|
id="submit-btn-export">导出
|
|
</button>
|
|
</@shiro.hasPermission>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<div class="am-u-sm-12 am-u-md-12" style="padding:0 1.6rem 1.6rem 1rem;margin:0;">
|
|
<div class="am-btn-toolbar" style="padding-left:.5rem;">
|
|
<div class="am-btn-group am-btn-group-xs">
|
|
<@shiro.hasPermission name="PROJECT_ADD">
|
|
<button type="button" class="am-btn am-btn-default"
|
|
onclick="location.href='${base}/project/add'">
|
|
<span class="am-icon-plus"></span> 新增
|
|
</button>
|
|
</@shiro.hasPermission>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="am-g">
|
|
<div class="am-u-sm-12">
|
|
<div class="am-scrollable-horizontal">
|
|
<table class="am-table am-table-striped am-table-hover table-main">
|
|
<thead>
|
|
<tr class="am-text-nowrap">
|
|
<th class="table-title">序号</th>
|
|
<th class="table-title">项目名称</th>
|
|
<th class="table-title">项目类型</th>
|
|
<th class="table-title">项目状态</th>
|
|
<th class="table-title">审核状态</th>
|
|
<th class="table-title">当前审核人</th>
|
|
<th class="table-title">项目创建者</th>
|
|
<th class="table-title">部门名称</th>
|
|
<th class="table-title">项目周期</th>
|
|
<th class="table-title">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<#list pager.list as list>
|
|
<tr>
|
|
<td>${list.id!}</td>
|
|
<td>${list.name!}</td>
|
|
<td>${list.typeDesc!}</td>
|
|
<td>${list.statusDesc!}</td>
|
|
<td>${list.approveStatusDesc!}</td>
|
|
<td>${list.approveName!}</td>
|
|
<td>${list.creatorName!}</td>
|
|
<td>${list.deptName!}</td>
|
|
<td>${list.startDate?string("yyyy-MM")} ~ ${list.endDate?string("yyyy-MM")}</td>
|
|
<td>
|
|
<div class="am-btn-toolbar">
|
|
<div class="am-btn-group am-btn-group-xs">
|
|
<@shiro.hasPermission name="PROJECT_EDIT">
|
|
<button type="button"
|
|
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
|
onclick="location.href='${base}/project/edit?id=${list.id}'"><span
|
|
class="am-icon-pencil-square-o"></span>编辑
|
|
</button>
|
|
</@shiro.hasPermission>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
</#list>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="am-cf">
|
|
<!-- 分页 -->
|
|
<#if (pager.list)?exists && (pager.list?size>0) >
|
|
<div class="am-fr">
|
|
<#include "../common/common_pager.ftl">
|
|
</div>
|
|
<#else>
|
|
<div class="am-kai" align="center">
|
|
<h3>没有找到任何记录!</h3>
|
|
</div>
|
|
</#if>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<footer class="admin-content-footer">
|
|
<hr>
|
|
</footer>
|
|
</div>
|
|
</@defaultLayout.layout>
|
|
<script src="../assets/js/amazeui.switch.js"></script>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
|
|
$("#submit-btn").on("click", function () {
|
|
$("#pageNumber").val(1);
|
|
setKeywords();
|
|
$("#listForm").attr("action","${base}/project/list");
|
|
$("#listForm").submit();
|
|
});
|
|
|
|
$("#submit-btn-export").on("click", function () {
|
|
setKeywords();
|
|
$("#listForm").attr("action","${base}/project/export");
|
|
$("#listForm").submit();
|
|
});
|
|
|
|
|
|
function setKeywords() {
|
|
var keywordsObj = {};
|
|
if ($("#name").val())
|
|
keywordsObj.name = $("#name").val();
|
|
if ($("#creatorName").val())
|
|
keywordsObj.creatorName = $("#creatorName").val();
|
|
if ($("#status").val())
|
|
keywordsObj.status = $("#status").val();
|
|
if ($("#approveStatus").val())
|
|
keywordsObj.approveStatus = $("#approveStatus").val();
|
|
if ($("#deptId").val())
|
|
keywordsObj.deptId = $("#deptId").val();
|
|
if ($("#type").val())
|
|
keywordsObj.type = $("#type").val();
|
|
if ($("#startDate").val())
|
|
keywordsObj.startDate = $("#startDate").val();
|
|
if ($("#endDate").val())
|
|
keywordsObj.endDate = $("#endDate").val();
|
|
var keywords = "";
|
|
if (!$.isEmptyObject(keywordsObj)) {
|
|
keywords = JSON.stringify(keywordsObj);
|
|
}
|
|
console.log("keywords = " + keywords);
|
|
|
|
$("#keywords").val(keywords);
|
|
}
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|