<!-- 企业需求弹框 -->
<template>
  <el-dialog title="基本信息" v-model="isShow">
    <el-form label-width="150px">
      <el-form-item label="所属企业">
        <el-input placeholder="请输入所属企业"></el-input>
      </el-form-item>
      <el-form-item label="所属需求名称">
        <el-input
          placeholder="请输入所属需求名称"
          v-model="modelValue.title"
        ></el-input>
      </el-form-item>
      <el-form-item label="需求描述">
        <Editor v-model="modelValue.introduce"></Editor>
      </el-form-item>
      <el-form-item label="行业分类">
        <el-select placeholder="请输入" style="width: 100px">
          <el-option></el-option>
        </el-select>
        <el-select placeholder="请输入" style="width: 100px">
          <el-option></el-option>
        </el-select>
        <el-select placeholder="请输入" style="width: 100px">
          <el-option></el-option>
        </el-select>
        <el-select placeholder="请输入" style="width: 100px">
          <el-option></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="需求类别">
        <el-checkbox-group v-model="modelValue.kinds">
          <el-checkbox
            v-for="item in checkList"
            :key="item.id"
            :label="item.name"
            >{{ item.name }}</el-checkbox
          >
        </el-checkbox-group>
        <!-- <el-checkbox-group v-model="checkList">
          <el-checkbox label="成果难题解决" />
          <el-checkbox label="成果储备/项目投资" />
          <el-checkbox label="新成果开发" />
          <el-checkbox label="校验检测" />
          <el-checkbox label="其他" />
        </el-checkbox-group> -->
      </el-form-item>
      <el-row>
        <el-col :span="12">
          <el-form-item
            label="成果需求预算:"
            :prop="modelValue.budgetMode == 1 ? 'budget' : ''"
          >
            <el-input
              v-model="modelValue.budget"
              oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')"
              placeholder="请输入技术需求预算"
            >
              <template #append>万元</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label-width="50px">
            <el-checkbox
              false-label="1"
              true-label="2"
              v-model="modelValue.budgetMode"
              >面议</el-checkbox
            >
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="截至时间">
        <el-input placeholder="请输入"></el-input>
      </el-form-item>
      <el-row>
        <el-col :span="12">
          <el-form-item label="需求联系人">
            <el-input placeholder="请输入"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="联系人手机号码">
            <el-input placeholder="请输入"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="想合作的企业及模式">
        <el-input placeholder="请输入"></el-input>
      </el-form-item>
    </el-form>
    <el-row type="flex" justify="end">
      <el-button type="primary">驳回</el-button>
      <el-button type="primary">通过需求</el-button>
    </el-row>
  </el-dialog>
</template>
<script setup>
import Editor from "@/components/WangEditor";
import { demandCategoryList } from "@/utils/parameter";
import { ref, toRefs } from "vue";
const props = defineProps({
  isShow: {
    type: Boolean,
    required: true,
  },
  modelValue: {
    type: Object,
    required: true,
  },
});
const { isShow, modelValue } = toRefs(props);
const checkList = reactive(demandCategoryList);
</script>
<style></style>
