flx:修复考勤组删除问题

This commit is contained in:
Rain_ 2025-06-25 10:18:01 +08:00
parent 1c0e81b0e4
commit b3e919fb79

View File

@ -527,7 +527,7 @@
style="border: 0 !important; color: #f56c6c"
type="text"
icon="el-icon-delete"
@click="deleteBtn(scope.row)"
@click="deleteAttendanceBatchPersonnel(scope.row)"
>删除</el-button
>
</div>
@ -1122,8 +1122,8 @@ export default {
});
},
//
deleteAttendanceBatchPersonnel() {
if (this.$refs.selectworkerTable.selection.length === 0)
deleteAttendanceBatchPersonnel(row) {
if (this.$refs.selectworkerTable.selection.length === 0 && !row.id)
return this.$message.warning("请勾选需要删除的数据!");
this.$confirm("删除后操作不可恢复,请谨慎操作!", "警告", {
confirmButtonText: "确定",
@ -1135,7 +1135,7 @@ export default {
deleteWorkerListFromAttendanceGroupV2Api({
id: this.attendanceInfo.id,
workerIdList: ids,
workerIdList: row.id ? [row.id] : ids,
}).then((res) => {
this.getDataList();
this.getSelectedPersonListFn();