123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541 |
- <%@ 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">
- var validateForm;
- function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
- if(validateForm.form()){
- if(obj == 1) {
- $("#flag").val("yes");
- }else {
- $("#flag").val("no");
- }
- $("#inputForm").submit();
- return true;
- }
-
- return false;
- }
- $(document).ready(function() {
- 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 list = "${caseInfo.workAttachments}";
- var str = (list.split('url')).length-1;
- var files = $("#attachment_file")[0].files;
- for(var i = 0;i<files.length;i++) {
- var file = files[i];
- var attachmentId = $("#id").val();
- var attachmentFlag = "76";
- console.log(file);
- var timestamp=new Date().getTime();
- var storeAs = "attachment-file/caseInfo/"+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,str);
- }}
- function deleteFileFromAliyun(obj,deleteUrl){
- $.ajax({
- type:"post",
- url:deleteUrl,
- success:function(data){
- if(data.str){
- parent.layer.msg('删除成功',{icon:1});
- $(obj).parent().parent().remove();
- }else {
- parent.layer.msg('删除失败',{icon:1});
- }
- }
- });
- }
- /*-------------------分割线-------------------*/
- function addRow(list, idx, tpl, row){
- var idx1 = $("#caseBuildInfoList tr").length;
- if(list == '#caseBuildInfoList' && idx1 < 100){
- bornTemplete(list, idx, tpl, row, idx1);
- }
- var idx2 = $("#caseDesignInfoList tr").length;
- if(list == '#caseDesignInfoList' && idx2 < 100){
- bornTemplete(list, idx, tpl, row, idx2);
- }
- var idx3 = $("#caseExecuteInfoList tr").length;
- if(list == '#caseExecuteInfoList' && idx3 < 100){
- bornTemplete(list, idx, tpl, row, idx3);
- }
- var idx4 = $("#caseProjectFeatureList tr").length;
- if(list == '#caseProjectFeatureList' && idx4 < 100){
- bornTemplete(list, idx, tpl, row, idx4);
- }
- var idx5 = $("#caseNormList tr").length;
- if(list == '#caseNormList' && idx5 < 100){
- bornTemplete(list, idx, tpl, row, idx5);
- }
- var idx6 = $("#caseMaterialsList tr").length;
- if(list == '#caseMaterialsList' && idx6 < 100){
- bornTemplete(list, idx, tpl, row, idx6);
- }
- }
- 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");
- }
- }
- });
- }
- </script>
- </head>
- <body >
- <div class="single-form">
- <div class="container">
- <form:form id="inputForm" modelAttribute="caseInfo" action="${ctx}/caseinfo/caseInfo/saveAudit" method="post" class="form-horizontal">
- <form:hidden path="id"/>
- <form:hidden path="home"/>
- <form:hidden path="act.taskId"/>
- <form:hidden path="act.taskName"/>
- <form:hidden path="act.taskDefKey"/>
- <form:hidden path="act.procInsId"/>
- <form:hidden path="act.procDefId"/>
- <form:hidden id="flag" path="act.flag"/>
- <sys:message content="${message}"/>
- <c:set var="status" value="${caseInfo.act.status}" />
- <div class="form-group layui-row first lw7">
- <div class="form-group-label"><h2>基础信息</h2></div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label"><span class="require-item">*</span>案例类别:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control layui-input required" readonly="true" value="${caseInfo.caseCategory.name}"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm6">
- <label class="layui-form-label double-line"><span class="require-item">*</span>案例名称:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control layui-input required" readonly="true" value="${caseInfo.name}"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm6">
- <label class="layui-form-label double-line"><span class="require-item">*</span>施工时间:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control layui-input required" readonly="true" value="<fmt:formatDate value="${caseInfo.startDate}" pattern="yyyy-MM-dd"/>"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm6">
- <label class="layui-form-label double-line">案例来源:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control layui-input required" readonly="true" value="${fns:getDictLabel(caseInfo.source,'case_source','')}"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm6">
- <label class="layui-form-label double-line"><span class="require-item">*</span>工程所在地:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control layui-input required" readonly="true" value="${caseInfo.area.name}"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label double-line">所属项目:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control layui-input required" readonly="true" value="<c:choose><c:when test="${caseInfo.ext eq 0}">${caseInfo.project.projectName}</c:when><c:otherwise>${caseInfo.contractName}</c:otherwise></c:choose>"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label">设计单位:</label>
- <div class="layui-input-block">
- <table id="bankinfo2" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th width="40">序号</th>
- <th >单位名称</th>
- <th width="120"class="">联系人名称</th>
- <th width="170">联系方式</th>
- <th width="170">邮箱</th>
- </tr>
- </thead>
- <tbody id="caseDesignInfoList">
- <c:forEach items="${caseInfo.caseDesignInfoList}" var="buyDetails" varStatus="status">
- <tr>
- <td>${status.index + 1}</td>
- <td title="${buyDetails.name}">${buyDetails.name}</td>
- <td>${buyDetails.linkedman}</td>
- <td>${buyDetails.mobile}</td>
- <td>${buyDetails.email}</td>
- </tr>
- </c:forEach>
- <c:if test="${linkManSize == 0}">
- <tr>
- <td colspan="8">暂无数据</td>
- </tr>
- </c:if>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label">建设单位:</label>
- <div class="layui-input-block">
- <table id="bankinfo" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th width="40">序号</th>
- <th >单位名称</th>
- <th width="120"class="">联系人名称</th>
- <th width="170">联系方式</th>
- <th width="170">邮箱</th>
- </tr>
- </thead>
- <tbody id="caseBuildInfoList">
- <c:forEach items="${caseInfo.caseBuildInfoList}" var="buyDetails" varStatus="status">
- <tr>
- <td>${status.index + 1}</td>
- <td title="${buyDetails.name}">${buyDetails.name}</td>
- <td>${buyDetails.linkedman}</td>
- <td>${buyDetails.mobile}</td>
- <td>${buyDetails.email}</td>
- </tr>
- </c:forEach>
- <c:if test="${linkManSize == 0}">
- <tr>
- <td colspan="8">暂无数据</td>
- </tr>
- </c:if>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label">施工单位:</label>
- <div class="layui-input-block">
- <table id="bankinfo3" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th width="40">序号</th>
- <th >单位名称</th>
- <th width="120"class="">联系人名称</th>
- <th width="170">联系方式</th>
- <th width="170">邮箱</th>
- </tr>
- </thead>
- <tbody id="caseExecuteInfoList">
- <c:forEach items="${caseInfo.caseExecuteInfoList}" var="buyDetails" varStatus="status">
- <tr>
- <td>${status.index + 1}</td>
- <td title="${buyDetails.name}">${buyDetails.name}</td>
- <td>${buyDetails.linkedman}</td>
- <td>${buyDetails.mobile}</td>
- <td>${buyDetails.email}</td>
- </tr>
- </c:forEach>
- <c:if test="${linkManSize == 0}">
- <tr>
- <td colspan="8">暂无数据</td>
- </tr>
- </c:if>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm6 with-textarea">
- <label class="layui-form-label"><span class="require-item">*</span>项目特征:</label>
- <div class="layui-input-block">
- <textarea readonly="true" htmlEscape="false" rows="4" maxlength="2000" class="form-control ">${caseInfo.peculiarity}</textarea>
- </div>
- </div>
- <div class="layui-item layui-col-sm6 with-textarea">
- <label class="layui-form-label">案例特性:</label>
- <div class="layui-input-block">
- <textarea readonly="true" htmlEscape="false" rows="4" maxlength="2000" class="form-control ">${caseInfo.feature}</textarea>
- </div>
- </div>
- <div class="layui-item layui-col-sm6">
- <label class="layui-form-label double-line">造价指标:单位造价(元):</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control number layui-input" value="${caseInfo.price}"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm6">
- <label class="layui-form-label"><span class="require-item">*</span>单位:</label>
- <div class="layui-input-block">
- <input htmlEscape="false" class="form-control required layui-input" value="${caseInfo.unit}"/>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label double-line">材料消耗量指标:</label>
- <div class="layui-input-block">
- <table id="bankinfo4" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th width="40">序号</th>
- <th width="">名称</th>
- <th width="220">型号</th>
- <th width="110">单位消耗量</th>
- <th width="90">单位</th>
- <th width="100">合价</th>
- <th width="90">比重</th>
- </tr>
- </thead>
- <tbody id="caseMaterialsNormList">
- <c:forEach items="${caseInfo.caseMaterialsNormList}" var="buyDetails" varStatus="status">
- <tr>
- <td>${status.index + 1}</td>
- <td title="${buyDetails.name}">${buyDetails.name}</td>
- <td>${buyDetails.type}</td>
- <td>${buyDetails.unitContent}</td>
- <td>${buyDetails.unit}</td>
- <td>${buyDetails.allPrice}</td>
- <td>${buyDetails.proportion}</td>
- </tr>
- </c:forEach>
- <c:if test="${linkManSize == 0}">
- <tr>
- <td colspan="8">暂无数据</td>
- </tr>
- </c:if>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label double-line">机械消耗量指标:</label>
- <div class="layui-input-block">
- <table id="bankinfo5" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th width="40">序号</th>
- <th width="">名称</th>
- <th width="220">型号</th>
- <th width="110">单位消耗量</th>
- <th width="90">单位</th>
- <th width="100">合价</th>
- <th width="90">比重</th>
- </tr>
- </thead>
- <tbody id="caseMechanicalNormList">
- <c:forEach items="${caseInfo.caseMechanicalNormList}" var="buyDetails" varStatus="status">
- <tr>
- <td>${status.index + 1}</td>
- <td title="${buyDetails.name}">${buyDetails.name}</td>
- <td>${buyDetails.type}</td>
- <td>${buyDetails.unitContent}</td>
- <td>${buyDetails.unit}</td>
- <td>${buyDetails.allPrice}</td>
- <td>${buyDetails.proportion}</td>
- </tr>
- </c:forEach>
- <c:if test="${linkManSize == 0}">
- <tr>
- <td colspan="8">暂无数据</td>
- </tr>
- </c:if>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label double-line">人工消耗量指标:</label>
- <div class="layui-input-block">
- <table id="bankinfo6" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th width="40">序号</th>
- <th width="">名称</th>
- <th width="220">型号</th>
- <th width="110">单位消耗量</th>
- <th width="90">单位</th>
- <th width="100">合价</th>
- <th width="90">比重</th>
- </tr>
- </thead>
- <tbody id="casePeopleNormList">
- <c:forEach items="${caseInfo.casePeopleNormList}" var="buyDetails" varStatus="status">
- <tr>
- <td>${status.index + 1}</td>
- <td title="${buyDetails.name}">${buyDetails.name}</td>
- <td>${buyDetails.type}</td>
- <td>${buyDetails.unitContent}</td>
- <td>${buyDetails.unit}</td>
- <td>${buyDetails.allPrice}</td>
- <td>${buyDetails.proportion}</td>
- </tr>
- </c:forEach>
- <c:if test="${linkManSize == 0}">
- <tr>
- <td colspan="8">暂无数据</td>
- </tr>
- </c:if>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label double-line">主要材料单价:</label>
- <div class="layui-input-block">
- <table id="contentTable" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <th>材料名称</th>
- <th width="100px">规格型号</th>
- <th width="60px">单位</th>
- <th width="90px">材料含税价</th>
- <th width="90px">材料除税价</th>
- <th width="90px">价格取用日期</th>
- <th width="80px">税率</th>
- <th width="80px">材质</th>
- <th>品牌</th>
- </tr>
- </thead>
- <tbody id="workAccountList">
- <c:forEach items="${caseInfo.caseMaterialsList}" var="caseMaterials" varStatus="status">
- <tr id="index${status.index}">
- <td class="hide">${caseMaterials.id}</td>
- <td>
- <a title="${caseMaterials.name}" href="javascript:void(0)" onclick="openDialogView('查看材料单信息', '${ctx}/casematerials/caseMaterials/form?id=${caseMaterials.id}&tabId=1','90%','90%')">
- ${caseMaterials.name}
- </a>
- </td>
- <td title="${caseMaterials.specification}">${caseMaterials.specification}</td>
- <td title="${caseMaterials.calculateUnit}">${caseMaterials.calculateUnit}</td>
- <td title="${caseMaterials.taxPrice}">${caseMaterials.taxPrice}</td>
- <td title="${caseMaterials.price}">${caseMaterials.price}</td>
- <td ><fmt:formatDate value="${caseMaterials.useDate}" pattern="yyyy-MM-dd"/></td>
- <td class="hide">${fns:getDictLabel(caseMaterials.source, 'caseM_source', '')}</td>
- <td title="${caseMaterials.tax}">${caseMaterials.tax}</td>
- <td title="${caseMaterials.material}">${caseMaterials.material}</td>
- <td title="${caseMaterials.brand}">${caseMaterials.brand}</td>
- <td class="hide">${caseMaterials.pp}</td>
- <td class="hide">${caseMaterials.area.name}</td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-item layui-col-sm12 with-textarea">
- <label class="layui-form-label double-line">偏差分析/记录/其他情况:</label>
- <div class="layui-input-block">
- <textarea htmlEscape="false" rows="4" class="form-control ">${caseInfo.record}</textarea>
- </div>
- </div>
- <div class="form-group layui-row">
- <div class="layui-item layui-col-sm12">
- <label class="layui-form-label">案例类型:</label>
- <div class="layui-input-block">
- <input type="radio" value="1" class="i-checks" id="shareStatus" name="shareStatus" onclick="display(this.value)">
- <label>一般案例</label>
- <input type="radio" value="2" class="i-checks" id="shareStatus2" name="shareStatus" onclick="display(this.value)" >
- <label>典型案例</label>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group layui-row">
- <div class="form-group-label"><h2>附件信息</h2></div>
- <div class="layui-item layui-col-xs12" style="padding:0 16px;">
- <table id="upTable" class="table table-bordered table-condensed details">
- <thead>
- <tr>
- <%-- <th>序号</th>--%>
- <th>文件</th>
- <th>上传人</th>
- <th>上传时间</th>
- <th width="150px">操作</th>
- </tr>
- </thead>
- <tbody id="file_attachment">
- <c:forEach items="${caseInfo.workAttachments}" varStatus="status" var="workClientAttachment">
- <tr>
- <%--<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}" pattern="yyyy-MM-dd"/></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">下载</a>
- <%--<a href="${ctx}/caseinfo/caseInfo/downLoadAttach?file=${workClientAttachment.url}" class="btn btn-success btn-xs">下载</a>--%>
- <%--<a href="${workClientAttachment.url}" class="btn btn-info btn-xs">下载</a>--%>
- <%--<a href="${ctx}/caseinfo/caseInfo/deleteFileFromAliyun?attachmentId=${workClientAttachment.id}&id=${caseInfo.id}">删除</a>--%>
- </div>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
- </div>
- <div class="form-group layui-row lw8">
- <div class="form-group-label"><h2>审批意见</h2></div>
- <div class="layui-item layui-col-sm12 with-textarea">
- <label class="layui-form-label">审批意见:</label>
- <div class="layui-input-block">
- <form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />
- <input type="file" name="upload_files" style="display: none;">
- </div>
- </div>
- </div>
- <div class="form-group layui-row">
- <div class="form-group-label"><h2>审批流程</h2></div>
- <div class="layui-item layui-col-xs12 form-table-container" >
- <act:flowChart procInsId="${caseInfo.act.procInsId}"/>
- <act:histoicFlow procInsId="${caseInfo.act.procInsId}"/>
- </div>
- </div>
- <div class="form-group layui-row page-end"></div>
- </form:form>
- </div>
- </div>
- </body>
- </html>
|