|
@@ -12,32 +12,63 @@
|
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
|
:data="tableList">
|
|
|
<el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
- label="缴费开始日期"></el-table-column>
|
|
|
+ prop="startPaymentDate"
|
|
|
+ label="缴费开始日期">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.startPaymentDate | formatTimer}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
- label="缴费结束日期"></el-table-column>
|
|
|
+ prop="deadlinePaymentDate"
|
|
|
+ label="缴费结束日期">
|
|
|
+
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.deadlinePaymentDate | formatTimer}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="expectNum"
|
|
|
label="预计缴费人数"></el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="actualNum"
|
|
|
label="实际缴费人数"></el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
- label="状态"></el-table-column>
|
|
|
+ prop="type"
|
|
|
+ label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.type | paymentType}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
- label="备注"></el-table-column>
|
|
|
+ prop="type"
|
|
|
+ label="缴费状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.paymentStatus | paymentStatus}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- label="操作">
|
|
|
+ prop="memo"
|
|
|
+ label="备注"></el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-button type="text"
|
|
|
+ v-if="scope.row.paymentStatus != 0"
|
|
|
@click="lookDetail(scope.row)">查看</el-button>
|
|
|
<el-button type="text"
|
|
|
+ v-if="scope.row.paymentStatus == 0"
|
|
|
@click="resetPay(scope.row)">修改</el-button>
|
|
|
- <el-button type="text">删除</el-button>
|
|
|
+ <el-button type="text"
|
|
|
+ v-if="scope.row.paymentStatus == 0"
|
|
|
+ @click="detelePay(scope.row)">删除</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -52,26 +83,55 @@
|
|
|
width="500px"
|
|
|
:title="diTitle">
|
|
|
<el-form :model="payForm"
|
|
|
+ :inline="true"
|
|
|
+ label-width="120px"
|
|
|
+ label-position="right"
|
|
|
ref='payForm'>
|
|
|
<el-form-item label="缴费开始日期"
|
|
|
:rules="[{ required: true, message: '请设置缴费开始日期',trigger: 'blur'}]"
|
|
|
- prop="startDate">
|
|
|
- <el-date-picker v-model.trim="payForm.startDate"
|
|
|
+ prop="startPaymentDate">
|
|
|
+ <el-date-picker v-model.trim="payForm.startPaymentDate"
|
|
|
type="date"
|
|
|
:picker-options="pickerOptions"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="开始日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="收费类型"
|
|
|
+ v-if='isNew'
|
|
|
+ :rules="[{ required: true, message: '请选择收费类型',trigger: 'blur'}]"
|
|
|
+ prop="type">
|
|
|
+ <el-select v-model.trim="payForm.type"
|
|
|
+ style="width:220px!important;"
|
|
|
+ placeholder="课程类型">
|
|
|
+ <el-option label="线上"
|
|
|
+ value="ONLINE"></el-option>
|
|
|
+ <el-option label="线下"
|
|
|
+ value="OFFLINE"></el-option>
|
|
|
+ <el-option label="全部"
|
|
|
+ value="ALL"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注"
|
|
|
+ v-if='isNew'
|
|
|
+ :rules="[{ required: true, message: '请填写备注',trigger: 'blur'}]"
|
|
|
+ prop="memo">
|
|
|
+ <el-input type="textarea"
|
|
|
+ style="width:220px!important;"
|
|
|
+ :rows="4"
|
|
|
+ placeholder="请填写备注"
|
|
|
+ v-model="payForm.memo"></el-input>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer">
|
|
|
<el-button @click="payVisible = false">取 消</el-button>
|
|
|
<el-button type="primary"
|
|
|
v-if="isNew"
|
|
|
- @click="">确 定</el-button>
|
|
|
+ @click="newPayInfo">确 定</el-button>
|
|
|
<el-button type="primary"
|
|
|
v-else
|
|
|
- @click="">确 定</el-button>
|
|
|
+ @click="resetPayDate">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -81,7 +141,7 @@ import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
-import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
+import { getTeacher, getEmployeeOrgan, addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender } from "@/api/buildTeam";
|
|
|
|
|
|
export default {
|
|
|
components: { pagination },
|
|
@@ -104,7 +164,9 @@ export default {
|
|
|
diTitle: '新增缴费',
|
|
|
payVisible: false,
|
|
|
payForm: {
|
|
|
- startDate: null
|
|
|
+ startPaymentDate: null,
|
|
|
+ type: null,
|
|
|
+ memo: null
|
|
|
},
|
|
|
isNew: false,
|
|
|
activeRow: null,
|
|
@@ -130,8 +192,16 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init () {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ getList () {
|
|
|
+ getMusicGroupPaymentCalender({ page: this.rules.page, rows: this.rules.limit, musicGroupId: this.$route.query.id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.rules.total = res.data.total
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- getList () { },
|
|
|
newPay () {
|
|
|
this.diTitle = '新增缴费'
|
|
|
this.isNew = true
|
|
@@ -143,20 +213,62 @@ export default {
|
|
|
this.activeRow = row
|
|
|
this.payVisible = true;
|
|
|
},
|
|
|
+ detelePay (row) {
|
|
|
+ let id = row.id;
|
|
|
+ this.$confirm(`确定删除该缴费周期?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ delMusicGroupPaymentCalender({ id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+
|
|
|
+ },
|
|
|
lookDetail (row) {
|
|
|
let query = this.$route.query
|
|
|
+ this.$route.query.paymentId = row.id;
|
|
|
this.$router.push({ path: '/business/strudentPayInfo', query })
|
|
|
},
|
|
|
setStudentPay () {
|
|
|
let query = this.$route.query
|
|
|
this.$router.push({ path: '/business/studentPayBase', query })
|
|
|
+ },
|
|
|
+ newPayInfo () {
|
|
|
+ this.$refs['payForm'].validate(res => {
|
|
|
+ if (res) {
|
|
|
+ this.payForm.musicGroupId = this.$route.query.id
|
|
|
+ addMusicGroupPaymentCalender(this.payForm).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('恭喜你创建成功')
|
|
|
+ this.payVisible = false;
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ resetPayDate () {
|
|
|
+ resetMusicGroupPaymentCalender({ id: this.activeRow.id, startTime: this.payForm.startPaymentDate }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.payVisible = false;
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
payVisible (val) {
|
|
|
if (!val) {
|
|
|
this.payForm = {
|
|
|
- startDate: null
|
|
|
+ startPaymentDate: null,
|
|
|
+ type: null,
|
|
|
+ memo: null
|
|
|
}
|
|
|
this.$refs['payForm'].resetFields()
|
|
|
}
|