memberModel.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <div>
  3. <descriptions :column="2" style="margin-bottom: 20px">
  4. <descriptions-item label="学练宝版本">{{
  5. detail.name || '--'
  6. }}</descriptions-item>
  7. <descriptions-item label="周期">{{
  8. detail.period | memberEnumType
  9. }}</descriptions-item>
  10. <descriptions-item label="数量">{{
  11. detail.memberNum
  12. }}</descriptions-item>
  13. <descriptions-item label="缴费金额(元)">{{
  14. detail.actualAmount | moneyFormat(true)
  15. }}</descriptions-item>
  16. <descriptions-item label="已缴费人数/总人数"
  17. >{{ detail.paymentUserNum }}/{{ detail.userNum }}</descriptions-item
  18. >
  19. <descriptions-item label="创建人">{{
  20. detail.operatorName
  21. }}</descriptions-item>
  22. <descriptions-item label="创建时间">{{
  23. detail.createTime
  24. }}</descriptions-item>
  25. <descriptions-item :span="2" label="学员姓名">{{
  26. detail.userNames
  27. }}</descriptions-item>
  28. <descriptions-item :span="2" label="备注">{{
  29. detail.remark
  30. }}</descriptions-item>
  31. </descriptions>
  32. <template v-if="detail.status === 'AUDITING'">
  33. <el-alert
  34. style="margin: 20px 0"
  35. title="审核意见"
  36. :closable="false"
  37. class="alert"
  38. type="info"
  39. >
  40. </el-alert>
  41. <el-form :model="form" ref="form">
  42. <el-form-item
  43. prop="memo"
  44. :rules="[
  45. { required: true, message: '请输入审核意见', trigger: 'blur' }
  46. ]"
  47. >
  48. <el-input
  49. type="textarea"
  50. :autosize="{ minRows: 2, maxRows: 4 }"
  51. placeholder="请输入审核意见"
  52. v-model="form.memo"
  53. >
  54. </el-input>
  55. </el-form-item>
  56. </el-form>
  57. <div slot="footer" class="dialog-footer">
  58. <el-button
  59. type="primary"
  60. @click="submit(1)"
  61. v-if="permission('musicGroupPaymentCalender/auditPass/batchAuditing')"
  62. >审核通过</el-button
  63. >
  64. <el-button
  65. type="danger"
  66. @click="submit(0)"
  67. v-if="
  68. permission('musicGroupPaymentCalender/auditRefuse/batchAuditing')
  69. "
  70. >驳回</el-button
  71. >
  72. <el-button @click="$emit('close')">关 闭</el-button>
  73. </div>
  74. </template>
  75. </div>
  76. </template>
  77. <script>
  78. import { permission } from "@/utils/directivePage";
  79. import { cloudCoachPaymentProgramAudit } from "./api";
  80. export default {
  81. props: ["detail"],
  82. data() {
  83. return {
  84. form: {
  85. memo: ""
  86. }
  87. };
  88. },
  89. mounted() {
  90. console.log(this.detail, "detail");
  91. },
  92. methods: {
  93. async submit(val) {
  94. this.$refs.form.validate(async _ => {
  95. if (_) {
  96. try {
  97. const detail = this.detail;
  98. const str = val ? "通过" : "驳回";
  99. await this.$confirm(`是否确认审核${str}`, "提示", {
  100. type: "warning"
  101. });
  102. await cloudCoachPaymentProgramAudit({
  103. id: detail.id,
  104. memo: this.form.memo,
  105. status: val ? "OPEN" : "REJECT"
  106. });
  107. this.$message.success(`${str}成功`);
  108. this.$emit("close");
  109. this.$emit("getList");
  110. } catch (error) {}
  111. }
  112. });
  113. },
  114. permission(str) {
  115. return permission(str);
  116. }
  117. }
  118. };
  119. </script>
  120. <style lang="less" scoped>
  121. .dialog-footer {
  122. margin-top: 20px;
  123. display: block;
  124. text-align: right;
  125. }
  126. </style>