teamSoundSet.vue 6.6 KB

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