review.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div>
  3. <reviewDetail v-if="detail && detail.id" :detail="detail" />
  4. <el-alert title="审核意见" :closable="false" class="alert" type="info">
  5. </el-alert>
  6. <el-input
  7. type="textarea"
  8. :autosize="{ minRows: 2, maxRows: 4 }"
  9. placeholder="请输入审核意见"
  10. v-model="remark"
  11. >
  12. </el-input>
  13. <div slot="footer" class="dialog-footer">
  14. <!-- <el-button @click="$listeners.close">取 消</el-button> -->
  15. <el-button type="primary" @click="submit(1)" v-if="permission('musicGroupPaymentCalender/auditPass')">审核通过</el-button>
  16. <el-button type="danger" @click="submit(0)" v-if="permission('musicGroupPaymentCalender/auditRefuse')">驳回</el-button>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import { permission } from '@/utils/directivePage'
  22. import Vue from "vue";
  23. import reviewDetail from "./review-detail";
  24. import { auditPass, auditRefuse } from "@/api/auditManager";
  25. export default {
  26. props: ["detail"],
  27. components: {
  28. reviewDetail,
  29. },
  30. data() {
  31. return {
  32. remark: "",
  33. };
  34. },
  35. methods: {
  36. async submit(val) {
  37. if (!this.remark) {
  38. return this.$message.error("请输入审核意见");
  39. }
  40. if (val) {
  41. auditPass({calenderId:this.detail.id,auditMemo:this.remark}).then((res) => {
  42. if(res.code == 200){
  43. this.$message.success('审核通过')
  44. this.$emit('close')
  45. }
  46. });
  47. } else {
  48. auditRefuse({calenderId:this.detail.id,auditMemo:this.remark}).then((res) => {
  49. if(res.code == 200){
  50. this.$message.success('驳回成功')
  51. this.$emit('close')
  52. }
  53. });
  54. }
  55. },
  56. },
  57. };
  58. </script>
  59. <style lang="less" scoped>
  60. .dialog-footer {
  61. margin-top: 20px;
  62. display: block;
  63. text-align: right;
  64. }
  65. </style>