@studio-west/employees 0.6.18 → 0.6.19
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 +168 -150
- package/dist/WorkTable.cjs +1 -1
- package/dist/WorkTable.js +1 -1
- package/package.json +1 -1
package/dist/SheetTable.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
2
|
-
`+
|
|
3
|
-
`+
|
|
1
|
+
"use strict";const e=require("vue"),O=require("vue-i18n"),v=require("./index-Dn3djtwj.cjs"),o=require("element-plus"),P={style:{height:"20px",width:"100%",display:"inline-block"}},U={style:{height:"20px",width:"100%",display:"inline-block"}},K={__name:"SheetTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(x){const g=x,{t:i,d:C}=O.useI18n(),c=e.ref([]),w=e.ref("0"),h=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(w.value))),m=e.ref([]),p=e.ref("all"),N=e.ref([{value:"all",label:"Все",key:"all"}]),E=e.ref([]),k=e.ref(0),b=e.ref([]),D=e.ref([]),_=e.ref([]);e.watch(p,async(t,l)=>{t!==l&&(b.value=[],confirm.value=!1,g.odata.personal.forEach(a=>{a.divisionName===t&&(b.value.some(u=>(u==null?void 0:u.activeText)===a.roleName)||b.value.push({val:!0,activeText:a.roleName}))}),I())}),e.watch(w,t=>{h.value=new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(t)),V()});const r=e.computed(()=>c.value.flatMap((t,l)=>[{...t,key:0,ids:l},{...t,key:1,ids:l}])),F=t=>{if(t.columnIndex<2||t.columnIndex>m.value.length+3&&t.columnIndex<m.value.length+9||t.columnIndex>m.value.length+11)return r.value[t.rowIndex].key===0?{rowspan:2,colspan:1}:{rowspan:0,colspan:0}},V=()=>{const t=E.value,l=new Date(h.value),a=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let u=[],y=0;for(let n=1;n<=a;n++){const s=v.parseTime(l.setDate(n),"{Y}-{m}-{dd}");y+=t.nowork.includes(s)||t.holidays.includes(s)?0:t.preholidays.includes(s)?7:8;let d=t.nowork.includes(s)?"nowork":t.holidays.includes(s)?"holiday":t.preholidays.includes(s)?"preholiday":"";u.push({day:n,holidays:d,weekday:C(new Date(l.getFullYear(),l.getMonth(),n),"day")})}k.value=y,m.value=u,g.odata.getPersonal({}).then(n=>{var s;p.value=(s=n.find(d=>d.employeeName===g.fullName))==null?void 0:s.divisionName,n.forEach(d=>{N.value.some(f=>(f==null?void 0:f.value)===d.divisionName)||N.value.push({value:d.divisionName,label:d.divisionName,key:d.divisionName}),d.divisionName===p.value&&!b.value.some(f=>(f==null?void 0:f.activeText)===d.roleName)&&b.value.push({val:!0,activeText:d.roleName})}),I()})},I=()=>{c.value=[];let t=[];t.value=[],D.value=[],g.odata.personal.forEach(l=>{if(l.divisionName===p.value&&b.value.some(a=>a.val&&a.activeText===l.roleName)){let a=v.byInitials(l.employeeName);t.value.push(l.employeeKey),c.value.push({name:a+" ("+l.roleName+")",code:l.employeeKey,days:[],contHour:0,id:!1,ids:c.value.length})}}),g.workSchedule.getUsersYear({code:t.value,year:new Date(h.value).getFullYear()}).then(l=>{l.forEach(a=>{a.dateStart&&D.value.push({code:a.code,dateStart:a.dateStart,dateEnd:a.dateEnd})}),console.log(l),Y()})},Y=()=>{g.workSchedule.getWorkSchedule({code:_.value,date:v.parseTime(new Date(h.value),"{Y}-{m}-{dd}")}).then(t=>{t.forEach((l,a)=>{var u,y;if(l!==null){l.data.days.forEach(n=>n.state="Я");for(let n=1;n<=m.value.length;n++){let s=v.parseTime(new Date(h.value).setDate(n),"{Y}-{m}-{dd}");const d=(u=l.data)==null?void 0:u.days.findIndex(f=>f.day===s);d===-1?c.value[a].days.push({day:s,time:"-",state:"В"}):c.value[a].days.push((y=l.data)==null?void 0:y.days[d])}}else{c.value[a].days=[];for(let n=1;n<=m.value.length;n++)m.value[n-1].holidays===""?S(n,a,8):m.value[n-1].holidays==="preholiday"?S(n,a,7):c.value[a].days.push({day:v.parseTime(new Date(h.value).setDate(n),"{Y}-{m}-{dd}"),time:"-",state:"В"})}for(let n=1;n<=m.value.length;n++){let s=new Date(new Date(h.value).getFullYear(),new Date(h.value).getMonth(),n).getTime()+1e3;for(let d of D.value){const{dateStart:f,dateEnd:$,code:q}=d;if(f&&$&&q===l.code){const j=new Date(v.parseDate(f)).getTime(),A=new Date(v.parseDate($)).getTime();if(s>=j&&s<=A){const T=v.parseTime(new Date(h.value).setDate(n),"{Y}-{m}-{dd}"),M=c.value[a].days.findIndex(L=>L.day===T);M!==-1?c.value[a].days[M]={day:T,time:"-",state:"О"}:c.value[a].days.push({day:T,time:"-",state:"О"})}}}}}),H()})},S=(t,l,a)=>{const u=v.parseTime(new Date(h.value).setDate(t),"{Y}-{m}-{dd}");c.value[l].days.push({day:u,time:a,state:"Я"})},H=()=>{c.value.forEach(t=>{t.hourI=0,t.hourII=0,t.halfII=0,t.halfI=0,t.weekend=0,t.weekendDays=0,t.night=0;for(let l=0;l<t.days.length;l++)l<15&&t.days[l].time!=="-"&&(t.hourI+=t.days[l].time),l<15&&t.days[l].state==="Я"&&t.halfI++,l>=15&&t.days[l].time!=="-"&&(t.hourII+=t.days[l].time),l>=15&&t.days[l].state==="Я"&&t.halfII++,t.days[l].state==="Н"&&(t.night+=t.days[l].time),t.days[l].state==="РВ"&&(t.weekend+=t.days[l].time),t.days[l].state==="В"&&t.weekendDays++;t.contDays=t.halfI+t.halfII,t.contHour=t.hourI+t.hourII,t.overtime=0,k.value<t.contHour&&(t.overtime=t.contHour-k.value),t.numberNonAppearing=0,t.appearing={code:"-",countH:"-"}})},B=(t,l)=>{var n,s;if(l===-1)return"";const a=new Date(h.value),u=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`,y=r.value[l].days.findIndex(d=>d.day===u);return y===-1?"":r.value[l].key===0?(n=r.value[l].days[y])==null?void 0:n.state:(s=r.value[l].days[y])==null?void 0:s.time};return v.holidays().then(t=>{E.value=t,V()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.checkEdit?(e.openBlock(),e.createBlock(e.unref(o.ElSelect),{key:0,modelValue:p.value,"onUpdate:modelValue":l[0]||(l[0]=a=>p.value=a),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,a=>(e.openBlock(),e.createBlock(e.unref(o.ElOption),{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),l[2]||(l[2]=e.createElementVNode("div",{class:"expander"},null,-1)),x.checkEdit?(e.openBlock(),e.createBlock(e.unref(o.ElSwitch),{key:1,modelValue:w.value,"onUpdate:modelValue":l[1]||(l[1]=a=>w.value=a),"active-text":e.unref(i)("workSchedule.currentMonth"),"active-value":"0","inactive-value":"-1",style:{"margin-bottom":".5rem","margin-left":".5rem"}},null,8,["modelValue","active-text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(o.ElTable),{id:"printTable",data:r.value,"span-method":F,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(i)("sheet.emptyText"),align:"center",onCellClick:t.coMenu},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.title",{name:p.value})+e.unref(C)(h.value,"month"),align:"center",height:"10"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.employee"),width:"180",align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.personnelNumber"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.marks"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.day},[a.day<=15?(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:0,width:"30","class-name":a.holidays,align:"center",label:a.day.toString()+`
|
|
2
|
+
`+a.weekday},{default:e.withCtx(u=>[e.createElementVNode("div",P,e.toDisplayString(B(a.day,u.$index)||" "),1)]),_:2},1032,["class-name","label"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.halfMonth",{half:"I"}),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].key===0?r.value[a.$index].halfI:r.value[a.$index].hourI),1)]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.day},[a.day>15?(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:0,width:"30","class-name":a.holidays,align:"center",label:a.day.toString()+`
|
|
3
|
+
`+a.weekday},{default:e.withCtx(u=>[e.createElementVNode("div",U,e.toDisplayString(B(a.day,u.$index)||" "),1)]),_:2},1032,["class-name","label"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.halfMonth",{half:"II"}),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].key===0?r.value[a.$index].halfII:r.value[a.$index].hourII),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.workedMonth"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.days"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].contDays),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.hours"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.all"),align:"center","label-class-name":"turn",width:"40"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].contHour),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.overtime"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].overtime),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.night"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].night),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.weekend"),align:"center","label-class-name":"turn",width:"34"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].weekend),1)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.numberNonAppearing"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].numberNonAppearing),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.them"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.code"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>{var u;return[e.createTextVNode(e.toDisplayString((u=r.value[a.$index].appearing)==null?void 0:u.code),1)]}),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.count"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>{var u;return[e.createTextVNode(e.toDisplayString((u=r.value[a.$index].appearing)==null?void 0:u.countH),1)]}),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(i)("sheet.countWeekend"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(r.value[a.$index].weekendDays),1)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text","onCellClick"])],64))}};module.exports=K;
|
package/dist/SheetTable.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { p as
|
|
4
|
-
import { ElSelect as
|
|
5
|
-
const
|
|
1
|
+
import { ref as b, watch as J, computed as le, createElementBlock as N, openBlock as w, Fragment as S, createBlock as M, createCommentVNode as E, createElementVNode as C, createVNode as r, unref as t, withCtx as s, renderList as B, createTextVNode as y, toDisplayString as v } from "vue";
|
|
2
|
+
import { useI18n as te } from "vue-i18n";
|
|
3
|
+
import { p as $, b as ne, a as L, h as oe } from "./index-2Mx6IUGl.js";
|
|
4
|
+
import { ElSelect as ue, ElOption as se, ElSwitch as ie, ElTable as de, ElTableColumn as d } from "element-plus";
|
|
5
|
+
const re = { style: { height: "20px", width: "100%", display: "inline-block" } }, ce = { style: { height: "20px", width: "100%", display: "inline-block" } }, fe = {
|
|
6
6
|
__name: "SheetTable",
|
|
7
7
|
props: {
|
|
8
8
|
checkEdit: { type: Boolean, default: () => !0 },
|
|
@@ -11,285 +11,303 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
11
11
|
fullName: { type: String, default: "Вы" }
|
|
12
12
|
},
|
|
13
13
|
setup(T) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}),
|
|
19
|
-
}),
|
|
20
|
-
|
|
14
|
+
const k = T, { t: i, d: j } = te(), m = b([]), _ = b("0"), f = b(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(_.value))), p = b([]), D = b("all"), Y = b([{ value: "all", label: "Все", key: "all" }]), A = b([]), V = b(0), I = b([]), F = b([]), q = b([]);
|
|
15
|
+
J(D, async (a, l) => {
|
|
16
|
+
a !== l && (I.value = [], confirm.value = !1, k.odata.personal.forEach((e) => {
|
|
17
|
+
e.divisionName === a && (I.value.some((u) => (u == null ? void 0 : u.activeText) === e.roleName) || I.value.push({ val: !0, activeText: e.roleName }));
|
|
18
|
+
}), U());
|
|
19
|
+
}), J(_, (a) => {
|
|
20
|
+
f.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(a)), O();
|
|
21
21
|
});
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
22
|
+
const o = le(() => m.value.flatMap((a, l) => [{ ...a, key: 0, ids: l }, { ...a, key: 1, ids: l }])), G = (a) => {
|
|
23
|
+
if (a.columnIndex < 2 || a.columnIndex > p.value.length + 3 && a.columnIndex < p.value.length + 9 || a.columnIndex > p.value.length + 11)
|
|
24
|
+
return o.value[a.rowIndex].key === 0 ? {
|
|
25
25
|
rowspan: 2,
|
|
26
26
|
colspan: 1
|
|
27
27
|
} : {
|
|
28
28
|
rowspan: 0,
|
|
29
29
|
colspan: 0
|
|
30
30
|
};
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
for (let
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
let h =
|
|
38
|
-
|
|
31
|
+
}, O = () => {
|
|
32
|
+
const a = A.value, l = new Date(f.value), e = new Date(l.getFullYear(), l.getMonth() + 1, 0).getDate();
|
|
33
|
+
let u = [], x = 0;
|
|
34
|
+
for (let n = 1; n <= e; n++) {
|
|
35
|
+
const c = $(l.setDate(n), "{Y}-{m}-{dd}");
|
|
36
|
+
x += a.nowork.includes(c) || a.holidays.includes(c) ? 0 : a.preholidays.includes(c) ? 7 : 8;
|
|
37
|
+
let h = a.nowork.includes(c) ? "nowork" : a.holidays.includes(c) ? "holiday" : a.preholidays.includes(c) ? "preholiday" : "";
|
|
38
|
+
u.push({ day: n, holidays: h, weekday: j(new Date(l.getFullYear(), l.getMonth(), n), "day") });
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}),
|
|
40
|
+
V.value = x, p.value = u, k.odata.getPersonal({}).then((n) => {
|
|
41
|
+
var c;
|
|
42
|
+
D.value = (c = n.find((h) => h.employeeName === k.fullName)) == null ? void 0 : c.divisionName, n.forEach((h) => {
|
|
43
|
+
Y.value.some((g) => (g == null ? void 0 : g.value) === h.divisionName) || Y.value.push({ value: h.divisionName, label: h.divisionName, key: h.divisionName }), h.divisionName === D.value && !I.value.some((g) => (g == null ? void 0 : g.activeText) === h.roleName) && I.value.push({ val: !0, activeText: h.roleName });
|
|
44
|
+
}), U();
|
|
45
45
|
});
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
if (l.divisionName ===
|
|
51
|
-
let
|
|
52
|
-
|
|
46
|
+
}, U = () => {
|
|
47
|
+
m.value = [];
|
|
48
|
+
let a = [];
|
|
49
|
+
a.value = [], F.value = [], k.odata.personal.forEach((l) => {
|
|
50
|
+
if (l.divisionName === D.value && I.value.some((e) => e.val && e.activeText === l.roleName)) {
|
|
51
|
+
let e = ne(l.employeeName);
|
|
52
|
+
a.value.push(l.employeeKey), m.value.push({ name: e + " (" + l.roleName + ")", code: l.employeeKey, days: [], contHour: 0, id: !1, ids: m.value.length });
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(l)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
}), k.workSchedule.getUsersYear({ code: a.value, year: new Date(f.value).getFullYear() }).then((l) => {
|
|
55
|
+
l.forEach((e) => {
|
|
56
|
+
e.dateStart && F.value.push({ code: e.code, dateStart: e.dateStart, dateEnd: e.dateEnd });
|
|
57
|
+
}), console.log(l), R();
|
|
58
|
+
});
|
|
59
|
+
}, R = () => {
|
|
60
|
+
k.workSchedule.getWorkSchedule({ code: q.value, date: $(new Date(f.value), "{Y}-{m}-{dd}") }).then(
|
|
61
|
+
(a) => {
|
|
62
|
+
a.forEach((l, e) => {
|
|
63
|
+
var u, x;
|
|
64
|
+
if (l !== null) {
|
|
65
|
+
l.data.days.forEach((n) => n.state = "Я");
|
|
66
|
+
for (let n = 1; n <= p.value.length; n++) {
|
|
67
|
+
let c = $(new Date(f.value).setDate(n), "{Y}-{m}-{dd}");
|
|
68
|
+
const h = (u = l.data) == null ? void 0 : u.days.findIndex((g) => g.day === c);
|
|
69
|
+
h === -1 ? m.value[e].days.push({
|
|
70
|
+
day: c,
|
|
67
71
|
time: "-",
|
|
68
72
|
state: "В"
|
|
69
|
-
}) :
|
|
73
|
+
}) : m.value[e].days.push((x = l.data) == null ? void 0 : x.days[h]);
|
|
70
74
|
}
|
|
71
75
|
} else {
|
|
72
|
-
|
|
73
|
-
for (let
|
|
74
|
-
|
|
75
|
-
day:
|
|
76
|
+
m.value[e].days = [];
|
|
77
|
+
for (let n = 1; n <= p.value.length; n++)
|
|
78
|
+
p.value[n - 1].holidays === "" ? K(n, e, 8) : p.value[n - 1].holidays === "preholiday" ? K(n, e, 7) : m.value[e].days.push({
|
|
79
|
+
day: $(new Date(f.value).setDate(n), "{Y}-{m}-{dd}"),
|
|
76
80
|
time: "-",
|
|
77
81
|
state: "В"
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
|
-
|
|
84
|
+
for (let n = 1; n <= p.value.length; n++) {
|
|
85
|
+
let c = new Date(new Date(f.value).getFullYear(), new Date(f.value).getMonth(), n).getTime() + 1e3;
|
|
86
|
+
for (let h of F.value) {
|
|
87
|
+
const { dateStart: g, dateEnd: W, code: Z } = h;
|
|
88
|
+
if (g && W && Z === l.code) {
|
|
89
|
+
const Q = new Date(L(g)).getTime(), ee = new Date(L(W)).getTime();
|
|
90
|
+
if (c >= Q && c <= ee) {
|
|
91
|
+
const H = $(new Date(f.value).setDate(n), "{Y}-{m}-{dd}"), z = m.value[e].days.findIndex((ae) => ae.day === H);
|
|
92
|
+
z !== -1 ? m.value[e].days[z] = { day: H, time: "-", state: "О" } : m.value[e].days.push({ day: H, time: "-", state: "О" });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}), X();
|
|
81
98
|
}
|
|
82
99
|
);
|
|
83
|
-
},
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
day:
|
|
87
|
-
time:
|
|
100
|
+
}, K = (a, l, e) => {
|
|
101
|
+
const u = $(new Date(f.value).setDate(a), "{Y}-{m}-{dd}");
|
|
102
|
+
m.value[l].days.push({
|
|
103
|
+
day: u,
|
|
104
|
+
time: e,
|
|
88
105
|
state: "Я"
|
|
89
106
|
});
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
for (let l = 0; l <
|
|
94
|
-
l < 15 &&
|
|
95
|
-
|
|
107
|
+
}, X = () => {
|
|
108
|
+
m.value.forEach((a) => {
|
|
109
|
+
a.hourI = 0, a.hourII = 0, a.halfII = 0, a.halfI = 0, a.weekend = 0, a.weekendDays = 0, a.night = 0;
|
|
110
|
+
for (let l = 0; l < a.days.length; l++)
|
|
111
|
+
l < 15 && a.days[l].time !== "-" && (a.hourI += a.days[l].time), l < 15 && a.days[l].state === "Я" && a.halfI++, l >= 15 && a.days[l].time !== "-" && (a.hourII += a.days[l].time), l >= 15 && a.days[l].state === "Я" && a.halfII++, a.days[l].state === "Н" && (a.night += a.days[l].time), a.days[l].state === "РВ" && (a.weekend += a.days[l].time), a.days[l].state === "В" && a.weekendDays++;
|
|
112
|
+
a.contDays = a.halfI + a.halfII, a.contHour = a.hourI + a.hourII, a.overtime = 0, V.value < a.contHour && (a.overtime = a.contHour - V.value), a.numberNonAppearing = 0, a.appearing = {
|
|
96
113
|
code: "-",
|
|
97
114
|
countH: "-"
|
|
98
115
|
};
|
|
99
116
|
});
|
|
100
|
-
},
|
|
101
|
-
var
|
|
117
|
+
}, P = (a, l) => {
|
|
118
|
+
var n, c;
|
|
102
119
|
if (l === -1) return "";
|
|
103
|
-
const
|
|
104
|
-
return
|
|
120
|
+
const e = new Date(f.value), u = `${e.getFullYear()}-${(e.getMonth() + 1).toString().padStart(2, "0")}-${a.toString().padStart(2, "0")}`, x = o.value[l].days.findIndex((h) => h.day === u);
|
|
121
|
+
return x === -1 ? "" : o.value[l].key === 0 ? (n = o.value[l].days[x]) == null ? void 0 : n.state : (c = o.value[l].days[x]) == null ? void 0 : c.time;
|
|
105
122
|
};
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
}), (
|
|
109
|
-
T.checkEdit ? (
|
|
123
|
+
return oe().then((a) => {
|
|
124
|
+
A.value = a, O();
|
|
125
|
+
}), (a, l) => (w(), N(S, null, [
|
|
126
|
+
T.checkEdit ? (w(), M(t(ue), {
|
|
110
127
|
key: 0,
|
|
111
|
-
modelValue:
|
|
112
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
128
|
+
modelValue: D.value,
|
|
129
|
+
"onUpdate:modelValue": l[0] || (l[0] = (e) => D.value = e),
|
|
113
130
|
placeholder: "Select",
|
|
114
131
|
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
115
132
|
}, {
|
|
116
133
|
default: s(() => [
|
|
117
|
-
(
|
|
118
|
-
key:
|
|
119
|
-
label:
|
|
120
|
-
value:
|
|
134
|
+
(w(!0), N(S, null, B(Y.value, (e) => (w(), M(t(se), {
|
|
135
|
+
key: e.value,
|
|
136
|
+
label: e.label,
|
|
137
|
+
value: e.value
|
|
121
138
|
}, null, 8, ["label", "value"]))), 128))
|
|
122
139
|
]),
|
|
123
140
|
_: 1
|
|
124
141
|
}, 8, ["modelValue"])) : E("", !0),
|
|
125
|
-
|
|
142
|
+
l[2] || (l[2] = C("div", { class: "expander" }, null, -1)),
|
|
143
|
+
T.checkEdit ? (w(), M(t(ie), {
|
|
126
144
|
key: 1,
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
145
|
+
modelValue: _.value,
|
|
146
|
+
"onUpdate:modelValue": l[1] || (l[1] = (e) => _.value = e),
|
|
129
147
|
"active-text": t(i)("workSchedule.currentMonth"),
|
|
130
148
|
"active-value": "0",
|
|
131
149
|
"inactive-value": "-1",
|
|
132
150
|
style: { "margin-bottom": ".5rem", "margin-left": ".5rem" }
|
|
133
151
|
}, null, 8, ["modelValue", "active-text"])) : E("", !0),
|
|
134
|
-
|
|
152
|
+
r(t(de), {
|
|
135
153
|
id: "printTable",
|
|
136
|
-
data:
|
|
137
|
-
"span-method":
|
|
154
|
+
data: o.value,
|
|
155
|
+
"span-method": G,
|
|
138
156
|
border: "",
|
|
139
157
|
style: { width: "100%" },
|
|
140
158
|
size: "small",
|
|
141
159
|
"empty-text": t(i)("sheet.emptyText"),
|
|
142
160
|
align: "center",
|
|
143
|
-
onCellClick:
|
|
161
|
+
onCellClick: a.coMenu
|
|
144
162
|
}, {
|
|
145
163
|
default: s(() => [
|
|
146
|
-
|
|
147
|
-
label: t(i)("sheet.title", { name:
|
|
164
|
+
r(t(d), {
|
|
165
|
+
label: t(i)("sheet.title", { name: D.value }) + t(j)(f.value, "month"),
|
|
148
166
|
align: "center",
|
|
149
167
|
height: "10"
|
|
150
168
|
}, {
|
|
151
169
|
default: s(() => [
|
|
152
|
-
|
|
170
|
+
r(t(d), {
|
|
153
171
|
label: t(i)("sheet.employee"),
|
|
154
172
|
width: "180",
|
|
155
173
|
align: "center"
|
|
156
174
|
}, {
|
|
157
|
-
default: s((
|
|
158
|
-
|
|
175
|
+
default: s((e) => [
|
|
176
|
+
y(v(o.value[e.$index].name), 1)
|
|
159
177
|
]),
|
|
160
178
|
_: 1
|
|
161
179
|
}, 8, ["label"]),
|
|
162
|
-
|
|
180
|
+
r(t(d), {
|
|
163
181
|
label: t(i)("sheet.personnelNumber"),
|
|
164
182
|
align: "center"
|
|
165
183
|
}, {
|
|
166
|
-
default: s((
|
|
167
|
-
|
|
184
|
+
default: s((e) => [
|
|
185
|
+
y(v(o.value[e.$index].code), 1)
|
|
168
186
|
]),
|
|
169
187
|
_: 1
|
|
170
188
|
}, 8, ["label"]),
|
|
171
|
-
|
|
189
|
+
r(t(d), {
|
|
172
190
|
label: t(i)("sheet.marks"),
|
|
173
191
|
align: "center"
|
|
174
192
|
}, {
|
|
175
193
|
default: s(() => [
|
|
176
|
-
(
|
|
177
|
-
key:
|
|
194
|
+
(w(!0), N(S, null, B(p.value, (e) => (w(), N(S, {
|
|
195
|
+
key: e.day
|
|
178
196
|
}, [
|
|
179
|
-
|
|
197
|
+
e.day <= 15 ? (w(), M(t(d), {
|
|
180
198
|
key: 0,
|
|
181
199
|
width: "30",
|
|
182
|
-
"class-name":
|
|
200
|
+
"class-name": e.holidays,
|
|
183
201
|
align: "center",
|
|
184
|
-
label:
|
|
185
|
-
` +
|
|
202
|
+
label: e.day.toString() + `
|
|
203
|
+
` + e.weekday
|
|
186
204
|
}, {
|
|
187
|
-
default: s((
|
|
188
|
-
|
|
205
|
+
default: s((u) => [
|
|
206
|
+
C("div", re, v(P(e.day, u.$index) || " "), 1)
|
|
189
207
|
]),
|
|
190
208
|
_: 2
|
|
191
209
|
}, 1032, ["class-name", "label"])) : E("", !0)
|
|
192
210
|
], 64))), 128)),
|
|
193
|
-
|
|
211
|
+
r(t(d), {
|
|
194
212
|
label: t(i)("sheet.halfMonth", { half: "I" }),
|
|
195
213
|
align: "center"
|
|
196
214
|
}, {
|
|
197
|
-
default: s((
|
|
198
|
-
|
|
215
|
+
default: s((e) => [
|
|
216
|
+
y(v(o.value[e.$index].key === 0 ? o.value[e.$index].halfI : o.value[e.$index].hourI), 1)
|
|
199
217
|
]),
|
|
200
218
|
_: 1
|
|
201
219
|
}, 8, ["label"]),
|
|
202
|
-
(
|
|
203
|
-
key:
|
|
220
|
+
(w(!0), N(S, null, B(p.value, (e) => (w(), N(S, {
|
|
221
|
+
key: e.day
|
|
204
222
|
}, [
|
|
205
|
-
|
|
223
|
+
e.day > 15 ? (w(), M(t(d), {
|
|
206
224
|
key: 0,
|
|
207
225
|
width: "30",
|
|
208
|
-
"class-name":
|
|
226
|
+
"class-name": e.holidays,
|
|
209
227
|
align: "center",
|
|
210
|
-
label:
|
|
211
|
-
` +
|
|
228
|
+
label: e.day.toString() + `
|
|
229
|
+
` + e.weekday
|
|
212
230
|
}, {
|
|
213
|
-
default: s((
|
|
214
|
-
|
|
231
|
+
default: s((u) => [
|
|
232
|
+
C("div", ce, v(P(e.day, u.$index) || " "), 1)
|
|
215
233
|
]),
|
|
216
234
|
_: 2
|
|
217
235
|
}, 1032, ["class-name", "label"])) : E("", !0)
|
|
218
236
|
], 64))), 128)),
|
|
219
|
-
|
|
237
|
+
r(t(d), {
|
|
220
238
|
label: t(i)("sheet.halfMonth", { half: "II" }),
|
|
221
239
|
align: "center"
|
|
222
240
|
}, {
|
|
223
|
-
default: s((
|
|
224
|
-
|
|
241
|
+
default: s((e) => [
|
|
242
|
+
y(v(o.value[e.$index].key === 0 ? o.value[e.$index].halfII : o.value[e.$index].hourII), 1)
|
|
225
243
|
]),
|
|
226
244
|
_: 1
|
|
227
245
|
}, 8, ["label"])
|
|
228
246
|
]),
|
|
229
247
|
_: 1
|
|
230
248
|
}, 8, ["label"]),
|
|
231
|
-
|
|
249
|
+
r(t(d), {
|
|
232
250
|
label: t(i)("sheet.workedMonth"),
|
|
233
251
|
align: "center"
|
|
234
252
|
}, {
|
|
235
253
|
default: s(() => [
|
|
236
|
-
|
|
254
|
+
r(t(d), {
|
|
237
255
|
label: t(i)("sheet.days"),
|
|
238
256
|
align: "center",
|
|
239
257
|
"label-class-name": "turn",
|
|
240
258
|
width: "34"
|
|
241
259
|
}, {
|
|
242
|
-
default: s((
|
|
243
|
-
|
|
260
|
+
default: s((e) => [
|
|
261
|
+
y(v(o.value[e.$index].contDays), 1)
|
|
244
262
|
]),
|
|
245
263
|
_: 1
|
|
246
264
|
}, 8, ["label"]),
|
|
247
|
-
|
|
265
|
+
r(t(d), {
|
|
248
266
|
label: t(i)("sheet.hours"),
|
|
249
267
|
align: "center"
|
|
250
268
|
}, {
|
|
251
269
|
default: s(() => [
|
|
252
|
-
|
|
270
|
+
r(t(d), {
|
|
253
271
|
label: t(i)("sheet.all"),
|
|
254
272
|
align: "center",
|
|
255
273
|
"label-class-name": "turn",
|
|
256
274
|
width: "40"
|
|
257
275
|
}, {
|
|
258
|
-
default: s((
|
|
259
|
-
|
|
276
|
+
default: s((e) => [
|
|
277
|
+
y(v(o.value[e.$index].contHour), 1)
|
|
260
278
|
]),
|
|
261
279
|
_: 1
|
|
262
280
|
}, 8, ["label"]),
|
|
263
|
-
|
|
281
|
+
r(t(d), {
|
|
264
282
|
label: t(i)("sheet.overtime"),
|
|
265
283
|
align: "center",
|
|
266
284
|
"label-class-name": "turn",
|
|
267
285
|
width: "34"
|
|
268
286
|
}, {
|
|
269
|
-
default: s((
|
|
270
|
-
|
|
287
|
+
default: s((e) => [
|
|
288
|
+
y(v(o.value[e.$index].overtime), 1)
|
|
271
289
|
]),
|
|
272
290
|
_: 1
|
|
273
291
|
}, 8, ["label"]),
|
|
274
|
-
|
|
292
|
+
r(t(d), {
|
|
275
293
|
label: t(i)("sheet.night"),
|
|
276
294
|
align: "center",
|
|
277
295
|
"label-class-name": "turn",
|
|
278
296
|
width: "34"
|
|
279
297
|
}, {
|
|
280
|
-
default: s((
|
|
281
|
-
|
|
298
|
+
default: s((e) => [
|
|
299
|
+
y(v(o.value[e.$index].night), 1)
|
|
282
300
|
]),
|
|
283
301
|
_: 1
|
|
284
302
|
}, 8, ["label"]),
|
|
285
|
-
|
|
303
|
+
r(t(d), {
|
|
286
304
|
label: t(i)("sheet.weekend"),
|
|
287
305
|
align: "center",
|
|
288
306
|
"label-class-name": "turn",
|
|
289
307
|
width: "34"
|
|
290
308
|
}, {
|
|
291
|
-
default: s((
|
|
292
|
-
|
|
309
|
+
default: s((e) => [
|
|
310
|
+
y(v(o.value[e.$index].weekend), 1)
|
|
293
311
|
]),
|
|
294
312
|
_: 1
|
|
295
313
|
}, 8, ["label"])
|
|
@@ -299,44 +317,44 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
299
317
|
]),
|
|
300
318
|
_: 1
|
|
301
319
|
}, 8, ["label"]),
|
|
302
|
-
|
|
320
|
+
r(t(d), {
|
|
303
321
|
label: t(i)("sheet.numberNonAppearing"),
|
|
304
322
|
align: "center"
|
|
305
323
|
}, {
|
|
306
|
-
default: s((
|
|
307
|
-
|
|
324
|
+
default: s((e) => [
|
|
325
|
+
y(v(o.value[e.$index].numberNonAppearing), 1)
|
|
308
326
|
]),
|
|
309
327
|
_: 1
|
|
310
328
|
}, 8, ["label"]),
|
|
311
|
-
|
|
329
|
+
r(t(d), {
|
|
312
330
|
label: t(i)("sheet.them"),
|
|
313
331
|
align: "center"
|
|
314
332
|
}, {
|
|
315
333
|
default: s(() => [
|
|
316
|
-
|
|
334
|
+
r(t(d), {
|
|
317
335
|
label: t(i)("sheet.code"),
|
|
318
336
|
align: "center",
|
|
319
337
|
"label-class-name": "turn",
|
|
320
338
|
width: "30"
|
|
321
339
|
}, {
|
|
322
|
-
default: s((
|
|
323
|
-
var
|
|
340
|
+
default: s((e) => {
|
|
341
|
+
var u;
|
|
324
342
|
return [
|
|
325
|
-
|
|
343
|
+
y(v((u = o.value[e.$index].appearing) == null ? void 0 : u.code), 1)
|
|
326
344
|
];
|
|
327
345
|
}),
|
|
328
346
|
_: 1
|
|
329
347
|
}, 8, ["label"]),
|
|
330
|
-
|
|
348
|
+
r(t(d), {
|
|
331
349
|
label: t(i)("sheet.count"),
|
|
332
350
|
align: "center",
|
|
333
351
|
"label-class-name": "turn",
|
|
334
352
|
width: "30"
|
|
335
353
|
}, {
|
|
336
|
-
default: s((
|
|
337
|
-
var
|
|
354
|
+
default: s((e) => {
|
|
355
|
+
var u;
|
|
338
356
|
return [
|
|
339
|
-
|
|
357
|
+
y(v((u = o.value[e.$index].appearing) == null ? void 0 : u.countH), 1)
|
|
340
358
|
];
|
|
341
359
|
}),
|
|
342
360
|
_: 1
|
|
@@ -344,12 +362,12 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
344
362
|
]),
|
|
345
363
|
_: 1
|
|
346
364
|
}, 8, ["label"]),
|
|
347
|
-
|
|
365
|
+
r(t(d), {
|
|
348
366
|
label: t(i)("sheet.countWeekend"),
|
|
349
367
|
align: "center"
|
|
350
368
|
}, {
|
|
351
|
-
default: s((
|
|
352
|
-
|
|
369
|
+
default: s((e) => [
|
|
370
|
+
y(v(o.value[e.$index].weekendDays), 1)
|
|
353
371
|
]),
|
|
354
372
|
_: 1
|
|
355
373
|
}, 8, ["label"])
|
|
@@ -363,5 +381,5 @@ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }
|
|
|
363
381
|
}
|
|
364
382
|
};
|
|
365
383
|
export {
|
|
366
|
-
|
|
384
|
+
fe as default
|
|
367
385
|
};
|
package/dist/WorkTable.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";const e=require("vue"),de=require("file-saver"),se=require("exceljs"),v=require("./index-Dn3djtwj.cjs"),ve=require("vue-i18n"),i=require("element-plus"),G=require("@imengyu/vue3-context-menu");function ce(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const S in k)if(S!=="default"){const p=Object.getOwnPropertyDescriptor(k,S);Object.defineProperty(r,S,p.get?p:{enumerable:!0,get:()=>k[S]})}}return r.default=k,Object.freeze(r)}const me=ce(se),ge={class:"work"},he={class:"nav"},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe={style:{height:"100px",width:"100%",display:"inline-block"}},ye={key:0,class:"controls-container",style:{"margin-top":".5rem"}},we={key:0,style:{padding:"0.5em 1.5em"}},ke={key:1,style:{padding:"0.5em 1.5em"}},Ce={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},group:String},setup(k){const{t:r,d:S}=ve.useI18n(),p=k,z=e.ref(!1),n=e.ref([]),R=e.ref(new Date().getMonth()+1),j=e.ref(!1),E=e.ref([]),w=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),D=e.ref(0),y=e.ref(9),m=e.ref(8),F=e.ref(!1),J=e.ref(!0),$=e.ref(!1),q=e.ref("5"),B=e.ref(1),C=e.ref(""),O=e.ref([]),V=e.ref([]),I=e.ref([]),c=e.ref({name:"Имя",length:0,code:""}),Y=e.ref(!1),P=e.ref({zIndex:30,minWidth:220,x:500,y:200}),Z=e.ref({}),T=e.ref("100%");e.watch(C,async(a,l)=>{a!==l&&(V.value=[],F.value=!1,p.odata.personal.forEach(o=>{o.divisionName===a&&(V.value.some(d=>(d==null?void 0:d.activeText)===o.roleName)||V.value.push({val:!0,activeText:o.roleName}))}),W())}),e.watch(R,async a=>{let l=new Date().getMonth(),o=a===null?l:a-1;o=l-1<=o?o:o+12,w.value=new Date(new Date().getFullYear(),o,1),K()});const _=(a,l,o,d)=>{c.value.ids=a.ids,c.value.key=a.key,c.value.add=a.days.length>0&&a.days[a.days.length-1].cont,c.value.level=l.level,c.value.day=o.cellIndex,P.value.y=d.clientY,P.value.x=d.clientX,l.level===2&&l.no===0&&p.checkEdit&&(c.value.name=r("workSchedule.autocomplete"),Y.value=!0),l.level===3&&o.cellIndex-l.no===1&&p.checkEdit&&(N(o.cellIndex,a.ids),c.value.name=r("workSchedule.modeSelection"),Y.value=!0)},ee=({row:a,columnIndex:l})=>{if(!E.value||E.value.length===0||!j.value)return"";const o=new Date(new Date(w.value).getFullYear(),new Date(w.value).getMonth(),l).getTime()+1e3;for(let d of E.value){const{dateStart:t,dateEnd:s,code:g}=d;if(t&&s&&g===a.code&&l!==0&&l<=u.value.length){const h=new Date(v.parseDate(t)).getTime(),b=new Date(v.parseDate(s)).getTime();if(o>=h&&o<=b)return"vacation"}}return""},K=()=>{const a=Z.value,l=new Date(w.value),o=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let d=[],t=0;for(let s=1;s<=o;s++){const g=v.parseTime(l.setDate(s),"{Y}-{m}-{dd}");t+=a.nowork.includes(g)||a.holidays.includes(g)?0:a.preholidays.includes(g)?7:8;const h=a.nowork.includes(g)?"nowork":a.holidays.includes(g)?"holiday":a.preholidays.includes(g)?"preholiday":"";d.push({day:s,holidays:h,weekday:S(new Date(l.getFullYear(),l.getMonth(),s),"day")})}D.value=t,u.value=d,p.odata.getPersonal({}).then(s=>{var g;C.value.length===0&&(C.value=(g=s.find(h=>h.employeeName===p.fullName))==null?void 0:g.divisionName),s.forEach((h,b)=>{O.value.some(x=>(x==null?void 0:x.value)===h.divisionName)||O.value.push({value:h.divisionName,label:h.divisionName,key:b}),h.divisionName===C.value&&!V.value.some(x=>(x==null?void 0:x.activeText)===h.roleName)&&V.value.push({val:!0,activeText:h.roleName})}),W(),J.value=!1})},le=e.computed(()=>!n.value.some(a=>a.contHour!==D.value)),Q=(a,l)=>{var s,g,h;const o=new Date(w.value),d=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,t=(s=n.value[l])==null?void 0:s.days.findIndex(b=>b.day===d);return l===-1||t===-1?"":((g=n.value[l].days[t])==null?void 0:g.tips)+`
|
|
2
2
|
`+((h=n.value[l].days[t])==null?void 0:h.time)},W=()=>{n.value=[],I.value=[],E.value=[],p.odata.personal.forEach(a=>{if(a.divisionName===C.value&&V.value.some(l=>l.val&&l.activeText===a.roleName)){let l=v.byInitials(a.employeeName);I.value.push(a.employeeKey),n.value.push({name:l+" ("+a.roleName+")",days:[],contHour:0,code:a.employeeKey,id:!1,ids:n.value.length})}}),p.workSchedule.getUsersYear({code:I.value,year:new Date(w.value).getFullYear()}).then(a=>{a.forEach(l=>{l.dateStart&&E.value.push({code:l.code,dateStart:l.dateStart,dateEnd:l.dateEnd})}),console.log(a),te(),$.value=!1})},te=()=>{p.workSchedule.getWorkSchedule({code:I.value,date:v.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>{a.forEach((l,o)=>{l!==null&&(n.value[o].days=l.data.days,n.value[o].id=l.id)}),M()})},M=()=>{n.value.forEach(a=>{a.contHour=a.days.reduce((l,o)=>l+o.time,0)})},ae=a=>{n.value[a].days=[],M()},ne=a=>{switch(q.value){case"5":for(let l=B.value;l<=u.value.length;l++)u.value[l-1].holidays===""&&N(l,a,!0),u.value[l-1].holidays==="preholiday"&&(m.value-=1,N(l,a,!0),m.value+=1);break;case"2x2":for(let l=B.value;l<=u.value.length;l+=4)N(l,a,!0),l+1<=u.value.length&&N(l+1,a,!0);break;case"2x5":for(let l=B.value;l<=u.value.length;l+=7)for(let o=l;o<l+5&&o<=u.value.length;o++)u.value[o-1].holidays==="preholiday"?(m.value-=1,N(o,a,!0),m.value+=1):N(o,a,!0);break}},N=(a,l,o=!1)=>{const{date:d,ind:t}=U(a,l);t===-1?(n.value[l].days.push({day:d,time:m.value,tips:`(${y.value}:00 - ${m.value>=22?y.value+m.value+2:y.value+m.value+1}:00)`}),M()):o||(m.value=n.value[l].days[t].time,y.value=parseInt(n.value[l].days[t].tips.slice(1,-12)))},oe=(a,l)=>{const{ind:o}=U(a,l);n.value[l].days.splice(o,1),M(),document.querySelector(".app-main").click()},X=(a,l)=>{const{date:o,ind:d}=U(a,l);n.value[l].days[d]={day:o,time:m.value,tips:`(${y.value}:00 - ${m.value>=22?y.value+m.value+2:y.value+m.value+1}:00)`},M()},U=(a,l)=>{var t;const o=v.parseTime(new Date(w.value).setDate(a),"{Y}-{m}-{dd}"),d=(t=n.value[l])==null?void 0:t.days.findIndex(s=>s.day===o);return{date:o,ind:d}},ue=async()=>{var x;z.value=!0;const a=new me.Workbook,l=a.addWorksheet(S(w.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"}},t={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${v.cellsDynamically("A1",u.value.length+5)}1`),l.mergeCells(`A2:${v.cellsDynamically("A2",u.value.length+5)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${v.cellsDynamically("B3",u.value.length)}3`),l.mergeCells(`${v.cellsDynamically("B3",u.value.length+1)}3:${v.cellsDynamically("B3",u.value.length+2)}3`),l.mergeCells(`${v.cellsDynamically("B3",u.value.length+3)}3:${v.cellsDynamically("B4",u.value.length+3)}4`),l.mergeCells(`${v.cellsDynamically("B3",u.value.length+4)}3:${v.cellsDynamically("B4",u.value.length+4)}4`),l.getCell("A1").value=r("workSchedule.firm"),l.getCell("A2").value=r("workSchedule.title",{name:C.value})+S(w.value,"month")+` ${new Date(w.value).getFullYear()}`,l.getCell("A3").value=r("workSchedule.month"),l.getCell("B3").value=r("workSchedule.numbersMonth"),l.getCell(3,u.value.length+2).value=r("workSchedule.onSchedule"),l.getCell(3,u.value.length+4).value=r("workSchedule.acquainted"),l.getCell(3,u.value.length+5).value=r("workSchedule.date"),l.getCell(4,u.value.length+2).value=r("workSchedule.days"),l.getCell(4,u.value.length+3).value=`${r("workSchedule.hours")} (${D.value})`;for(let f=2;f<=u.value.length+1;f++)l.getCell(4,f).value=u.value[f-2].weekday+`
|
|
3
|
-
`+(f-1),l.getColumn(f).width=6,l.getColumn(f).alignment=t,l.getCell(4,f).border=d;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(1).alignment=t,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=t,l.getColumn(u.value.length+3).alignment=t,l.getColumn(u.value.length+4).alignment=o,l.getColumn(u.value.length+5).alignment=o,l.getCell("A3").border=d,l.getCell("B3").border=d,l.getCell(3,u.value.length+2).border=d,l.getCell(4,u.value.length+2).border=d,l.getCell(3,u.value.length+4).border=d,l.getCell(3,u.value.length+5).border=d,l.getCell(4,u.value.length+3).border=d;let s=0;for(const f of n.value){let H=[f.name];for(let A=1;A<=u.value.length;A++){const{ind:L}=U(A,s);L!==-1?H[A]=`${f.days[L].time} ${f.days[L].tips}`:H[A]=" "}H.push(((x=f.days)==null?void 0:x.length)||" ",f.contHour||0);const ie=l.addRow(H);ie.border=d,s++}let g="Щербина Е. В.";p.odata.personal.forEach(f=>{f.roleName==="
|
|
3
|
+
`+(f-1),l.getColumn(f).width=6,l.getColumn(f).alignment=t,l.getCell(4,f).border=d;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(1).alignment=t,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=t,l.getColumn(u.value.length+3).alignment=t,l.getColumn(u.value.length+4).alignment=o,l.getColumn(u.value.length+5).alignment=o,l.getCell("A3").border=d,l.getCell("B3").border=d,l.getCell(3,u.value.length+2).border=d,l.getCell(4,u.value.length+2).border=d,l.getCell(3,u.value.length+4).border=d,l.getCell(3,u.value.length+5).border=d,l.getCell(4,u.value.length+3).border=d;let s=0;for(const f of n.value){let H=[f.name];for(let A=1;A<=u.value.length;A++){const{ind:L}=U(A,s);L!==-1?H[A]=`${f.days[L].time} ${f.days[L].tips}`:H[A]=" "}H.push(((x=f.days)==null?void 0:x.length)||" ",f.contHour||0);const ie=l.addRow(H);ie.border=d,s++}let g="Щербина Е. В.";p.odata.personal.forEach(f=>{f.roleName==="Начальник отдела правовой и кадровой работы"&&(g=f.employeeName)}),l.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),l.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),l.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),l.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),l.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),l.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),l.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),l.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),l.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),l.getCell(`A${n.value.length+6}`).value=r("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=r("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=r("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=r("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=v.byInitials(p.fullName),l.getCell(`AD${n.value.length+8}`).value=v.byInitials(g),l.getCell(`Z${n.value.length+9}`).value=r("workSchedule.printPlace"),l.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`Z${n.value.length+9}`).alignment=o,l.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},l.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const h="export_"+v.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",b=await a.xlsx.writeBuffer();de.saveAs(new Blob([b]),h),z.value=!1},re=async()=>{F.value||p.workSchedule.addWorkSchedule({data:n.value,date:v.parseTime(new Date(w.value),"{Y}-{m}-{dd}"),group:C.value}).then(a=>F.value=a)};return p.group&&(C.value=p.group),v.holidays().then(a=>{Z.value=a,K()}),(a,l)=>{const o=e.resolveComponent("el-date-picker"),d=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",he,[k.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElSelect),{key:0,modelValue:C.value,"onUpdate:modelValue":l[0]||(l[0]=t=>C.value=t),placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElOption),{key:t.key,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),k.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=t=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(o,{modelValue:R.value,"onUpdate:modelValue":l[2]||(l[2]=t=>R.value=t),type:"month",placeholder:"Выберите месяц",format:"MMM","value-format":"M"},null,8,["modelValue"]),l[19]||(l[19]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(i.ElSwitch),{modelValue:T.value,"onUpdate:modelValue":l[3]||(l[3]=t=>T.value=t),"active-text":a.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*4 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"]),e.createVNode(e.unref(i.ElSwitch),{modelValue:j.value,"onUpdate:modelValue":l[4]||(l[4]=t=>j.value=t),"active-text":"Отпуска","active-value":!0,"inactive-value":!1},null,8,["modelValue"])]),e.createVNode(e.unref(i.ElSkeleton),{style:{width:"100%"},loading:J.value,animated:""},{template:e.withCtx(()=>[e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"100%",height:"2rem"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"4rem","margin-right":"4px"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"4rem"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"8rem","margin-right":"4px"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"8rem"}})]),default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},"max-height":T.value,size:"small",align:"center",onCellClick:_,"empty-text":e.unref(r)("workSchedule.emptyText"),"cell-class-name":ee},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.title",{name:C.value})+e.unref(S)(w.value,"month")+` ${new Date(w.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.month"),width:"180",align:"center",fixed:T.value!=="100%"},{default:e.withCtx(t=>[e.createElementVNode("div",fe,e.toDisplayString(n.value[t.$index].name),1)]),_:1},8,["label","fixed"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElTableColumn),{key:t.day,width:"46","class-name":t.holidays,align:"center",label:t.weekday+`
|
|
4
4
|
`+t.day.toString(),prop:"vacation"},{default:e.withCtx(s=>[e.createElementVNode("div",pe,e.toDisplayString(Q(t.day,s.$index)||" "),1)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.onSchedule"),align:"center",fixed:T.value!=="100%"?"right":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.days"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(n.value[t.$index].days.length||0),1)]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:`${e.unref(r)("workSchedule.hours")} ( ${D.value} )`,align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${D.value===t.row.contHour?"green":"red"};`)},e.toDisplayString(t.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label","fixed"])]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text"])]),_:1},8,["loading"]),le.value&&k.checkEdit?(e.openBlock(),e.createElementBlock("div",ye,[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.chartsFilled"))+": ",1),F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,type:"primary",onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.confirm")),1)]),_:1})),l[20]||(l[20]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(k.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(i.ElButton),{disabled:z.value,plain:"",onClick:ue,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[d,z.value]]),e.createVNode(e.unref(i.ElDialog),{title:e.unref(r)("workSchedule.jobTitle"),modelValue:$.value,"onUpdate:modelValue":l[6]||(l[6]=t=>$.value=t),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(i.ElButton),{onClick:l[5]||(l[5]=t=>$.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(i.ElButton),{size:"default",type:"primary",onClick:W},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(i.ElForm),{ref:"dialogForm",model:V.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElSwitch),{modelValue:t.val,"onUpdate:modelValue":s=>t.val=s,"active-text":t.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(G.ContextMenu),{show:Y.value,"onUpdate:show":l[18]||(l[18]=t=>Y.value=t),options:P.value},{default:e.withCtx(()=>[e.createVNode(e.unref(G.ContextMenuItem),{label:c.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(G.ContextMenuSeparator)),c.value.level===2?(e.openBlock(),e.createElementBlock("div",we,[e.createVNode(e.unref(i.ElRadioGroup),{modelValue:q.value,"onUpdate:modelValue":l[7]||(l[7]=t=>q.value=t),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElRadioButton),{label:e.unref(r)("workSchedule.Days5"),value:"5"},null,8,["label"]),e.createVNode(e.unref(i.ElRadioButton),{label:"2 Х 2",value:"2x2"}),e.createVNode(e.unref(i.ElRadioButton),{label:"2 Х 5",value:"2x5"})]),_:1},8,["modelValue"]),l[21]||(l[21]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:B.value,"onUpdate:modelValue":l[8]||(l[8]=t=>B.value=t),step:1,min:1,max:u.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=t=>y.value=t),step:1,min:0,max:19},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:m.value,"onUpdate:modelValue":l[10]||(l[10]=t=>m.value=t),step:1,min:4,max:e.unref(v.clamp)(y.value!==1?23-y.value:21,4,22)},null,8,["modelValue","max"]),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[11]||(l[11]=t=>ne(c.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[12]||(l[12]=t=>ae(c.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",null,e.toDisplayString(Q(c.value.day,c.value.ids)),1),l[22]||(l[22]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:y.value,"onUpdate:modelValue":l[13]||(l[13]=t=>y.value=t),step:1,min:0,max:19,onChange:l[14]||(l[14]=t=>X(c.value.day,c.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:m.value,"onUpdate:modelValue":l[15]||(l[15]=t=>m.value=t),step:1,min:4,max:e.unref(v.clamp)(y.value!==1?23-y.value:21,4,22),onChange:l[16]||(l[16]=t=>X(c.value.day,c.value.ids))},null,8,["modelValue","max"]),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[17]||(l[17]=t=>oe(c.value.day,c.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}};module.exports=Ce;
|
package/dist/WorkTable.js
CHANGED
|
@@ -169,7 +169,7 @@ const Ke = { class: "work" }, Qe = { class: "nav" }, Xe = { style: { height: "10
|
|
|
169
169
|
}
|
|
170
170
|
let p = "Щербина Е. В.";
|
|
171
171
|
S.odata.personal.forEach((f) => {
|
|
172
|
-
f.roleName === "
|
|
172
|
+
f.roleName === "Начальник отдела правовой и кадровой работы" && (p = f.employeeName);
|
|
173
173
|
}), e.mergeCells(`A${n.value.length + 6}:P${n.value.length + 6}`), e.mergeCells(`Q${n.value.length + 6}:AG${n.value.length + 6}`), e.mergeCells(`B${n.value.length + 8}:E${n.value.length + 8}`), e.mergeCells(`F${n.value.length + 8}:L${n.value.length + 8}`), e.mergeCells(`M${n.value.length + 8}:P${n.value.length + 8}`), e.mergeCells(`S${n.value.length + 8}:V${n.value.length + 8}`), e.mergeCells(`W${n.value.length + 8}:AC${n.value.length + 8}`), e.mergeCells(`AD${n.value.length + 8}:AG${n.value.length + 8}`), e.mergeCells(`Z${n.value.length + 9}:AA${n.value.length + 9}`), e.getCell(`A${n.value.length + 6}`).value = d("workSchedule.byInitials"), e.getCell(`Q${n.value.length + 6}`).value = d("workSchedule.supervisorHR"), e.getCell(`B${n.value.length + 8}`).value = d("workSchedule.compiled") + ":", e.getCell(`S${n.value.length + 8}`).value = d("workSchedule.approved") + ":", e.getCell(`M${n.value.length + 8}`).value = re(S.fullName), e.getCell(`AD${n.value.length + 8}`).value = re(p), e.getCell(`Z${n.value.length + 9}`).value = d("workSchedule.printPlace"), e.getCell(`A${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`Q${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`B${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`F${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`M${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`AD${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`Z${n.value.length + 9}`).alignment = o, e.getCell(`F${n.value.length + 8}`).border = { bottom: { style: "thin" } }, e.getCell(`W${n.value.length + 8}`).border = { bottom: { style: "thin" } };
|
|
174
174
|
const y = "export_" + j(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", M = await t.xlsx.writeBuffer();
|
|
175
175
|
Fe(new Blob([M]), y), Z.value = !1;
|