<template>
  <div id="person">
    <el-col :span="24" class="info">
      <van-form @submit="onSubmit">
        <van-field
          v-model="form.product_name"
          name="产品名称"
          label="产品名称"
          placeholder="请输入产品名称"
          disabled
          :rules="[{ required: true, message: '请输入产品名称' }]"
        />

        <van-field
          v-model="form.market_username"
          name="营销人名称"
          label="营销人名称"
          placeholder="请输入营销人名称"
          disabled
          :rules="[{ required: true, message: '请输入营销人名称' }]"
        />

        <van-field
          v-model="form.username"
          name="购买人名称"
          label="购买人名称"
          placeholder="请输入购买人名称"
          disabled
          :rules="[{ required: true, message: '请输入购买人名称' }]"
        />
      </van-form>

      <van-field
        type="textarea"
        v-model="form.description"
        name="描述"
        label="描述"
        placeholder="请输入描述"
        :rules="[{ required: true, message: '请输入描述' }]"
      />
      <van-field name="radio" label="审核">
        <template #input>
          <van-radio-group v-model="form.status" direction="horizontal">
            <van-radio name="0">待审核</van-radio>
            <van-radio name="1">审核通过</van-radio>
          </van-radio-group>
        </template>
      </van-field>

      <div style="margin: 16px;">
        <van-button round block type="info" native-type="submit" @click="onSubmit">
          保存
        </van-button>
      </div>
    </el-col>
  </div>
</template>

<script>
export default {
  name: 'person',
  props: {
    form: null,
  },
  components: {},
  data: () => ({
    // 出生日期
  }),
  created() {},
  computed: {
    id() {
      return this.$route.query.id;
    },
  },
  methods: {
    // 出生日期

    onSubmit() {
      console.log(this.form);

      this.$emit('onSubmit', { data: this.form });
    },
    // 图片上传
  },
};
</script>

<style lang="less" scoped>
.info {
  margin: 0 0 50px 0;
}
</style>
