|
@@ -176,24 +176,43 @@
|
|
|
</div>
|
|
|
<el-dialog title="课酬调整" :visible.sync="dialogVisible" width="400px">
|
|
|
<div>
|
|
|
- <el-form ref="visibleForm" :model="visibleForm" :inline="true">
|
|
|
- <el-form-item label="应发">
|
|
|
- <el-input v-model="visibleForm.expectSalary"></el-input>
|
|
|
+ <el-form
|
|
|
+ ref="visibleForm"
|
|
|
+ :model="visibleForm"
|
|
|
+ class="visibleForm"
|
|
|
+ :inline="true"
|
|
|
+ label-width="60px"
|
|
|
+ >
|
|
|
+ <el-form-item label="应发" :rules="[{ required: true, message: '请填写应发数',trigger: 'blur'}]" prop="expectSalary">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="visibleForm.expectSalary"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="扣款">
|
|
|
- <el-input v-model="visibleForm.reduceSalary"></el-input>
|
|
|
+ <el-form-item label="扣款" :rules="[{ required: true, message: '请填写扣款数',trigger: 'blur'}]" prop="reduceSalary">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="visibleForm.reduceSalary"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="实发">
|
|
|
- <el-input v-model="visibleForm.actualSalary" disabled></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="visibleForm.actualSalary"
|
|
|
+ disabled
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="实发">
|
|
|
- <el-input type="textarea" :rows="5" v-model="visibleForm.memo" ></el-input>
|
|
|
+ <el-form-item label="说明" :rules="[{ required: true, message: '请填写说明',trigger: 'blur'}]" prop="memo">
|
|
|
+ <el-input type="textarea" :rows="5" v-model.trim="visibleForm.memo"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div slot="footer">
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="subreset">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -208,7 +227,8 @@ import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
import {
|
|
|
findIsSettlementCourseSalarys,
|
|
|
openSalaryConfirm,
|
|
|
- closeSalaryConfirm
|
|
|
+ closeSalaryConfirm,
|
|
|
+ teacherSalaryModifyLog
|
|
|
} from "@/api/journal";
|
|
|
import { courseType } from "@/utils/searchArray";
|
|
|
export default {
|
|
@@ -230,7 +250,9 @@ export default {
|
|
|
expectSalary: null,
|
|
|
reduceSalary: null,
|
|
|
actualSalary: null,
|
|
|
- courseScheduleId: null
|
|
|
+ courseScheduleId: null,
|
|
|
+ teacherId:null,
|
|
|
+ memo:null
|
|
|
},
|
|
|
isOpen: null,
|
|
|
activeRow: null,
|
|
@@ -431,9 +453,31 @@ export default {
|
|
|
expectSalary: row.expectSalary,
|
|
|
reduceSalary: row.reduceSalary,
|
|
|
actualSalary: row.actualSalary,
|
|
|
- courseScheduleId: row.courseScheduleId
|
|
|
+ courseScheduleId: row.courseScheduleId,
|
|
|
+ memo:row.memo,
|
|
|
+ teacherId:row.teacherId
|
|
|
};
|
|
|
this.dialogVisible = true;
|
|
|
+ },
|
|
|
+ subreset() {
|
|
|
+ this.$refs["visibleForm"].validate(flag => {
|
|
|
+ if (flag) {
|
|
|
+ let obj = {
|
|
|
+ courseScheduleId: this.visibleForm.courseScheduleId,
|
|
|
+ currentExpectSalary: this.visibleForm.expectSalary,
|
|
|
+ currentReduceSalary: this.visibleForm.reduceSalary,
|
|
|
+ memo: this.visibleForm.memo,
|
|
|
+ teacherId:this.visibleForm.teacherId,
|
|
|
+ };
|
|
|
+ teacherSalaryModifyLog(obj).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$message.success("调整成功");
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -447,6 +491,42 @@ export default {
|
|
|
return template[val];
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ getExpectSalaEry() {
|
|
|
+ return this.visibleForm.expectSalary;
|
|
|
+ },
|
|
|
+ getReduceSalary() {
|
|
|
+ return this.visibleForm.reduceSalary;
|
|
|
+ },
|
|
|
+ getActualSalary() {
|
|
|
+ return this.visibleForm.actualSalary;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ getExpectSalaEry(val) {
|
|
|
+ this.visibleForm.actualSalary = parseFloat(
|
|
|
+ val - this.getReduceSalary > 0 ? val - this.getReduceSalary : 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ getReduceSalary(val) {
|
|
|
+ this.visibleForm.actualSalary = parseFloat(
|
|
|
+ this.getExpectSalaEry - val > 0 ? this.getExpectSalaEry - val : 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ dialogVisible(val) {
|
|
|
+ if (!val) {
|
|
|
+ this.visibleForm = {
|
|
|
+ expectSalary: null,
|
|
|
+ reduceSalary: null,
|
|
|
+ actualSalary: null,
|
|
|
+ courseScheduleId: null,
|
|
|
+ teacherId:null,
|
|
|
+ memo:null
|
|
|
+ };
|
|
|
+ this.$refs["visibleForm"].resetFields();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -454,4 +534,10 @@ export default {
|
|
|
.red {
|
|
|
color: red;
|
|
|
}
|
|
|
+.visibleForm {
|
|
|
+ /deep/.el-input__inner,
|
|
|
+ /deep/.el-textarea__inner {
|
|
|
+ width: 225px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|