@studio-west/employees 0.6.24 → 0.6.26

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