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