projectAssessForm.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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/save" method="post" class="form-horizontal">
  95. <input type="hidden" id="enname" value="${loginUserRole.enname}">
  96. <input type="hidden" id="projectIdStr" name="projectIdStr" value="">
  97. <input type="hidden" id="projectNameStr" name="projectNameStr" value="">
  98. <form:hidden path="id"/>
  99. <div class="form-group layui-row first">
  100. <div class="form-group-label"><h2>基本信息</h2></div>
  101. <div class="layui-item layui-col-sm6 lw7">
  102. <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
  103. <div class="layui-input-block with-icon">
  104. <input type="hidden" value="" id ="ids">
  105. <sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id" value="${projectAssess.projectId}" title="选择所属项目" labelName="projectAssess.projectName"
  106. labelValue="${projectAssess.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
  107. </div>
  108. </div>
  109. <div class="layui-item layui-col-sm6 lw7">
  110. <label class="layui-form-label double-line">公司名称:</label>
  111. <div class="layui-input-block">
  112. <input htmlEscape="false" id="companyName" name="companyName" readonly="readonly" class="form-control layui-input" value="${projectAssess.companyName}"/>
  113. </div>
  114. </div>
  115. <div class="layui-item layui-col-sm6 lw7">
  116. <label class="layui-form-label double-line">所属部门:</label>
  117. <div class="layui-input-block">
  118. <input type="text" id="officeName" name="office.name" readonly="readonly" class="form-control layui-input" value="${projectAssess.officeName}"/>
  119. <input type="hidden" id="officeId" name="office.id" readonly="readonly" class="form-control layui-input" value=""/>
  120. </div>
  121. </div>
  122. <%--<div class="layui-item layui-col-sm6 lw7">
  123. <label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
  124. <div class="layui-input-block with-icon">
  125. <sys:treeselectt id="master" name="projectLeaders" value="${projectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${projectRecords.leaderNameStr}"
  126. title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
  127. </div>
  128. </div>--%>
  129. <div class="layui-item layui-col-sm6 lw7">
  130. <label class="layui-form-label double-line"><span class="require-item">*</span>信息提供人及类型:</label>
  131. <div class="layui-input-block">
  132. <form:select path="informationSupplyType" cssClass="form-control required simple-select">
  133. <form:option value="" label=""/>
  134. <form:options items="${fns:getMainDictList('information_supply_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
  135. </form:select>
  136. </div>
  137. </div>
  138. <div class="layui-item layui-col-sm6 lw7">
  139. <label class="layui-form-label double-line"><span class="require-item">*</span>项目类型:</label>
  140. <div class="layui-input-block">
  141. <form:select path="projectType" cssClass="form-control required simple-select">
  142. <form:option value="" label=""/>
  143. <form:options items="${fns:getMainDictList('project_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
  144. </form:select>
  145. </div>
  146. </div>
  147. <div class="layui-item layui-col-sm12 with-textarea">
  148. <label class="layui-form-label double-line">项目概况:</label>
  149. <div class="layui-input-block">
  150. <form:textarea path="projectOverview" id="projectOverview" htmlEscape="false" maxlength="500" rows="4" class="form-control" placeholder="项目概况(项目类型、建设地点、是否涉及生态红线、环境风险等级、敏感程度等)"/>
  151. </div>
  152. </div>
  153. <%--<div class="layui-item layui-col-sm12 with-textarea">
  154. <label class="layui-form-label">说 明:</label>
  155. <div class="layui-input-block">
  156. <form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="255" class="form-control"/>
  157. </div>
  158. </div>--%>
  159. </div>
  160. <%--<div class="form-group layui-row">
  161. <div class="form-group-label"><h2>附件信息</h2></div>
  162. <div class="layui-item nav-btns">
  163. <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
  164. </div>
  165. <div id="addFile_attachment" style="display: none" class="upload-progress">
  166. <span id="fileName_attachment" ></span>
  167. <b><span id="baifenbi_attachment" ></span></b>
  168. <div class="progress">
  169. <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
  170. </div>
  171. </div>
  172. </div>
  173. <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
  174. <span id="attachment_title"></span>
  175. <div class="layui-item layui-col-xs12" style="padding:0 16px;">
  176. <table id="upTable" class="table table-bordered table-condensed details">
  177. <thead>
  178. <tr>
  179. &lt;%&ndash; <th>序号</th>&ndash;%&gt;
  180. <th>文件预览</th>
  181. <th>上传人</th>
  182. <th>上传时间</th>
  183. <th width="150px">操作</th>
  184. </tr>
  185. </thead>
  186. <tbody id="file_attachment">
  187. <c:forEach items="${workAdministrativeAtamp.workAttachments}" var = "workClientAttachment" varStatus="status">
  188. <tr>
  189. &lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
  190. <c:choose>
  191. <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
  192. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
  193. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
  194. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
  195. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
  196. <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
  197. </c:when>
  198. <c:otherwise>
  199. <c:choose>
  200. <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
  201. <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
  202. </c:when>
  203. <c:otherwise>
  204. <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
  205. </c:otherwise>
  206. </c:choose>
  207. </c:otherwise>
  208. </c:choose>
  209. <td>${workClientAttachment.createBy.name}</td>
  210. <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
  211. <td class="op-td">
  212. <div class="op-btn-box" >
  213. <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>
  214. <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
  215. <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>
  216. </c:if>
  217. </div>
  218. </td>
  219. </tr>
  220. </c:forEach>
  221. </tbody>
  222. </table>
  223. </div>
  224. </div>--%>
  225. </form:form>
  226. </div>
  227. </div>
  228. </body>
  229. </html>