????

Your IP : 216.73.216.152


Current Path : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/
Upload File :
Current File : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/8148.d9cba659.chunk.js

"use strict";(self.webpackChunk_qlxd_frontend=self.webpackChunk_qlxd_frontend||[]).push([[8010,8148,8292,9228,9854,9878],{1984:(e,n,t)=>{t.r(n),t.d(n,{default:()=>T});var a=t(82210),o=(t(68292),t(46881)),l=t(33851),r=t(4191),i=t(35065),s=t(27894),c=t(79209),d=t(34315),u=t(10782),h=t(14658),g=t(5338),m=t(79878),f=t(58010),p=t(98991),x=t(29829),y=t(59854),A=t(6058);const T=function(e){const[n,t]=(0,a.useState)((new Date).getMonth()+1),[T,v]=(0,a.useState)((new Date).getFullYear()),[N,b]=(0,a.useState)([]),[C,j]=(0,a.useState)([]),[I,w]=(0,a.useState)(null),[k,B]=(0,a.useState)(!1),[S,E]=(0,a.useState)([]),[D,L]=(0,a.useState)(null),[z,_]=(0,a.useState)([]),[R,O]=(0,a.useState)(!1),[$,K]=(0,a.useState)(!1),[P,F]=(0,a.useState)(!1),[Z,V]=(0,a.useState)(""),G=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!n||!T)return(0,i.AB)("B\u1ea1n ch\u01b0a ch\u1ecdn th\u1eddi gian!");if(!D)return(0,i.AB)("B\u1ea1n ch\u01b0a ch\u1ecdn d\u1ef1 \xe1n!");const t=`$filter=Thang eq ${n} and Nam eq ${T} and DuAnId eq ${D.Id} and IsComplete eq true and Organization/DoiTuong eq '${g._Enums_DoiTuong.CongTy}'`;O(!0),h.r2.getAll(`?${t}`).then((e=>{let{value:n}=e;_(n),O(!1),K(!1)})).catch((()=>(O(!1),K(!0),3===e?(0,i.a3)("Kh\xf4ng t\u1ea3i \u0111\u01b0\u1ee3c b\u1ea3ng l\u01b0\u01a1ng, vui l\xf2ng th\u1eed l\u1ea1i!"):G(e+1))))}),[D,T,n]),W=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!n||!T)return(0,i.AB)("B\u1ea1n ch\u01b0a ch\u1ecdn th\u1eddi gian!");if(!D)return(0,i.AB)("B\u1ea1n ch\u01b0a ch\u1ecdn d\u1ef1 \xe1n!");if(1===n)return;const t=`$filter=Thang gt ${n} and Nam eq ${T} and DuAnId eq ${D.Id} and IsComplete eq true and Organization/DoiTuong eq '${g._Enums_DoiTuong.CongTy}'`;h.r2.getAll(`?${t}`).then((e=>{let{value:n}=e;return b(n)})).catch((()=>3===e?(0,i.a3)("L\u1ed7i...!"):W(e+1)))}),[D,T,n]),H=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const n=`$filter=Organization/Status eq true and Organization/DoiTuong eq '${g._Enums_DoiTuong.CongTy}' and DuAn/Status eq true`,t="$expand=Organization($select=Id,OrganName),DuAn($select=Id,Name)";h.oF.getAll(`?${n}&${t}`).then((e=>{let{value:n}=e,t=[];for(let a of n){const e=t.findIndex((e=>e.Id===a.DuAnId));-1===e?t.push({Id:a.DuAn.Id,Name:a.DuAn.Name,Organs:[{OrganId:a.Organization.Id,OrganName:a.Organization.OrganName}]}):t[e].Organs.push({OrganId:a.Organization.Id,OrganName:a.Organization.OrganName})}E(t)})).catch((()=>3===e?(0,i.a3)("Ch\u01b0a th\u1ec3 t\u1ea3i \u0111\u01b0\u1ee3c danh s\xe1ch d\u1ef1 \xe1n. Vui l\xf2ng th\u1eed l\u1ea1i!"):H(e+1)))}),[]),U=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;h.jC.getAllParam("?$filter=Status eq true").then((e=>j(e.value))).catch((()=>3===e?(0,i.a3)("Kh\xf4ng th\u1ec3 t\u1ea3i \u0111\u01b0\u1ee3c danh s\xe1ch ph\u1ee5 c\u1ea5p, vui l\xf2ng th\u1eed l\u1ea1i!"):U(e+1)))}),[]),q=()=>{G(),W()};return(0,a.useEffect)((()=>{U(),H()}),[H,U]),(0,A.jsxs)("div",{className:"bang-luong-cty",children:[(0,A.jsxs)("div",{style:{display:"flex",paddingBottom:10},children:[(0,A.jsx)("div",{style:{width:"10%",marginRight:"10px"},children:(0,A.jsx)(c.BR,{value:{year:T,month:n},valueType:"object",onChange:e=>(e=>{let{year:n,month:a}=e;t(a),v(n)})(e)})}),(0,A.jsx)("div",{style:{width:"20%",paddingRight:"10px"},children:(0,A.jsx)(p.Ay,{menuPosition:"fixed",options:S,onChange:e=>(e=>{L(e),V(e.Name)})(e),getOptionValue:e=>e,getOptionLabel:e=>e.Name})}),(0,A.jsx)(o.A,{color:"primary",onClick:q,children:"Xem b\u1ea3ng l\u01b0\u01a1ng"})]}),(0,A.jsx)("div",{className:"tableFixHead",children:(0,A.jsxs)("table",{children:[(0,A.jsx)("thead",{children:(0,A.jsxs)("tr",{style:{background:"#006FCA"},children:[(0,A.jsx)("th",{className:"th-table",style:{width:"70%"},children:"B\u1ea3ng l\u01b0\u01a1ng"}),(0,A.jsx)("th",{className:"th-table",children:"Thao t\xe1c"})]})}),(0,A.jsx)("tbody",{children:R?(0,A.jsx)("tr",{children:(0,A.jsx)("td",{colSpan:2,children:(0,A.jsx)(x.A,{occurrences:5,height:20})})}):(0,A.jsx)(A.Fragment,{children:$?(0,A.jsx)("tr",{children:(0,A.jsx)("td",{colSpan:2,style:{textAlign:"center"},children:(0,A.jsx)(o.A,{color:"primary",onClick:q,children:"T\u1ea3i l\u1ea1i"})})}):(0,A.jsx)(A.Fragment,{children:z.length?(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{children:`B\u1ea3ng l\u01b0\u01a1ng \u0111\u1ed9i c\xf4ng ty th\xe1ng ${n} n\u0103m ${T}`}),(0,A.jsxs)("td",{children:[(0,A.jsx)(s.a2,{style:{marginRight:"7px"},icon:"eye",onClick:()=>{F(!0)},children:" Xem "}),(0,A.jsx)(s.a2,{style:{marginRight:"7px"},icon:"download",onClick:async()=>{const e=await(e=>h.r2.postExtension("/GetJsonBangLuong",{Thang:n,Nam:T,DoiTuong:g._Enums_DoiTuongNumber.CongTy,DuAnIds:[e.Id],OrganIds:e.Organs.map((e=>e.OrganId))}))(D);if(null===e||void 0===e||!e.IsSuccessed)return(0,i.a3)("Xu\u1ea5t b\u1ea3ng l\u01b0\u01a1ng th\u1ea5t b\u1ea1i. Vui l\xf2ng th\u1eed l\u1ea1i!");(0,f.exportExcelBangLuongCty)(e,C,n,T,D,Z)},children:" T\u1ea3i file "}),(0,A.jsx)(s.a2,{icon:"trash",style:{background:"red",border:0},onClick:()=>(0,i.A1)(`B\u1ea1n ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a b\u1ea3ng l\u01b0\u01a1ng th\xe1ng ${n} n\u0103m ${T}`).then((e=>{e&&e.isConfirmed&&h.r2.Delete("/auth",`/XoaBangLuong?Thang=${n}&Nam=${T}&DoiTuong=${g._Enums_DoiTuongNumber.CongTy}&DuAnId=${D.Id}`).then((()=>{(0,i.nw)(`X\xf3a th\xe0nh c\xf4ng b\u1ea3ng l\u01b0\u01a1ng th\xe0nh ${n} n\u0103m ${T}`),G()}))})),children:" X\xf3a "})]})]}):(0,A.jsx)("tr",{children:(0,A.jsxs)("td",{colSpan:11,style:{textAlign:"center",paddingTop:"20px"},children:[(0,A.jsx)(s.UN,{onClick:()=>n&&T?D?z.length>0?(0,i.AB)("B\u1ea3ng l\u01b0\u01a1ng \u0111\xe3 \u0111\u01b0\u1ee3c t\u1ea1o, vui l\xf2ng ki\u1ec3m tra l\u1ea1i!"):N.length>0&&1!==n?(0,i.AB)("Kh\xf4ng \u0111\u01b0\u1ee3c t\u1ea1o! \u0110\xe3 t\u1ed3n t\u1ea1i b\u1ea3ng l\u01b0\u01a1ng c\u1ee7a th\xe1ng sau."):(w(g.Enum_Flag.add),void B(!0)):(0,i.AB)("B\u1ea1n ch\u01b0a ch\u1ecdn d\u1ef1 \xe1n!"):(0,i.AB)("B\u1ea1n ch\u01b0a ch\u1ecdn th\u1eddi gian!"),children:"T\u1ea1o b\u1ea3ng l\u01b0\u01a1ng"}),(0,A.jsx)(u.A,{size:"sm"})]})})})})})]})}),k&&(0,A.jsx)(d.E,{style:{zIndex:1049},title:`B\u1ea3ng thanh to\xe1n l\u01b0\u01a1ng \u0111\u1ed9i c\xf4ng ty th\xe1ng ${n} n\u0103m ${T}`,open:k,onClose:()=>{B(!1)},children:(0,A.jsx)(l.A,{children:(0,A.jsx)(r.A,{style:{padding:0},children:(0,A.jsx)(m.default,{thang:n,nam:T,doiTuong:g._Enums_DoiTuong.CongTy,open:k,flag:I,lstPhuCap:C,duAn:D,reload:G,onCloseModal:()=>{B(!1)}})})})}),P&&(0,A.jsx)(d.E,{style:{zIndex:1049},title:`B\u1ea3ng thanh to\xe1n l\u01b0\u01a1ng \u0111\u1ed9i c\xf4ng ty th\xe1ng ${n} n\u0103m ${T}`,open:P,onClose:()=>{F(!1)},children:(0,A.jsx)(l.A,{children:(0,A.jsx)(r.A,{style:{padding:0},children:(0,A.jsx)(y.default,{thang:n,nam:T,open:P,lstPhuCap:C,duAn:D})})})})]})}},3503:(e,n,t)=>{t.d(n,{A:()=>f});var a=t(30226),o=t(35007),l=t(82210),r=t(13879),i=t(63923),s=t(22255),c=t(74232),d=t(99247),u=t(17739),h=t(40438);function g(e,n){var t=function(e,n){var t,a=n.getBoundingClientRect();if(n.fakeTransform)t=n.fakeTransform;else{var o=window.getComputedStyle(n);t=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var l=0,r=0;if(t&&"none"!==t&&"string"===typeof t){var i=t.split("(")[1].split(")")[0].split(",");l=parseInt(i[4],10),r=parseInt(i[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(l-a.left,"px)"):"right"===e?"translateX(-".concat(a.left+a.width-l,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(r-a.top,"px)"):"translateY(-".concat(a.top+a.height-r,"px)")}(e,n);t&&(n.style.webkitTransform=t,n.style.transform=t)}var m={enter:u.p0.enteringScreen,exit:u.p0.leavingScreen};const f=l.forwardRef((function(e,n){var t=e.children,u=e.direction,f=void 0===u?"down":u,p=e.in,x=e.onEnter,y=e.onEntered,A=e.onEntering,T=e.onExit,v=e.onExited,N=e.onExiting,b=e.style,C=e.timeout,j=void 0===C?m:C,I=e.TransitionComponent,w=void 0===I?s.Ay:I,k=(0,o.A)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),B=(0,d.A)(),S=l.useRef(null),E=l.useCallback((function(e){S.current=r.findDOMNode(e)}),[]),D=(0,c.A)(t.ref,E),L=(0,c.A)(D,n),z=function(e){return function(n){e&&(void 0===n?e(S.current):e(S.current,n))}},_=z((function(e,n){g(f,e),(0,h.q)(e),x&&x(e,n)})),R=z((function(e,n){var t=(0,h.c)({timeout:j,style:b},{mode:"enter"});e.style.webkitTransition=B.transitions.create("-webkit-transform",(0,a.A)({},t,{easing:B.transitions.easing.easeOut})),e.style.transition=B.transitions.create("transform",(0,a.A)({},t,{easing:B.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",A&&A(e,n)})),O=z(y),$=z(N),K=z((function(e){var n=(0,h.c)({timeout:j,style:b},{mode:"exit"});e.style.webkitTransition=B.transitions.create("-webkit-transform",(0,a.A)({},n,{easing:B.transitions.easing.sharp})),e.style.transition=B.transitions.create("transform",(0,a.A)({},n,{easing:B.transitions.easing.sharp})),g(f,e),T&&T(e)})),P=z((function(e){e.style.webkitTransition="",e.style.transition="",v&&v(e)})),F=l.useCallback((function(){S.current&&g(f,S.current)}),[f]);return l.useEffect((function(){if(!p&&"down"!==f&&"right"!==f){var e=(0,i.A)((function(){S.current&&g(f,S.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[f,p]),l.useEffect((function(){p||F()}),[p,F]),l.createElement(w,(0,a.A)({nodeRef:S,onEnter:_,onEntered:O,onEntering:R,onExit:K,onExited:P,onExiting:$,appear:!0,in:p,timeout:j},k),(function(e,n){return l.cloneElement(t,(0,a.A)({ref:L,style:(0,a.A)({visibility:"exited"!==e||p?void 0:"hidden"},b,t.props.style)},n))}))}))},5338:(e,n,t)=>{t.r(n),t.d(n,{Enum_Flag:()=>g,Enum_NhomKhoanChis:()=>m,Enums_CongNo:()=>d,Enums_DoiTuong:()=>l,Enums_GioiTinh:()=>o,Enums_LoaiNoLabel:()=>h,Enums_LoaiNoNumber:()=>u,Enums_PhuongThucChamCong:()=>s,Enums_PhuongThucChamCongNumber:()=>c,Enums_ThanhToan:()=>a,_Enums_DoiTuong:()=>r,_Enums_DoiTuongNumber:()=>i});const a=[{value:"all",label:"T\u1ea5t c\u1ea3"},{value:"1",label:"\u0110\xe3 thanh to\xe1n"},{value:"0",label:"Ch\u01b0a thanh to\xe1n"}],o=[{value:"Nam",label:"Nam"},{value:"Nu",label:"N\u1eef"},{value:"Khong",label:"Ch\u01b0a c\xf3 th\xf4ng tin"}],l=[{value:"CuaHang",label:"C\u1eeda h\xe0ng"},{value:"ThueNgoai",label:"Thu\xea ngo\xe0i"},{value:"KhachHang",label:"Kh\xe1ch h\xe0ng"},{value:"NhanVien",label:"Nh\xe2n vi\xean"},{value:"CongTy",label:"C\xf4ng ty"},{value:"PhongBan",label:"Phong ban"}],r={CuaHang:"CuaHang",ThueNgoai:"ThueNgoai",KhachHang:"KhachHang",NhanVien:"NhanVien",CongTy:"CongTy",PhongBang:"PhongBan"},i={CuaHang:0,ThueNgoai:1,KhachHang:2,NhanVien:3,CongTy:4,PhongBang:5},s={TheoThang:"TheoThang",TheoDuAn:"TheoDuAn"},c={TheoThang:0,TheoDuAn:1},d={NoCu:"NoCu",TamUng:"TamUng",NoDoiTac:"NoDoiTac"},u={NoCu:"NoCu",TamUng:"TamUng",NoDoiTac:"NoDoiTac",DuAnNo:"DuAnNo",TraNo:"TraNo"},h={NoCu:"N\u1ee3 c\u0169",TamUng:"T\u1ea1m \u1ee9ng",NoDoiTac:"N\u1ee3 \u0111\u1ed1i t\xe1c",DuAnNo:"D\u1ef1 \xe1n"},g={view:"view",add:"add",edit:"edit",delete:"delete"},m={LuongThoThueNgoai:"6939DC70-E008-4286-AC13-00BD4DF40BBC",LuongThoCTy:"B59A4E45-B963-478F-8DD5-663607A32DAA",ChiPhiCuaHang:"A6391105-7862-491B-844E-0D8874AA8B7B"}},10782:(e,n,t)=>{t.d(n,{A:()=>r});var a=t(82210),o=t(15517),l=t(6058);class r extends a.Component{render(){const{size:e,text:n}=this.props;let t=(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-center",children:(0,l.jsx)("i",{className:"far fa-folder-open"})}),(0,l.jsx)("span",{children:n||"Kh\xf4ng c\xf3 d\u1eef li\u1ec7u"})]});return"sm"===e?(0,l.jsx)(i,{children:t}):(0,l.jsx)(s,{children:t})}}const i=o.Ay.div`
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;

    span{
        line-height: 1.2;
        display: block;
        opacity: 0.5;
        &:first-child{
            font-size:2.5rem;
        }
        &:last-child{
            font-size:1rem;
        }
    }
`,s=o.Ay.div`
height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    span{
        line-height: 1.2;
        display: block;
        opacity: 0.5;
        &:first-child{
            font-size:3.5rem;
        }
        &:last-child{
            font-size:1.5rem;
        }
    }
`},23347:(e,n,t)=>{t.d(n,{A:()=>d});var a=t(30226),o=t(35007),l=t(82210),r=t(30628),i=t(86953),s=t(57534),c=l.forwardRef((function(e,n){var t=e.classes,i=e.className,c=e.color,d=void 0===c?"inherit":c,u=e.component,h=void 0===u?"span":u,g=e.fontSize,m=void 0===g?"default":g,f=(0,o.A)(e,["classes","className","color","component","fontSize"]);return l.createElement(h,(0,a.A)({className:(0,r.A)("material-icons",t.root,i,"inherit"!==d&&t["color".concat((0,s.A)(d))],"default"!==m&&t["fontSize".concat((0,s.A)(m))]),"aria-hidden":!0,ref:n},f))}));c.muiName="Icon";const d=(0,i.A)((function(e){return{root:{userSelect:"none",fontSize:e.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(36)}}}),{name:"MuiIcon"})(c)},29829:(e,n,t)=>{t.d(n,{A:()=>l});var a=t(80028),o=(t(82210),t(6058));const l=function(e){let{occurrences:n=1,width:t,height:l=5}=e;return(0,o.jsx)("div",{children:Array.from(new Array(n).keys()).map((e=>(0,o.jsx)(a.A,{variant:"text",width:t||null,height:l},e)))})}},31142:(e,n,t)=>{t.d(n,{A:()=>i});t(82210);var a=t(65591),o=t(80226),l=t(63899),r=t(6058);function i(e){const{renderCustom:n,renderButton:t,children:i,title:s,onClose:c,open:d,style:u,className:h}=e;return(0,r.jsxs)(a.A,{open:d,onClose:c,style:u,className:h,children:[(0,r.jsx)(o.A,{renderCustom:n,renderButton:t,title:s,onClose:c}),(0,r.jsx)(l.A,{children:i})]})}},33851:(e,n,t)=>{t.d(n,{A:()=>m});var a=t(30226),o=t(92965),l=t(82210),r=t(71723),i=t.n(r),s=t(88323),c=t.n(s),d=t(5168),u=["className","cssModule","color","body","inverse","outline","tag","innerRef"],h={tag:d.Wx,inverse:i().bool,color:i().string,body:i().bool,outline:i().bool,className:i().string,cssModule:i().object,innerRef:i().oneOfType([i().object,i().string,i().func])},g=function(e){var n=e.className,t=e.cssModule,r=e.color,i=e.body,s=e.inverse,h=e.outline,g=e.tag,m=e.innerRef,f=(0,o.A)(e,u),p=(0,d.qO)(c()(n,"card",!!s&&"text-white",!!i&&"card-body",!!r&&(h?"border":"bg")+"-"+r),t);return l.createElement(g,(0,a.A)({},f,{className:p,ref:m}))};g.propTypes=h,g.defaultProps={tag:"div"};const m=g},34315:(e,n,t)=>{t.d(n,{E:()=>o.A,o:()=>a.A});var a=t(63232),o=t(31142)},34581:(e,n,t)=>{t.d(n,{A:()=>u});var a=t(30226),o=t(35007),l=t(82210),r=t(30628),i=t(86953),s=t(57534),c=t(38423),d=l.forwardRef((function(e,n){var t=e.classes,i=e.className,d=e.color,u=void 0===d?"primary":d,h=e.position,g=void 0===h?"fixed":h,m=(0,o.A)(e,["classes","className","color","position"]);return l.createElement(c.A,(0,a.A)({square:!0,component:"header",elevation:4,className:(0,r.A)(t.root,t["position".concat((0,s.A)(g))],t["color".concat((0,s.A)(u))],i,"fixed"===g&&"mui-fixed"),ref:n},m))}));const u=(0,i.A)((function(e){var n="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:n,color:e.palette.getContrastText(n)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(d)},49211:(e,n,t)=>{t.d(n,{A:()=>y});var a=t(79837),o=t(21307),l=t(23683),r=t(91343),i=t(12020),s=t.n(i),c=t(76638);function d(e){if(!e)return"";if(--e<c.YI.length)return c.YI[e];const n=e%c.YI.length;return`${d(Math.floor(e/c.YI.length))}${c.YI[n]}`}function u(e){if("string"==typeof e)return e;if(Array.isArray(e)&&e.length>1){const[n,t,a,o]=e;return a&&o?d(t)+n+":"+d(a)+o:d(t)+n}throw new Error("Sai \u0111\u1ecba ch\u1ec9 \xf4 Excel")}var h=(0,r.A)("ws"),g=(0,r.A)("getCellValue"),m=(0,r.A)("renderRow"),f=(0,r.A)("renderGroup");class p{constructor(e){return Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:e=>"[object Object]"===Object.prototype.toString.call(e)&&Object.prototype.hasOwnProperty.call(e,"value")?e.value:e||null}),Object.defineProperty(this,m,{writable:!0,value:(e,n)=>{let[t,a=1]=e;const{cells:o,style:r,height:i}=n;if(!o)return;const d=(0,l.A)(this,h)[h].getRow(t);o.forEach(((e,n)=>{const o=d.getCell(a+n);o.isMerged||(o.value=(0,l.A)(this,g)[g](e),o.style=s()({},c.eK,r,null===e||void 0===e?void 0:e.style),((null===e||void 0===e?void 0:e.colspan)>1||(null===e||void 0===e?void 0:e.rowspan)>1)&&(0,l.A)(this,h)[h].mergeCells(t,a+n,t+((null===e||void 0===e?void 0:e.rowspan)-1||0),a+n+((null===e||void 0===e?void 0:e.colspan)-1||0)))})),i&&((0,l.A)(this,h)[h].getRow(t).height=i)}}),Object.defineProperty(this,f,{writable:!0,value:(e,n)=>{let{keys:t,data:a,columns:o,style:r}=n;const i=null===t||void 0===t?void 0:t.shift(),d=o.find((e=>e.key===i));let{col:m,row:p}=(0,l.A)(this,h)[h].getCell(u(e)).fullAddress;if(i&&d){const e=Array.from(new Set(a.map(((e,n)=>"undefined"!==typeof d.render?d.render(e,n):e[i]))));for(let n of e){const e=(0,l.A)(this,h)[h].getCell(p,+m,p,+m+o.filter((e=>!e.group)).length);e.value=n||null,e.style=s()({},c.eK,r,{font:{bold:!0}}),(0,l.A)(this,h)[h].mergeCells(e.address),p=(0,l.A)(this,f)[f]([+p+1,+m],{keys:t,columns:o,data:a.filter((e=>e[i]===n))})}}else o.filter((e=>!e.group)).forEach(((e,n)=>{a="function"===typeof a?a():a,a.forEach(((t,a)=>{const o="undefined"!==typeof e.render?e.render(t,a):t[e.key];(0,l.A)(this,h)[h].getCell(+p+a,+m+n).value=(0,l.A)(this,g)[g](o),(0,l.A)(this,h)[h].getCell(+p+a,+m+n).style=s()({},c.eK,r,null===e||void 0===e?void 0:e.style,null===o||void 0===o?void 0:o.style)})),(0,l.A)(this,h)[h].getColumn(+m+n).width="number"===typeof e.width?e.width:10})),p+=a.length;return p}}),(0,l.A)(this,h)[h]=e,this}get worksheet(){return(0,l.A)(this,h)[h]}renderArrayRowGroup(e,n){let{rows:t,style:a}=n;const{col:o,row:r}=(0,l.A)(this,h)[h].getCell(u(e)).fullAddress;("function"===typeof t?t():t).forEach(((e,n)=>{e&&(0,l.A)(this,m)[m]([r+n,o],{r:r+n,c:o,style:s()({},a,e.style),cells:e.cells||e,height:e.height})}))}renderDataRowGroup(e,n){let{columns:t,data:a,header:o,totalRow:r,rowNum:i,headerStyle:c,cellStyle:d,onEndRow:g}=n;const{col:m,row:p}=(0,l.A)(this,h)[h].getCell(u(e)).fullAddress;t="function"===typeof t?t():t,i&&t.unshift({name:"STT",render:(e,n)=>n+1,colStyle:{alignment:{horizontal:"center"}},width:5}),o||(o=[{cells:t.filter((e=>!e.group)).map((e=>({value:e.name,style:s()({},e.cellStyle)}))),style:c}]),this.renderArrayRowGroup(e,{rows:o,style:c});const x=t.filter((e=>e.group)).sort(((e,n)=>+e.group-+n.group)).map((e=>e.key)),y=(0,l.A)(this,f)[f]([+p+o.length,+m],{keys:x,data:a,columns:t,style:d});g&&g(y-1)}}class x extends a.Workbook{static create(){const e=new a.Workbook;return e.creator="GDT QLCB",e.lastModifiedBy="GDT QLCB",e.created=new Date,e.modified=new Date,e.lastPrinted=new Date,e}async download(e){const n=await this.xlsx.writeBuffer();(0,o.saveAs)(new Blob([n],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e)}addWorksheet(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Sheet1",n=arguments.length>1?arguments[1]:void 0;return new p(super.addWorksheet(e,n))}getWorksheet(e){return new p(super.getWorksheet(e))}}const y=x},54163:(e,n,t)=>{t.d(n,{A:()=>d});var a=t(30226),o=t(35007),l=t(15685),r=t(82210),i=t(30628),s=t(86953),c=r.forwardRef((function(e,n){var t=e.classes,l=e.className,s=e.component,c=void 0===s?"div":s,d=e.disableGutters,u=void 0!==d&&d,h=e.variant,g=void 0===h?"regular":h,m=(0,o.A)(e,["classes","className","component","disableGutters","variant"]);return r.createElement(c,(0,a.A)({className:(0,i.A)(t.root,t[g],l,!u&&t.gutters),ref:n},m))}));const d=(0,s.A)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,l.A)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(c)},57011:(e,n,t)=>{t.d(n,{A:()=>c});var a=t(30226),o=t(35007),l=t(82210),r=t(30628),i=t(86953),s=l.forwardRef((function(e,n){var t=e.disableSpacing,i=void 0!==t&&t,s=e.classes,c=e.className,d=(0,o.A)(e,["disableSpacing","classes","className"]);return l.createElement("div",(0,a.A)({className:(0,r.A)(s.root,c,!i&&s.spacing),ref:n},d))}));const c=(0,i.A)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(s)},58010:(e,n,t)=>{t.r(n),t.d(n,{exportExcelBangLuongCty:()=>r});var a=t(61278),o=t(49211),l=t(76638);const r=(e,n,t,r,i,s)=>{(0,a.ox)();const c=[{value:"STT"},{value:"H\u1ecd v\xe0 t\xean"},{value:"N\u1ee3 c\u0169"},{value:"T\u1ea1m \u1ee9ng trong k\xec"},{value:"T\u1ed5ng t\u1ea1m \u1ee9ng"},{value:"Tr\u1eeb t\u1ea1m \u1ee9ng"},{value:"N\u1ee3 l\u1ea1i k\xec sau"},{value:"TNC"},{value:"\u0110\u01a1n gi\xe1"},{value:"Th\xe0nh ti\u1ec1n"}];for(let a=0;a<n.length;a++)c.push({value:n[a].Name});c.push({value:"Th\u1ef1c nh\u1eadn"});const d=new o.A,u=d.addWorksheet("Thanh To\xe1n L\u01b0\u01a1ng");u.renderArrayRowGroup([1,1],{style:l.fY,rows:[[{value:"C\xf4ng Ty TNHH X\xe2y d\u1ef1ng V\u1eadn t\u1ea3i T\xe2n Ph\xe1t",colspan:13}],[{value:"\u0110\u1ecba ch\u1ec9: 276/63 Ho\xe0ng V\u0103n Th\u1ee5 - Tp.Quy Nh\u01a1n - t\u1ec9nh B\xecnh \u0110\u1ecbnh          S\u1ed1 phi\u1ebfu: ...................",colspan:13}],[{value:`\u0110T: 0256.3524.789      Ng\xe0y  /${t}/${r}`,colspan:13}]]}),u.renderArrayRowGroup([5,1],{style:l.GN,rows:[[{value:`B\u1ea2NG THANH TO\xc1N L\u01af\u01a0NG \u0110\u1ed8I C\xd4NG TY TH\xc1NG ${t} N\u0102M ${r} D\u1ef0 \xc1N ${i.Name}`,colspan:11+n.length}]]}),u.renderArrayRowGroup([7,1],{style:{...l.vw,...l.li,verticalAlign:"middle",alignment:{horizontal:"center"},width:35},rows:[c]}),u.worksheet.getColumn(2).width=35;for(let a=3;a<=11+n.length;a++)u.worksheet.getColumn(a).width=13;const h=(e,n)=>{let t=0,a=0;return e&&0!==e&&(t=e),n&&0!==n&&(a=n),t+a},g=(e,n,t)=>{let a=0,o=0,l=0;return e&&0!==e&&(a=e),n&&0!==n&&(o=n),t&&0!==t&&(l=t),a+o-l},m=e=>{const t=[];return e.forEach(((e,o)=>{var r;if(t.push([{value:o+1,style:l.Zz},{value:e.HoTen},{value:e.NoCu&&0!==e.NoCu?(0,a.ZV)(e.NoCu):"",style:l.Zz},{value:e.CungKy&&0!==e.CungKy?(0,a.ZV)(e.CungKy):"",style:l.Zz},{value:0!==h(e.NoCu,e.CungKy)?(0,a.ZV)(h(e.NoCu,e.CungKy)):"",style:l.Zz},{value:0!==e.TruTamUng?(0,a.ZV)(e.TruTamUng):"",style:l.Zz},{value:0!==g(e.NoCu,e.CungKy,e.TruTamUng)?(0,a.ZV)(g(e.NoCu,e.CungKy,e.TruTamUng)):"",style:l.Zz},{value:e.TNC.toString(),style:l.Zz},{value:(0,a.ZV)(e.DonGia),style:l.Zz},{value:(0,a.ZV)(e.ThanhTien),style:l.Zz}]),null!==e&&void 0!==e&&null!==(r=e.PhuCaps)&&void 0!==r&&r.length){let r=null;for(const n of null===e||void 0===e?void 0:e.PhuCaps)r={...r,...n};n.forEach((e=>{t[o].push({value:0!==r[e.Id]?(0,a.ZV)(r[e.Id]):"",style:l.Zz})}))}else n.forEach((e=>{t[o].push({value:""})}));t[o].push({value:e.ThucNhan&&0!==e.ThucNhan?(0,a.ZV)(e.ThucNhan):"",style:l.Zz})})),t},f=(e,n)=>{if(0===n)return 0;return Array.from(new Array(n).keys()).reduce(((n,t)=>n+e[t].Items.length+1),1)-1};e.ResultObj.forEach(((e,t,a)=>{u.renderArrayRowGroup([8+f(a,t),1],{style:l.vw,rows:[[{value:"",style:{}},{value:e.TenDoi,colspan:10+n.length,style:{font:{bold:!0,size:12}}}],...m(e.Items)]})})),u.renderArrayRowGroup([8+(e=>{let n=0;return e.forEach(((e,t)=>{n+=1,e.Items.forEach(((e,t)=>{n+=1}))})),n})(e.ResultObj),1],{style:{...l.GN,...l.vw},rows:[...(e=>{let t=[],o=0,r=0,i=0,s=0,c=0,d=0,u=0,m=0,f=0;return e.forEach((e=>{e.Items.forEach(((e,t)=>{var a;if(o+=e.ThucNhan,r+=e.NoCu,i+=e.CungKy,s+=h(e.NoCu,e.CungKy),c+=e.TruTamUng,d+=g(e.NoCu,e.CungKy,e.TruTamUng),u+=e.ThanhTien,null!==e&&void 0!==e&&null!==(a=e.PhuCaps)&&void 0!==a&&a.length){let t=null;for(const n of null===e||void 0===e?void 0:e.PhuCaps)t={...t,...n};n.forEach((e=>{"94c2bee5-9865-4025-9a18-02008b31fddb"===e.Id&&(m+=t[e.Id]||0),"197aec10-e540-479b-876e-12eb492a81e0"===e.Id&&(f+=t[e.Id]||0)}))}}))})),t.push([{value:""},{value:"T\u1ed5ng c\u1ed9ng:",style:{...l.GN,...l.Zz}},{value:(0,a.ZV)(r),style:{...l.GN,...l.Zz}},{value:(0,a.ZV)(i),style:{...l.GN,...l.Zz}},{value:(0,a.ZV)(s),style:{...l.GN,...l.Zz}},{value:(0,a.ZV)(c),style:{...l.GN,...l.Zz}},{value:(0,a.ZV)(d),style:{...l.GN,...l.Zz}},{value:""},{value:""},{value:(0,a.ZV)(u),style:{...l.GN,...l.Zz}}]),t[0].push({value:(0,a.ZV)(m),style:{...l.GN,...l.Zz}}),t[0].push({value:(0,a.ZV)(f),style:{...l.GN,...l.Zz}}),t[0].push({value:(0,a.ZV)(o),style:{...l.GN,...l.Zz}}),t})(e.ResultObj)]}),u.worksheet.getCell(2,8).fontSize=18,d.download(`BangLuongDoiCongTyThang${t}/${r}_${s}.xlsx`),(0,a.kW)()}},59269:(e,n,t)=>{t.d(n,{A:()=>o});var a=t(98774);function o(e){return(0,a.A)(e)}},59854:(e,n,t)=>{t.r(n),t.d(n,{default:()=>u});var a=t(82210),o=(t(68292),t(10782)),l=t(14658),r=t(5338),i=t(61278),s=t(35065),c=t(6058);const d={NoCu:0,CungKy:0,TongTamUng:0,TruTamUng:0,NoLaiKiSau:0,ThanhTien:0,ThucNhan:0};const u=function(e){let{thang:n,nam:t,open:u,lstPhuCap:h,duAn:g}=e;const[m,f]=(0,a.useState)([]),[p,x]=(0,a.useState)(null),[y,A]=(0,a.useState)(d),T=(0,a.useCallback)((()=>l.r2.postExtension("/GetJsonBangLuong",{Thang:n,Nam:t,DoiTuong:r._Enums_DoiTuongNumber.CongTy,DuAnIds:[g.Id],OrganIds:g.Organs.map((e=>e.OrganId))}).then((e=>{f(e.ResultObj);const n={...d};e.ResultObj.forEach((e=>{e.Items.forEach((e=>{n.NoCu+=e.NoCu,n.CungKy+=e.CungKy,n.TongTamUng+=e.NoCu+e.CungKy,n.NoLaiKiSau+=e.NoCu+e.CungKy-e.TruTamUng,n.TruTamUng+=e.TruTamUng,n.ThanhTien+=e.ThanhTien,n.ThucNhan+=e.ThucNhan}))})),A(n);let t={};t=e.ResultObj.map((e=>e.Items.map((e=>e.PhuCaps)))).flat(3).filter((e=>!!e)).reduce(((e,n)=>{let t={...e};for(const[a,o]of Object.entries(n))t=t[a]?{...t,[a]:t[a]+o}:{...t,[a]:o};return t}),{}),x(t)})).catch((()=>(0,s.a3)("Kh\xf4ng th\u1ec3 t\u1ea3i b\u1ea3ng l\u01b0\u01a1ng, vui l\xf2ng th\u1eed l\u1ea1i!")))),[g.Id,g.Organs,t,n]),v=(e,n)=>{let t="";return e.PhuCaps?(e.PhuCaps.forEach((e=>{for(const[a,o]of Object.entries(e))a===n.Id&&(t=o)})),t):t},N=e=>e.NoCu+e.CungKy,b=e=>e.NoCu+e.CungKy;(0,a.useEffect)((()=>{u&&T()}),[T,u]);const C=(0,a.useCallback)(((e,n,t,a)=>(0,c.jsxs)("tr",{style:{height:"30px"},children:[(0,c.jsx)("td",{style:{textAlign:"center"},children:n+1}),(0,c.jsx)("td",{children:e.HoTen}),(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(e.NoCu?e.NoCu:0)}),(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(e.CungKy?e.CungKy:0)}),(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(N(e))}),(0,c.jsx)("td",{style:{textAlign:"center"},children:e.TruTamUng?(0,i.c_)(e.TruTamUng):0}),(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(b(e))}),(0,c.jsx)("td",{style:{textAlign:"center"},children:e.TNC?e.TNC:0}),(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(e.DonGia?e.DonGia:0)}),(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(e.ThanhTien?e.ThanhTien:0)}),h.map((n=>(0,c.jsx)("td",{style:{textAlign:"center"},children:(0,i.c_)(v(e,n))},n.Id))),(0,c.jsxs)("td",{style:{textAlign:"center",fontWeight:"700"},children:[" ",(0,i.c_)(e.ThucNhan?e.ThucNhan:0)]})]},`${t}.${n}`)),[h]),j=a.useMemo((()=>(0,c.jsxs)(c.Fragment,{children:[m.length?m.map(((e,n)=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("tr",{children:(0,c.jsx)("td",{colSpan:16,style:{background:"#f9ecce",fontWeight:"bold"},children:e.TenDoi})},n),e.Items.map(((t,a)=>C(t,a,n,e)))]}))):(0,c.jsx)("tr",{children:(0,c.jsx)("td",{colSpan:16,children:(0,c.jsx)(o.A,{size:"sm"})})}),(0,c.jsxs)("tr",{style:{height:40},children:[(0,c.jsx)("td",{colSpan:2,style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:"T\u1ed5ng"}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.NoCu)}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.CungKy)}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.TongTamUng)}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.TruTamUng)}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.NoLaiKiSau)}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:" "}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:" "}),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.ThanhTien)}),h.map((e=>(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(p?p[e.Id]:0)},e.Id))),(0,c.jsx)("td",{style:{textAlign:"center",background:"#f9ecce",fontWeight:"bold"},children:(0,i.c_)(y.ThucNhan)})]})]})),[m,h,C,p,y]);return(0,c.jsx)("div",{className:"index-form-tao-bang-luong",children:(0,c.jsx)("div",{children:(0,c.jsxs)("table",{children:[(0,c.jsx)("thead",{children:(0,c.jsxs)("tr",{style:{background:"#006FCA"},children:[(0,c.jsx)("th",{className:"th-table",style:{width:"2%",textAlign:"center"},children:"STT"}),(0,c.jsx)("th",{className:"th-table",style:{width:"13%"},children:"H\u1ecd v\xe0 t\xean"}),(0,c.jsx)("th",{className:"th-table",children:"N\u1ee3 c\u0169"}),(0,c.jsx)("th",{className:"th-table",style:{width:"7%",textAlign:"center"},children:"T\u1ea1m \u1ee9ng trong k\xec"}),(0,c.jsx)("th",{className:"th-table",style:{width:"7%",textAlign:"center"},children:"T\u1ed5ng t\u1ea1m \u1ee9ng"}),(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center",width:"12%"},children:"Tr\u1eeb t\u1ea1m \u1ee9ng"}),(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"N\u1ee3 l\u1ea1i k\xec sau"}),(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"TNC"}),(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"\u0110\u01a1n gi\xe1"}),(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"Th\xe0nh ti\u1ec1n"}),h.map((e=>(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center",width:"12%"},children:e.Name},e.Id))),(0,c.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"Th\u1ef1c nh\u1eadn"})]})}),(0,c.jsx)("tbody",{children:j})]})})})}},60803:(e,n,t)=>{t.d(n,{A:()=>d});var a=t(30226),o=t(35007),l=t(82210),r=t(30628),i=t(86953),s=t(36467),c=l.forwardRef((function(e,n){var t=e.children,i=e.classes,c=e.className,d=e.disableTypography,u=void 0!==d&&d,h=(0,o.A)(e,["children","classes","className","disableTypography"]);return l.createElement("div",(0,a.A)({className:(0,r.A)(i.root,c),ref:n},h),u?t:l.createElement(s.A,{component:"h2",variant:"h6"},t))}));const d=(0,i.A)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(c)},63232:(e,n,t)=>{t.d(n,{A:()=>p});t(82210);var a=t(86953),o=t(51959),l=t(71516),r=t(60803),i=t(34211),s=t(57011),c=t(75331),d=t(23347),u=t(36467),h=t(6058);const g=(0,a.A)((e=>({root:{margin:0,backgroundColor:"#006fca",color:"#FFF",padding:"6px 12px"},closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500],padding:"0 6px"}})))((e=>{const{children:n,classes:t,onClose:a}=e;return(0,h.jsxs)(r.A,{disableTypography:!0,className:t.root,children:[(0,h.jsx)(u.A,{variant:"subtitle2",children:n}),a?(0,h.jsx)(c.A,{"aria-label":"close",className:t.closeButton,onClick:a,children:(0,h.jsx)(d.A,{children:"close"})}):null]})})),m=(0,a.A)((e=>({root:{padding:e.spacing(2)}})))(i.A),f=(0,a.A)((e=>({root:{margin:0,padding:e.spacing(1),marginLeft:0}})))(s.A);function p(e){const{title:n,open:t,children:a,renderFooter:r,handleClose:i,maxWidth:s}=e,c=(0,o.A)({root:{overflowY:"unset"}})();return(0,h.jsxs)(l.A,{scroll:"body",className:c.root,onClose:i,open:t,fullWidth:!0,maxWidth:s,children:[(0,h.jsx)(g,{onClose:i,children:n}),(0,h.jsx)(m,{dividers:!0,children:a}),r&&(0,h.jsxs)(f,{children:[r," "]})]})}p.defaultProps={open:!1}},63899:(e,n,t)=>{t.d(n,{A:()=>l});t(82210);var a=t(34211),o=t(6058);function l(e){return(0,o.jsx)(a.A,{style:{backgroundColor:"#eee",paddingTop:20},children:e.children})}},65591:(e,n,t)=>{t.d(n,{A:()=>s});var a=t(82210),o=t(71516),l=t(3503),r=t(6058);const i=a.forwardRef(((e,n)=>(0,r.jsx)(l.A,{direction:"up",ref:n,...e})));function s(e){const{children:n,onClose:t,open:a,style:l,className:s}=e;return(0,r.jsx)(o.A,{className:s,style:l,disableEnforceFocus:!0,fullScreen:!0,open:a,onClose:t,TransitionComponent:i,children:n})}},68292:(e,n,t)=>{t.r(n),t.d(n,{default:()=>a});const a={}},76638:(e,n,t)=>{t.d(n,{GN:()=>i,YI:()=>s,Zz:()=>u,eK:()=>l,eS:()=>h,fY:()=>c,li:()=>d,vw:()=>r});var a=t(12020),o=t.n(a);Array.of(" kh\xf4ng "," m\u1ed9t "," hai "," ba "," b\u1ed1n "," n\u0103m "," s\xe1u "," b\u1ea3y "," t\xe1m "," ch\xedn "),Array.of(""," ngh\xecn"," tri\u1ec7u"," t\u1ef7"," ngh\xecn t\u1ef7"," tri\u1ec7u t\u1ef7");const l={numFmt:"#,##0",font:{name:"Times New Roman",family:4,size:12,color:{argb:"FF000000"}},alignment:{vertical:"middle",wrapText:!0},fill:{type:"pattern",pattern:"none"}},r={border:{top:{style:"thin",color:{argb:"FF808080"}},left:{style:"thin",color:{argb:"FF808080"}},bottom:{style:"thin",color:{argb:"FF808080"}},right:{style:"thin",color:{argb:"FF808080"}}}},i=o()({},{font:{bold:!0,size:12},alignment:{horizontal:"center",wrapText:!0}}),s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c={font:{bold:!0,size:10}},d={background:"#F2F2F2"},u={alignment:{horizontal:"center",vertical:"middle",wrapText:!0}},h={alignment:{horizontal:"right",vertical:"middle",wrapText:!0}}},78188:(e,n,t)=>{function a(e){return e&&e.ownerDocument||document}t.d(n,{A:()=>a})},78794:(e,n,t)=>{function a(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce((function(e,n){return null==n?e:function(){for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];e.apply(this,a),n.apply(this,a)}}),(function(){}))}t.d(n,{A:()=>a})},79878:(e,n,t)=>{t.r(n),t.d(n,{default:()=>f});var a=t(82210),o=(t(89228),t(10782)),l=t(14658),r=t(639),i=t(5338),s=t(61278),c=t(46881),d=t(35065),u=t(38441),h=t(27894),g=t(87760),m=t(6058);const f=function(e){let{thang:n,nam:t,open:f,flag:p,onCloseModal:x,lstPhuCap:y,duAn:A,reload:T}=e;const[v,N]=(0,a.useState)([]),[b,C]=(0,a.useState)([]),[j,I]=(0,a.useState)([]),[w,k]=(0,a.useState)([]),[B,S]=(0,a.useState)(null),[E,D]=(0,a.useState)([]),[L,z]=(0,a.useState)([]),[_,R]=(0,a.useState)(!1),O=(0,a.useRef)([]),$=(0,a.useRef)([]),K=g.lg.username,P=(0,a.useCallback)((()=>{const e={Thang:n,Nam:t,DoiTuong:i._Enums_DoiTuongNumber.CongTy,DuAnIds:[A.Id]};l.r2.postExtension("/DanhSachBangLuong",e).then((e=>{let{ResultObj:n}=e;N(n),0===n.length&&R(!0);const t=[],a=[];for(let o of y)a.push({PhuCapId:o.Id,SoTien:0});for(let o of n)for(let e of o.Items)t.push({BangLuongId:e.BangLuongId,TruTamUng:0,PhuCaps:a});k(t)})).catch((()=>R(!0)))}),[n,t,A.Id,y]),F=e=>e.NoCu+e.CungKy,Z=e=>{const n=O.current.find((n=>n.BangLuongId===e.BangLuongId));return n?e.NoCu+e.CungKy-n.SoTien:e.NoCu+e.CungKy},V=(0,a.useCallback)(((e,n)=>{if(_)return R(!0),(0,d.AB)("\u0110\xe3 t\u1ed3n t\u1ea1i th\xf4ng tin kh\xf4ng h\u1ee3p l\u1ec7. Vui l\xf2ng ki\u1ec3m tra l\u1ea1i!");R(!1);const t=(()=>{const n=O.current.find((n=>n.BangLuongId===e.BangLuongId));return n?+n.SoTien:null})(),a=(()=>{const n=j.find((n=>n.BangLuongId===e.BangLuongId));return n?+n.SoTien:null})();if(!t)return(0,d.AB)("B\u1ea1n ch\u01b0a nh\u1eadp s\u1ed1 ti\u1ec1n c\u1ea7n tr\u1eeb. Vui l\xf2ng th\u1eed l\u1ea1i!");if(t>e.ThucNhan)return R(!0),(0,d.AB)("S\u1ed1 ti\u1ec1n tr\u1eeb t\u1ea1m \u1ee9ng kh\xf4ng \u0111\u01b0\u1ee3c l\u1edbn h\u01a1n s\u1ed1 th\u1ef1c nh\u1eadn. Vui l\xf2ng th\u1eed l\u1ea1i!");if(t<0)return R(!0),(0,d.AB)("S\u1ed1 ti\u1ec1n tr\u1eeb t\u1ea1m \u1ee9ng ph\u1ea3i l\u1edbn h\u01a1n 0. Vui l\xf2ng th\u1eed l\u1ea1i!");if(t>e.NoCu+e.CungKy)return R(!0),(0,d.AB)("S\u1ed1 ti\u1ec1n tr\u1eeb \u0111\xe3 v\u01b0\u1ee3t qu\xe1 s\u1ed1 ti\u1ec1n \u0111\xe3 \u1ee9ng. Vui l\xf2ng th\u1eed l\u1ea1i!");I((n=>{const a=n.slice(),o=a.findIndex((n=>n.BangLuongId===e.BangLuongId));if(-1===o)return a.push({BangLuongId:e.BangLuongId,SoTien:t}),a;return(0,u.Ay)(n,(e=>{e[o].SoTien=t}))}));const o=v.findIndex((e=>e.DoiId===n));if(-1!==o){const n=v[o].Items.findIndex((n=>n.BangLuongId===e.BangLuongId));if(-1!==n){const e=(0,u.Ay)(v,(e=>{e[o].Items[n].ThucNhan=e[o].Items[n].ThucNhan-(t-a)}));N(e)}}if(0===t)return;const l=w.findIndex((n=>n.BangLuongId===e.BangLuongId)),r=(0,u.Ay)(w,(e=>{e[l].TruTamUng=t}));k(r),R(!1)}),[v,_,w,j]),G=(0,a.useCallback)(((e,n,t)=>{D((a=>{const o=[...a],l=o.findIndex((t=>t.PhuCapId===n.Id&&t.BangLuongId===e));if(-1===l)return o.push({BangLuongId:e,PhuCapId:n.Id,SoTien:+t}),o;return(0,u.Ay)(a,(e=>{e[l].SoTien=+t}))}))}),[]),W=(0,a.useCallback)(((e,n,t)=>{if(_)return(0,d.AB)("\u0110\xe3 t\u1ed3n t\u1ea1i th\xf4ng tin kh\xf4ng h\u1ee3p l\u1ec7. Vui l\xf2ng ki\u1ec3m tra l\u1ea1i!");const a=(()=>{const t=$.current.find((t=>t.PhuCapId===e.Id&&t.BangLuongId===n.BangLuongId));return t?+t.SoTien:null})(),o=(()=>{const t=L.find((t=>t.PhuCapId===e.Id&&t.BangLuongId===n.BangLuongId));return t?+t.SoTien:null})();if(null===a||a<0)return(0,d.AB)("B\u1ea1n ch\u01b0a nh\u1eadp s\u1ed1 ti\u1ec1n. Vui l\xf2ng th\u1eed l\u1ea1i!");if(a>n.ThucNhan&&e.IsTruLuong)return(0,d.AB)("S\u1ed1 ti\u1ec1n tr\u1eeb kh\xf4ng \u0111\u01b0\u1ee3c l\u1edbn h\u01a1n th\u1ef1c nh\u1eadn, vui l\xf2ng th\u1eed l\u1ea1i!");const l=v.findIndex((e=>e.DoiId===t));if(-1!==l){const t=v[l].Items.findIndex((e=>e.BangLuongId===n.BangLuongId));if(-1!==t){const r=(0,u.Ay)(v,(r=>{let i=+(a-(o||0));e.IsTheoCong&&(i=n.TNC*i),e.IsTruLuong?r[l].Items[t].ThucNhan=r[l].Items[t].ThucNhan-i:r[l].Items[t].ThucNhan=r[l].Items[t].ThucNhan+i}));z((t=>{const o=t.slice(),l=o.findIndex((t=>t.PhuCapId===e.Id&&t.BangLuongId===n.BangLuongId));return-1===l?(o.push({BangLuongId:n.BangLuongId,PhuCapId:e.Id,SoTien:a}),o):(o[l].SoTien=a,o)})),N(r)}}if(0===a)return;const r=w.findIndex((e=>e.BangLuongId===n.BangLuongId)),i=w[r].PhuCaps.findIndex((n=>n.PhuCapId===e.Id)),s=(0,u.Ay)(w,(e=>{e[r].PhuCaps[i].SoTien=a}));k(s)}),[v,_,L,w]);(0,a.useEffect)((()=>{f&&P()}),[P,f]),(0,a.useEffect)((()=>{O.current=b}),[b]),(0,a.useEffect)((()=>{$.current=E}),[E]);const H=(0,a.useCallback)(((e,n,t,a)=>(0,m.jsxs)("tr",{style:{background:""+(e.BangLuongId===B?"#598eff":"")},onClick:()=>S(e.BangLuongId),children:[(0,m.jsx)("td",{style:{textAlign:"center"},children:n+1}),(0,m.jsx)("td",{children:e.HoTen}),(0,m.jsx)("td",{style:{textAlign:"center"},children:(0,s.c_)(e.NoCu?e.NoCu:0)}),(0,m.jsx)("td",{style:{textAlign:"center"},children:(0,s.c_)(e.CungKy?e.CungKy:0)}),(0,m.jsx)("td",{style:{textAlign:"center"},children:(0,s.c_)(F(e))}),(0,m.jsx)("td",{style:{textAlign:"center"},children:p===i.Enum_Flag.add?(0,m.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,m.jsx)(r.A,{onValueChange:n=>((e,n)=>{if(e.NoCu+e.CungKy<n)return R(!0),(0,d.AB)("S\u1ed1 ti\u1ec1n tr\u1eeb t\u1ea1m \u1ee9ng v\u01b0\u1ee3t qu\xe1 s\u1ed1 ti\u1ec1n \u0111\xe3 \u1ee9ng");C((t=>{const a=t.slice(),o=a.findIndex((n=>n.BangLuongId===e.BangLuongId));return-1===o?(a.push({BangLuongId:e.BangLuongId,SoTien:+n}),a):(0,u.Ay)(t,(e=>{e[o].SoTien=+n}))})),R(!1)})(e,n.values.value)}),(0,m.jsx)(h.a2,{style:{height:"23px",width:"25px",marginLeft:"5px"},color:"danger",icon:"minus",onClick:()=>V(e,a.DoiId)})]}):(0,m.jsx)(m.Fragment,{children:e.TruTamUng?(0,s.c_)(e.TruTamUng):0})}),(0,m.jsx)("td",{style:{textAlign:"center"},children:(0,s.c_)(Z(e))}),(0,m.jsx)("td",{style:{textAlign:"center"},children:e.TNC?e.TNC:0}),(0,m.jsx)("td",{style:{textAlign:"center"},children:(0,s.c_)(e.DonGia?e.DonGia:0)}),(0,m.jsx)("td",{style:{textAlign:"center"},children:(0,s.c_)(e.ThanhTien?e.ThanhTien:0)}),y.map((n=>(0,m.jsx)("td",{style:{textAlign:"center"},children:p===i.Enum_Flag.add?(0,m.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,m.jsx)(r.A,{onValueChange:t=>{G(e.BangLuongId,n,t.values.value)}}),n.IsTruLuong?(0,m.jsx)(h.a2,{style:{height:"23px",width:"25px",marginLeft:"5px"},color:"danger",icon:"minus",onClick:()=>W(n,e,a.DoiId)}):(0,m.jsx)(h.a2,{style:{height:"23px",width:"25px",marginLeft:"5px"},color:"success",icon:"plus",onClick:()=>W(n,e,a.DoiId)})]}):(0,m.jsxs)(m.Fragment,{children:[e[n.Id]," "]})},n.Id))),(0,m.jsxs)("td",{style:{textAlign:"center",fontWeight:"700"},children:[" ",(0,s.c_)(e.ThucNhan?e.ThucNhan:0)]})]},`${t}.${n}`)),[B,p,W,V,y,G]),U=a.useMemo((()=>(0,m.jsx)(m.Fragment,{children:v.length?v.map(((e,n)=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("tr",{children:(0,m.jsx)("td",{colSpan:16,style:{background:"#f9ecce",fontWeight:"bold"},children:e.TenDoi})},n),e.Items.map(((t,a)=>H(t,a,n,e)))]}))):(0,m.jsx)("tr",{children:(0,m.jsx)("td",{colSpan:16,children:(0,m.jsx)(o.A,{size:"sm"})})})})),[v,H]);return(0,m.jsxs)("div",{className:"index-form-tao-bang-luong",children:[(0,m.jsx)("div",{className:"tableFixHead",children:(0,m.jsxs)("table",{children:[(0,m.jsx)("thead",{children:(0,m.jsxs)("tr",{style:{background:"#006FCA"},children:[(0,m.jsx)("th",{className:"th-table",style:{width:"2%",textAlign:"center"},children:"STT"}),(0,m.jsx)("th",{className:"th-table",style:{width:"13%"},children:"H\u1ecd v\xe0 t\xean"}),(0,m.jsx)("th",{className:"th-table",children:"N\u1ee3 c\u0169"}),(0,m.jsx)("th",{className:"th-table",style:{width:"7%",textAlign:"center"},children:"T\u1ea1m \u1ee9ng trong k\xec"}),(0,m.jsx)("th",{className:"th-table",style:{width:"7%",textAlign:"center"},children:"T\u1ed5ng t\u1ea1m \u1ee9ng"}),(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center",width:"12%"},children:"Tr\u1eeb t\u1ea1m \u1ee9ng"}),(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"N\u1ee3 l\u1ea1i k\xec sau"}),(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"TNC"}),(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"\u0110\u01a1n gi\xe1"}),(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"Th\xe0nh ti\u1ec1n"}),y.map((e=>(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center",width:"12%"},children:e.Name},e.Id))),(0,m.jsx)("th",{className:"th-table",style:{textAlign:"center"},children:"Th\u1ef1c nh\u1eadn"})]})}),(0,m.jsx)("tbody",{children:U})]})}),(0,m.jsx)("div",{className:"footer-form",children:(0,m.jsx)(c.A,{disabled:_,color:"primary",onClick:()=>(()=>{let e=[];v.forEach((n=>{n.Items.forEach((n=>{const t={...w.find((e=>e.BangLuongId===n.BangLuongId)),NoCu:Number(n.NoCu),NoCungKy:Number(n.CungKy)};e.push(t)}))}));const n={DanhSachLuong:e,NguoiLapPhieu:K};l.r2.postExtension("/TaoDanhSachLuong",n).then((()=>{T&&T(),(0,d.nw)("Th\xe0nh c\xf4ng!"),x()}))})(),children:"X\xe1c nh\u1eadn"})})]})}},80028:(e,n,t)=>{t.d(n,{A:()=>d});var a=t(30226),o=t(35007),l=t(82210),r=t(30628),i=t(98910),s=t(86953),c=l.forwardRef((function(e,n){var t=e.animation,i=void 0===t?"pulse":t,s=e.classes,c=e.className,d=e.component,u=void 0===d?"span":d,h=e.height,g=e.variant,m=void 0===g?"text":g,f=e.width,p=(0,o.A)(e,["animation","classes","className","component","height","variant","width"]),x=Boolean(p.children);return l.createElement(u,(0,a.A)({ref:n,className:(0,r.A)(s.root,s[m],c,x&&[s.withChildren,!f&&s.fitContent,!h&&s.heightAuto],!1!==i&&s[i])},p,{style:(0,a.A)({width:f,height:h},p.style)}))}));const d=(0,s.A)((function(e){return{root:{display:"block",backgroundColor:(0,i.Rv)(e.palette.text.primary,"light"===e.palette.type?.11:.13),height:"1.2em"},text:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 60%",transform:"scale(1, 0.60)",borderRadius:e.shape.borderRadius,"&:empty:before":{content:'"\\00a0"'}},rect:{},circle:{borderRadius:"50%"},pulse:{animation:"$pulse 1.5s ease-in-out 0.5s infinite"},"@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}},wave:{position:"relative",overflow:"hidden","&::after":{animation:"$wave 1.6s linear 0.5s infinite",background:"linear-gradient(90deg, transparent, ".concat(e.palette.action.hover,", transparent)"),content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}},"@keyframes wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},withChildren:{"& > *":{visibility:"hidden"}},fitContent:{maxWidth:"fit-content"},heightAuto:{height:"auto"}}}),{name:"MuiSkeleton"})(c)},80226:(e,n,t)=>{t.d(n,{A:()=>u});t(82210);var a=t(51959),o=t(59269),l=t(34581),r=t(54163),i=t(36467),s=t(54579),c=t(6058);const d=(0,a.A)((e=>(0,o.A)({appBar:{position:"relative",backgroundColor:"#006fca"},toolbar:{minHeight:40},title:{marginLeft:e.spacing(2),flex:1}})));function u(e){const n=d(),{renderCustom:t,renderButton:a,title:o,onClose:u}=e;return(0,c.jsx)(l.A,{className:n.appBar,children:(0,c.jsxs)(r.A,{className:n.toolbar,variant:"dense",children:[t,(0,c.jsx)(i.A,{variant:"h6",className:n.title,children:o}),a,(0,c.jsx)(s.A,{onClick:u,children:"\u0110\xf3ng"})]})})}},89228:(e,n,t)=>{t.r(n),t.d(n,{default:()=>a});const a={}},98774:(e,n,t)=>{function a(e){return e}t.d(n,{A:()=>a})}}]);
//# sourceMappingURL=8148.d9cba659.chunk.js.map