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