<template>
	<div class="demo-adv-ledgerComputer-search">
		<cl-adv-btn>筛选</cl-adv-btn>
		<cl-adv-search :items="items" :op-list="opList" />
	</div>
</template>

<script lang="ts">
import { AdvSearchItem } from "cl-admin-crud-vue3/types";
import { defineComponent, ref } from "vue";

export default defineComponent({
	setup() {
		const items = ref<AdvSearchItem[]>([
			{
				prop: "new_date",
				label: "目标日期",
				span: 18,
				component: {
					name: "el-date-picker",
					props: {
						type: "daterange",
						rangeSeparator: "至",
						startPlaceholder: "开始日期",
						endPlaceholder: "结束日期",
						format: "YYYY-MM-DD",
						valueFormat: "YYYY-MM-DD"
					}
				},
				rules: {
					required: true,
					message: "日期不能为空"
				}
			},
			{
				prop: "shop_id",
				label: "供应商名",
				span: 18,
				component: {
					name: "shuyouRentComputerShopSelect",
					props: {
						placeholder: "请选择供应商"
					}
				}
			},
			{
				label: "租机编号",
				prop: "pc_num",
				span: 18,
				component: {
					name: "el-input",
					attrs: {
						placeholder: "不填查询所有"
					}
				}
			}
		]);

		const opList = ref<string[]>(["search", "reset", "clear", "close"]);

		return {
			items,
			opList
		};
	}
});
</script>

<style lang="scss" scoped></style>
