@studio-west/employees 0.6.24 → 0.6.26
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 +605 -332
- package/dist/WorkTable.cjs +4 -4
- package/dist/WorkTable.js +117 -117
- package/dist/employees.css +1 -1
- package/package.json +1 -1
package/dist/SheetTable.js
CHANGED
|
@@ -1,383 +1,656 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { p as
|
|
4
|
-
import { ElSelect as
|
|
5
|
-
|
|
1
|
+
import { ref as p, computed as me, watch as q, resolveComponent as xe, resolveDirective as Ie, createElementBlock as R, openBlock as $, Fragment as Z, createElementVNode as V, createVNode as m, withDirectives as Se, createBlock as A, createCommentVNode as B, unref as u, withCtx as g, renderList as de, createTextVNode as x, toDisplayString as b } from "vue";
|
|
2
|
+
import { useI18n as Ne } from "vue-i18n";
|
|
3
|
+
import { p as W, b as Me, a as ye, h as _e, c as Ee, d as y } from "./index-2Mx6IUGl.js";
|
|
4
|
+
import { ElSelect as Te, ElOption as Ae, ElSwitch as Ye, ElTable as Ve, ElTableColumn as C, ElButton as te } from "element-plus";
|
|
5
|
+
import { ContextMenu as Be, ContextMenuItem as J, ContextMenuSeparator as Fe, ContextMenuGroup as We } from "@imengyu/vue3-context-menu";
|
|
6
|
+
import { saveAs as Ue } from "file-saver";
|
|
7
|
+
import * as He from "exceljs";
|
|
8
|
+
const Oe = { class: "nav" }, Re = { style: { height: "20px", width: "100%", display: "inline-block" } }, ze = { style: { height: "20px", width: "100%", display: "inline-block" } }, Pe = {
|
|
9
|
+
key: 0,
|
|
10
|
+
style: { padding: "0 1rem .5rem" }
|
|
11
|
+
}, je = {
|
|
12
|
+
key: 1,
|
|
13
|
+
style: { padding: "0 1rem .5rem" }
|
|
14
|
+
}, Ze = {
|
|
6
15
|
__name: "SheetTable",
|
|
7
16
|
props: {
|
|
8
17
|
checkEdit: { type: Boolean, default: () => !0 },
|
|
9
18
|
odata: Object,
|
|
10
19
|
workSchedule: Object,
|
|
11
|
-
fullName: { type: String, default: "Вы" }
|
|
20
|
+
fullName: { type: String, default: "Вы" },
|
|
21
|
+
group: String,
|
|
22
|
+
date: String
|
|
12
23
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
setup(ne) {
|
|
25
|
+
const S = ne, { t: d, d: Q } = Ne(), ee = p(!1), D = p([]), K = p("0"), w = p(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(K.value))), s = p([]), E = p("all"), ue = p([{ value: "all", label: "Все", key: "all" }]), fe = p([
|
|
26
|
+
{ value: "Я", label: d("sheet.valid.1") },
|
|
27
|
+
{ value: "К", label: d("sheet.valid.2") },
|
|
28
|
+
{ value: "ОТ", label: d("sheet.valid.3") },
|
|
29
|
+
{ value: "ДО", label: d("sheet.valid.4") },
|
|
30
|
+
{ value: "Р", label: d("sheet.valid.5") },
|
|
31
|
+
{ value: "ОЖ", label: d("sheet.valid.6") },
|
|
32
|
+
{ value: "Б", label: d("sheet.valid.7") },
|
|
33
|
+
{ value: "НН", label: d("sheet.valid.8") },
|
|
34
|
+
{ value: "ПР", label: d("sheet.valid.9") },
|
|
35
|
+
{ value: "У", label: d("sheet.valid.10") },
|
|
36
|
+
{ value: "УД", label: d("sheet.valid.11") },
|
|
37
|
+
{ value: "Г", label: d("sheet.valid.12") }
|
|
38
|
+
]), ie = p([]), pe = p(0), N = p(9), I = p(8), Y = p(0), L = p(0), z = p([]), P = p(!1), oe = p([]), G = p([]), U = p(!1), X = p(1), se = p({
|
|
39
|
+
zIndex: 3,
|
|
40
|
+
minWidth: 230,
|
|
41
|
+
x: 500,
|
|
42
|
+
y: 200
|
|
43
|
+
}), v = p({ name: "", length: 0, code: "" }), M = p([
|
|
44
|
+
// {code: '00ЗК-00336',
|
|
45
|
+
// days:[
|
|
46
|
+
// {
|
|
47
|
+
// day: '2025-09-07',
|
|
48
|
+
// state: 'РВ',
|
|
49
|
+
// time: 8
|
|
50
|
+
// }
|
|
51
|
+
// ]
|
|
52
|
+
// }
|
|
53
|
+
]), f = me(() => D.value.flatMap((a, e) => {
|
|
54
|
+
const i = M.value.find((l) => l.code === a.code), o = /* @__PURE__ */ new Map();
|
|
55
|
+
a.days.forEach((l) => o.set(l.day, { ...l })), i && i.days.forEach((l) => o.set(l.day, { ...l }));
|
|
56
|
+
const t = Array.from(o.values());
|
|
57
|
+
return [{ ...a, days: t, key: 0, ids: e, numberNonAppearing: [0, 0] }, { ...a, days: t, key: 1, ids: e, numberNonAppearing: [0, 0] }];
|
|
58
|
+
}));
|
|
59
|
+
q(E, async (a, e) => {
|
|
60
|
+
a !== e && (z.value = [], confirm.value = !1, S.odata.personal.forEach((i) => {
|
|
61
|
+
i.divisionName === a && (z.value.some((o) => (o == null ? void 0 : o.activeText) === i.roleName) || z.value.push({ val: !0, activeText: i.roleName }));
|
|
62
|
+
}), we());
|
|
63
|
+
}), q(K, (a) => {
|
|
64
|
+
w.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(a)), ve();
|
|
65
|
+
}), q(I, () => {
|
|
66
|
+
P.value = U.value;
|
|
67
|
+
}), q(N, () => {
|
|
68
|
+
P.value = U.value;
|
|
69
|
+
}), q(X, () => {
|
|
70
|
+
P.value = U.value;
|
|
21
71
|
});
|
|
22
|
-
const
|
|
23
|
-
if (e.
|
|
24
|
-
|
|
72
|
+
const be = (a, e, i, o) => {
|
|
73
|
+
if (e.level !== 3 || e.labelClassName === "turn" || e.no === 15 || e.no > s.value.length || !S.checkEdit) return "";
|
|
74
|
+
v.value.ids = a.ids, v.value.key = a.key, v.value.day = e.no < 15 ? e.no : e.no - 1;
|
|
75
|
+
const t = new Date(w.value), l = `${t.getFullYear()}-${(t.getMonth() + 1).toString().padStart(2, "0")}-${(v.value.day + 1).toString().padStart(2, "0")}`, r = M.value.findIndex((c) => c.code === a.code);
|
|
76
|
+
v.value.id = r !== -1 ? M.value[r].days.findIndex((c) => (c == null ? void 0 : c.day) === l) : r, v.value.rest = r !== -1 && v.value.id !== -1, N.value = typeof a.days[v.value.day].tips > "u" ? 9 : parseInt(a.days[v.value.day].tips.match(/(\d{1,2})/)), Y.value = typeof a.days[v.value.day].night > "u" ? 0 : parseInt(a.days[v.value.day].night), L.value = typeof a.days[v.value.day].overtime > "u" ? 0 : parseInt(a.days[v.value.day].overtime), I.value = a.days[v.value.day].time !== "-" ? parseInt(a.days[v.value.day].time + Y.value + L.value) : 8;
|
|
77
|
+
const h = a.days.findIndex((c) => c.day === l);
|
|
78
|
+
v.value.failure = a.days[h].state, se.value.y = o.clientY, se.value.x = o.clientX, v.value.name = d("sheet.choiceOfMode"), U.value = !0, P.value = !1;
|
|
79
|
+
}, le = (a) => {
|
|
80
|
+
const e = new Date(w.value), i = `${e.getFullYear()}-${(e.getMonth() + 1).toString().padStart(2, "0")}-${(v.value.day + 1).toString().padStart(2, "0")}`;
|
|
81
|
+
let o = M.value.findIndex((k) => k.code === D.value[v.value.ids].code), t = D.value[v.value.ids].days[v.value.day].state, l = a, r = "-", h, c, _;
|
|
82
|
+
switch (a) {
|
|
83
|
+
case "Я":
|
|
84
|
+
t === "В" && (l = "РВ"), r = 8;
|
|
85
|
+
break;
|
|
86
|
+
case "КВ":
|
|
87
|
+
case "К":
|
|
88
|
+
t === "В" || t === "КВ" ? l = "КВ" : l = "К";
|
|
89
|
+
break;
|
|
90
|
+
case "save":
|
|
91
|
+
let k = re.value.split('"');
|
|
92
|
+
if (l = k[1], P.value = !1, /^(|К|КВ|ОТ|Б|Р|ОЖ|НН|У|ДО|УД|Г)$/.test(k[1])) break;
|
|
93
|
+
r = I.value - Y.value - L.value, _ = "(" + k[2].split("(")[1], h = Y.value, c = L.value;
|
|
94
|
+
}
|
|
95
|
+
a === "reset" ? (l = t, M.value[o].days.splice(v.value.id, 1)) : o === -1 ? M.value.push({ code: D.value[v.value.ids].code, days: [{ day: i, state: l, time: r, night: h, overtime: c, tips: _ }] }) : v.value.id === -1 ? M.value[o].days.push({ day: i, state: l, time: r, night: h, overtime: c, tips: _ }) : M.value[o].days[v.value.id] = { day: i, state: l, time: r, night: h, overtime: c, tips: _ }, S.workSchedule.addWorkSheet({
|
|
96
|
+
group: E.value,
|
|
97
|
+
date: W(new Date(w.value), "{Y}-{m}-{dd}"),
|
|
98
|
+
data: [{
|
|
99
|
+
name: D.value[v.value.ids].fio,
|
|
100
|
+
days: M.value[o].days,
|
|
101
|
+
code: D.value[v.value.ids].code
|
|
102
|
+
}]
|
|
103
|
+
}), v.value.failure = l, X.value > 1 && (X.value--, v.value.day++, v.value.id = o !== -1 ? M.value[o].days.findIndex((k) => (k == null ? void 0 : k.day) === `${e.getFullYear()}-${(e.getMonth() + 1).toString().padStart(2, "0")}-${(v.value.day + 1).toString().padStart(2, "0")}`) : o, le(v.value.failure)), he();
|
|
104
|
+
}, re = me(() => {
|
|
105
|
+
let a = D.value[v.value.ids].days[v.value.day], e = "", i = I.value >= 22 ? N.value + I.value + 2 : N.value + I.value + 1, o = v.value.failure.split("/")[0];
|
|
106
|
+
o = /^Н(?!Н$)С?$/.test(o) ? a.state !== "В" ? "Я" : "РВ" : o, (N.value < 6 || i > 22) && (e = "Н", Y.value = N.value < 6 ? Math.min(6, i) - N.value : 0, i <= 6 && (Y.value = I.value, o = ""), i === 7 && Y.value > 3 && Y.value--, Y.value += Math.max(22, i) - 22), I.value > a.time && o !== "РВ" && (e += "С", L.value = I.value - a.time), e.length > 0 && o.length > 0 && (e = "/" + e);
|
|
107
|
+
let t = typeof (a == null ? void 0 : a.tips) < "u" ? a.tips : `(${N.value}:00 - ${I.value >= 22 ? N.value + I.value + 2 : N.value + I.value + 1}:00)`, l = f.value[v.value.ids * 2].days[v.value.day].time !== "-" ? " " + I.value + " " + t : "";
|
|
108
|
+
return '"' + o + e + '"' + l;
|
|
109
|
+
}), Ce = (a) => {
|
|
110
|
+
if (a.columnIndex < 2 || a.columnIndex > s.value.length + 3 && a.columnIndex < s.value.length + 9 || a.columnIndex > s.value.length + 11)
|
|
111
|
+
return f.value[a.rowIndex].key === 0 ? {
|
|
25
112
|
rowspan: 2,
|
|
26
113
|
colspan: 1
|
|
27
114
|
} : {
|
|
28
115
|
rowspan: 0,
|
|
29
116
|
colspan: 0
|
|
30
117
|
};
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
for (let
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
let h =
|
|
38
|
-
|
|
118
|
+
}, ve = () => {
|
|
119
|
+
const a = ie.value, e = new Date(w.value), i = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
|
|
120
|
+
let o = [], t = 0;
|
|
121
|
+
for (let l = 1; l <= i; l++) {
|
|
122
|
+
const r = W(e.setDate(l), "{Y}-{m}-{dd}");
|
|
123
|
+
t += a.nowork.includes(r) || a.holidays.includes(r) ? 0 : a.preholidays.includes(r) ? 7 : 8;
|
|
124
|
+
let h = a.nowork.includes(r) ? "nowork" : a.holidays.includes(r) ? "holiday" : a.preholidays.includes(r) ? "preholiday" : "";
|
|
125
|
+
o.push({ day: l, holidays: h, weekday: Q(new Date(e.getFullYear(), e.getMonth(), l), "day") });
|
|
39
126
|
}
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
127
|
+
pe.value = t, s.value = o, S.odata.getPersonal({}).then((l) => {
|
|
128
|
+
var r;
|
|
129
|
+
E.value = (r = l.find((h) => h.employeeName === S.fullName)) == null ? void 0 : r.divisionName, l.forEach((h) => {
|
|
130
|
+
ue.value.some((c) => (c == null ? void 0 : c.value) === h.divisionName) || ue.value.push({ value: h.divisionName, label: h.divisionName, key: h.divisionName }), h.divisionName === E.value && !z.value.some((c) => (c == null ? void 0 : c.activeText) === h.roleName) && z.value.push({ val: !0, activeText: h.roleName });
|
|
131
|
+
});
|
|
45
132
|
});
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
let
|
|
50
|
-
|
|
133
|
+
}, we = () => {
|
|
134
|
+
D.value = [], G.value = [], oe.value = [], S.odata.personal.forEach((a) => {
|
|
135
|
+
if (a.divisionName === E.value && z.value.some((e) => e.val && e.activeText === a.roleName)) {
|
|
136
|
+
let e = Me(a.employeeName);
|
|
137
|
+
G.value.push(a.employeeKey), D.value.push({ fio: a.employeeName, name: e + " (" + a.roleName + ")", code: a.employeeKey, days: [], contHour: 0, id: !1, ids: D.value.length });
|
|
51
138
|
}
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}),
|
|
139
|
+
}), S.workSchedule.getUsersYear({ code: G.value, year: new Date(w.value).getFullYear() }).then((a) => {
|
|
140
|
+
a.forEach((e) => {
|
|
141
|
+
e.dateStart && oe.value.push({ code: e.code, dateStart: e.dateStart, dateEnd: e.dateEnd });
|
|
142
|
+
}), De();
|
|
56
143
|
});
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
144
|
+
}, De = () => {
|
|
145
|
+
S.workSchedule.getWorkSheet({ code: G.value, date: W(new Date(w.value), "{Y}-{m}-{dd}") }).then(
|
|
146
|
+
(a) => {
|
|
147
|
+
M.value = [], a.forEach((e) => {
|
|
148
|
+
e !== null && M.value.push({ code: e.code, days: e.data.days });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
), S.workSchedule.getWorkSchedule({ code: G.value, date: W(new Date(w.value), "{Y}-{m}-{dd}") }).then(
|
|
152
|
+
(a) => {
|
|
153
|
+
a.forEach((e, i) => {
|
|
154
|
+
var o, t;
|
|
155
|
+
if (D.value[i].days = [], e !== null) {
|
|
156
|
+
e.data.days.forEach((l) => l.state = "Я");
|
|
157
|
+
for (let l = 1; l <= s.value.length; l++) {
|
|
158
|
+
let r = W(new Date(w.value).setDate(l), "{Y}-{m}-{dd}");
|
|
159
|
+
const h = (o = e.data) == null ? void 0 : o.days.findIndex((c) => c.day === r);
|
|
160
|
+
h === -1 ? ae(l, i, "-", "В") : D.value[i].days.push((t = e.data) == null ? void 0 : t.days[h]);
|
|
72
161
|
}
|
|
73
|
-
} else
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const { dateStart: g, dateEnd: z, code: Z } = h;
|
|
86
|
-
if (g && z && Z === l.code) {
|
|
87
|
-
const Q = new Date(q(g)).getTime(), ee = new Date(q(z)).getTime();
|
|
88
|
-
if (c >= Q && c <= ee) {
|
|
89
|
-
const C = $(new Date(f.value).setDate(n), "{Y}-{m}-{dd}"), J = m.value[a].days.findIndex((ae) => ae.day === C);
|
|
90
|
-
J !== -1 ? m.value[a].days[J] = { day: C, time: "-", state: "О" } : m.value[a].days.push({ day: C, time: "-", state: "О" });
|
|
162
|
+
} else
|
|
163
|
+
for (let l = 1; l <= s.value.length; l++)
|
|
164
|
+
s.value[l - 1].holidays === "" ? ae(l, i, 8) : s.value[l - 1].holidays === "preholiday" ? ae(l, i, 7) : ae(l, i, "-", "В");
|
|
165
|
+
for (let l = 1; l <= s.value.length; l++) {
|
|
166
|
+
let r = new Date(new Date(w.value).getFullYear(), new Date(w.value).getMonth(), l).getTime() + 1e3;
|
|
167
|
+
for (let h of oe.value) {
|
|
168
|
+
const { dateStart: c, dateEnd: _, code: k } = h;
|
|
169
|
+
if (c && _ && k === D.value[i].code) {
|
|
170
|
+
const H = new Date(ye(c)).getTime(), O = new Date(ye(_)).getTime();
|
|
171
|
+
if (r >= H && r <= O) {
|
|
172
|
+
const F = W(new Date(w.value).setDate(l), "{Y}-{m}-{dd}"), n = D.value[i].days.findIndex((j) => j.day === F);
|
|
173
|
+
n !== -1 ? D.value[i].days[n] = { day: F, time: "-", state: "ОТ" } : D.value[i].days.push({ day: F, time: "-", state: "ОТ" });
|
|
91
174
|
}
|
|
92
175
|
}
|
|
93
176
|
}
|
|
94
177
|
}
|
|
95
|
-
}),
|
|
178
|
+
}), he();
|
|
96
179
|
}
|
|
97
180
|
);
|
|
98
|
-
},
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
day:
|
|
102
|
-
time:
|
|
103
|
-
state:
|
|
181
|
+
}, ae = (a, e, i, o = "Я") => {
|
|
182
|
+
const t = W(new Date(w.value).setDate(a), "{Y}-{m}-{dd}");
|
|
183
|
+
D.value[e].days.push({
|
|
184
|
+
day: t,
|
|
185
|
+
time: i,
|
|
186
|
+
state: o
|
|
104
187
|
});
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
for (let l = 0; l < e.days.length; l++)
|
|
109
|
-
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++;
|
|
110
|
-
e.contDays = e.halfI + e.halfII, e.contHour = e.hourI + e.hourII, e.overtime = 0, F.value < e.contHour && (e.overtime = e.contHour - F.value), e.numberNonAppearing = 0, e.appearing = {
|
|
188
|
+
}, he = () => {
|
|
189
|
+
f.value.forEach((a) => {
|
|
190
|
+
a.hourI = 0, a.hourII = 0, a.halfII = 0, a.halfI = 0, a.weekend = 0, a.weekendDays = 0, a.overtime = 0, a.night = 0, a.appearing = {
|
|
111
191
|
code: "-",
|
|
112
|
-
|
|
192
|
+
count: "-"
|
|
113
193
|
};
|
|
194
|
+
const e = Object.entries(
|
|
195
|
+
a.days.reduce((l, r) => {
|
|
196
|
+
if (r.hasOwnProperty("state") && /^(|К|КВ|ОТ|Б|Р|ПР|ОЖ|НН|У|ДО|УД|Г)$/.test(r.state)) {
|
|
197
|
+
const h = r.state;
|
|
198
|
+
l[h] = (l[h] || 0) + 1;
|
|
199
|
+
}
|
|
200
|
+
return l;
|
|
201
|
+
}, {})
|
|
202
|
+
).map(([l, r]) => ({ code: l, count: r }));
|
|
203
|
+
a.numberNonAppearing = [e.reduce((l, r) => l + r.count, 0), 0];
|
|
204
|
+
const i = Math.ceil(e.length / 2), o = e.slice(0, i), t = e.slice(i);
|
|
205
|
+
a.key === 0 && o.length > 0 && (a.appearing = {
|
|
206
|
+
code: o.map((l) => l.code).join("/"),
|
|
207
|
+
count: o.map((l) => l.count).join("/")
|
|
208
|
+
}), a.key === 1 && t.length > 0 && (a.appearing = {
|
|
209
|
+
code: t.map((l) => l.code).join("/"),
|
|
210
|
+
count: t.map((l) => l.count).join("/")
|
|
211
|
+
});
|
|
212
|
+
for (let l = 0; l < a.days.length; l++)
|
|
213
|
+
l < 15 && a.days[l].time !== "-" && (a.hourI += Number(a.days[l].time), a.days[l].night && (a.hourI += Number(a.days[l].night)), a.days[l].overtime && (a.hourI += Number(a.days[l].overtime)), a.halfI++), l >= 15 && a.days[l].time !== "-" && (a.days[l].night && (a.hourII += Number(a.days[l].night)), a.days[l].overtime && (a.hourII += Number(a.days[l].overtime)), a.hourII += Number(a.days[l].time), a.halfII++), a.days[l].night && (a.night += Number(a.days[l].night)), a.days[l].overtime && (a.overtime += Number(a.days[l].overtime)), /{|РВ|}/.test(a.days[l].state) && (a.weekend += Number(a.days[l].time)), a.days[l].state === "В" && a.weekendDays++;
|
|
214
|
+
a.contDays = a.halfI + a.halfII, a.contHour = a.hourI + a.hourII;
|
|
114
215
|
});
|
|
115
|
-
},
|
|
116
|
-
var
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
119
|
-
|
|
216
|
+
}, ge = (a, e) => {
|
|
217
|
+
var h, c, _, k, H, O;
|
|
218
|
+
if (e === -1) return "";
|
|
219
|
+
const i = f.value[e], o = new Date(w.value), t = `${o.getFullYear()}-${(o.getMonth() + 1).toString().padStart(2, "0")}-${a.toString().padStart(2, "0")}`, l = i.days.findIndex((F) => F.day === t);
|
|
220
|
+
let r = 0;
|
|
221
|
+
return (h = i.days[l]) != null && h.night && (r += i.days[l].night), (c = i.days[l]) != null && c.overtime && (r += i.days[l].overtime), l === -1 ? "" : i.key === 0 ? (_ = i.days[l]) == null ? void 0 : _.state : ((k = i.days[l]) == null ? void 0 : k.time) === 0 ? r === 0 ? "-" : r : r === 0 ? (H = i.days[l]) == null ? void 0 : H.time : `${(O = i.days[l]) == null ? void 0 : O.time}/${r}`;
|
|
120
222
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
]
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
border
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
223
|
+
S.group && (E.value = S.group), S.date && (K.value = (/* @__PURE__ */ new Date(S.date + "T00:00:01")).getMonth()), _e().then((a) => {
|
|
224
|
+
ie.value = a, ve();
|
|
225
|
+
});
|
|
226
|
+
const ce = (a) => new Date(w.value).getMonth() === (/* @__PURE__ */ new Date()).getMonth() && a === (/* @__PURE__ */ new Date()).getDate() ? " today" : "", ke = async () => {
|
|
227
|
+
var k, H, O, F;
|
|
228
|
+
ee.value = !0;
|
|
229
|
+
const a = new He.Workbook(), e = a.addWorksheet(Q(w.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), i = { vertical: "middle", horizontal: "center" }, o = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, t = { vertical: "middle", horizontal: "center", wrapText: !0 };
|
|
230
|
+
e.mergeCells(`A1:${y("A1", s.value.length + 15)}1`), e.mergeCells("A2:A4"), e.mergeCells("B2:B4"), e.mergeCells("C2:C4"), e.mergeCells("D5:R5"), e.mergeCells(`D2:${y("D2", s.value.length + 2)}2`), e.mergeCells(`${y("D2", s.value.length + 3)}2:${y("D2", s.value.length + 8)}2`), e.mergeCells(`${y("D2", s.value.length + 9)}2:${y("D2", s.value.length + 9)}4`), e.mergeCells(`${y("D2", s.value.length + 10)}2:${y("D2", s.value.length + 11)}2`), e.mergeCells(`${y("D2", s.value.length + 12)}2:${y("D2", s.value.length + 12)}4`), e.mergeCells(`${y("D3", s.value.length + 3)}3:${y("D3", s.value.length + 3)}4`), e.mergeCells(`${y("D3", s.value.length + 4)}3:${y("D3", s.value.length + 8)}3`), e.mergeCells(`${y("D3", s.value.length + 10)}3:${y("D3", s.value.length + 10)}4`), e.mergeCells(`${y("D3", s.value.length + 11)}3:${y("D3", s.value.length + 11)}4`), e.mergeCells(`T5:${y("D5", s.value.length + 1)}5`);
|
|
231
|
+
for (let n = 1; n <= s.value.length + 2; n++)
|
|
232
|
+
e.mergeCells(`${y("D3", n)}3:${y("D4", n)}4`), e.getColumn(n + 3).width = 5, e.getColumn(n + 3).alignment = t, e.getCell(3, n + 3).border = o, n < 16 && (e.getCell(3, n + 3).value = n), n > 16 && (e.getCell(3, n + 3).value = n - 1);
|
|
233
|
+
e.getCell("A1").value = d("sheet.title", { name: E.value }) + Q(w.value, "month"), e.getCell("A2").value = d("sheet.listNumber"), e.getCell("B2").value = d("sheet.employee"), e.getCell("C2").value = d("sheet.personnelNumber"), e.getCell("D2").value = d("sheet.marks"), e.getCell("S3").value = d("sheet.halfMonth", { half: "I" }), e.getCell("A5").value = "1", e.getCell("B5").value = "2", e.getCell("C5").value = "3", e.getCell("D5").value = "4", e.getCell("S5").value = "5", e.getCell("T5").value = "6", e.getCell(5, s.value.length + 5).value = "7", e.getCell(2, s.value.length + 6).value = d("sheet.workedMonth"), e.getCell(2, s.value.length + 12).value = d("sheet.numberNonAppearing"), e.getCell(2, s.value.length + 13).value = d("sheet.them"), e.getCell(2, s.value.length + 15).value = d("sheet.countWeekend"), e.getCell(3, s.value.length + 5).value = d("sheet.halfMonth", { half: "II" }), e.getCell(3, s.value.length + 6).value = d("sheet.days"), e.getCell(3, s.value.length + 7).value = d("sheet.hours"), e.getCell(4, s.value.length + 7).value = d("sheet.all"), e.getCell(4, s.value.length + 8).value = d("sheet.overtime"), e.getCell(4, s.value.length + 9).value = d("sheet.night"), e.getCell(4, s.value.length + 10).value = d("sheet.weekend"), e.getCell(4, s.value.length + 13).value = d("sheet.code"), e.getCell(4, s.value.length + 14).value = d("sheet.count"), e.getRow(1).height = 40, e.getRow(2).height = 32, e.getRow(3).height = 20, e.getRow(4).height = 60, e.getColumn(1).width = 6, e.getColumn(2).width = 30, e.getColumn(3).width = 17, e.getColumn(19).width = 12, e.getColumn(s.value.length + 5).width = 12, e.getColumn(s.value.length + 12).width = 11, e.getColumn(s.value.length + 15).width = 11, e.getCell("A1").alignment = i, e.getColumn(1).alignment = t, e.getColumn(2).alignment = t, e.getColumn(3).alignment = t;
|
|
234
|
+
for (let n = 6; n <= 15; n++)
|
|
235
|
+
e.getCell(5, s.value.length + n).value = n + 2, e.getColumn(s.value.length + n).alignment = t, e.getCell(4, s.value.length + n).border = o, e.getCell(5, s.value.length + n).border = o;
|
|
236
|
+
e.getCell("A2").border = o, e.getCell("B2").border = o, e.getCell("C2").border = o, e.getCell("D2").border = o, e.getCell("D2").border = o, e.getCell("A5").border = o, e.getCell("B5").border = o, e.getCell("C5").border = o, e.getCell("D5").border = o, e.getCell("S5").border = o, e.getCell("T5").border = o, e.getCell(2, s.value.length + 6).border = o, e.getCell(2, s.value.length + 12).border = o, e.getCell(2, s.value.length + 13).border = o, e.getCell(2, s.value.length + 15).border = o, e.getCell(3, s.value.length + 7).border = o;
|
|
237
|
+
let l = 1, r = 5, h = !0;
|
|
238
|
+
for (const n of f.value) {
|
|
239
|
+
let j = [l, n.name, n.code];
|
|
240
|
+
for (let T = 0; T < s.value.length; T++)
|
|
241
|
+
T === 15 && j.push(h ? (n == null ? void 0 : n.halfI) || "" : (n == null ? void 0 : n.hourI) || ""), j.push(h ? ((k = n.days[T]) == null ? void 0 : k.state) || "" : ((H = n.days[T]) == null ? void 0 : H.time) || "");
|
|
242
|
+
j.push(
|
|
243
|
+
h ? (n == null ? void 0 : n.halfII) || 0 : (n == null ? void 0 : n.hourII) || 0,
|
|
244
|
+
(n == null ? void 0 : n.contDays) || 0,
|
|
245
|
+
(n == null ? void 0 : n.contHour) || 0,
|
|
246
|
+
(n == null ? void 0 : n.overtime) || 0,
|
|
247
|
+
(n == null ? void 0 : n.night) || 0,
|
|
248
|
+
(n == null ? void 0 : n.weekend) || 0,
|
|
249
|
+
"",
|
|
250
|
+
h ? (n == null ? void 0 : n.numberNonAppearing[0]) || "" : (n == null ? void 0 : n.numberNonAppearing[1]) || 0,
|
|
251
|
+
((O = n == null ? void 0 : n.appearing) == null ? void 0 : O.code) || "-",
|
|
252
|
+
((F = n == null ? void 0 : n.appearing) == null ? void 0 : F.count) || "-",
|
|
253
|
+
(n == null ? void 0 : n.weekendDays) || 0
|
|
254
|
+
);
|
|
255
|
+
const $e = e.addRow(j);
|
|
256
|
+
if ($e.border = o, !h) {
|
|
257
|
+
e.mergeCells(`A${r + l * 2 - 1}:A${r + l * 2}`), e.mergeCells(`B${r + l * 2 - 1}:B${r + l * 2}`), e.mergeCells(`C${r + l * 2 - 1}:C${r + l * 2}`);
|
|
258
|
+
for (let T = s.value.length + 3; T <= s.value.length + 8; T++)
|
|
259
|
+
e.mergeCells(`${y("D", T)}${r + l * 2 - 1}:${y("D", T)}${r + l * 2}`);
|
|
260
|
+
e.mergeCells(`${y("D", s.value.length + 12)}${r + l * 2 - 1}:${y("D", s.value.length + 12)}${r + l * 2}`), l++;
|
|
261
|
+
}
|
|
262
|
+
h = !h;
|
|
263
|
+
}
|
|
264
|
+
S.odata.personal.forEach((n) => {
|
|
265
|
+
n.roleName === "Начальник отдела правовой и кадровой работы" && n.employeeName;
|
|
266
|
+
});
|
|
267
|
+
const c = "export_" + W(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", _ = await a.xlsx.writeBuffer();
|
|
268
|
+
Ue(new Blob([_]), c), ee.value = !1;
|
|
269
|
+
};
|
|
270
|
+
return (a, e) => {
|
|
271
|
+
const i = xe("el-slider"), o = Ie("loading");
|
|
272
|
+
return $(), R(Z, null, [
|
|
273
|
+
V("div", Oe, [
|
|
274
|
+
ne.checkEdit ? ($(), A(u(Te), {
|
|
275
|
+
key: 0,
|
|
276
|
+
modelValue: E.value,
|
|
277
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => E.value = t),
|
|
278
|
+
placeholder: "Select",
|
|
279
|
+
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
166
280
|
}, {
|
|
167
|
-
default:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
label: t(i)("sheet.halfMonth", { half: "II" }),
|
|
237
|
-
align: "center"
|
|
238
|
-
}, {
|
|
239
|
-
default: s((a) => [
|
|
240
|
-
y(v(o.value[a.$index].key === 0 ? o.value[a.$index].halfII : o.value[a.$index].hourII), 1)
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
}, 8, ["label"])
|
|
244
|
-
]),
|
|
245
|
-
_: 1
|
|
246
|
-
}, 8, ["label"]),
|
|
247
|
-
r(t(d), {
|
|
248
|
-
label: t(i)("sheet.workedMonth"),
|
|
249
|
-
align: "center"
|
|
250
|
-
}, {
|
|
251
|
-
default: s(() => [
|
|
252
|
-
r(t(d), {
|
|
253
|
-
label: t(i)("sheet.days"),
|
|
254
|
-
align: "center",
|
|
255
|
-
"label-class-name": "turn",
|
|
256
|
-
width: "34"
|
|
257
|
-
}, {
|
|
258
|
-
default: s((a) => [
|
|
259
|
-
y(v(o.value[a.$index].contDays), 1)
|
|
260
|
-
]),
|
|
261
|
-
_: 1
|
|
262
|
-
}, 8, ["label"]),
|
|
263
|
-
r(t(d), {
|
|
264
|
-
label: t(i)("sheet.hours"),
|
|
265
|
-
align: "center"
|
|
266
|
-
}, {
|
|
267
|
-
default: s(() => [
|
|
268
|
-
r(t(d), {
|
|
269
|
-
label: t(i)("sheet.all"),
|
|
270
|
-
align: "center",
|
|
271
|
-
"label-class-name": "turn",
|
|
272
|
-
width: "40"
|
|
273
|
-
}, {
|
|
274
|
-
default: s((a) => [
|
|
275
|
-
y(v(o.value[a.$index].contHour), 1)
|
|
276
|
-
]),
|
|
277
|
-
_: 1
|
|
278
|
-
}, 8, ["label"]),
|
|
279
|
-
r(t(d), {
|
|
280
|
-
label: t(i)("sheet.overtime"),
|
|
281
|
+
default: g(() => [
|
|
282
|
+
($(!0), R(Z, null, de(ue.value, (t) => ($(), A(u(Ae), {
|
|
283
|
+
key: t.value,
|
|
284
|
+
label: t.label,
|
|
285
|
+
value: t.value
|
|
286
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
287
|
+
]),
|
|
288
|
+
_: 1
|
|
289
|
+
}, 8, ["modelValue"])) : B("", !0),
|
|
290
|
+
e[9] || (e[9] = V("div", { class: "expander" }, null, -1)),
|
|
291
|
+
ne.checkEdit ? ($(), A(u(Ye), {
|
|
292
|
+
key: 1,
|
|
293
|
+
modelValue: K.value,
|
|
294
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => K.value = t),
|
|
295
|
+
"active-text": u(d)("workSchedule.currentMonth"),
|
|
296
|
+
"active-value": "0",
|
|
297
|
+
"inactive-value": "-1",
|
|
298
|
+
style: { "margin-bottom": ".5rem", "margin-left": ".5rem" }
|
|
299
|
+
}, null, 8, ["modelValue", "active-text"])) : B("", !0)
|
|
300
|
+
]),
|
|
301
|
+
m(u(Ve), {
|
|
302
|
+
id: "printTable",
|
|
303
|
+
data: f.value,
|
|
304
|
+
"span-method": Ce,
|
|
305
|
+
border: "",
|
|
306
|
+
style: { width: "100%" },
|
|
307
|
+
size: "small",
|
|
308
|
+
"empty-text": u(d)("sheet.emptyText"),
|
|
309
|
+
align: "center",
|
|
310
|
+
onCellClick: be
|
|
311
|
+
}, {
|
|
312
|
+
default: g(() => [
|
|
313
|
+
m(u(C), {
|
|
314
|
+
label: u(d)("sheet.title", { name: E.value }) + u(Q)(w.value, "month"),
|
|
315
|
+
align: "center",
|
|
316
|
+
height: "10"
|
|
317
|
+
}, {
|
|
318
|
+
default: g(() => [
|
|
319
|
+
m(u(C), {
|
|
320
|
+
label: u(d)("sheet.employee"),
|
|
321
|
+
width: "180",
|
|
322
|
+
align: "center"
|
|
323
|
+
}, {
|
|
324
|
+
default: g((t) => [
|
|
325
|
+
x(b(f.value[t.$index].name), 1)
|
|
326
|
+
]),
|
|
327
|
+
_: 1
|
|
328
|
+
}, 8, ["label"]),
|
|
329
|
+
m(u(C), {
|
|
330
|
+
label: u(d)("sheet.personnelNumber"),
|
|
331
|
+
align: "center"
|
|
332
|
+
}, {
|
|
333
|
+
default: g((t) => [
|
|
334
|
+
x(b(f.value[t.$index].code), 1)
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
}, 8, ["label"]),
|
|
338
|
+
m(u(C), {
|
|
339
|
+
label: u(d)("sheet.marks"),
|
|
340
|
+
align: "center"
|
|
341
|
+
}, {
|
|
342
|
+
default: g(() => [
|
|
343
|
+
($(!0), R(Z, null, de(s.value, (t) => ($(), R(Z, {
|
|
344
|
+
key: t.day
|
|
345
|
+
}, [
|
|
346
|
+
t.day <= 15 ? ($(), A(u(C), {
|
|
347
|
+
key: 0,
|
|
348
|
+
width: "30",
|
|
349
|
+
"class-name": t.holidays + ce(t.day),
|
|
281
350
|
align: "center",
|
|
282
|
-
|
|
283
|
-
|
|
351
|
+
label: t.day.toString() + `
|
|
352
|
+
` + t.weekday
|
|
284
353
|
}, {
|
|
285
|
-
default:
|
|
286
|
-
|
|
354
|
+
default: g((l) => [
|
|
355
|
+
V("div", Re, b(ge(t.day, l.$index) || " "), 1)
|
|
287
356
|
]),
|
|
288
|
-
_:
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
width: "34"
|
|
357
|
+
_: 2
|
|
358
|
+
}, 1032, ["class-name", "label"])) : B("", !0),
|
|
359
|
+
t.day === 15 ? ($(), A(u(C), {
|
|
360
|
+
key: 1,
|
|
361
|
+
label: u(d)("sheet.halfMonth", { half: "I" }),
|
|
362
|
+
align: "center"
|
|
295
363
|
}, {
|
|
296
|
-
default:
|
|
297
|
-
|
|
364
|
+
default: g((l) => [
|
|
365
|
+
x(b(f.value[l.$index].key === 0 ? f.value[l.$index].halfI : f.value[l.$index].hourI), 1)
|
|
298
366
|
]),
|
|
299
367
|
_: 1
|
|
300
|
-
}, 8, ["label"]),
|
|
301
|
-
|
|
302
|
-
|
|
368
|
+
}, 8, ["label"])) : B("", !0),
|
|
369
|
+
t.day > 15 ? ($(), A(u(C), {
|
|
370
|
+
key: 2,
|
|
371
|
+
width: "30",
|
|
372
|
+
"class-name": t.holidays + ce(t.day),
|
|
303
373
|
align: "center",
|
|
304
|
-
|
|
305
|
-
|
|
374
|
+
label: t.day.toString() + `
|
|
375
|
+
` + t.weekday
|
|
306
376
|
}, {
|
|
307
|
-
default:
|
|
308
|
-
|
|
377
|
+
default: g((l) => [
|
|
378
|
+
V("div", ze, b(ge(t.day, l.$index) || " "), 1)
|
|
309
379
|
]),
|
|
310
|
-
_:
|
|
311
|
-
},
|
|
380
|
+
_: 2
|
|
381
|
+
}, 1032, ["class-name", "label"])) : B("", !0)
|
|
382
|
+
], 64))), 128)),
|
|
383
|
+
m(u(C), {
|
|
384
|
+
label: u(d)("sheet.halfMonth", { half: "II" }),
|
|
385
|
+
align: "center"
|
|
386
|
+
}, {
|
|
387
|
+
default: g((t) => [
|
|
388
|
+
x(b(f.value[t.$index].key === 0 ? f.value[t.$index].halfII : f.value[t.$index].hourII), 1)
|
|
389
|
+
]),
|
|
390
|
+
_: 1
|
|
391
|
+
}, 8, ["label"])
|
|
392
|
+
]),
|
|
393
|
+
_: 1
|
|
394
|
+
}, 8, ["label"]),
|
|
395
|
+
m(u(C), {
|
|
396
|
+
label: u(d)("sheet.workedMonth"),
|
|
397
|
+
align: "center"
|
|
398
|
+
}, {
|
|
399
|
+
default: g(() => [
|
|
400
|
+
m(u(C), {
|
|
401
|
+
label: u(d)("sheet.days"),
|
|
402
|
+
align: "center",
|
|
403
|
+
"label-class-name": "turn",
|
|
404
|
+
width: "34"
|
|
405
|
+
}, {
|
|
406
|
+
default: g((t) => [
|
|
407
|
+
x(b(f.value[t.$index].contDays), 1)
|
|
408
|
+
]),
|
|
409
|
+
_: 1
|
|
410
|
+
}, 8, ["label"]),
|
|
411
|
+
m(u(C), {
|
|
412
|
+
label: u(d)("sheet.hours"),
|
|
413
|
+
align: "center"
|
|
414
|
+
}, {
|
|
415
|
+
default: g(() => [
|
|
416
|
+
m(u(C), {
|
|
417
|
+
label: u(d)("sheet.all"),
|
|
418
|
+
align: "center",
|
|
419
|
+
"label-class-name": "turn",
|
|
420
|
+
width: "40"
|
|
421
|
+
}, {
|
|
422
|
+
default: g((t) => [
|
|
423
|
+
x(b(f.value[t.$index].contHour), 1)
|
|
424
|
+
]),
|
|
425
|
+
_: 1
|
|
426
|
+
}, 8, ["label"]),
|
|
427
|
+
m(u(C), {
|
|
428
|
+
label: u(d)("sheet.overtime"),
|
|
429
|
+
align: "center",
|
|
430
|
+
"label-class-name": "turn",
|
|
431
|
+
width: "34"
|
|
432
|
+
}, {
|
|
433
|
+
default: g((t) => [
|
|
434
|
+
x(b(f.value[t.$index].overtime), 1)
|
|
435
|
+
]),
|
|
436
|
+
_: 1
|
|
437
|
+
}, 8, ["label"]),
|
|
438
|
+
m(u(C), {
|
|
439
|
+
label: u(d)("sheet.night"),
|
|
440
|
+
align: "center",
|
|
441
|
+
"label-class-name": "turn",
|
|
442
|
+
width: "34"
|
|
443
|
+
}, {
|
|
444
|
+
default: g((t) => [
|
|
445
|
+
x(b(f.value[t.$index].night), 1)
|
|
446
|
+
]),
|
|
447
|
+
_: 1
|
|
448
|
+
}, 8, ["label"]),
|
|
449
|
+
m(u(C), {
|
|
450
|
+
label: u(d)("sheet.weekend"),
|
|
451
|
+
align: "center",
|
|
452
|
+
"label-class-name": "turn",
|
|
453
|
+
width: "34"
|
|
454
|
+
}, {
|
|
455
|
+
default: g((t) => [
|
|
456
|
+
x(b(f.value[t.$index].weekend), 1)
|
|
457
|
+
]),
|
|
458
|
+
_: 1
|
|
459
|
+
}, 8, ["label"])
|
|
460
|
+
]),
|
|
461
|
+
_: 1
|
|
462
|
+
}, 8, ["label"])
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
}, 8, ["label"]),
|
|
466
|
+
m(u(C), {
|
|
467
|
+
label: u(d)("sheet.numberNonAppearing"),
|
|
468
|
+
align: "center"
|
|
469
|
+
}, {
|
|
470
|
+
default: g((t) => {
|
|
471
|
+
var l;
|
|
472
|
+
return [
|
|
473
|
+
x(b((l = f.value[t.$index]) == null ? void 0 : l.numberNonAppearing[f.value[t.$index].key]), 1)
|
|
474
|
+
];
|
|
475
|
+
}),
|
|
476
|
+
_: 1
|
|
477
|
+
}, 8, ["label"]),
|
|
478
|
+
m(u(C), {
|
|
479
|
+
label: u(d)("sheet.them"),
|
|
480
|
+
align: "center"
|
|
481
|
+
}, {
|
|
482
|
+
default: g(() => [
|
|
483
|
+
m(u(C), {
|
|
484
|
+
label: u(d)("sheet.code"),
|
|
485
|
+
align: "center",
|
|
486
|
+
"label-class-name": "turn",
|
|
487
|
+
width: "30"
|
|
488
|
+
}, {
|
|
489
|
+
default: g((t) => {
|
|
490
|
+
var l;
|
|
491
|
+
return [
|
|
492
|
+
x(b((l = f.value[t.$index].appearing) == null ? void 0 : l.code), 1)
|
|
493
|
+
];
|
|
494
|
+
}),
|
|
495
|
+
_: 1
|
|
496
|
+
}, 8, ["label"]),
|
|
497
|
+
m(u(C), {
|
|
498
|
+
label: u(d)("sheet.count"),
|
|
499
|
+
align: "center",
|
|
500
|
+
"label-class-name": "turn",
|
|
501
|
+
width: "30"
|
|
502
|
+
}, {
|
|
503
|
+
default: g((t) => {
|
|
504
|
+
var l;
|
|
505
|
+
return [
|
|
506
|
+
x(b((l = f.value[t.$index].appearing) == null ? void 0 : l.count), 1)
|
|
507
|
+
];
|
|
508
|
+
}),
|
|
509
|
+
_: 1
|
|
510
|
+
}, 8, ["label"])
|
|
511
|
+
]),
|
|
512
|
+
_: 1
|
|
513
|
+
}, 8, ["label"]),
|
|
514
|
+
m(u(C), {
|
|
515
|
+
label: u(d)("sheet.countWeekend"),
|
|
516
|
+
align: "center"
|
|
517
|
+
}, {
|
|
518
|
+
default: g((t) => [
|
|
519
|
+
x(b(f.value[t.$index].weekendDays), 1)
|
|
520
|
+
]),
|
|
521
|
+
_: 1
|
|
522
|
+
}, 8, ["label"])
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
}, 8, ["label"])
|
|
526
|
+
]),
|
|
527
|
+
_: 1
|
|
528
|
+
}, 8, ["data", "empty-text"]),
|
|
529
|
+
Se(($(), A(u(te), {
|
|
530
|
+
disabled: ee.value,
|
|
531
|
+
plain: "",
|
|
532
|
+
onClick: ke,
|
|
533
|
+
style: { "margin-top": ".5rem" }
|
|
534
|
+
}, {
|
|
535
|
+
default: g(() => [
|
|
536
|
+
x(b(u(d)("workSchedule.exportExcel")), 1)
|
|
537
|
+
]),
|
|
538
|
+
_: 1
|
|
539
|
+
}, 8, ["disabled"])), [
|
|
540
|
+
[o, ee.value]
|
|
541
|
+
]),
|
|
542
|
+
m(u(Be), {
|
|
543
|
+
show: U.value,
|
|
544
|
+
"onUpdate:show": e[8] || (e[8] = (t) => U.value = t),
|
|
545
|
+
options: se.value
|
|
546
|
+
}, {
|
|
547
|
+
default: g(() => [
|
|
548
|
+
m(u(J), {
|
|
549
|
+
label: v.value.name,
|
|
550
|
+
disabled: ""
|
|
551
|
+
}, null, 8, ["label"]),
|
|
552
|
+
m(u(Fe)),
|
|
553
|
+
V("div", null, [
|
|
554
|
+
V("div", null, [
|
|
555
|
+
m(u(We), {
|
|
556
|
+
label: re.value,
|
|
557
|
+
style: { padding: "0 0 .5rem" }
|
|
558
|
+
}, {
|
|
559
|
+
default: g(() => [
|
|
560
|
+
($(!0), R(Z, null, de(fe.value, (t) => ($(), A(u(J), {
|
|
561
|
+
key: t.value,
|
|
562
|
+
label: t.label,
|
|
563
|
+
onClick: (l) => le(t.value),
|
|
564
|
+
clickClose: !1
|
|
565
|
+
}, null, 8, ["label", "onClick"]))), 128))
|
|
566
|
+
]),
|
|
567
|
+
_: 1
|
|
568
|
+
}, 8, ["label"])
|
|
569
|
+
]),
|
|
570
|
+
/^(РВ|Я|Н(?![Н])).*$/.test(v.value.failure) ? ($(), R("div", Pe, [
|
|
571
|
+
m(u(J), { clickClose: !1 }, {
|
|
572
|
+
default: g(() => [
|
|
573
|
+
V("span", null, b(u(d)("workSchedule.with")) + ":", 1)
|
|
574
|
+
]),
|
|
575
|
+
_: 1
|
|
576
|
+
}),
|
|
577
|
+
m(i, {
|
|
578
|
+
modelValue: N.value,
|
|
579
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => N.value = t),
|
|
580
|
+
step: 1,
|
|
581
|
+
min: 0,
|
|
582
|
+
max: 19,
|
|
583
|
+
style: { width: "100%" }
|
|
584
|
+
}, null, 8, ["modelValue"]),
|
|
585
|
+
m(u(J), { clickClose: !1 }, {
|
|
586
|
+
default: g(() => [
|
|
587
|
+
V("span", null, b(u(d)("workSchedule.duration")) + ":", 1)
|
|
588
|
+
]),
|
|
589
|
+
_: 1
|
|
590
|
+
}),
|
|
591
|
+
m(i, {
|
|
592
|
+
modelValue: I.value,
|
|
593
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => I.value = t),
|
|
594
|
+
step: 1,
|
|
595
|
+
min: 4,
|
|
596
|
+
max: u(Ee)(N.value !== 1 ? 23 - N.value : 21, 4, 22)
|
|
597
|
+
}, null, 8, ["modelValue", "max"])
|
|
598
|
+
])) : B("", !0),
|
|
599
|
+
/^(|К|КВ|ОТ|Б|Р|ОЖ|У|ДО|УД|Г)$/.test(v.value.failure) ? ($(), R("div", je, [
|
|
600
|
+
m(u(J), { clickClose: !1 }, {
|
|
601
|
+
default: g(() => [
|
|
602
|
+
V("span", null, b(u(d)("sheet.count")) + ":", 1)
|
|
603
|
+
]),
|
|
604
|
+
_: 1
|
|
605
|
+
}),
|
|
606
|
+
m(i, {
|
|
607
|
+
modelValue: X.value,
|
|
608
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => X.value = t),
|
|
609
|
+
step: 1,
|
|
610
|
+
min: 1,
|
|
611
|
+
max: s.value.length - v.value.day,
|
|
612
|
+
style: { width: "100%" }
|
|
613
|
+
}, null, 8, ["modelValue", "max"])
|
|
614
|
+
])) : B("", !0),
|
|
615
|
+
m(u(J), null, {
|
|
616
|
+
default: g(() => [
|
|
617
|
+
v.value.rest ? ($(), A(u(te), {
|
|
618
|
+
key: 0,
|
|
619
|
+
onClick: e[5] || (e[5] = (t) => le("reset"))
|
|
620
|
+
}, {
|
|
621
|
+
default: g(() => [
|
|
622
|
+
x(b(u(d)("sheet.reset")), 1)
|
|
312
623
|
]),
|
|
313
624
|
_: 1
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
r(t(d), {
|
|
319
|
-
label: t(i)("sheet.numberNonAppearing"),
|
|
320
|
-
align: "center"
|
|
321
|
-
}, {
|
|
322
|
-
default: s((a) => [
|
|
323
|
-
y(v(o.value[a.$index].numberNonAppearing), 1)
|
|
324
|
-
]),
|
|
325
|
-
_: 1
|
|
326
|
-
}, 8, ["label"]),
|
|
327
|
-
r(t(d), {
|
|
328
|
-
label: t(i)("sheet.them"),
|
|
329
|
-
align: "center"
|
|
330
|
-
}, {
|
|
331
|
-
default: s(() => [
|
|
332
|
-
r(t(d), {
|
|
333
|
-
label: t(i)("sheet.code"),
|
|
334
|
-
align: "center",
|
|
335
|
-
"label-class-name": "turn",
|
|
336
|
-
width: "30"
|
|
625
|
+
})) : B("", !0),
|
|
626
|
+
P.value ? ($(), A(u(te), {
|
|
627
|
+
key: 1,
|
|
628
|
+
onClick: e[6] || (e[6] = (t) => le("save"))
|
|
337
629
|
}, {
|
|
338
|
-
default:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
y(v((u = o.value[a.$index].appearing) == null ? void 0 : u.code), 1)
|
|
342
|
-
];
|
|
343
|
-
}),
|
|
630
|
+
default: g(() => [
|
|
631
|
+
x(b(u(d)("sheet.save")), 1)
|
|
632
|
+
]),
|
|
344
633
|
_: 1
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
align: "center",
|
|
349
|
-
"label-class-name": "turn",
|
|
350
|
-
width: "30"
|
|
634
|
+
})) : B("", !0),
|
|
635
|
+
m(u(te), {
|
|
636
|
+
onClick: e[7] || (e[7] = (t) => U.value = !1)
|
|
351
637
|
}, {
|
|
352
|
-
default:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
y(v((u = o.value[a.$index].appearing) == null ? void 0 : u.countH), 1)
|
|
356
|
-
];
|
|
357
|
-
}),
|
|
638
|
+
default: g(() => [
|
|
639
|
+
x(b(u(d)("sheet.cancel")), 1)
|
|
640
|
+
]),
|
|
358
641
|
_: 1
|
|
359
|
-
}
|
|
360
|
-
]),
|
|
361
|
-
_: 1
|
|
362
|
-
}, 8, ["label"]),
|
|
363
|
-
r(t(d), {
|
|
364
|
-
label: t(i)("sheet.countWeekend"),
|
|
365
|
-
align: "center"
|
|
366
|
-
}, {
|
|
367
|
-
default: s((a) => [
|
|
368
|
-
y(v(o.value[a.$index].weekendDays), 1)
|
|
642
|
+
})
|
|
369
643
|
]),
|
|
370
644
|
_: 1
|
|
371
|
-
}
|
|
372
|
-
])
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
])
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
], 64));
|
|
645
|
+
})
|
|
646
|
+
])
|
|
647
|
+
]),
|
|
648
|
+
_: 1
|
|
649
|
+
}, 8, ["show", "options"])
|
|
650
|
+
], 64);
|
|
651
|
+
};
|
|
379
652
|
}
|
|
380
653
|
};
|
|
381
654
|
export {
|
|
382
|
-
|
|
655
|
+
Ze as default
|
|
383
656
|
};
|