@studio-west/employees 0.1.4 → 0.1.6
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 -1
- package/dist/VacationTable.js +318 -294
- package/dist/WorkTable.cjs +3 -3
- package/dist/WorkTable.js +205 -226
- package/dist/employees.css +1 -1
- package/dist/index-C8OllN4P.cjs +1 -0
- package/dist/index-DkDfHM4U.js +107 -0
- package/package.json +1 -1
- package/dist/index-Cig-zEKI.js +0 -41
- package/dist/index-r48mhCFw.cjs +0 -1
package/dist/VacationTable.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ref as g, openBlock as
|
|
2
|
-
import { p as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { ElSelect as
|
|
5
|
-
import { ContextMenu as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
for (const [k,
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
},
|
|
1
|
+
import { ref as g, openBlock as y, createElementBlock as w, createElementVNode as f, toDisplayString as D, unref as a, Fragment as U, renderList as P, normalizeClass as K, createCommentVNode as Y, watch as ee, computed as ae, resolveDirective as le, createBlock as T, withCtx as p, createVNode as c, createTextVNode as _, withDirectives as te } from "vue";
|
|
2
|
+
import { p as F, h as ne } from "./index-DkDfHM4U.js";
|
|
3
|
+
import { useI18n as ue } from "vue-i18n";
|
|
4
|
+
import { ElSelect as Z, ElOption as Q, ElButton as B, ElSkeleton as oe, ElSkeletonItem as J, ElTable as de, ElTableColumn as G, ElInput as se, ElDialog as ve, ElForm as ie, ElFormItem as re, ElSwitch as ce } from "element-plus";
|
|
5
|
+
import { ContextMenu as he, ContextMenuItem as H, ContextMenuSeparator as pe } from "@imengyu/vue3-context-menu";
|
|
6
|
+
const fe = (O, M) => {
|
|
7
|
+
const d = O.__vccOpts || O;
|
|
8
|
+
for (const [k, h] of M)
|
|
9
|
+
d[k] = h;
|
|
10
|
+
return d;
|
|
11
|
+
}, me = { class: "wrapper" }, ye = { class: "month_year" }, ge = { class: "text" }, be = { class: "week" }, De = { class: "month" }, ke = ["onClick"], xe = { key: 0 }, Se = { class: "month_year" }, we = { class: "text" }, Ce = { class: "week" }, Ee = { class: "month" }, _e = ["onClick"], $e = {
|
|
12
12
|
__name: "DataPicker",
|
|
13
13
|
props: {
|
|
14
14
|
data: Object,
|
|
@@ -16,134 +16,156 @@ const pe = (G, $) => {
|
|
|
16
16
|
// range | solid
|
|
17
17
|
},
|
|
18
18
|
emits: ["init"],
|
|
19
|
-
setup(
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
return
|
|
19
|
+
setup(O, { emit: M }) {
|
|
20
|
+
var z, W, X, q;
|
|
21
|
+
const d = g(/* @__PURE__ */ new Date()), k = g(/* @__PURE__ */ new Date()), h = O, R = M, b = g((/* @__PURE__ */ new Date()).getFullYear()), V = g((/* @__PURE__ */ new Date()).getMonth()), L = g((/* @__PURE__ */ new Date()).getFullYear()), m = g((/* @__PURE__ */ new Date()).getMonth()), v = g([]), C = g(0), j = g(0), S = g(-1), N = g(-1), $ = (r) => {
|
|
22
|
+
const u = r.split(r.match(/\D.*?\D?/));
|
|
23
|
+
return u[0].length > 2 ? u.join("-") + "T00:00:01" : u.reverse().join("-") + "T00:00:01";
|
|
24
24
|
};
|
|
25
|
-
typeof ((
|
|
26
|
-
const
|
|
27
|
-
let
|
|
28
|
-
for (let
|
|
29
|
-
|
|
30
|
-
for (let
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
for (let
|
|
35
|
-
|
|
25
|
+
typeof ((z = h.data) == null ? void 0 : z.startDate) < "u" && (d.value = new Date($(h.data.startDate)), b.value = d.value.getFullYear(), m.value = d.value.getMonth()), typeof ((W = h.data) == null ? void 0 : W.endDate) < "u" && (k.value = new Date($(h.data.endDate)), L.value = k.value.getFullYear(), V.value = k.value.getMonth());
|
|
26
|
+
const A = () => {
|
|
27
|
+
let r = new Date(b.value, m.value, 0);
|
|
28
|
+
for (let n = r.getDate() - r.getDay(); n <= r.getDate() && r.getDay() !== 6; n++)
|
|
29
|
+
C.value++, v.value.push({ day: n, month: r.getMonth(), year: r.getFullYear(), class: [] });
|
|
30
|
+
for (let n = 1; n <= new Date(b.value, m.value + 1, 0).getDate(); n++)
|
|
31
|
+
C.value++, v.value.push({ day: n, month: m.value, year: b.value, class: [] });
|
|
32
|
+
if (h.range === "range") {
|
|
33
|
+
j.value = new Date(b.value, m.value + 2, 0);
|
|
34
|
+
for (let n = 1; n <= j.value.getDate(); n++)
|
|
35
|
+
v.value.push({ day: n, month: j.value.getMonth(), year: j.value.getFullYear(), class: [] });
|
|
36
36
|
}
|
|
37
|
-
let
|
|
38
|
-
for (let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
let u = h.range === "range" ? 2 : 1, s = new Date(b.value, m.value + u, 1);
|
|
38
|
+
for (let n = 1; n <= 7 - s.getDay() && s.getDay() !== 0; n++)
|
|
39
|
+
v.value.push({ day: n, month: s.getMonth(), year: s.getFullYear(), class: [] });
|
|
40
|
+
h.data.holiday.length !== 0 && (h.data.holiday.preholidays.forEach((n) => {
|
|
41
|
+
let e = n.split("-");
|
|
42
|
+
const t = v.value.findIndex((o) => o.year == e[0] && o.month + 1 == e[1] && o.day == e[2]);
|
|
43
|
+
t !== -1 && (v.value[t].class[0] = "preholiday");
|
|
44
|
+
}), h.data.holiday.holidays.forEach((n) => {
|
|
45
|
+
let e = n.split("-");
|
|
46
|
+
const t = v.value.findIndex((o) => o.year == e[0] && o.month + 1 == e[1] && o.day == e[2]);
|
|
47
|
+
t !== -1 && (v.value[t].class[0] = "weekend");
|
|
48
|
+
}), h.data.holiday.holiday.forEach((n) => {
|
|
49
|
+
let e = n.split("-");
|
|
50
|
+
const t = v.value.findIndex((o) => o.year == e[0] && o.month + 1 == e[1] && o.day == e[2]);
|
|
51
|
+
t !== -1 && (v.value[t].class[0] = "holiday");
|
|
52
|
+
}), h.data.holiday.nowork.forEach((n) => {
|
|
53
|
+
let e = n.split("-");
|
|
54
|
+
const t = v.value.findIndex((o) => o.year == e[0] && o.month + 1 == e[1] && o.day == e[2]);
|
|
55
|
+
t !== -1 && (v.value[t].class[0] = "nowork");
|
|
56
|
+
}));
|
|
57
|
+
}, i = (r, u) => {
|
|
58
|
+
let s = r - u + 1;
|
|
59
|
+
for (let n = 0; n <= r - u; n++)
|
|
60
|
+
v.value[n + u].class[0] === "holiday" && s--;
|
|
61
|
+
return s;
|
|
62
|
+
}, x = (r, u) => {
|
|
63
|
+
const s = F(new Date(r.year, r.month, r.day), "{dd}.{m}.{Y}");
|
|
64
|
+
if (h.range === "range")
|
|
65
|
+
if (console.log(S.value), N.value !== -1)
|
|
66
|
+
v.value[N.value].class[1] = "", v.value[S.value].class[1] = "", S.value = u, N.value = -1, v.value[u].class[1] = "active";
|
|
46
67
|
else if (S.value !== -1) {
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
S.value >
|
|
68
|
+
N.value = u, v.value[u].class[1] = "active";
|
|
69
|
+
let n = F(new Date(v.value[S.value].year, v.value[S.value].month, v.value[S.value].day), "{dd}.{m}.{Y}");
|
|
70
|
+
S.value > u ? R("input", { dateStart: s, dateEnd: n, count: i(S.value, u) }) : R("input", { dateStart: n, dateEnd: s, count: i(u, S.value) });
|
|
50
71
|
} else
|
|
51
|
-
S.value =
|
|
72
|
+
S.value = u, v.value[u].class[1] = "active";
|
|
52
73
|
else
|
|
53
|
-
|
|
74
|
+
v.value[S.value].class[1] = "", S.value = u, v.value[u].class[1] = "active", R("input", { dateStart: s, count: 1 });
|
|
54
75
|
};
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
76
|
+
A(), typeof ((X = h.data) == null ? void 0 : X.startDate) < "u" && (S.value = v.value.findIndex((r) => r.day === d.value.getDate() && r.month === m.value && r.year === b.value), v.value[S.value].class[1] = "active"), typeof ((q = h.data) == null ? void 0 : q.endDate) < "u" && h.range === "range" && (N.value = v.value.findIndex((r) => r.day === k.value.getDate() && r.month === V.value && r.year === L.value), v.value[N.value].class[1] = "active");
|
|
77
|
+
const I = (r, u) => {
|
|
78
|
+
v.value = [], C.value = 0, d.value = new Date(r, u, 1), b.value = d.value.getFullYear(), m.value = d.value.getMonth(), A();
|
|
58
79
|
};
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
onClick:
|
|
80
|
+
return (r, u) => (y(), w("div", me, [
|
|
81
|
+
f("div", null, [
|
|
82
|
+
f("p", ye, [
|
|
83
|
+
f("span", null, [
|
|
84
|
+
f("button", {
|
|
85
|
+
onClick: u[0] || (u[0] = (s) => I(b.value - 1, m.value))
|
|
65
86
|
}, "«"),
|
|
66
|
-
|
|
67
|
-
onClick:
|
|
87
|
+
f("button", {
|
|
88
|
+
onClick: u[1] || (u[1] = (s) => I(b.value, m.value - 1))
|
|
68
89
|
}, "‹")
|
|
69
90
|
]),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
91
|
+
f("span", ge, [
|
|
92
|
+
f("button", null, D(b.value), 1),
|
|
93
|
+
f("button", null, D(a(F)(d.value, "{F}")), 1)
|
|
73
94
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
onClick:
|
|
95
|
+
f("span", null, [
|
|
96
|
+
f("button", {
|
|
97
|
+
onClick: u[2] || (u[2] = (s) => I(b.value, m.value + 1))
|
|
77
98
|
}, "›"),
|
|
78
|
-
|
|
79
|
-
onClick:
|
|
99
|
+
f("button", {
|
|
100
|
+
onClick: u[3] || (u[3] = (s) => I(b.value + 1, m.value))
|
|
80
101
|
}, "»")
|
|
81
102
|
])
|
|
82
103
|
]),
|
|
83
|
-
|
|
84
|
-
(
|
|
85
|
-
key:
|
|
104
|
+
f("div", be, [
|
|
105
|
+
(y(), w(U, null, P(7, (s, n) => f("button", {
|
|
106
|
+
key: n,
|
|
86
107
|
class: "disabled"
|
|
87
|
-
}, D(a(
|
|
108
|
+
}, D(a(F)(new Date(1970, 1, s), "{D}")), 1)), 64))
|
|
88
109
|
]),
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
|
|
110
|
+
f("div", De, [
|
|
111
|
+
(y(!0), w(U, null, P(v.value, (s, n) => (y(), w(U, { key: n }, [
|
|
112
|
+
n <= C.value + 5 - new Date(b.value, m.value + 1, 0).getDay() ? (y(), w("button", {
|
|
92
113
|
key: 0,
|
|
93
|
-
class:
|
|
94
|
-
onClick: (
|
|
95
|
-
}, D(
|
|
114
|
+
class: K(s.month === m.value ? s.class : "disabled"),
|
|
115
|
+
onClick: (e) => x(s, n)
|
|
116
|
+
}, D(s.day), 11, ke)) : Y("", !0)
|
|
96
117
|
], 64))), 128))
|
|
97
118
|
])
|
|
98
119
|
]),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
onClick:
|
|
120
|
+
h.range === "range" ? (y(), w("div", xe, [
|
|
121
|
+
f("p", Se, [
|
|
122
|
+
f("span", null, [
|
|
123
|
+
f("button", {
|
|
124
|
+
onClick: u[4] || (u[4] = (s) => I(b.value - 1, m.value))
|
|
104
125
|
}, "«"),
|
|
105
|
-
|
|
106
|
-
onClick:
|
|
126
|
+
f("button", {
|
|
127
|
+
onClick: u[5] || (u[5] = (s) => I(b.value, m.value - 1))
|
|
107
128
|
}, "‹")
|
|
108
129
|
]),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
130
|
+
f("span", we, [
|
|
131
|
+
f("button", null, D(new Date(b.value, m.value + 1).getFullYear()), 1),
|
|
132
|
+
f("button", null, D(a(F)(d.value.setMonth(m.value + 1), "{F}")), 1)
|
|
112
133
|
]),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
onClick:
|
|
134
|
+
f("span", null, [
|
|
135
|
+
f("button", {
|
|
136
|
+
onClick: u[6] || (u[6] = (s) => I(b.value, m.value + 1))
|
|
116
137
|
}, "›"),
|
|
117
|
-
|
|
118
|
-
onClick:
|
|
138
|
+
f("button", {
|
|
139
|
+
onClick: u[7] || (u[7] = (s) => I(b.value + 1, m.value))
|
|
119
140
|
}, "»")
|
|
120
141
|
])
|
|
121
142
|
]),
|
|
122
|
-
|
|
123
|
-
(
|
|
124
|
-
key:
|
|
143
|
+
f("div", Ce, [
|
|
144
|
+
(y(), w(U, null, P(7, (s, n) => f("button", {
|
|
145
|
+
key: n,
|
|
125
146
|
class: "disabled"
|
|
126
|
-
}, D(a(
|
|
147
|
+
}, D(a(F)(new Date(1970, 1, s), "{D}")), 1)), 64))
|
|
127
148
|
]),
|
|
128
|
-
|
|
129
|
-
(
|
|
130
|
-
|
|
149
|
+
f("div", Ee, [
|
|
150
|
+
(y(!0), w(U, null, P(v.value, (s, n) => (y(), w(U, { key: n }, [
|
|
151
|
+
n >= C.value - new Date(b.value, m.value + 1, 1).getDay() ? (y(), w("button", {
|
|
131
152
|
key: 0,
|
|
132
|
-
class:
|
|
133
|
-
onClick: (
|
|
134
|
-
}, D(
|
|
153
|
+
class: K(s.month === j.value.getMonth() ? s.class : "disabled"),
|
|
154
|
+
onClick: (e) => x(s, n)
|
|
155
|
+
}, D(s.day), 11, _e)) : Y("", !0)
|
|
135
156
|
], 64))), 128))
|
|
136
157
|
])
|
|
137
158
|
])) : Y("", !0)
|
|
138
159
|
]));
|
|
139
160
|
}
|
|
140
|
-
},
|
|
161
|
+
}, Me = /* @__PURE__ */ fe($e, [["__scopeId", "data-v-a842f008"]]), Ve = {
|
|
141
162
|
key: 1,
|
|
142
|
-
class: "controls-container"
|
|
143
|
-
|
|
163
|
+
class: "controls-container",
|
|
164
|
+
style: { "margin-top": ".5rem" }
|
|
165
|
+
}, Ie = { key: 0 }, Te = {
|
|
144
166
|
key: 1,
|
|
145
167
|
style: { padding: "0 1rem .5rem" }
|
|
146
|
-
},
|
|
168
|
+
}, Ge = {
|
|
147
169
|
__name: "VacationTable",
|
|
148
170
|
props: {
|
|
149
171
|
checkEdit: { type: Boolean, default: () => !0 },
|
|
@@ -151,8 +173,8 @@ const pe = (G, $) => {
|
|
|
151
173
|
workSchedule: Object,
|
|
152
174
|
fullName: { type: String, default: "Вы" }
|
|
153
175
|
},
|
|
154
|
-
setup(
|
|
155
|
-
const
|
|
176
|
+
setup(O) {
|
|
177
|
+
const M = O, { t: d } = ue(), k = g([
|
|
156
178
|
// { name: 'Иванов Петр Михалыч',
|
|
157
179
|
// jobTitle: '(Ведущий работник месяца)',
|
|
158
180
|
// days: [{dateStart: "03.05.2024", dateEnd: "06.06.2024", note: 'забил - сказал он ослик', count: 14 },
|
|
@@ -172,48 +194,48 @@ const pe = (G, $) => {
|
|
|
172
194
|
// }
|
|
173
195
|
]);
|
|
174
196
|
g([]);
|
|
175
|
-
const
|
|
197
|
+
const h = g((/* @__PURE__ */ new Date()).getFullYear()), R = g(!1), b = g(!1), V = g(!1), L = g({
|
|
176
198
|
zIndex: 3,
|
|
177
199
|
minWidth: 230,
|
|
178
200
|
x: 500,
|
|
179
201
|
y: 200
|
|
180
|
-
}),
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}),
|
|
202
|
+
}), m = g(!1), v = g([]), C = g("Сектор разработок и эксплуатации сети"), j = g([{ value: "all", label: d("vacationSchedule.all"), key: "all" }]), S = g([{ value: h.value, label: h.value }, { value: h.value + 1, label: h.value + 1 }]), N = g(!1), $ = g([]), A = g(!1), i = g({ name: "Имя", length: 0, code: "" });
|
|
203
|
+
ee(C, async (e, t) => {
|
|
204
|
+
e !== t && ($.value = [], R.value = !1, M.odata.personalManagerData.forEach((o) => {
|
|
205
|
+
(o.Status !== "Увольнение" && o.Group === e || e === "all") && ($.value.some((l) => (l == null ? void 0 : l.activeText) === o.Role) || $.value.push({ val: !0, activeText: o.Role }));
|
|
206
|
+
}), z());
|
|
185
207
|
});
|
|
186
|
-
const x =
|
|
208
|
+
const x = ae(() => k.value.flatMap((e, t) => !e.days || e.days.length === 0 ? [{ ...e, key: 0, ids: t }] : e.days.map((o, l) => ({
|
|
187
209
|
ids: t,
|
|
188
|
-
key:
|
|
189
|
-
...
|
|
190
|
-
...
|
|
191
|
-
})))),
|
|
192
|
-
|
|
210
|
+
key: l,
|
|
211
|
+
...e,
|
|
212
|
+
...o
|
|
213
|
+
})))), I = async () => {
|
|
214
|
+
M.odata.getPersonalManagerData({}).then((e) => {
|
|
193
215
|
var t;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}),
|
|
216
|
+
C.value = (t = e.find((o) => o.Status !== "Увольнение" && o.Description === M.fullName)) == null ? void 0 : t.Group, e.forEach((o) => {
|
|
217
|
+
o.Status !== "Увольнение" && (j.value.some((l) => (l == null ? void 0 : l.value) === o.Group) || j.value.push({ value: o.Group, label: o.Group, key: o.Group }), o.Group === C.value && !$.value.some((l) => (l == null ? void 0 : l.activeText) === o.Role) && $.value.push({ val: !0, activeText: o.Role }));
|
|
218
|
+
}), z(), b.value = !1;
|
|
197
219
|
});
|
|
198
|
-
},
|
|
220
|
+
}, z = () => {
|
|
199
221
|
k.value = [];
|
|
200
|
-
let
|
|
201
|
-
|
|
202
|
-
t.Status !== "Увольнение" && t.Group ===
|
|
203
|
-
}),
|
|
204
|
-
},
|
|
205
|
-
|
|
222
|
+
let e = [];
|
|
223
|
+
M.odata.personalManagerData.forEach((t) => {
|
|
224
|
+
t.Status !== "Увольнение" && (t.Group === C.value || C.value === "all") && $.value.some((o) => o.val && o.activeText === t.Role) && (e.push(t.Code), k.value.push({ name: t.Description, days: [{ note: "" }], jobTitle: t.Role, code: t.Code }));
|
|
225
|
+
}), W(e), m.value = !1;
|
|
226
|
+
}, W = (e) => {
|
|
227
|
+
M.workSchedule.getAllVacations({ year: h.value }).then(
|
|
206
228
|
(t) => {
|
|
207
|
-
console.log(
|
|
208
|
-
k.value[
|
|
209
|
-
|
|
210
|
-
dateStart:
|
|
211
|
-
dateEnd:
|
|
229
|
+
console.log(e), e.forEach((o, l) => {
|
|
230
|
+
k.value[l].days = [{ note: "" }], t.forEach((E) => {
|
|
231
|
+
o === E.code && (console.log(E), typeof k.value[l].days[0].dateStart > "u" ? k.value[l].days[0] = {
|
|
232
|
+
dateStart: F(E.dateStart, "{dd}.{m}.{Y}"),
|
|
233
|
+
dateEnd: F(E.dateEnd, "{dd}.{m}.{Y}"),
|
|
212
234
|
note: E.note,
|
|
213
235
|
count: E.count
|
|
214
|
-
} : k.value[
|
|
215
|
-
dateStart:
|
|
216
|
-
dateEnd:
|
|
236
|
+
} : k.value[l].days.push({
|
|
237
|
+
dateStart: F(E.dateStart, "{dd}.{m}.{Y}"),
|
|
238
|
+
dateEnd: F(E.dateEnd, "{dd}.{m}.{Y}"),
|
|
217
239
|
note: E.note,
|
|
218
240
|
count: E.count
|
|
219
241
|
}));
|
|
@@ -221,206 +243,208 @@ const pe = (G, $) => {
|
|
|
221
243
|
});
|
|
222
244
|
}
|
|
223
245
|
);
|
|
224
|
-
},
|
|
225
|
-
if (
|
|
226
|
-
return x.value[
|
|
227
|
-
rowspan: x.value[
|
|
246
|
+
}, X = (e) => {
|
|
247
|
+
if (e.columnIndex < 3 && x.value[e.rowIndex].key < x.value[e.rowIndex].days.length)
|
|
248
|
+
return x.value[e.rowIndex].key === 0 ? {
|
|
249
|
+
rowspan: x.value[e.rowIndex].days.length,
|
|
228
250
|
colspan: 1
|
|
229
251
|
} : {
|
|
230
252
|
rowspan: 0,
|
|
231
253
|
colspan: 0
|
|
232
254
|
};
|
|
233
|
-
},
|
|
234
|
-
i.value.ids =
|
|
235
|
-
},
|
|
236
|
-
console.log(
|
|
255
|
+
}, q = (e, t, o, l) => {
|
|
256
|
+
i.value.ids = e.ids, i.value.key = e.key, i.value.startDate = e.dateStart, i.value.endDate = e.dateEnd, i.value.name = e.name, i.value.count = e.count, i.value.length = e.days.length, i.value.add = e.days.length > 0 && e.days[e.days.length - 1].count, i.value.level = t.level, i.value.holiday = v.value, L.value.y = l.clientY, L.value.x = l.clientX, t.level === 2 && t.no < 4 && (i.value.add || e.days.length > 1) && (V.value = !0), t.level === 3 && (V.value = !0);
|
|
257
|
+
}, r = (e) => {
|
|
258
|
+
console.log(e);
|
|
237
259
|
let t = k.value[i.value.ids];
|
|
238
|
-
switch (
|
|
260
|
+
switch (e) {
|
|
239
261
|
case "add":
|
|
240
262
|
t.days.push({ note: "" }), console.log(t.days.length);
|
|
241
263
|
break;
|
|
242
264
|
case "delete":
|
|
243
|
-
delete t.days.pop(),
|
|
265
|
+
delete t.days.pop(), n(i.value.ids);
|
|
244
266
|
break;
|
|
245
267
|
}
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
year:
|
|
254
|
-
code: k.value[
|
|
255
|
-
data: k.value[
|
|
268
|
+
V.value = !1;
|
|
269
|
+
}, u = (e) => {
|
|
270
|
+
A.value = e, i.value.count = e.count;
|
|
271
|
+
}, s = () => {
|
|
272
|
+
A.value && (k.value[i.value.ids].days[i.value.key] = { ...A.value, note: "" }, n(i.value.ids)), V.value = !1;
|
|
273
|
+
}, n = (e) => {
|
|
274
|
+
M.workSchedule.rewriteFull({
|
|
275
|
+
year: h.value,
|
|
276
|
+
code: k.value[e].code,
|
|
277
|
+
data: k.value[e].days.map((t) => (t.dateStart = t.dateStart.split(".").reverse().join("-"), t.dateEnd = t.dateEnd.split(".").reverse().join("-"), t))
|
|
256
278
|
});
|
|
257
279
|
};
|
|
258
|
-
return
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
280
|
+
return ne().then((e) => {
|
|
281
|
+
v.value = e, I();
|
|
282
|
+
}), (e, t) => {
|
|
283
|
+
const o = le("loading");
|
|
284
|
+
return y(), w("div", null, [
|
|
285
|
+
O.checkEdit ? (y(), T(a(Z), {
|
|
262
286
|
key: 0,
|
|
263
|
-
modelValue:
|
|
264
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
287
|
+
modelValue: C.value,
|
|
288
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => C.value = l),
|
|
265
289
|
placeholder: "Select",
|
|
266
290
|
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
267
291
|
}, {
|
|
268
|
-
default:
|
|
269
|
-
(
|
|
270
|
-
key:
|
|
271
|
-
label:
|
|
272
|
-
value:
|
|
292
|
+
default: p(() => [
|
|
293
|
+
(y(!0), w(U, null, P(j.value, (l) => (y(), T(a(Q), {
|
|
294
|
+
key: l.value,
|
|
295
|
+
label: l.label,
|
|
296
|
+
value: l.value
|
|
273
297
|
}, null, 8, ["label", "value"]))), 128))
|
|
274
298
|
]),
|
|
275
299
|
_: 1
|
|
276
300
|
}, 8, ["modelValue"])) : Y("", !0),
|
|
277
|
-
|
|
301
|
+
c(a(B), {
|
|
278
302
|
plain: "",
|
|
279
|
-
onClick: t[1] || (t[1] = (
|
|
303
|
+
onClick: t[1] || (t[1] = (l) => m.value = !0),
|
|
280
304
|
style: { "margin-bottom": ".5rem" }
|
|
281
305
|
}, {
|
|
282
|
-
default:
|
|
283
|
-
_(D(a(
|
|
306
|
+
default: p(() => [
|
|
307
|
+
_(D(a(d)("workSchedule.jobTitle")), 1)
|
|
284
308
|
]),
|
|
285
309
|
_: 1
|
|
286
310
|
}),
|
|
287
|
-
|
|
288
|
-
modelValue:
|
|
289
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
290
|
-
onChange:
|
|
311
|
+
c(a(Z), {
|
|
312
|
+
modelValue: h.value,
|
|
313
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => h.value = l),
|
|
314
|
+
onChange: z,
|
|
291
315
|
placeholder: "Year",
|
|
292
316
|
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
293
317
|
}, {
|
|
294
|
-
default:
|
|
295
|
-
(
|
|
296
|
-
key:
|
|
297
|
-
label:
|
|
298
|
-
value:
|
|
318
|
+
default: p(() => [
|
|
319
|
+
(y(!0), w(U, null, P(S.value, (l) => (y(), T(a(Q), {
|
|
320
|
+
key: l.value,
|
|
321
|
+
label: l.label,
|
|
322
|
+
value: l.value
|
|
299
323
|
}, null, 8, ["label", "value"]))), 128))
|
|
300
324
|
]),
|
|
301
325
|
_: 1
|
|
302
326
|
}, 8, ["modelValue"]),
|
|
303
|
-
|
|
327
|
+
c(a(oe), {
|
|
304
328
|
style: { width: "100%" },
|
|
305
329
|
loading: b.value,
|
|
306
330
|
animated: ""
|
|
307
331
|
}, {
|
|
308
|
-
template:
|
|
309
|
-
|
|
332
|
+
template: p(() => [
|
|
333
|
+
c(a(J), {
|
|
310
334
|
variant: "text",
|
|
311
335
|
style: { width: "100%", height: "2rem" }
|
|
312
336
|
}),
|
|
313
|
-
|
|
337
|
+
c(a(J), {
|
|
314
338
|
variant: "text",
|
|
315
339
|
style: { width: "180px", height: "4rem", "margin-right": "4px" }
|
|
316
340
|
}),
|
|
317
|
-
|
|
341
|
+
c(a(J), {
|
|
318
342
|
variant: "text",
|
|
319
343
|
style: { width: "calc( 100% - 184px)", height: "4rem" }
|
|
320
344
|
}),
|
|
321
|
-
|
|
345
|
+
c(a(J), {
|
|
322
346
|
variant: "text",
|
|
323
347
|
style: { width: "180px", height: "8rem", "margin-right": "4px" }
|
|
324
348
|
}),
|
|
325
|
-
|
|
349
|
+
c(a(J), {
|
|
326
350
|
variant: "text",
|
|
327
351
|
style: { width: "calc( 100% - 184px)", height: "8rem" }
|
|
328
352
|
})
|
|
329
353
|
]),
|
|
330
|
-
default:
|
|
331
|
-
|
|
354
|
+
default: p(() => [
|
|
355
|
+
c(a(de), {
|
|
332
356
|
id: "printTable",
|
|
333
357
|
data: x.value,
|
|
334
|
-
"span-method":
|
|
335
|
-
onCellClick:
|
|
358
|
+
"span-method": X,
|
|
359
|
+
onCellClick: q,
|
|
336
360
|
border: "",
|
|
337
361
|
style: { width: "100%" },
|
|
338
362
|
size: "small",
|
|
339
|
-
"empty-text": a(
|
|
363
|
+
"empty-text": a(d)("vacationSchedule.emptyText")
|
|
340
364
|
}, {
|
|
341
|
-
default:
|
|
342
|
-
|
|
343
|
-
label: a(
|
|
365
|
+
default: p(() => [
|
|
366
|
+
c(a(G), {
|
|
367
|
+
label: C.value !== "all" ? a(d)("vacationSchedule.title", { name: C.value }) : a(d)("vacationSchedule.enterprise") + ` ${h.value}`,
|
|
344
368
|
align: "center",
|
|
345
369
|
height: "34"
|
|
346
370
|
}, {
|
|
347
|
-
default:
|
|
348
|
-
|
|
349
|
-
label: a(
|
|
371
|
+
default: p(() => [
|
|
372
|
+
c(a(G), {
|
|
373
|
+
label: a(d)("vacationSchedule.jobTitle"),
|
|
350
374
|
width: "180",
|
|
351
375
|
align: "center"
|
|
352
376
|
}, {
|
|
353
|
-
default:
|
|
354
|
-
_(D(x.value[
|
|
377
|
+
default: p((l) => [
|
|
378
|
+
_(D(x.value[l.$index].jobTitle), 1)
|
|
355
379
|
]),
|
|
356
380
|
_: 1
|
|
357
381
|
}, 8, ["label"]),
|
|
358
|
-
|
|
359
|
-
label: a(
|
|
382
|
+
c(a(G), {
|
|
383
|
+
label: a(d)("vacationSchedule.fullName"),
|
|
360
384
|
width: "180",
|
|
361
385
|
align: "center"
|
|
362
386
|
}, {
|
|
363
|
-
default:
|
|
364
|
-
_(D(x.value[
|
|
387
|
+
default: p((l) => [
|
|
388
|
+
_(D(x.value[l.$index].name), 1)
|
|
365
389
|
]),
|
|
366
390
|
_: 1
|
|
367
391
|
}, 8, ["label"]),
|
|
368
|
-
|
|
369
|
-
label: a(
|
|
392
|
+
c(a(G), {
|
|
393
|
+
label: a(d)("vacationSchedule.personnelNumber"),
|
|
370
394
|
align: "center"
|
|
371
395
|
}, {
|
|
372
|
-
default:
|
|
373
|
-
_(D(x.value[
|
|
396
|
+
default: p((l) => [
|
|
397
|
+
_(D(x.value[l.$index].code), 1)
|
|
374
398
|
]),
|
|
375
399
|
_: 1
|
|
376
400
|
}, 8, ["label"]),
|
|
377
|
-
|
|
378
|
-
label: a(
|
|
401
|
+
c(a(G), {
|
|
402
|
+
label: a(d)("vacationSchedule.vacation"),
|
|
379
403
|
align: "center"
|
|
380
404
|
}, {
|
|
381
|
-
default:
|
|
382
|
-
|
|
383
|
-
label: a(
|
|
405
|
+
default: p(() => [
|
|
406
|
+
c(a(G), {
|
|
407
|
+
label: a(d)("vacationSchedule.days"),
|
|
384
408
|
align: "center"
|
|
385
409
|
}, {
|
|
386
|
-
default:
|
|
387
|
-
_(D(x.value[
|
|
410
|
+
default: p((l) => [
|
|
411
|
+
_(D(x.value[l.$index].count), 1)
|
|
388
412
|
]),
|
|
389
413
|
_: 1
|
|
390
414
|
}, 8, ["label"]),
|
|
391
|
-
|
|
392
|
-
label: a(
|
|
415
|
+
c(a(G), {
|
|
416
|
+
label: a(d)("vacationSchedule.date"),
|
|
393
417
|
align: "center"
|
|
394
418
|
}, {
|
|
395
|
-
default:
|
|
396
|
-
_(D(x.value[
|
|
419
|
+
default: p((l) => [
|
|
420
|
+
_(D(x.value[l.$index].dateStart), 1)
|
|
397
421
|
]),
|
|
398
422
|
_: 1
|
|
399
423
|
}, 8, ["label"]),
|
|
400
|
-
|
|
401
|
-
label: a(
|
|
424
|
+
c(a(G), {
|
|
425
|
+
label: a(d)("vacationSchedule.endDate"),
|
|
402
426
|
align: "center"
|
|
403
427
|
}, {
|
|
404
|
-
default:
|
|
405
|
-
_(D(x.value[
|
|
428
|
+
default: p((l) => [
|
|
429
|
+
_(D(x.value[l.$index].dateEnd), 1)
|
|
406
430
|
]),
|
|
407
431
|
_: 1
|
|
408
432
|
}, 8, ["label"])
|
|
409
433
|
]),
|
|
410
434
|
_: 1
|
|
411
435
|
}, 8, ["label"]),
|
|
412
|
-
|
|
413
|
-
label: a(
|
|
436
|
+
c(a(G), {
|
|
437
|
+
label: a(d)("vacationSchedule.note"),
|
|
414
438
|
align: "center"
|
|
415
439
|
}, {
|
|
416
|
-
default:
|
|
417
|
-
|
|
418
|
-
modelValue: k.value[x.value[
|
|
419
|
-
"onUpdate:modelValue": (E) => k.value[x.value[
|
|
440
|
+
default: p((l) => [
|
|
441
|
+
c(a(se), {
|
|
442
|
+
modelValue: k.value[x.value[l.$index].ids].days[x.value[l.$index].key].note,
|
|
443
|
+
"onUpdate:modelValue": (E) => k.value[x.value[l.$index].ids].days[x.value[l.$index].key].note = E,
|
|
420
444
|
style: { width: "100%" },
|
|
421
445
|
placeholder: " ",
|
|
422
446
|
class: "noBorder",
|
|
423
|
-
onBlur: (E) =>
|
|
447
|
+
onBlur: (E) => n(x.value[l.$index].ids)
|
|
424
448
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"])
|
|
425
449
|
]),
|
|
426
450
|
_: 1
|
|
@@ -434,91 +458,91 @@ const pe = (G, $) => {
|
|
|
434
458
|
]),
|
|
435
459
|
_: 1
|
|
436
460
|
}, 8, ["loading"]),
|
|
437
|
-
|
|
438
|
-
|
|
461
|
+
O.checkEdit ? (y(), w("div", Ve, [
|
|
462
|
+
R.value ? Y("", !0) : (y(), T(a(B), {
|
|
439
463
|
key: 0,
|
|
440
464
|
type: "primary",
|
|
441
|
-
onClick:
|
|
465
|
+
onClick: e.confirmData
|
|
442
466
|
}, {
|
|
443
|
-
default:
|
|
444
|
-
_(D(a(
|
|
467
|
+
default: p(() => [
|
|
468
|
+
_(D(a(d)("vacationSchedule.sendInformation")), 1)
|
|
445
469
|
]),
|
|
446
470
|
_: 1
|
|
447
471
|
}, 8, ["onClick"])),
|
|
448
|
-
|
|
472
|
+
R.value ? Y("", !0) : (y(), T(a(B), {
|
|
449
473
|
key: 1,
|
|
450
474
|
type: "primary",
|
|
451
|
-
onClick:
|
|
475
|
+
onClick: e.confirmData
|
|
452
476
|
}, {
|
|
453
|
-
default:
|
|
454
|
-
_(D(a(
|
|
477
|
+
default: p(() => [
|
|
478
|
+
_(D(a(d)("vacationSchedule.agreeOn")), 1)
|
|
455
479
|
]),
|
|
456
480
|
_: 1
|
|
457
481
|
}, 8, ["onClick"])),
|
|
458
|
-
|
|
482
|
+
R.value ? Y("", !0) : (y(), T(a(B), {
|
|
459
483
|
key: 2,
|
|
460
484
|
type: "primary",
|
|
461
|
-
onClick:
|
|
485
|
+
onClick: e.confirmData
|
|
462
486
|
}, {
|
|
463
|
-
default:
|
|
464
|
-
_(D(a(
|
|
487
|
+
default: p(() => [
|
|
488
|
+
_(D(a(d)("vacationSchedule.reject")), 1)
|
|
465
489
|
]),
|
|
466
490
|
_: 1
|
|
467
491
|
}, 8, ["onClick"]))
|
|
468
492
|
])) : Y("", !0),
|
|
469
|
-
|
|
470
|
-
disabled:
|
|
493
|
+
te((y(), T(a(B), {
|
|
494
|
+
disabled: N.value,
|
|
471
495
|
plain: "",
|
|
472
|
-
onClick:
|
|
496
|
+
onClick: e.exportToExcel,
|
|
473
497
|
style: { "margin-top": ".5rem" }
|
|
474
498
|
}, {
|
|
475
|
-
default:
|
|
476
|
-
_(D(a(
|
|
499
|
+
default: p(() => [
|
|
500
|
+
_(D(a(d)("workSchedule.exportExcel")), 1)
|
|
477
501
|
]),
|
|
478
502
|
_: 1
|
|
479
503
|
}, 8, ["disabled", "onClick"])), [
|
|
480
|
-
[
|
|
504
|
+
[o, N.value]
|
|
481
505
|
]),
|
|
482
|
-
|
|
483
|
-
title: a(
|
|
484
|
-
modelValue:
|
|
485
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
506
|
+
c(a(ve), {
|
|
507
|
+
title: a(d)("workSchedule.jobTitle"),
|
|
508
|
+
modelValue: m.value,
|
|
509
|
+
"onUpdate:modelValue": t[4] || (t[4] = (l) => m.value = l),
|
|
486
510
|
width: "400px"
|
|
487
511
|
}, {
|
|
488
|
-
footer:
|
|
489
|
-
|
|
490
|
-
onClick: t[3] || (t[3] = (
|
|
512
|
+
footer: p(() => [
|
|
513
|
+
c(a(B), {
|
|
514
|
+
onClick: t[3] || (t[3] = (l) => m.value = !1),
|
|
491
515
|
size: "default"
|
|
492
516
|
}, {
|
|
493
|
-
default:
|
|
494
|
-
_(D(
|
|
517
|
+
default: p(() => [
|
|
518
|
+
_(D(e.$t("workSchedule.cancel")), 1)
|
|
495
519
|
]),
|
|
496
520
|
_: 1
|
|
497
521
|
}),
|
|
498
|
-
|
|
522
|
+
c(a(B), {
|
|
499
523
|
size: "default",
|
|
500
524
|
type: "primary",
|
|
501
|
-
onClick:
|
|
525
|
+
onClick: z
|
|
502
526
|
}, {
|
|
503
|
-
default:
|
|
504
|
-
_(D(
|
|
527
|
+
default: p(() => [
|
|
528
|
+
_(D(e.$t("workSchedule.select")), 1)
|
|
505
529
|
]),
|
|
506
530
|
_: 1
|
|
507
531
|
})
|
|
508
532
|
]),
|
|
509
|
-
default:
|
|
510
|
-
|
|
533
|
+
default: p(() => [
|
|
534
|
+
c(a(ie), {
|
|
511
535
|
ref: "dialogForm",
|
|
512
|
-
model:
|
|
536
|
+
model: $.value,
|
|
513
537
|
autocomplete: "on"
|
|
514
538
|
}, {
|
|
515
|
-
default:
|
|
516
|
-
(
|
|
517
|
-
default:
|
|
518
|
-
|
|
519
|
-
modelValue:
|
|
520
|
-
"onUpdate:modelValue": (E) =>
|
|
521
|
-
"active-text":
|
|
539
|
+
default: p(() => [
|
|
540
|
+
(y(!0), w(U, null, P($.value, (l) => (y(), T(a(re), null, {
|
|
541
|
+
default: p(() => [
|
|
542
|
+
c(a(ce), {
|
|
543
|
+
modelValue: l.val,
|
|
544
|
+
"onUpdate:modelValue": (E) => l.val = E,
|
|
545
|
+
"active-text": l.activeText
|
|
522
546
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-text"])
|
|
523
547
|
]),
|
|
524
548
|
_: 2
|
|
@@ -529,46 +553,46 @@ const pe = (G, $) => {
|
|
|
529
553
|
]),
|
|
530
554
|
_: 1
|
|
531
555
|
}, 8, ["title", "modelValue"]),
|
|
532
|
-
|
|
533
|
-
show:
|
|
534
|
-
"onUpdate:show": t[8] || (t[8] = (
|
|
535
|
-
options:
|
|
556
|
+
c(a(he), {
|
|
557
|
+
show: V.value,
|
|
558
|
+
"onUpdate:show": t[8] || (t[8] = (l) => V.value = l),
|
|
559
|
+
options: L.value
|
|
536
560
|
}, {
|
|
537
|
-
default:
|
|
538
|
-
|
|
539
|
-
label: i.value.level === 3 && typeof i.value.count < "u" ? i.value.name + " " + i.value.count + " " + a(
|
|
561
|
+
default: p(() => [
|
|
562
|
+
c(a(H), {
|
|
563
|
+
label: i.value.level === 3 && typeof i.value.count < "u" ? i.value.name + " " + i.value.count + " " + a(d)("vacationSchedule.day", i.value.count) : i.value.name,
|
|
540
564
|
disabled: ""
|
|
541
565
|
}, null, 8, ["label"]),
|
|
542
|
-
|
|
543
|
-
i.value.level === 2 ? (
|
|
544
|
-
i.value.length > 1 ? (
|
|
566
|
+
c(a(pe)),
|
|
567
|
+
i.value.level === 2 ? (y(), w("div", Ie, [
|
|
568
|
+
i.value.length > 1 ? (y(), T(a(H), {
|
|
545
569
|
key: 0,
|
|
546
|
-
label: a(
|
|
547
|
-
onClick: t[5] || (t[5] = (
|
|
570
|
+
label: a(d)("vacationSchedule.deleteLast"),
|
|
571
|
+
onClick: t[5] || (t[5] = (l) => r("delete"))
|
|
548
572
|
}, null, 8, ["label"])) : Y("", !0),
|
|
549
|
-
i.value.add ? (
|
|
573
|
+
i.value.add ? (y(), T(a(H), {
|
|
550
574
|
key: 1,
|
|
551
|
-
label: a(
|
|
552
|
-
onClick: t[6] || (t[6] = (
|
|
575
|
+
label: a(d)("vacationSchedule.addVacation"),
|
|
576
|
+
onClick: t[6] || (t[6] = (l) => r("add"))
|
|
553
577
|
}, null, 8, ["label"])) : Y("", !0)
|
|
554
|
-
])) : (
|
|
555
|
-
|
|
578
|
+
])) : (y(), w("div", Te, [
|
|
579
|
+
c(Me, {
|
|
556
580
|
data: i.value,
|
|
557
581
|
range: "range",
|
|
558
|
-
onInput:
|
|
582
|
+
onInput: u
|
|
559
583
|
}, null, 8, ["data"]),
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
onClick: t[7] || (t[7] = (
|
|
584
|
+
f("div", null, [
|
|
585
|
+
c(a(B), {
|
|
586
|
+
onClick: t[7] || (t[7] = (l) => V.value = !1)
|
|
563
587
|
}, {
|
|
564
|
-
default:
|
|
565
|
-
_(D(a(
|
|
588
|
+
default: p(() => [
|
|
589
|
+
_(D(a(d)("vacationSchedule.cancel")), 1)
|
|
566
590
|
]),
|
|
567
591
|
_: 1
|
|
568
592
|
}),
|
|
569
|
-
|
|
570
|
-
default:
|
|
571
|
-
_(D(a(
|
|
593
|
+
c(a(B), { onClick: s }, {
|
|
594
|
+
default: p(() => [
|
|
595
|
+
_(D(a(d)("vacationSchedule.save")), 1)
|
|
572
596
|
]),
|
|
573
597
|
_: 1
|
|
574
598
|
})
|
|
@@ -582,5 +606,5 @@ const pe = (G, $) => {
|
|
|
582
606
|
}
|
|
583
607
|
};
|
|
584
608
|
export {
|
|
585
|
-
|
|
609
|
+
Ge as default
|
|
586
610
|
};
|