123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <template>
- <div class="m-container">
- <h2>
- <div class="squrt"></div>欠费学员列表 <filter-search @reload="FetchList" :keys="['visitFlag']" :moreKeys="['organId']"/>
- </h2>
- <div class="m-core">
- <save-form
- :inline="true"
- @submit="submit"
- @reset="onReSet"
- ref="searchForm"
- :model.sync="searchForm"
- >
- <el-form-item>
- <el-input
- v-model.trim="searchForm.search"
- clearable
- placeholder="学员编号、姓名"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.organIds"
- clearable
- filterable
- multiple
- collapse-tags
- placeholder="请选择所属分部"
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.musicGroupId"
- clearable
- filterable
- placeholder="请选择乐团"
- >
- <el-option
- v-for="(item, index) in musicList"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.cooperationOrganId"
- clearable
- filterable
- placeholder="请选择合作单位"
- >
- <el-option
- v-for="(item, index) in cooperations"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <remote-search
- :commit="'setEducations'"
- v-model="searchForm.eduTeacherId"
- />
- </el-form-item>
- <el-form-item>
- <el-button native-type="submit" type="danger">搜索</el-button>
- <el-button native-type="reset" type="primary">重置</el-button>
- </el-form-item>
- </save-form>
- <el-table
- :data="list"
- style="width: 100%"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- >
- <el-table-column
- prop="userId"
- label="学员编号"
- >
- <copy-text slot-scope="scope">{{scope.row.userId}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="studentName"
- label="学员姓名"
- >
- <copy-text slot-scope="scope">{{scope.row.studentName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="organName"
- label="所属分部"
- >
- <copy-text slot-scope="scope">{{scope.row.organName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="cooperationName"
- label="合作单位"
- >
- <copy-text slot-scope="scope">{{scope.row.cooperationName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="musicGroupName"
- label="所在乐团"
- >
- <copy-text slot-scope="scope">{{scope.row.musicGroupName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="eduTeacherName"
- label="乐团主管"
- >
- <copy-text slot-scope="scope">{{scope.row.eduTeacherName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="subjectName"
- label="声部"
- >
- <copy-text slot-scope="scope">{{scope.row.subjectName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="gender"
- label="性别"
- >
- <span slot-scope="scope">{{scope.row.gender | sex}}</span>
- </el-table-column>
- <el-table-column
- prop="parentName"
- label="家长姓名"
- >
- <copy-text slot-scope="scope">{{scope.row.parentName}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="phone"
- label="家长联系电话"
- >
- <copy-text slot-scope="scope">{{scope.row.phone}}</copy-text>
- </el-table-column>
- <el-table-column
- prop="noPaymentAmount"
- label="欠费金额"
- >
- <span style="color: red;" slot-scope="scope">{{scope.row.noPaymentAmount | moneyFormat}}</span>
- </el-table-column>
- <el-table-column
- prop="ctrls"
- label="操作"
- fixed="right"
- v-if="permission('musicGroupPaymentCalenderDetail/queryPage/list')"
- >
- <el-button slot-scope="scope" type="text" @click="view(scope.row)">查看</el-button>
- </el-table-column>
- </el-table>
- <pagination
- sync
- :total.sync="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="FetchList"
- />
- </div>
- <el-dialog width="1000px" title="缴费记录" :visible.sync="visible">
- <list-dialog
- v-if="visible && detail"
- @close="visible = false"
- :musicGroupId="detail.musicGroupId"
- :userId="detail.userId"
- />
- </el-dialog>
- </div>
- </template>
- <script>
- import pagination from "@/components/Pagination/index";
- import list from './modals/list'
- import { permission } from '@/utils/directivePage'
- import { getCooperation } from '@/api/buildTeam'
- import { queryArrearageStudents, getNoPaymentStudentMusicGroups } from './api'
- const initSearch = {
- search: '',
- eduTeacherId: null,
- organIds: [],
- branchs: null,
- musicGroupId: null,
- cooperationOrganId: null,
- }
- export default {
- components: {
- pagination,
- 'list-dialog': list
- },
- data() {
- return {
- list: [],
- visible: false,
- detail: null,
- musicList: [],
- searchForm: {
- ...initSearch
- },
- cooperations: [],
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- }
- },
- mounted() {
- const { query } = this.$route
- if (query.organId) {
- console.log(query.organId)
- this.searchForm.organIds = [Number(query.organId)]
- }
- getCooperation({ rows: 1000 }).then((res) => {
- this.cooperations = res.data.rows
- })
- this.$store.dispatch('setBranchs')
- this.$store.dispatch('setSchools')
- this.FetchList()
- this.FetchMusicList()
- },
- methods: {
- permission,
- async FetchList() {
- try {
- const { organIds, ...rest} = this.searchForm
- const res = await queryArrearageStudents({
- page: this.rules.page,
- rows: this.rules.limit,
- organIds: organIds.join(','),
- ...rest,
- })
- this.rules.total = res.data.total;
- this.list = res.data.rows
- } catch (error) {}
- },
- async FetchMusicList() {
- try {
- const res = await getNoPaymentStudentMusicGroups()
- this.musicList = res.data
- } catch (error) {}
- },
- submit() {
- this.rules.page = 1
- this.FetchList()
- },
- onReSet() {
- this.searchForm = {...initSearch}
- this.submit();
- },
- view(row) {
- this.detail = row
- this.visible = true
- },
- }
- }
- </script>
|