teamSoundSet.vue 6.0 KB

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