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