<!-- 差旅费报销 -->
<template>
	
	<view v-if="ExpenseBill">
		
		<h4>{{ExpenseBill.DEPT_NAME}}</h4>
		<h3>{{ExpenseBill.ACCEPT_NAME}}</h3>
		<div class="detail-top-base">
			<view class="span24">
				<text class="text-title">申请人：</text>
				<text >{{ExpenseBill.STAFF_NAME}}</text>
			</view>
			<text>{{$util.cutDate(ExpenseBill.FINANCEPROINST_CREATEDATE)}}</text>
		</div>
		<view class="detail-top-box">
			<view class="detail-top-bottom ">
				<view class="uni-flex span24" style="align-items: center;">
					<view class="detail-title">
						<i class="ico ico-ndbz"></i><text class="text-title">报销金额： </text>
						
					</view>
					<text style="color:#ec8538;">￥{{  $util.fmoney(ExpenseBill.PAYMENT_LOWER,2)}}</text>
				</view>
				<view class="uni-flex span24 mt8" style="align-items: center;">
					<view class="detail-title">
						<i class="ico ico-bm"></i><text class="text-title">报销部门：</text>
						
					</view>
					<text>{{ExpenseBill.ExpenseBill.DEPARTMENT_NAME}}</text>
				</view>
				<view class="detail-flex mt8" style="align-items: flex-start;" >
					<view class="detail-title">
						<i class="ico ico-jfmc"></i>支付方式：
					</view>
					<text >
						{{ExpenseBill.ExpenseBill.EXPENDBILL_DETILS}}
					</text>
				</view>
				<view class="detail-flex mt8" style="align-items: flex-start;">
					<div class="detail-title">
						<i class="ico ico-ccry"></i>出差人员：
					</div>
					<text>
						{{ExpenseBill.ExpenseBill.BUSINESS_PERSON}}
					</text>
				</view>
				<view class="detail-flex mt8" style="align-items: flex-start;" >
					<view class="detail-title">
						<i class="ico ico-ccsy"></i>出差事由：
					</view>
					<text >
						{{ExpenseBill.ExpenseBill.BUSINESS_REASON}}
					</text>
				</view>
				
				<view class="detail-flex mt8" style="align-items: flex-start;" v-if="ExpenseBill.PreFinanceList">
					<view class="detail-title">
						<i class="ico ico-xmgl"></i>项目关联：
					</view>
					<text class="linkText" @tap="toPage(ExpenseBill.PreFinanceList)">{{ExpenseBill.PreFinanceList.ACCEPT_NAME}} </text>
				</view>
			</view>
			<view class="detail-middle-box" 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>图 片
					</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>
	
	</view>

</template>

<script>
	import filesUnit from '@/components/filesComponent/fileUnit.vue'
	export default {
	
		props: ['ExpenseBill'],
		methods: {
			showImg (index){
				this.$emit('showImg',index)
			},
			toPage(item ) {
				this.$util.toNextRoute('navigateTo', "/pages/expenseApproval/expenseDetail?type="+item.ACCEPT_TYPE+"&id=" + item.FINANCEPROINST_ID)
			}
		},
		components:{
			filesUnit
		}
	}
</script>

<style scoped>
	@import url("/common/css/expensesTop.css");
	.linkText {
		margin-left: 16upx;
		text-decoration: underline;
		color: #72aaea;
	}
</style>
