<script setup>
import { ReloadOutlined, SearchOutlined } from "@ant-design/icons-vue";

defineProps({ modelValue: { type: Object, required: true }, simple: Boolean });
defineEmits(["reset"]);
</script>

<template>
  <section class="filter-panel">
    <div class="filter-grid">
      <label><span>工单编号</span><input v-model="modelValue.no" placeholder="如20260806-B01" /></label>
      <label><span>工单环节</span><select v-model="modelValue.stage"><option value="">选择工单环节</option><option>待分配派工</option><option>事件调查</option><option>待审核</option><option>回访结果填报</option></select></label>
      <label v-if="!simple"><span>信息来源</span><select v-model="modelValue.source"><option value="">选择信息来源</option><option>12398 电话</option></select></label>
      <label v-if="!simple"><span>致电日期</span><input v-model="modelValue.calledAt" type="date" /></label>
      <label v-if="!simple"><span>转办日期</span><input v-model="modelValue.transferredAt" type="date" /></label>
      <label><span>客户名称</span><input v-model="modelValue.customer" placeholder="输入客户名称" /></label>
      <label><span>联系方式</span><input v-model="modelValue.phone" placeholder="输入联系方式" /></label>
      <label v-if="!simple"><span>用户地址</span><input v-model="modelValue.address" placeholder="输入用户地址" /></label>
      <label v-if="!simple"><span>客户所在地区</span><input v-model="modelValue.region" placeholder="输入省市地区" /></label>
      <label v-if="!simple"><span>省份</span><select v-model="modelValue.province"><option value="">选择省份</option><option>天津</option></select></label>
      <label v-if="!simple"><span>事件类型</span><select v-model="modelValue.eventType"><option value="">选择事件类型</option><option>投诉事项</option></select></label>
      <label v-if="!simple"><span>转办事项分类</span><select v-model="modelValue.transferCategory"><option value="">选择转办事项分类</option><option>投诉事项</option></select></label>
      <label v-if="!simple"><span>问题分类</span><select v-model="modelValue.problemCategory"><option value="">选择问题分类</option><option>安全隐患</option></select></label>
    </div>
    <div class="filter-actions"><button class="outline-button" @click="$emit('reset')"><ReloadOutlined />重置</button><button class="primary-button"><SearchOutlined />查询</button></div>
  </section>
</template>
