|
@@ -0,0 +1,179 @@
|
|
|
+<template>
|
|
|
+ <div class="work-attendance flex flex-col h-full">
|
|
|
+ <SearchForm :fields="fields" :params="params"></SearchForm>
|
|
|
+
|
|
|
+ <div class="flex-1 page-wrap">
|
|
|
+ <div class="btn-group">
|
|
|
+ <t-button
|
|
|
+ theme="success"
|
|
|
+ :disabled="!selectedRowKeys.length"
|
|
|
+ @click="multSubmit"
|
|
|
+ >批量提交</t-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <t-table
|
|
|
+ size="small"
|
|
|
+ row-key="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="tableData"
|
|
|
+ bordered
|
|
|
+ :pagination="{
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ onChange,
|
|
|
+ total: pagination.total,
|
|
|
+ }"
|
|
|
+ :selected-row-keys="selectedRowKeys"
|
|
|
+ select-on-row-click
|
|
|
+ @select-change="selectChange"
|
|
|
+ >
|
|
|
+ </t-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup name="WorkAttendance">
|
|
|
+import { reactive, ref } from 'vue';
|
|
|
+import { getTableData } from '@/api/test';
|
|
|
+import useFetchTable from '@/hooks/useFetchTable';
|
|
|
+
|
|
|
+const selectedRowKeys = ref([]);
|
|
|
+const selectChange = (value, { selectedRowData }) => {
|
|
|
+ selectedRowKeys.value = value;
|
|
|
+};
|
|
|
+const multSubmit = () => {};
|
|
|
+const columns = [
|
|
|
+ {
|
|
|
+ colKey: 'row-select',
|
|
|
+ type: 'multiple',
|
|
|
+ width: 50,
|
|
|
+ fixed: 'left',
|
|
|
+ },
|
|
|
+ { colKey: 'a', title: '服务单元' },
|
|
|
+ { colKey: 'b', title: 'SOP流水号' },
|
|
|
+ { colKey: 'c', title: '客户名称' },
|
|
|
+ { colKey: 'd', title: '省份' },
|
|
|
+ { colKey: 'e', title: '城市' },
|
|
|
+ { colKey: 'f', title: '进场时间' },
|
|
|
+ { colKey: 'g', title: '撤场时间' },
|
|
|
+ { colKey: 'h', title: '姓名(人员档案号)' },
|
|
|
+ { colKey: 'i', title: '项目角色' },
|
|
|
+ { colKey: 'j', title: '供应商' },
|
|
|
+ { colKey: 'k', title: '实际出勤(天)' },
|
|
|
+ { colKey: 'l', title: '工作日(天)' },
|
|
|
+ { colKey: 'm', title: '周末(天)' },
|
|
|
+ { colKey: 'n', title: '法定节假日(天)' },
|
|
|
+ { colKey: 'o', title: '累计工时(天)' },
|
|
|
+ { colKey: 'p', title: '违规工时(天)' },
|
|
|
+ { colKey: 'q', title: '考勤异常数(天)' },
|
|
|
+ { colKey: 'r', title: '剩余补卡次数' },
|
|
|
+ { colKey: 's', title: '待处理异常数' },
|
|
|
+ { colKey: 't', title: '提交状态' },
|
|
|
+ { colKey: 'u', title: '提交人' },
|
|
|
+ { colKey: 'v', title: '提交时间' },
|
|
|
+];
|
|
|
+const {
|
|
|
+ loading: tableLoading,
|
|
|
+ pagination,
|
|
|
+ tableData,
|
|
|
+ fetchData,
|
|
|
+ onChange,
|
|
|
+} = useFetchTable(getTableData);
|
|
|
+const fields = ref([
|
|
|
+ {
|
|
|
+ prop: 'a',
|
|
|
+ label: '服务单元',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'b',
|
|
|
+ label: '提交状态',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'c',
|
|
|
+ label: '提交人',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'd',
|
|
|
+ label: '姓名',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'buttons',
|
|
|
+ colSpan: 2,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ type: 'button',
|
|
|
+ text: '查询',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'e',
|
|
|
+ label: '所属供应商',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'f',
|
|
|
+ label: '客户名称',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'g',
|
|
|
+ label: 'SOP流水号',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'h',
|
|
|
+ label: '违规工时>',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'i',
|
|
|
+ label: '考勤异常数>',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'j',
|
|
|
+ label: '剩余补卡次数>',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'k',
|
|
|
+ label: '待处理异常数>',
|
|
|
+ labelWidth: 120,
|
|
|
+ colSpan: 5.4,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const params = reactive({
|
|
|
+ a: '',
|
|
|
+ b: '',
|
|
|
+ c: '',
|
|
|
+ d: '',
|
|
|
+ e: '',
|
|
|
+ f: '',
|
|
|
+ g: '',
|
|
|
+ h: '',
|
|
|
+ i: '',
|
|
|
+ j: '',
|
|
|
+ k: '',
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style></style>
|