@studio-west/employees 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SheetTable.cjs +3 -3
- package/dist/SheetTable.js +71 -71
- package/dist/WorkTable.cjs +4 -4
- package/dist/WorkTable.js +152 -152
- package/package.json +1 -1
package/dist/SheetTable.js
CHANGED
|
@@ -71,7 +71,7 @@ function Un() {
|
|
|
71
71
|
K,
|
|
72
72
|
{ first_word: A }
|
|
73
73
|
);
|
|
74
|
-
S ? Y.push(
|
|
74
|
+
S ? Y.push(T(D, R, S)) : Y.push(D);
|
|
75
75
|
}
|
|
76
76
|
return Y.join("-");
|
|
77
77
|
}
|
|
@@ -118,7 +118,7 @@ function Un() {
|
|
|
118
118
|
}
|
|
119
119
|
return !1;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function T($, _, R) {
|
|
122
122
|
var W;
|
|
123
123
|
if (_ === "nominative") W = ".";
|
|
124
124
|
else
|
|
@@ -1301,7 +1301,7 @@ function Wn() {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
return null;
|
|
1303
1303
|
}
|
|
1304
|
-
class
|
|
1304
|
+
class T {
|
|
1305
1305
|
/**
|
|
1306
1306
|
* Пожалуйста, используйте статические методы create
|
|
1307
1307
|
* и createOrNull вместо конструктора.
|
|
@@ -1309,7 +1309,7 @@ function Wn() {
|
|
|
1309
1309
|
* @param {RussianNouns.Lemma|Object} o
|
|
1310
1310
|
*/
|
|
1311
1311
|
constructor(e) {
|
|
1312
|
-
e instanceof
|
|
1312
|
+
e instanceof T ? (this._txt = e._txt, this._lc = e._lc, this._hash = e._hash, this._flags = e._flags) : (e.pluraleTantum ? this._flags = 5 : this._flags = 1 + re.indexOf(e.gender), this._txt = e.text, this._lc = e.text.toLowerCase(), this._hash = Ie(this._lc), this._flags |= 8 * (e.indeclinable & 1), this._flags |= 16 * (e.animate & 1), this._flags |= 32 * (e.surname & 1), this._flags |= 64 * (e.name & 1), this._flags |= 128 * (e.transport & 1), this._flags |= 65536 * (2 + vt(this._lc, e.pluraleTantum, e.gender, e.indeclinable)));
|
|
1313
1313
|
}
|
|
1314
1314
|
/**
|
|
1315
1315
|
* Если параметр — уже лемма, вернет тот же объект, а не копию.
|
|
@@ -1339,7 +1339,7 @@ function Wn() {
|
|
|
1339
1339
|
* @deprecated since version 2.0.0
|
|
1340
1340
|
*/
|
|
1341
1341
|
newText(e) {
|
|
1342
|
-
const a = new
|
|
1342
|
+
const a = new T(this);
|
|
1343
1343
|
return a._txt = e(this), a._lc = a._txt.toLowerCase(), a._hash = Ie(a.lower()), a._flags &= 65535, a._flags |= 65536 * (2 + vt(
|
|
1344
1344
|
a.lower(),
|
|
1345
1345
|
a.isPluraleTantum(),
|
|
@@ -1353,7 +1353,7 @@ function Wn() {
|
|
|
1353
1353
|
newGender(e) {
|
|
1354
1354
|
const a = e(this);
|
|
1355
1355
|
if (re.includes(a)) {
|
|
1356
|
-
const n = new
|
|
1356
|
+
const n = new T(this);
|
|
1357
1357
|
return n._flags &= 65528, n._flags |= 1 + re.indexOf(a), n._flags |= 65536 * (2 + vt(
|
|
1358
1358
|
n.lower(),
|
|
1359
1359
|
n.isPluraleTantum(),
|
|
@@ -1363,7 +1363,7 @@ function Wn() {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
equals(e) {
|
|
1366
|
-
return e instanceof
|
|
1366
|
+
return e instanceof T && this._flags === e._flags && this.lower() === e.lower();
|
|
1367
1367
|
}
|
|
1368
1368
|
text() {
|
|
1369
1369
|
return this._txt;
|
|
@@ -2002,7 +2002,7 @@ function Wn() {
|
|
|
2002
2002
|
"медвежий",
|
|
2003
2003
|
"носорожий",
|
|
2004
2004
|
"миножий"
|
|
2005
|
-
], i = z(Xe), s = z(Xe.map((l) => S(l, 2) + "ьи")),
|
|
2005
|
+
], i = z(Xe), s = z(Xe.map((l) => S(l, 2) + "ьи")), O = z([
|
|
2006
2006
|
"мой",
|
|
2007
2007
|
"ной",
|
|
2008
2008
|
"дой",
|
|
@@ -2067,7 +2067,7 @@ function Wn() {
|
|
|
2067
2067
|
"гкий",
|
|
2068
2068
|
"овкий",
|
|
2069
2069
|
"авкий"
|
|
2070
|
-
]), d = (l, e) => D(e, 2) === "ый" || (e.endsWith("кривой") || F(e,
|
|
2070
|
+
]), d = (l, e) => D(e, 2) === "ый" || (e.endsWith("кривой") || F(e, O)) && X(e) >= 2, C = z([
|
|
2071
2071
|
"ий",
|
|
2072
2072
|
"ие",
|
|
2073
2073
|
"чье",
|
|
@@ -2187,23 +2187,23 @@ function Wn() {
|
|
|
2187
2187
|
* Пожалуйста, используйте `Lemma.create`
|
|
2188
2188
|
* или `Lemma.createOrNull` вместо конструктора.
|
|
2189
2189
|
*/
|
|
2190
|
-
Lemma:
|
|
2190
|
+
Lemma: T,
|
|
2191
2191
|
/**
|
|
2192
2192
|
* То же, что Lemma.create
|
|
2193
2193
|
*/
|
|
2194
|
-
createLemma: (l) =>
|
|
2194
|
+
createLemma: (l) => T.create(l),
|
|
2195
2195
|
/**
|
|
2196
2196
|
* То же, что Lemma.createOrNull
|
|
2197
2197
|
*/
|
|
2198
|
-
createLemmaOrNull: (l) =>
|
|
2198
|
+
createLemmaOrNull: (l) => T.createOrNull(l),
|
|
2199
2199
|
/**
|
|
2200
2200
|
* @deprecated since version 2.3.0
|
|
2201
2201
|
*/
|
|
2202
|
-
getDeclension: (l) =>
|
|
2202
|
+
getDeclension: (l) => T.create(l).getDeclension(),
|
|
2203
2203
|
/**
|
|
2204
2204
|
* @deprecated since version 2.3.0
|
|
2205
2205
|
*/
|
|
2206
|
-
getSchoolDeclension: (l) =>
|
|
2206
|
+
getSchoolDeclension: (l) => T.create(l).getSchoolDeclension(),
|
|
2207
2207
|
/**
|
|
2208
2208
|
* Словарь ударений. В него можно вносить изменения в рантайме,
|
|
2209
2209
|
* и это будет влиять на поведение экземпляра движка, который
|
|
@@ -2228,7 +2228,7 @@ function Wn() {
|
|
|
2228
2228
|
const L = I.split("-"), V = (B, G) => B.length !== G || B.split("").some((Z) => !"SsbeE".includes(Z));
|
|
2229
2229
|
if (L.length !== 2 || V(L[0], 7) || V(L[1], 6))
|
|
2230
2230
|
throw new Error("Bad settings format.");
|
|
2231
|
-
const J =
|
|
2231
|
+
const J = T.create(p), de = n(J);
|
|
2232
2232
|
let P = e.get(de);
|
|
2233
2233
|
P instanceof Array || (P = [], e.set(de, P));
|
|
2234
2234
|
const Ee = J._flags & 65535 | t(J) << 16, k = P.find((B) => Ee === B[0]);
|
|
@@ -2295,7 +2295,7 @@ function Wn() {
|
|
|
2295
2295
|
* Второй предложный падеж (местный падеж, локатив) не включен в предложный.
|
|
2296
2296
|
*/
|
|
2297
2297
|
decline(e, a, n) {
|
|
2298
|
-
const t =
|
|
2298
|
+
const t = T.create(e);
|
|
2299
2299
|
return sn(this, t, a, n);
|
|
2300
2300
|
}
|
|
2301
2301
|
/**
|
|
@@ -2303,7 +2303,7 @@ function Wn() {
|
|
|
2303
2303
|
* @returns {Array}
|
|
2304
2304
|
*/
|
|
2305
2305
|
pluralize(e) {
|
|
2306
|
-
const a =
|
|
2306
|
+
const a = T.create(e);
|
|
2307
2307
|
return a.isPluraleTantum() ? [a.text()] : cn(this, a);
|
|
2308
2308
|
}
|
|
2309
2309
|
/**
|
|
@@ -2327,7 +2327,7 @@ function Wn() {
|
|
|
2327
2327
|
* Может быть пустым, если местный падеж в ед. ч. совпадает с предложным или не имеет смысла.
|
|
2328
2328
|
*/
|
|
2329
2329
|
getLocativeForms(e) {
|
|
2330
|
-
const a = this, n =
|
|
2330
|
+
const a = this, n = T.create(e), t = n.getDeclension();
|
|
2331
2331
|
if (t && t >= 0) {
|
|
2332
2332
|
const E = oe.get(b(n));
|
|
2333
2333
|
if (E instanceof Array)
|
|
@@ -2419,7 +2419,7 @@ function Wn() {
|
|
|
2419
2419
|
for (let k of P) {
|
|
2420
2420
|
const B = Object.assign({}, I);
|
|
2421
2421
|
B.text = k;
|
|
2422
|
-
const G = b(
|
|
2422
|
+
const G = b(T.create(B));
|
|
2423
2423
|
let Z = l.get(G);
|
|
2424
2424
|
Z || (Z = [], l.set(G, Z));
|
|
2425
2425
|
for (let $e of V)
|
|
@@ -2581,7 +2581,7 @@ function Wn() {
|
|
|
2581
2581
|
throw new Error("unsupported");
|
|
2582
2582
|
}
|
|
2583
2583
|
function lt(l, e) {
|
|
2584
|
-
const a = new
|
|
2584
|
+
const a = new T(l);
|
|
2585
2585
|
return a._txt = e, a._lc = e.toLowerCase(), a._hash = Ie(a.lower()), Object.freeze(a);
|
|
2586
2586
|
}
|
|
2587
2587
|
function st(l, e, a, n) {
|
|
@@ -3848,7 +3848,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3848
3848
|
},
|
|
3849
3849
|
setup(me) {
|
|
3850
3850
|
new Pn.Engine();
|
|
3851
|
-
const N = me, { t: o, d: re } = An(), U = Q(!1), H = Q([]), Ne = Q("0"),
|
|
3851
|
+
const N = me, { t: o, d: re } = An(), U = Q(!1), H = Q([]), Ne = Q("0"), T = Q(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(Ne.value))), b = Q([]), $ = Q([]), _ = Q("100%"), R = Q("true"), W = Q([]), K = Q([
|
|
3852
3852
|
{ value: "Я", label: o("sheet.valid.1") },
|
|
3853
3853
|
{ value: "К", label: o("sheet.valid.2") },
|
|
3854
3854
|
{ value: "ОТ", label: o("sheet.valid.3") },
|
|
@@ -3877,19 +3877,19 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3877
3877
|
// ]
|
|
3878
3878
|
// }
|
|
3879
3879
|
]), F = Q(""), Me = Q("_____"), f = Bt(() => H.value.flatMap((i, s) => {
|
|
3880
|
-
const
|
|
3881
|
-
i.days.forEach((u) => d.set(u.day, { ...u })),
|
|
3880
|
+
const O = z.value.find((u) => u.code === i.code), d = /* @__PURE__ */ new Map();
|
|
3881
|
+
i.days.forEach((u) => d.set(u.day, { ...u })), O && O.days.forEach((u) => d.set(u.day, { ...u }));
|
|
3882
3882
|
const C = Array.from(d.values());
|
|
3883
3883
|
return [{ ...i, days: C, key: 0, ids: s, numberNonAppearing: [0, 0] }, { ...i, days: C, key: 1, ids: s, numberNonAppearing: [0, 0] }];
|
|
3884
3884
|
}));
|
|
3885
3885
|
qe($, async (i, s) => {
|
|
3886
|
-
i !== s && (g.value = [], N.odata.personal.forEach((
|
|
3887
|
-
i.includes(
|
|
3886
|
+
i !== s && (g.value = [], N.odata.personal.forEach((O) => {
|
|
3887
|
+
i.includes(O.divisionName) && (g.value.some((d) => (d == null ? void 0 : d.activeText) === O.roleName) || g.value.push({ val: !0, activeText: O.roleName }));
|
|
3888
3888
|
}), He());
|
|
3889
3889
|
}), qe(Ne, (i) => {
|
|
3890
|
-
|
|
3890
|
+
T.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(i)), je(), He();
|
|
3891
3891
|
}), qe(D, () => se.value = he.value), qe(X, () => se.value = he.value), qe(pe, () => se.value = he.value);
|
|
3892
|
-
const Ye = async (i, s,
|
|
3892
|
+
const Ye = async (i, s, O, d) => {
|
|
3893
3893
|
var ue, ee, be, Se;
|
|
3894
3894
|
if (s.level !== 3 || s.labelClassName === "turn" || s.no === 15 || s.no > b.value.length || !N.checkEdit) return "";
|
|
3895
3895
|
y.value.ids = i.ids, y.value.key = i.key, y.value.day = s.no < 15 ? s.no : s.no - 1;
|
|
@@ -3897,7 +3897,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3897
3897
|
if (y.value.day > 0)
|
|
3898
3898
|
C[0] = ((ue = f.value[i.ids * 2].days[y.value.day - 1]) == null ? void 0 : ue.overtime) ?? 0;
|
|
3899
3899
|
else {
|
|
3900
|
-
const oe = ge(new Date(
|
|
3900
|
+
const oe = ge(new Date(T.value).setDate(0), "{Y}-{m}-{dd}"), we = await N.workSchedule.getWorkSheet({ code: i.code, date: oe });
|
|
3901
3901
|
if (we[0] !== null) {
|
|
3902
3902
|
const c = we[0].data.days.find((Ae) => Ae.day === oe);
|
|
3903
3903
|
C[0] = (c == null ? void 0 : c.overtime) ?? 0;
|
|
@@ -3907,7 +3907,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3907
3907
|
if (y.value.day < b.value.length - 1)
|
|
3908
3908
|
C[1] = ((ee = f.value[i.ids * 2].days[y.value.day + 1]) == null ? void 0 : ee.overtime) ?? 0;
|
|
3909
3909
|
else {
|
|
3910
|
-
const oe = ge(new Date(
|
|
3910
|
+
const oe = ge(new Date(T.value).setDate(b.value.length), "{Y}-{m}-{dd}"), we = await N.workSchedule.getWorkSheet({ code: i.code, date: oe });
|
|
3911
3911
|
if (we[0] !== null) {
|
|
3912
3912
|
const c = we[0].data.days.find((Ae) => Ae.day === oe);
|
|
3913
3913
|
C[1] = (c == null ? void 0 : c.overtime) ?? 0;
|
|
@@ -3915,12 +3915,12 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3915
3915
|
C[1] = 0;
|
|
3916
3916
|
}
|
|
3917
3917
|
console.log(C), y.value.limit = H.value[i.ids].days[y.value.day].time + 4 - jt(C[0], C[1], 4);
|
|
3918
|
-
const u = new Date(
|
|
3918
|
+
const u = new Date(T.value), r = `${u.getFullYear()}-${(u.getMonth() + 1).toString().padStart(2, "0")}-${(y.value.day + 1).toString().padStart(2, "0")}`, m = z.value.findIndex((oe) => oe.code === i.code);
|
|
3919
3919
|
y.value.id = m !== -1 ? z.value[m].days.findIndex((oe) => (oe == null ? void 0 : oe.day) === r) : m, X.value = typeof i.days[y.value.day].tips > "u" ? 9 : parseInt(i.days[y.value.day].tips.match(/(\d{1,2})/)), A.value = parseInt(((be = i.days[y.value.day]) == null ? void 0 : be.night) ?? 0), S.value = parseInt(((Se = i.days[y.value.day]) == null ? void 0 : Se.overtime) ?? 0), D.value = i.days[y.value.day].time !== "-" ? parseInt(i.days[y.value.day].time) : 8;
|
|
3920
3920
|
const ne = i.days.findIndex((oe) => oe.day === r);
|
|
3921
3921
|
y.value.failure = i.days[ne].state, Te.value.y = d.clientY, Te.value.x = d.clientX, y.value.rest = m !== -1 && y.value.id !== -1, y.value.name = Ve(i.fio), he.value = !0, await wn(), se.value = !1;
|
|
3922
3922
|
}, Ue = (i) => {
|
|
3923
|
-
const s = new Date(
|
|
3923
|
+
const s = new Date(T.value), O = `${s.getFullYear()}-${(s.getMonth() + 1).toString().padStart(2, "0")}-${(y.value.day + 1).toString().padStart(2, "0")}`;
|
|
3924
3924
|
let d = z.value.findIndex((ee) => ee.code === H.value[y.value.ids].code);
|
|
3925
3925
|
y.value.id = d !== -1 ? z.value[d].days.findIndex((ee) => (ee == null ? void 0 : ee.day) === `${s.getFullYear()}-${(s.getMonth() + 1).toString().padStart(2, "0")}-${(y.value.day + 1).toString().padStart(2, "0")}`) : d;
|
|
3926
3926
|
let C = H.value[y.value.ids].days[y.value.day].state, u = i, r = "-", m, ne, ue;
|
|
@@ -3936,8 +3936,8 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3936
3936
|
let ee = Oe.value.split('"');
|
|
3937
3937
|
u = ee[1], se.value = !1, ee[2] !== "" && (r = D.value, ue = "(" + ee[2].split("(")[1], m = A.value, ne = S.value);
|
|
3938
3938
|
}
|
|
3939
|
-
i === "reset" ? (u = C, z.value[d].days.splice(y.value.id, 1)) : d === -1 ? z.value.push({ code: H.value[y.value.ids].code, days: [{ day:
|
|
3940
|
-
date: ge(new Date(
|
|
3939
|
+
i === "reset" ? (u = C, z.value[d].days.splice(y.value.id, 1)) : d === -1 ? z.value.push({ code: H.value[y.value.ids].code, days: [{ day: O, state: u, time: r, night: m, overtime: ne, tips: ue }] }) : y.value.id === -1 ? z.value[d].days.push({ day: O, state: u, time: r, night: m, overtime: ne, tips: ue }) : z.value[d].days[y.value.id] = { day: O, state: u, time: r, night: m, overtime: ne, tips: ue }, d = z.value.findIndex((ee) => ee.code === H.value[y.value.ids].code), N.workSchedule.addWorkSheet({
|
|
3940
|
+
date: ge(new Date(T.value), "{Y}-{m}-{dd}"),
|
|
3941
3941
|
data: [{
|
|
3942
3942
|
name: H.value[y.value.ids].fio,
|
|
3943
3943
|
days: z.value[d].days,
|
|
@@ -3948,8 +3948,8 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3948
3948
|
Ie.value = !1;
|
|
3949
3949
|
let i = H.value[y.value.ids].days[y.value.day], s = "";
|
|
3950
3950
|
A.value = 0, S.value = 0;
|
|
3951
|
-
let
|
|
3952
|
-
d = /^Н(?!Н$)С?$/.test(d) ? i.state !== "В" ? "Я" : "РВ" : d, /^(|Я|РВ)$/.test(d) && ((X.value < 6 ||
|
|
3951
|
+
let O = D.value >= 22 ? X.value + D.value + 2 : D.value > 4 ? X.value + D.value + 1 : X.value + D.value, d = y.value.failure.split("/")[0];
|
|
3952
|
+
d = /^Н(?!Н$)С?$/.test(d) ? i.state !== "В" ? "Я" : "РВ" : d, /^(|Я|РВ)$/.test(d) && ((X.value < 6 || O > 22) && (s = "Н", A.value = X.value < 6 ? Math.min(6, O) - X.value : 0, O <= 6 && (A.value = D.value, d = ""), O === 7 && A.value > 4 && A.value--, A.value += Math.max(22, O) - 22), D.value > i.time && d !== "РВ" && (s += "С", Ie.value = !0, S.value = D.value - i.time, S.value > 4 && (D.value = i.time + 4, S.value = 4)), /РВ/.test(d) && (Ie.value = !0)), s.length > 0 && d.length > 0 && (s = "/" + s);
|
|
3953
3953
|
let C = `(${X.value}:00 - ${D.value >= 22 ? X.value + D.value + 2 : D.value > 4 ? X.value + D.value + 1 : X.value + D.value}:00)`, u = f.value[y.value.ids * 2].days[y.value.day].time !== "-" ? " " + D.value + " " + C : "";
|
|
3954
3954
|
return '"' + d + s + '"' + u;
|
|
3955
3955
|
}), tt = (i) => {
|
|
@@ -3962,23 +3962,23 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3962
3962
|
colspan: 0
|
|
3963
3963
|
};
|
|
3964
3964
|
}, je = () => {
|
|
3965
|
-
const i = new Date(
|
|
3966
|
-
let
|
|
3965
|
+
const i = new Date(T.value), s = new Date(i.getFullYear(), i.getMonth() + 1, 0).getDate();
|
|
3966
|
+
let O = [], d = 0;
|
|
3967
3967
|
for (let C = 1; C <= s; C++) {
|
|
3968
3968
|
const u = ge(i.setDate(C), "{Y}-{m}-{dd}");
|
|
3969
3969
|
d += te.value.nowork.includes(u) || te.value.holidays.includes(u) ? 0 : te.value.preholidays.includes(u) ? 7 : 8;
|
|
3970
3970
|
let r = te.value.nowork.includes(u) ? "nowork" : te.value.holidays.includes(u) ? "holiday" : te.value.preholidays.includes(u) ? "preholiday" : "";
|
|
3971
|
-
|
|
3971
|
+
O.push({ day: C, holidays: r, weekday: re(new Date(i.getFullYear(), i.getMonth(), C), "day") });
|
|
3972
3972
|
}
|
|
3973
|
-
return Y.value = d, b.value =
|
|
3973
|
+
return Y.value = d, b.value = O, N.odata.getPersonal({ dismissed: "false" }).then((C) => {
|
|
3974
3974
|
var u;
|
|
3975
3975
|
$.value.length === 0 && ($.value = [(u = C.find((r) => r.employeeName === N.fullName && r.dismissalDate.length === 0)) == null ? void 0 : u.divisionName]), C.forEach((r) => {
|
|
3976
|
-
W.value.some((m) => r.dismissalDate.length > 0 && new Date(r.dismissalDate) < new Date(
|
|
3976
|
+
W.value.some((m) => r.dismissalDate.length > 0 && new Date(r.dismissalDate) < new Date(T.value) || (m == null ? void 0 : m.value) === r.divisionName) || W.value.push({ value: r.divisionName, label: r.divisionName, key: r.divisionName });
|
|
3977
3977
|
});
|
|
3978
3978
|
}), !0;
|
|
3979
3979
|
}, He = () => {
|
|
3980
3980
|
H.value = [], ve.value = [], _e.value = [], N.odata.personal.forEach((i) => {
|
|
3981
|
-
if ($.value.includes(i.divisionName) && g.value.some((s) => s.val && s.activeText === i.roleName) && (i.dismissalDate.length === 0 || new Date(i.dismissalDate) > new Date(
|
|
3981
|
+
if ($.value.includes(i.divisionName) && g.value.some((s) => s.val && s.activeText === i.roleName) && (i.dismissalDate.length === 0 || new Date(i.dismissalDate) > new Date(T.value))) {
|
|
3982
3982
|
let s = Ve(i.employeeName);
|
|
3983
3983
|
i.employeeName === N.fullName && (Me.value = i.roleName), H.value.push({
|
|
3984
3984
|
fio: i.employeeName,
|
|
@@ -3994,26 +3994,26 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
3994
3994
|
}
|
|
3995
3995
|
}), H.value.sort((i, s) => i.fio < s.fio ? -1 : i.fio > s.fio ? 1 : 0), H.value.forEach((i, s) => {
|
|
3996
3996
|
i.ids = s, ve.value.push(i.code);
|
|
3997
|
-
}), N.workSchedule.getUsersYear({ code: ve.value, year: new Date(
|
|
3997
|
+
}), N.workSchedule.getUsersYear({ code: ve.value, year: new Date(T.value).getFullYear() }).then((i) => {
|
|
3998
3998
|
i.forEach((s) => {
|
|
3999
3999
|
s.dateStart && _e.value.push({ code: s.code, dateStart: s.dateStart, dateEnd: s.dateEnd });
|
|
4000
4000
|
}), ft();
|
|
4001
4001
|
});
|
|
4002
4002
|
}, ft = () => {
|
|
4003
|
-
N.workSchedule.getWorkSheet({ code: ve.value, date: ge(new Date(
|
|
4003
|
+
N.workSchedule.getWorkSheet({ code: ve.value, date: ge(new Date(T.value), "{Y}-{m}-{dd}") }).then(
|
|
4004
4004
|
(i) => {
|
|
4005
4005
|
z.value = [], i.forEach((s) => {
|
|
4006
4006
|
s !== null && z.value.push({ code: s.code, days: s.data.days });
|
|
4007
|
-
}), N.workSchedule.getWorkSchedule({ code: ve.value, date: ge(new Date(
|
|
4007
|
+
}), N.workSchedule.getWorkSchedule({ code: ve.value, date: ge(new Date(T.value), "{Y}-{m}-{dd}") }).then(
|
|
4008
4008
|
(s) => {
|
|
4009
|
-
s.forEach((
|
|
4009
|
+
s.forEach((O, d) => {
|
|
4010
4010
|
var u, r;
|
|
4011
|
-
if (
|
|
4012
|
-
H.value[d].days = [],
|
|
4011
|
+
if (O !== null) {
|
|
4012
|
+
H.value[d].days = [], O.data.days.forEach((m) => m.state = "Я");
|
|
4013
4013
|
for (let m = 1; m <= b.value.length; m++) {
|
|
4014
|
-
let ne = ge(new Date(
|
|
4015
|
-
const ue = (u =
|
|
4016
|
-
ue === -1 ? Fe(m, d, "-", "В") : H.value[d].days.push((r =
|
|
4014
|
+
let ne = ge(new Date(T.value).setDate(m), "{Y}-{m}-{dd}");
|
|
4015
|
+
const ue = (u = O.data) == null ? void 0 : u.days.findIndex((ee) => ee.day === ne);
|
|
4016
|
+
ue === -1 ? Fe(m, d, "-", "В") : H.value[d].days.push((r = O.data) == null ? void 0 : r.days[ue]);
|
|
4017
4017
|
}
|
|
4018
4018
|
} else
|
|
4019
4019
|
for (let m = 1; m <= b.value.length; m++)
|
|
@@ -4021,20 +4021,20 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4021
4021
|
const C = H.value[d];
|
|
4022
4022
|
if (C.employmentDate || C.dismissalDate)
|
|
4023
4023
|
for (let m = 1; m <= b.value.length; m++) {
|
|
4024
|
-
const ne = new Date(new Date(
|
|
4024
|
+
const ne = new Date(new Date(T.value).setDate(m)), ue = ge(ne, "{Y}-{m}-{dd}"), ee = C.employmentDate && ne < new Date(C.employmentDate), be = C.dismissalDate && ne >= new Date(C.dismissalDate).setSeconds(0);
|
|
4025
4025
|
if (ee || be) {
|
|
4026
4026
|
const Se = C.days.findIndex((oe) => oe.day === ue);
|
|
4027
4027
|
Se !== -1 && (C.days[Se].state = "-", C.days[Se].time = "-");
|
|
4028
4028
|
}
|
|
4029
4029
|
}
|
|
4030
4030
|
for (let m = 1; m <= b.value.length; m++) {
|
|
4031
|
-
let ne = new Date(new Date(
|
|
4031
|
+
let ne = new Date(new Date(T.value).getFullYear(), new Date(T.value).getMonth(), m).getTime() + 1e3;
|
|
4032
4032
|
for (let ue of _e.value) {
|
|
4033
4033
|
const { dateStart: ee, dateEnd: be, code: Se } = ue;
|
|
4034
4034
|
if (ee && be && Se === H.value[d].code) {
|
|
4035
4035
|
const oe = new Date(Yt(ee)).getTime(), we = new Date(Yt(be)).getTime();
|
|
4036
4036
|
if (ne >= oe && ne <= we) {
|
|
4037
|
-
const c = ge(new Date(
|
|
4037
|
+
const c = ge(new Date(T.value).setDate(m), "{Y}-{m}-{dd}"), Ae = H.value[d].days.findIndex((Ke) => Ke.day === c);
|
|
4038
4038
|
Ae !== -1 ? H.value[d].days[Ae] = { day: c, time: "-", state: "ОТ" } : H.value[d].days.push({ day: c, time: "-", state: "ОТ" });
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
@@ -4045,11 +4045,11 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4045
4045
|
);
|
|
4046
4046
|
}
|
|
4047
4047
|
);
|
|
4048
|
-
}, Fe = (i, s,
|
|
4049
|
-
const C = ge(new Date(
|
|
4048
|
+
}, Fe = (i, s, O, d = "Я") => {
|
|
4049
|
+
const C = ge(new Date(T.value).setDate(i), "{Y}-{m}-{dd}");
|
|
4050
4050
|
H.value[s].days.push({
|
|
4051
4051
|
day: C,
|
|
4052
|
-
time:
|
|
4052
|
+
time: O,
|
|
4053
4053
|
state: d
|
|
4054
4054
|
});
|
|
4055
4055
|
}, nt = () => {
|
|
@@ -4068,7 +4068,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4068
4068
|
}, {})
|
|
4069
4069
|
).map(([u, r]) => ({ code: u, count: r }));
|
|
4070
4070
|
i.numberNonAppearing = [s.reduce((u, r) => u + r.count, 0), 0];
|
|
4071
|
-
const
|
|
4071
|
+
const O = Math.ceil(s.length / 2), d = s.slice(0, O), C = s.slice(O);
|
|
4072
4072
|
i.key === 0 && d.length > 0 && (i.appearing = {
|
|
4073
4073
|
code: d.map((u) => u.code).join("/"),
|
|
4074
4074
|
count: d.map((u) => u.count).join("/")
|
|
@@ -4083,36 +4083,36 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4083
4083
|
}, Ge = (i, s) => {
|
|
4084
4084
|
var m, ne, ue, ee, be;
|
|
4085
4085
|
if (s === -1) return "";
|
|
4086
|
-
const
|
|
4086
|
+
const O = f.value[s], d = new Date(T.value), C = `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, "0")}-${i.toString().padStart(2, "0")}`, u = O.days.findIndex((Se) => Se.day === C);
|
|
4087
4087
|
let r = 0;
|
|
4088
|
-
return (m =
|
|
4088
|
+
return (m = O.days[u]) != null && m.overtime && (r += O.days[u].overtime), u === -1 ? "" : O.key === 0 ? (ne = O.days[u]) == null ? void 0 : ne.state : ((ue = O.days[u]) == null ? void 0 : ue.time) === 0 ? r === 0 ? "-" : r : r === 0 ? (ee = O.days[u]) == null ? void 0 : ee.time : `${((be = O.days[u]) == null ? void 0 : be.time) - r}/${r}`;
|
|
4089
4089
|
};
|
|
4090
4090
|
N.group && ($.value[0] = N.group), N.date && (Ne.value = (/* @__PURE__ */ new Date(N.date + "T00:00:01")).getMonth()), In().then((i) => {
|
|
4091
4091
|
te.value = i, je();
|
|
4092
4092
|
});
|
|
4093
|
-
const Je = (i) => new Date(
|
|
4093
|
+
const Je = (i) => new Date(T.value).getMonth() === (/* @__PURE__ */ new Date()).getMonth() && i === (/* @__PURE__ */ new Date()).getDate() ? " today" : "", Pe = () => {
|
|
4094
4094
|
let i = Oe.value.match(/(\d{1,2}):\d{2}\s*-\s*(\d{1,2})/), s = H.value[y.value.ids].days[y.value.day + 1].tips;
|
|
4095
4095
|
return s = typeof s < "u" ? s.match(/(\d{1,2}):\d{2}\s*-\s*(\d{1,2})/) : [0, 9, 18], Number(i[1]) < Number(s[1]) ? `${i[1]}:00 по ${Number(i[1]) + S.value}:00` : `${Number(i[2]) - S.value}:00 по ${i[2]}:00`;
|
|
4096
4096
|
}, ht = () => {
|
|
4097
|
-
let i = /РВ/.test(Oe.value), s = Ht(f.value[y.value.ids * 2].name.match(/\(([^)]+)\)/)[1]),
|
|
4097
|
+
let i = /РВ/.test(Oe.value), s = Ht(f.value[y.value.ids * 2].name.match(/\(([^)]+)\)/)[1]), O = Ht(Me.value), d = f.value[y.value.ids * 2].fio.split(" ");
|
|
4098
4098
|
d = At({ last: d[0], first: d[1], middle: d[2] }, "accusative");
|
|
4099
4099
|
let C = N.fullName.split(" ");
|
|
4100
4100
|
C = At({ last: C[0], first: C[1], middle: C[2] }, "genitive");
|
|
4101
4101
|
let u = i ? Oe.value.match(/\(([^)]+)\)/)[1].replace("-", " по ") : Pe();
|
|
4102
|
-
F.value = `<p style="position: absolute;"><img src="https://cp.avanta-telecom.ru${N.logo}" style="height: 3rem;"></p><div style="display:inline-block;margin-left:66%;width:34%;">Директору<br>ООО "АВАНТА ТЕЛЕКОМ" Пунину Д. В.<br><br>от ${
|
|
4102
|
+
F.value = `<p style="position: absolute;"><img src="https://cp.avanta-telecom.ru${N.logo}" style="height: 3rem;"></p><div style="display:inline-block;margin-left:66%;width:34%;">Директору<br>ООО "АВАНТА ТЕЛЕКОМ" Пунину Д. В.<br><br>от ${O} ${Ve(`${C.last} ${C.first} ${C.middle}`)}</div><p>${$.value[0]}<br>СЛУЖЕБНАЯ ЗАПИСКА<br>${ge(new Date(T.value).setDate(y.value.day + 1), '"{dd}" {F} {Y}')}г.</p><p style="text-align:center;">Уважаемый Дмитрий Владимирович!</p><p>В связи с производственной необходимостью З_А_П_О_Л_Н_И_Т_Ь_! , прошу привлечь к ${i ? "работе в выходной день" : "сверхурочной работе"}, ${ge(new Date(T.value).setDate(y.value.day + 1), "{dd}.{m}.{Y}")} c ${u}, ${s} ${d.last} ${d.first} ${d.middle} для выполнения вышеуказанных работ с ${(d == null ? void 0 : d.gender) === "male" ? "его" : "её"} письменного согласия.</p><p>${Me.value} ________________ ${Ve(N.fullName)}</p>`;
|
|
4103
4103
|
}, gt = () => {
|
|
4104
4104
|
let i = /РВ/.test(Oe.value), s = f.value[y.value.ids * 2].fio.split(" ");
|
|
4105
4105
|
s = At({ last: s[0], first: s[1], middle: s[2] }, "genitive");
|
|
4106
|
-
let
|
|
4107
|
-
F.value = `<style> @page{size: A4 portrait;margin-top: 20pt;} @media print{.no-print{display: none !important;}} </style><body style="font:9pt/1.08;"><h1 style="text-align: center;"><img style="margin-bottom: 20pt;" src="https://avanta-telecom.ru/local/templates/main/images/Logo-hs.png" width="174" height="51" alt="logo" /><br/>Общество с ограниченной ответственностью «АВАНТА ТЕЛЕКОМ»<br>(ООО «АВАНТА ТЕЛЕКОМ»)</h1><table width="100%" border="0" cellspacing="0" cellpadding="0"><col width="50%"/><col width="50%"/><tr><td align="left "><span>г.Краснодар</span></td><td align="right"><span>________________ года</span></td></tr></table><p style="text-align:center;margin: 0 0 .26cm;"><b>УВЕДОМЛЕНИЕ</br>${i ? "о работе в выходной день" : "о привлечении к сверхурочной работе "}</b></p><p style="text-align:center;margin: 0 0 .26cm;">Уважаем${(s == null ? void 0 : s.gender) === "male" ? "ый" : "ая"} ${f.value[y.value.ids * 2].fio}!</p><p style="margin: 0 0 .26cm;text-indent: 20px each-line;">Уведомляю Вас, что в связи с производственной необходимостью возникла необходимость ${i ? "работы в выходной день," + ge(new Date(
|
|
4106
|
+
let O = i ? Oe.value.match(/\(([^)]+)\)/)[1].replace("-", " по ") : Pe();
|
|
4107
|
+
F.value = `<style> @page{size: A4 portrait;margin-top: 20pt;} @media print{.no-print{display: none !important;}} </style><body style="font:9pt/1.08;"><h1 style="text-align: center;"><img style="margin-bottom: 20pt;" src="https://avanta-telecom.ru/local/templates/main/images/Logo-hs.png" width="174" height="51" alt="logo" /><br/>Общество с ограниченной ответственностью «АВАНТА ТЕЛЕКОМ»<br>(ООО «АВАНТА ТЕЛЕКОМ»)</h1><table width="100%" border="0" cellspacing="0" cellpadding="0"><col width="50%"/><col width="50%"/><tr><td align="left "><span>г.Краснодар</span></td><td align="right"><span>________________ года</span></td></tr></table><p style="text-align:center;margin: 0 0 .26cm;"><b>УВЕДОМЛЕНИЕ</br>${i ? "о работе в выходной день" : "о привлечении к сверхурочной работе "}</b></p><p style="text-align:center;margin: 0 0 .26cm;">Уважаем${(s == null ? void 0 : s.gender) === "male" ? "ый" : "ая"} ${f.value[y.value.ids * 2].fio}!</p><p style="margin: 0 0 .26cm;text-indent: 20px each-line;">Уведомляю Вас, что в связи с производственной необходимостью возникла необходимость ${i ? "работы в выходной день," + ge(new Date(T.value).setDate(y.value.day + 1), "{dd}.{m}.{Y}") : "Вас " + ge(new Date(T.value).setDate(y.value.day + 1), "{dd}.{m}.{Y}") + "г. к сверхурочной работе"} с ${O} часов${i ? " (с перерывом на отдых и прием пищи 1 час)" : ""}.</p>${i ? '<p style="margin: 0 0 .26cm;text-indent: 20px each-line;">Прошу дать согласие на работу в вышеназванный выходной день.</p>' : ""}<p style="margin: 0 0 .26cm;text-indent: 20px each-line;">${i ? "" : "После ознакомления прошу сделать в настоящем уведомлении отметку о согласии/несогласии. "}Если есть запрет на привлечение Вас к работе ${i ? "в выходной день" : "сверхурочно"} (по состоянию здоровья в соответствии с медицинским заключением), прошу сообщить об этом.</p><p style="margin: 0 0 .26cm;text-indent: 20px each-line;">Сообщаю, что за работу ${i ? "в выходной день полагается оплата в двойном размере. По Вашему желанию вместо двойной оплаты может быть предоставлен день отдыха – в этом случае работа в выходной день будет оплачена в одинарном размере, а день отдыха оплате не подлежит." : "сверхурочно"}<br/></p><table width="100%" border="0" cellspacing="0" cellpadding="0"><col width="50%"/><col width="50%"/><tr><td align="center"><span>Директор</span></td><td align="center"><span>Пунин Д.В</span></td></tr></table><p style="text-align:center;margin: 0 0 .26cm;"><br/></p><p style="margin: 0 0 .26cm;text-indent: 20px each-line;">Я, ${f.value[y.value.ids * 2].fio} настоящим сообщаю следующее:</p><p style="margin: 0 0 .26cm;">1. На привлечение к ${i ? "работе в выходной день," : "сверхурочной работе"} ${ge(new Date(T.value).setDate(y.value.day + 1), "{dd}.{m}.{Y}")} :</p><table width="100%" cellpadding="7" cellspacing="0"><col /><col width="149"/><col width="90"/><tr valign="top"><td style="border-bottom: 1px solid #000000;" align="center"><p><i>согласен</i></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td></tr><tr valign="top"><td style="border-top: 1px solid #000000;"><p><br/></p></td><td style="border-top: 1px solid #000000;" align="center"><p>(подпись)</p></td><td style="border-top: 1px solid #000000;" align="center"><p>(дата)</p></td></tr></table><p style="margin: 0 0 .26cm;">2. С правом отказаться от ${i ? "работы в выходные дни" : "сверхурочной работы"}:</p><table width="100%" cellpadding="7" cellspacing="0"><col /><col width="149"/><col width="90"/><tr valign="top"><td style="border-bottom: 1px solid #000000;" align="center"><p><i>ознакомлен</i></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td></tr><tr valign="top"><td style="border-top: 1px solid #000000;"><p><br/></p></td><td style="border-top: 1px solid #000000;" align="center"><p>(подпись)</p></td><td style="border-top: 1px solid #000000;" align="center"><p>(дата)</p></td></tr></table><p style="margin: 0 0 .26cm;">3. Запрет на работу ${i ? "в выходные дни," : "сверхурочно"}:</p><table width="100%" cellpadding="7" cellspacing="0"><col /><col width="149"/><col width="90"/><tr valign="top"><td style="border-bottom: 1px solid #000000;" align="center"><p><i>отсутствует</i></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td></tr><tr valign="top"><td style="border-top: 1px solid #000000;" align="center"><p>(если есть запрет, указать какой)</p></td><td style="border-top: 1px solid #000000;" align="center"><p>(подпись)</p></td><td style="border-top: 1px solid #000000;" align="center"><p>(дата)</p></td></tr></table><p style="margin: 0 0 .26cm;">4. ${i ? "Работу в выходные дни," : "Работу сверхурочно"} прошу компенсировать:</p><table width="100%" cellpadding="7" cellspacing="0"><col /><col width="149"/><col width="90"/><tr valign="top"><td style="border-bottom: 1px solid #000000;" align="center"><p><i>${i ? "Оплатой в двойном размере" : "Оплатой в повышенном размере"}</i></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td></tr><tr valign="top"><td style="border-top: 1px solid #000000;"><p><br/></p></td><td style="border-top: 1px solid #000000;" align="center"><p>(подпись)</p></td><td style="border-top: 1px solid #000000;" align="center"><p>(дата)</p></td></tr></table><p style="margin: 0 0 .26cm;">5. Экземпляр уведомления о работе ${i ? "в выходные дни" : "сверхурочно"}:</p><table width="100%" cellpadding="7" cellspacing="0"><col /><col width="149"/><col width="90"/><tr valign="top"><td style="border-bottom: 1px solid #000000;" align="center"><p><i>получил</i></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td><td style="border-bottom: 1px solid #000000;"><p><br/></p></td></tr><tr valign="top"><td style="border-top: 1px solid #000000;"><p><br/></p></td><td style="border-top: 1px solid #000000;" align="center"><p>(подпись)</p></td><td style="border-top: 1px solid #000000;" align="center"><p>(дата)</p></td></tr></table>`;
|
|
4108
4108
|
}, We = async () => {
|
|
4109
4109
|
var be, Se, oe, we;
|
|
4110
4110
|
U.value = !0;
|
|
4111
|
-
const i = new Mn.Workbook(), s = i.addWorksheet(re(
|
|
4111
|
+
const i = new Mn.Workbook(), s = i.addWorksheet(re(T.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), O = { vertical: "middle", horizontal: "center" }, d = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, C = { vertical: "middle", horizontal: "center", wrapText: !0 };
|
|
4112
4112
|
s.mergeCells(`A1:${ae("A1", b.value.length + 15)}1`), s.mergeCells("A2:A4"), s.mergeCells("B2:B4"), s.mergeCells("C2:C4"), s.mergeCells("D5:R5"), s.mergeCells(`D2:${ae("D2", b.value.length + 2)}2`), s.mergeCells(`${ae("D2", b.value.length + 3)}2:${ae("D2", b.value.length + 8)}2`), s.mergeCells(`${ae("D2", b.value.length + 9)}2:${ae("D2", b.value.length + 9)}4`), s.mergeCells(`${ae("D2", b.value.length + 10)}2:${ae("D2", b.value.length + 11)}2`), s.mergeCells(`${ae("D2", b.value.length + 12)}2:${ae("D2", b.value.length + 12)}4`), s.mergeCells(`${ae("D3", b.value.length + 3)}3:${ae("D3", b.value.length + 3)}4`), s.mergeCells(`${ae("D3", b.value.length + 4)}3:${ae("D3", b.value.length + 8)}3`), s.mergeCells(`${ae("D3", b.value.length + 10)}3:${ae("D3", b.value.length + 10)}4`), s.mergeCells(`${ae("D3", b.value.length + 11)}3:${ae("D3", b.value.length + 11)}4`), s.mergeCells(`T5:${ae("D5", b.value.length + 1)}5`);
|
|
4113
4113
|
for (let c = 1; c <= b.value.length + 2; c++)
|
|
4114
4114
|
s.mergeCells(`${ae("D3", c)}3:${ae("D4", c)}4`), s.getColumn(c + 3).width = 5, s.getColumn(c + 3).alignment = C, s.getCell(3, c + 3).border = d, c < 16 && (s.getCell(3, c + 3).value = c), c > 16 && (s.getCell(3, c + 3).value = c - 1);
|
|
4115
|
-
s.getCell("A1").value = o("sheet.title", { name: $.value[0] }) + re(
|
|
4115
|
+
s.getCell("A1").value = o("sheet.title", { name: $.value[0] }) + re(T.value, "month"), s.getCell("A2").value = o("sheet.listNumber"), s.getCell("B2").value = o("sheet.employee"), s.getCell("C2").value = o("sheet.personnelNumber"), s.getCell("D2").value = o("sheet.marks"), s.getCell("S3").value = o("sheet.halfMonth", { half: "I" }), s.getCell("A5").value = "1", s.getCell("B5").value = "2", s.getCell("C5").value = "3", s.getCell("D5").value = "4", s.getCell("S5").value = "5", s.getCell("T5").value = "6", s.getCell(5, b.value.length + 5).value = "7", s.getCell(2, b.value.length + 6).value = o("sheet.workedMonth"), s.getCell(2, b.value.length + 12).value = o("sheet.numberNonAppearing"), s.getCell(2, b.value.length + 13).value = o("sheet.them"), s.getCell(2, b.value.length + 15).value = o("sheet.countWeekend"), s.getCell(3, b.value.length + 5).value = o("sheet.halfMonth", { half: "II" }), s.getCell(3, b.value.length + 6).value = o("sheet.days"), s.getCell(3, b.value.length + 7).value = o("sheet.hours"), s.getCell(4, b.value.length + 7).value = o("sheet.all"), s.getCell(4, b.value.length + 8).value = o("sheet.overtime"), s.getCell(4, b.value.length + 9).value = o("sheet.night"), s.getCell(4, b.value.length + 10).value = o("sheet.weekend"), s.getCell(4, b.value.length + 13).value = o("sheet.code"), s.getCell(4, b.value.length + 14).value = o("sheet.count"), s.getRow(1).height = 40, s.getRow(2).height = 32, s.getRow(3).height = 20, s.getRow(4).height = 60, s.getColumn(1).width = 6, s.getColumn(2).width = 30, s.getColumn(3).width = 17, s.getColumn(19).width = 12, s.getColumn(b.value.length + 5).width = 12, s.getColumn(b.value.length + 12).width = 11, s.getColumn(b.value.length + 15).width = 11, s.getCell("A1").alignment = O, s.getColumn(1).alignment = C, s.getColumn(2).alignment = C, s.getColumn(3).alignment = C;
|
|
4116
4116
|
for (let c = 6; c <= 15; c++)
|
|
4117
4117
|
s.getCell(5, b.value.length + c).value = c + 2, s.getColumn(b.value.length + c).alignment = C, s.getCell(4, b.value.length + c).border = d, s.getCell(5, b.value.length + c).border = d;
|
|
4118
4118
|
s.getCell("A2").border = d, s.getCell("B2").border = d, s.getCell("C2").border = d, s.getCell("D2").border = d, s.getCell("D2").border = d, s.getCell("A5").border = d, s.getCell("B5").border = d, s.getCell("C5").border = d, s.getCell("D5").border = d, s.getCell("S5").border = d, s.getCell("T5").border = d, s.getCell(2, b.value.length + 6).border = d, s.getCell(2, b.value.length + 12).border = d, s.getCell(2, b.value.length + 13).border = d, s.getCell(2, b.value.length + 15).border = d, s.getCell(3, b.value.length + 7).border = d;
|
|
@@ -4145,7 +4145,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4145
4145
|
}
|
|
4146
4146
|
let ne = "Калач В. В.";
|
|
4147
4147
|
N.odata.personal.forEach((c) => {
|
|
4148
|
-
c.roleName === "Специалист по кадрам и кадровому делопроизводству" && (c.dismissalDate.length === 0 || new Date(c.dismissalDate) > new Date(
|
|
4148
|
+
c.roleName === "Специалист по кадрам и кадровому делопроизводству" && (c.dismissalDate.length === 0 || new Date(c.dismissalDate) > new Date(T.value)) && (ne = c.employeeName);
|
|
4149
4149
|
}), s.mergeCells(`A${f.value.length + 7}:B${f.value.length + 7}`), s.mergeCells(`C${f.value.length + 7}:G${f.value.length + 7}`), s.mergeCells(`H${f.value.length + 7}:M${f.value.length + 7}`), s.mergeCells(`O${f.value.length + 7}:T${f.value.length + 7}`), s.mergeCells(`V${f.value.length + 7}:AC${f.value.length + 7}`), s.mergeCells(`AD${f.value.length + 7}:AI${f.value.length + 7}`), s.mergeCells(`AJ${f.value.length + 7}:AL${f.value.length + 7}`), s.mergeCells(`AM${f.value.length + 7}:AP${f.value.length + 7}`), s.mergeCells(`V${f.value.length + 9}:AC${f.value.length + 9}`), s.mergeCells(`AD${f.value.length + 9}:AI${f.value.length + 9}`), s.mergeCells(`AJ${f.value.length + 9}:AL${f.value.length + 9}`), s.mergeCells(`AM${f.value.length + 9}:AP${f.value.length + 9}`), s.getCell(`A${f.value.length + 7}`).value = o("sheet.responsiblePerson"), s.getCell(`V${f.value.length + 7}`).value = o("sheet.headStructural"), s.getCell(`C${f.value.length + 7}`).value = Me.value + ":", s.getCell(`O${f.value.length + 7}`).value = Ve(N.fullName), s.getCell(`AD${f.value.length + 7}`).value = Me.value + ":", s.getCell(`AM${f.value.length + 7}`).value = Ve(N.fullName), s.getCell(`V${f.value.length + 9}`).value = o("sheet.HREmployee"), s.getCell(`AD${f.value.length + 9}`).value = "Специалист по кадрам и кадровому делопроизводству:", s.getCell(`AM${f.value.length + 9}`).value = Ve(ne), s.getCell(`A${f.value.length + 7}`).alignment = { vertical: "middle", horizontal: "right", wrapText: !0 }, s.getCell(`C${f.value.length + 7}`).alignment = { vertical: "middle", horizontal: "right", wrapText: !0 }, s.getCell(`O${f.value.length + 7}`).alignment = { vertical: "middle", horizontal: "left" }, s.getCell(`V${f.value.length + 7}`).alignment = { vertical: "middle", horizontal: "right", wrapText: !0 }, s.getCell(`AD${f.value.length + 7}`).alignment = { vertical: "middle", horizontal: "right", wrapText: !0 }, s.getCell(`AM${f.value.length + 7}`).alignment = { vertical: "middle", horizontal: "left" }, s.getCell(`V${f.value.length + 9}`).alignment = { vertical: "middle", horizontal: "right", wrapText: !0 }, s.getCell(`AD${f.value.length + 9}`).alignment = { vertical: "middle", horizontal: "right", wrapText: !0 }, s.getCell(`AM${f.value.length + 9}`).alignment = { vertical: "middle", horizontal: "left" }, s.getCell(`H${f.value.length + 7}`).border = { bottom: { style: "thin" } }, s.getCell(`AJ${f.value.length + 7}`).border = { bottom: { style: "thin" } }, s.getCell(`AJ${f.value.length + 9}`).border = { bottom: { style: "thin" } };
|
|
4150
4150
|
const ue = `export_${ge(Date.now(), "{dd}.{m}.{Y}")}.xlsx`, ee = await i.xlsx.writeBuffer();
|
|
4151
4151
|
Gt(new Blob([ee]), ue), U.value = !1;
|
|
@@ -4154,7 +4154,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4154
4154
|
Gt(i, `Служебка_${Ve(f.value[y.value.ids * 2].fio)}_${ge(Date.now(), "{dd}.{m}.{Y}")}.html`);
|
|
4155
4155
|
};
|
|
4156
4156
|
return (i, s) => {
|
|
4157
|
-
const
|
|
4157
|
+
const O = Ct("el-form-item"), d = Ct("svg-icon"), C = Ct("el-slider"), u = bn("loading");
|
|
4158
4158
|
return le(), Le(Be, null, [
|
|
4159
4159
|
Ce("div", Rn, [
|
|
4160
4160
|
me.checkEdit ? (le(), fe(h(xn), {
|
|
@@ -4226,7 +4226,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4226
4226
|
}, {
|
|
4227
4227
|
default: M(() => [
|
|
4228
4228
|
j(h(ce), {
|
|
4229
|
-
label: h(o)("sheet.title", { name: $.value[0] }) + h(re)(
|
|
4229
|
+
label: h(o)("sheet.title", { name: $.value[0] }) + h(re)(T.value, "month"),
|
|
4230
4230
|
align: "center",
|
|
4231
4231
|
height: "10"
|
|
4232
4232
|
}, {
|
|
@@ -4257,7 +4257,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4257
4257
|
}, {
|
|
4258
4258
|
default: M(() => [
|
|
4259
4259
|
(le(!0), Le(Be, null, ut(b.value, (r) => (le(), Le(Be, {
|
|
4260
|
-
key: r.day
|
|
4260
|
+
key: `${T.value.getTime()}-${r.day}`
|
|
4261
4261
|
}, [
|
|
4262
4262
|
r.day <= 15 ? (le(), fe(h(ce), {
|
|
4263
4263
|
key: 0,
|
|
@@ -4497,7 +4497,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
|
|
|
4497
4497
|
autocomplete: "on"
|
|
4498
4498
|
}, {
|
|
4499
4499
|
default: M(() => [
|
|
4500
|
-
(le(!0), Le(Be, null, ut(g.value, (r) => (le(), fe(
|
|
4500
|
+
(le(!0), Le(Be, null, ut(g.value, (r) => (le(), fe(O, null, {
|
|
4501
4501
|
default: M(() => [
|
|
4502
4502
|
j(h(dt), {
|
|
4503
4503
|
modelValue: r.val,
|