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