|
@@ -0,0 +1,343 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>项目管理</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
|
|
|
+ <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
|
|
|
+
|
|
|
+ <link rel='layuicss' type="text/css" href="${ctxp}/static/layui/css/layui.css"/>
|
|
|
+ <style>
|
|
|
+ #projectDesc-error{
|
|
|
+ left:0;
|
|
|
+ top:82px;
|
|
|
+ }
|
|
|
+ .layui-layer-dialog{
|
|
|
+ background: red;
|
|
|
+ }
|
|
|
+ td input{
|
|
|
+ margin-left:0px !important;
|
|
|
+ height: 42px !important;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var validateForm;
|
|
|
+ function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ if(validateForm.form()){
|
|
|
+ if(i==2){
|
|
|
+ $("#inputForm").attr("action","${ctx}/project/projectPlan/save");
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $(document).ready(function() {
|
|
|
+ var radioVal ;
|
|
|
+ validateForm = $("#inputForm").validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $("#messageBox").text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ function insertTitle(tValue){
|
|
|
+ var files = $("#attachment_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
|
|
|
+ var attachmentId = "";
|
|
|
+ var attachmentFlag = "131";
|
|
|
+ /*console.log(file);*/
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
+ var divId = "_attachment";
|
|
|
+ $("#addFile"+divId).show();
|
|
|
+ multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ laydate.render({
|
|
|
+ elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
+ type : 'date'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
+ type : 'date'
|
|
|
+ });
|
|
|
+
|
|
|
+ function func(idx){
|
|
|
+ var ids = "projectPlanList";
|
|
|
+ //获取被选中的option标签
|
|
|
+ var vs = document.getElementById("projectPlanList"+idx+"_projectStage").value;
|
|
|
+ }
|
|
|
+
|
|
|
+ function addFile() {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ }
|
|
|
+
|
|
|
+ function addRow(list, idx, tpl, row){
|
|
|
+ var idx1 = $("#projectPlanList tr").length;
|
|
|
+ idx+=1;
|
|
|
+ bornTemplete(list, idx, tpl, row, idx1);
|
|
|
+ }
|
|
|
+
|
|
|
+ function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ laydate.render({
|
|
|
+ elem : (list+idx+"_beginDate"),
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date',
|
|
|
+ trigger: 'click'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem : (list+idx+"_endDate"),
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date',
|
|
|
+ trigger: 'click'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function delRow(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
+ if (id.val() == ""){
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }else if(delFlag.val() == "0"){
|
|
|
+ delFlag.val("1");
|
|
|
+ $(obj).html("÷").attr("title", "撤回删除");
|
|
|
+ $(obj).parent().parent().addClass("error");
|
|
|
+ $(obj).parent().parent().addClass("hide");
|
|
|
+ }else if(delFlag.val() == "1"){
|
|
|
+ delFlag.val("0");
|
|
|
+ $(obj).html("×").attr("title", "删除");
|
|
|
+ $(obj).parent().parent().removeClass("error");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="single-form">
|
|
|
+ <div class="container">
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <form:form id="inputForm" modelAttribute="projectRecords" action="${ctx}/project/projectPlan/save" method="post" class="form-horizontal">
|
|
|
+ <form:hidden path="id"/>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>项目计划信息</h2></div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">项目名称:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="projectName" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">项目编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <div class="input-group">
|
|
|
+ <form:input path="projectId" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">创建人:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="createBy.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <form:hidden path="createBy.id" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">创建日期:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input id="createDate" name="createDate" htmlEscape="false" value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" class="form-control required layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="layui-item layui-col-sm12 lw7">
|
|
|
+ <label class="layui-form-label double-line">项目计划列表:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <div class="layui-item nav-btns" style="padding-left:0px;">
|
|
|
+ <a class="nav-btn nav-btn-add"
|
|
|
+ onclick="addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl);workClientBankRowIdx = workClientBankRowIdx + 1;"
|
|
|
+ title="新增"><i class="fa fa-plus"></i> 新增</a>
|
|
|
+ <shiro:hasPermission name="project:projectPlan:export">
|
|
|
+ <a class="nav-btn nav-btn-export" title="导出" onclick="return confirmx('确认要导出该项目计划列表吗?', '${ctx}/project/projectPlan/export?id=${projectRecords.id}');"><i class="fa fa-file-excel-o"></i> 导出</a>
|
|
|
+ </shiro:hasPermission>
|
|
|
+ </div>
|
|
|
+ <table id="bankinfo" class="table table-bordered table-condensed can-edit">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="60px">编号</th>
|
|
|
+ <th >任务阶段</th>
|
|
|
+ <th >计划开始时间</th>
|
|
|
+ <th >计划结束时间</th>
|
|
|
+ <th >提醒人</th>
|
|
|
+ <th >完成人</th>
|
|
|
+ <th width="100px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="projectPlanList">
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <script type="text/template" id="workClientBankTpl">//<!--
|
|
|
+ <tr id="projectPlanList{{idx}}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="projectPlanList{{idx}}_id" name="projectPlanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
|
+ <input id="projectPlanList{{idx}}_delFlag" name="projectPlanList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td width="60px">
|
|
|
+ <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].costNum" readonly="readonly" style="text-align: center" value="{{idx}}" type="text" class="form-control contentDetail"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="projectPlanList{{idx}}_projectStage" name="projectPlanList[{{idx}}].projectStage" list ="num" value="{{row.projectStage}}" class="form-control required datetime"/>
|
|
|
+ <datalist id ="num" >
|
|
|
+ <c:forEach items="${projectTypeList}" var="projectType">
|
|
|
+ <option>${projectType.typeName}</option>
|
|
|
+ </c:forEach>
|
|
|
+ </datalist>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_beginDate" name="projectPlanList[{{idx}}].beginDate" type="text" value="{{row.beginDate}}" class="form-control required datetime"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_endDate" name="projectPlanList[{{idx}}].endDate" type="text" value="{{row.endDate}}" class="form-control required datetime"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <sys:treeselecttPlanUser id="projectPlanList{{idx}}_remindName" name="remindName" value="${projectRecords.leaderIds}" labelName="projectPlanList[{{idx}}].remindName" labelValue="{{row.remindName}}"
|
|
|
+ title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <sys:treeselecttPlanUser id="projectPlanList{{idx}}_finishName" name="finishName" value="${projectRecords.leaderIds}" labelName="projectPlanList[{{idx}}].finishName" labelValue="{{row.finishName}}"
|
|
|
+ title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td class="text-center op-td" width="10">
|
|
|
+ {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#projectPlanList{{idx}}')" title="删除"><i class="fa fa-trash"></i> 删除</span>{{/delBtn}}
|
|
|
+ </td>
|
|
|
+ </tr>//-->
|
|
|
+ </script>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>项目计划附件信息</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件" onclick="addFile()"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
+ <%--<a class="nav-btn nav-btn-export" title="下载模板" onclick="window.location.href='${ctx}/project/projectPlan/downloadTemplate';"><i class="fa fa-download"></i> 下载模板</a>--%>
|
|
|
+ </div>
|
|
|
+ <div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
+ <span id="fileName_attachment" ></span>
|
|
|
+ <b><span id="baifenbi_attachment" ></span></b>
|
|
|
+ <div class="progress">
|
|
|
+ <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
|
|
|
+ <span id="attachment_title"></span>
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
+ <table id="listAttachment" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
+ <th width="25%">文件</th>
|
|
|
+ <th width="25%">上传人</th>
|
|
|
+ <th width="25%">上传时间</th>
|
|
|
+ <th width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="file_attachment">
|
|
|
+ <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
+ <tr class="trIdAdds">
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
+ <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ <td>${workClientAttachment.createBy.name}</td>
|
|
|
+ <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
+ <td class="op-td">
|
|
|
+ <div class="op-btn-box" >
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group layui-row page-end"></div>
|
|
|
+ </form:form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script type="text/javascript">
|
|
|
+ var workClientBankRowIdx = 0,
|
|
|
+ workClientBankTpl = $("#workClientBankTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
|
|
|
+ $(document).ready(function () {
|
|
|
+ var dataBank = ${fns:toJson(projectRecords.projectPlanList)};
|
|
|
+ for (var i = 0; i < dataBank.length; i++) {
|
|
|
+ addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl, dataBank[i]);
|
|
|
+ workClientBankRowIdx = workClientBankRowIdx + 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|