<!--
 * @Author: zwq
 * @Date: 2021-11-18 14:16:25
 * @LastEditors: zwq
 * @LastEditTime: 2023-04-10 14:42:57
 * @Description:
-->
<template>
  <el-dialog
    :title="!dataForm.id ? '新增' : '修改'"
    :close-on-click-modal="false"
    :visible.sync="visible"
    append-to-body>
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
      <el-form-item label="编码" prop="code">
        <el-input v-model="dataForm.code" placeholder="编码"></el-input>
      </el-form-item>
      <el-form-item label="名称" prop="name">
        <el-input v-model="dataForm.name" placeholder="名称"></el-input>
      </el-form-item>
      <el-form-item label="小数位数" prop="num">
        <el-input-number :step='1' v-model="dataForm.num" placeholder="小数位数"></el-input-number>
      </el-form-item>
      <el-form-item label="USL" prop="USL">
        <el-input-number :step='1' v-model="dataForm.USL" placeholder="USL"></el-input-number>
      </el-form-item>
      <el-form-item label="SL" prop="SL">
        <el-input-number :step='1' v-model="dataForm.SL" placeholder="SL"></el-input-number>
      </el-form-item>
      <el-form-item label="LSL" prop="LSL">
        <el-input-number :step='1' v-model="dataForm.LSL" placeholder="LSL"></el-input-number>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import basicAdd from '@/mixins/basic-add'
export default {
  mixins: [basicAdd],
  data() {
    return {
      urlOptions: {
          submitURL: '',
          infoURL: ''
      },
        dataForm: {
          id: '',
          code: '',
          name: '',
          num: '',
          USL: '',
          SL: '',
          LSL: ''
        },
        dataRule: {
          code: [
            { required: true, message: '编码不能为空', trigger: 'blur' }
          ]
        }
      }
    },
    methods: {
    }
  }
</script>
