<template>
    <div class="page">
        <LayoutTable :data="tableData" :config="tableConfig">
                    </LayoutTable>


        <dialog-show ref="dialogform" @ok="getData" />
    </div>
</template>

<script>
    /** 表单弹出框模式需引入 */
    import dialogShow from "./dialogshow";
    import table from "@/assets/mixins/table";
    export default {
        name: "AttendanceStatList",
        components: {
            dialogShow
},
        mixins: [table],
        created() {
        },
        methods: {
            /** 重写新增方法 */
            toAdd(row) {
                this.$refs.dialogform.add(row);
            },
            /** 重写编辑方法 */
            toEdit(row) {
                this.$refs.dialogform.edit(row);
            },
            /** 重写查看方法 */
            toView(row) {
                this.$refs.dialogform.view(row);
            },

        },
        data() {
            return {
                config: {
                    search: [
                        {
                            name: "windowCategory",
                            type: "text",
                            label: "窗口类别",
                            fuzzy: true
                        },
                        {
                            name: "staffName",
                            type: "text",
                            label: "员工姓名",
                            fuzzy: true
                        },
                        {
                            name: "deptId",
                            type: "text",
                            label: "所属部门",
                            fuzzy: true
                        },
                        {
                            name: "backToUnit",
                            type: "text",
                            label: "回单位",
                            fuzzy: true
                        },
                        {
                            name: "onDutyLeave",
                            type: "text",
                            label: "因公请假",
                            fuzzy: true
                        },
                        {
                            name: "outOfOffice",
                            type: "text",
                            label: "外出勘验",
                            fuzzy: true
                        },
                        {
                            name: "shiftCompensation",
                            type: "text",
                            label: "值班补班",
                            fuzzy: true
                        },
                        {
                            name: "physicalExamination",
                            type: "text",
                            label: "体检",
                            fuzzy: true
                        },
                        {
                            name: "quarantine",
                            type: "text",
                            label: "隔离",
                            fuzzy: true
                        },
                        {
                            name: "businessTrip",
                            type: "text",
                            label: "因公外出",
                            fuzzy: true
                        },
                        {
                            name: "publicHoliday",
                            type: "text",
                            label: "公休",
                            fuzzy: true
                        },
                        {
                            name: "sickLeave",
                            type: "text",
                            label: "病假",
                            fuzzy: true
                        },
                        {
                            name: "funeralLeave",
                            type: "text",
                            label: "丧假",
                            fuzzy: true
                        },
                        {
                            name: "marriageLeave",
                            type: "text",
                            label: "婚假",
                            fuzzy: true
                        },
                        {
                            name: "childRearingLeave",
                            type: "text",
                            label: "育儿假",
                            fuzzy: true
                        },
                        {
                            name: "maternityLeave",
                            type: "text",
                            label: "产假",
                            fuzzy: true
                        },
                        {
                            name: "transferBack",
                            type: "text",
                            label: "调回单位",
                            fuzzy: true
                        },
                        {
                            name: "homeLeave",
                            type: "text",
                            label: "探亲假",
                            fuzzy: true
                        },
                        {
                            name: "personalLeave",
                            type: "text",
                            label: "事假",
                            fuzzy: true
                        },
                        {
                            name: "absenteeismDays",
                            type: "text",
                            label: "考勤汇总-旷工",
                            fuzzy: true
                        },
                        {
                            name: "otherDays",
                            type: "text",
                            label: "考勤汇总-其他",
                            fuzzy: true
                        },
                        {
                            name: "attendanceRate",
                            type: "text",
                            label: "考勤汇总-出勤率",
                            fuzzy: true
                        },
                        {
                            name: "nonCompliancePunch",
                            type: "text",
                            label: "考勤汇总-未按规定打卡",
                            fuzzy: true
                        },
                        {
                            name: "lateTimes",
                            type: "text",
                            label: "考勤汇总-迟到",
                            fuzzy: true
                        },
                        {
                            name: "surfingMobileTimes",
                            type: "text",
                            label: "考勤汇总-上网耍手机",
                            fuzzy: true
                        },
                        {
                            name: "overtimeTimes",
                            type: "text",
                            label: "考勤汇总-溜班",
                            fuzzy: true
                        },
                        {
                            name: "vacancy",
                            type: "text",
                            label: "考勤汇总-空岗",
                            fuzzy: true
                        },
                        {
                            name: "nonStandardDressTimes",
                            type: "text",
                            label: "考勤汇总-未规范着装",
                            fuzzy: true
                        },
                        {
                            name: "unexcusedMeetingAbsence",
                            type: "text",
                            label: "考勤汇总-无故缺席会议",
                            fuzzy: true
                        },
                        {
                            name: "earlyLeaveMeeting",
                            type: "text",
                            label: "考勤汇总-会议早退",
                            fuzzy: true
                        },
                    ],
                    columns: [
                        {type: "selection", width: 60},
                        {type: "index",label: "序号",width: 50},

                        {label: "窗口类别", prop: "windowCategory"},

                        {label: "员工姓名", prop: "staffName"},

                        {label: "回单位", prop: "backToUnit", formatter: this.formatterMoney},

                        {label: "因公请假", prop: "onDutyLeave", formatter: this.formatterMoney},

                        {label: "外出勘验", prop: "outOfOffice", formatter: this.formatterMoney},

                        {label: "值班补班", prop: "shiftCompensation", formatter: this.formatterMoney},

                        {label: "体检", prop: "physicalExamination", formatter: this.formatterMoney},

                        {label: "隔离", prop: "quarantine", formatter: this.formatterMoney},

                        {label: "因公外出", prop: "businessTrip", formatter: this.formatterMoney},

                        {label: "公休", prop: "publicHoliday", formatter: this.formatterMoney},

                        {label: "病假", prop: "sickLeave", formatter: this.formatterMoney},

                        {label: "丧假", prop: "funeralLeave", formatter: this.formatterMoney},

                        {label: "婚假", prop: "marriageLeave", formatter: this.formatterMoney},

                        {label: "育儿假", prop: "childRearingLeave", formatter: this.formatterMoney},

                        {label: "产假", prop: "maternityLeave", formatter: this.formatterMoney},

                        {label: "调回单位", prop: "transferBack", formatter: this.formatterMoney},

                        {label: "探亲假", prop: "homeLeave", formatter: this.formatterMoney},

                        {label: "事假", prop: "personalLeave", formatter: this.formatterMoney},

                        {label: "考勤汇总-旷工", prop: "absenteeismDays", formatter: this.formatterMoney},

                        {label: "考勤汇总-其他", prop: "otherDays", formatter: this.formatterMoney},

                        {label: "考勤汇总-出勤率", prop: "attendanceRate", formatter: this.formatterMoney},

                        {label: "考勤汇总-未按规定打卡", prop: "nonCompliancePunch", formatter: this.formatterMoney},

                        {label: "考勤汇总-迟到", prop: "lateTimes",formatter: this.formatter},

                        {label: "考勤汇总-上网耍手机", prop: "surfingMobileTimes",formatter: this.formatter},

                        {label: "考勤汇总-溜班", prop: "overtimeTimes",formatter: this.formatter},

                        {label: "考勤汇总-空岗", prop: "vacancy", formatter: this.formatterMoney},

                        {label: "考勤汇总-未规范着装", prop: "nonStandardDressTimes",formatter: this.formatter},

                        {label: "考勤汇总-无故缺席会议", prop: "unexcusedMeetingAbsence", formatter: this.formatterMoney},

                        {label: "考勤汇总-会议早退", prop: "earlyLeaveMeeting", formatter: this.formatterMoney},

                        {label: "创建用户", prop: "createUserId", formatter: this.formatter},
                        {
                            label: "操作",
                            width: 240,
                            formatter: row => {
                                return (
                                    <table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
                            );
                            }
                        }
                    ]
                }
            };
        }
    };
</script>