<template>
  <div>
    <el-button type="text" size="mini" @click="drawer=true">编辑</el-button>
    <el-dialog append-to-body width="30%" :visible.sync="drawer">
      <el-form :model="form" :rules="rules" ref="form" label-width="80px" label-position="right" size="mini">
        <el-col :span="24">
          <el-form-item label="数量" prop="qty">
            <el-input v-model="form.qty" placeholder="请输入数量"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="折扣" prop="discountrate">
            <el-input v-model="form.discountrate" placeholder="请输入折扣"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="单价" prop="price">
            <el-input v-model="form.price" placeholder="请输入单价"></el-input>
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="drawer = false">取 消</el-button>
        <el-button type="warning" size="small" @click="onSumit">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: '',
  data() {
    return {
      drawer:false,
      form:{
        qty:'',
        discountrate:'',
        price:'',

      },
      rules: {
        qty: [
          { required: true, message: '请输入数量', trigger: 'blur' },
        ],
        discountrate: [
          { required: true, message: '请输入折扣', trigger: 'blur,change' },
        ],
        price: [
          { required: true, message: '请输入单价', trigger: 'blur,change' },
        ]
      }
    };
  },
  computed:{
  },
  watch:{
  },
  methods: {
    onSumit () {

    }
  },
};
</script>

<style scoped>

</style>
