<template>
  <div>
    <el-form ref="errorForm" :model="errorObj" label-width="100px">
      <el-form-item label="异常">
        <el-radio-group v-model="errorObj.errorStatus">
        </el-radio-group>
      </el-form-item>
      <el-form-item label="品名">
        <el-select v-model="errorObj.goodName" placeholder="请选择品名">
        </el-select>
      </el-form-item>
      <el-form-item label="件数">
        <el-input-number v-model="errorObj.pieces" controls-position="right" :min="1"></el-input-number>
      </el-form-item>
      <el-form-item label="异常详情">
        <el-input v-model="errorObj.details" 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: "unloadingError",
  data() {
    return {
      // 异常对象
      errorObj: {},
    };
  },
  methods: {
    /** 提交 */
    onSubmit() {
      this.$refs["errorForm"].validate((valid) => {
        if (valid) {
          alert("submit!");
        }
      });
    },
  },
};
</script>

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