<template>
	<view class="add">
		<!-- 设备信息 -->
		<view class="main">
			<u--form labelPosition="left" labelAlign="center" :model="damage" ref="form1">
				<u-form-item label="设备名称" prop="equipName" borderBottom labelWidth="auto" ref="item1">
					<u-text :text="damage.equipName"></u-text>
				</u-form-item>
				<u-form-item label="设备编号" prop="equipNo" labelWidth="auto" borderBottom>
					<u-text :text="damage.equipNo"></u-text>
				</u-form-item>
				<u-form-item label="设备批次" prop="batch" borderBottom labelWidth="auto" ref="item1">
					<u-text :text="damage.batch"></u-text>
				</u-form-item>
				<u-form-item label="购买客户" prop="cname" labelWidth="auto" borderBottom>
					<u-text :text="damage.cname"></u-text>
				</u-form-item>
				<u-form-item label="报损数量" prop="damageNum" labelWidth="auto" borderBottom>
					<u-text :text="damage.damageNum"></u-text>
				</u-form-item>
				<u-form-item label="报损日期" prop="damageTime" labelWidth="auto" borderBottom>
					<u-text :text="damage.damageTime"></u-text>
				</u-form-item>
				<u-form-item label="报损原因" prop="damageReason" labelWidth="auto" borderBottom>
					<u-text :text="damage.damageReason"></u-text>
				</u-form-item>
				<u-form-item label="类型" prop="inTime" labelWidth="auto" borderBottom>
					<view class="c-status">
						<u-tag text="入 库" plain size="mini" type="success" v-if="damage.type=='1'"></u-tag>
						<u-tag text="出 库" plain size="mini"  v-if="damage.type=='0'"></u-tag>
					</view>
				</u-form-item>
			</u--form>
		</view>
		
	</view>
</template>

<script>
	export default {

		data() {
			return {
				damage: {},
			}
		},

		onLoad: function(options) {
			if (options.form) {
				let data = JSON.parse(options.form);
				this.damage = data
				
			}
		},
		onShow: function() {
			
		},
		created() {
		},
		methods: {
		}
	}
</script>

<style lang="scss">

	.add {
		background: #f6f6f6;
		padding: 2.667vw;
		height: 95vh;

		.main {
			background: #ffffff;
			margin-bottom: 2.667vw;
			padding: 2vw;
			border-radius: 8px;
			.c-status {
				display: flex;
			}

			
		}
	}
</style>
