华西海圻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.

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