Browse Source

通知类修改,流程节点修改,施工单位上传文件修改

yue 5 năm trước cách đây
mục cha
commit
76bef555eb

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3224 - 3093
src/main/java/com/jeeplus/modules/act/service/ActTaskService.java


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1824 - 1778
src/main/java/com/jeeplus/modules/act/web/ActTaskController.java


+ 21 - 7
src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java

@@ -111,13 +111,27 @@ public class OaNotifyController extends BaseController {
 		}
 		model.addAttribute("isSelf", isSelf);
 		model.addAttribute("oaNotify", oaNotify);
-        if(oaNotify.getTitle().contains("缺货")){
-			OaNotifyMaterial oaNotifyMaterial = new OaNotifyMaterial();
-			oaNotifyMaterial.setParentId(oaNotify.getId());
-			List<OaNotifyMaterial> oaNotifyMaterialList = oaNotifyMaterialService.findList(oaNotifyMaterial);
-			model.addAttribute("oaNotifyMaterialList",oaNotifyMaterialList);
-            return "modules/oa/notify/oaNotifyFormMaterial";
-        }
+		String title = oaNotify.getTitle();
+		String type = oaNotify.getType();
+		if (null!=title) {
+			if(oaNotify.getTitle().contains("缺货")){
+				OaNotifyMaterial oaNotifyMaterial = new OaNotifyMaterial();
+				oaNotifyMaterial.setParentId(oaNotify.getId());
+				List<OaNotifyMaterial> oaNotifyMaterialList = oaNotifyMaterialService.findList(oaNotifyMaterial);
+				model.addAttribute("oaNotifyMaterialList",oaNotifyMaterialList);
+				return "modules/oa/notify/oaNotifyFormMaterial";
+			}
+		}
+		if (type != null) {
+			if (oaNotify.getType().equals("8")) {
+				OaNotifyMaterial oaNotifyMaterial = new OaNotifyMaterial();
+				oaNotifyMaterial.setParentId(oaNotify.getId());
+				List<OaNotifyMaterial> oaNotifyMaterialList = oaNotifyMaterialService.findList(oaNotifyMaterial);
+				model.addAttribute("oaNotifyMaterialList",oaNotifyMaterialList);
+				return "modules/oa/notify/oaNotifyFormDesign";
+			}
+		}
+
 		return "modules/oa/notify/oaNotifyForm";
 	}
 

+ 145 - 0
src/main/webapp/webpage/modules/oa/notify/oaNotifyFormDesign.js

