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