????
Current Path : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/ |
Current File : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/6535.3f68ee31.chunk.js |
"use strict";(self.webpackChunk_qlxd_frontend=self.webpackChunk_qlxd_frontend||[]).push([[6535],{46535:(e,t,l)=>{l.r(t),l.d(t,{exportExcelBangLuongPhongBan:()=>s});var n=l(61278),r=l(49211),o=l(76638);const a={font:{bold:!0,size:12}},s=(e,t,l,s)=>{(0,n.ox)();const u=[{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 n=0;n<t.length;n++)u.push({value:t[n].Name});u.push({value:"Th\u1ef1c nh\u1eadn"});const i=new r.A,h=i.addWorksheet("Thanh To\xe1n L\u01b0\u01a1ng");h.renderArrayRowGroup([1,1],{style:o.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 /${l}/${s}`,colspan:13}]]}),h.renderArrayRowGroup([5,1],{style:o.GN,rows:[[{value:`B\u1ea2NG THANH TO\xc1N L\u01af\u01a0NG TH\xc1NG ${l} N\u0102M ${s}`,colspan:11+t.length}]]}),h.renderArrayRowGroup([7,1],{style:{...o.vw,...o.li,verticalAlign:"middle",alignment:{horizontal:"center"},width:35},rows:[u]}),h.worksheet.getColumn(2).width=35;for(let n=3;n<=11+t.length;n++)h.worksheet.getColumn(n).width=13;const d=(e,t)=>{let l=0,n=0;return e&&0!==e&&(l=e),t&&0!==t&&(n=t),l+n},c=(e,t,l)=>{let n=0,r=0,o=0;return e&&0!==e&&(n=e),t&&0!==t&&(r=t),l&&0!==l&&(o=l),n+r-o};let y=0,g=0,v=0,f=0,p=0,w=0,m=0,T=0,C=0;const A=e=>{const l=[],r=[];return e.forEach(((e,r)=>{var a;if(y+=e.ThanhTien,g+=e.ThucNhan,v+=e.NoCu,f+=e.CungKy,m+=d(e.NoCu,e.CungKy),p+=e.TruTamUng,w+=c(e.NoCu,e.CungKy,e.TruTamUng),l.push([{value:r+1,style:o.Zz},{value:e.HoTen},{value:e.NoCu&&0!==e.NoCu?(0,n.ZV)(e.NoCu):"",style:o.Zz},{value:e.CungKy&&0!==e.CungKy?(0,n.ZV)(e.CungKy):"",style:o.Zz},{value:0!==d(e.NoCu,e.CungKy)?(0,n.ZV)(d(e.NoCu,e.CungKy)):"",style:o.Zz},{value:0!==e.TruTamUng?(0,n.ZV)(e.TruTamUng):"",style:o.Zz},{value:0!==c(e.NoCu,e.CungKy,e.TruTamUng)?(0,n.ZV)(c(e.NoCu,e.CungKy,e.TruTamUng)):"",style:o.Zz},{value:e.TNC.toString(),style:o.Zz},{value:(0,n.ZV)(e.DonGia),style:o.Zz},{value:(0,n.ZV)(e.ThanhTien),style:o.Zz}]),null!==e&&void 0!==e&&null!==(a=e.PhuCaps)&&void 0!==a&&a.length){let a=null;for(const t of null===e||void 0===e?void 0:e.PhuCaps)a={...a,...t};t.forEach((e=>{"94c2bee5-9865-4025-9a18-02008b31fddb"===e.Id&&(C+=a[e.Id]||0),"197aec10-e540-479b-876e-12eb492a81e0"===e.Id&&(T+=a[e.Id]||0),l[r].push({value:0!==a[e.Id]?(0,n.ZV)(a[e.Id]):"",style:o.Zz})}))}else t.forEach((e=>{l[r].push({value:""})}));l[r].push({value:e.ThucNhan&&0!==e.ThucNhan?(0,n.ZV)(e.ThucNhan):"",style:o.Zz})})),r.push([{value:""},{value:"T\u1ed4NG C\u1ed8NG",style:a},{value:(0,n.ZV)(v),style:{...o.Zz,...a}},{value:(0,n.ZV)(f),style:{...o.Zz,...a}},{value:(0,n.ZV)(m),style:{...o.Zz,...a}},{value:(0,n.ZV)(p),style:{...o.Zz,...a}},{value:(0,n.ZV)(w),style:{...o.Zz,...a}},{value:""},{value:""},{value:(0,n.ZV)(y),style:{...o.Zz,...a}}]),r[0].push({value:(0,n.ZV)(C),style:{...o.Zz,...a}}),r[0].push({value:(0,n.ZV)(T),style:{...o.Zz,...a}}),r[0].push({value:(0,n.ZV)(g),style:{...o.Zz,...a}}),l.concat(r)},b=(e,t)=>{if(0===t)return 0;return Array.from(new Array(t).keys()).reduce(((t,l)=>t+e[l].Items.length+1),1)-1};e.ResultObj.forEach(((e,l,n)=>{h.renderArrayRowGroup([8+b(n,l),1],{style:o.vw,rows:[[{value:"",style:{}},{value:e.TenDoi,colspan:10+t.length,style:{font:{bold:!0,size:12}}}],...A(e.Items)]})})),h.worksheet.getCell(2,8).fontSize=18,i.download(`BangLuongNVPhongBanThang${l}/${s}.xlsx`),(0,n.kW)()}},49211:(e,t,l)=>{l.d(t,{A:()=>w});var n=l(79837),r=l(21307),o=l(23683),a=l(91343),s=l(12020),u=l.n(s),i=l(76638);function h(e){if(!e)return"";if(--e<i.YI.length)return i.YI[e];const t=e%i.YI.length;return`${h(Math.floor(e/i.YI.length))}${i.YI[t]}`}function d(e){if("string"==typeof e)return e;if(Array.isArray(e)&&e.length>1){const[t,l,n,r]=e;return n&&r?h(l)+t+":"+h(n)+r:h(l)+t}throw new Error("Sai \u0111\u1ecba ch\u1ec9 \xf4 Excel")}var c=(0,a.A)("ws"),y=(0,a.A)("getCellValue"),g=(0,a.A)("renderRow"),v=(0,a.A)("renderGroup");class f{constructor(e){return Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,y,{writable:!0,value:e=>"[object Object]"===Object.prototype.toString.call(e)&&Object.prototype.hasOwnProperty.call(e,"value")?e.value:e||null}),Object.defineProperty(this,g,{writable:!0,value:(e,t)=>{let[l,n=1]=e;const{cells:r,style:a,height:s}=t;if(!r)return;const h=(0,o.A)(this,c)[c].getRow(l);r.forEach(((e,t)=>{const r=h.getCell(n+t);r.isMerged||(r.value=(0,o.A)(this,y)[y](e),r.style=u()({},i.eK,a,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,o.A)(this,c)[c].mergeCells(l,n+t,l+((null===e||void 0===e?void 0:e.rowspan)-1||0),n+t+((null===e||void 0===e?void 0:e.colspan)-1||0)))})),s&&((0,o.A)(this,c)[c].getRow(l).height=s)}}),Object.defineProperty(this,v,{writable:!0,value:(e,t)=>{let{keys:l,data:n,columns:r,style:a}=t;const s=null===l||void 0===l?void 0:l.shift(),h=r.find((e=>e.key===s));let{col:g,row:f}=(0,o.A)(this,c)[c].getCell(d(e)).fullAddress;if(s&&h){const e=Array.from(new Set(n.map(((e,t)=>"undefined"!==typeof h.render?h.render(e,t):e[s]))));for(let t of e){const e=(0,o.A)(this,c)[c].getCell(f,+g,f,+g+r.filter((e=>!e.group)).length);e.value=t||null,e.style=u()({},i.eK,a,{font:{bold:!0}}),(0,o.A)(this,c)[c].mergeCells(e.address),f=(0,o.A)(this,v)[v]([+f+1,+g],{keys:l,columns:r,data:n.filter((e=>e[s]===t))})}}else r.filter((e=>!e.group)).forEach(((e,t)=>{n="function"===typeof n?n():n,n.forEach(((l,n)=>{const r="undefined"!==typeof e.render?e.render(l,n):l[e.key];(0,o.A)(this,c)[c].getCell(+f+n,+g+t).value=(0,o.A)(this,y)[y](r),(0,o.A)(this,c)[c].getCell(+f+n,+g+t).style=u()({},i.eK,a,null===e||void 0===e?void 0:e.style,null===r||void 0===r?void 0:r.style)})),(0,o.A)(this,c)[c].getColumn(+g+t).width="number"===typeof e.width?e.width:10})),f+=n.length;return f}}),(0,o.A)(this,c)[c]=e,this}get worksheet(){return(0,o.A)(this,c)[c]}renderArrayRowGroup(e,t){let{rows:l,style:n}=t;const{col:r,row:a}=(0,o.A)(this,c)[c].getCell(d(e)).fullAddress;("function"===typeof l?l():l).forEach(((e,t)=>{e&&(0,o.A)(this,g)[g]([a+t,r],{r:a+t,c:r,style:u()({},n,e.style),cells:e.cells||e,height:e.height})}))}renderDataRowGroup(e,t){let{columns:l,data:n,header:r,totalRow:a,rowNum:s,headerStyle:i,cellStyle:h,onEndRow:y}=t;const{col:g,row:f}=(0,o.A)(this,c)[c].getCell(d(e)).fullAddress;l="function"===typeof l?l():l,s&&l.unshift({name:"STT",render:(e,t)=>t+1,colStyle:{alignment:{horizontal:"center"}},width:5}),r||(r=[{cells:l.filter((e=>!e.group)).map((e=>({value:e.name,style:u()({},e.cellStyle)}))),style:i}]),this.renderArrayRowGroup(e,{rows:r,style:i});const p=l.filter((e=>e.group)).sort(((e,t)=>+e.group-+t.group)).map((e=>e.key)),w=(0,o.A)(this,v)[v]([+f+r.length,+g],{keys:p,data:n,columns:l,style:h});y&&y(w-1)}}class p extends n.Workbook{static create(){const e=new n.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 t=await this.xlsx.writeBuffer();(0,r.saveAs)(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e)}addWorksheet(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Sheet1",t=arguments.length>1?arguments[1]:void 0;return new f(super.addWorksheet(e,t))}getWorksheet(e){return new f(super.getWorksheet(e))}}const w=p},76638:(e,t,l)=>{l.d(t,{GN:()=>s,YI:()=>u,Zz:()=>d,eK:()=>o,eS:()=>c,fY:()=>i,li:()=>h,vw:()=>a});var n=l(12020),r=l.n(n);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 o={numFmt:"#,##0",font:{name:"Times New Roman",family:4,size:12,color:{argb:"FF000000"}},alignment:{vertical:"middle",wrapText:!0},fill:{type:"pattern",pattern:"none"}},a={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"}}}},s=r()({},{font:{bold:!0,size:12},alignment:{horizontal:"center",wrapText:!0}}),u="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i={font:{bold:!0,size:10}},h={background:"#F2F2F2"},d={alignment:{horizontal:"center",vertical:"middle",wrapText:!0}},c={alignment:{horizontal:"right",vertical:"middle",wrapText:!0}}}}]); //# sourceMappingURL=6535.3f68ee31.chunk.js.map