@@ -0,0 +1,145 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script >
+$(document).ready(function () {
+	var procInsId = $('#files').val();
+    $('#table').bootstrapTable({
+        //请求方法
+        method: 'post',
+        //类型json
+        dataType: "json",
+        contentType: "application/x-www-form-urlencoded",
+        //显示检索按钮
+        showSearch: false,
+        //显示刷新按钮
+        showRefresh: false,
+        //显示切换手机试图按钮
+        showToggle: false,
+        //显示 内容列下拉框
+        showColumns: false,
+        //显示到处按钮
+        showExport: false,
+        //显示切换分页按钮
+        showPaginationSwitch: false,
+        //最低显示2行
+        minimumCountColumns: 2,
+        //是否显示行间隔色
+        striped: true,
+        //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+        cache: false,
+        //是否显示分页(*)
+        pagination: false,
+        //排序方式
+        sortOrder: "asc",
+        //初始化加载第一页,默认第一页
+        pageNumber: 1,
+        //每页的记录行数(*)
+        pageSize: 10,
+        //可供选择的每页的行数(*)
+        pageList: [10, 25, 50, 100],
+        //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+        url: "${ctx}/managementcenter/upload/data?procInsId=" + procInsId,
+        //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
+        //queryParamsType:'',
+        ////查询参数,每次调用是会带上这个参数,可自定义
+        queryParams: function (params) {
+            var searchParam = $("#searchForm").serializeJSON();
+            searchParam.pageNo = params.limit === undefined ? "1" : params.offset / params.limit + 1;
+            searchParam.pageSize = params.limit === undefined ? -1 : params.limit;
+            searchParam.orderBy = params.sort === undefined ? "" : params.sort + " " + params.order;
+            return searchParam;
+        },
+        //分页方式:client客户端分页,server服务端分页(*)
+        sidePagination: "server",
+        contextMenuTrigger: "right",//pc端 按右键弹出菜单
+        contextMenuTriggerMobile: "press",//手机端 弹出菜单,click:单击, press:长按。
+        contextMenu: '#context-menu',
+        onContextMenuItem: function (row, $el) {
+            if ($el.data("item") == "edit") {
+                edit(row.id);
+            } else if ($el.data("item") == "view") {
+                view(row.id);
+            } else if ($el.data("item") == "delete") {
+                jp.confirm('确认要删除该图片管理记录吗?', function () {
+                    jp.loading();
+                    jp.get("${ctx}/test/pic/testPic/delete?id=" + row.id, function (data) {
+                        if (data.success) {
+                            $('#testPicTable').bootstrapTable('refresh');
+                            jp.success(data.msg);
+                        } else {
+                            jp.error(data.msg);
+                        }
+                    })
+
+                });
+
+            }
+        },
+
+        onClickRow: function (row, $el) {
+        },
+        onShowSearch: function () {
+            $("#search-collapse").slideToggle();
+        },
+        columns: [{
+            field: 'path',
+            title: '图片路径',
+            sortable: true,
+            sortName: 'path',
+            formatter: function (value, row, index) {
+                var valueArray = value.split("|");
+                var labelArray = [];
+                for (var i = 0; i < valueArray.length; i++) {
+                    if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i])) {
+                        labelArray[i] = "<a href=\"" + valueArray[i] + "\" url=\"" + valueArray[i] + "\" target=\"_blank\">" + decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/") + 1)) + "</a>"
+                    } else {
+                        labelArray[i] = '<img   onclick="jp.showPic(\'' + valueArray[i] + '\')"' + ' height="50px" src="' + valueArray[i] + '">';
+                    }
+                }
+                return labelArray.join(" ");
+            }
+        }, {
+            field: 'imgName',
+            title: '上传用途',
+            sortable: true,
+            sortName: 'imgName',
+        }, {
+            field: 'uId',
+            title: '上传人员',
+            sortable: true,
+            sortName: 'uId',
+        }]
+    });
+
+
+    if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端
+
+
+        $('#table').bootstrapTable("toggleView");
+    }
+
+    $('#table').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+        'check-all.bs.table uncheck-all.bs.table', function () {
+        $('#remove').prop('disabled', !$('#table').bootstrapTable('getSelections').length);
+        $('#edit').prop('disabled', $('#table').bootstrapTable('getSelections').length != 1);
+    });
+
+    $("#search").click("click", function () {// 绑定查询按扭
+        $('#table').bootstrapTable('refresh');
+    });
+    $("#export").click(function () {//导出Excel文件
+        jp.downloadFile('${ctx}/oa/oaNotify/export?parentId=' + parentId);
+    });
+    $("#reset").click("click", function () {// 绑定查询按扭
+        $("#searchForm  input").val("");
+        $("#searchForm  select").val("");
+        $('#table').bootstrapTable('refresh');
+    });
+});
+
+function getIdSelections() {
+    return $.map($("#table").bootstrapTable('getSelections'), function (row) {
+        return row.id
+    });
+}
+
+</script>

+ 132 - 0
src/main/webapp/webpage/modules/oa/notify/oaNotifyFormDesign.jsp

