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