|  | @@ -0,0 +1,172 @@
 | 
	
		
			
				|  |  | +<%@ page contentType="text/html;charset=UTF-8" %>
 | 
	
		
			
				|  |  | +<%@ include file="/webpage/include/taglib.jsp"%>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<form id="subForm"  action="#" onsubmit="return false;" method="post" class="form-horizontal">
 | 
	
		
			
				|  |  | +    <c:forEach items="${signList}" var="sign">
 | 
	
		
			
				|  |  | +        <c:if test="${sign =='completeAccount'}">
 | 
	
		
			
				|  |  | +            <div class="layui-item nav-btns" style="padding-left:0px;">
 | 
	
		
			
				|  |  | +                <a class="nav-btn nav-btn-add" onclick="addRowCost('#investmentCostList',investmentCostIdx,investmentCostTpl)" title="新增"><i class="fa fa-plus"></i> 新增</a>
 | 
	
		
			
				|  |  | +                <table:importExcelCost url="${ctx}/workContent/workContentCompleteAccount/import"></table:importExcelCost><!-- 导入按钮 -->
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            <table id="contentTable" class="table table-bordered table-condensed can-edit">
 | 
	
		
			
				|  |  | +                <thead>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    <tr>
 | 
	
		
			
				|  |  | +                        <th colspan="9" style="font-size: 20px">输变电工程竣工结算审核单</th>
 | 
	
		
			
				|  |  | +                    </tr>
 | 
	
		
			
				|  |  | +                    <tr>
 | 
	
		
			
				|  |  | +                        <th class="hide"></th>
 | 
	
		
			
				|  |  | +                        <th>序号</th>
 | 
	
		
			
				|  |  | +                        <th>单位工程名称</th>
 | 
	
		
			
				|  |  | +                        <th>合同价(元)</th>
 | 
	
		
			
				|  |  | +                        <th>送审价(元)</th>
 | 
	
		
			
				|  |  | +                        <th>审定价(元)</th>
 | 
	
		
			
				|  |  | +                        <th>核增额(元)</th>
 | 
	
		
			
				|  |  | +                        <th>核减额(元)</th>
 | 
	
		
			
				|  |  | +                        <th>核增、核减额(%)</th>
 | 
	
		
			
				|  |  | +                        <th width="60" rowspan="3">操作</th>
 | 
	
		
			
				|  |  | +                    </tr>
 | 
	
		
			
				|  |  | +                </thead>
 | 
	
		
			
				|  |  | +                <tbody id="investmentCostList">
 | 
	
		
			
				|  |  | +                </tbody>
 | 
	
		
			
				|  |  | +            </table>
 | 
	
		
			
				|  |  | +        </c:if>
 | 
	
		
			
				|  |  | +    </c:forEach>
 | 
	
		
			
				|  |  | +	<script type="text/template" id="investmentCostTpl">//<!--
 | 
	
		
			
				|  |  | +        <tr id="investmentCostList{{idx}}">
 | 
	
		
			
				|  |  | +            <td class="hide">
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_id" subName="id" class="contentDetail" type="hidden" value="{{row.id}}"/>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_delFlag" subName="delFlag" class="contentDetail" type="hidden" value="0"/>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_type" subName="type" class="contentDetail" type="hidden" value="completeAccount"/>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_costType" subName="costType" class="contentDetail"  type="hidden" value="{{row.costType}}"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_costNum" subName="costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeName" subName="completeName" value="{{row.completeName}}" type="text" class="form-control contentDetail"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeContract" subName="completeContract" type="text" value="{{row.completeContract}}"  class="form-control number contentDetail money"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeSubmit" subName="completeSubmit" type="text" value="{{row.completeSubmit}}"   class="form-control number contentDetail money"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeExamine" subName="completeExamine" type="text" value="{{row.completeExamine}}"   class="form-control number contentDetail money"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeAdd" subName="completeAdd" type="text"  value="{{row.completeAdd}}"  class="form-control number  contentDetail money"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeReduce" subName="completeReduce" type="text"    value="{{row.completeReduce}}"  class="form-control number contentDetail"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +            <td>
 | 
	
		
			
				|  |  | +                <input id="investmentCostList{{idx}}_completeRate" subName="completeRate" type="text"  value="{{row.completeRate}}"  class="form-control number contentDetail"/>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            <td class="text-center op-td">
 | 
	
		
			
				|  |  | +                        <a href="#" onclick="delRow(this, '#investmentCostList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
 | 
	
		
			
				|  |  | +            </td>
 | 
	
		
			
				|  |  | +        </tr>//-->
 | 
	
		
			
				|  |  | +    </script>
 | 
	
		
			
				|  |  | +    <script type="text/javascript">
 | 
	
		
			
				|  |  | +        var investmentCostIdx = 0, investmentCostTpl = $("#investmentCostTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 | 
	
		
			
				|  |  | +        var validateForm2;
 | 
	
		
			
				|  |  | +        $(function(){
 | 
	
		
			
				|  |  | +            validateForm2 = $("#subForm").validate({
 | 
	
		
			
				|  |  | +                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);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            var data = ${fns:toJson(investmentCostList)};
 | 
	
		
			
				|  |  | +            for (var i=0; i<data.length; i++){
 | 
	
		
			
				|  |  | +                addRowCost('#investmentCostList', investmentCostIdx, investmentCostTpl,data[i]);
 | 
	
		
			
				|  |  | +                $("#investmentCostList"+i+"_nodeTypes").val(data[i].nodeTypes);
 | 
	
		
			
				|  |  | +                $("#investmentCostList"+i+"_expenseType").val(data[i].expenseType);
 | 
	
		
			
				|  |  | +                $("#investmentCostList"+i+"_unit").val(data[i].unit);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            $(":input.money").change();
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function addRowCost(list, idx, tpl, row){
 | 
	
		
			
				|  |  | +            idx = idx+1;
 | 
	
		
			
				|  |  | +            bornTemplete(list, idx, tpl, row, idx);
 | 
	
		
			
				|  |  | +            investmentCostIdx +=1;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function bornTemplete(list, idx, tpl, row, idx1){
 | 
	
		
			
				|  |  | +            var idx1 = $("#investmentCostList tr").length +1;
 | 
	
		
			
				|  |  | +            $(list).append(Mustache.render(tpl, {
 | 
	
		
			
				|  |  | +                idx: idx, delBtn: true, row: row,
 | 
	
		
			
				|  |  | +                order:idx1 + 1, idx1:idx1
 | 
	
		
			
				|  |  | +            }));
 | 
	
		
			
				|  |  | +            $(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");
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        function delRow(obj, prefix,idx){
 | 
	
		
			
				|  |  | +            var id = $(prefix+"_id");
 | 
	
		
			
				|  |  | +            var delFlag = $(prefix+"_delFlag");
 | 
	
		
			
				|  |  | +            if(id.val()==null||id.val()==''){
 | 
	
		
			
				|  |  | +                $(obj).parent().parent().remove();
 | 
	
		
			
				|  |  | +            }else {
 | 
	
		
			
				|  |  | +                delFlag.val("1");
 | 
	
		
			
				|  |  | +                $(obj).parent().parent().hide();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function genRow(data) {
 | 
	
		
			
				|  |  | +            for (var i = 0; i < data.length; i++) {
 | 
	
		
			
				|  |  | +                addRowCost('#investmentCostList',investmentCostIdx,investmentCostTpl,data[i]);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            $(":input.money").change();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function genDetailStr(){
 | 
	
		
			
				|  |  | +            var costList = $("#investmentCostList tr");
 | 
	
		
			
				|  |  | +            var contentStr = "[";
 | 
	
		
			
				|  |  | +            for(var j=0; j<costList.length;j++){
 | 
	
		
			
				|  |  | +                contentStr+="{"
 | 
	
		
			
				|  |  | +                var idstr = $(costList[j]).attr("id");
 | 
	
		
			
				|  |  | +                var detail = $("tr[id="+idstr+"] .contentDetail");
 | 
	
		
			
				|  |  | +                for(var i=0; i<detail.length;i++){
 | 
	
		
			
				|  |  | +                    contentStr+="'"
 | 
	
		
			
				|  |  | +                    contentStr+=$(detail[i]).attr("subName");
 | 
	
		
			
				|  |  | +                    contentStr+="'"
 | 
	
		
			
				|  |  | +                    contentStr+=":";
 | 
	
		
			
				|  |  | +                    contentStr+="'"
 | 
	
		
			
				|  |  | +                    contentStr+=$(detail[i]).val();
 | 
	
		
			
				|  |  | +                    contentStr+="'"
 | 
	
		
			
				|  |  | +                    if(i!=detail.length-1){
 | 
	
		
			
				|  |  | +                        contentStr+=","
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                contentStr+="}"
 | 
	
		
			
				|  |  | +                if(j!=costList.length-1){
 | 
	
		
			
				|  |  | +                    contentStr+=","
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            contentStr += "]";
 | 
	
		
			
				|  |  | +            return contentStr;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        function genSecondDetailStr(){
 | 
	
		
			
				|  |  | +            return '';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    </script>
 | 
	
		
			
				|  |  | +</form>
 |