teamSoundSet.vue 5.8 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" 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="selectMusic" 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. 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. approval () {
  130. this.$confirm(`是否审核通过?`, "提示", {
  131. confirmButtonText: "确定",
  132. cancelButtonText: "取消",
  133. type: "warning",
  134. })
  135. .then(() => {
  136. auditSuccess({ musicGroupId: this.teamid }).then((res) => {
  137. if (res.code == 200) {
  138. this.$message.success("审核通过");
  139. this.$router.push({
  140. path: "/business/teamDetail",
  141. query: { search: this.Fsearch, rules: this.Frules },
  142. });
  143. }
  144. });
  145. })
  146. .catch(() => { });
  147. },
  148. refuse () {
  149. // auditFailed
  150. this.$prompt("请输入拒绝原因", "提示", {
  151. confirmButtonText: "确定",
  152. cancelButtonText: "取消"
  153. }).then(({ value }) => {
  154. // 点击确认 值是value
  155. if (!value) {
  156. this.$message.error("请输入驳回原因");
  157. return;
  158. } else {
  159. auditFailed({ musicGroupId: this.teamid, memo: value }).then(res => {
  160. if (res.code == 200) {
  161. this.$message.success("已拒绝");
  162. this.$router.push({
  163. path: "/business/teamDetail",
  164. query: { search: this.Fsearch, rules: this.Frules }
  165. });
  166. }
  167. });
  168. }
  169. });
  170. },
  171. },
  172. computed: {},
  173. };
  174. </script>
  175. <style lang="scss" scoped>
  176. .topMsg {
  177. padding: 0 25px;
  178. display: flex;
  179. flex-direction: row;
  180. justify-content: flex-start;
  181. font-size: 14px;
  182. color: #444;
  183. margin-bottom: 20px;
  184. }
  185. .soundBtnWrap {
  186. margin-bottom: 20px;
  187. }
  188. /deep/.el-collapse-item__header {
  189. background-color: #edeef0;
  190. }
  191. .coreItemTitle {
  192. background-color: #edeef0;
  193. height: 46px;
  194. line-height: 46px;
  195. padding: 0 20px;
  196. }
  197. .coreItem {
  198. padding: 25px 0 0;
  199. }
  200. .coreItemRow {
  201. padding: 0 20px;
  202. line-height: 50px;
  203. display: flex;
  204. flex-direction: row;
  205. align-items: center;
  206. p {
  207. margin-right: 10px;
  208. }
  209. .title {
  210. width: 100px;
  211. text-align: right;
  212. }
  213. }
  214. .marginLeft10 {
  215. margin-left: 10px;
  216. }
  217. /deep/.el-collapse-item__header {
  218. border-bottom: 1px solid #fff;
  219. }
  220. .btnWrap {
  221. margin-top: 40px;
  222. .PrevBtn {
  223. background-color: #13817a;
  224. width: 120px;
  225. }
  226. .submitBtn {
  227. background-color: #13817a;
  228. width: 120px;
  229. }
  230. }
  231. </style>