projectAssessModifyApply.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>项目评估管理</title>
  6. <meta name="decorator" content="default"/>
  7. <style>
  8. label.error{
  9. left:0px;
  10. top:40px;
  11. }
  12. </style>
  13. <script type="text/javascript">
  14. var validateForm;
  15. function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
  16. if(validateForm.form()){
  17. if(i==2){
  18. $("#inputForm").attr("action","${ctx}/project/projectAssess/tstore");
  19. }
  20. $("#inputForm").submit();
  21. return true;
  22. }
  23. return false;
  24. }
  25. $(document).ready(function() {
  26. $("input[name='ext']").on('ifChecked', function(event){
  27. var radioVal = $(this).val();
  28. if(radioVal == 0){
  29. $(".td1").removeClass("hide");
  30. }else{
  31. $(".td1").addClass("hide");
  32. }
  33. });
  34. if("${workReimbursement.ext}" == "1"){
  35. $("#ext1").iCheck('check')
  36. }else{
  37. $("#ext").iCheck('check')
  38. }
  39. validateForm = $("#inputForm").validate({
  40. submitHandler: function(form){
  41. loading('正在提交,请稍等...');
  42. form.submit();
  43. },
  44. errorContainer: "#messageBox",
  45. errorPlacement: function(error, element) {
  46. $("#messageBox").text("输入有误,请先更正。");
  47. if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
  48. error.appendTo(element.parent().parent());
  49. } else {
  50. error.insertAfter(element);
  51. }
  52. }
  53. });
  54. $("#attachment_btn").click(function () {
  55. $("#attachment_file").click();
  56. });
  57. });
  58. function insertTitle(tValue){
  59. var list = "${workAdministrativeAtamp.workAttachments}";
  60. var size = (list.split('url')).length-1;
  61. var files = $("#attachment_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
  62. var attachmentId = "";
  63. var attachmentFlag = "102";
  64. console.log(file);
  65. var timestamp=new Date().getTime();
  66. var storeAs = "attachment-file/workIncomingMessage/"+timestamp+"/"+file['name'];
  67. var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
  68. var divId = "_attachment";
  69. $("#addFile"+divId).show();
  70. multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
  71. }
  72. function setPNumber(obj){
  73. $.ajax({
  74. type:'post',
  75. url:'${ctx}/workinvoice/workInvoice/getPNumber',
  76. data:{
  77. "obj":obj
  78. },
  79. success:function(data){
  80. var d = JSON.parse(data);
  81. $("#officeId").val(d.officeId);
  82. $("#companyName").val(d.companyName);
  83. $("#officeName").val(d.officeName);
  84. $("#projectNameStr").val(d.pNumber);
  85. $("#projectIdStr").val(obj);
  86. }
  87. })
  88. }
  89. </script>
  90. </head>
  91. <body>
  92. <div class="single-form">
  93. <div class="container">
  94. <form:form id="inputForm" modelAttribute="projectAssess" action="${ctx}/project/projectAssess/saveAudit" method="post" class="form-horizontal">
  95. <input type="hidden" id="projectIdStr" name="projectIdStr" value="">
  96. <input type="hidden" id="projectNameStr" name="projectNameStr" value="">
  97. <form:hidden path="id"/>
  98. <div class="form-group layui-row first">
  99. <div class="form-group-label"><h2>基本信息</h2></div>
  100. <div class="layui-item layui-col-sm6 lw7">
  101. <label class="layui-form-label double-line"><span class="require-item">*</span>项目名称:</label>
  102. <div class="layui-input-block with-icon">
  103. <input type="hidden" value="" id ="ids">
  104. <sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id" value="${projectAssess.projectId}" title="选择所属项目" labelName="projectAssess.projectName"
  105. labelValue="${projectAssess.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
  106. </div>
  107. </div>
  108. <div class="layui-item layui-col-sm6 lw7">
  109. <label class="layui-form-label double-line"><span class="require-item">*</span>公司名称:</label>
  110. <div class="layui-input-block">
  111. <input htmlEscape="false" id="companyName" name="companyName" readonly="readonly" class="form-control layui-input" value="${projectAssess.companyName}"/>
  112. </div>
  113. </div>
  114. <div class="layui-item layui-col-sm6 lw7">
  115. <label class="layui-form-label double-line">所属部门:</label>
  116. <div class="layui-input-block">
  117. <input type="text" id="officeName" name="office.name" readonly="readonly" class="form-control layui-input" value="${projectAssess.officeName}"/>
  118. <input type="hidden" id="officeId" name="office.id" readonly="readonly" class="form-control layui-input" value=""/>
  119. </div>
  120. </div>
  121. <%--<div class="layui-item layui-col-sm6 lw7">
  122. <label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
  123. <div class="layui-input-block with-icon">
  124. <sys:treeselectt id="master" name="projectLeaders" value="${projectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${projectRecords.leaderNameStr}"
  125. title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
  126. </div>
  127. </div>--%>
  128. <div class="layui-item layui-col-sm6 ">
  129. <label class="layui-form-label double-line"><span class="require-item">*</span>信息提供人及类型:</label>
  130. <div class="layui-input-block">
  131. <form:select path="informationSupplyType" cssClass="form-control required simple-select">
  132. <form:option value="" label=""/>
  133. <form:options items="${fns:getMainDictList('information_supply_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
  134. </form:select>
  135. </div>
  136. </div>
  137. <div class="layui-item layui-col-sm6 lw7">
  138. <label class="layui-form-label double-line"><span class="require-item">*</span>项目类型:</label>
  139. <div class="layui-input-block">
  140. <form:select path="projectType" cssClass="form-control required simple-select">
  141. <form:option value="" label=""/>
  142. <form:options items="${fns:getMainDictList('project_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
  143. </form:select>
  144. </div>
  145. </div>
  146. <div class="layui-item layui-col-sm12 with-textarea">
  147. <label class="layui-form-label double-line">项目概况:</label>
  148. <div class="layui-input-block">
  149. <form:textarea path="projectOverview" id="projectOverview" htmlEscape="false" maxlength="500" rows="4" class="form-control" placeholder="项目概况(项目类型、建设地点、是否涉及生态红线、环境风险等级、敏感程度等)"/>
  150. </div>
  151. </div>
  152. <%--<div class="layui-item layui-col-sm12 with-textarea">
  153. <label class="layui-form-label">说 明:</label>
  154. <div class="layui-input-block">
  155. <form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="255" class="form-control"/>
  156. </div>
  157. </div>--%>
  158. </div>
  159. <%--<div class="form-group layui-row">
  160. <div class="form-group-label"><h2>附件信息</h2></div>
  161. <div class="layui-item nav-btns">
  162. <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
  163. </div>
  164. <div id="addFile_attachment" style="display: none" class="upload-progress">
  165. <span id="fileName_attachment" ></span>
  166. <b><span id="baifenbi_attachment" ></span></b>
  167. <div class="progress">
  168. <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
  169. </div>
  170. </div>
  171. </div>
  172. <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
  173. <span id="attachment_title"></span>
  174. <div class="layui-item layui-col-xs12" style="padding:0 16px;">
  175. <table id="upTable" class="table table-bordered table-condensed details">
  176. <thead>
  177. <tr>
  178. &lt;%&ndash; <th>序号</th>&ndash;%&gt;
  179. <th>文件预览</th>
  180. <th>上传人</th>
  181. <th>上传时间</th>
  182. <th width="150px">操作</th>
  183. </tr>
  184. </thead>
  185. <tbody id="file_attachment">
  186. <c:forEach items="${workAdministrativeAtamp.workAttachments}" var = "workClientAttachment" varStatus="status">
  187. <tr>
  188. &lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
  189. <c:choose>
  190. <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
  191. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
  192. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
  193. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
  194. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
  195. <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
  196. </c:when>
  197. <c:otherwise>
  198. <c:choose>
  199. <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
  200. <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
  201. </c:when>
  202. <c:otherwise>
  203. <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
  204. </c:otherwise>
  205. </c:choose>
  206. </c:otherwise>
  207. </c:choose>
  208. <td>${workClientAttachment.createBy.name}</td>
  209. <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
  210. <td class="op-td">
  211. <div class="op-btn-box" >
  212. <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>&nbsp;下载</a>
  213. <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
  214. <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>&nbsp;删除</a>
  215. </c:if>
  216. </div>
  217. </td>
  218. </tr>
  219. </c:forEach>
  220. </tbody>
  221. </table>
  222. </div>
  223. </div>--%>
  224. </form:form>
  225. </div>
  226. </div>
  227. </body>
  228. </html>