Commit 8d8c50ea650f7af01aa417e5addf4b6440b1b09f
1 parent
97447a5e
1、正常签退时间由原先的60分钟延长至80分钟,超出时间属于异常签退。
2、酒精测试2次异常后,不得再次操作。
Showing
2 changed files
with
74 additions
and
1 deletions
src/api/report/report.js
| @@ -42,6 +42,14 @@ export function getReportDetail(params) { | @@ -42,6 +42,14 @@ export function getReportDetail(params) { | ||
| 42 | }) | 42 | }) |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | + | ||
| 46 | +export function saveAlcoholInTaskDataToController(id,alcoholIntake){ | ||
| 47 | + return request({ | ||
| 48 | + url:'/report/update/alcohol/exception/count/'+id+"/"+alcoholIntake, | ||
| 49 | + method:'get' | ||
| 50 | + }) | ||
| 51 | +} | ||
| 52 | + | ||
| 45 | /** | 53 | /** |
| 46 | * 获取通告 | 54 | * 获取通告 |
| 47 | * @returns | 55 | * @returns |
src/views/report/sign/index.vue
| @@ -114,6 +114,11 @@ | @@ -114,6 +114,11 @@ | ||
| 114 | </template> | 114 | </template> |
| 115 | </el-table-column> | 115 | </el-table-column> |
| 116 | <el-table-column label="原因" align="center" fixed="right" prop="remark" width="300" /> | 116 | <el-table-column label="原因" align="center" fixed="right" prop="remark" width="300" /> |
| 117 | + <el-table-column label="操作" align="center" fixed="right" width="200" v-hasPermi="['system:report:signUpdateStatus']" > | ||
| 118 | + <template #default="scope"> | ||
| 119 | + <el-button :disabled="scope.row.exType!=3" @click="updateAlcoholErrorClick(scope,id)">修改</el-button> | ||
| 120 | + </template> | ||
| 121 | + </el-table-column> | ||
| 117 | </el-table> | 122 | </el-table> |
| 118 | </el-dialog> | 123 | </el-dialog> |
| 119 | 124 | ||
| @@ -143,11 +148,26 @@ | @@ -143,11 +148,26 @@ | ||
| 143 | <el-button type="primary" | 148 | <el-button type="primary" |
| 144 | @click="exportByTimePeriod(exportDatePrams.startDate, exportDatePrams.endDate)">导出</el-button> | 149 | @click="exportByTimePeriod(exportDatePrams.startDate, exportDatePrams.endDate)">导出</el-button> |
| 145 | </el-dialog> | 150 | </el-dialog> |
| 151 | + | ||
| 152 | + <el-dialog title="修改签到数据" v-model="openAlcohoIntaskFlag" align="center" width="400px" append-to-body> | ||
| 153 | + <el-form :model="alcoholIntaskObj" > | ||
| 154 | + <el-form-item label="工 号:">{{alcoholIntaskObj.jobCode}}</el-form-item> | ||
| 155 | + <el-form-item label="姓 名:">{{alcoholIntaskObj.name}}</el-form-item> | ||
| 156 | + <el-form-item label="酒精含量:"> | ||
| 157 | + <el-input-number style="width: 120px;" v-model="alcoholIntaskObj.alcoholIntake" placeholder="请输入酒精含量" clearable | ||
| 158 | + @keyup.enter="handleQuery" /> | ||
| 159 | + </el-form-item> | ||
| 160 | + <el-form-item :span=6 justify="center"> | ||
| 161 | + <el-button type="primary" @click="saveAlcoholInTaskData(alcoholIntaskObj)">保存</el-button> | ||
| 162 | + | ||
| 163 | + </el-form-item> | ||
| 164 | + </el-form> | ||
| 165 | + </el-dialog> | ||
| 146 | </div> | 166 | </div> |
| 147 | </template> | 167 | </template> |
| 148 | 168 | ||
| 149 | <script setup> | 169 | <script setup> |
| 150 | -import { getReportDetail, getReportList } from "@/api/report/report.js"; | 170 | +import { getReportDetail, getReportList,saveAlcoholInTaskDataToController } from "@/api/report/report.js"; |
| 151 | import moment from "moment"; | 171 | import moment from "moment"; |
| 152 | import { nextTick, onMounted, ref } from "vue"; | 172 | import { nextTick, onMounted, ref } from "vue"; |
| 153 | const { proxy } = getCurrentInstance(); | 173 | const { proxy } = getCurrentInstance(); |
| @@ -174,6 +194,9 @@ const exportDatePrams = ref({ | @@ -174,6 +194,9 @@ const exportDatePrams = ref({ | ||
| 174 | }) | 194 | }) |
| 175 | const openDateFlag = ref(false) | 195 | const openDateFlag = ref(false) |
| 176 | const openDateSplitFlag = ref(false) | 196 | const openDateSplitFlag = ref(false) |
| 197 | +const openAlcohoIntaskFlag = ref(false) | ||
| 198 | +const alcoholIntaskObj=ref({}); | ||
| 199 | + | ||
| 177 | 200 | ||
| 178 | const rules = ref({ | 201 | const rules = ref({ |
| 179 | date: [ | 202 | date: [ |
| @@ -227,6 +250,39 @@ const getList = () => { | @@ -227,6 +250,39 @@ const getList = () => { | ||
| 227 | }); | 250 | }); |
| 228 | }; | 251 | }; |
| 229 | 252 | ||
| 253 | + | ||
| 254 | +const updateAlcoholErrorClick=(scope,id)=>{ | ||
| 255 | + //openDateFlag.value = true | ||
| 256 | + | ||
| 257 | + openAlcohoIntaskFlag.value =true; | ||
| 258 | + | ||
| 259 | + alcoholIntaskObj.value.jobCode= scope.row.jobCode; | ||
| 260 | + alcoholIntaskObj.value.name=scope.row.name; | ||
| 261 | + alcoholIntaskObj.value.alcoholIntake=scope.row.alcoholIntake; | ||
| 262 | + alcoholIntaskObj.value.id=scope.row.id; | ||
| 263 | + alcoholIntaskObj.value.scheduleDate=scope.row.scheduleDate; | ||
| 264 | +} | ||
| 265 | + | ||
| 266 | +const saveAlcoholInTaskData=(alcoholIntaskObj)=>{ | ||
| 267 | + loading.value=true | ||
| 268 | + saveAlcoholInTaskDataToController(alcoholIntaskObj.id,alcoholIntaskObj.alcoholIntake).then((res)=>{ | ||
| 269 | + reset(); | ||
| 270 | + getReportDetail({ | ||
| 271 | + jobCode: alcoholIntaskObj.jobCode, | ||
| 272 | + date: alcoholIntaskObj.scheduleDate | ||
| 273 | + }).then((res) => { | ||
| 274 | + detailList.value = res.data | ||
| 275 | + detailLoading.value = false; | ||
| 276 | + | ||
| 277 | + openAlcohoIntaskFlag.value=false | ||
| 278 | + loading.value=false | ||
| 279 | + }); | ||
| 280 | + | ||
| 281 | + getList(); | ||
| 282 | + | ||
| 283 | + | ||
| 284 | + }) | ||
| 285 | +} | ||
| 230 | const getTableData = () => { | 286 | const getTableData = () => { |
| 231 | //inList为全部数据 | 287 | //inList为全部数据 |
| 232 | tableData.value = inList.value.slice( | 288 | tableData.value = inList.value.slice( |
| @@ -314,6 +370,7 @@ const exportByTimePeriod = (startDate, endDate) => { | @@ -314,6 +370,7 @@ const exportByTimePeriod = (startDate, endDate) => { | ||
| 314 | 370 | ||
| 315 | } | 371 | } |
| 316 | 372 | ||
| 373 | + | ||
| 317 | const onExportDateBySplit = () => { | 374 | const onExportDateBySplit = () => { |
| 318 | openDateSplitFlag.value = true | 375 | openDateSplitFlag.value = true |
| 319 | exportDatePrams.value.startDate = '' | 376 | exportDatePrams.value.startDate = '' |
| @@ -325,6 +382,14 @@ const onExportDateType = (val) => { | @@ -325,6 +382,14 @@ const onExportDateType = (val) => { | ||
| 325 | exportFormat.value = val | 382 | exportFormat.value = val |
| 326 | exportDate.value = '' | 383 | exportDate.value = '' |
| 327 | } | 384 | } |
| 385 | + | ||
| 386 | +const alcoholIntaskEn=()=>{ | ||
| 387 | + alcoholIntaskObj.value.jobCode=''; | ||
| 388 | + alcoholIntaskObj.value.name=""; | ||
| 389 | + alcoholIntaskObj.value.id=""; | ||
| 390 | + alcoholIntaskObj.value.alcoholIntake=0; | ||
| 391 | + alcoholIntaskObj.value.scheduleDate=""; | ||
| 392 | +} | ||
| 328 | </script> | 393 | </script> |
| 329 | 394 | ||
| 330 | <style> | 395 | <style> |