<template>
	<view>
		<u-popup :show="show" closeOnClickOverlay mode="top" @close="closePopup">
			<view class="search_list">
				<u-form labelPosition="left" :model="form" labelWidth="180" labelAlign="left" class="baseForm">
					<u-form-item label="牌号:" class="item-form" borderBottom prop="assetType">
						<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.brandNum" placeholder="请输入">
						</uni-easyinput>
					</u-form-item>
					<u-form-item label="物品编码:" class="item-form" borderBottom prop="assetType">
						<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.categoryCode"
							placeholder="请输入">
						</uni-easyinput>
					</u-form-item>
					<u-form-item label="物品名称:" class="item-form" borderBottom prop="assetType">
						<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.contactName"
							placeholder="请输入">
						</uni-easyinput>
					</u-form-item>
				</u-form>
			</view>
			<view class="operate_box rx-bc">
				<u-button size="small" class="u-reset-button" @click="reset">
					重置
				</u-button>
				<u-button type="success" size="small" class="u-reset-button" @click="submit">
					确定
				</u-button>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		components: {},
		props: [],
		data() {
			return {
				form: {
					brandNum: "",
					categoryCode: "",
					categoryName: ""
				},
				show: false,
			}
		},
		methods: {
			open() {
				this.show = true;
			},
			closePopup() {

			},
			reset() {
				this.form = {
					brandNum: "",
					categoryCode: "",
					contactName: ""
				}
				this.submit();
			},
			submit() {
				this.$emit('succeed',this.form);
				this.show = false;
			},
		}
	}
</script>

<style lang="scss" scoped>
	.search_list {
		padding: 0 20rpx;
	}
	
	.operate_box {
		padding: 10rpx 32rpx;
	
		/deep/ .u-button {
			width: 40%;
		}
	}
	
	.item-form{
		/deep/ .u-form-item__body__left__content__label{
			font-size: 28rpx;
		}
	}
</style>