|
@@ -3,68 +3,82 @@
|
|
|
<div class="headWrap">
|
|
|
<div class="left">
|
|
|
<div class="headItem">
|
|
|
- <p>未结算总额:<span>{{ teacherNoPay| moneyFormat}}</span></p>
|
|
|
+ <p>
|
|
|
+ 未结算总额:<span>{{ teacherNoPay | moneyFormat }}</span>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <save-form :inline="true"
|
|
|
- :model="searchForm" @submit="search" @reset="onReSet" save-key='teacherDetail-settlement'>
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ save-key="teacherDetail-settlement"
|
|
|
+ >
|
|
|
<el-form-item>
|
|
|
- <el-date-picker v-model.trim="searchForm.courseDate"
|
|
|
- style="width: 400px;"
|
|
|
- type="daterange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
-
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="课程开始日期"
|
|
|
- end-placeholder="课程结束日期"
|
|
|
- :picker-options="{
|
|
|
- firstDayOfWeek: 1
|
|
|
- }">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="searchForm.courseDate"
|
|
|
+ style="width: 400px"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="课程开始日期"
|
|
|
+ end-placeholder="课程结束日期"
|
|
|
+ :picker-options="{
|
|
|
+ firstDayOfWeek: 1,
|
|
|
+ }"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select v-model.trim="searchForm.courseScheduleType"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- placeholder="课程类型">
|
|
|
- <el-option v-for="(item, index) in courseType"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.courseScheduleType"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="课程类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in courseType"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select v-model.trim="searchForm.signInStatus"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="考勤状态">
|
|
|
- <el-option v-for="(item, index) in attendance"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.signInStatus"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="考勤状态"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in attendance"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</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-button native-type="submit" type="danger">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="primary">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</save-form>
|
|
|
<div class="tableWrap">
|
|
|
- <el-table :data="tableList"
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column label="上课时间"
|
|
|
- align="center"
|
|
|
- width="200">
|
|
|
+ <el-table
|
|
|
+ :data="tableList"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column label="上课时间" align="center" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.classDate + ' ' + (scope.row.classTime.substring(0,5)) }}
|
|
|
+ {{
|
|
|
+ scope.row.classDate + " " + scope.row.classTime.substring(0, 5)
|
|
|
+ }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="班级名称"
|
|
|
- prop="className">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="班级名称" prop="className"> </el-table-column>
|
|
|
<el-table-column label="课程类型">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.courseScheduleType | coursesType }}
|
|
@@ -93,120 +107,139 @@
|
|
|
{{ scope.row.signOutStatus | attendanceOutType }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="预计发放"
|
|
|
- prop="expectSalary">
|
|
|
+ <el-table-column label="预计发放" prop="expectSalary">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.expectSalary|moneyFormat}}
|
|
|
+ {{ scope.row.expectSalary | moneyFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="实际发放"
|
|
|
- prop="actualSalary">
|
|
|
+ <el-table-column label="实际发放" prop="actualSalary">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.actualSalary|moneyFormat}}
|
|
|
+ {{ scope.row.actualSalary | moneyFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="课时补贴"
|
|
|
- prop="subsidy">
|
|
|
+ <el-table-column label="课时补贴" prop="subsidy">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.subsidy|moneyFormat}}
|
|
|
+ {{ scope.row.subsidy | moneyFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="结算状态">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.settlementTime ? '已结算' : '未结算' }}
|
|
|
+ {{ scope.row.settlementTime ? "已结算" : "未结算" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
- <template slot-scope="scope"
|
|
|
- v-if="scope.row.courseScheduleType != 'VIP' && !scope.row.settlementTime">
|
|
|
- <auth auths="courseSchedule/updateTeacherCoursesSalary/settlement" v-if="scope.row.courseScheduleType != 'DEMO'">
|
|
|
- <el-button @click="onUpdate(scope.row)" type="text">课酬调整</el-button>
|
|
|
+ <template
|
|
|
+ slot-scope="scope"
|
|
|
+ v-if="
|
|
|
+ scope.row.courseScheduleType != 'VIP' && !scope.row.settlementTime
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <auth
|
|
|
+ auths="courseSchedule/updateTeacherCoursesSalary/settlement"
|
|
|
+ v-if="scope.row.courseScheduleType != 'DEMO'"
|
|
|
+ >
|
|
|
+ <el-button @click="onUpdate(scope.row)" type="text"
|
|
|
+ >课酬调整</el-button
|
|
|
+ >
|
|
|
</auth>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
- save-key='teacherDetail-settlement'
|
|
|
- sync
|
|
|
- :total.sync="pageInfo.total"
|
|
|
- :page.sync="pageInfo.page"
|
|
|
- :limit.sync="pageInfo.limit"
|
|
|
- :page-sizes="pageInfo.page_size"
|
|
|
- @pagination="getList" />
|
|
|
+ save-key="teacherDetail-settlement"
|
|
|
+ sync
|
|
|
+ :total.sync="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <el-dialog title="课酬调整"
|
|
|
- :visible.sync="settlementStatus"
|
|
|
- @close="onFormClose('ruleForm')"
|
|
|
- width="500px">
|
|
|
- <el-form :model="form"
|
|
|
- :rules="rules"
|
|
|
- ref="ruleForm">
|
|
|
- <el-form-item label="预计发放"
|
|
|
- :label-width="formLabelWidth">
|
|
|
- <el-input v-model.trim="form.expectSalary"
|
|
|
- disabled
|
|
|
- @mousewheel.native.prevent
|
|
|
- type="number"></el-input>
|
|
|
+ <el-dialog
|
|
|
+ title="课酬调整"
|
|
|
+ v-if="settlementStatus"
|
|
|
+ :visible.sync="settlementStatus"
|
|
|
+ @close="onFormClose('ruleForm')"
|
|
|
+ width="500px"
|
|
|
+ >
|
|
|
+ <el-form :model="form" :rules="rules" ref="ruleForm">
|
|
|
+ <el-form-item label="原预计课酬" :label-width="formLabelWidth">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="form.expectSalary"
|
|
|
+ disabled
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ type="number"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="补贴"
|
|
|
+ <!-- <el-form-item label="补贴"
|
|
|
:label-width="formLabelWidth">
|
|
|
<el-input v-model.trim="form.subsidys"
|
|
|
disabled
|
|
|
@mousewheel.native.prevent
|
|
|
type="number"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item
|
|
|
+ label="课酬调整为"
|
|
|
+ prop="salary"
|
|
|
+ :label-width="formLabelWidth"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model.trim="form.salary"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ autocomplete="off"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="课酬调整为"
|
|
|
- prop="salary"
|
|
|
- :label-width="formLabelWidth">
|
|
|
- <el-input v-model.trim="form.salary"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- autocomplete="off"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="课时补贴调整为"
|
|
|
+ <!-- <el-form-item label="课时补贴调整为"
|
|
|
prop="subsidy"
|
|
|
:label-width="formLabelWidth">
|
|
|
<el-input v-model.trim="form.subsidy"
|
|
|
type="number"
|
|
|
@mousewheel.native.prevent
|
|
|
autocomplete="off"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="调整范围"
|
|
|
- prop="scope"
|
|
|
- :label-width="formLabelWidth">
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item
|
|
|
+ label="调整范围"
|
|
|
+ prop="scope"
|
|
|
+ :label-width="formLabelWidth"
|
|
|
+ >
|
|
|
<el-radio-group v-model.trim="form.scope">
|
|
|
<el-radio label="one">仅限本次</el-radio>
|
|
|
<el-radio label="all">之后剩余课次</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <span slot="footer"
|
|
|
- class="dialog-footer">
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="settlementStatus = false">取 消</el-button>
|
|
|
- <el-button @click="onSettlementSubmit('ruleForm')"
|
|
|
- type="primary">确 定</el-button>
|
|
|
+ <el-button @click="onSettlementSubmit('ruleForm')" type="primary"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { teacherQueryCloses, sumTeacherNoPay, updateTeacherCoursesSalary } from '@/api/teacherManager'
|
|
|
-import pagination from '@/components/Pagination/index'
|
|
|
-import store from '@/store'
|
|
|
-import { courseType, attendance } from '@/utils/searchArray'
|
|
|
+import {
|
|
|
+ teacherQueryCloses,
|
|
|
+ sumTeacherNoPay,
|
|
|
+ updateTeacherCoursesSalary,
|
|
|
+} from "@/api/teacherManager";
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import store from "@/store";
|
|
|
+import { courseType, attendance } from "@/utils/searchArray";
|
|
|
import { getTimes } from "@/utils";
|
|
|
export default {
|
|
|
- name: 'settlement',
|
|
|
+ name: "settlement",
|
|
|
components: {
|
|
|
- pagination
|
|
|
+ pagination,
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
teacherNoPay: 0,
|
|
|
searchForm: {
|
|
@@ -214,7 +247,7 @@ export default {
|
|
|
courseEndDate: null,
|
|
|
courseScheduleType: null,
|
|
|
signInStatus: null,
|
|
|
- courseDate:[]
|
|
|
+ courseDate: [],
|
|
|
},
|
|
|
courseType: courseType,
|
|
|
attendance: attendance,
|
|
@@ -226,72 +259,84 @@ export default {
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 1, // 总条数
|
|
|
- page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
},
|
|
|
- formLabelWidth: '120px',
|
|
|
+ formLabelWidth: "120px",
|
|
|
settlementStatus: false,
|
|
|
form: {
|
|
|
courseScheduleId: null,
|
|
|
salary: null,
|
|
|
subsidy: null,
|
|
|
- scope: 'one',
|
|
|
+ scope: "one",
|
|
|
expectSalary: null,
|
|
|
- subsidys: null
|
|
|
+ subsidys: null,
|
|
|
},
|
|
|
rules: {
|
|
|
- salary: [{ required: true, message: '请输入课酬', trigger: 'blur' }],
|
|
|
- subsidy: [{ required: true, message: '请输入课时补贴', trigger: 'blur' }],
|
|
|
- scope: [{ required: true, message: '请选择调整范围', trigger: 'change' }],
|
|
|
- }
|
|
|
- }
|
|
|
+ salary: [{ required: true, message: "请输入课酬", trigger: "blur" }],
|
|
|
+ subsidy: [
|
|
|
+ { required: true, message: "请输入课时补贴", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ scope: [
|
|
|
+ { required: true, message: "请选择调整范围", trigger: "change" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.teacherId = this.$route.query.teacherId
|
|
|
- this.getList()
|
|
|
- sumTeacherNoPay({ teacherId: this.teacherId }).then(res => {
|
|
|
+ activated() {
|
|
|
+ this.teacherId = this.$route.query.teacherId;
|
|
|
+ this.getList();
|
|
|
+ sumTeacherNoPay({ teacherId: this.teacherId }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.teacherNoPay = res.data
|
|
|
+ this.teacherNoPay = res.data;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.teacherId = this.$route.query.teacherId
|
|
|
- this.getList()
|
|
|
- sumTeacherNoPay({ teacherId: this.teacherId }).then(res => {
|
|
|
+ mounted() {
|
|
|
+ this.teacherId = this.$route.query.teacherId;
|
|
|
+ this.getList();
|
|
|
+ sumTeacherNoPay({ teacherId: this.teacherId }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.teacherNoPay = res.data
|
|
|
+ this.teacherNoPay = res.data;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
- search () {
|
|
|
+ search() {
|
|
|
this.pageInfo.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- onSettlementSubmit (formName) {
|
|
|
- this.$refs[formName].validate(valid => {
|
|
|
- if (!valid) return
|
|
|
- this.form.teacherId = this.teacherId
|
|
|
- updateTeacherCoursesSalary(this.form).then(res => {
|
|
|
- this.messageTips('修改', res)
|
|
|
- })
|
|
|
- })
|
|
|
+ onSettlementSubmit(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (!valid) return;
|
|
|
+ this.form.teacherId = this.teacherId;
|
|
|
+ updateTeacherCoursesSalary(this.form).then((res) => {
|
|
|
+ this.messageTips("修改", res);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
- messageTips (title, res) {
|
|
|
+ messageTips(title, res) {
|
|
|
if (res.code == 200) {
|
|
|
- this.$message.success(title + '成功')
|
|
|
- this.settlementStatus = false
|
|
|
- this.getList()
|
|
|
+ this.$message.success(title + "成功");
|
|
|
+ this.settlementStatus = false;
|
|
|
+ this.getList();
|
|
|
+ this.form = {
|
|
|
+ courseScheduleId: null,
|
|
|
+ salary: null,
|
|
|
+ subsidy: null,
|
|
|
+ scope: "one",
|
|
|
+ expectSalary: null,
|
|
|
+ subsidys: null,
|
|
|
+ };
|
|
|
} else {
|
|
|
- this.$message.error(res.msg)
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
},
|
|
|
- getList () {
|
|
|
+ getList() {
|
|
|
// let params = this.searchForm
|
|
|
// params.rows = this.pageInfo.limit
|
|
|
// params.page = this.pageInfo.page
|
|
|
// params.teacherId = this.teacherId
|
|
|
- const { courseDate, ...rest } = this.searchForm;
|
|
|
+ const { courseDate, ...rest } = this.searchForm;
|
|
|
let params = {
|
|
|
...rest,
|
|
|
...getTimes(courseDate, ["courseStartDate", "courseEndDate"]),
|
|
@@ -299,43 +344,44 @@ export default {
|
|
|
rows: this.pageInfo.limit,
|
|
|
teacherId: this.teacherId,
|
|
|
};
|
|
|
- teacherQueryCloses(params).then(res => {
|
|
|
+ teacherQueryCloses(params).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.tableList = res.data.rows
|
|
|
- this.pageInfo.total = res.data.total
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ this.pageInfo.total = res.data.total;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- searchCourseDate (value) {
|
|
|
+ searchCourseDate(value) {
|
|
|
if (value) {
|
|
|
- this.searchForm.courseStartDate = value[0]
|
|
|
- this.searchForm.courseEndDate = value[1]
|
|
|
+ this.searchForm.courseStartDate = value[0];
|
|
|
+ this.searchForm.courseEndDate = value[1];
|
|
|
} else {
|
|
|
- this.searchForm.courseStartDate = null
|
|
|
- this.searchForm.courseEndDate = null
|
|
|
+ this.searchForm.courseStartDate = null;
|
|
|
+ this.searchForm.courseEndDate = null;
|
|
|
}
|
|
|
},
|
|
|
- onFormClose (formName) { // 关闭弹窗重置验证
|
|
|
- this.$refs[formName].resetFields()
|
|
|
+ onFormClose(formName) {
|
|
|
+ // 关闭弹窗重置验证
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
},
|
|
|
- onUpdate (row) {
|
|
|
- this.form.courseScheduleId = row.courseScheduleId
|
|
|
- this.settlementStatus = true
|
|
|
- this.form.expectSalary = row.expectSalary
|
|
|
- this.form.subsidys = row.subsidy
|
|
|
+ onUpdate(row) {
|
|
|
+ this.form.courseScheduleId = row.courseScheduleId;
|
|
|
+ this.settlementStatus = true;
|
|
|
+ this.form.expectSalary = row.expectSalary;
|
|
|
+ this.form.subsidys = row.subsidy;
|
|
|
},
|
|
|
- onReSet () {
|
|
|
- this.courseDate = null
|
|
|
+ onReSet() {
|
|
|
+ this.courseDate = null;
|
|
|
this.searchForm = {
|
|
|
courseStartDate: null,
|
|
|
courseEndDate: null,
|
|
|
courseScheduleType: null,
|
|
|
- signInStatus: null
|
|
|
- }
|
|
|
+ signInStatus: null,
|
|
|
+ };
|
|
|
this.getList();
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scope>
|
|
|
</style>
|