﻿<template>
	<transition name="el-zoom-in-center">
		<div class="NCC-preview-main">
			<div class="NCC-common-page-header">
				<el-page-header @back="goBack" :content="'详情'"/>
			</div>
			<el-row :gutter="15"  class="main" :style="{margin: '0 auto',width:'100%'}">
				<el-form ref="elForm" :model="dataForm" size="medium" label-width="115px" label-position="right" >
					
					<el-col :span="24" >
						<el-form-item label="登记单号" prop="autoNo">
							{{dataForm.autoNo}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="资产名称" prop="fullName">
							{{dataForm.fullName}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="资产编号" prop="enCode">
							{{dataForm.enCode}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="资产类型" prop="capitalType">
							{{dataForm.capitalType}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="使用期限" prop="duration">
						    {{dataForm.duration}}月
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="生产日期" prop="productionDate">
							{{dataForm.productionDate| toDate("yyyy-MM-dd")}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="到期时间" prop="endDate">
							{{dataForm.endDate| toDate("yyyy-MM-dd")}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="产品价格" prop="price">
							{{ dataForm.price | currency('¥') }}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="预计价值" prop="planAmount">
							{{ dataForm.planAmount | currency('¥') }}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="管理员" prop="admin">
							{{dataForm.admin}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="使用部门" prop="useOrganize">
						    {{dataForm.useOrganize}}
						</el-form-item>
					</el-col>
					<el-col :span="24" >
						<el-form-item label="使用人员" prop="useUser">
						   {{dataForm.useUser}}
						</el-form-item>
					</el-col>
					<el-col :span="24" >
						<el-form-item label="资产描述" prop="description">
							{{dataForm.description}}
						</el-form-item>
					</el-col>
					<el-col :span="24" >
						<el-form-item label="资产图片" prop="photo">
							<NCC-UploadImg v-model="dataForm.photo"  disabled>
							</NCC-UploadImg>
						</el-form-item>
					</el-col>
					<el-col :span="24" >
						<el-form-item label="备注" prop="remark">
							{{dataForm.remark}}
						</el-form-item>
					</el-col>
                    <el-col :span="12" >
						<el-form-item label="登记人" prop="creatorUserId">
							{{dataForm.creatorUserId}}
						</el-form-item>
					</el-col>
					<el-col :span="12" >
						<el-form-item label="登记时间" prop="creatorTime">
							{{dataForm.creatorTime| toDate("yyyy-MM-dd")}}
						</el-form-item>
					</el-col>
				</el-form>
			</el-row>
		</div>
	</transition>
</template>
<script>
	import request from '@/utils/request'
	import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
	import { previewDataInterface } from '@/api/systemData/dataInterface'
	export default {
		components: {},
		props: [],
		data() {
			return {
				loading: false,
				visible: false,
				isDetail: false,
				dataForm: {
					creatorUserId:undefined,
					creatorTime:undefined,
					autoNo:undefined,
					fullName:undefined,
					enCode:undefined,
					capitalType:undefined,
					duration:0,
					productionDate:undefined,
					endDate:undefined,
					price:0,
					planAmount:0,
					admin:undefined,
					useOrganize:undefined,
					useUser:undefined,
					description:undefined,
					photo:[],
					remark:undefined,
					lastModifyUserId:undefined,
					lastModifyTime:undefined,
				},
			}
		},
		computed: {},
        watch: {},
        created() {
		},
		mounted() {
        },
		methods: {
			goBack() {
                this.$emit('detailRefresh')
            },
			init(id) {
				this.dataForm.id = id || 0;
                this.visible = true;
				this.$nextTick(() => {
					this.$refs['elForm'].resetFields();
					if (this.dataForm.id) {
						request({
							url: '/api/SubDev/ZyOaCapital/Actions/GetCapitalInfo/' + this.dataForm.id,
							method: 'get'
						}).then(res =>{
							this.dataForm = res.data;
						})
					}
				})
			},
		}
	}
</script>
