<script>
export default {
  name: "quoteSearch",
  model:{
    prop: "quote",
    event: "update"
  },
  props:{
    quote: {
      type: Object,
      required: true
    },
    show:{
      type: Boolean,
      default: true
    }
  }
}
</script>

<template>
  <div v-show="show" class="quote-search">
    <el-form :model="quote" label-width="100px" label-position="top">
      <el-row :gutter="10">
        <el-col :span="3">
          <el-form-item label="客户编码">
            <el-input v-model="quote.customerNo"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="客户名称">
            <el-input v-model="quote.customerDesc"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="采购专员">
            <el-input v-model="quote.purchase"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="报价单号">
            <el-input v-model="quote.quoteVersionNo"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="客户询价单号">
            <el-input v-model="quote.customerInquiryNo"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="内部询价单号">
            <el-input v-model="quote.insideInquiryNo"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="3">
          <el-form-item label="项目编码">
            <el-input v-model="quote.projectNo"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="项目名称">
            <el-input v-model="quote.projectDesc"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="报价专员">
            <el-input v-model="quote.quoter"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label="状态">
            <el-select v-model="quote.status" style="width: 100%">
              <el-option label="全部" value=""></el-option>
              <el-option label="草稿" value="草稿"></el-option>
              <el-option label="下达" value="下达"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="报价日期">
            <div style="display: flex">
              <el-date-picker style="width: 47%" v-model="quote.startDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
              <div style="width: 6%;text-align: center">-</div>
              <el-date-picker style="width: 47%" v-model="quote.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
            </div>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item label=" ">
            <el-button @click="$emit('search')" v-if="isAuth('5011:query')">查 询</el-button>
            <el-button type="primary" @click="$emit('save')" v-if="isAuth('5011:save')">新 增</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<style scoped>
.quote-search{
  width: 1200px;
}
</style>
