<!-- 现金流量表 -->
<div th:substituteby="common/resourceMainHeader :: resourceMainHeader"></div>
<link rel="stylesheet" href="/css/external/enterPriseBusiness/reportView.css" type="text/css">
<style>
	.financeBody .financeReport-body .table tr td:first-child {
		width:70%
	}
	.financeBody .financeReport-body .table tr td:last-child {
		width:30%
	}
	.nomore-content {
	    background: #fff url(/images/weekwork/nomore_content.png) no-repeat center center;
	    position: relative;
	    background-size: 50% auto;
	}
	.nomore-font {
	    position: absolute;
	    width: 108px;
	    left: 50%;
	    top: 80%;
	    -webkit-transform: translate(-50%,-50%);
	    transform: translate(-50%,-50%);
	    text-align: center;
	    font-size: 18px;
	    color: #ccc;
	    font-family: "Microsoft YaHei";
	}
</style>
<div class="financeBody">
	<div class="financeReport-leftswitch"></div>
	<th:block th:if="${not #lists.isEmpty(financeReport?.cashFlowVoList)}" >
		<div class="financeReport-body" style="display:block;left:10%">
			<h2 th:text="${financeReport?.year}+'现金流量表'"></h2>
			<h4 th:text="'金额单位：'+${financeReport?.amountUnit?.name}"></h4>
			<table class="table">
				<tr>
					<td>项目</td>
					<td>本期</td>
				</tr>
				<tr th:each="cashFlow,cashFlowStat:${financeReport?.cashFlowVoList}">
					<!-- 非输入项 -->
					<th:block th:if="${cashFlow?.financeReportItem?.input==false}">
						<td class="noInputItem" th:style="${cashFlow?.financeReportItem?.style}"><textarea readonly th:style="${cashFlow?.financeReportItem?.style}" th:utext="${cashFlow?.financeReportItem?.name}"></textarea></td>
						<td class="nocontent">--</td>
					</th:block>
					<!-- 输入项 -->
					<th:block th:if="${cashFlow?.financeReportItem?.input==true}">
						<td th:style="${cashFlow?.financeReportItem?.style}"><textarea readonly th:style="${cashFlow?.financeReportItem?.style}" th:utext="${cashFlow?.financeReportItem?.name}"></textarea></td>
						<td class="insertionPoint" th:utext="${cashFlow?.itemAmount}"></td>
					</th:block>
				</tr>
			</table>
		</div>
	</th:block>
	<th:block th:if="${#lists.isEmpty(financeReport?.cashFlowVoList)}" >
		<div class="financeReport-body nomore-content" style="display:block;left:10%">
			<h2 th:text="${financeReport?.year}+'现金流量表'"></h2>
			<div class="nomore-font">本期无报表<div>
		</div>
	</th:block>
	
	<div class="financeReport-rightswitch"></div>
</div>
<script type="text/javascript" src="/js/external/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
function commaDelimiter(value,maxlength,errortipselect){//需要加逗号的值
	if( value=='' ){
		return value;
	}else{
		if( !(/^(\-|\+)?\d+(\.\d+)?$/.test(value.split(',').join(''))) ){//不符合正数或负数或小数时把逗号通通去掉
			return value.split(',').join('');
		}else{
			var lastnumber = '',prevnumber = value.split('.')[0].split(',').join('');
			lastnumber = value.indexOf('.')>0?'.'+value.split('.')[1]:'';//有小数点时,添加完逗号后需要把小数点后的内容加回来
			//对小数点前的进行操作,倒数每隔三位添加一个逗号
			return prevnumber.toString().replace(new RegExp('(\\d)(?=(\\d{3})+$)','ig'),"$1,") + lastnumber;
		}
	}
};
	$(".insertionPoint").each(function(){
		var insertionVal=$(this).text().split(',').join('');
		$(this).text(commaDelimiter(insertionVal));
	})
</script>