华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
3.4 KiB

  1. <template>
  2. <div>
  3. <el-dialog :title="$t('page.business.study.studyFormApply.qrfz')" :visible.sync="open" width="500px" append-to-body
  4. :close-on-click-modal="false">
  5. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  6. <el-row>
  7. <el-col :span="24">
  8. <el-form-item :label="$t('form.qmyy')" prop="qmyymc">
  9. <el-input type="text" :value="form.qmyymc" maxlength="50" disabled
  10. :placeholder="$t('form.placeholderInput')" />
  11. </el-form-item>
  12. </el-col>
  13. </el-row>
  14. <el-row>
  15. <el-col :span="24">
  16. <el-form-item :label="$t('page.business.study.studyFormApply.reason')" prop="remark">
  17. <el-input type="textarea" v-model="form.remark" :rows="5" maxlength="500"
  18. :placeholder="$t('form.placeholderInput')">
  19. </el-input>
  20. </el-form-item>
  21. </el-col>
  22. </el-row>
  23. <el-row>
  24. <el-col :span="24">
  25. <el-form-item :label="$t('form.signer')">
  26. <el-input type="text" v-model="nickName" maxlength="50" disabled
  27. :placeholder="$t('form.placeholderInput')" />
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. <el-row>
  32. <el-col :span="24">
  33. <el-form-item :label="$t('form.password')" prop="qmrmm">
  34. <el-input type="password" v-model="form.qmrmm" maxlength="20"
  35. :placeholder="$t('form.placeholderInput')" />
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. </el-form>
  40. <div slot="footer" class="dialog-footer" style="text-align: center;">
  41. <el-button type="danger" @click="reject">{{ $t('page.business.study.studyFormApply.reject') }}</el-button>
  42. <el-button type="primary" @click="approve">{{ $t('page.business.study.studyFormApply.approve') }}</el-button>
  43. </div>
  44. </el-dialog>
  45. </div>
  46. </template>
  47. <script>
  48. import { studyFormApply_qrfz } from "@/api/business/study/studyFormApply"
  49. import { mapGetters } from 'vuex'
  50. export default {
  51. name: "Qrfz",
  52. components: {},
  53. data() {
  54. return {
  55. isBatch: false,
  56. ids: [],
  57. selectList: [],
  58. open: false,
  59. form: {},
  60. rules: {
  61. qmrmm: [{
  62. required: true,
  63. message: ' ',
  64. trigger: 'blur'
  65. }],
  66. remark: [{
  67. required: true,
  68. message: ' ',
  69. trigger: 'blur'
  70. }],
  71. }
  72. }
  73. },
  74. computed: {
  75. ...mapGetters([
  76. 'nickName','name'
  77. ]),
  78. },
  79. created() {
  80. },
  81. methods: {
  82. cancel() {
  83. this.open = false
  84. },
  85. reset() {
  86. this.form = {
  87. id: null,
  88. qmyymc: '废止通过/拒绝',
  89. qmyy: null,
  90. remark: null,
  91. qmrmm: null
  92. }
  93. this.resetForm("form")
  94. },
  95. show(row) {
  96. this.reset()
  97. this.form.id = row.id
  98. this.open = true
  99. },
  100. reject() {
  101. this.form.qmyy = 1
  102. this.save()
  103. },
  104. approve() {
  105. this.form.qmyy = 10
  106. this.save()
  107. },
  108. save() {
  109. this.$refs["form"].validate(valid => {
  110. if (valid) {
  111. this.$modal.loading()
  112. studyFormApply_qrfz(this.form).then(response => {
  113. this.open = false
  114. this.$emit('callback')
  115. this.$modal.closeLoading()
  116. }).finally(() => {
  117. this.$modal.closeLoading()
  118. })
  119. }
  120. })
  121. }
  122. }
  123. }
  124. </script>