Commit 5b9f42ac by 罗绍泽

代办事项提交

parent 379db9a6
......@@ -354,4 +354,10 @@
}
.icon-ext-05_48 {
background:url('../../../../images/icons/(05,48).png') no-repeat left center;
}
.icon-ext-22_43 {
background:url('../../../../images/icons/(22,43).png') no-repeat left center;
}
.icon-ext-01_08 {
background:url('../../../../images/icons/(01,08).png') no-repeat left center;
}
\ No newline at end of file
......@@ -106,6 +106,8 @@ function dataOnLoadSuccess() {
//设置颜色和每行高度
function rowstyler(index, row) {
}
queryData=$.extend(queryData,$("#todoTab_searchForm").getFormVal());
//展示列表
datagrid("list", ls_title, gaowj.WEB_APP_NAME + "/todoData_list", queryData, is_column, 60, 80);
......@@ -183,6 +185,7 @@ function addRow() {
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row) {
$("#TYPE").val($("#FIELD_TYPE").val());
}
//保存
function insertData(is_entity) {
......
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="todoTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="todoTab_searchForm" style="float:left">
主题内容: <input class="easyui-textbox" id="FIELD_TITLE" name="FIELD_TITLE" style="width:200px"/>&nbsp;&nbsp;
角色: <input class="easyui-textbox" id="FIELD_ROLE" name="FIELD_ROLE" value="0" style="width:200px"/>&nbsp;&nbsp;
办理状态: <input class="easyui-textbox" id="FIELD_DO_STATE" name="FIELD_DO_STATE" value="all" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="userChoice" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/todo/js/todoModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/todo/js/todoTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<input type="hidden" name="FIELD_TYPE" id="TYPE" value="${is_row.TYPE}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr id="choice_user_tr">
<td style="width: 15%;" class="tableStyleLable">
<span>接收人:</span>
</td>
<td style="width: 85%">
<div class="choice_user" id="todo_select_user"></div>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ext-37_34',plain:true"
onclick="javascript:choiceUser('',false)">选</a>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>主题内容:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="TITLE" name="FIELD_TITLE" style="width: 400px" required="true" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>副标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="SUB_TITLE" name="FIELD_SUB_TITLE" style="width: 400px" required="true" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>URL:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="URL" name="FIELD_URL" style="width: 400px" required="true" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>正文:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="CONTENT" name="FIELD_CONTENT" style="width: 400px" required="true" />
</td>
</tr>
</table>
</form>
......@@ -8,6 +8,7 @@
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="todoTab_searchForm" style="float:left">
<input type="hidden" name="FIELD_TYPE" id="FIELD_TYPE" value="${type}" />
主题内容: <input class="easyui-textbox" id="FIELD_TITLE" name="FIELD_TITLE" style="width:200px"/>&nbsp;&nbsp;
角色: <input class="easyui-textbox" id="FIELD_ROLE" name="FIELD_ROLE" value="0" style="width:200px"/>&nbsp;&nbsp;
办理状态: <input class="easyui-textbox" id="FIELD_DO_STATE" name="FIELD_DO_STATE" value="all" style="width:200px"/>&nbsp;&nbsp;
......
......@@ -2,6 +2,7 @@
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<input type="hidden" name="FIELD_TYPE" id="TYPE"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr id="choice_user_tr">
<td style="width: 15%;" class="tableStyleLable">
......
......@@ -5,7 +5,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import org.apache.commons.lang.StringUtils;
......@@ -15,7 +14,7 @@ import com.gaowj.business.exception.BusinessException;
/**
* 数据持久层工具类
*
* @author luosz
* @author luosz@jfbrother.com
*
*/
public class DaoUtil {
......@@ -50,25 +49,16 @@ public class DaoUtil {
entityModel.put("CREATE_TIME", new Date());
entityModel.put("UPDATE_ID", SessionUtil.getCode());
entityModel.put("UPDATE_TIME", new Date());
// 剔除忽略的属性
if (ignoreFields != null) {
for (String ignoreField : ignoreFields) {
entityModel.remove(ignoreField);
}
}
// 将模板中剩余的属性覆盖到entity
if (entityModel.keySet() != null) {
for (Entry<String, Object> field : entityModel.entrySet()) {
entity.put(field.getKey(), field.getValue());
}
}
addCommonInfo(entity, entityModel, ignoreFields);
}
/**
* 添加更新信息(UPDATE_ID,UPDATE_TIME)
*
* @param entity
* 填充的对象
* @param ignoreFields
* 需要忽略的字段
* @date 2018-09-01 下午7:32:48
* @author luosz@jfbrother.com
*/
......@@ -77,6 +67,22 @@ public class DaoUtil {
Map<String, Object> entityModel = new HashMap<String, Object>();
entityModel.put("UPDATE_ID", SessionUtil.getCode());
entityModel.put("UPDATE_TIME", new Date());
addCommonInfo(entity, entityModel, ignoreFields);
}
/**
* 对entity对象添加entityModel中的元素,但是过滤掉ignoreFields中指定的key(即不覆盖ignoreFields指定的key值)
*
* @param entity
* 填充的对象
* @param entityModel
* 新值
* @param ignoreFields
* 需要忽略的字段
* @date 2018-09-05 下午1:44:45
* @author luosz@jfbrother.com
*/
public static void addCommonInfo(Map<String, Object> entity, Map<String, Object> entityModel, String... ignoreFields) {
// 剔除忽略的属性
if (ignoreFields != null) {
for (String ignoreField : ignoreFields) {
......@@ -102,6 +108,27 @@ public class DaoUtil {
* @author luosz@jfbrother.com
*/
public static void addFieldsInfo(Map<String, Object> entity, String... ignoreFields) throws BusinessException {
addFieldsInfo(INFO, KEY, VALUE, entity, ignoreFields);
}
/**
* 将entity中的字段信息整理成key-value映射的列表,并放入info属性(可自由指定增加的列表的key值和key-value对应的key值)
*
* @param infoName
* 列表的key值
* @param keyName
* key元素的key值
* @param valueName
* value元素的key值
* @param entity
* 需要构造的对象
* @param ignoreFields
* 构造中需要忽略的字段
* @throws BusinessException
* @date 2018-09-05 下午1:50:05
* @author luosz@jfbrother.com
*/
public static void addFieldsInfo(String infoName, String keyName, String valueName, Map<String, Object> entity, String... ignoreFields) throws BusinessException {
if (entity.keySet() != null) {
// 字段列表
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
......@@ -118,16 +145,16 @@ public class DaoUtil {
// 构造key-value映射对象
Map<String, Object> mapping = new HashMap<String, Object>();
mapping.put(KEY, str);
mapping.put(VALUE, entity.get(str));
mapping.put(keyName, str);
mapping.put(valueName, entity.get(str));
listField.add(mapping);
}
if (listField.size() > 0) {
entity.put(INFO, listField);
entity.put(infoName, listField);
return;
}
}
throw new BusinessException(INFO + "构造失败!");
throw new BusinessException(infoName + "构造失败!");
}
}
......@@ -151,7 +151,10 @@
</result>
</action>
<action name="todoView_*" class="com.jw.app.todo.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/todo/{1}.jsp</result>
<result name="todoProcTab">/jwapp/pages/todo/todoTab.jsp</result>
<result name="todoOaTab">/jwapp/pages/todo/todoTab.jsp</result>
<result name="todoTab">/jwapp/pages/todo/todoTab.jsp</result>
<result name="todoTabDetail">/jwapp/pages/todo/todoTabDetail.jsp</result>
</action>
<!-- 通知公告 -->
<action name="noticeAct_*" class="com.jw.app.notice.action.actAction" method="{1}">
......
......@@ -13,6 +13,9 @@
<if test="DO_STATE != null and DO_STATE != ''">
and t.DO_STATE = #{DO_STATE}
</if>
<if test="TYPE != null and TYPE != ''">
and t.TYPE = #{TYPE}
</if>
<if test="TITLE != null and TITLE != ''">
and t.TITLE like #{TITLE}
</if>
......
......@@ -13,7 +13,47 @@ import com.jw.app.business.TodoBusiness;
public class viewAction extends BasicAction {
private static final long serialVersionUID = -6259964352154128000L;
/**
* 普通代办列表页
*
* @return
* @throws BusinessException
* @date 2018-09-05 下午2:03:38
* @author luosz@jfbrother.com
*/
public String todoTab() throws BusinessException {
// 如果用户传过来type属性,也可以定位到对应的流程/oa列表
if ("1".equals(request.getParameter("type")) || "".equals("2".equals(request.getParameter("type")))) {
request.setAttribute("type", request.getParameter("type"));
} else {
request.setAttribute("type", 0);
}
return "todoTab";
}
/**
* 流程代办列表页
*
* @return
* @throws BusinessException
* @date 2018-09-05 下午2:03:47
* @author luosz@jfbrother.com
*/
public String todoProcTab() throws BusinessException {
request.setAttribute("type", 1);
return "todoTab";
}
/**
* Oa代办列表页
*
* @return
* @throws BusinessException
* @date 2018-09-05 下午2:03:56
* @author luosz@jfbrother.com
*/
public String todoOaTab() throws BusinessException {
request.setAttribute("type", 2);
return "todoTab";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment