<template>
  <div>
    <el-form ref="errorForm" :model="errorObj" label-width="140px">
      <el-form-item label="操作步骤">
        <el-select v-model="errorObj.step" placeholder="请选择操作步骤">
        </el-select>
      </el-form-item>
      <el-form-item label="票异常">
        <el-select v-model="errorObj.ticketError" placeholder="请选择票异常">
        </el-select>
      </el-form-item>
      <el-form-item label="异常情况">
        <el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
      </el-form-item>
      <el-form-item label="异常时间" prop="arrivalTime" class="two-element">
        <el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorStart"></el-date-picker>
        <el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorend"></el-date-picker>
      </el-form-item>
      <el-form-item label="是否更新订单状态">
        <el-radio-group v-model="errorObj.updateOrder">
          <el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="中文内容">
        <el-input v-model="errorObj.chContent" type="textarea" rows="2" placeholder="请输入中文内容"></el-input>
      </el-form-item>
      <el-form-item label="英文内容">
        <el-input v-model="errorObj.enContent" type="textarea" rows="2" placeholder="请输入英文内容"></el-input>
      </el-form-item>
    </el-form>

    <el-row class="operate-button">
      <el-button type="success" @click="onSubmit">提交</el-button>
      <el-button @click="$emit('closeDialog')">关闭</el-button>
    </el-row>
  </div>
</template>

<script>
/**
 * 异常登记
 */
export default {
  name: "regError",
  data() {
    return {
      // 异常对象
      errorObj: {},
      // 是否更新订单动态
      status: [
        {
          value: "1",
          label: "是",
        },
        {
          value: "2",
          label: "否",
        },
      ],
    };
  },
  watch: {},
  methods: {
    /** 提交 */
    onSubmit() {
      this.$refs["errorForm"].validate((valid) => {
        if (valid) {
          alert("submit!");
        }
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
