biddingManagementForm.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. var tenderStatus = $("#tenderStatus").val();
  18. if("中标" == tenderStatus){
  19. var num = $("#file_attachment tr").length;
  20. if(num>0){
  21. $("#inputForm").submit();
  22. return true;
  23. }else{
  24. layer.alert('项目已中标,请上传中标通知书', {
  25. icon: 5,
  26. title: "上传中标通知书"
  27. });
  28. }
  29. return false;
  30. }
  31. $("#inputForm").submit();
  32. return true;
  33. }
  34. return false;
  35. }
  36. $(document).ready(function() {
  37. $(".td1").removeClass("hide");
  38. $(".td2").addClass("hide");
  39. $("input[name='ext']").on('ifChecked', function(event){
  40. var radioVal = $(this).val();
  41. if(radioVal == 0){
  42. $(".td1").removeClass("hide");
  43. $(".td2").addClass("hide");
  44. }else{
  45. $(".td1").addClass("hide");
  46. $(".td2").removeClass("hide");
  47. }
  48. });
  49. if("${workReimbursement.ext}" == "1"){
  50. $("#ext1").iCheck('check')
  51. }else{
  52. $("#ext").iCheck('check')
  53. }
  54. validateForm = $("#inputForm").validate({
  55. submitHandler: function(form){
  56. loading('正在提交,请稍等...');
  57. form.submit();
  58. },
  59. errorContainer: "#messageBox",
  60. errorPlacement: function(error, element) {
  61. $("#messageBox").text("输入有误,请先更正。");
  62. if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
  63. error.appendTo(element.parent().parent());
  64. } else {
  65. error.insertAfter(element);
  66. }
  67. }
  68. });
  69. laydate.render({
  70. elem: '#tenderTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  71. event: 'focus', //响应事件。如果没有传入event,则按照默认的click
  72. type : 'date'
  73. });
  74. $("#attachment_btn").click(function () {
  75. $("#attachment_file").click();
  76. });
  77. });
  78. function insertTitle(tValue){
  79. var list = "${workGoOut.workAttachments}";
  80. var size = (list.split('url')).length-1;
  81. var files = $("#attachment_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
  82. var attachmentId = "";
  83. var attachmentFlag = "102";
  84. console.log(file);
  85. var timestamp=new Date().getTime();
  86. var storeAs = "attachment-file/workIncomingMessage/"+timestamp+"/"+file['name'];
  87. var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
  88. var divId = "_attachment";
  89. $("#addFile"+divId).show();
  90. multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
  91. }
  92. function setPNumber(obj){
  93. $.ajax({
  94. type:'post',
  95. url:'${ctx}/workinvoice/workInvoice/getPNumber',
  96. data:{
  97. "obj":obj
  98. },
  99. success:function(data){
  100. var d = JSON.parse(data);
  101. $("#pNumber").val(d.pNumber);
  102. $("#cInfoName").val(d.cInfoName);
  103. $("#cName").val(d.cName);
  104. }
  105. })
  106. }
  107. </script>
  108. </head>
  109. <body>
  110. <div class="single-form">
  111. <div class="container">
  112. <form:form id="inputForm" modelAttribute="biddingManagement" action="${ctx}/management/biddingManagement/save" method="post" class="form-horizontal">
  113. <input type="hidden" id="projectId" name="projectId" value="">
  114. <form:hidden path="id"/>
  115. <div class="form-group layui-row first">
  116. <div class="form-group-label"><h2>基本信息</h2></div>
  117. <div class="layui-item layui-col-sm6">
  118. <label class="layui-form-label"><span class="require-item">*</span>评估类型:</label>
  119. <div class="layui-input-block">
  120. <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
  121. <label for="ext">项目已评估</label>
  122. <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
  123. <label for="ext1">项目未评估</label>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="form-group layui-row">
  128. <div class="layui-item layui-col-sm6 td1">
  129. <label class="layui-form-label double-line"><span class="require-item">*</span>评估项目名称:</label>
  130. <div class="layui-input-block with-icon">
  131. <input type="hidden" value="" id ="ids">
  132. <sys:gridselectcallprojectt url="${ctx}/management/biddingManagement/selectProject" id="project" name="project.id" value="${biddingManagement.projectId}" title="选择所属项目" labelName="biddingManagement.projectName"
  133. labelValue="${biddingManagement.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
  134. </div>
  135. </div>
  136. <div class="layui-item layui-col-sm6 td2">
  137. <label class="layui-form-label double-line"><span class="require-item">*</span>投标项目名称:</label>
  138. <div class="layui-input-block">
  139. <form:input path="projectName" htmlEscape="false" class="form-control layui-input required"/>
  140. </div>
  141. </div>
  142. <div class="layui-item layui-col-sm6">
  143. <label class="layui-form-label double-line">投标记录编号:</label>
  144. <div class="layui-input-block">
  145. <div class="input-group">
  146. <form:input path="biddingId" htmlEscape="false" readonly="true" class="form-control layui-input"/>
  147. </div>
  148. </div>
  149. </div>
  150. <div class="layui-item layui-col-sm6">
  151. <label class="layui-form-label double-line"><span class="require-item">*</span>投标时间:</label>
  152. <div class="layui-input-block">
  153. <input class="laydate-icondate layui-input form-control layer-date laydate-icon required" id="tenderTime" name="tenderTime" value="<fmt:formatDate value="${biddingManagement.tenderTime}" pattern="yyyy-MM-dd"/>">
  154. </div>
  155. </div>
  156. <div class="layui-item layui-col-sm6 ">
  157. <label class="layui-form-label double-line"><span class="require-item">*</span>投标状态:</label>
  158. <div class="layui-input-block">
  159. <select id="tenderStatus" name="tenderStatus" class="form-control simple-select required" lay-verify="">
  160. <option value="">--请选择投标状态--</option>
  161. <option value="未开标" <c:if test="${biddingManagement.tenderStatus eq '未开标' }">selected</c:if>>未开标</option>
  162. <option value="中标" <c:if test="${biddingManagement.tenderStatus eq '中标' }">selected</c:if>>中标</option>
  163. <option value="未中标" <c:if test="${biddingManagement.tenderStatus eq '未中标' }">selected</c:if>>未中标</option>
  164. </select>
  165. </div>
  166. </div>
  167. <div class="layui-item layui-col-sm12 with-textarea">
  168. <label class="layui-form-label double-line">备 注:</label>
  169. <div class="layui-input-block">
  170. <form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="255" class="form-control"/>
  171. </div>
  172. </div>
  173. </div>
  174. <div class="form-group layui-row">
  175. <div class="form-group-label double-line"><h2>上传中标通知书</h2></div>
  176. <div class="layui-item nav-btns">
  177. <a id="attachment_btn" class="nav-btn nav-btn-add" title="上传中标通知书"><i class="fa fa-plus"></i>&nbsp;上传中标通知书</a>
  178. </div>
  179. <div id="addFile_attachment" style="display: none" class="upload-progress">
  180. <span id="fileName_attachment" ></span>
  181. <b><span id="baifenbi_attachment" ></span></b>
  182. <div class="progress">
  183. <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
  184. </div>
  185. </div>
  186. </div>
  187. <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
  188. <span id="attachment_title"></span>
  189. <div class="layui-item layui-col-xs12" style="padding:0 16px;">
  190. <table id="upTable" class="table table-bordered table-condensed details">
  191. <thead>
  192. <tr>
  193. <%-- <th>序号</th>--%>
  194. <th>文件预览</th>
  195. <th>上传人</th>
  196. <th>上传时间</th>
  197. <th width="150px">操作</th>
  198. </tr>
  199. </thead>
  200. <tbody id="file_attachment">
  201. <c:forEach items="${biddingManagement.workAttachments}" var = "workClientAttachment" varStatus="status">
  202. <tr>
  203. <%-- <td>${status.index + 1}</td>--%>
  204. <c:choose>
  205. <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
  206. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
  207. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
  208. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
  209. or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
  210. <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
  211. </c:when>
  212. <c:otherwise>
  213. <c:choose>
  214. <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
  215. <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
  216. </c:when>
  217. <c:otherwise>
  218. <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
  219. </c:otherwise>
  220. </c:choose>
  221. </c:otherwise>
  222. </c:choose>
  223. <td>${workClientAttachment.createBy.name}</td>
  224. <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
  225. <td class="op-td">
  226. <div class="op-btn-box" >
  227. <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>
  228. <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
  229. <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>
  230. </c:if>
  231. </div>
  232. </td>
  233. </tr>
  234. </c:forEach>
  235. </tbody>
  236. </table>
  237. </div>
  238. </div>
  239. </form:form>
  240. </div>
  241. </div>
  242. </body>
  243. </html>