This commit is contained in:
BianLzhaoMin 2025-11-18 10:12:41 +08:00
parent 17869b7d8d
commit 7e2eb219bd
6 changed files with 74 additions and 4 deletions

View File

@ -48,3 +48,12 @@ export const getAttendanceDetailsListAPI = (data) => {
params: data, params: data,
}) })
} }
// 取消考勤
export const cancelAttendanceAPI = (data) => {
return request({
url: '/bmw/workerLight/cancelWorkerAtt',
method: 'POST',
data,
})
}

View File

@ -113,6 +113,20 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="{ row }">
<el-button
type="text"
@click="handleCancelAtt(row)"
v-if="row.isAtt == 1 || row.isAtt == 2"
>
取消考勤
</el-button>
<span v-else> - </span>
</template>
</el-table-column>
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
@ -121,7 +135,10 @@
<script> <script>
import AttendanceCalendar from '@/components/AttendanceCalendar' import AttendanceCalendar from '@/components/AttendanceCalendar'
import { getAttendanceDetailsListAPI } from '@/api/construction-person/attendance-manage/attendance-count' import {
cancelAttendanceAPI,
getAttendanceDetailsListAPI,
} from '@/api/construction-person/attendance-manage/attendance-count'
export default { export default {
name: 'AttendanceDetails', name: 'AttendanceDetails',
components: { components: {
@ -266,6 +283,28 @@ export default {
} }
} }
}, },
//
handleCancelAtt(row) {
this.$confirm('确定取消该考勤吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
console.log('确定')
const res = await cancelAttendanceAPI({
proId: this.proId,
workerId: this.workerId,
attDay: row.einDay,
})
if (res.code === 200) {
this.$message.success('取消考勤成功')
this.getAttendanceDetailsListData()
}
})
},
}, },
created() { created() {

View File

@ -18,7 +18,9 @@
</template> </template>
<template v-for="item in slots" :slot="item" slot-scope="{ data }"> <template v-for="item in slots" :slot="item" slot-scope="{ data }">
<span :key="item">{{ data[item] }}</span> <template>
<span :key="item">{{ data[item] }}</span>
</template>
</template> </template>
</TableModel> </TableModel>

View File

@ -1089,7 +1089,7 @@ export default {
if (valid4) { if (valid4) {
let fieldsToCheck_1 = [ let fieldsToCheck_1 = [
// 'contractCode', // // 'contractCode', //
'wageCriterion', // // 'wageCriterion', //
'contractStopDate', // 'contractStopDate', //
'contractStartDate', // 'contractStartDate', //
] ]

View File

@ -275,7 +275,7 @@ export default {
// //
let fieldsList = [ let fieldsList = [
// 'contractCode', // // 'contractCode', //
'wageCriterion', // // 'wageCriterion', //
'contractStopDate', // 'contractStopDate', //
'contractStartDate', // 'contractStartDate', //
] ]

View File

@ -103,6 +103,14 @@
label="其他备注" label="其他备注"
fixed="right" fixed="right"
/> />
<el-table-column align="center" label="操作" fixed="right">
<template slot-scope="{ row }">
<el-button type="text" @click="handleDelete(row)">
删除
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<!-- <div style="padding-right: 20px"> <!-- <div style="padding-right: 20px">
@ -246,6 +254,18 @@ export default {
} }
}) })
}, },
//
handleDelete(row) {
console.log(row)
this.$confirm('确定删除该记录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
console.log('确定')
})
},
}, },
} }
</script> </script>