<!-- 借款审批 -->
<template>
	<view v-if="ExpenseBill">
		
		<h3>{{ExpenseBill.ExpenseBill.PROJECT_NAME}}</h3>
		<div class="detail-top-base">
			<view class="span24">
				<text class="text-title">{{ExpenseBill.DEPT_NAME}}：</text>
				<text >{{ExpenseBill.STAFF_NAME}}</text>
			</view>
			<text v-if="ExpenseBill.ExpenseBill">{{ $util.cutDate(ExpenseBill.ExpenseBill.SETTL_DATE) }}</text>
		</div>
		<view class="uni-flex ai-center jc-between" >
			<view class="span24">
				<text class="text-title">施工单位：</text>
				<text >{{ExpenseBill.ExpenseBill.CONSTRUCTION_UNIT}}</text>
			</view>
			<view class="tip-text">{{[ExpenseBill.ExpenseBill.INTERIM_FINAL_SETTLEMENT_TEXT]}}</view>
		</view>
		<view class="uni-flex deposit-total ai-center jc-between mt24"  v-if="ExpenseBill.ExpenseBill">
			<div class="uni-flex ai-center">
				<div>结算金额：</div>
				<text class="span24" style="color:#ec8538;">￥{{$util.fmoney(ExpenseBill.ExpenseBill.TOTALAMOUNT,2)}}</text>
			</div>
			<div class="uni-flex ai-center">
				<div>实际支付：</div>
				<text class="span24" style="color:#ec8538;" >￥{{$util.fmoney(ExpenseBill.ExpenseBill.TOTALAMOUNT_PAY,2)}}</text>
			</div>
		</view>
		
			
		<view class="detail-top-box mt24" v-for="(item,index) in ExpenseBill.ExpenseDetail" :key="index">
			<div class="detail-title detail-card-title">
				第{{item.PERIODS}}期结算：
			</div>
			<view class="detail-top-bottom" >
					
				<view class="uni-flex span24 mt8 ai-center"  >
					<view class="detail-title">
						<i class="ico ico-ndbz"></i><text class="text-title">结算金额： </text>
					</view>
					<text >￥{{$util.fmoney(item.SETTL_AMOUNT,2)}}</text>
				</view>
				
				<view class="uni-flex span24 mt8 ai-center"  >
					<view class="detail-title">
						<i class="ico ico-khyh"></i><text class="text-title">实际支付： </text>
					</view>
					<text >￥{{$util.fmoney(item.PAY_AMOUNT,2)}}</text>
				</view>
				
			</view>
		
		</view>
		<view class="detail-top-box  mt24"  v-if="ExpenseBill.ExpenseBill">
			<view class="detail-card-title">合同结算情况</view>
			<view class="detail-top-bottom ">
				<div class="uni-flex ai-center jc-between">
					<view class="uni-flex ai-center">
					<div class="detail-title" style="color: #333;">
						合同总金额：
					</div>
					<text class="span24" style="color:#ec8538;">{{$util.fmoney(ExpenseBill.ExpenseBill.COMPACT_AMOUNT/10000,2)}}万</text>
					</view>
					<view class="uni-flex ai-center">
						<div class="detail-title" style="color: #333;">
							合同结算金额：
						</div>
						<text class="span24" style="color:#ec8538;">{{$util.fmoney(ExpenseBill.ExpenseBill.COMPACT_SETTLEAMOUNT/10000,2)}}万</text>
					</view>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						本期前累计计算进度款：
					</div>
					<text class="span24" >￥{{$util.fmoney(ExpenseBill.ExpenseBill.CURPRE_WARRANTYDEPOSIT,2)}}</text>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						本期前累计扣质保金：
					</div>
					<text class="span24" v>￥{{$util.fmoney(ExpenseBill.ExpenseBill.CURPRE_WARRANTYDEPOSIT,2)}}</text>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						本期前实际支付金额：
					</div>
					<text class="span24">￥{{$util.fmoney(ExpenseBill.ExpenseBill.CUR_PAYMENTAMOUNTPRO,2)}}</text>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						本期结算金额：
					</div>
					<text class="span24">￥{{$util.fmoney(ExpenseBill.ExpenseBill.CUR_SETTLEAMOUNT,2)}}</text>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						本期扣质保金：
					</div>
					<text class="span24">￥{{$util.fmoney(ExpenseBill.ExpenseBill.CUR_WARRANTYDEPOSIT,2)}}</text>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						累计扣质保金：
					</div>
					<text class="span24">￥{{$util.fmoney(ExpenseBill.ExpenseBill.TOTAL_WARRANTYDEPOSIT,2)}}</text>
				</div>
				<div class="uni-flex ai-center mt8">
					<div class="detail-title">
						本期实际支付金额：
					</div>
					<text class="span24" style="color:#ec8538;">￥{{$util.fmoney(ExpenseBill.ExpenseBill.CUR_PAYMENTAMOUNT,2)}}</text>
				</div>
			</view>
			
		</view>
		
		<view class="detail-top-box  detail-top-bottom mt24" v-if=" ExpenseBill.FileList || ExpenseBill.ImageList">
			
			<view class="attachment" v-if="ExpenseBill.FileList && ExpenseBill.FileList.length>0">
				<p class="detail-title">
					<i class="ico ico-fj"></i>
					<span>附 件</span>
				</p>
				<div class="imgBox">
					<filesUnit v-for="(file,i) in ExpenseBill.FileList" :fileItem="file" :key="i"></filesUnit>
					
				</div>
			</view>
			<view class="attachment" v-if="ExpenseBill.ImageList && ExpenseBill.ImageList.length>0">
				<div  class="detail-title">
					<i class="ico ico-tp"></i>
					<text>图 片</text>
				</div>
				<div class="imgBox">
					<image v-for="(arr,i) in ExpenseBill.ImageList" :key="i" :src="arr.IMAGE_URL" @tap="showImg(i)" mode="aspectFill" lazy-load/>
				</div>
			</view>
		</view>
	
	</view>
</template>

<script>
	import filesUnit from '@/components/filesComponent/fileUnit.vue'
	export default {
		props:['ExpenseBill','pageName'],
		methods: {
			showImg (index){
				this.$emit('showImg',index)
			}
		},
		components:{
			filesUnit
		}
	}
</script>

<style scoped>
	@import url("/common/css/expensesTop.css");
	.tip-text {
		color: #AE875F;
		font-size: 20rpx;
		padding: 2rpx 8rpx;
		border-radius: 4rpx;
		background: linear-gradient(to top,#ebddcf 0%, #fcfbf8 100%);
	}
	.deposit-total {
		background: linear-gradient(to top, #f0e4d8 0%, #fcfbf8 100%);
		height: 80rpx;
		padding: 0 20rpx;
		border-radius:  8rpx 8rpx ;
		color: #333;
		font-size: 24rpx;
	}
	.detail-card-title {
		color: #333333;
		font-size: 24rpx;
		background: #F4F5F7;
		height: 64rpx;
		line-height: 64rpx;
		padding-left: 30rpx;
	}
</style>
