项目管理列表展示
parent
4052497f21
commit
90067b5e5b
|
@ -0,0 +1,38 @@
|
|||
package cn.palmte.work.controller.backend;
|
||||
|
||||
import cn.palmte.work.model.DeptRepository;
|
||||
import cn.palmte.work.service.ProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 项目管理功能
|
||||
* @author xiongshiyan at 2021/10/29 , contact me with email yanshixiong@126.com or phone 15208384257
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/project")
|
||||
public class ProjectController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
@Autowired
|
||||
private DeptRepository deptRepository;
|
||||
|
||||
@RequestMapping("/list")
|
||||
public String list(@RequestParam(value = "keywords",required = false) String keywords,
|
||||
@RequestParam(value = PAGE_NUMBER, defaultValue = DEFAULT_PAGE_NUMBER) int pageNumber,
|
||||
@RequestParam(value = PAGE_SIZE, defaultValue = DEFAULT_PAGE_SIZE) int pageSize,
|
||||
Map<String, Object> model) {
|
||||
//当前登录人的角色类型
|
||||
model.put("keywords",keywords);
|
||||
model.put("deptList", deptRepository.findAll());
|
||||
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords,model);
|
||||
model.put("pager",projectService.list(searchInfo,pageNumber,pageSize));
|
||||
return "admin/project_list";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package cn.palmte.work.model;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "dept")
|
||||
public class Dept {
|
||||
public static final int FAILED = 1;
|
||||
public static final int SUCCESS = 0;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package cn.palmte.work.model;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface DeptRepository extends JpaRepository<Dept,Integer> {
|
||||
}
|
|
@ -0,0 +1,358 @@
|
|||
package cn.palmte.work.model;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 项目实体
|
||||
* @author xiongshiyan at 2021/10/29 , contact me with email yanshixiong@126.com or phone 15208384257
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "project")
|
||||
public class Project {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
||||
private int id;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 项目类型:1工程集成类、2设备集成类、3战略合作类
|
||||
*/
|
||||
private int type;
|
||||
@Column(name = "type_desc")
|
||||
private String typeDesc;
|
||||
/**
|
||||
* 项目状态:0草稿,1项目创建,5概算完成,10预算完成,15结算中,20决算完成
|
||||
*/
|
||||
private int status;
|
||||
@Column(name = "status_desc")
|
||||
private String statusDesc;
|
||||
/**
|
||||
* 审核状态:0待审核,1审核通过,2审核不通过
|
||||
*/
|
||||
@Column(name = "approve_status")
|
||||
private int approveStatus;
|
||||
@Column(name = "approveStatus_desc")
|
||||
private String approveStatusDesc;
|
||||
/**
|
||||
* 审核人id
|
||||
*/
|
||||
@Column(name = "approve_id")
|
||||
private Integer approveId;
|
||||
@Column(name = "approve_name")
|
||||
private String approveName;
|
||||
/**
|
||||
* 项目创建者id
|
||||
*/
|
||||
@Column(name = "creator_id")
|
||||
private int creatorId;
|
||||
@Column(name = "creator_name")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 项目部门id
|
||||
*/
|
||||
@Column(name = "dept_id")
|
||||
private int deptId;
|
||||
@Column(name = "dept_name")
|
||||
private String deptName;
|
||||
/**
|
||||
* 项目开始时间,精确到月
|
||||
*/
|
||||
@Column(name = "start_date")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date startDate;
|
||||
/**
|
||||
* 项目结束时间,精确到月
|
||||
*/
|
||||
@Column(name = "end_date")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date endDate;
|
||||
/**
|
||||
* 垫资模式:1A类-不垫资(战略合作),2B类-不垫资(背靠背),3C类-垫资(账期覆盖),4D类-垫资(账期不覆盖)
|
||||
*/
|
||||
@Column(name = "underwritten_mode")
|
||||
private int underwrittenMode;
|
||||
@Transient
|
||||
private String underwrittenModeDesc;
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
@Column(name = "customer")
|
||||
private String customer;
|
||||
/**
|
||||
* 终端客户名称
|
||||
*/
|
||||
@Column(name = "terminal_customer")
|
||||
private String terminalCustomer;
|
||||
/**
|
||||
* 垫资利息(元为单位)
|
||||
*/
|
||||
@Column(name = "advance_interest_amount")
|
||||
private BigDecimal advanceInterestAmount;
|
||||
/**
|
||||
* 垫资峰值
|
||||
*/
|
||||
@Column(name = "advance_peak_amount")
|
||||
private BigDecimal advancePeakAmount;
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@Column(name = "contract_amount")
|
||||
private BigDecimal contractAmount;
|
||||
/**
|
||||
* 行业场景应用
|
||||
*/
|
||||
@Column(name = "industry_scenario")
|
||||
private String industryScenario;
|
||||
/**
|
||||
*华智产品金额
|
||||
*/
|
||||
@Column(name = "huazhi_product_amount")
|
||||
private BigDecimal huazhiProductAmount;
|
||||
/**
|
||||
*紫光其他产品金额
|
||||
*/
|
||||
@Column(name = "ziguang_other_amount")
|
||||
private BigDecimal ziguangOtherAmount;
|
||||
/**
|
||||
* 主合同收款条款
|
||||
*/
|
||||
@Column(name = "main_contract_collection_terms")
|
||||
private String mainContractCollectionTerms;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createTime;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public void setTypeDesc(String typeDesc) {
|
||||
this.typeDesc = typeDesc;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatusDesc() {
|
||||
return statusDesc;
|
||||
}
|
||||
|
||||
public void setStatusDesc(String statusDesc) {
|
||||
this.statusDesc = statusDesc;
|
||||
}
|
||||
|
||||
public int getApproveStatus() {
|
||||
return approveStatus;
|
||||
}
|
||||
|
||||
public void setApproveStatus(int approveStatus) {
|
||||
this.approveStatus = approveStatus;
|
||||
}
|
||||
|
||||
public String getApproveStatusDesc() {
|
||||
return approveStatusDesc;
|
||||
}
|
||||
|
||||
public void setApproveStatusDesc(String approveStatusDesc) {
|
||||
this.approveStatusDesc = approveStatusDesc;
|
||||
}
|
||||
|
||||
public Integer getApproveId() {
|
||||
return approveId;
|
||||
}
|
||||
|
||||
public void setApproveId(Integer approveId) {
|
||||
this.approveId = approveId;
|
||||
}
|
||||
|
||||
public String getApproveName() {
|
||||
return approveName;
|
||||
}
|
||||
|
||||
public void setApproveName(String approveName) {
|
||||
this.approveName = approveName;
|
||||
}
|
||||
|
||||
public int getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(int creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public int getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(int deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Date getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(Date startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public int getUnderwrittenMode() {
|
||||
return underwrittenMode;
|
||||
}
|
||||
|
||||
public void setUnderwrittenMode(int underwrittenMode) {
|
||||
this.underwrittenMode = underwrittenMode;
|
||||
}
|
||||
|
||||
public String getUnderwrittenModeDesc() {
|
||||
return underwrittenModeDesc;
|
||||
}
|
||||
|
||||
public void setUnderwrittenModeDesc(String underwrittenModeDesc) {
|
||||
this.underwrittenModeDesc = underwrittenModeDesc;
|
||||
}
|
||||
|
||||
public String getCustomer() {
|
||||
return customer;
|
||||
}
|
||||
|
||||
public void setCustomer(String customer) {
|
||||
this.customer = customer;
|
||||
}
|
||||
|
||||
public String getTerminalCustomer() {
|
||||
return terminalCustomer;
|
||||
}
|
||||
|
||||
public void setTerminalCustomer(String terminalCustomer) {
|
||||
this.terminalCustomer = terminalCustomer;
|
||||
}
|
||||
|
||||
public BigDecimal getAdvanceInterestAmount() {
|
||||
return advanceInterestAmount;
|
||||
}
|
||||
|
||||
public void setAdvanceInterestAmount(BigDecimal advanceInterestAmount) {
|
||||
this.advanceInterestAmount = advanceInterestAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getAdvancePeakAmount() {
|
||||
return advancePeakAmount;
|
||||
}
|
||||
|
||||
public void setAdvancePeakAmount(BigDecimal advancePeakAmount) {
|
||||
this.advancePeakAmount = advancePeakAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getContractAmount() {
|
||||
return contractAmount;
|
||||
}
|
||||
|
||||
public void setContractAmount(BigDecimal contractAmount) {
|
||||
this.contractAmount = contractAmount;
|
||||
}
|
||||
|
||||
public String getIndustryScenario() {
|
||||
return industryScenario;
|
||||
}
|
||||
|
||||
public void setIndustryScenario(String industryScenario) {
|
||||
this.industryScenario = industryScenario;
|
||||
}
|
||||
|
||||
public BigDecimal getHuazhiProductAmount() {
|
||||
return huazhiProductAmount;
|
||||
}
|
||||
|
||||
public void setHuazhiProductAmount(BigDecimal huazhiProductAmount) {
|
||||
this.huazhiProductAmount = huazhiProductAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getZiguangOtherAmount() {
|
||||
return ziguangOtherAmount;
|
||||
}
|
||||
|
||||
public void setZiguangOtherAmount(BigDecimal ziguangOtherAmount) {
|
||||
this.ziguangOtherAmount = ziguangOtherAmount;
|
||||
}
|
||||
|
||||
public String getMainContractCollectionTerms() {
|
||||
return mainContractCollectionTerms;
|
||||
}
|
||||
|
||||
public void setMainContractCollectionTerms(String mainContractCollectionTerms) {
|
||||
this.mainContractCollectionTerms = mainContractCollectionTerms;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package cn.palmte.work.model;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface ProjectRepository extends JpaRepository<Project,Integer> {
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package cn.palmte.work.service;
|
||||
|
||||
import cn.palmte.work.model.Project;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import top.jfunc.common.db.QueryHelper;
|
||||
import top.jfunc.common.db.bean.Page;
|
||||
import top.jfunc.common.db.utils.Pagination;
|
||||
import top.jfunc.common.utils.StrUtil;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xiongshiyan at 2021/10/29 , contact me with email yanshixiong@126.com or phone 15208384257
|
||||
*/
|
||||
@Service
|
||||
public class ProjectService {
|
||||
@Autowired
|
||||
private Pagination pagination;
|
||||
|
||||
|
||||
private QueryHelper getQueryHelper(Map<String, String> searchInfo, int pageNumber, int pageSize) {
|
||||
/*"CASE p.type WHEN 1 THEN '工程集成类' WHEN 2 THEN '设备集成类' WHEN 3 THEN '战略合作类' ELSE '未知' AS typeDesc," +
|
||||
"CASE p.status WHEN 0 THEN '草稿' WHEN 1 THEN '项目创建' WHEN 5 THEN '概算完成' WHEN 10 THEN '预算完成' WHEN 15 THEN '结算中' WHEN 20 THEN '决算完成' ELSE '未知' AS statusDesc," +
|
||||
"CASE p.approve_status WHEN 0 THEN '待审核' WHEN 1 THEN '审核通过' WHEN 2 THEN '审核不通过' ELSE '未知' AS approveStatusDesc," +
|
||||
*/
|
||||
QueryHelper queryHelper = new QueryHelper("SELECT p.*","project","p");
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("status")) && "-1".equals(searchInfo.get("status"))){
|
||||
queryHelper.addCondition("p.status=?", searchInfo.get("status"));
|
||||
}
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("approveStatus")) && "-1".equals(searchInfo.get("approveStatus"))){
|
||||
queryHelper.addCondition("p.approve_status=?", searchInfo.get("approveStatus"));
|
||||
}
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("deptId")) && "-1".equals(searchInfo.get("deptId"))){
|
||||
queryHelper.addCondition("p.dept_id=?", searchInfo.get("deptId"));
|
||||
}
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("type")) && "-1".equals(searchInfo.get("type"))){
|
||||
queryHelper.addCondition("p.type=?", searchInfo.get("type"));
|
||||
}
|
||||
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("name")),"p.name LIKE ?", "%"+searchInfo.get("name")+"%");
|
||||
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("creatorName")),"p.creator_name LIKE ?", "%"+searchInfo.get("creatorName")+"%");
|
||||
|
||||
/**
|
||||
* 只选择了一个时间的情况,就项目时间包括这个时间的
|
||||
*/
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("startTime")) && StrUtil.isEmpty(searchInfo.get("endTime"))){
|
||||
queryHelper.addCondition("p.start_date<=? AND p.end_date>?",searchInfo.get("startTime"), searchInfo.get("startTime"));
|
||||
}
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("endTime")) && StrUtil.isEmpty(searchInfo.get("startTime"))){
|
||||
queryHelper.addCondition("p.start_date<=? AND p.end_date>?",searchInfo.get("endTime"), searchInfo.get("endTime"));
|
||||
}
|
||||
/**
|
||||
* 两个时间都选了,则包含项目时间
|
||||
*/
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("startTime")) && StrUtil.isNotEmpty(searchInfo.get("endTime"))){
|
||||
queryHelper.addCondition("p.start_date>=? AND p.end_date<?",searchInfo.get("endTime"), searchInfo.get("endTime"));
|
||||
}
|
||||
|
||||
return queryHelper;
|
||||
}
|
||||
|
||||
public Page<Project> list(Map<String, String> searchInfo, int pageNumber, int pageSize){
|
||||
QueryHelper queryHelper = getQueryHelper(searchInfo, pageNumber, pageSize);
|
||||
return pagination.paginate(queryHelper.getSql(), Project.class,pageNumber,pageSize);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,229 @@
|
|||
<#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="status" name="status">
|
||||
<option value="-1">全部</option>
|
||||
<option value="0">草稿</option>
|
||||
<option value="1">项目创建</option>
|
||||
<option value="5">概算完成</option>
|
||||
<option value="10">预算完成</option>
|
||||
<option value="15">结算中</option>
|
||||
<option value="20">决算完成</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<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="0">待审核</option>
|
||||
<option value="1">审核通过</option>
|
||||
<option value="2">审核不通过</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<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">工程集成类</option>
|
||||
<option value="2">设备集成类</option>
|
||||
<option value="3">战略合作类</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div align='right'>
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
|
||||
id="submit-btn">搜索
|
||||
</button>
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
|
||||
id="submit-btn-export">导出
|
||||
</button>
|
||||
</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.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?datetime}-${list.endDate?datetime}</td>
|
||||
<td>
|
||||
--
|
||||
</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 () {
|
||||
|
||||
var keywordsObj = {};
|
||||
$("#submit-btn").on("click", function () {
|
||||
$("#pageNumber").val(1);
|
||||
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);
|
||||
$("#listForm").submit();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue