<template>
  <el-form ref="requestForm" :model="request" label-width="45px">
    <el-row>
      <el-col :span="3">
        <el-form-item label="船号:">
          <ProjectSelect ref="projectSelectRef"  :dcCh="request.dcCh"/>
        </el-form-item>
      </el-col>
      <el-col :span="2">
        <el-form-item label="批量:">
          <el-input v-model="request.dcPl" type="search" placeholder="批量" ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-col :span="12">
          <el-form-item label="需求日期:" label-width="95px">
            <el-input v-model="request.form" type="search" placeholder="开始" />
          </el-form-item>
        </el-col>
        <el-col :span="1">
          <div style="width:100%;text-align:center;line-height: 28px;font-size: 14px">至</div>
        </el-col>
        <el-col :span="8">
          <el-form-item label-width="0px">
            <el-input v-model="request.to" type="search" placeholder="结束" />
          </el-form-item>
        </el-col>
      </el-col>
      <el-col :span="5">
        <el-form-item  >
          <el-date-picker v-model="qgjhrq" format="yyyy/MM/dd" value-format="yyyy/MM/dd" placeholder="请选择切割日期" type="date" style="width: 55%;" />
          <el-button type="primary" @click="plsr">修正切割日期</el-button>
        </el-form-item>
      </el-col>
      <el-col :span="8" style="text-align: right">
        <el-button type="primary" @click="loadData">查询</el-button>
        <el-button type="success" @click="save">保存</el-button>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
import ProjectSelect from "@/components/ProjectSelect/index.vue";

export default {
  name:'ZyjhHead',
  components: {ProjectSelect},
  data(){
    return {
      qgjhrq:'',
      request:{
        dcCh:'',
        dcPl:'',
      },
    }
  },
  methods:{
    save(){
      this.$emit('$save')
    },
    plsr(){
      this.$emit('$plsr',this.qgjhrq)
    },
    loadData(){
      this.request.dcCh=this.$refs.projectSelectRef.getDcch();

      const data=[
        {dcCh:'123',dcPl:'123',dcFd:'123',}
      ]
      this.$emit("initData",data)
    },
  }
}
</script>
