<template>
	<view>
		<view>
			<hs-input label="申请人" v-model="form.applyUserName" disabled></hs-input>
			<hs-dept-select label="申请部门" v-model="form.deptId" :autofill="true"></hs-dept-select>
			<hs-dict-select label="物资属性" dictKey="goods_property_type" v-model="form.purchaseType" />
			<hs-input label="申请原因" v-model="form.remark" model="textarea"></hs-input>
			<hs-input label="用途" v-model="form.whatUse" model="textarea"></hs-input>
			<!-- <hs-dict-select label="物品类型" dictKey="goods_storage_type" v-model="form.goodsType" /> -->
			<hs-input label="物品名称" v-model="form.goodsName"></hs-input>
			<hs-input label="规格型号" v-model="form.goodsGg"></hs-input>
			<hs-input label="需求数量" v-model="form.wantUseAmount"></hs-input>
			<!-- <hs-input label="需求数量" v-model="form.wantUseAmount" model="number"></hs-input> -->
			<hs-input label="预估单价" v-model="form.ygUnitPrice"></hs-input>
			<hs-input label="预估总价" v-model="form.ygTotalPrices"></hs-input>
			<hs-photo label="请添加照片" limit="5" v-model="form.photos"></hs-photo>
		</view>
		<u-gap height="70" bgColor="#ffffff"></u-gap>
		<hs-flow-submit ref="flowSubmit" @verify="verify" :data="form" api="purchase"></hs-flow-submit>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					applyUserName: '',
					photos: ''
				}
			}
		},
		onLoad() {
			//申请人初始化
			this.form.applyUserName = uni.getStorageSync("userInfo").nickName
		},
		methods: {
			verify() {
				console.log("提交", this.form)
				this.$refs.flowSubmit.submit()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.desc {
		padding: 15rpx 5rpx;
	}

	.bottim_view {
		padding: 5px 20px 30px;
		position: fixed;
		left: 0px;
		bottom: 0px;
		width: 100%;
		height: 40px;
		background-color: #ffffff;
	}
</style>