@@ -0,0 +1,132 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/bootstraptable.jsp"%>
+<%@include file="/webpage/include/treeview.jsp" %>
+<html>
+<head>
+	<title>通知管理</title>
+	<meta name="decorator" content="ani"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			jp.ajaxForm("#inputForm",function(data){
+				if(data.success){
+					jp.success(data.msg);
+					jp.go("${ctx}/oa/oaNotify");
+				}else{
+					jp.error(data.msg);
+				}
+			})
+			
+		});
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">				
+<div class="row">
+	<div class="col-md-12">
+	<div class="panel panel-primary">
+		<div class="panel-heading">
+			<h3 class="panel-title"> 
+				<a class="panelButton" href="${ctx}/oa/oaNotify${isSelf?'/self':'' }"><i class="ti-angle-left"></i> 返回</a>
+			</h3>
+		</div>
+		<div class="panel-body">
+		<form:form id="inputForm" modelAttribute="oaNotify" action="${ctx}/oa/oaNotify/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+			<input type="hidden" id="files" value="${oaNotify.files}">
+			<input  type="hidden" id="parentId"  readonly="readonly" value="${oaNotify.id}">
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>类型1:</label>
+					<div class="col-sm-10">
+						<form:select path="type" class="form-control required">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getDictList('oa_notify_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>标题:</label>
+					<div class="col-sm-10">
+						<form:input path="title" htmlEscape="false" maxlength="200" class="form-control required"/>
+					</div>
+				</div>
+
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>内容:</label>
+					<div class="col-sm-10">
+						<form:textarea path="content" htmlEscape="false" rows="6" maxlength="2000" class="form-control required"/>
+					</div>
+				</div>
+
+			<%@ include file="oaNotifyFormDesign.js"%>
+			<div>
+				<table id="table"   data-toolbar="#toolbar"></table>
+			</div>
+				<c:if test="${oaNotify.status ne '1'}">
+				<div class="form-group">
+					<label class="col-sm-2 control-label"><font color="red">*</font>状态:</label>
+					<div class="col-sm-10">
+					<form:radiobuttons path="status" items="${fns:getDictList('oa_notify_status')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
+					</div>
+				</div>
+				</c:if>
+			  <c:if test="${oaNotify.status eq '1'}">
+				<div class="form-group">
+				<table>
+					  <tr>
+				         <td  class="width-15 active">	<label class="pull-right">接受人:</label></td>
+				         <td class="width-35" colspan="3"><table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+								<thead>
+									<tr>
+										<th>接受人</th>
+										<th>接受部门</th>
+										<th>阅读状态</th>
+										<th>阅读时间</th>
+									</tr>
+								</thead>
+								<tbody>
+								<c:forEach items="${oaNotify.oaNotifyRecordList}" var="oaNotifyRecord">
+									<tr>
+										<td>
+											${oaNotifyRecord.user.name}
+										</td>
+										<td>
+											${oaNotifyRecord.user.office.name}
+										</td>
+										<td>
+											${fns:getDictLabel(oaNotifyRecord.readFlag, 'oa_notify_read', '')}
+										</td>
+										<td>
+											<fmt:formatDate value="${oaNotifyRecord.readDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+										</td>
+									</tr>
+								</c:forEach>
+								</tbody>
+							</table>
+							已查阅:${oaNotify.readNum} &nbsp; 未查阅:${oaNotify.unReadNum} &nbsp; 总共:${oaNotify.readNum + oaNotify.unReadNum}</td>
+				      </tr>
+				  </table>
+				  </div>
+				</c:if>
+				<c:if test="${oaNotify.status ne '1'}">
+				<shiro:hasPermission name="oa:oaNotify:edit">
+						<div class="col-lg-3"></div>
+				        <div class="col-lg-6">
+				             <div class="form-group text-center">
+				                 <div>
+				                     <button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
+				                 </div>
+				             </div>
+				        </div>
+				</shiro:hasPermission>
+				</c:if>
+		</form:form>
+		</div>
+
+	</div>
+	</div>
+</div>
+</div>
+</body>
+</html>