@studio-west/employees 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SheetTable.cjs +3 -3
- package/dist/SheetTable.js +148 -142
- package/package.json +1 -1
package/dist/SheetTable.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const e=require("vue")
|
|
2
|
-
`+
|
|
3
|
-
`+
|
|
1
|
+
"use strict";const e=require("vue"),M=require("vue-i18n"),p=require("./index-CHGzf-XH.cjs"),r=require("element-plus"),F={style:{height:"20px",width:"100%",display:"inline-block"}},Y={style:{height:"20px",width:"100%",display:"inline-block"}},H={__name:"SheetTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(w){const g=w,{t:i,d:C}=M.useI18n(),c=e.ref([]),x=e.ref("0"),y=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(x.value))),h=e.ref([]),v=e.ref("all"),N=e.ref([{value:"all",label:"Все",key:"all"}]),T=e.ref([]),k=e.ref(0),b=e.ref([]);e.watch(v,async(a,l)=>{a!==l&&(b.value=[],confirm.value=!1,g.odata.personal.forEach(t=>{t.divisionName===a&&(b.value.some(n=>(n==null?void 0:n.activeText)===t.roleName)||b.value.push({val:!0,activeText:t.roleName}))}),V())}),e.watch(x,a=>{y.value=new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(a)),D()});const u=e.computed(()=>c.value.flatMap((a,l)=>[{...a,key:0,ids:l},{...a,key:1,ids:l}])),S=a=>{if(a.columnIndex<2||a.columnIndex>h.value.length+3&&a.columnIndex<h.value.length+9||a.columnIndex>h.value.length+11)return u.value[a.rowIndex].key===0?{rowspan:2,colspan:1}:{rowspan:0,colspan:0}},D=()=>{const a=T.value,l=new Date(y.value),t=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let n=[],f=0;for(let d=1;d<=t;d++){const o=p.parseTime(l.setDate(d),"{Y}-{m}-{dd}");f+=a.nowork.includes(o)||a.holidays.includes(o)?0:a.preholidays.includes(o)?7:8;let s=a.nowork.includes(o)?"nowork":a.holidays.includes(o)?"holiday":a.preholidays.includes(o)?"preholiday":"";n.push({day:d,holidays:s,weekday:C(new Date(l.getFullYear(),l.getMonth(),d),"day")})}k.value=f,h.value=n,g.odata.getPersonal({}).then(d=>{var o;v.value=(o=d.find(s=>s.employeeName===g.fullName))==null?void 0:o.divisionName,d.forEach(s=>{N.value.some(m=>(m==null?void 0:m.value)===s.divisionName)||N.value.push({value:s.divisionName,label:s.divisionName,key:s.divisionName}),s.divisionName===v.value&&!b.value.some(m=>(m==null?void 0:m.activeText)===s.roleName)&&b.value.push({val:!0,activeText:s.roleName})}),V()})},V=()=>{c.value=[];let a=[];g.odata.personal.forEach(l=>{if(l.divisionName===v.value&&b.value.some(t=>t.val&&t.activeText===l.roleName)){let t=p.byInitials(l.employeeName);a.push(l.employeeKey),c.value.push({name:t+" ("+l.roleName+")",code:l.employeeKey,days:[],contHour:0,id:!1,ids:c.value.length})}}),B(a)},B=a=>{g.workSchedule.getWorkSchedule({code:a,date:p.parseTime(new Date(y.value),"{Y}-{m}-{dd}")}).then(l=>{l.forEach((t,n)=>{var f,d;if(t!==null){t.data.days.forEach(o=>o.state="Я");for(let o=1;o<=h.value.length;o++){let s=p.parseTime(new Date(y.value).setDate(o),"{Y}-{m}-{dd}");const m=(f=t.data)==null?void 0:f.days.findIndex($=>$.day===s);m===-1?c.value[n].days.push({day:s,time:"-",state:"В"}):c.value[n].days.push((d=t.data)==null?void 0:d.days[m])}}else{c.value[n].days=[];for(let o=1;o<=h.value.length;o++)h.value[o-1].holidays===""?E(o,n,8):h.value[o-1].holidays==="preholiday"?E(o,n,7):c.value[n].days.push({day:p.parseTime(new Date(y.value).setDate(o),"{Y}-{m}-{dd}"),time:"-",state:"В"})}}),_()})},E=(a,l,t)=>{const n=p.parseTime(new Date(y.value).setDate(a),"{Y}-{m}-{dd}");c.value[l].days.push({day:n,time:t,state:"Я"})},_=()=>{c.value.forEach(a=>{a.hourI=0,a.hourII=0,a.halfII=0,a.halfI=0,a.weekend=0,a.weekendDays=0,a.night=0;for(let l=0;l<a.days.length;l++)l<15&&a.days[l].time!=="-"&&(a.hourI+=a.days[l].time),l<15&&a.days[l].state==="Я"&&a.halfI++,l>=15&&a.days[l].time!=="-"&&(a.hourII+=a.days[l].time),l>=15&&a.days[l].state==="Я"&&a.halfII++,a.days[l].state==="Н"&&(a.night+=a.days[l].time),a.days[l].state==="РВ"&&(a.weekend+=a.days[l].time),a.days[l].state==="В"&&a.weekendDays++;a.contDays=a.halfI+a.halfII,a.contHour=a.hourI+a.hourII,a.overtime=0,k.value<a.contHour&&(a.overtime=a.contHour-k.value),a.numberNonAppearing=0,a.appearing={code:"-",countH:"-"}})},I=(a,l)=>{var d,o;if(l===-1)return"";const t=new Date(y.value),n=`${t.getFullYear()}-${(t.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,f=u.value[l].days.findIndex(s=>s.day===n);return f===-1?"":u.value[l].key===0?(d=u.value[l].days[f])==null?void 0:d.state:(o=u.value[l].days[f])==null?void 0:o.time};return p.holidays().then(a=>{T.value=a,D()}),(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.checkEdit?(e.openBlock(),e.createBlock(e.unref(r.ElSelect),{key:0,modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=t=>v.value=t),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),w.checkEdit?(e.openBlock(),e.createBlock(e.unref(r.ElSwitch),{key:1,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=t=>x.value=t),"active-text":e.unref(i)("workSchedule.currentMonth"),"active-value":"0","inactive-value":"-1",style:{"margin-bottom":".5rem","margin-left":".5rem"}},null,8,["modelValue","active-text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(r.ElTable),{id:"printTable",data:u.value,"span-method":S,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(i)("sheet.emptyText"),align:"center",onCellClick:a.coMenu},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.title",{name:v.value})+e.unref(C)(y.value,"month"),align:"center",height:"10"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.employee"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.personnelNumber"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.marks"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.day},[t.day<=15?(e.openBlock(),e.createBlock(e.unref(r.ElTableColumn),{key:0,width:"30","class-name":t.holidays,align:"center",label:t.day.toString()+`
|
|
2
|
+
`+t.weekday},{default:e.withCtx(n=>[e.createElementVNode("div",F,e.toDisplayString(I(t.day,n.$index)||" "),1)]),_:2},1032,["class-name","label"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.halfMonth",{half:"I"}),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].key===0?u.value[t.$index].halfI:u.value[t.$index].hourI),1)]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.day},[t.day>15?(e.openBlock(),e.createBlock(e.unref(r.ElTableColumn),{key:0,width:"30","class-name":t.holidays,align:"center",label:t.day.toString()+`
|
|
3
|
+
`+t.weekday},{default:e.withCtx(n=>[e.createElementVNode("div",Y,e.toDisplayString(I(t.day,n.$index)||" "),1)]),_:2},1032,["class-name","label"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.halfMonth",{half:"II"}),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].key===0?u.value[t.$index].halfII:u.value[t.$index].hourII),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.workedMonth"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.days"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].contDays),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.hours"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.all"),align:"center","label-class-name":"turn",width:"40"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].contHour),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.overtime"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].overtime),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.night"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].night),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.weekend"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].weekend),1)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.numberNonAppearing"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].numberNonAppearing),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.them"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.code"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(t=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value[t.$index].appearing)==null?void 0:n.code),1)]}),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.count"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(t=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value[t.$index].appearing)==null?void 0:n.countH),1)]}),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(i)("sheet.countWeekend"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(u.value[t.$index].weekendDays),1)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text","onCellClick"])],64))}};module.exports=H;
|
package/dist/SheetTable.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as w, watch as K, computed as L, openBlock as y, createElementBlock as D, Fragment as
|
|
1
|
+
import { ref as w, watch as K, computed as L, openBlock as y, createElementBlock as D, Fragment as N, createBlock as $, unref as t, withCtx as s, renderList as H, createCommentVNode as E, createVNode as d, createTextVNode as m, toDisplayString as c, createElementVNode as P } from "vue";
|
|
2
2
|
import { useI18n as q } from "vue-i18n";
|
|
3
3
|
import { p as M, b as G, h as R } from "./index-uVRk2ARj.js";
|
|
4
|
-
import { ElSelect as X, ElOption as Z, ElSwitch as Q, ElTable as ee, ElTableColumn as
|
|
5
|
-
const ae = { style: { height: "20px", width: "100%", display: "inline-block" } },
|
|
4
|
+
import { ElSelect as X, ElOption as Z, ElSwitch as Q, ElTable as ee, ElTableColumn as r } from "element-plus";
|
|
5
|
+
const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }, le = { style: { height: "20px", width: "100%", display: "inline-block" } }, se = {
|
|
6
6
|
__name: "SheetTable",
|
|
7
7
|
props: {
|
|
8
8
|
checkEdit: { type: Boolean, default: () => !0 },
|
|
@@ -11,17 +11,17 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
11
11
|
fullName: { type: String, default: "Вы" }
|
|
12
12
|
},
|
|
13
13
|
setup(T) {
|
|
14
|
-
const
|
|
15
|
-
K(k, async (e,
|
|
16
|
-
e !==
|
|
17
|
-
a.divisionName === e && (I.value.some((
|
|
14
|
+
const _ = T, { t: i, d: C } = q(), f = w([]), S = w("0"), x = w(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(S.value))), b = w([]), k = w("all"), V = w([{ value: "all", label: "Все", key: "all" }]), F = w([]), Y = w(0), I = w([]);
|
|
15
|
+
K(k, async (e, l) => {
|
|
16
|
+
e !== l && (I.value = [], confirm.value = !1, _.odata.personal.forEach((a) => {
|
|
17
|
+
a.divisionName === e && (I.value.some((n) => (n == null ? void 0 : n.activeText) === a.roleName) || I.value.push({ val: !0, activeText: a.roleName }));
|
|
18
18
|
}), j());
|
|
19
|
-
}), K(
|
|
19
|
+
}), K(S, (e) => {
|
|
20
20
|
x.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(e)), B();
|
|
21
21
|
});
|
|
22
|
-
const
|
|
22
|
+
const u = L(() => f.value.flatMap((e, l) => [{ ...e, key: 0, ids: l }, { ...e, key: 1, ids: l }])), U = (e) => {
|
|
23
23
|
if (e.columnIndex < 2 || e.columnIndex > b.value.length + 3 && e.columnIndex < b.value.length + 9 || e.columnIndex > b.value.length + 11)
|
|
24
|
-
return
|
|
24
|
+
return u.value[e.rowIndex].key === 0 ? {
|
|
25
25
|
rowspan: 2,
|
|
26
26
|
colspan: 1
|
|
27
27
|
} : {
|
|
@@ -29,50 +29,50 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
29
29
|
colspan: 0
|
|
30
30
|
};
|
|
31
31
|
}, B = () => {
|
|
32
|
-
const e =
|
|
33
|
-
let
|
|
32
|
+
const e = F.value, l = new Date(x.value), a = new Date(l.getFullYear(), l.getMonth() + 1, 0).getDate();
|
|
33
|
+
let n = [], g = 0;
|
|
34
34
|
for (let v = 1; v <= a; v++) {
|
|
35
|
-
const
|
|
36
|
-
g += e.nowork.includes(
|
|
37
|
-
let h = e.nowork.includes(
|
|
38
|
-
|
|
35
|
+
const o = M(l.setDate(v), "{Y}-{m}-{dd}");
|
|
36
|
+
g += e.nowork.includes(o) || e.holidays.includes(o) ? 0 : e.preholidays.includes(o) ? 7 : 8;
|
|
37
|
+
let h = e.nowork.includes(o) ? "nowork" : e.holidays.includes(o) ? "holiday" : e.preholidays.includes(o) ? "preholiday" : "";
|
|
38
|
+
n.push({ day: v, holidays: h, weekday: C(new Date(l.getFullYear(), l.getMonth(), v), "day") });
|
|
39
39
|
}
|
|
40
|
-
Y.value = g, b.value =
|
|
41
|
-
var
|
|
42
|
-
k.value = (
|
|
40
|
+
Y.value = g, b.value = n, _.odata.getPersonal({}).then((v) => {
|
|
41
|
+
var o;
|
|
42
|
+
k.value = (o = v.find((h) => h.employeeName === _.fullName)) == null ? void 0 : o.divisionName, v.forEach((h) => {
|
|
43
43
|
V.value.some((p) => (p == null ? void 0 : p.value) === h.divisionName) || V.value.push({ value: h.divisionName, label: h.divisionName, key: h.divisionName }), h.divisionName === k.value && !I.value.some((p) => (p == null ? void 0 : p.activeText) === h.roleName) && I.value.push({ val: !0, activeText: h.roleName });
|
|
44
44
|
}), j();
|
|
45
45
|
});
|
|
46
46
|
}, j = () => {
|
|
47
47
|
f.value = [];
|
|
48
48
|
let e = [];
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
let a = G(
|
|
52
|
-
e.push(
|
|
49
|
+
_.odata.personal.forEach((l) => {
|
|
50
|
+
if (l.divisionName === k.value && I.value.some((a) => a.val && a.activeText === l.roleName)) {
|
|
51
|
+
let a = G(l.employeeName);
|
|
52
|
+
e.push(l.employeeKey), f.value.push({ name: a + " (" + l.roleName + ")", code: l.employeeKey, days: [], contHour: 0, id: !1, ids: f.value.length });
|
|
53
53
|
}
|
|
54
54
|
}), W(e);
|
|
55
55
|
}, W = (e) => {
|
|
56
|
-
|
|
57
|
-
(
|
|
58
|
-
|
|
56
|
+
_.workSchedule.getWorkSchedule({ code: e, date: M(new Date(x.value), "{Y}-{m}-{dd}") }).then(
|
|
57
|
+
(l) => {
|
|
58
|
+
l.forEach((a, n) => {
|
|
59
59
|
var g, v;
|
|
60
60
|
if (a !== null) {
|
|
61
|
-
a.data.days.forEach((
|
|
62
|
-
for (let
|
|
63
|
-
let h = M(new Date(x.value).setDate(
|
|
61
|
+
a.data.days.forEach((o) => o.state = "Я");
|
|
62
|
+
for (let o = 1; o <= b.value.length; o++) {
|
|
63
|
+
let h = M(new Date(x.value).setDate(o), "{Y}-{m}-{dd}");
|
|
64
64
|
const p = (g = a.data) == null ? void 0 : g.days.findIndex((J) => J.day === h);
|
|
65
|
-
p === -1 ? f.value[
|
|
65
|
+
p === -1 ? f.value[n].days.push({
|
|
66
66
|
day: h,
|
|
67
67
|
time: "-",
|
|
68
68
|
state: "В"
|
|
69
|
-
}) : f.value[
|
|
69
|
+
}) : f.value[n].days.push((v = a.data) == null ? void 0 : v.days[p]);
|
|
70
70
|
}
|
|
71
71
|
} else {
|
|
72
|
-
f.value[
|
|
73
|
-
for (let
|
|
74
|
-
b.value[
|
|
75
|
-
day: M(new Date(x.value).setDate(
|
|
72
|
+
f.value[n].days = [];
|
|
73
|
+
for (let o = 1; o <= b.value.length; o++)
|
|
74
|
+
b.value[o - 1].holidays === "" ? A(o, n, 8) : b.value[o - 1].holidays === "preholiday" ? A(o, n, 7) : f.value[n].days.push({
|
|
75
|
+
day: M(new Date(x.value).setDate(o), "{Y}-{m}-{dd}"),
|
|
76
76
|
time: "-",
|
|
77
77
|
state: "В"
|
|
78
78
|
});
|
|
@@ -80,41 +80,41 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
80
80
|
}), z();
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
},
|
|
84
|
-
const
|
|
85
|
-
f.value[
|
|
86
|
-
day:
|
|
83
|
+
}, A = (e, l, a) => {
|
|
84
|
+
const n = M(new Date(x.value).setDate(e), "{Y}-{m}-{dd}");
|
|
85
|
+
f.value[l].days.push({
|
|
86
|
+
day: n,
|
|
87
87
|
time: a,
|
|
88
88
|
state: "Я"
|
|
89
89
|
});
|
|
90
90
|
}, z = () => {
|
|
91
91
|
f.value.forEach((e) => {
|
|
92
92
|
e.hourI = 0, e.hourII = 0, e.halfII = 0, e.halfI = 0, e.weekend = 0, e.weekendDays = 0, e.night = 0;
|
|
93
|
-
for (let
|
|
94
|
-
|
|
93
|
+
for (let l = 0; l < e.days.length; l++)
|
|
94
|
+
l < 15 && e.days[l].time !== "-" && (e.hourI += e.days[l].time), l < 15 && e.days[l].state === "Я" && e.halfI++, l >= 15 && e.days[l].time !== "-" && (e.hourII += e.days[l].time), l >= 15 && e.days[l].state === "Я" && e.halfII++, e.days[l].state === "Н" && (e.night += e.days[l].time), e.days[l].state === "РВ" && (e.weekend += e.days[l].time), e.days[l].state === "В" && e.weekendDays++;
|
|
95
95
|
e.contDays = e.halfI + e.halfII, e.contHour = e.hourI + e.hourII, e.overtime = 0, Y.value < e.contHour && (e.overtime = e.contHour - Y.value), e.numberNonAppearing = 0, e.appearing = {
|
|
96
96
|
code: "-",
|
|
97
97
|
countH: "-"
|
|
98
98
|
};
|
|
99
99
|
});
|
|
100
|
-
},
|
|
101
|
-
var v,
|
|
102
|
-
if (
|
|
103
|
-
const a = new Date(x.value),
|
|
104
|
-
return g === -1 ? "" :
|
|
100
|
+
}, O = (e, l) => {
|
|
101
|
+
var v, o;
|
|
102
|
+
if (l === -1) return "";
|
|
103
|
+
const a = new Date(x.value), n = `${a.getFullYear()}-${(a.getMonth() + 1).toString().padStart(2, "0")}-${e.toString().padStart(2, "0")}`, g = u.value[l].days.findIndex((h) => h.day === n);
|
|
104
|
+
return g === -1 ? "" : u.value[l].key === 0 ? (v = u.value[l].days[g]) == null ? void 0 : v.state : (o = u.value[l].days[g]) == null ? void 0 : o.time;
|
|
105
105
|
};
|
|
106
106
|
return R().then((e) => {
|
|
107
|
-
|
|
108
|
-
}), (e,
|
|
109
|
-
T.checkEdit ? (y(),
|
|
107
|
+
F.value = e, B();
|
|
108
|
+
}), (e, l) => (y(), D(N, null, [
|
|
109
|
+
T.checkEdit ? (y(), $(t(X), {
|
|
110
110
|
key: 0,
|
|
111
111
|
modelValue: k.value,
|
|
112
|
-
"onUpdate:modelValue":
|
|
112
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => k.value = a),
|
|
113
113
|
placeholder: "Select",
|
|
114
114
|
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
115
115
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
(y(!0), D(
|
|
116
|
+
default: s(() => [
|
|
117
|
+
(y(!0), D(N, null, H(V.value, (a) => (y(), $(t(Z), {
|
|
118
118
|
key: a.value,
|
|
119
119
|
label: a.label,
|
|
120
120
|
value: a.value
|
|
@@ -122,61 +122,61 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
124
|
}, 8, ["modelValue"])) : E("", !0),
|
|
125
|
-
T.checkEdit ? (y(),
|
|
125
|
+
T.checkEdit ? (y(), $(t(Q), {
|
|
126
126
|
key: 1,
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue":
|
|
129
|
-
"active-text":
|
|
127
|
+
modelValue: S.value,
|
|
128
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => S.value = a),
|
|
129
|
+
"active-text": t(i)("workSchedule.currentMonth"),
|
|
130
130
|
"active-value": "0",
|
|
131
131
|
"inactive-value": "-1",
|
|
132
132
|
style: { "margin-bottom": ".5rem", "margin-left": ".5rem" }
|
|
133
133
|
}, null, 8, ["modelValue", "active-text"])) : E("", !0),
|
|
134
|
-
d(
|
|
134
|
+
d(t(ee), {
|
|
135
135
|
id: "printTable",
|
|
136
|
-
data:
|
|
136
|
+
data: u.value,
|
|
137
137
|
"span-method": U,
|
|
138
138
|
border: "",
|
|
139
139
|
style: { width: "100%" },
|
|
140
140
|
size: "small",
|
|
141
|
-
"empty-text":
|
|
141
|
+
"empty-text": t(i)("sheet.emptyText"),
|
|
142
142
|
align: "center",
|
|
143
143
|
onCellClick: e.coMenu
|
|
144
144
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
d(
|
|
147
|
-
label:
|
|
145
|
+
default: s(() => [
|
|
146
|
+
d(t(r), {
|
|
147
|
+
label: t(i)("sheet.title", { name: k.value }) + t(C)(x.value, "month"),
|
|
148
148
|
align: "center",
|
|
149
149
|
height: "10"
|
|
150
150
|
}, {
|
|
151
|
-
default:
|
|
152
|
-
d(
|
|
153
|
-
label:
|
|
151
|
+
default: s(() => [
|
|
152
|
+
d(t(r), {
|
|
153
|
+
label: t(i)("sheet.employee"),
|
|
154
154
|
width: "180",
|
|
155
155
|
align: "center"
|
|
156
156
|
}, {
|
|
157
|
-
default:
|
|
158
|
-
m(c(
|
|
157
|
+
default: s((a) => [
|
|
158
|
+
m(c(u.value[a.$index].name), 1)
|
|
159
159
|
]),
|
|
160
160
|
_: 1
|
|
161
161
|
}, 8, ["label"]),
|
|
162
|
-
d(
|
|
163
|
-
label:
|
|
162
|
+
d(t(r), {
|
|
163
|
+
label: t(i)("sheet.personnelNumber"),
|
|
164
164
|
align: "center"
|
|
165
165
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
m(c(
|
|
166
|
+
default: s((a) => [
|
|
167
|
+
m(c(u.value[a.$index].code), 1)
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
170
|
}, 8, ["label"]),
|
|
171
|
-
d(
|
|
172
|
-
label:
|
|
171
|
+
d(t(r), {
|
|
172
|
+
label: t(i)("sheet.marks"),
|
|
173
173
|
align: "center"
|
|
174
174
|
}, {
|
|
175
|
-
default:
|
|
176
|
-
(y(!0), D(
|
|
175
|
+
default: s(() => [
|
|
176
|
+
(y(!0), D(N, null, H(b.value, (a) => (y(), D(N, {
|
|
177
177
|
key: a.day
|
|
178
178
|
}, [
|
|
179
|
-
a.day <= 15 ? (y(),
|
|
179
|
+
a.day <= 15 ? (y(), $(t(r), {
|
|
180
180
|
key: 0,
|
|
181
181
|
width: "30",
|
|
182
182
|
"class-name": a.holidays,
|
|
@@ -184,25 +184,25 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
184
184
|
label: a.day.toString() + `
|
|
185
185
|
` + a.weekday
|
|
186
186
|
}, {
|
|
187
|
-
default:
|
|
188
|
-
P("div", ae, c(
|
|
187
|
+
default: s((n) => [
|
|
188
|
+
P("div", ae, c(O(a.day, n.$index) || " "), 1)
|
|
189
189
|
]),
|
|
190
190
|
_: 2
|
|
191
191
|
}, 1032, ["class-name", "label"])) : E("", !0)
|
|
192
192
|
], 64))), 128)),
|
|
193
|
-
d(
|
|
194
|
-
label:
|
|
193
|
+
d(t(r), {
|
|
194
|
+
label: t(i)("sheet.halfMonth", { half: "I" }),
|
|
195
195
|
align: "center"
|
|
196
196
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
m(c(
|
|
197
|
+
default: s((a) => [
|
|
198
|
+
m(c(u.value[a.$index].key === 0 ? u.value[a.$index].halfI : u.value[a.$index].hourI), 1)
|
|
199
199
|
]),
|
|
200
200
|
_: 1
|
|
201
201
|
}, 8, ["label"]),
|
|
202
|
-
(y(!0), D(
|
|
202
|
+
(y(!0), D(N, null, H(b.value, (a) => (y(), D(N, {
|
|
203
203
|
key: a.day
|
|
204
204
|
}, [
|
|
205
|
-
a.day > 15 ? (y(),
|
|
205
|
+
a.day > 15 ? (y(), $(t(r), {
|
|
206
206
|
key: 0,
|
|
207
207
|
width: "30",
|
|
208
208
|
"class-name": a.holidays,
|
|
@@ -210,86 +210,86 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
210
210
|
label: a.day.toString() + `
|
|
211
211
|
` + a.weekday
|
|
212
212
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
P("div",
|
|
213
|
+
default: s((n) => [
|
|
214
|
+
P("div", le, c(O(a.day, n.$index) || " "), 1)
|
|
215
215
|
]),
|
|
216
216
|
_: 2
|
|
217
217
|
}, 1032, ["class-name", "label"])) : E("", !0)
|
|
218
218
|
], 64))), 128)),
|
|
219
|
-
d(
|
|
220
|
-
label:
|
|
219
|
+
d(t(r), {
|
|
220
|
+
label: t(i)("sheet.halfMonth", { half: "II" }),
|
|
221
221
|
align: "center"
|
|
222
222
|
}, {
|
|
223
|
-
default:
|
|
224
|
-
m(c(
|
|
223
|
+
default: s((a) => [
|
|
224
|
+
m(c(u.value[a.$index].key === 0 ? u.value[a.$index].halfII : u.value[a.$index].hourII), 1)
|
|
225
225
|
]),
|
|
226
226
|
_: 1
|
|
227
227
|
}, 8, ["label"])
|
|
228
228
|
]),
|
|
229
229
|
_: 1
|
|
230
230
|
}, 8, ["label"]),
|
|
231
|
-
d(
|
|
232
|
-
label:
|
|
231
|
+
d(t(r), {
|
|
232
|
+
label: t(i)("sheet.workedMonth"),
|
|
233
233
|
align: "center"
|
|
234
234
|
}, {
|
|
235
|
-
default:
|
|
236
|
-
d(
|
|
237
|
-
label:
|
|
235
|
+
default: s(() => [
|
|
236
|
+
d(t(r), {
|
|
237
|
+
label: t(i)("sheet.days"),
|
|
238
238
|
align: "center",
|
|
239
239
|
"label-class-name": "turn",
|
|
240
|
-
width: "
|
|
240
|
+
width: "34"
|
|
241
241
|
}, {
|
|
242
|
-
default:
|
|
243
|
-
m(c(
|
|
242
|
+
default: s((a) => [
|
|
243
|
+
m(c(u.value[a.$index].contDays), 1)
|
|
244
244
|
]),
|
|
245
245
|
_: 1
|
|
246
246
|
}, 8, ["label"]),
|
|
247
|
-
d(
|
|
248
|
-
label:
|
|
247
|
+
d(t(r), {
|
|
248
|
+
label: t(i)("sheet.hours"),
|
|
249
249
|
align: "center"
|
|
250
250
|
}, {
|
|
251
|
-
default:
|
|
252
|
-
d(
|
|
253
|
-
label:
|
|
251
|
+
default: s(() => [
|
|
252
|
+
d(t(r), {
|
|
253
|
+
label: t(i)("sheet.all"),
|
|
254
254
|
align: "center",
|
|
255
255
|
"label-class-name": "turn",
|
|
256
|
-
width: "
|
|
256
|
+
width: "40"
|
|
257
257
|
}, {
|
|
258
|
-
default:
|
|
259
|
-
m(c(
|
|
258
|
+
default: s((a) => [
|
|
259
|
+
m(c(u.value[a.$index].contHour), 1)
|
|
260
260
|
]),
|
|
261
261
|
_: 1
|
|
262
262
|
}, 8, ["label"]),
|
|
263
|
-
d(
|
|
264
|
-
label:
|
|
263
|
+
d(t(r), {
|
|
264
|
+
label: t(i)("sheet.overtime"),
|
|
265
265
|
align: "center",
|
|
266
266
|
"label-class-name": "turn",
|
|
267
|
-
width: "
|
|
267
|
+
width: "34"
|
|
268
268
|
}, {
|
|
269
|
-
default:
|
|
270
|
-
m(c(
|
|
269
|
+
default: s((a) => [
|
|
270
|
+
m(c(u.value[a.$index].overtime), 1)
|
|
271
271
|
]),
|
|
272
272
|
_: 1
|
|
273
273
|
}, 8, ["label"]),
|
|
274
|
-
d(
|
|
275
|
-
label:
|
|
274
|
+
d(t(r), {
|
|
275
|
+
label: t(i)("sheet.night"),
|
|
276
276
|
align: "center",
|
|
277
277
|
"label-class-name": "turn",
|
|
278
|
-
width: "
|
|
278
|
+
width: "34"
|
|
279
279
|
}, {
|
|
280
|
-
default:
|
|
281
|
-
m(c(
|
|
280
|
+
default: s((a) => [
|
|
281
|
+
m(c(u.value[a.$index].night), 1)
|
|
282
282
|
]),
|
|
283
283
|
_: 1
|
|
284
284
|
}, 8, ["label"]),
|
|
285
|
-
d(
|
|
286
|
-
label:
|
|
285
|
+
d(t(r), {
|
|
286
|
+
label: t(i)("sheet.weekend"),
|
|
287
287
|
align: "center",
|
|
288
288
|
"label-class-name": "turn",
|
|
289
|
-
width: "
|
|
289
|
+
width: "34"
|
|
290
290
|
}, {
|
|
291
|
-
default:
|
|
292
|
-
m(c(
|
|
291
|
+
default: s((a) => [
|
|
292
|
+
m(c(u.value[a.$index].weekend), 1)
|
|
293
293
|
]),
|
|
294
294
|
_: 1
|
|
295
295
|
}, 8, ["label"])
|
|
@@ -299,51 +299,57 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
299
299
|
]),
|
|
300
300
|
_: 1
|
|
301
301
|
}, 8, ["label"]),
|
|
302
|
-
d(
|
|
303
|
-
label:
|
|
302
|
+
d(t(r), {
|
|
303
|
+
label: t(i)("sheet.numberNonAppearing"),
|
|
304
304
|
align: "center"
|
|
305
305
|
}, {
|
|
306
|
-
default:
|
|
307
|
-
m(c(
|
|
306
|
+
default: s((a) => [
|
|
307
|
+
m(c(u.value[a.$index].numberNonAppearing), 1)
|
|
308
308
|
]),
|
|
309
309
|
_: 1
|
|
310
310
|
}, 8, ["label"]),
|
|
311
|
-
d(
|
|
312
|
-
label:
|
|
311
|
+
d(t(r), {
|
|
312
|
+
label: t(i)("sheet.them"),
|
|
313
313
|
align: "center"
|
|
314
314
|
}, {
|
|
315
|
-
default:
|
|
316
|
-
d(
|
|
317
|
-
label:
|
|
315
|
+
default: s(() => [
|
|
316
|
+
d(t(r), {
|
|
317
|
+
label: t(i)("sheet.code"),
|
|
318
318
|
align: "center",
|
|
319
319
|
"label-class-name": "turn",
|
|
320
320
|
width: "30"
|
|
321
321
|
}, {
|
|
322
|
-
default:
|
|
323
|
-
|
|
324
|
-
|
|
322
|
+
default: s((a) => {
|
|
323
|
+
var n;
|
|
324
|
+
return [
|
|
325
|
+
m(c((n = u.value[a.$index].appearing) == null ? void 0 : n.code), 1)
|
|
326
|
+
];
|
|
327
|
+
}),
|
|
325
328
|
_: 1
|
|
326
329
|
}, 8, ["label"]),
|
|
327
|
-
d(
|
|
328
|
-
label:
|
|
330
|
+
d(t(r), {
|
|
331
|
+
label: t(i)("sheet.count"),
|
|
329
332
|
align: "center",
|
|
330
333
|
"label-class-name": "turn",
|
|
331
334
|
width: "30"
|
|
332
335
|
}, {
|
|
333
|
-
default:
|
|
334
|
-
|
|
335
|
-
|
|
336
|
+
default: s((a) => {
|
|
337
|
+
var n;
|
|
338
|
+
return [
|
|
339
|
+
m(c((n = u.value[a.$index].appearing) == null ? void 0 : n.countH), 1)
|
|
340
|
+
];
|
|
341
|
+
}),
|
|
336
342
|
_: 1
|
|
337
343
|
}, 8, ["label"])
|
|
338
344
|
]),
|
|
339
345
|
_: 1
|
|
340
346
|
}, 8, ["label"]),
|
|
341
|
-
d(
|
|
342
|
-
label:
|
|
347
|
+
d(t(r), {
|
|
348
|
+
label: t(i)("sheet.countWeekend"),
|
|
343
349
|
align: "center"
|
|
344
350
|
}, {
|
|
345
|
-
default:
|
|
346
|
-
m(c(
|
|
351
|
+
default: s((a) => [
|
|
352
|
+
m(c(u.value[a.$index].weekendDays), 1)
|
|
347
353
|
]),
|
|
348
354
|
_: 1
|
|
349
355
|
}, 8, ["label"])
|