|
@@ -66,6 +66,10 @@
|
|
|
v-if="teachMode == 'OFFLINE'"
|
|
|
size="small"
|
|
|
@click="lookGPS(scope.row)">GPS定位</el-button>
|
|
|
+ <el-button type="text"
|
|
|
+ size="small"
|
|
|
+ v-permission="'courseSchedule/queryTeacherSalary'"
|
|
|
+ @click="setCourseInfo(scope.row)">课酬调整</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -77,10 +81,69 @@
|
|
|
<gpsLoction v-if="gpsVisible"
|
|
|
:activeRow='activeRow' />
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="课酬调整"
|
|
|
+ width="800px"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="dialogTableVisible">
|
|
|
+ <el-table :data="activeTeacherList"
|
|
|
+ :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
+ <el-table-column label="老师姓名"
|
|
|
+ prop="teacherName"></el-table-column>
|
|
|
+ <el-table-column label="老师角色">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.teacherRole |workType }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="课程课酬"
|
|
|
+ prop="expectSalary"></el-table-column>
|
|
|
+ <!-- <el-table-column label="课时补贴"
|
|
|
+ prop="subsidy"></el-table-column> -->
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type='text'
|
|
|
+ v-permission="'courseSchedule/updateTeacherCoursesSalary'"
|
|
|
+ @click="resetTeacher(scope.row)">操作</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-dialog width="500px"
|
|
|
+ title=""
|
|
|
+ :visible.sync="innerVisible"
|
|
|
+ append-to-body>
|
|
|
+ <!-- 修改代码 -->
|
|
|
+ <el-form :model="teacherMask"
|
|
|
+ :rules="teacherRules"
|
|
|
+ ref='teacherMask'>
|
|
|
+ <el-form-item label="调整范围"
|
|
|
+ prop="radio">
|
|
|
+ <el-radio v-model.trim="teacherMask.radio"
|
|
|
+ label="all">之后剩余课次</el-radio>
|
|
|
+ <el-radio v-model.trim="teacherMask.radio"
|
|
|
+ label="one">仅限本次</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程课酬"
|
|
|
+ prop="salary">
|
|
|
+ <el-input style="width:180px"
|
|
|
+ v-model.trim="teacherMask.salary"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer"
|
|
|
+ class="dialog-footer">
|
|
|
+ <el-button @click="innerVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ @click="resetSalary">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { updateTeacherAttendance } from "@/api/buildTeam";
|
|
|
+import { updateTeacherAttendance, getCourseList, getTeacherSalary } from "@/api/buildTeam";
|
|
|
+import { updateTeacherCoursesSalary } from '@/api/teacherManager'
|
|
|
import { getCourseTeachers } from "@/api/teacherManager";
|
|
|
import gpsLoction from "../componentCourse/gpsLocation";
|
|
|
export default {
|
|
@@ -90,7 +153,21 @@ export default {
|
|
|
return {
|
|
|
tableList: [],
|
|
|
gpsVisible: false,
|
|
|
- activeRow: null
|
|
|
+ activeRow: null,
|
|
|
+ activeTeacherList: [],
|
|
|
+ dialogTableVisible: false,
|
|
|
+ innerVisible: false,
|
|
|
+ activeTeacher: null,
|
|
|
+ teacherMask: {
|
|
|
+ salary: '',
|
|
|
+ subsidy: '',
|
|
|
+ radio: ''
|
|
|
+ },
|
|
|
+ teacherRules: {
|
|
|
+ salary: [{ required: true, message: '请输入课程课酬', trigger: 'blur' }],
|
|
|
+ subsidy: [{ required: true, message: '请输入课时补贴', trigger: 'blur' }],
|
|
|
+ radio: [{ required: true, message: '请选择调整范围', trigger: 'blur' }]
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -138,6 +215,51 @@ export default {
|
|
|
|
|
|
}).catch(() => { })
|
|
|
|
|
|
+ },
|
|
|
+ setCourseInfo (row) {
|
|
|
+ this.tempSelectRow = row
|
|
|
+ getTeacherSalary({ courseScheduleId: this.courseScheduleId }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.dialogTableVisible = true;
|
|
|
+ // this.courseScheduleId = row.courseScheduleId;
|
|
|
+ // row.teachingTeachers
|
|
|
+ this.activeTeacherList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ resetTeacher (row) {
|
|
|
+ this.innerVisible = true;
|
|
|
+ this.activeTeacher = row;
|
|
|
+ },
|
|
|
+ resetSalary () {
|
|
|
+ let that = this
|
|
|
+ this.$refs['teacherMask'].validate(res => {
|
|
|
+ if (res) {
|
|
|
+ updateTeacherCoursesSalary({
|
|
|
+ courseScheduleId: this.courseScheduleId,
|
|
|
+ salary: this.teacherMask.salary,
|
|
|
+ teacherId: this.activeTeacher.teacherId,
|
|
|
+ scope: this.teacherMask.radio
|
|
|
+
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.teacherMask = {
|
|
|
+ salary: '',
|
|
|
+ subsidy: '',
|
|
|
+ radio: ''
|
|
|
+ }
|
|
|
+ // this.dialogTableVisible = false;
|
|
|
+ this.innerVisible = false;
|
|
|
+ that.setCourseInfo(this.tempSelectRow)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请填写必要参数')
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
}
|