teamSoundSet.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <div class="sound-container">
  3. <div class="topMsg">
  4. <p>当前选择声部数(个):{{ chioseSoundNum }}</p>
  5. <p style="margin-left: 30px">计划招生人数(个):{{ PlannedCount }}</p>
  6. </div>
  7. <soundSetCore ref="soundSetCore"
  8. @chiosetab="chiosetab"
  9. @getBaseInfo="getBaseInfo"
  10. @getNumber="getNumber" />
  11. <div class="btnWrap">
  12. <el-button type="primary" @click="goback" style="margin-right: 10px;">上一步</el-button>
  13. <!-- v-if="teamStatus != 'teamAudit'" -->
  14. <el-button class="submitBtn"
  15. v-permission="{
  16. child: 'musicGroup/createGroup',
  17. parent: '/teamBuild/soundMoney',
  18. }"
  19. v-if="!$helpers.permission('musicGroup/addMusicGroupRegs')"
  20. @click="submitInfo()">
  21. 创建缴费
  22. </el-button>
  23. <el-dropdown
  24. split-button
  25. v-permission="{
  26. child: 'musicGroup/createGroup',
  27. parent: '/teamBuild/soundMoney',
  28. }"
  29. v-if="$helpers.permission('musicGroup/addMusicGroupRegs')"
  30. type="primary"
  31. @click="submitInfo()"
  32. >
  33. 创建缴费
  34. <el-dropdown-menu slot="dropdown">
  35. <el-dropdown-item>
  36. <el-button @click="$emit('chiosetab', 3)" type="text">选择乐团</el-button>
  37. </el-dropdown-item>
  38. </el-dropdown-menu>
  39. </el-dropdown>
  40. <!-- <div
  41. class="submitBtn"
  42. @click="submitAudit(1)"
  43. v-if="teamStatus != 'teamAudit'"
  44. >
  45. 提交审核
  46. </div> -->
  47. <div class="submitBtn"
  48. @click="approval"
  49. v-if="teamStatus == 'teamAudit'"
  50. v-permission="{child: 'musicGroup/auditSuccess', parent: '/teamBuild/teamAudit/soundMoney'}">
  51. 审核通过
  52. </div>
  53. <div class="submitBtn"
  54. @click="refuse"
  55. v-if="teamStatus == 'teamAudit'"
  56. v-permission="{child: 'musicGroup/auditFailed', parent: '/teamBuild/teamAudit/soundMoney'}">
  57. 驳回
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. import store from "@/store";
  64. import { formatData } from "@/utils/utils";
  65. import {
  66. getSubject,
  67. getDefaultSubject,
  68. getGoods,
  69. createTeam,
  70. getSoundTree,
  71. findMusicGroupSubjectInfo,
  72. updateSubjectInfo,
  73. auditSuccess,
  74. auditFailed,
  75. getSubjectGoods,
  76. } from "@/api/buildTeam";
  77. import dayjs from "dayjs";
  78. import soundSetCore from "./soundSetComponents/soundSetCore";
  79. export default {
  80. components: { soundSetCore },
  81. data () {
  82. return {
  83. topfor: null, // 第一页的数据
  84. Fsearch: null,
  85. Frules: null,
  86. activeSoundList: [],
  87. chioseSoundNum: 0,
  88. PlannedCount: 0,
  89. teamStatus: null,
  90. teamid: null
  91. };
  92. },
  93. mounted () {
  94. console.log(this)
  95. this.teamid = this.$route.query.id;
  96. this.teamStatus = this.$route.query.type;
  97. },
  98. activated () {
  99. this.teamid = this.$route.query.id;
  100. this.teamStatus = this.$route.query.type;
  101. },
  102. methods: {
  103. handleClick(evt) {
  104. console.log(evt)
  105. },
  106. goback () {
  107. this.$emit("chiosetab", 0);
  108. },
  109. submitInfo () {
  110. this.$refs.soundSetCore.submitInfo();
  111. },
  112. chiosetab (val) {
  113. this.$emit("chiosetab", val);
  114. },
  115. submitAudit (val) {
  116. this.$refs.soundSetCore.submitInfo(val);
  117. },
  118. getNumber (chioseSoundNum, PlannedCount) {
  119. this.chioseSoundNum = chioseSoundNum;
  120. this.PlannedCount = PlannedCount;
  121. },
  122. getBaseInfo (baseInfo) {
  123. this.$emit('getBaseInfo', baseInfo)
  124. },
  125. approval () {
  126. this.$confirm(`是否审核通过?`, "提示", {
  127. confirmButtonText: "确定",
  128. cancelButtonText: "取消",
  129. type: "warning",
  130. })
  131. .then(() => {
  132. auditSuccess({ musicGroupId: this.teamid }).then((res) => {
  133. if (res.code == 200) {
  134. this.$message.success("审核通过");
  135. this.$router.push({
  136. path: "/business/teamDetail",
  137. query: { search: this.Fsearch, rules: this.Frules },
  138. });
  139. }
  140. });
  141. })
  142. .catch(() => { });
  143. },
  144. refuse () {
  145. // auditFailed
  146. this.$prompt("请输入拒绝原因", "提示", {
  147. confirmButtonText: "确定",
  148. cancelButtonText: "取消"
  149. }).then(({ value }) => {
  150. // 点击确认 值是value
  151. if (!value) {
  152. this.$message.error("请输入驳回原因");
  153. return;
  154. } else {
  155. auditFailed({ musicGroupId: this.teamid, memo: value }).then(res => {
  156. if (res.code == 200) {
  157. this.$message.success("已拒绝");
  158. this.$router.push({
  159. path: "/business/teamDetail",
  160. query: { search: this.Fsearch, rules: this.Frules }
  161. });
  162. }
  163. });
  164. }
  165. });
  166. },
  167. },
  168. computed: {},
  169. };
  170. </script>
  171. <style lang="scss" scoped>
  172. .topMsg {
  173. padding: 0 25px;
  174. display: flex;
  175. flex-direction: row;
  176. justify-content: flex-start;
  177. font-size: 14px;
  178. color: #444;
  179. margin-bottom: 20px;
  180. }
  181. .soundBtnWrap {
  182. margin-bottom: 20px;
  183. }
  184. /deep/.el-collapse-item__header {
  185. background-color: #edeef0;
  186. }
  187. .coreItemTitle {
  188. background-color: #edeef0;
  189. height: 46px;
  190. line-height: 46px;
  191. padding: 0 20px;
  192. }
  193. .coreItem {
  194. padding: 25px 0 0;
  195. }
  196. .coreItemRow {
  197. padding: 0 20px;
  198. line-height: 50px;
  199. display: flex;
  200. flex-direction: row;
  201. align-items: center;
  202. p {
  203. margin-right: 10px;
  204. }
  205. .title {
  206. width: 100px;
  207. text-align: right;
  208. }
  209. }
  210. .marginLeft10 {
  211. margin-left: 10px;
  212. }
  213. /deep/.el-collapse-item__header {
  214. border-bottom: 1px solid #fff;
  215. }
  216. .btnWrap {
  217. margin-top: 40px;
  218. .PrevBtn {
  219. background-color: #13817a;
  220. width: 120px;
  221. }
  222. .submitBtn {
  223. background-color: #13817a;
  224. width: 120px;
  225. }
  226. }
  227. </style>