
<template>
  <el-card style="margin-top: 16px">
    <el-form
      ref="elForm"
      :disabled="true"
      :model="formData"
      size="mini"
      label-width="180px"
    >
      <div class="tit">
        深加工
        <span class="time">更新于:{{ update_time }}</span>
      </div>

      <el-row>
        <el-col :span="8">
          <el-form-item label="是否在经营" prop="is_manage">
            <el-radio-group v-model="datas.is_manage" size="medium">
              <el-radio label="1">是</el-radio>
              <el-radio label="0">否</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <template v-if="datas.is_manage == 1">
          <el-col :span="8">
            <el-form-item label="有无建设用地" prop="construction_land">
              <el-radio-group v-model="datas.construction_land" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="面积(m²)" prop="land_area">
              <el-input
                v-model="datas.land_area"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="经营地点" prop="manage_place">
              <el-input
                v-model="datas.manage_place"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="材料来源" prop="source_materials">
              <el-input
                v-model="datas.source_materials"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无销售渠道" prop="marketing_channel">
              <el-radio-group v-model="datas.marketing_channel" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无技术指导" prop="technical_guidance">
              <el-radio-group v-model="datas.technical_guidance" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无品牌" prop="brand">
              <el-radio-group v-model="datas.brand" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无宣传推广" prop="advertising">
              <el-radio-group v-model="datas.advertising" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无运输" prop="transport">
              <el-radio-group v-model="datas.transport" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="经营诉求" prop="business_appeal">
              <el-input
                v-model="datas.business_appeal"
                clearable
                autosize
                type="textarea"
                :disabled="true"
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </template>
        <template v-else>
          <el-col :span="8">
            <el-form-item label="有无建设用地" prop="construction_land">
              <el-radio-group v-model="datas.construction_land" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="经营类型" prop="manage_type">
              <el-select
                v-model="datas.manage_type"
                clearable
                :style="{ width: '100%' }"
              >
                <el-option
                  v-for="(item, index) in storeTypeList"
                  :key="index"
                  :label="item"
                  :value="index + ''"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="经营地点" prop="manage_place">
              <el-input
                v-model="datas.manage_place"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="人数" prop="people_count">
              <el-input
                v-model="datas.people_count"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无食堂" prop="canteen">
              <el-radio-group v-model="datas.canteen" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="材料来源" prop="source_materials">
              <el-input
                v-model="datas.source_materials"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="自动化办公程度" prop="automation">
              <el-input
                v-model="datas.automation"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无用工需求" prop="employment">
              <el-radio-group v-model="datas.employment" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无品牌" prop="brand">
              <el-radio-group v-model="datas.brand" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无宣传推广" prop="advertising">
              <el-radio-group v-model="datas.advertising" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="库存情况" prop="repertory">
              <el-input
                v-model="datas.repertory"
                clearable
                :disabled="true"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="有无运输" prop="transport">
              <el-radio-group v-model="datas.transport" size="medium">
                <el-radio label="1">有</el-radio>
                <el-radio label="0">无</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="经营诉求" prop="business_appeal">
              <el-input
                v-model="datas.business_appeal"
                clearable
                autosize
                type="textarea"
                :disabled="true"
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </template>
      </el-row>
    </el-form>
  </el-card>
</template>

<script setup lang='ts'>
const storeTypeList = ref([
  "超市",
  "生鲜",
  "饭店",
  "五金",
  "杂货",
  "服装",
  "文具",
  "其他",
]);
const props = defineProps({
  datas: {
    type: Object,
    defualt: function () {
      return {
        is_manage: "", //是否正在经营
        construction_land: "", //有无建设用地
        land_area: "", //面积
        manage_place: "", //经营地点
        source_materials: "", //材料来源
        marketing_channel: "", //有无销售渠道
        technical_guidance: "", //有无技术指导
        brand: "", //有无品牌
        advertising: "", //有无宣传推广
        transport: "", //有无运输
        business_appeal: "", //经营诉求
        manage_type: "", //经营类型
        people_count: "", //人数
        canteen: "", //食堂
        automation: "", //自动化办公程度
        employment: "", //用工需求
        repertory: "", //库存
      };
    },
  },
  update_time: {
    type: String,
    defualt: "",
  },
});
</script>

<style scoped lang='scss'>
.tit {
  font-size: 1.2rem;
  translate: 1vw -1vw;
  background-color: white;
  margin: 2vh 0 0 0;
  .time {
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 1vw;
    color: #999;
  }
}
</style>
