examine-dialog.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div>
  3. <el-dialog title="批量审批" :visible.sync="isShow" :show-close="false" width="400px" :close-on-click-modal="false">
  4. <el-form
  5. ref="examineForm"
  6. :model="examineForm"
  7. :rules="examineFormRules"
  8. label-position="left"
  9. label-width="80px"
  10. >
  11. <el-form-item label="审批状态" prop="status">
  12. <el-radio-group v-model="examineForm.status">
  13. <el-radio :label="'OK'">通过</el-radio>
  14. <el-radio :label="'FAIL'">驳回</el-radio>
  15. </el-radio-group>
  16. </el-form-item>
  17. <el-form-item label="审批备注" prop="remark">
  18. <el-input
  19. type="textarea"
  20. :autosize="{ minRows: 2, maxRows: 4 }"
  21. placeholder="请输入审批备注"
  22. v-model="examineForm.remark"
  23. >
  24. </el-input>
  25. </el-form-item>
  26. </el-form>
  27. <div slot="footer" class="dialog-footer">
  28. <el-button @click="cancelForm">取 消</el-button>
  29. <el-button type="primary" @click="submitForm">确 定</el-button>
  30. </div>
  31. </el-dialog>
  32. </div>
  33. </template>
  34. <script>
  35. export default {
  36. name: 'EditDateDialog',
  37. props: {
  38. isShow: {
  39. type: Boolean,
  40. default: false
  41. },
  42. examineForm: {
  43. type: Object,
  44. default: {
  45. date: ''
  46. }
  47. }
  48. },
  49. data() {
  50. return {
  51. examineFormRules: {
  52. status: [{ required: true, message: '请选择审批状态', trigger: 'change' }]
  53. }
  54. }
  55. },
  56. methods: {
  57. cancelForm() {
  58. this.$emit('update:isShow', false)
  59. this.$refs.examineForm.resetFields()
  60. },
  61. submitForm() {
  62. this.$refs.examineForm.validate(valid => {
  63. if (valid) {
  64. this.$parent.submitExamineForm()
  65. this.$refs.examineForm.resetFields()
  66. }
  67. })
  68. }
  69. }
  70. }
  71. </script>
  72. <style></style>