瀏覽代碼

Merge branch 'opt_xuexiaojiaofei' into Nov16thResetMusic

wolyshaw 4 年之前
父節點
當前提交
494978cc60

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

@@ -324,8 +324,8 @@
                width='800px'>
       <setStudentFee @chioseStudent='chioseStudent'
                      ref='setStudentFee'
-                     :batchNo="batchNo"
                      v-if="chioseStudentVisible"
+                     :batchNo="batchNo"
                      :musicGroupPaymentCalenderId="musicGroupPaymentCalenderId"
                      @submited="chioseStudentSubmited"
                      :clearTale="clearStduent"></setStudentFee>

+ 27 - 2
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -286,6 +286,7 @@
         :teamStatus="teamStatus"
         :teamType="teamType"
         :isNewGropu="isNewGropu"
+        @lookUserList="lookUserList"
         @lookDetail="lookDetail"
         @openChioseStudent="openChioseStudent"
         @resetPay="resetPay"
@@ -293,6 +294,16 @@
         @onCreateQRCode="onCreateQRCode"
       />
     </el-dialog>
+    <el-dialog
+      title="查看缴费用户列表"
+      :visible.sync="userListVisible"
+      width="850px"
+    >
+      <schoolPayUserList
+        v-if="userListVisible && viewDetail"
+        :detail="viewDetail"
+      />
+    </el-dialog>
     <el-dialog title="查看"
                :visible.sync="reviewVisible"
                width="900px"
@@ -329,9 +340,9 @@
                append-to-body
                width='800px'>
       <setStudentFee @chioseStudent='chioseStudent'
+                     v-if="chioseStudentVisible"
                      ref='setStudentFee'
                      :batchNo="batchNo"
-                     v-if="chioseStudentVisible"
                      :musicGroupPaymentCalenderId="musicGroupPaymentCalenderId"
                      @submited="chioseStudentSubmited"
                      :clearTale="clearStduent"></setStudentFee>
@@ -371,7 +382,13 @@ import qs from "qs";
 import dayjs from 'dayjs'
 import QrCode from "@/components/QrCode/index";
 import { vaildStudentUrl } from '@/utils/validate'
-import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender } from "@/api/buildTeam";
+import {
+  addMusicGroupPaymentCalender,
+  getMusicGroupPaymentCalender,
+  resetMusicGroupPaymentCalender,
+  delMusicGroupPaymentCalender,
+  getmusicGroupPaymentCalenderDetail
+} from "@/api/buildTeam";
 import {
   getOrganizationCourseUnitPriceSettings
 } from '@/api/specialSetting'
@@ -381,6 +398,7 @@ import setStudentFee from './studentPayBase'
 import userPayForm from '../modals/user-pay-form'
 import payItems from '../modals/pay-items'
 import schoolPayForm from '../modals/school-pay-form'
+import schoolPayUserList from '../modals/school-pay-user-list'
 import isGetMoney from '../modals/isGetMoney'
 import review from '../modals/review'
 import reviewDetail from '../modals/review-detail'
