teamSoundSet.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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" v-if="teamStatus == 'feeAudit'" @click="goHome">确定</el-button>
  21. <el-button type="primary" @click="submitAudit(1)" v-if="teamStatus == 'teamDraft'">提交审核</el-button>
  22. <el-button type="primary" @click="approval"
  23. v-if="teamStatus == 'teamAudit'"
  24. v-permission="{child: 'musicGroup/auditSuccess', parent: '/teamBuild/teamAudit/soundMoney'}">审核通过</el-button>
  25. <el-button type="danger" @click="refuse"
  26. v-if="teamStatus == 'teamAudit'"
  27. v-permission="{child: 'musicGroup/auditFailed', parent: '/teamBuild/teamAudit/soundMoney'}">驳回</el-button>
  28. <!-- v-if="teamStatus != 'teamAudit'" -->
  29. <!-- <div
  30. class="submitBtn"
  31. v-if="teamStatus == 'newTeam'"
  32. v-permission="{
  33. child: 'musicGroup/createGroup',
  34. parent: '/teamBuild/soundMoney',
  35. }"
  36. @click="submitInfo()"
  37. >
  38. 提交
  39. </div>
  40. <div
  41. class="submitBtn"
  42. @click="submitAudit(1)"
  43. v-if="teamStatus == 'teamDraft'"
  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. selectMusic() {
  119. this.$refs.soundSetCore.submitInfo()
  120. this.$emit('chiosetab', 3)
  121. },
  122. getNumber (chioseSoundNum, PlannedCount) {
  123. this.chioseSoundNum = chioseSoundNum;
  124. this.PlannedCount = PlannedCount;
  125. },
  126. getBaseInfo (baseInfo) {
  127. this.$emit('getBaseInfo', baseInfo)
  128. },
  129. goHome() {
  130. // console.log(this.$route.path)
  131. this.$router.push({ path: "/business/teamDetail" });
  132. // this.$store.dispatch('delVisitedViews', this.$route.path)
  133. },
  134. approval () {
  135. this.$confirm(`是否审核通过?`, "提示", {
  136. confirmButtonText: "确定",
  137. cancelButtonText: "取消",
  138. type: "warning",
  139. })
  140. .then(() => {
  141. auditSuccess({ musicGroupId: this.teamid }).then((res) => {
  142. if (res.code == 200) {
  143. this.$message.success("审核通过");
  144. this.$router.push({
  145. path: "/business/teamDetail",
  146. query: { search: this.Fsearch, rules: this.Frules },
  147. });
  148. }
  149. });
  150. })
  151. .catch(() => { });
  152. },
  153. refuse () {
  154. // auditFailed
  155. this.$prompt("请输入拒绝原因", "提示", {
  156. confirmButtonText: "确定",
  157. cancelButtonText: "取消"
  158. }).then(({ value }) => {
  159. // 点击确认 值是value
  160. if (!value) {
  161. this.$message.error("请输入驳回原因");
  162. return;
  163. } else {
  164. auditFailed({ musicGroupId: this.teamid, memo: value }).then(res => {
  165. if (res.code == 200) {
  166. this.$message.success("已拒绝");
  167. this.$router.push({
  168. path: "/business/teamDetail",
  169. query: { search: this.Fsearch, rules: this.Frules }
  170. });
  171. }
  172. });
  173. }
  174. });
  175. },
  176. },
  177. computed: {},
  178. };
  179. </script>
  180. <style lang="scss" scoped>
  181. .topMsg {
  182. padding: 0 25px;
  183. display: flex;
  184. flex-direction: row;
  185. justify-content: flex-start;
  186. font-size: 14px;
  187. color: #444;
  188. margin-bottom: 20px;
  189. }
  190. .soundBtnWrap {
  191. margin-bottom: 20px;
  192. }
  193. /deep/.el-collapse-item__header {
  194. background-color: #edeef0;
  195. }
  196. .coreItemTitle {
  197. background-color: #edeef0;
  198. height: 46px;
  199. line-height: 46px;
  200. padding: 0 20px;
  201. }
  202. .coreItem {
  203. padding: 25px 0 0;
  204. }
  205. .coreItemRow {
  206. padding: 0 20px;
  207. line-height: 50px;
  208. display: flex;
  209. flex-direction: row;
  210. align-items: center;
  211. p {
  212. margin-right: 10px;
  213. }
  214. .title {
  215. width: 100px;
  216. text-align: right;
  217. }
  218. }
  219. .marginLeft10 {
  220. margin-left: 10px;
  221. }
  222. /deep/.el-collapse-item__header {
  223. border-bottom: 1px solid #fff;
  224. }
  225. .btnWrap {
  226. margin-top: 40px;
  227. .PrevBtn {
  228. background-color: #13817a;
  229. width: 120px;
  230. }
  231. .submitBtn {
  232. background-color: #13817a;
  233. width: 120px;
  234. }
  235. }
  236. </style>