123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <template>
- <div class="sound-container">
- <div class="topMsg">
- <p>当前选择声部数(个):{{ chioseSoundNum }}</p>
- <p style="margin-left: 30px">计划招生人数(个):{{ PlannedCount }}</p>
- </div>
- <soundSetCore
- ref="soundSetCore"
- @chiosetab="chiosetab"
- @getBaseInfo="getBaseInfo"
- @getNumber="getNumber"
- />
- <div class="btnWrap">
- <el-button type="primary" @click="goback" v-if="teamStatus == 'newTeam'">上一步</el-button>
- <el-button
- type="primary"
- v-if="teamStatus == 'newTeam'"
- @click="submitInfo(2)"
- v-permission="{
- child: 'musicGroup/createGroup',
- parent: '/teamBuild/soundMoney',
- }"
- >提交</el-button
- >
- <el-button
- type="primary"
- @click="submitAudit(1)"
- v-if="teamStatus == 'teamDraft'"
- >提交审核</el-button
- >
- <el-button
- type="primary"
- @click="approval"
- v-if="teamStatus == 'teamAudit'"
- v-permission="'musicGroup/auditSuccess'"
- >审核通过</el-button
- >
- <el-button
- type="danger"
- @click="refuse"
- v-if="teamStatus == 'teamAudit'"
- v-permission="'musicGroup/auditFailed'"
- >驳回</el-button
- >
- <el-button
- type="primary"
- v-if="teamStatus == 'resetTeam'||teamStatus == 'teamDraft'"
- v-permission="'musicGroup/updateSubjectInfo'"
- @click="submitInfo()"
- >
- 保存
- </el-button>
- <!-- v-if="teamStatus != 'teamAudit'" -->
- <!--
- <div
- class="submitBtn"
- @click="submitAudit(1)"
- v-if="teamStatus == 'teamDraft'"
- >
- 提交审核
- </div>
- <div class="submitBtn"
- @click="approval"
- v-if="teamStatus == 'teamAudit'"
- v-permission="{child: 'musicGroup/auditSuccess', parent: '/teamBuild/teamAudit/soundMoney'}">
- 审核通过
- </div>
- <div class="submitBtn"
- @click="refuse"
- v-if="teamStatus == 'teamAudit'"
- v-permission="{child: 'musicGroup/auditFailed', parent: '/teamBuild/teamAudit/soundMoney'}">
- 驳回
- </div> -->
- </div>
- </div>
- </template>
- <script>
- import { auditSuccess, auditFailed } from "@/api/buildTeam";
- import dayjs from "dayjs";
- import soundSetCore from "./soundSetComponents/soundSetCore";
- export default {
- components: { soundSetCore },
- data() {
- return {
- topfor: null, // 第一页的数据
- Fsearch: null,
- Frules: null,
- activeSoundList: [],
- chioseSoundNum: 0,
- PlannedCount: 0,
- teamStatus: null,
- teamid: null,
- };
- },
- mounted() {
- this.teamid = this.$route.query.id;
- this.teamStatus = this.$route.query.type;
- if (this.teamStatus == "newTeam") {
- this.$store.dispatch("buildIndex", 1);
- }
- if (this.teamStatus != "newTeam") {
- this.$store.dispatch("draftIndex", 1);
- }
- },
- activated() {
- if (this.teamStatus == "newTeam") {
- this.$store.dispatch("buildIndex", 1);
- }
- if (this.teamStatus != "newTeam") {
- this.$store.dispatch("draftIndex", 1);
- }
- this.teamid = this.$route.query.id;
- this.teamStatus = this.$route.query.type;
- },
- methods: {
- handleClick(evt) {},
- goback() {
- this.$emit("chiosetab", 0);
- },
- submitInfo (val) {
- this.$refs.soundSetCore.submitInfo(val);
- },
- chiosetab(val) {
- this.$emit("chiosetab", val);
- },
- submitAudit(val) {
- this.$confirm(`是否提交审核?`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.$refs.soundSetCore.submitInfo(val);
- })
- .catch(() => {});
- },
- selectMusic() {
- this.$refs.soundSetCore.submitInfo();
- this.$emit("chiosetab", 3);
- },
- getNumber(chioseSoundNum, PlannedCount) {
- this.chioseSoundNum = chioseSoundNum;
- this.PlannedCount = PlannedCount;
- },
- getBaseInfo(baseInfo) {
- this.$emit("getBaseInfo", baseInfo);
- },
- approval() {
- // 审核通过 验证商品
- let flag = this.$refs.soundSetCore.checkSubmit()
- if (!flag) return;
- this.$confirm(`是否审核通过?`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- auditSuccess({ musicGroupId: this.teamid }).then((res) => {
- if (res.code == 200) {
- this.$message.success("审核通过");
- this.$store.dispatch("delVisitedViews", this.$route);
- this.$router.push({
- path: "/teamList",
- query: { search: this.Fsearch, rules: this.Frules },
- });
- }
- });
- })
- .catch(() => {});
- },
- refuse() {
- // auditFailed
- this.$prompt("请输入拒绝原因", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- }).then(({ value }) => {
- // 点击确认 值是value
- if (!value) {
- this.$message.error("请输入驳回原因");
- return;
- } else {
- auditFailed({ musicGroupId: this.teamid, memo: value }).then(
- (res) => {
- if (res.code == 200) {
- this.$message.success("已拒绝");
- this.$store.dispatch("delVisitedViews", this.$route);
- this.$router.push({
- path: "/teamList",
- query: { search: this.Fsearch, rules: this.Frules },
- });
- }
- }
- );
- }
- });
- },
- },
- computed: {},
- };
- </script>
- <style lang="scss" scoped>
- .topMsg {
- padding: 0 25px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- font-size: 14px;
- color: #444;
- margin-bottom: 20px;
- }
- .soundBtnWrap {
- margin-bottom: 20px;
- }
- /deep/.el-collapse-item__header {
- background-color: #edeef0;
- }
- .coreItemTitle {
- background-color: #edeef0;
- height: 46px;
- line-height: 46px;
- padding: 0 20px;
- }
- .coreItem {
- padding: 25px 0 0;
- }
- .coreItemRow {
- padding: 0 20px;
- // line-height: 50px;
- display: flex;
- flex-direction: row;
- align-items: center;
- p {
- margin-right: 10px;
- }
- .title {
- width: 100px;
- text-align: right;
- }
- }
- .marginLeft10 {
- margin-left: 10px;
- }
- /deep/.el-collapse-item__header {
- border-bottom: 1px solid #fff;
- }
- .btnWrap {
- margin-top: 40px;
- .PrevBtn {
- background-color: #13817a;
- width: 120px;
- }
- .submitBtn {
- background-color: #13817a;
- width: 120px;
- }
- }
- </style>
|