@studio-west/employees 0.0.9 → 0.0.10
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/VacationTable.cjs +1 -0
- package/dist/VacationTable.js +590 -0
- package/dist/WorkTable.cjs +3 -3
- package/dist/WorkTable.js +241 -276
- package/dist/employees.css +1 -0
- package/dist/index-Cig-zEKI.js +41 -0
- package/dist/index-r48mhCFw.cjs +1 -0
- package/package.json +6 -1
- package/dist/vite.svg +0 -1
package/dist/WorkTable.js
CHANGED
|
@@ -1,54 +1,19 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { saveAs as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { ref as v, watch as ge, computed as be, resolveDirective as Se, openBlock as f, createElementBlock as A, createBlock as B, unref as a, withCtx as i, Fragment as le, renderList as te, createCommentVNode as q, createTextVNode as S, toDisplayString as g, createVNode as d, createElementVNode as k, normalizeStyle as $e, withDirectives as xe } from "vue";
|
|
2
|
+
import { saveAs as De } from "file-saver";
|
|
3
|
+
import * as Ee from "exceljs";
|
|
4
|
+
import { p as U, b as ae, c as D } from "./index-Cig-zEKI.js";
|
|
5
|
+
import { useI18n as Ve } from "vue-i18n";
|
|
6
|
+
import { ElSelect as Te, ElOption as Me, ElButton as T, ElSkeleton as Ae, ElSkeletonItem as N, ElTable as Be, ElTableColumn as z, ElDialog as ze, ElForm as Fe, ElFormItem as Re, ElSwitch as Ie, ElRadioGroup as Ye, ElRadioButton as ne, ElSlider as W } from "element-plus";
|
|
7
|
+
import { ContextMenu as Ge, ContextMenuItem as He, ContextMenuSeparator as Ue } from "@imengyu/vue3-context-menu";
|
|
7
8
|
import Ne from "js-cookie";
|
|
8
|
-
|
|
9
|
-
if (arguments.length === 0 || !d)
|
|
10
|
-
return null;
|
|
11
|
-
const h = o || "{Y}-{m}-{d} {G}:{i}:{s}";
|
|
12
|
-
let s;
|
|
13
|
-
typeof d == "object" ? s = d : (typeof d == "string" && (/^[0-9]+$/.test(d) ? d = parseInt(d) : d = d.replace(new RegExp(/-/gm), "/")), typeof d == "number" && d.toString().length === 10 && (d = d * 1e3), s = new Date(d));
|
|
14
|
-
const $ = "ru-RU", n = {
|
|
15
|
-
Y: s.getFullYear(),
|
|
16
|
-
m: (s.getMonth() + 1).toString().padStart(2, "0"),
|
|
17
|
-
d: s.getDate(),
|
|
18
|
-
dd: s.getDate().toString().padStart(2, "0"),
|
|
19
|
-
G: s.getHours(),
|
|
20
|
-
H: s.getHours().toString().padStart(2, "0"),
|
|
21
|
-
i: s.getMinutes().toString().padStart(2, "0"),
|
|
22
|
-
s: s.getSeconds().toString().padStart(2, "0"),
|
|
23
|
-
D: new Intl.DateTimeFormat($, { weekday: "short" }).format(s),
|
|
24
|
-
F: new Intl.DateTimeFormat($, { month: "long" }).format(s),
|
|
25
|
-
M: new Intl.DateTimeFormat($, { month: "short" }).format(s)
|
|
26
|
-
};
|
|
27
|
-
return h.replace(/{(dd|[YmdGHisDFM])+}/g, (J, S) => n[S]);
|
|
28
|
-
}
|
|
29
|
-
function M(d, o) {
|
|
30
|
-
let s = d.replace(/[0-9]/g, "").split("").reverse().map(($) => $.charCodeAt(0));
|
|
31
|
-
return he(s, o, 0), s.map(($) => String.fromCharCode($)).reverse().join("");
|
|
32
|
-
}
|
|
33
|
-
function oe(d) {
|
|
34
|
-
return d.split(" ", 3).map((o, h) => h !== 0 ? o.slice(0, 1) + "." : o).join(" ");
|
|
35
|
-
}
|
|
36
|
-
function he(d, o, h) {
|
|
37
|
-
if (typeof o != "number" || o < 1) return !0;
|
|
38
|
-
if (o = o - 1, (typeof d[h] != "number" || d[h] < 65) && (d[h] = 65), d[h] + o <= 90) d[h] = d[h] + o;
|
|
39
|
-
else {
|
|
40
|
-
let s = Math.floor((d[h] - 65 + o) / 26);
|
|
41
|
-
d[h] = (d[h] - 65 + o) % 26 + 65, he(d, s, h + 1);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const We = { style: { height: "100px", width: "100%", display: "inline-block" } }, Pe = { style: { height: "100px", width: "100%", display: "inline-block" } }, Oe = {
|
|
9
|
+
const We = { style: { height: "100px", width: "100%", display: "inline-block" } }, Pe = { style: { height: "100px", width: "100%", display: "inline-block" } }, je = {
|
|
45
10
|
key: 2,
|
|
46
11
|
class: "controls-container",
|
|
47
12
|
style: { "margin-top": ".5rem" }
|
|
48
|
-
},
|
|
13
|
+
}, Oe = {
|
|
49
14
|
key: 0,
|
|
50
15
|
style: { padding: "0.5em 1.5em" }
|
|
51
|
-
},
|
|
16
|
+
}, Le = {
|
|
52
17
|
key: 1,
|
|
53
18
|
style: { padding: "0.5em 1.5em" }
|
|
54
19
|
}, ll = {
|
|
@@ -59,8 +24,8 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
59
24
|
workSchedule: Object,
|
|
60
25
|
fullName: { type: String, default: "Вы" }
|
|
61
26
|
},
|
|
62
|
-
setup(
|
|
63
|
-
const { t:
|
|
27
|
+
setup(F) {
|
|
28
|
+
const { t: r, d: P } = Ve(), $ = F, j = v(!1), n = v([
|
|
64
29
|
// { name: 'Иванов П.М. (Ведущий работник месяца)',
|
|
65
30
|
// days: [], // {day: "2024-11-01", tips: '(9:00 - 18:00)', time: 8 }
|
|
66
31
|
// contHour: 0,
|
|
@@ -73,128 +38,128 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
73
38
|
// code: '0000-00052'
|
|
74
39
|
// ids: 1
|
|
75
40
|
// }
|
|
76
|
-
]),
|
|
41
|
+
]), oe = v(1), C = v(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(oe.value))), u = v([]), R = v(0), x = v(9), w = v(8), O = v(!1), ue = v(!0), I = v(!1), J = v("5"), Y = v(1), E = v("Сектор разработок и эксплуатации сети"), Q = v([]), V = v([]), h = v({ name: "Имя", length: 0, code: "" }), L = v(!1), K = v({
|
|
77
42
|
zIndex: 30,
|
|
78
43
|
minWidth: 220,
|
|
79
44
|
x: 500,
|
|
80
45
|
y: 200
|
|
81
|
-
}), re =
|
|
82
|
-
ge(
|
|
83
|
-
t !== e && (
|
|
84
|
-
|
|
85
|
-
}),
|
|
86
|
-
}), ge(
|
|
87
|
-
t !== e && (
|
|
46
|
+
}), re = v({});
|
|
47
|
+
ge(E, async (t, e) => {
|
|
48
|
+
t !== e && (V.value = [], O.value = !1, $.odata.personalManagerData.forEach((o) => {
|
|
49
|
+
o.Status !== "Увольнение" && o.Group === t && (V.value.some((l) => (l == null ? void 0 : l.activeText) === o.Role) || V.value.push({ val: !0, activeText: o.Role }));
|
|
50
|
+
}), _());
|
|
51
|
+
}), ge(oe, async (t, e) => {
|
|
52
|
+
t !== e && (C.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(t)), de());
|
|
88
53
|
});
|
|
89
|
-
const
|
|
90
|
-
|
|
54
|
+
const he = (t, e, o, l) => {
|
|
55
|
+
h.value.ids = t.ids, h.value.key = t.key, h.value.add = t.days.length > 0 && t.days[t.days.length - 1].cont, h.value.level = e.level, h.value.day = o.cellIndex, K.value.y = l.clientY, K.value.x = l.clientX, e.level === 2 && e.no === 0 && $.checkEdit && (h.value.name = r("workSchedule.autocomplete"), L.value = !0), e.level === 3 && o.cellIndex - e.no === 1 && $.checkEdit && (M(o.cellIndex, t.ids), h.value.name = r("workSchedule.modeSelection"), L.value = !0);
|
|
91
56
|
}, de = () => {
|
|
92
|
-
const t = re.value, e = new Date(
|
|
93
|
-
let l = [],
|
|
94
|
-
for (let
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
l.push({ day:
|
|
57
|
+
const t = re.value, e = new Date(C.value), o = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
|
|
58
|
+
let l = [], s = 0;
|
|
59
|
+
for (let p = 1; p <= o; p++) {
|
|
60
|
+
const y = U(e.setDate(p), "{Y}-{m}-{dd}");
|
|
61
|
+
s += t.nowork.includes(y) || t.holidays.includes(y) ? 0 : t.preholidays.includes(y) ? 7 : 8;
|
|
62
|
+
const m = t.nowork.includes(y) ? "nowork" : t.holidays.includes(y) ? "holiday" : t.preholidays.includes(y) ? "preholiday" : "";
|
|
63
|
+
l.push({ day: p, holidays: m, weekday: P(new Date(e.getFullYear(), e.getMonth(), p), "day") });
|
|
99
64
|
}
|
|
100
|
-
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}),
|
|
65
|
+
R.value = s, u.value = l, $.odata.getPersonalManagerData({}).then((p) => {
|
|
66
|
+
var y;
|
|
67
|
+
E.value = (y = p.find((m) => m.Status !== "Увольнение" && m.Description === $.fullName)) == null ? void 0 : y.Group, p.forEach((m) => {
|
|
68
|
+
m.Status !== "Увольнение" && (Q.value.some((b) => (b == null ? void 0 : b.value) === m.Group) || Q.value.push({ value: m.Group, label: m.Group, key: m.Group }), m.Group === E.value && !V.value.some((b) => (b == null ? void 0 : b.activeText) === m.Role) && V.value.push({ val: !0, activeText: m.Role }));
|
|
69
|
+
}), _(), ue.value = !1;
|
|
105
70
|
});
|
|
106
|
-
},
|
|
107
|
-
var
|
|
108
|
-
const
|
|
109
|
-
return e === -1 ||
|
|
110
|
-
},
|
|
71
|
+
}, me = be(() => !n.value.some((t) => t.contHour !== R.value)), ie = (t, e) => {
|
|
72
|
+
var p, y, m;
|
|
73
|
+
const o = new Date(C.value), l = `${o.getFullYear()}-${(o.getMonth() + 1).toString().padStart(2, "0")}-${t.toString().padStart(2, "0")}`, s = (p = n.value[e]) == null ? void 0 : p.days.findIndex((b) => b.day === l);
|
|
74
|
+
return e === -1 || s === -1 ? "" : ((y = n.value[e].days[s]) == null ? void 0 : y.time) + " " + ((m = n.value[e].days[s]) == null ? void 0 : m.tips);
|
|
75
|
+
}, _ = () => {
|
|
111
76
|
n.value = [];
|
|
112
77
|
let t = [];
|
|
113
|
-
|
|
114
|
-
if (e.Status !== "Увольнение" && e.Group ===
|
|
115
|
-
let
|
|
116
|
-
t.push(e.Code), n.value.push({ name:
|
|
78
|
+
$.odata.personalManagerData.forEach((e) => {
|
|
79
|
+
if (e.Status !== "Увольнение" && e.Group === E.value && V.value.some((o) => o.val && o.activeText === e.Role)) {
|
|
80
|
+
let o = ae(e.Description);
|
|
81
|
+
t.push(e.Code), n.value.push({ name: o + " (" + e.Role + ")", days: [], contHour: 0, code: e.Code, id: !1, ids: n.value.length });
|
|
117
82
|
}
|
|
118
|
-
}),
|
|
119
|
-
},
|
|
120
|
-
|
|
83
|
+
}), ce(t), I.value = !1;
|
|
84
|
+
}, ce = (t) => {
|
|
85
|
+
$.workSchedule.getWorkSchedule({ code: t, date: U(new Date(C.value), "{Y}-{m}-{dd}") }).then(
|
|
121
86
|
(e) => {
|
|
122
|
-
e.forEach((
|
|
123
|
-
|
|
124
|
-
}),
|
|
87
|
+
e.forEach((o, l) => {
|
|
88
|
+
o !== null && (n.value[l].days = o.data.days, n.value[l].id = o.id);
|
|
89
|
+
}), G();
|
|
125
90
|
}
|
|
126
91
|
);
|
|
127
|
-
},
|
|
92
|
+
}, G = () => {
|
|
128
93
|
n.value.forEach((t) => {
|
|
129
|
-
t.contHour = t.days.reduce((e,
|
|
94
|
+
t.contHour = t.days.reduce((e, o) => e + o.time, 0);
|
|
130
95
|
});
|
|
131
|
-
},
|
|
132
|
-
n.value[t].days = [],
|
|
96
|
+
}, pe = (t) => {
|
|
97
|
+
n.value[t].days = [], G();
|
|
133
98
|
}, ye = (t) => {
|
|
134
|
-
switch (
|
|
99
|
+
switch (J.value) {
|
|
135
100
|
case "5":
|
|
136
|
-
for (let e =
|
|
137
|
-
|
|
101
|
+
for (let e = Y.value; e <= u.value.length; e++)
|
|
102
|
+
u.value[e - 1].holidays === "" && M(e, t, !0), u.value[e - 1].holidays === "preholiday" && (w.value -= 1, M(e, t, !0), w.value += 1);
|
|
138
103
|
break;
|
|
139
104
|
case "2x2":
|
|
140
|
-
for (let e =
|
|
141
|
-
|
|
105
|
+
for (let e = Y.value; e <= u.value.length; e += 4)
|
|
106
|
+
M(e, t, !0), e + 1 <= u.value.length && M(e + 1, t, !0);
|
|
142
107
|
break;
|
|
143
108
|
case "2x5":
|
|
144
|
-
for (let e =
|
|
145
|
-
for (let
|
|
146
|
-
|
|
109
|
+
for (let e = Y.value; e <= u.value.length; e += 7)
|
|
110
|
+
for (let o = e; o < e + 5 && o <= u.value.length; o++)
|
|
111
|
+
u.value[o - 1].holidays === "preholiday" ? (w.value -= 1, M(o, t, !0), w.value += 1) : M(o, t, !0);
|
|
147
112
|
break;
|
|
148
113
|
}
|
|
149
|
-
},
|
|
150
|
-
const { date: l, ind:
|
|
151
|
-
|
|
114
|
+
}, M = (t, e, o = !1) => {
|
|
115
|
+
const { date: l, ind: s } = X(t, e);
|
|
116
|
+
s === -1 ? (n.value[e].days.push({
|
|
152
117
|
day: l,
|
|
153
|
-
time:
|
|
154
|
-
tips: `(${
|
|
155
|
-
}),
|
|
156
|
-
},
|
|
157
|
-
const { ind:
|
|
158
|
-
n.value[e].days.splice(
|
|
118
|
+
time: w.value,
|
|
119
|
+
tips: `(${x.value}:00 - ${x.value + w.value + 1}:00)`
|
|
120
|
+
}), G()) : o || (w.value = n.value[e].days[s].time, x.value = parseInt(n.value[e].days[s].tips.slice(1, -12)));
|
|
121
|
+
}, fe = (t, e) => {
|
|
122
|
+
const { ind: o } = X(t, e);
|
|
123
|
+
n.value[e].days.splice(o, 1), G(), document.querySelector(".app-main").click();
|
|
159
124
|
}, se = (t, e) => {
|
|
160
|
-
const { date:
|
|
125
|
+
const { date: o, ind: l } = X(t, e);
|
|
161
126
|
n.value[e].days[l] = {
|
|
162
|
-
day:
|
|
163
|
-
time:
|
|
164
|
-
tips: `(${
|
|
165
|
-
},
|
|
127
|
+
day: o,
|
|
128
|
+
time: w.value,
|
|
129
|
+
tips: `(${x.value}:00 - ${x.value + w.value + 1}:00)`
|
|
130
|
+
}, G();
|
|
166
131
|
}, X = (t, e) => {
|
|
167
|
-
var
|
|
168
|
-
const
|
|
169
|
-
return { date:
|
|
170
|
-
},
|
|
132
|
+
var s;
|
|
133
|
+
const o = U(new Date(C.value).setDate(t), "{Y}-{m}-{dd}"), l = (s = n.value[e]) == null ? void 0 : s.days.findIndex((p) => p.day === o);
|
|
134
|
+
return { date: o, ind: l };
|
|
135
|
+
}, we = async () => {
|
|
171
136
|
var ve;
|
|
172
|
-
|
|
173
|
-
const t = new
|
|
174
|
-
e.mergeCells(`A1:${
|
|
175
|
-
for (let
|
|
176
|
-
e.getCell(4,
|
|
177
|
-
` + (
|
|
178
|
-
e.getRow(1).height = 40, e.getRow(2).height = 30, e.getRow(3).height = 20, e.getColumn(1).width = 15, e.getColumn(
|
|
179
|
-
let
|
|
180
|
-
for (const
|
|
181
|
-
let Z = [
|
|
182
|
-
for (let
|
|
183
|
-
const { ind:
|
|
184
|
-
|
|
137
|
+
j.value = !0;
|
|
138
|
+
const t = new Ee.Workbook(), e = t.addWorksheet(P(C.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), o = { vertical: "middle", horizontal: "center" }, l = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, s = { vertical: "middle", horizontal: "center", wrapText: !0 };
|
|
139
|
+
e.mergeCells(`A1:${D("A1", u.value.length + 5)}1`), e.mergeCells(`A2:${D("A2", u.value.length + 5)}2`), e.mergeCells("A3:A4"), e.mergeCells(`B3:${D("B3", u.value.length)}3`), e.mergeCells(`${D("B3", u.value.length + 1)}3:${D("B3", u.value.length + 2)}3`), e.mergeCells(`${D("B3", u.value.length + 3)}3:${D("B4", u.value.length + 3)}4`), e.mergeCells(`${D("B3", u.value.length + 4)}3:${D("B4", u.value.length + 4)}4`), e.getCell("A1").value = r("workSchedule.firm"), e.getCell("A2").value = r("workSchedule.title", { name: E.value }) + P(C.value, "month") + ` ${new Date(C.value).getFullYear()}`, e.getCell("A3").value = r("workSchedule.month"), e.getCell("B3").value = r("workSchedule.numbersMonth"), e.getCell(3, u.value.length + 2).value = r("workSchedule.onSchedule"), e.getCell(3, u.value.length + 4).value = r("workSchedule.acquainted"), e.getCell(3, u.value.length + 5).value = r("workSchedule.date"), e.getCell(4, u.value.length + 2).value = r("workSchedule.days"), e.getCell(4, u.value.length + 3).value = `${r("workSchedule.hours")} (${R.value})`;
|
|
140
|
+
for (let c = 2; c <= u.value.length + 1; c++)
|
|
141
|
+
e.getCell(4, c).value = u.value[c - 2].weekday + `
|
|
142
|
+
` + (c - 1), e.getColumn(c).width = 6, e.getColumn(c).alignment = s, e.getCell(4, c).border = l;
|
|
143
|
+
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 = s, 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 = s, e.getColumn(u.value.length + 3).alignment = s, e.getColumn(u.value.length + 4).alignment = o, e.getColumn(u.value.length + 5).alignment = o, e.getCell("A3").border = l, e.getCell("B3").border = l, e.getCell(3, u.value.length + 2).border = l, e.getCell(4, u.value.length + 2).border = l, e.getCell(3, u.value.length + 4).border = l, e.getCell(3, u.value.length + 5).border = l, e.getCell(4, u.value.length + 3).border = l;
|
|
144
|
+
let p = 0;
|
|
145
|
+
for (const c of n.value) {
|
|
146
|
+
let Z = [c.name];
|
|
147
|
+
for (let H = 1; H <= u.value.length; H++) {
|
|
148
|
+
const { ind: ee } = X(H, p);
|
|
149
|
+
ee !== -1 ? Z[H] = `${c.days[ee].time} ${c.days[ee].tips}` : Z[H] = " ";
|
|
185
150
|
}
|
|
186
|
-
Z.push(((ve =
|
|
187
|
-
const
|
|
188
|
-
|
|
151
|
+
Z.push(((ve = c.days) == null ? void 0 : ve.length) || " ", c.contHour || 0);
|
|
152
|
+
const Ce = e.addRow(Z);
|
|
153
|
+
Ce.border = l, p++;
|
|
189
154
|
}
|
|
190
|
-
let
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}), 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 =
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
},
|
|
197
|
-
O.value ||
|
|
155
|
+
let y = "Начальник отдела";
|
|
156
|
+
$.odata.personalManagerData.forEach((c) => {
|
|
157
|
+
c.Status !== "Увольнение" && c.Role === "Начальник отдела правовой и кадровой работы" && (y = c.Description);
|
|
158
|
+
}), 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 = r("workSchedule.byInitials"), e.getCell(`Q${n.value.length + 6}`).value = r("workSchedule.supervisorHR"), e.getCell(`B${n.value.length + 8}`).value = r("workSchedule.compiled") + ":", e.getCell(`S${n.value.length + 8}`).value = r("workSchedule.approved") + ":", e.getCell(`M${n.value.length + 8}`).value = ae($.fullName), e.getCell(`AD${n.value.length + 8}`).value = ae(y), e.getCell(`Z${n.value.length + 9}`).value = r("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" } };
|
|
159
|
+
const m = "export_" + U(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", b = await t.xlsx.writeBuffer();
|
|
160
|
+
De(new Blob([b]), m), j.value = !1;
|
|
161
|
+
}, ke = async () => {
|
|
162
|
+
O.value || $.workSchedule.addWorkSchedule({ data: n.value, date: U(new Date(C.value), "{Y}-{m}-{dd}") }).then((t) => O.value = t);
|
|
198
163
|
};
|
|
199
164
|
return fetch(
|
|
200
165
|
"https://cp.avanta-telecom.ru/api/v2/calendar/getHoliday",
|
|
@@ -228,17 +193,17 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
228
193
|
}).catch((t) => {
|
|
229
194
|
console.error("Ошибка загрузки файла:", t);
|
|
230
195
|
}), (t, e) => {
|
|
231
|
-
const
|
|
232
|
-
return
|
|
233
|
-
|
|
196
|
+
const o = Se("loading");
|
|
197
|
+
return f(), A("div", null, [
|
|
198
|
+
F.checkEdit ? (f(), B(a(Te), {
|
|
234
199
|
key: 0,
|
|
235
|
-
modelValue:
|
|
236
|
-
"onUpdate:modelValue": e[0] || (e[0] = (l) =>
|
|
200
|
+
modelValue: E.value,
|
|
201
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => E.value = l),
|
|
237
202
|
placeholder: "Select",
|
|
238
203
|
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
239
204
|
}, {
|
|
240
|
-
default:
|
|
241
|
-
(
|
|
205
|
+
default: i(() => [
|
|
206
|
+
(f(!0), A(le, null, te(Q.value, (l) => (f(), B(a(Me), {
|
|
242
207
|
key: l.value,
|
|
243
208
|
label: l.label,
|
|
244
209
|
value: l.value
|
|
@@ -246,77 +211,77 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
246
211
|
]),
|
|
247
212
|
_: 1
|
|
248
213
|
}, 8, ["modelValue"])) : q("", !0),
|
|
249
|
-
|
|
214
|
+
F.checkEdit ? (f(), B(a(T), {
|
|
250
215
|
key: 1,
|
|
251
216
|
plain: "",
|
|
252
|
-
onClick: e[1] || (e[1] = (l) =>
|
|
217
|
+
onClick: e[1] || (e[1] = (l) => I.value = !0),
|
|
253
218
|
style: { "margin-bottom": ".5rem" }
|
|
254
219
|
}, {
|
|
255
|
-
default:
|
|
256
|
-
|
|
220
|
+
default: i(() => [
|
|
221
|
+
S(g(a(r)("workSchedule.jobTitle")), 1)
|
|
257
222
|
]),
|
|
258
223
|
_: 1
|
|
259
224
|
})) : q("", !0),
|
|
260
|
-
|
|
225
|
+
d(a(Ae), {
|
|
261
226
|
style: { width: "100%" },
|
|
262
227
|
loading: ue.value,
|
|
263
228
|
animated: ""
|
|
264
229
|
}, {
|
|
265
|
-
template:
|
|
266
|
-
|
|
230
|
+
template: i(() => [
|
|
231
|
+
d(a(N), {
|
|
267
232
|
variant: "text",
|
|
268
233
|
style: { width: "100%", height: "2rem" }
|
|
269
234
|
}),
|
|
270
|
-
|
|
235
|
+
d(a(N), {
|
|
271
236
|
variant: "text",
|
|
272
237
|
style: { width: "180px", height: "4rem", "margin-right": "4px" }
|
|
273
238
|
}),
|
|
274
|
-
|
|
239
|
+
d(a(N), {
|
|
275
240
|
variant: "text",
|
|
276
241
|
style: { width: "calc( 100% - 184px)", height: "4rem" }
|
|
277
242
|
}),
|
|
278
|
-
|
|
243
|
+
d(a(N), {
|
|
279
244
|
variant: "text",
|
|
280
245
|
style: { width: "180px", height: "8rem", "margin-right": "4px" }
|
|
281
246
|
}),
|
|
282
|
-
|
|
247
|
+
d(a(N), {
|
|
283
248
|
variant: "text",
|
|
284
249
|
style: { width: "calc( 100% - 184px)", height: "8rem" }
|
|
285
250
|
})
|
|
286
251
|
]),
|
|
287
|
-
default:
|
|
288
|
-
|
|
252
|
+
default: i(() => [
|
|
253
|
+
d(a(Be), {
|
|
289
254
|
id: "printTable",
|
|
290
255
|
data: n.value,
|
|
291
256
|
style: { width: "100%" },
|
|
292
257
|
size: "small",
|
|
293
258
|
align: "center",
|
|
294
|
-
onCellClick:
|
|
295
|
-
"empty-text": a(
|
|
259
|
+
onCellClick: he,
|
|
260
|
+
"empty-text": a(r)("workSchedule.emptyText")
|
|
296
261
|
}, {
|
|
297
|
-
default:
|
|
298
|
-
|
|
299
|
-
label: a(
|
|
262
|
+
default: i(() => [
|
|
263
|
+
d(a(z), {
|
|
264
|
+
label: a(r)("workSchedule.title", { name: E.value }) + a(P)(C.value, "month") + ` ${new Date(C.value).getFullYear()}`,
|
|
300
265
|
align: "center",
|
|
301
266
|
height: "34"
|
|
302
267
|
}, {
|
|
303
|
-
default:
|
|
304
|
-
|
|
305
|
-
label: a(
|
|
268
|
+
default: i(() => [
|
|
269
|
+
d(a(z), {
|
|
270
|
+
label: a(r)("workSchedule.month"),
|
|
306
271
|
width: "180",
|
|
307
272
|
align: "center"
|
|
308
273
|
}, {
|
|
309
|
-
default:
|
|
310
|
-
|
|
274
|
+
default: i((l) => [
|
|
275
|
+
k("div", We, g(n.value[l.$index].name), 1)
|
|
311
276
|
]),
|
|
312
277
|
_: 1
|
|
313
278
|
}, 8, ["label"]),
|
|
314
|
-
|
|
315
|
-
label: a(
|
|
279
|
+
d(a(z), {
|
|
280
|
+
label: a(r)("workSchedule.numbersMonth"),
|
|
316
281
|
align: "center"
|
|
317
282
|
}, {
|
|
318
|
-
default:
|
|
319
|
-
(
|
|
283
|
+
default: i(() => [
|
|
284
|
+
(f(!0), A(le, null, te(u.value, (l) => (f(), B(a(z), {
|
|
320
285
|
key: l.day,
|
|
321
286
|
width: "45",
|
|
322
287
|
"class-name": l.holidays,
|
|
@@ -324,36 +289,36 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
324
289
|
label: l.weekday + `
|
|
325
290
|
` + l.day.toString()
|
|
326
291
|
}, {
|
|
327
|
-
default:
|
|
328
|
-
|
|
292
|
+
default: i((s) => [
|
|
293
|
+
k("div", Pe, g(ie(l.day, s.$index) || " "), 1)
|
|
329
294
|
]),
|
|
330
295
|
_: 2
|
|
331
296
|
}, 1032, ["class-name", "label"]))), 128))
|
|
332
297
|
]),
|
|
333
298
|
_: 1
|
|
334
299
|
}, 8, ["label"]),
|
|
335
|
-
|
|
336
|
-
label: a(
|
|
300
|
+
d(a(z), {
|
|
301
|
+
label: a(r)("workSchedule.onSchedule"),
|
|
337
302
|
align: "center"
|
|
338
303
|
}, {
|
|
339
|
-
default:
|
|
340
|
-
|
|
341
|
-
label: a(
|
|
304
|
+
default: i(() => [
|
|
305
|
+
d(a(z), {
|
|
306
|
+
label: a(r)("workSchedule.days"),
|
|
342
307
|
align: "center"
|
|
343
308
|
}, {
|
|
344
|
-
default:
|
|
345
|
-
|
|
309
|
+
default: i((l) => [
|
|
310
|
+
S(g(n.value[l.$index].days.length || 0), 1)
|
|
346
311
|
]),
|
|
347
312
|
_: 1
|
|
348
313
|
}, 8, ["label"]),
|
|
349
|
-
|
|
350
|
-
label: `${a(
|
|
314
|
+
d(a(z), {
|
|
315
|
+
label: `${a(r)("workSchedule.hours")} ( ${R.value} )`,
|
|
351
316
|
align: "center"
|
|
352
317
|
}, {
|
|
353
|
-
default:
|
|
354
|
-
|
|
355
|
-
style:
|
|
356
|
-
},
|
|
318
|
+
default: i((l) => [
|
|
319
|
+
k("div", {
|
|
320
|
+
style: $e(`color: ${R.value === l.row.contHour ? "green" : "red"};`)
|
|
321
|
+
}, g(l.row.contHour), 5)
|
|
357
322
|
]),
|
|
358
323
|
_: 1
|
|
359
324
|
}, 8, ["label"])
|
|
@@ -369,73 +334,73 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
369
334
|
]),
|
|
370
335
|
_: 1
|
|
371
336
|
}, 8, ["loading"]),
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
O.value ? q("", !0) : (
|
|
337
|
+
me.value && F.checkEdit ? (f(), A("div", je, [
|
|
338
|
+
S(g(a(r)("workSchedule.chartsFilled")) + ": ", 1),
|
|
339
|
+
O.value ? q("", !0) : (f(), B(a(T), {
|
|
375
340
|
key: 0,
|
|
376
341
|
type: "primary",
|
|
377
|
-
onClick:
|
|
342
|
+
onClick: ke
|
|
378
343
|
}, {
|
|
379
|
-
default:
|
|
380
|
-
|
|
344
|
+
default: i(() => [
|
|
345
|
+
S(g(a(r)("workSchedule.confirm")), 1)
|
|
381
346
|
]),
|
|
382
347
|
_: 1
|
|
383
348
|
})),
|
|
384
|
-
e[16] || (e[16] =
|
|
385
|
-
|
|
349
|
+
e[16] || (e[16] = S()),
|
|
350
|
+
k("span", null, g(F.fullName), 1)
|
|
386
351
|
])) : q("", !0),
|
|
387
|
-
|
|
388
|
-
disabled:
|
|
352
|
+
xe((f(), B(a(T), {
|
|
353
|
+
disabled: j.value,
|
|
389
354
|
plain: "",
|
|
390
|
-
onClick:
|
|
355
|
+
onClick: we,
|
|
391
356
|
style: { "margin-top": ".5rem" }
|
|
392
357
|
}, {
|
|
393
|
-
default:
|
|
394
|
-
|
|
358
|
+
default: i(() => [
|
|
359
|
+
S(g(a(r)("workSchedule.exportExcel")), 1)
|
|
395
360
|
]),
|
|
396
361
|
_: 1
|
|
397
362
|
}, 8, ["disabled"])), [
|
|
398
|
-
[
|
|
363
|
+
[o, j.value]
|
|
399
364
|
]),
|
|
400
|
-
|
|
401
|
-
title: a(
|
|
402
|
-
modelValue:
|
|
403
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) =>
|
|
365
|
+
d(a(ze), {
|
|
366
|
+
title: a(r)("workSchedule.jobTitle"),
|
|
367
|
+
modelValue: I.value,
|
|
368
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => I.value = l),
|
|
404
369
|
width: "400px"
|
|
405
370
|
}, {
|
|
406
|
-
footer:
|
|
407
|
-
|
|
408
|
-
onClick: e[2] || (e[2] = (l) =>
|
|
371
|
+
footer: i(() => [
|
|
372
|
+
d(a(T), {
|
|
373
|
+
onClick: e[2] || (e[2] = (l) => I.value = !1),
|
|
409
374
|
size: "default"
|
|
410
375
|
}, {
|
|
411
|
-
default:
|
|
412
|
-
|
|
376
|
+
default: i(() => [
|
|
377
|
+
S(g(t.$t("workSchedule.cancel")), 1)
|
|
413
378
|
]),
|
|
414
379
|
_: 1
|
|
415
380
|
}),
|
|
416
|
-
|
|
381
|
+
d(a(T), {
|
|
417
382
|
size: "default",
|
|
418
383
|
type: "primary",
|
|
419
|
-
onClick:
|
|
384
|
+
onClick: _
|
|
420
385
|
}, {
|
|
421
|
-
default:
|
|
422
|
-
|
|
386
|
+
default: i(() => [
|
|
387
|
+
S(g(t.$t("workSchedule.select")), 1)
|
|
423
388
|
]),
|
|
424
389
|
_: 1
|
|
425
390
|
})
|
|
426
391
|
]),
|
|
427
|
-
default:
|
|
428
|
-
|
|
392
|
+
default: i(() => [
|
|
393
|
+
d(a(Fe), {
|
|
429
394
|
ref: "dialogForm",
|
|
430
|
-
model:
|
|
395
|
+
model: V.value,
|
|
431
396
|
autocomplete: "on"
|
|
432
397
|
}, {
|
|
433
|
-
default:
|
|
434
|
-
(
|
|
435
|
-
default:
|
|
436
|
-
|
|
398
|
+
default: i(() => [
|
|
399
|
+
(f(!0), A(le, null, te(V.value, (l) => (f(), B(a(Re), null, {
|
|
400
|
+
default: i(() => [
|
|
401
|
+
d(a(Ie), {
|
|
437
402
|
modelValue: l.val,
|
|
438
|
-
"onUpdate:modelValue": (
|
|
403
|
+
"onUpdate:modelValue": (s) => l.val = s,
|
|
439
404
|
"active-text": l.activeText
|
|
440
405
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-text"])
|
|
441
406
|
]),
|
|
@@ -447,112 +412,112 @@ const We = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
447
412
|
]),
|
|
448
413
|
_: 1
|
|
449
414
|
}, 8, ["title", "modelValue"]),
|
|
450
|
-
|
|
415
|
+
d(a(Ge), {
|
|
451
416
|
show: L.value,
|
|
452
417
|
"onUpdate:show": e[15] || (e[15] = (l) => L.value = l),
|
|
453
|
-
options:
|
|
418
|
+
options: K.value
|
|
454
419
|
}, {
|
|
455
|
-
default:
|
|
456
|
-
|
|
457
|
-
label:
|
|
420
|
+
default: i(() => [
|
|
421
|
+
d(a(He), {
|
|
422
|
+
label: h.value.name,
|
|
458
423
|
disabled: ""
|
|
459
424
|
}, null, 8, ["label"]),
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
modelValue:
|
|
464
|
-
"onUpdate:modelValue": e[4] || (e[4] = (l) =>
|
|
425
|
+
d(a(Ue)),
|
|
426
|
+
h.value.level === 2 ? (f(), A("div", Oe, [
|
|
427
|
+
d(a(Ye), {
|
|
428
|
+
modelValue: J.value,
|
|
429
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => J.value = l),
|
|
465
430
|
size: "small"
|
|
466
431
|
}, {
|
|
467
|
-
default:
|
|
468
|
-
|
|
469
|
-
label: a(
|
|
432
|
+
default: i(() => [
|
|
433
|
+
d(a(ne), {
|
|
434
|
+
label: a(r)("workSchedule.Days5"),
|
|
470
435
|
value: "5"
|
|
471
436
|
}, null, 8, ["label"]),
|
|
472
|
-
|
|
437
|
+
d(a(ne), {
|
|
473
438
|
label: "2 Х 2",
|
|
474
439
|
value: "2x2"
|
|
475
440
|
}),
|
|
476
|
-
|
|
441
|
+
d(a(ne), {
|
|
477
442
|
label: "2 Х 5",
|
|
478
443
|
value: "2x5"
|
|
479
444
|
})
|
|
480
445
|
]),
|
|
481
446
|
_: 1
|
|
482
447
|
}, 8, ["modelValue"]),
|
|
483
|
-
e[17] || (e[17] =
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
modelValue:
|
|
487
|
-
"onUpdate:modelValue": e[5] || (e[5] = (l) =>
|
|
448
|
+
e[17] || (e[17] = k("br", null, null, -1)),
|
|
449
|
+
k("span", null, g(a(r)("workSchedule.fromDate")) + ":", 1),
|
|
450
|
+
d(a(W), {
|
|
451
|
+
modelValue: Y.value,
|
|
452
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => Y.value = l),
|
|
488
453
|
step: 1,
|
|
489
454
|
min: 1,
|
|
490
|
-
max:
|
|
455
|
+
max: u.value.length
|
|
491
456
|
}, null, 8, ["modelValue", "max"]),
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
modelValue:
|
|
495
|
-
"onUpdate:modelValue": e[6] || (e[6] = (l) =>
|
|
457
|
+
k("span", null, g(a(r)("workSchedule.with")) + ":", 1),
|
|
458
|
+
d(a(W), {
|
|
459
|
+
modelValue: x.value,
|
|
460
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => x.value = l),
|
|
496
461
|
step: 1,
|
|
497
462
|
min: 8,
|
|
498
463
|
max: 11
|
|
499
464
|
}, null, 8, ["modelValue"]),
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
modelValue:
|
|
503
|
-
"onUpdate:modelValue": e[7] || (e[7] = (l) =>
|
|
465
|
+
k("span", null, g(a(r)("workSchedule.duration")) + ":", 1),
|
|
466
|
+
d(a(W), {
|
|
467
|
+
modelValue: w.value,
|
|
468
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => w.value = l),
|
|
504
469
|
step: 1,
|
|
505
470
|
min: 4,
|
|
506
471
|
max: 12
|
|
507
472
|
}, null, 8, ["modelValue"]),
|
|
508
|
-
|
|
473
|
+
d(a(T), {
|
|
509
474
|
style: { "margin-top": ".5rem" },
|
|
510
475
|
size: "small",
|
|
511
|
-
onClick: e[8] || (e[8] = (l) => ye(
|
|
476
|
+
onClick: e[8] || (e[8] = (l) => ye(h.value.ids))
|
|
512
477
|
}, {
|
|
513
|
-
default:
|
|
514
|
-
|
|
478
|
+
default: i(() => [
|
|
479
|
+
S(g(a(r)("workSchedule.fillOut")), 1)
|
|
515
480
|
]),
|
|
516
481
|
_: 1
|
|
517
482
|
}),
|
|
518
|
-
|
|
483
|
+
d(a(T), {
|
|
519
484
|
style: { "margin-top": ".5rem" },
|
|
520
485
|
size: "small",
|
|
521
|
-
onClick: e[9] || (e[9] = (l) =>
|
|
486
|
+
onClick: e[9] || (e[9] = (l) => pe(h.value.ids))
|
|
522
487
|
}, {
|
|
523
|
-
default:
|
|
524
|
-
|
|
488
|
+
default: i(() => [
|
|
489
|
+
S(g(a(r)("workSchedule.clearRow")), 1)
|
|
525
490
|
]),
|
|
526
491
|
_: 1
|
|
527
492
|
})
|
|
528
|
-
])) : (
|
|
529
|
-
|
|
530
|
-
e[18] || (e[18] =
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
modelValue:
|
|
534
|
-
"onUpdate:modelValue": e[10] || (e[10] = (l) =>
|
|
493
|
+
])) : (f(), A("div", Le, [
|
|
494
|
+
k("div", null, g(ie(h.value.day, h.value.ids)), 1),
|
|
495
|
+
e[18] || (e[18] = k("br", null, null, -1)),
|
|
496
|
+
k("span", null, g(a(r)("workSchedule.with")) + ":", 1),
|
|
497
|
+
d(a(W), {
|
|
498
|
+
modelValue: x.value,
|
|
499
|
+
"onUpdate:modelValue": e[10] || (e[10] = (l) => x.value = l),
|
|
535
500
|
step: 1,
|
|
536
501
|
min: 8,
|
|
537
502
|
max: 11,
|
|
538
|
-
onChange: e[11] || (e[11] = (l) => se(
|
|
503
|
+
onChange: e[11] || (e[11] = (l) => se(h.value.day, h.value.ids))
|
|
539
504
|
}, null, 8, ["modelValue"]),
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
modelValue:
|
|
543
|
-
"onUpdate:modelValue": e[12] || (e[12] = (l) =>
|
|
505
|
+
k("span", null, g(a(r)("workSchedule.duration")) + ":", 1),
|
|
506
|
+
d(a(W), {
|
|
507
|
+
modelValue: w.value,
|
|
508
|
+
"onUpdate:modelValue": e[12] || (e[12] = (l) => w.value = l),
|
|
544
509
|
step: 1,
|
|
545
510
|
min: 4,
|
|
546
511
|
max: 12,
|
|
547
|
-
onChange: e[13] || (e[13] = (l) => se(
|
|
512
|
+
onChange: e[13] || (e[13] = (l) => se(h.value.day, h.value.ids))
|
|
548
513
|
}, null, 8, ["modelValue"]),
|
|
549
|
-
|
|
514
|
+
d(a(T), {
|
|
550
515
|
style: { "margin-top": ".5rem" },
|
|
551
516
|
size: "small",
|
|
552
|
-
onClick: e[14] || (e[14] = (l) =>
|
|
517
|
+
onClick: e[14] || (e[14] = (l) => fe(h.value.day, h.value.ids))
|
|
553
518
|
}, {
|
|
554
|
-
default:
|
|
555
|
-
|
|
519
|
+
default: i(() => [
|
|
520
|
+
S(g(a(r)("workSchedule.delete")), 1)
|
|
556
521
|
]),
|
|
557
522
|
_: 1
|
|
558
523
|
})
|