|
@@ -1,5 +1,19 @@
|
|
|
<template>
|
|
|
- <div class="work-attendance flex flex-col h-full">
|
|
|
+ <div class="flex flex-col h-full">
|
|
|
+ <div class="page-action">
|
|
|
+ <t-button
|
|
|
+ theme="primary"
|
|
|
+ :disabled="!selectedRowKeys.length"
|
|
|
+ @click="multSubmit"
|
|
|
+ >批量提交</t-button
|
|
|
+ >
|
|
|
+ <t-button
|
|
|
+ theme="primary"
|
|
|
+ :disabled="!selectedRowKeys.length"
|
|
|
+ @click="multExport"
|
|
|
+ >批量导出</t-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
<SearchForm :fields="fields" :params="params">
|
|
|
<template #service="{ item, params }">
|
|
|
<select-service-unit v-model="params[item.prop]"></select-service-unit>
|
|
@@ -13,29 +27,15 @@
|
|
|
</SearchForm>
|
|
|
|
|
|
<div class="flex-1 page-wrap">
|
|
|
- <div class="flex justify-between items-center">
|
|
|
- <t-space>
|
|
|
- <span>考勤总计:{{ statisticsInfo.total }}</span>
|
|
|
- <span>已提交:{{ statisticsInfo.submitted }}</span>
|
|
|
- <span>待提交:{{ statisticsInfo.unSubmitted }}</span>
|
|
|
- <span>累计人天:{{ statisticsInfo.allDays }}天</span>
|
|
|
- <span>累计工时:{{ statisticsInfo.allHours }}小时</span>
|
|
|
- </t-space>
|
|
|
- <div class="btn-group">
|
|
|
- <t-button
|
|
|
- theme="success"
|
|
|
- :disabled="!selectedRowKeys.length"
|
|
|
- @click="multSubmit"
|
|
|
- >批量提交</t-button
|
|
|
- >
|
|
|
- <t-button
|
|
|
- theme="success"
|
|
|
- :disabled="!selectedRowKeys.length"
|
|
|
- @click="multExport"
|
|
|
- >批量导出</t-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <p class="page-wrap-tips">
|
|
|
+ <ErrorCircleFilledIcon /> 考勤总计:{{
|
|
|
+ statisticsInfo.total
|
|
|
+ }},已提交:{{ statisticsInfo.submitted }},待提交:{{
|
|
|
+ statisticsInfo.unSubmitted
|
|
|
+ }},累计人天:{{ statisticsInfo.allDays }}天,累计工时:{{
|
|
|
+ statisticsInfo.allHours
|
|
|
+ }}小时
|
|
|
+ </p>
|
|
|
|
|
|
<t-table
|
|
|
size="small"
|
|
@@ -92,9 +92,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="jsx" name="WorkAttendance">
|
|
|
+<script setup name="WorkAttendance">
|
|
|
import { reactive, ref } from 'vue';
|
|
|
import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
|
|
|
+import { ErrorCircleFilledIcon } from 'tdesign-icons-vue-next';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
import {
|
|
|
workAttendanceListApi,
|
|
@@ -168,7 +169,7 @@ const fields = ref([
|
|
|
prop: 'supplierId',
|
|
|
label: '所属供应商',
|
|
|
type: 'select',
|
|
|
- labelWidth: 120,
|
|
|
+ labelWidth: 100,
|
|
|
colSpan: 5,
|
|
|
cell: 'supplier',
|
|
|
},
|
|
@@ -201,7 +202,7 @@ const fields = ref([
|
|
|
decimalPlaces: 0,
|
|
|
max: 1000000,
|
|
|
min: 0,
|
|
|
- style: 'width: 120px',
|
|
|
+ style: 'width: 100%',
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -215,7 +216,7 @@ const fields = ref([
|
|
|
decimalPlaces: 0,
|
|
|
max: 1000000,
|
|
|
min: 0,
|
|
|
- style: 'width: 120px',
|
|
|
+ style: 'width: 100%',
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -229,7 +230,7 @@ const fields = ref([
|
|
|
decimalPlaces: 0,
|
|
|
max: 1000000,
|
|
|
min: 0,
|
|
|
- style: 'width: 120px',
|
|
|
+ style: 'width: 100%',
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -243,7 +244,7 @@ const fields = ref([
|
|
|
decimalPlaces: 0,
|
|
|
max: 1000000,
|
|
|
min: 0,
|
|
|
- style: 'width: 120px',
|
|
|
+ style: 'width: 100%',
|
|
|
},
|
|
|
},
|
|
|
]);
|
|
@@ -268,27 +269,27 @@ const columns = [
|
|
|
width: 50,
|
|
|
fixed: 'left',
|
|
|
},
|
|
|
- { colKey: 'serviceUnitName', title: '服务单元' },
|
|
|
- { colKey: 'sopNo', title: 'SOP流水号' },
|
|
|
- { colKey: 'customName', title: '客户名称' },
|
|
|
- { colKey: 'province', title: '省份', minWidth: 60 },
|
|
|
- { colKey: 'city', title: '城市', minWidth: 60 },
|
|
|
- { colKey: 'enterTime', title: '进场时间', cell: 'enter-time', width: 170 },
|
|
|
- { colKey: 'outerTime', title: '撤场时间', cell: 'outer-time', width: 170 },
|
|
|
- { colKey: 'userName', title: '姓名(人员档案号)', cell: 'user', width: 150 },
|
|
|
+ { colKey: 'serviceUnitName', title: '服务单元', width: 160 },
|
|
|
+ { colKey: 'sopNo', title: 'SOP流水号', width: 200 },
|
|
|
+ { colKey: 'customName', title: '客户名称', width: 120 },
|
|
|
+ { colKey: 'province', title: '省份', width: 120 },
|
|
|
+ { colKey: 'city', title: '城市', width: 120 },
|
|
|
+ { colKey: 'enterTime', title: '进场时间', cell: 'enter-time', width: 180 },
|
|
|
+ { colKey: 'outerTime', title: '撤场时间', cell: 'outer-time', width: 180 },
|
|
|
+ { colKey: 'userName', title: '姓名(人员档案号)', cell: 'user', width: 170 },
|
|
|
{ colKey: 'roleName', title: '项目角色' },
|
|
|
{ colKey: 'supplier', title: '供应商' },
|
|
|
- { colKey: 'attendance', title: '实际出勤(天)', width: 120 },
|
|
|
- { colKey: 'weekdays', title: '工作日(天)', width: 110 },
|
|
|
- { colKey: 'weekends', title: '周末(天)', width: 100 },
|
|
|
- { colKey: 'holidays', title: '法定节假日(天)', width: 140 },
|
|
|
- { colKey: 'workHours', title: '累计工时(天)', width: 120 },
|
|
|
- { colKey: 'violationDays', title: '违规工时(天)', width: 120 },
|
|
|
- { colKey: 'q', title: '考勤异常数(天)', width: 140 },
|
|
|
- { colKey: 'r', title: '剩余补卡次数', width: 110 },
|
|
|
- { colKey: 's', title: '待处理异常数', width: 110 },
|
|
|
- { colKey: 'status', title: '提交状态', cell: 'status', width: 100 },
|
|
|
- { colKey: 'submitter', title: '提交人' },
|
|
|
+ { colKey: 'attendance', title: '实际出勤(天)', width: 140 },
|
|
|
+ { colKey: 'weekdays', title: '工作日(天)', width: 130 },
|
|
|
+ { colKey: 'weekends', title: '周末(天)', width: 120 },
|
|
|
+ { colKey: 'holidays', title: '法定节假日(天)', width: 160 },
|
|
|
+ { colKey: 'workHours', title: '累计工时(天)', width: 140 },
|
|
|
+ { colKey: 'violationDays', title: '违规工时(天)', width: 140 },
|
|
|
+ { colKey: 'q', title: '考勤异常数(天)', width: 150 },
|
|
|
+ { colKey: 'r', title: '剩余补卡次数', width: 120 },
|
|
|
+ { colKey: 's', title: '待处理异常数', width: 120 },
|
|
|
+ { colKey: 'status', title: '提交状态', cell: 'status', width: 120 },
|
|
|
+ { colKey: 'submitter', title: '提交人', width: 120 },
|
|
|
{
|
|
|
colKey: 'submissionTime',
|
|
|
title: '提交时间',
|
|
@@ -298,9 +299,8 @@ const columns = [
|
|
|
{
|
|
|
title: '管理',
|
|
|
colKey: 'operate',
|
|
|
- cell: 'operate',
|
|
|
fixed: 'right',
|
|
|
- width: 120,
|
|
|
+ width: 160,
|
|
|
},
|
|
|
];
|
|
|
const { pagination, tableData, fetchData, search, onChange } = useFetchTable(
|
|
@@ -328,6 +328,7 @@ const multSubmit = () => {
|
|
|
body: `确定要提交选择的所有记录吗?`,
|
|
|
confirmBtn: '确定',
|
|
|
cancelBtn: '取消',
|
|
|
+ theme: 'success',
|
|
|
onConfirm: async () => {
|
|
|
confirmDia.hide();
|
|
|
const res = await workAttendanceSubmitApi(selectedRowKeys.value).catch(
|
|
@@ -349,6 +350,7 @@ const multExport = () => {
|
|
|
body: `确定要导出选择的所有记录吗?`,
|
|
|
confirmBtn: '确定',
|
|
|
cancelBtn: '取消',
|
|
|
+ theme: 'info',
|
|
|
onConfirm: async () => {
|
|
|
confirmDia.hide();
|
|
|
const res = await workAttendanceExportApi(selectedRowKeys.value).catch(
|
|
@@ -366,6 +368,7 @@ const handleSubmit = (row) => {
|
|
|
body: `该工时数据提交后就可以进行工时统计结算,且该工时数据无法进行任何修改操作,您要继续提交吗?`,
|
|
|
confirmBtn: '确定',
|
|
|
cancelBtn: '取消',
|
|
|
+ theme: 'success',
|
|
|
onConfirm: async () => {
|
|
|
confirmDia.hide();
|
|
|
const res = await workAttendanceSubmitApi([row.id]).catch(() => {});
|
|
@@ -381,6 +384,7 @@ const handleWithdraw = (row) => {
|
|
|
body: `您确定要撤回这条已提交的工时数据吗?您操作撤回后,还需要工时管理人员同意撤回,这条工时数据才能被真正撤回。`,
|
|
|
confirmBtn: '确定',
|
|
|
cancelBtn: '取消',
|
|
|
+ theme: 'warning',
|
|
|
onConfirm: async () => {
|
|
|
confirmDia.hide();
|
|
|
const res = await workAttendanceWithdrawApi(row.id).catch(() => {});
|
|
@@ -396,6 +400,7 @@ const handleCancelWithdraw = (row) => {
|
|
|
body: `确定要取消撤回当前记录吗?`,
|
|
|
confirmBtn: '确定',
|
|
|
cancelBtn: '取消',
|
|
|
+ theme: 'warning',
|
|
|
onConfirm: async () => {
|
|
|
confirmDia.hide();
|
|
|
const res = await workAttendanceCancelWithdrawApi(row.id).catch(() => {});
|