Ver código fonte

乐团添加预报名页面

lex-xin 4 anos atrás
pai
commit
38929e7b24

+ 1 - 0
src/router/index.js

@@ -160,6 +160,7 @@ export const asyncRoutes = {
   teamDetail: () => import('@/views/teamDetail/teamList'),
   teamBuild: () => import('@/views/teamBuild/index'),
   forecastName: () => import('@/views/teamBuild/forecastName'), // 预报名页面
+  createPayment: () => import('@/views/teamBuild/createPayment'), // 创建缴费页面
   // VIP管理
   vipList: () => import('@/views/vipClass/vipList'),
   // vip修改

+ 2 - 0
src/utils/searchArray.js

@@ -100,6 +100,8 @@ export const musicGroupStatus = [
   { value: 'DRAFT', text: '编辑中' },
   { value: 'AUDIT', text: '审核中' },
   { value: 'APPLY', text: '报名中' },
+  { value: 'PRE_APPLY', text: '预报名中' },
+  { value: 'PRE_BUILD_FEE', text: '创建缴费中' },
   { value: 'PAY', text: '缴费中' },
   { value: 'PREPARE', text: '筹备中' },
   { value: 'PROGRESS', text: '进行中' },

+ 2 - 0
src/utils/vueFilter.js

@@ -316,10 +316,12 @@ Vue.filter('paymentStatus', value => {
 // 乐团状态
 Vue.filter('teamStatus', value => {
   let template = {
+    PRE_APPLY: "预报名中",
     APPLY: "报名中",
     PAY: "缴费中",
     PREPARE: "筹备中",
     PROGRESS: "进行中",
+    PRE_BUILD_FEE: '创建缴费中',
     CANCELED: '取消',
     PAUSE: '暂停',
     AUDIT: '乐团审核中',

+ 4 - 4
src/views/resetTeaming/components/resetPayList.vue

@@ -499,12 +499,12 @@ export default {
     },
     teamStatus () {
       let type = this.$route.query.type;
-      return type == 'teamDraft' || type == 'resetTeam'
+      return type == 'teamDraft' || type == 'resetTeam' || type == 'PRE_BUILD_FEE'
     }
   },
-  activated () {
-    this.init();
-  },
+  // activated () {
+  //   this.init();
+  // },
   methods: {
     async init () {
       try {

+ 4 - 4
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -505,12 +505,12 @@ export default {
     },
     teamStatus () {
       let type = this.$route.query.type;
-      return type == 'teamDraft' || type == 'resetTeam'
+      return type == 'teamDraft' || type == 'resetTeam' || type == 'PRE_BUILD_FEE'
     }
   },
-  activated () {
-    this.init();
-  },
+  // activated () {
+  //   this.init();
+  // },
   methods: {
     async init () {
       try {

+ 16 - 0
src/views/teamBuild/api.js

@@ -31,3 +31,19 @@ export const closeMusicGroup = data => request2({
   method: 'post',
   requestType: 'json'
 })
+
+// 开启缴费
+export const finishPreApply = data => request2({
+  url: '/api-web/musicGroup/finishPreApply',
+  data,
+  method: 'post',
+  requestType: 'form'
+})
+
+// 预报名列表
+export const queryPreApplyList = data => request2({
+  url: '/api-web/studentRegistration/queryPreApplyList',
+  params: data,
+  method: 'get',
+  requestType: 'json'
+})

+ 16 - 7
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -455,16 +455,25 @@ export default {
               },
             });
             // this.$emit("chiosetab", 2);
-            this.$emit("getBaseInfo", obj);
+            // this.$emit("getBaseInfo", obj);
             //  zheli
 
             // 把第3步单独拆出来做成独立的模块
-            this.$router.push({
-              path: '/business/teamDetail',
-              query: {
-                ...query
-              }
-            })
+            this.$confirm('乐团是否提交审核?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }).then(() => {
+              this.teamStatus = 'teamDraft'
+              this.submitInfo(1)
+            }).catch(() => {
+              this.$router.push({
+                path: '/business/teamDetail',
+                query: {
+                  ...query
+                }
+              })
+            });
           }
         });
       } else {

+ 2 - 2
src/views/teamBuild/components/teamBaseInfo.vue

@@ -158,7 +158,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item
           label="预报名截止时间"
           prop="time"
           :rules="[{ required: true, message: '请输入预报名截止时间' }]"
@@ -171,7 +171,7 @@
             :picker-options="beginDate()"
             placeholder="选择日期"
           ></el-date-picker>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
           label="报名截止时间"
           prop="time"

+ 23 - 7
src/views/teamBuild/components/teamSoundSet.vue

@@ -9,25 +9,41 @@
                   @getBaseInfo="getBaseInfo"
                   @getNumber="getNumber" />
     <div class="btnWrap">
-      <el-button type="primary" @click="goback" style="margin-right: 10px;">上一步</el-button>
+      <el-button type="primary" @click="goback">上一步</el-button>
+
+      <el-button type="primary"
+        v-if="teamStatus == 'newTeam'"
+        @click="submitInfo()"
+        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="{child: 'musicGroup/auditSuccess', parent: '/teamBuild/teamAudit/soundMoney'}">审核通过</el-button>
+      <el-button type="danger" @click="refuse"
+           v-if="teamStatus == 'teamAudit'"
+           v-permission="{child: 'musicGroup/auditFailed', parent: '/teamBuild/teamAudit/soundMoney'}">驳回</el-button>
       <!--  v-if="teamStatus != 'teamAudit'" -->
-      <div
+      <!-- <div
         class="submitBtn"
+        v-if="teamStatus == 'newTeam'"
         v-permission="{
           child: 'musicGroup/createGroup',
           parent: '/teamBuild/soundMoney',
         }"
         @click="submitInfo()"
       >
-        下一步
+        提交
       </div>
-      <!-- <div
+      <div
         class="submitBtn"
         @click="submitAudit(1)"
-        v-if="teamStatus != 'teamAudit'"
+        v-if="teamStatus == 'teamDraft'"
       >
         提交审核
-      </div> -->
+      </div>
       <div class="submitBtn"
            @click="approval"
            v-if="teamStatus == 'teamAudit'"
@@ -39,7 +55,7 @@
            v-if="teamStatus == 'teamAudit'"
            v-permission="{child: 'musicGroup/auditFailed', parent: '/teamBuild/teamAudit/soundMoney'}">
         驳回
-      </div>
+      </div> -->
     </div>
   </div>
 </template>

+ 31 - 2
src/views/teamBuild/createPayment.vue

@@ -1,5 +1,8 @@
 <template>
-    <div>
+    <div class="m-container">
+        <h2>
+          <el-page-header @back="onCancel" :content="teamName"></el-page-header>
+        </h2>
         <el-tabs v-model.trim="activeIndex"
              type="card"
                     @tab-click="handleClick">
@@ -17,29 +20,55 @@
                                     v-if="activeIndex == 2" />
             </el-tab-pane>
         </el-tabs>
+        <el-button type="primary" @click="goHome"></el-button>
     </div>
 </template>
 
 <script>
 import resetPayList from "@/views/resetTeaming/components/resetPayList";
 import resetPayListSchool from '@/views/resetTeaming/components/resetPayListSchool'
-// import teamPayInfo from "@/views/teamBuild/components/teamPayInfo";
+import { permission } from "@/utils/directivePage";
+import { getTeamBaseInfo } from "@/api/buildTeam";
 export default {
     name: 'createPayment',
     components: { resetPayList, resetPayListSchool },
     data () {
+        const query = this.$route.query
         return {
+            teamName: query.name,
+            musicGroupId: query.id,
             activeIndex: '1',
             baseInfo: {}
         };
     },
     mounted() {
         // getTeamBaseInfo
+        this.getList()
     },
     methods: {
+        permission,
         handleClick (val) {
             this.activeIndex = val.name
         },
+        onCancel() {
+            this.$router.push({ path: "/business/teamDetail" });
+        },
+        async getList() {
+            await getTeamBaseInfo({ musicGroupId: this.musicGroupId }).then((res) => {
+                if (res.code == 200) {
+                    this.baseInfo = res.data
+                }
+            });
+        },
+        goHome () {
+            let query = this.$route.query
+            this.$router.push({
+                path: '/business/teamDetail',
+                query: {
+                ...query
+                }
+            })
+        }
     }
 }
 </script>

+ 103 - 74
src/views/teamBuild/forecastName.vue

@@ -4,25 +4,25 @@
           <el-page-header @back="onCancel" :content="teamName"></el-page-header>
         </h2>
 
-        <p style="margin-bottom: 15px; font-size: 18px; font-weight: 400">
+        <!-- <p style="margin-bottom: 15px; font-size: 18px; font-weight: 400">
           缴费截止时间:{{ '2020-12-12' | formatTimer }}
-        </p>
+        </p> -->
 
         <div class="btnList">
             <auth :auths="['/main']">
               <el-button type="primary" @click="codeStatus = true">预报名链接</el-button>
             </auth>
-            <auth>
+            <!-- <auth>
               <el-button type="primary" @click="extendPaymentStatus = true">预报名时间延长</el-button>
-            </auth>
+            </auth> -->
             <auth>
-              <el-button type="primary">家长会通知</el-button></el-button>
+              <el-button type="primary">家长会通知</el-button>
             </auth>
-            <auth>
-              <el-button type="primary">乐团缴费</el-button>
+            <auth :auths="['musicGroup/finishPreApply']">
+              <el-button type="primary" @click="onPaymentGroup">乐团缴费</el-button>
             </auth>
-            <auth>
-              <el-button type="primary">特色乐团缴费</el-button>
+            <auth :auths="['musicGroup/finishPreApply/item']">
+              <el-button type="primary" @click="onPaymentGroup(1)">特色乐团缴费</el-button>
             </auth>
         </div>
 
@@ -36,47 +36,25 @@
             >
                 <el-form-item>
                     <el-input
-                        v-model.trim="searchForm.search"
+                        v-model.trim="searchForm.name"
                         clearable
                         @keyup.enter.native="search"
                         placeholder="学生编号/姓名/手机号"
                     ></el-input>
                 </el-form-item>
-                <el-form-item prop="organId">
+                <el-form-item prop="isAllowAdjust">
                     <el-select
-                        class="multiple"
-                        v-model.trim="searchForm.organId"
-                        filterable
+                        v-model.trim="searchForm.isAllowAdjust"
                         clearable
-                        placeholder="学员状态"
+                        placeholder="是否允许调剂"
                     >
-                        <el-option
-                        v-for="(item, index) in selects.branchs"
-                        :key="index"
-                        :label="item.name"
-                        :value="item.id"
-                        ></el-option>
+                        <el-option label="是" :value="1"></el-option>
+                        <el-option label="否" :value="0"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item>
-                    <el-input
-                        v-model.trim="searchForm.search"
-                        clearable
-                        @keyup.enter.native="search"
-                        placeholder="学生编号/姓名/手机号"
-                    ></el-input>
-                </el-form-item>
-                <el-form-item>
-                    <el-select
-                        placeholder="所选专业"
-                        v-model="searchForm.statusEnum"
-                        clearable
-                    >
-                        <el-option label="待处理" value="PENDING"></el-option>
-                        <el-option label="已完成" value="DONE"></el-option>
-                        <el-option label="已同意" value="AGREED"></el-option>
-                        <el-option label="已拒绝" value="DENIED"></el-option>
-                        <el-option label="已撤回" value="WITHDRAWN"></el-option>
+                    <el-select clearable v-model="searchForm.subjectId" placeholder="所选专业">
+                        <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item>
@@ -92,54 +70,72 @@
                 >
                     <el-table-column
                         align="center"
-                        prop="organName"
+                        prop="userId"
                         label="学员编号"
-                    ></el-table-column>
+                    >
+                        <template slot-scope="scope">
+                            <copy-text>{{ scope.row.userId }}</copy-text>
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         align="center"
-                        prop="teacherId"
+                        prop="userName"
                         label="学员姓名"
                     ></el-table-column>
                     <el-table-column
                         align="center"
-                        prop="realName"
+                        prop="gender"
                         label="性别"
-                    ></el-table-column>
+                    >
+                        <template slot-scope="scope">
+                            {{ scope.row.gender ? '男' : '女' }}
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         align="center"
-                        prop="realName"
+                        prop="phone"
                         label="联系电话"
-                    ></el-table-column>
+                    >
+                        <template slot-scope="scope">
+                            <copy-text>{{ scope.row.phone }}</copy-text>
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         align="center"
-                        prop="realName"
                         label="年级班级"
-                    ></el-table-column>
-                    <el-table-column
-                        align="center"
-                        prop="realName"
-                        label="乐团意向"
-                    ></el-table-column>
+                    >
+                        <template slot-scope="scope">
+                            {{ scope.row.currentGrade }}{{ scope.row.currentClass }}
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         align="center"
-                        prop="realName"
+                        prop="subjectFirstName"
                         label="选报声部1"
                     ></el-table-column>
                     <el-table-column
                         align="center"
-                        prop="realName"
+                        prop="subjectSecondName"
                         label="选报声部2"
                     ></el-table-column>
                     <el-table-column
                         align="center"
-                        prop="realName"
+                        prop="isAllowAdjust"
                         label="是否服从调剂"
-                    ></el-table-column>
+                    >
+                        <template slot-scope="scope">
+                            {{ scope.row.isAllowAdjust ? '是' : '否' }}
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         align="center"
                         prop="realName"
                         label="乐器准备方式"
-                    ></el-table-column>
+                    >
+                        <template slot-scope="scope">
+                            {{ scope.row.kitPurchaseMethod == 1 ? '参与团购' : '自行准备' }}
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         align="center"
                         prop="courseScheduleId"
@@ -147,11 +143,12 @@
                         label="操作"
                     >
                         <template slot-scope="scope">
-                            <el-button
+                            <auth :auths="['visit/add']" :router="['/business/forecastName']">
+                                <el-button
                                 type="text"
                                 @click="addVisited(scope.row)"
-                                v-if="permission('teacherSalaryComplaints/complaintsDispose')"
                                 >新增回访</el-button>
+                            </auth>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -169,7 +166,7 @@
         <!-- 预报名连接 -->
         <qr-code v-model="codeStatus" title="预报名二维码" :codeUrl="codeUrl" />
         <!-- 预报名时间延长 -->
-        <el-dialog
+        <!-- <el-dialog
             title="预报名时间延长"
             :visible.sync="extendPaymentStatus"
             destroy-on-close
@@ -194,7 +191,7 @@
                     @click="onExtendPayment('extendForm')"
                 >确 定</el-button>
             </div>
-        </el-dialog>
+        </el-dialog> -->
         <!-- 回访记录 -->
         <el-dialog
             title="新增回访"
@@ -203,7 +200,7 @@
             :close-on-click-modal="false"
             :visible.sync="visitVisible"
         >
-            <visit-model v-if="visitVisible" :visitDetail="visitDetail" />
+            <visit-model v-if="visitVisible" @close="visitVisible = false" :visitDetail="visitDetail" />
         </el-dialog>
     </div>
 </template>
@@ -212,22 +209,23 @@
 import pagination from "@/components/Pagination/index";
 import qrCode from '@/components/QrCode/index';
 import { permission } from "@/utils/directivePage";
+import { vaildStudentUrl } from '@/utils/validate'
 import visitModel from './modals/visit'
+import { queryPreApplyList, finishPreApply } from './api'
 export default {
     name: 'forecastName',
-    components: { pagination, qrCode },
+    components: { pagination, qrCode, visitModel },
     data() {
         const query = this.$route.query
         return {
             teamName: query.name || null,
             codeStatus: false,
-            codeUrl: null,
+            musicGroupId: query.id,
+            codeUrl: vaildStudentUrl() + '/project/forecastName/index.html?musicGroupId=' + query.id,
             searchForm: {
-                search: null,
-                salarySettlementMonth: null,
-                statusEnum: null,
-                teacherId: null,
-                organId: null,
+                name: null,
+                subjectId: null,
+                isAllowAdjust: null,
             },
             tableList: [],
             pageInfo: {
@@ -251,7 +249,8 @@ export default {
         }
     },
     mounted() {
-        this.codeUrl = 'http://www.baidu.com'
+        this.$store.dispatch('setSubjects')
+        this.getList()
     },
     methods: {
         permission,
@@ -266,13 +265,43 @@ export default {
         onCancel() {
             this.$router.push({ path: "/business/teamDetail" });
         },
-        getList() {
-
+        async getList() {
+            try {
+                const result = await queryPreApplyList({
+                    ...this.searchForm,
+                    page: this.pageInfo.page,
+                    rows: this.pageInfo.limit
+                })
+                this.tableList = result.data.rows
+                this.pageInfo.total = result.data.total
+            } catch (error) {}
+        },
+        async onPaymentGroup(type) {
+            try {
+                const result = await finishPreApply({
+                    isCheckStudentNum: type == 1  ? false : true,
+                    musicGroupId: this.musicGroupId
+                })
+                this.$router.push({
+                    path: '/business/teamDetail'
+                })
+            } catch(error) {}
         },
         addVisited(rows) {
             // 新增回访
             this.visitVisible = true
-            this.visitDetail = rows
+            this.visitDetail =  {
+                musicGroupId: rows.musicGroupId,
+                overview: "",
+                purpose: "",
+                studentId: rows.userId,
+                type: "",
+                visitTime: "",
+                visitType: "",
+                feedback: "",
+                studentName: rows.userName,
+            }
+            // this.visitDetail = rows
         },
         onExtendPayment(formName) {
             this.$refs[formName].validate(valid => {

+ 24 - 4
src/views/teamBuild/modals/visit.vue

@@ -15,7 +15,7 @@
                     expand-trigger="hover"
                     clearable
                     placeholder="请选择回访类型"
-                    :options="visitChose"
+                    :options="visitChiose"
                     @change="handleChange"
                     style="width: 220px !important"
                     v-model="visitForm.visitType"
@@ -55,16 +55,19 @@
             </el-form-item>
         </el-form>
         <span slot="footer" class="dialog-footer">
-            <el-button @click="visitVisiable = false">取 消</el-button>
+            <el-button @click="$listeners.close()">取 消</el-button>
             <el-button type="primary" @click="submitAddVisit">确 定</el-button>
         </span>
     </div>
 </template>
 
 <script>
-import { visitChose } from "@/utils/searchArray";
+import { visitChiose } from "@/utils/searchArray";
+import { addVisit } from "@/views/returnVisitManager/api.js";
+import cleanDeep from 'clean-deep';
 export default {
     name: 'visit',
+    props: ['visitDetail'],
     data() {
         return {
             visitForm: {
@@ -78,23 +81,39 @@ export default {
                 feedback: "",
                 studentName: "",
             },
-            visitChose,
+            visitChiose,
             visitRules: {
                 overview: [{ required: true, message: "请输入学生近况" }],
                 feedback: [{ required: true, message: "请输入家长反馈" }],
                 visitTime: [{ required: true, message: "请输入回访时间" }],
                 visitType: [{ required: true, message: "请选择回访类型" }],
             },
+            pickerOptions: {}
         }
     },
     async mounted() {
         this.pickerOptions = this.beginDate(new Date());
+        this.visitForm = { ...this.visitDetail }
     },
     methods: {
         handleChange(val) {
             this.visitForm.type = val[0];
             this.visitForm.purpose = val[1];
         },
+        submitAddVisit() {
+            this.$refs.visitForm.validate(async (res) => {
+                if (res) {
+                    this.visitForm.visitType = null;
+                    this.visitForm.musicGroupId = this.id;
+                    await addVisit(cleanDeep(this.visitForm)).then((res) => {
+                        if (res.code === 200) {
+                            this.$message.success("新增成功");
+                            this.$listeners.close()
+                        }
+                    });
+                }
+            });
+        },
         beginDate(date) {
             let self = this;
             return {
@@ -110,6 +129,7 @@ export default {
 
 <style lang="less" scoped>
 .dialog-footer {
+    display: block;
     text-align: right;
 }
 </style>

+ 23 - 5
src/views/teamDetail/teamList.vue

@@ -4,10 +4,9 @@
       <div class="squrt"></div>乐团列表
     </h2>
     <div class="m-core">
-      <div class="btnList">
-        <div class='newBand'
-             v-permission="'/teamBuild'"
-             @click="createNewTeam">新建乐团</div>
+      <div class="btnList" style="margin-bottom: 20px">
+        <el-button type="primary" v-permission="'/teamBuild'"
+             @click="createNewTeam">新建乐团</el-button>
         <!-- <div class='newBand'
              v-permission="'/teamBuild/trimming'"
              @click="resetTeam">乐团调整</div> -->
@@ -201,11 +200,21 @@
                            v-if="scope.row.status == 'PROGRESS' && permission('/teamDetails')"
                            @click="lookTeamDetail(scope.row)">查看</el-button>
 
+                <!-- 预报名中 查看 -->
+                <el-button type="text"
+                           v-if="scope.row.status == 'PRE_APPLY' && permission('studentRegistration/queryPreApplyList')"
+                           @click="lookTeamDetail(scope.row)">查看</el-button>
+
                 <!-- 暂停中 查看 -->
                 <el-button type="text"
                            v-if="scope.row.status == 'PAUSE' && permission('musicGroup/pauseMusicGroup/look')"
                            @click="lookTeamDetail(scope.row)">查看</el-button>
 
+                <!-- 创建缴费中 查看 -->
+                <el-button type="text"
+                           v-if="scope.row.status == 'PRE_BUILD_FEE' && permission('/createPayment')"
+                           @click="lookTeamDetail(scope.row)">查看</el-button>
+
                 <!-- <el-button type="text"
                            v-if="scope.row.status != 'PROGRESS' && scope.row.status != 'CANCELED'  && scope.row.status != 'PAUSE' && scope.row.status != 'APPLY'&& scope.row.status != 'PAY'"
                            @click="lookTeamDetail(scope.row)">编辑</el-button> -->
@@ -363,7 +372,6 @@ export default {
     },
     search () {
       this.rules.page = 1;
-      console.log(this.rules)
       this.getList();
     },
     getList () {
@@ -523,6 +531,11 @@ export default {
           this.$router.push({ path: '/business/teamBuild', query: { type: 'teamAudit', id: row.id,  } })
           break;
         }
+        case 'PRE_BUILD_FEE': {
+          // 创建缴费中
+          this.$router.push({ path: '/business/createPayment', query: { type: 'PRE_BUILD_FEE', id: row.id, name: row.name } })
+          break;
+        }
         case 'FEE_AUDIT': {
           // 费用审核中
           this.$router.push({ path: '/business/teamBuild', query: { type: 'feeAudit', id: row.id,  } })
@@ -533,6 +546,11 @@ export default {
           this.$router.push({ path: '/business/teamBuild', query: { type: 'teamDraft', id: row.id,  } })
           break;
         }
+        case 'PRE_APPLY': {
+          // 预报名
+          this.$router.push({ path: '/business/forecastName', query: { id: row.id, name: row.name  } })
+          break;
+        }
         case 'APPLY': {
           // 报名中
           this.$router.push({ path: `/business/signupList`, query: { status: row.status, id: row.id, name: row.name, } }, router => {