@@ -399,6 +417,7 @@ export default {
     reviewDetail,
     teamType: '',
     'pay-items': payItems,
+    schoolPayUserList,
     isGetMoney
   },
   data () {
@@ -408,6 +427,7 @@ export default {
       userVisible: false,
       schoolVisible: false,
       reviewVisible: false,
+      userListVisible: false,
       itemsVisible: false,
       teamType: this.$route.query.type,
       organizationCourseUnitPriceSettings: [],
@@ -587,6 +607,11 @@ export default {
       this.viewDetail = row
       this.itemsVisible = true
     },
+    lookUserList(row) {
+      console.log({...row})
+      this.viewDetail = {...row}
+      this.userListVisible = true
+    },
     lookDetail (row) {
       let query = this.$route.query;
       this.$route.query.paymentId = row.id;

+ 42 - 23
src/views/resetTeaming/modals/pay-items.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
-    <el-table :data="list" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
+    <el-table
+      :data="list"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+    >
       <el-table-column
         align="center"
         prop="id"
@@ -103,6 +106,10 @@
               @click="$listeners.resetPay(scope.row)"
               >修改</el-button
             > -->
+            <el-button type="text"
+                        v-if="$listeners.lookUserList"
+                        @click="$listeners.lookUserList(scope.row)"
+                        v-permission="'musicGroupPaymentCalender/queryPage'">学员列表</el-button>
             <el-button
               type="text"
               v-permission="'musicGroupPaymentCalender/makesureSchoolePaid'"
@@ -110,25 +117,37 @@
               @click="$listeners.commmitGetMoney(scope.row)"
               >确认收款</el-button
             >
-            <el-button type="text"
-                         v-if="!isNewGropu&&teamStatus&&scope.row.paymentType!='MUSIC_APPLY'&&payUserType === 'STUDENT'"
-                         @click="$listeners.onCreateQRCode(scope.row)">续费二维码</el-button>
-            <el-button type="text"
-                         v-if="$listeners.onPreview && payUserType === 'STUDENT'"
-                         v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
-                         @click="$listeners.onPreview(scope.row)">预览</el-button>
+            <el-button
+              type="text"
+              v-if="
+                !isNewGropu &&
+                teamStatus &&
+                scope.row.paymentType != 'MUSIC_APPLY' &&
+                payUserType === 'STUDENT'
+              "
+              @click="$listeners.onCreateQRCode(scope.row)"
+              >续费二维码</el-button
+            >
+            <el-button
+              type="text"
+              v-if="$listeners.onPreview && payUserType === 'STUDENT'"
+              v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
+              @click="$listeners.onPreview(scope.row)"
+              >预览</el-button
+            >
             <!-- <el-button type="text" v-if="!isNewGropu" @click="onCreateQRCode(scope.row)">续费二维码</el-button> -->
           </div>
         </template>
       </el-table-column>
     </el-table>
-    <pagination :total="rules.total"
-                :page.sync="rules.page"
-                :limit.sync="rules.limit"
-                :page-sizes="rules.page_size"
-                @pagination="getList" />
-    <div slot="footer"
-        class="dialog-footer">
+    <pagination
+      :total="rules.total"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="getList"
+    />
+    <div slot="footer" class="dialog-footer">
       <el-button @click="$listeners.close">取 消</el-button>
     </div>
   </div>
@@ -139,9 +158,9 @@ import { musicGroupPaymentCalenderDetailDel } from '../api'
 import loading from '@/utils/loading'
 import pagination from "@/components/Pagination/index";
 export default {
-  props: ['batchNo', 'teamStatus', 'teamType', 'payUserType', 'isNewGropu'],
+  props: ["batchNo", "teamStatus", "teamType", "payUserType", "isNewGropu"],
   components: {
-    pagination
+    pagination,
   },
   data() {
     return {
@@ -153,24 +172,24 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
-    }
+    };
   },
   mounted() {
-    this.getList()
+    this.getList();
   },
   methods: {
     async getList() {
       try {
         const res = await getMusicGroupPaymentCalender({
           batchNo: this.batchNo,
-          page: '1',
+          page: "1",
           rows: 10,
-        })
-        this.list = res.data.rows
+        });
+        this.list = res.data.rows;
       } catch (error) {}
     },
     toDetail(row) {
-      this.$listeners.close()
+      // this.$listeners.close();
       this.$nextTick(() => {
           this.$listeners.lookDetail(row)
       })

+ 206 - 0
src/views/resetTeaming/modals/school-pay-user-list.vue

@@ -0,0 +1,206 @@
+<template>
+  <div>
+    <el-form :inline="true" :model="searchForm">
+      <el-form-item>
+        <el-input
+          v-model.trim="searchForm.search"
+          @keyup.enter.native="FetchList"
+          placeholder="学生编号"
+          clearable
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-select
+          v-model.trim="searchForm.subjectId"
+          style="width: 180px"
+          clearable
+          filterable
+          placeholder="请选择声部"
+        >
+          <el-option
+            v-for="(item, index) in storeState.sounds"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="FetchList" type="danger">搜索</el-button>
+        <el-button @click="onReSet" type="primary">重置</el-button>
+        <!-- <el-button
+          type="primary"
+          :disabled="!activeChiose.length"
+          @click="deleteUser"
+          v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
+        >删除学员</el-button> -->
+      </el-form-item>
+    </el-form>
+    <el-table
+      :data="list"
+      @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+    >
+      <el-table-column type="selection" width="55"> </el-table-column>
+      <el-table-column
+        align="center"
+        prop="userId"
+        label="学员编号"
+        width="100"
+      >
+        <template slot-scope="scope">
+          <copy-text>{{ scope.row.userId }}</copy-text>
+        </template>
+      </el-table-column>
+      <el-table-column
+        width="100"
+        align="center"
+        prop="studentId"
+        label="学员姓名"
+      >
+        <template slot-scope="scope">
+          <div v-if="scope.row.sysUser">
+            <copy-text>{{ scope.row.sysUser.username }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="学员声部">
+        <template slot-scope="scope">
+          <overflow-text
+            width="100%"
+            :text="
+              scope.row.studentRegistration &&
+              scope.row.studentRegistration.subjectName
+            "
+          ></overflow-text>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="学员状态">
+        <template slot-scope="scope">
+          <div v-if="scope.row.studentRegistration">
+            {{
+              scope.row.studentRegistration.musicGroupStatus | studentTeamStatus
+            }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        width="130"
+        align="center"
+        prop="studentId"
+        label="手机号"
+      >
+        <template slot-scope="scope">
+          <div v-if="scope.row.sysUser">
+            <copy-text>{{ scope.row.sysUser.phone }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column width="110" align="center" label="是否开启缴费">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.open ? "是" : "否" }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="缴费状态">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.paymentStatus | paymentStatusDetall }}
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      :total="rules.total"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="FetchList"
+    />
+  </div>
+</template>
+<script>
+import store from '../store'
+
+const initSearchForm = {
+  search: '',
+  subjectId: ''
+}
+import pagination from "@/components/Pagination/index";
+import { getmusicGroupPaymentCalenderDetail, delMusicGroupPaymentCalenderStudent } from "@/api/buildTeam";
+export default {
+  props: ['detail'],
+  components: {
+    pagination,
+  },
+  data() {
+    return {
+      searchForm: {
+        ...initSearchForm
+      },
+      list: [],
+      activeChiose: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  computed: {
+    storeState() {
+      return store.state
+    }
+  },
+  mounted() {
+    if (this.detail) {
+      store.dispatch('getFindSound', {
+        data: {
+          musicGroupId: this.detail.musicGroupId
+        }
+      })
+      this.FetchList();
+    }
+  },
+  methods: {
+    handleSelectionChange(val) {
+      this.activeChiose = val;
+    },
+    onReSet() {
+      this.searchForm = {
+        ...initSearchForm
+      }
+      this.FetchList()
+    },
+    async deleteUser() {
+      try {
+        await this.$confirm('是否删除选中学员?', '提示', {
+          type: 'warning'
+        })
+        await delMusicGroupPaymentCalenderStudent({
+          musicGroupPaymentCalenderIds: this.activeChiose.map(item => item.id)
+        })
+        this.$message.success('删除成功')
+        this.FetchList()
+      } catch (error) {}
+    },
+    async FetchList() {
+      try {
+        const res = await getmusicGroupPaymentCalenderDetail({
+          id: this.detail.id,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          ...this.searchForm,
+        });
+        this.rules.total = res.data.total;
+        this.list = res.data.rows;
+      } catch (error) {}
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 19 - 2
src/views/resetTeaming/store.js

@@ -1,12 +1,13 @@
 /* eslint-disable no-empty */
 import Vuex from 'vuex'
-import { getTeamBaseInfo } from '@/api/buildTeam'
+import { getTeamBaseInfo, findSound } from '@/api/buildTeam'
 
 const store = new Vuex.Store({
   state: {
     res: null,
     baseInfo: null,
-    musicGroup: {}
+    musicGroup: {},
+    sounds: []
   },
   mutations: {
     updateBaseinfo(state, res) {
@@ -17,6 +18,9 @@ const store = new Vuex.Store({
       } else {
         state.musicGroup = {}
       }
+    },
+    updateSound(state, list) {
+      state.sounds = [...list]
     }
   },
   actions: {
@@ -30,6 +34,19 @@ const store = new Vuex.Store({
         return Promise.resolve(state.res)
       } catch (error) {}
       return Promise.reject()
+    },
+    async getFindSound({ commit, state }, payload) {
+      try {
+        if (state.sounds.length) {
+          return Promise.resolve(state.sounds)
+        }
+        const res = await findSound({
+          ...payload.data
+        })
+        commit('updateSound', res.data)
+        return Promise.resolve(state.sounds)
+      } catch (error) {}
+      return Promise.reject()
     }
   }
 })