????
Current Path : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/ |
Current File : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/8880.94285123.chunk.js |
"use strict";(self.webpackChunk_qlxd_frontend=self.webpackChunk_qlxd_frontend||[]).push([[6078,6599,8880,9069],{5338:(e,t,l)=>{l.r(t),l.d(t,{Enum_Flag:()=>g,Enum_NhomKhoanChis:()=>p,Enums_CongNo:()=>d,Enums_DoiTuong:()=>o,Enums_GioiTinh:()=>a,Enums_LoaiNoLabel:()=>c,Enums_LoaiNoNumber:()=>h,Enums_PhuongThucChamCong:()=>s,Enums_PhuongThucChamCongNumber:()=>u,Enums_ThanhToan:()=>n,_Enums_DoiTuong:()=>i,_Enums_DoiTuongNumber:()=>r});const n=[{value:"all",label:"T\u1ea5t c\u1ea3"},{value:"1",label:"\u0110\xe3 thanh to\xe1n"},{value:"0",label:"Ch\u01b0a thanh to\xe1n"}],a=[{value:"Nam",label:"Nam"},{value:"Nu",label:"N\u1eef"},{value:"Khong",label:"Ch\u01b0a c\xf3 th\xf4ng tin"}],o=[{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"}],i={CuaHang:"CuaHang",ThueNgoai:"ThueNgoai",KhachHang:"KhachHang",NhanVien:"NhanVien",CongTy:"CongTy",PhongBang:"PhongBan"},r={CuaHang:0,ThueNgoai:1,KhachHang:2,NhanVien:3,CongTy:4,PhongBang:5},s={TheoThang:"TheoThang",TheoDuAn:"TheoDuAn"},u={TheoThang:0,TheoDuAn:1},d={NoCu:"NoCu",TamUng:"TamUng",NoDoiTac:"NoDoiTac"},h={NoCu:"NoCu",TamUng:"TamUng",NoDoiTac:"NoDoiTac",DuAnNo:"DuAnNo",TraNo:"TraNo"},c={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"},p={LuongThoThueNgoai:"6939DC70-E008-4286-AC13-00BD4DF40BBC",LuongThoCTy:"B59A4E45-B963-478F-8DD5-663607A32DAA",ChiPhiCuaHang:"A6391105-7862-491B-844E-0D8874AA8B7B"}},10592:(e,t,l)=>{l.d(t,{zq:()=>i,Ty:()=>o,lG:()=>r});var n=l(7722);class a extends n.k{constructor(e){super("/Reports",e),this.getAll=e=>this.SearchAllAUTH(e,null,null,!0),this.addWithBatch=e=>this.InsertBatch("",e)}update(e,t){return this.edit(e,t)}}new class extends a{constructor(){super("/NhomDuAnDTOs")}};const o=new class extends a{constructor(){super("/ChiTietCongNos"),this.getDataCongNoTongHop=e=>this.GetAuthen("/GetCongNoTongHop?Nam="+e),this.GetCongNoVatLieuTheoDuAn=e=>this.PostAuthen("/GetCongNoVatLieuTheoDuAn",e),this.getDataChiTietCongNoCuaHang=(e,t,l)=>this.GetAuthen(`/ChiTietCongNoCuaHang?Nam=${e}&Thang=${t||0}&CuaHangId=${l}`),this.getDataCongNoDoiThueNgoai=e=>this.GetAuthen("/CongNoDoiThueNgoai?DotLuongId="+e),this.getDataTongHopCongNoCuaHang=e=>this.GetAuthen("/TongHopCongNoCuaHang?Nam="+e)}};const i=new class extends a{constructor(){super("/DuAnVatLieus"),this.getDataBangKeChiTiet=e=>this.PostAuthen("/BangKeChiTietVatLieu",e)}};const r=new class extends a{constructor(){super("/DuAns"),this.getKinhPhiCongTrinh=e=>this.GetAuthen(`/GetKinhPhiCongTrinh?DuAnId=${e}`),this.getLoiNhuan=e=>this.GetAuthen(`/ChotLaiAsync?key=${e}`)}}},13196:(e,t,l)=>{l.d(t,{A:()=>s});var n=l(82210),a=l(61316),o=l(67002),i=l(6058);const r={multiValueLabel:e=>({...e,padding:"0px 0px 0px 6px",fontSize:13}),control:e=>({...e,backgroundColor:"white",height:"28.38px",minHeight:"28.38px",fontSize:"12px",lineHeight:"1.5",cursor:"pointer",borderRadius:"4px"}),option:e=>({...e,fontSize:"12px",cursor:"pointer"}),input:e=>({...e,position:"unset"}),placeholder:e=>({...e,marginLeft:5,marginRight:5}),singleValue:(e,t)=>{let{data:l}=t;return{...e,transform:"inherit",top:"unset"}},container:e=>({...e,width:"100%"}),valueContainer:e=>({...e,padding:"0px 5px"}),indicatorsContainer:e=>({...e,padding:"0px 5px"}),indicatorContainer:e=>({...e,padding:"0px 5px !important",fontSize:"12px"})};const s=function(e){let{options:t,...l}=e;const[s,u]=(0,n.useState)([]),[d,h]=(0,n.useState)(null),[c,g]=(0,n.useState)(null),[p,m]=(0,n.useState)(!1),f=(0,n.useCallback)((e=>{let t=[];if(s&&s.length>0&&e)for(let l=0;l<s.length;l++){let n=s[l];for(let l=0;l<e.length;l++)n.value&&n.value===e[l]&&t.push(n)}return t}),[s]),v=(0,n.useCallback)((e=>{let t=null;if(s&&s.length>0&&e)for(let l=0;l<s.length;l++){if(s[l].value&&s[l].value===e){t=s[l];break}if(s[l].options)for(let n=0;n<s[l].options.length;n++)if(s[l].options[n].value&&s[l].options[n].value===e){t=s[l].options[n];break}}return t}),[s]),C=(0,n.useCallback)((e=>{l.isMulti?g(f(e)):g(v(e))}),[f,v,l.isMulti]),x=(0,n.useCallback)((()=>{let{columns:e,odata:t,url:n,where:a,valueField:i,textField:r}=l;if(!n)return;let s=[],h="";!1!==t?(h=`${n}`,h+=a?`/?$filter=${a}&`:"/?",e&&e.length>0&&(h+=`$select=${l.columns.join()}`)):h=l.url,(0,o.Pq)(h,"GET",null,t).then((e=>{!1!==t?e.value.forEach((e=>{s.push({value:e[i],label:e[r],obj:e})})):s=e,u(s),m(!1),C(d)})).catch((e=>{}))}),[l,C,d]);(0,n.useCallback)(((e,t)=>e.value!==l.value?(h(l.value),C(l.value),l.value||null):null),[l.value,C]),(0,n.useEffect)((()=>{m(!0);let{valueField:e,textField:n}=l;if(t){let l=t.map((t=>({value:t[e],label:t[n],obj:t})));u(l),m(!1),C(d)}else x(),m(!1)}),[]);const b=(0,n.useCallback)(((e,t)=>{if(g(e),l.isMulti){var n=[];for(let t=0;t<e.length;t++)n.push(e[t].value);l.onChange(n,null)}else l.getFullValue?l.onChange(e||null,e?e.obj:null):l.onChange(e?e.value:null,e?e.obj:null)}),[l]);let{placeholder:y,isMulti:T,isDetail:A,value:j,disabled:N}=l,w=T?f(j):v(j);return s.length>0&&A?(0,i.jsx)("span",{children:c&&c.label}):(0,i.jsx)(a.A,{isMulti:T,isLoading:p,isDisabled:N,isClearable:!0,className:"dropdownlist",value:w,styles:r,options:s,onChange:b,placeholder:y})}},18853:(e,t,l)=>{l.d(t,{A:()=>r});var n=l(82210),a=l(48895),o=l(6058);class i extends n.Component{render(){const{value:e,onChange:t}=this.props;return(0,o.jsx)(a.A,{value:e,onChange:t,options:(()=>{let e=[];for(var t=1;t<=12;t++)e.push({value:t,label:`Th\xe1ng ${t}`});return e})(),valueRef:"value",labelRef:"label",placeholder:"Ch\u1ecdn th\xe1ng"})}}i.defaultProps={placeholder:"Ch\u1ecdn..."};const r=i},20136:(e,t,l)=>{l.d(t,{A:()=>L});var n=l(82210),a=l(4984),o=l(40731),i=l(31053),r=l(52262),s=l(64038),u=l(68673),d=l(57136),h=l(3959),c=l(13196),g=l(47117),p=l(16377),m=l(6058);const f=e=>{const{disabled:t,name:l,label:n,checked:a,type:o,children:i,...r}=e;return(0,m.jsxs)("label",{className:"radio",children:[(0,m.jsx)(p.A,{...r,type:"radio",name:l,checked:a,disabled:t,children:i}),(0,m.jsx)("span",{className:t?"disabled":"",children:n})]})};f.defaultProps={};const v=f;const C=function(e){let{value:t,name:l,disabled:a,data:i,numberCol:r,onChange:s}=e;const[u,d]=(0,n.useState)(null);return(0,n.useEffect)((()=>{d(t)}),[t]),(0,m.jsx)(g.A,{children:i&&i.map(((e,t)=>(0,m.jsx)(o.A,{md:r,children:(0,m.jsx)(v,{name:l,disabled:a||e.disabled,value:e.value,label:e.label,checked:u===e.value&&!e.disabled,onChange:e=>{u!==e.target.value&&(d(e.target.value),s(e.target.value))}},t)})))})};var x=l(80609);const b=function(e){let{value:t,name:l,disabled:a,data:o,onChange:i}=e;const[r,s]=(0,n.useState)([]);(0,n.useEffect)((()=>{s(t)}),[t]);const u=(0,n.useCallback)(((e,t)=>{var l=r.indexOf(e);l<0?r.push(e):r.splice(l,1),s(r),i(r)}),[i,r]);return o&&o.map(((e,t)=>(0,m.jsx)(x.A,{name:l,disabled:a||e.disabled,value:e.value,label:e.label,checked:r&&r.indexOf(e.value)>=0&&!e.disabled,onChange:t=>u(e.value,t)},t)))};var y=l(639),T=l(79209),A=l(27662),j=l(76156),N=l(18853),w=l(61278),$=l(20146),k=l(54487);const D=e=>{let{data:t,onChange:l,value:n,isDetail:a}=e;const o=e=>`Nh\u1eadp ${e.toLowerCase()}`;switch(a&&"data-select"!==t.type?"label":t.type){case"label":return(0,m.jsx)("span",{children:"datetime"===t.type?(0,w.Yq)(n):"radio-list"===t.type?n=2===n?"Th\xf4ng b\xe1o gi\xe1":"K\xea khai gi\xe1":n});case"textbox":return(0,m.jsx)(s.A,{disabled:!!t.disabled&&t.disabled,name:t.field_name,value:null==n?"":n,onChange:e=>l&&l(e.target.name,e.target.value),placeholder:o(t.title)});case"password":return(0,m.jsx)(T._2,{name:t.field_name,value:null==n?"":n,onChange:e=>l&&l(e.target.name,e.target.value),placeholder:o(t.title)});case"textarea":return(0,m.jsx)(h.A,{disabled:!!t.disabled&&t.disabled,name:t.field_name,value:null==n?"":n,onChange:e=>l&&l(e.target.name,e.target.value),placeholder:o(t.title),style:t.style});case"checkbox":return(0,m.jsx)(T.H3,{disabled:!!t.disabled&&t.disabled,name:t.field_name,checked:n||!1,onChange:e=>{l&&l(t.field_name,e)},placeholder:o(t.title)});case"datetime":return(0,m.jsx)(d.A,{isClearable:t.isClearable,placeholder:t.placeholder,style:{height:"2rem"},className:"date-time",name:t.field_name,value:n,onChange:e=>l&&l(t.field_name,e),placeholderText:o(t.title)});case"data-select":return t.dataSelect&&(0,m.jsx)(c.A,{isDetail:a,isMulti:!!t.dataSelect.isMulti&&t.dataSelect.isMulti,disabled:!!t.disabled&&t.disabled,url:t.dataSelect.url,odata:t.dataSelect.odata,where:t.dataSelect.where,group_by:t.dataSelect.group_by,columns:t.dataSelect.columns,valueField:t.dataSelect.value_field,textField:t.dataSelect.text_field,options:t.dataSelect.options,value:n,placeholder:t.placeholder,getFullValue:t.getFullValue,onChange:(e,n)=>{l&&l(t.field_name,e,n)}});case"numeric":return(0,m.jsx)(T.YI,{name:t.field_name,value:n,onChange:e=>l&&l(e.target.name,e.target.value),placeholder:o(t.title)});case"currency":return(0,m.jsx)(y.A,{id:`ctl_${t.field_name}`,className:"number-format",disabled:!!t.disabled&&t.disabled,value:n,placeholder:"0",thousandSeparator:t.thousandSeparator,decimalSeparator:t.decimalSeparator,decimalScale:t.decimalScale,onValueChange:e=>{let{values:n}=e;l&&l(t.field_name,parseFloat(n.value))},onFocus:e=>e.target.select()});case"radio-list":return(0,m.jsx)(C,{name:t.field_name,disabled:!!t.disabled&&t.disabled,data:t.data,value:n,onChange:n=>l&&e.onChange(t.field_name,n)});case"checkbox-list":return(0,m.jsx)(b,{name:t.field_name,disabled:!!t.disabled&&t.disabled,data:t.data,value:n,onChange:n=>l&&e.onChange(t.field_name,n)});case"select-year":return(0,m.jsx)(A.A,{disabled:!!t.disabled&&t.disabled,value:n,onChange:n=>{l&&e.onChange(t.field_name,n&&n.value)},placeholder:o(t.title)});case"select-custom":return(0,m.jsx)(j.A,{value:n,onChange:n=>{l&&e.onChange(t.field_name,n&&n.value)},options:e.data.options});case"select-month":return(0,m.jsx)(N.A,{value:n,onChange:n=>{l&&e.onChange(t.field_name,n&&n.value)}});case"data-select-odata":return(0,m.jsx)($.pe,{fields:t.fields,originfield:t.originfield,url:t.url,name:t.field_name,column:{field:t.value_field,label:t.value_label,type:t.value_type},value:n||null,onChange:l=>e.onChange(t.field_name,l&&t.getFullValue?l:l.value),whereOne:t.where,multiLabel:t.multiLabel,eleUrl:1,placeholder:t.placeholder});case"file":return(0,m.jsx)(T.bT,{name:t.field_name,onChange:l=>e.onChange(t.field_name,l,!0),title:"Ch\u1ecdn t\u1eadp tin \u0111\xednh k\xe8m tr\u01b0\u1edbc khi t\u1ea3i l\xean",accept:"application/pdf",required:t.required});case"async-select":return(0,m.jsx)(k.A,{name:t.field_name,onChange:l=>e.onChange(t.field_name,l),placeholder:"Ch\u1ecdn kh\xe1ch h\xe0ng",loadData:t.loadOptions,getOptionValue:t.getOptionValue,getOptionLabel:t.getOptionLabel,onAdd:t.onAdd,value:n});case"multi-select":return(0,m.jsx)($.GD,{defaultValue:t.defaultValue||[],options:t.options,column:t.column||{field:"value",label:"label",type:"string"},onChange:l=>e.onChange(t.field_name,l)})}},S=e=>{const{data:t,value:l,onChange:n,onChangeRender:s,inline:d,colLabel:h,colValue:c}=e;return t&&"hidden"!==t.type&&(0,m.jsxs)(a.A,{row:!0,className:`form-control-${t.field_name}`,children:[!0!==t.hidden_label&&(0,m.jsx)(o.A,{md:h||(!1===d?"12":"3"),children:t.required?(0,m.jsx)(r.A,{children:t.title}):(0,m.jsx)(i.A,{children:t.title})}),(0,m.jsx)(o.A,{md:c||(!1===d||!0===t.hidden_label?"12":"9"),children:(0,m.jsx)("div",{className:"form-control-value",style:t.width&&{maxWidth:t.width},children:t.render?t.render(l,s):t.lookup?(0,m.jsx)(u.A,{name:t.field_name,value:l,onChange:e=>n&&n(e.target.name,e.target.value),placeholder:(g=t.title,`Nh\u1eadp ${g.toLowerCase()}`),children:Object.keys(t.lookup).map(((e,l)=>(0,m.jsx)("option",{value:e,children:t.lookup[e]},l)))}):D(e)})})]});var g};S.defaultProps={};const L=S},20278:(e,t,l)=>{l.r(t),l.d(t,{default:()=>r});var n=l(82210),a=l(80028),o=l(36467),i=l(6058);const r=function(e){let{loading:t,...l}=e;return(0,i.jsx)(n.Fragment,{children:t?(0,i.jsx)(n.Fragment,{md:"6",children:Array.from(Array(5).keys()).map((e=>(0,i.jsx)("tr",{children:Array.from(Array(5).keys()).map((e=>(0,i.jsx)("td",{children:(0,i.jsx)(o.A,{variant:"caption",children:(0,i.jsx)(a.A,{})})})))})))}):l.children})}},22010:(e,t,l)=>{l.d(t,{A5:()=>p,G5:()=>o,Is:()=>C,UI:()=>i,V$:()=>f,Yv:()=>h,Z5:()=>m,e9:()=>v,gn:()=>r,jB:()=>g,xz:()=>x});l(35065);const n=".",a="/",o=e=>e.filter((e=>e.dataID))[0],i=e=>o(e).field,r=e=>e&&e.includes(n),s=e=>e&&e.includes(a),u=e=>e.split(n).join(a),d=(e,t)=>e?t.field:t,h=(e,t,l)=>`${e}(${l[o(t).field]})`,c=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=[],u=[],h=[],c=0,g=[],p="",m="";e.forEach(((e,t)=>{h.push(e.field)}));let f=[],v=[];h.forEach(((e,t)=>{f.includes(e)?v.push(t):f.push(e)})),v.forEach((t=>{e.splice(t,1)})),e.forEach(((e,o)=>{let r="";r=l?d(t,e).split(n).reverse().splice(1).reverse().join(","):d(t,e).split(n).reverse().splice(1).reverse().join(a);let h=d(t,e).split(n).splice(1).reverse().join(a);s(h)&&(h=h.split(a)[0]),0===o?(i.push(r),u.push(h),g[o]=r):i.some((e=>e===r))?(g.forEach(((e,t)=>{e===r&&(p=t)})),u[p]!==h&&(u[p]=u[p]+","+h)):(i.push(r),g[o]=r,c=o,u[c]=h)}));let C=[];return u.forEach((e=>{C.push(e)})),u=C,i.forEach(((e,t)=>{if(0===t)if(s(e)){let l=e.split(a),n=u[t].split(a),o="",i="",r="",s="";l.forEach(((e,t)=>{r=t===l.length-1?r+")":"",s+=")",0===t?(i=e+"("+r,o=i):(i=t===l.length-1?"$expand="+e+"($select="+n[0]+s:"$expand="+e+"("+r,o=o+""+i)})),m=o}else if(null!==o){let l="";o.map(((e,t)=>{if(r(e.field)){let n=e.field.split(".");l+=0===t?n[n.length-1]:l+","+n[n.length-1]}})),m=e+"($select="+u[t]+","+l+")"}else m=e+"($select="+u[t]+")";else if(s(e)){let l=e.split(a),n=u[t].split(a),o="",i="",r="",s="";l.forEach(((e,t)=>{r=t===l.length-1?r+")":"",s+=")",0===t?(i=e+"("+r,o=i):(i=t===l.length-1?"$expand="+e+"($select="+n[0]+s:"$expand="+e+"("+r,o=o+""+i)})),m=m+","+o}else m=m+","+e+"($select="+u[t]+")"})),m},g=function(e,t,l){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(!(arguments.length>3&&void 0!==arguments[3]&&arguments[3]))return`${e} eq ${((e,t)=>"string"===e?`'${t}'`:"datetime"===e?`datetime'${t}'`:`${t}`)(t,l)}`;if(e.split(".")[0].split("/").length<3){if(r(e)){if(a){let t=`contains(${e.split(".").join("/")},'${l}')`+n;return a.map((e=>{if(e.isSearch){let a=e.field.split(".").join("/");t+=` or contains(${a},'${l}')`+n}})),t}return`contains(${e.split(".").join("/")},'${l}')`}return n?`contains(${e},'${l}') ${n}`:`contains(${e},'${l}')`}},p=(e,t,l,n)=>{if(e.filters&&e.filters.length>0){const t=e.filters.filter((e=>e.column.field&&e.column.type)).map((e=>{let t="";return t=l?`${r(e.column.field)?u(l):e.column.field}`:`${r(e.column.field)?e.column.dataRef[0]:e.column.field}`,g(t,e.column.type,e.value)}));return t&&t.join(" and ")}if(e.search&&e.search.length>=1){const l=t.filter((e=>e.searchable&&e.field&&e.type)).map((t=>{const l=`${r(t.field)?u(t.field):t.field}`;return"numeric"!==t.type||r(t.field)?g(l,t.type,e.search,!0,n?"and "+n:t.where):isNaN(Number(e.search))?void 0:g(l,t.type,e.search,!1)}));return l.map(((e,t)=>{void 0===e&&l.splice(t,1)})),l.forEach(((e,t)=>{"undefined"===typeof e&&l.splice(t,1)})),l&&l.join(" or ")}return""},m=(e,t)=>`$top=${t}&$skip=${e*t}&$count=true`,f=(e,t)=>`&$orderby=${r(e)?u(e):e} ${t}`,v=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.filter((e=>r(d(t,e))));return 0===a.length?"":null!==n?`&$expand=${c(a,t,l,n)}`:`&$expand=${c(a,t,l)}`},C=function(e){let t=arguments.length>3?arguments[3]:void 0,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const n=function(e,t){let l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t?"withColumns"===t?`${e.reduce(((e,t,n,a)=>{let o=d(l,t),i=`${e}`,s=i.split(","),u=!0;if(r(o)){let e=o.split(".");-1===s.indexOf(t.dataRef[0])&&e.length<3&&(i+=void 0===t.dataRef?"":t.dataRef[0]+",")}else-1===s.indexOf(o)?i+=`${o}`:u=!1;return`${i}${n===a.length-1||!0===r(o)?"":!0===u?",":""}`}),"")}`:"":`${e.filter((e=>r(e.field))).reduce(((e,t)=>`${e},${u(d(l,t))}`),"*")}`}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"withColumns",!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);if(t)return n?`&$select=${n}`:"";if(null!==l){var a="";return l.map((e=>a+=`,${e.field}`)),n?`&$select=${n} ${a}`:""}return n?`&$select=${n}`:""},x=function(e,t){let l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"withColumns",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;if(null!==a){let o=""+("&$filter="+a.field+" ne "+a.data),i=""+(" and "+a.field+" ne "+a.data);return`${v(e,l)}${C(e,n,l)}${t?"&$filter="+t+i:o}`}return!1===o?void 0!==i?`${v(e,l)}${C(e,n,l,o,i)}${t?"&$filter="+t:""}`:`${v(e,l)}${C(e,n,l,o)}${t?"&$filter="+t:""}`:`${v(e,l,o,i)}${t?"&$filter="+t:""}`}},27662:(e,t,l)=>{l.d(t,{A:()=>r});var n=l(82210),a=l(48895),o=l(6058);class i extends n.Component{render(){const{value:e,onChange:t}=this.props,l=(()=>{const e=(new Date).getFullYear();let t=[];for(var l=e-3;l<=e+3;l++)t.push({value:l,label:`N\u0103m ${l}`});return t})(),n=e||"";return(0,o.jsx)(a.A,{value:n,onChange:t,options:l,valueRef:"value",labelRef:"label",placeholder:"Ch\u1ecdn n\u0103m"})}}i.defaultProps={placeholder:"Ch\u1ecdn..."};const r=i},36599:(e,t,l)=>{l.r(t),l.d(t,{formCondition:()=>n});const n={Nam:{field_name:"Nam",title:"N\u0103m",type:"select-year",required:!0,hidden_label:!0},OrganId:{field_name:"OrganId",url:"GDTCores/Organizations",title:"C\u1eeda h\xe0ng",type:"data-select-odata",value_field:"Id",value_label:"OrganName",value_type:"uuid",hidden_label:!0,placeholder:"Ch\u1ecdn c\u1eeda h\xe0ng",required:!0,where:[{field:"DoiTuong",expression:"eq",value:`'${l(5338).Enums_DoiTuong[0].value}'`},{field:"Status",expression:"eq",value:"true"}],getFullValue:!0}}},49211:(e,t,l)=>{l.d(t,{A:()=>C});var n=l(79837),a=l(21307),o=l(23683),i=l(91343),r=l(12020),s=l.n(r),u=l(76638);function d(e){if(!e)return"";if(--e<u.YI.length)return u.YI[e];const t=e%u.YI.length;return`${d(Math.floor(e/u.YI.length))}${u.YI[t]}`}function h(e){if("string"==typeof e)return e;if(Array.isArray(e)&&e.length>1){const[t,l,n,a]=e;return n&&a?d(l)+t+":"+d(n)+a:d(l)+t}throw new Error("Sai \u0111\u1ecba ch\u1ec9 \xf4 Excel")}var c=(0,i.A)("ws"),g=(0,i.A)("getCellValue"),p=(0,i.A)("renderRow"),m=(0,i.A)("renderGroup");class f{constructor(e){return Object.defineProperty(this,c,{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,p,{writable:!0,value:(e,t)=>{let[l,n=1]=e;const{cells:a,style:i,height:r}=t;if(!a)return;const d=(0,o.A)(this,c)[c].getRow(l);a.forEach(((e,t)=>{const a=d.getCell(n+t);a.isMerged||(a.value=(0,o.A)(this,g)[g](e),a.style=s()({},u.eK,i,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)))})),r&&((0,o.A)(this,c)[c].getRow(l).height=r)}}),Object.defineProperty(this,m,{writable:!0,value:(e,t)=>{let{keys:l,data:n,columns:a,style:i}=t;const r=null===l||void 0===l?void 0:l.shift(),d=a.find((e=>e.key===r));let{col:p,row:f}=(0,o.A)(this,c)[c].getCell(h(e)).fullAddress;if(r&&d){const e=Array.from(new Set(n.map(((e,t)=>"undefined"!==typeof d.render?d.render(e,t):e[r]))));for(let t of e){const e=(0,o.A)(this,c)[c].getCell(f,+p,f,+p+a.filter((e=>!e.group)).length);e.value=t||null,e.style=s()({},u.eK,i,{font:{bold:!0}}),(0,o.A)(this,c)[c].mergeCells(e.address),f=(0,o.A)(this,m)[m]([+f+1,+p],{keys:l,columns:a,data:n.filter((e=>e[r]===t))})}}else a.filter((e=>!e.group)).forEach(((e,t)=>{n="function"===typeof n?n():n,n.forEach(((l,n)=>{const a="undefined"!==typeof e.render?e.render(l,n):l[e.key];(0,o.A)(this,c)[c].getCell(+f+n,+p+t).value=(0,o.A)(this,g)[g](a),(0,o.A)(this,c)[c].getCell(+f+n,+p+t).style=s()({},u.eK,i,null===e||void 0===e?void 0:e.style,null===a||void 0===a?void 0:a.style)})),(0,o.A)(this,c)[c].getColumn(+p+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:a,row:i}=(0,o.A)(this,c)[c].getCell(h(e)).fullAddress;("function"===typeof l?l():l).forEach(((e,t)=>{e&&(0,o.A)(this,p)[p]([i+t,a],{r:i+t,c:a,style:s()({},n,e.style),cells:e.cells||e,height:e.height})}))}renderDataRowGroup(e,t){let{columns:l,data:n,header:a,totalRow:i,rowNum:r,headerStyle:u,cellStyle:d,onEndRow:g}=t;const{col:p,row:f}=(0,o.A)(this,c)[c].getCell(h(e)).fullAddress;l="function"===typeof l?l():l,r&&l.unshift({name:"STT",render:(e,t)=>t+1,colStyle:{alignment:{horizontal:"center"}},width:5}),a||(a=[{cells:l.filter((e=>!e.group)).map((e=>({value:e.name,style:s()({},e.cellStyle)}))),style:u}]),this.renderArrayRowGroup(e,{rows:a,style:u});const v=l.filter((e=>e.group)).sort(((e,t)=>+e.group-+t.group)).map((e=>e.key)),C=(0,o.A)(this,m)[m]([+f+a.length,+p],{keys:v,data:n,columns:l,style:d});g&&g(C-1)}}class v 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,a.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 C=v},53546:(e,t,l)=>{l.r(t),l.d(t,{IntegerToRoman:()=>u,default:()=>s});var n=l(76638),a=l(57373),o=l(49211),i=l(56078),r=l(61278);l(6058);async function s(e,t){let{Nam:l,data:s}=e;const u=new o.A,d=u.addWorksheet(`Chi ti\u1ebft v\u1eadt li\u1ec7u c\u1eeda h\xe0ng ${l}`);d.worksheet.getColumn(1).width=20,d.worksheet.getColumn(2).width=20,d.worksheet.getColumn(3).width=20,d.worksheet.getColumn(4).width=20,d.worksheet.getColumn(5).width=20,d.worksheet.getColumn(6).width=20,d.worksheet.getColumn(7).width=20,d.worksheet.getColumn(5).width=25,d.renderArrayRowGroup([1,3],(0,i.ExportQuocHieu)(3)),d.renderArrayRowGroup([5,1],{style:{font:{bold:!0},alignment:{horizontal:"center"}},rows:[[{value:`B\u1ea2NG V\u1eacT LI\u1ec6U C\u1eecA H\xc0NG CHO C\xd4NG TR\xccNH- ${l} `.toUpperCase(),colspan:5}]]}),d.renderArrayRowGroup([7,1],{style:{font:{italic:!0},alignment:{horizontal:"center"}},rows:[[{colspan:7,value:`B\xecnh \u0110\u1ecbnh, ${(0,a.A)(new Date,"'ng\xe0y 'dd' th\xe1ng 'MM' n\u0103m 'yyyy")}`}]]}),d.renderArrayRowGroup([8,1],{style:n.GN,rows:[[{rowspan:1,value:"NG\xc0Y NH\u1eacP"},{rowspan:1,value:"T\xcaN V\u1eacT LI\u1ec6U"},{rowspan:1,value:"\u0110VT"},{rowspan:1,value:"S\u1ed0 L\u01af\u1ee2NG"},{rowspan:1,value:"\u0110\u01a0N GI\xc1"},{rowspan:1,value:"TH\xc0NH TI\u1ec0N"},{rowspan:1,value:"T\u1ea0M \u1ee8NG"}]]});const h=e=>{const t=[];return Object.keys(e).forEach((l=>{if("sum"===l)t.push([{value:""},{value:e[l].TenVatLieu,style:e[l].style&&{font:{bold:"true"}}},{value:""},{value:"",style:{...n.eS}},{value:""},{value:(0,r.ZV)(e[l].ThanhTien),style:{font:{bold:"true"},...n.eS}},{value:""}]);else{let a=e[l].reduce(((e,t)=>e+t.ListChiTietVatLieu.length),0)+e[l].length;e[l].forEach(((e,o)=>(t.push([{value:l,rowspan:0===o?a:1},{value:e.MaDonHang},{value:""},{value:""},{value:""},{value:""},{value:""}]),e.ListChiTietVatLieu.forEach((e=>{t.push([{value:""},{value:e.TenVatLieu,style:e.style&&{font:{bold:"true"}}},{value:e.DVT},{value:(0,r.ZV)(e.SoLuong,8)},{value:(0,r.ZV)(e.DonGia),style:{...n.eS}},{value:(0,r.ZV)(e.ThanhTien),style:e.style?{font:{bold:"true"},...n.eS}:{...n.eS}},{value:""}])})))))}})),t},c=(e,t)=>{if(0===t)return 0;return Array.from(new Array(t).keys()).reduce(((t,l,n)=>t+(e=>{let t=0;return Object.keys(e).forEach((l=>{"sum"===l?t++:(t+=e[l].reduce(((e,t)=>e+t.ListChiTietVatLieu.length),0),t+=e[l].length)})),t+1})(e[n].ChiTietVatLieuTheoNgay)),1)};s.forEach(((e,t)=>{const l=c(s,t);d.renderArrayRowGroup([9+l,1],{style:n.vw,rows:[[{value:"",style:{}},{value:e.Name,colspan:5,style:{font:{bold:!0,size:12}}},{value:""},{value:""},{value:""},{value:""},{value:(0,r.ZV)(e.CongNo),style:{font:{bold:!0,size:12},...n.eS}}],...h(e.ChiTietVatLieuTheoNgay)]})})),u.download(t)}function u(e){if("number"!==typeof e)return"";for(var t=String(+e).split(""),l=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],n="",a=3;a--;)n=(l[+t.pop()+10*a]||"")+n;return Array(+t.join("")+1).join("M")+n}},54487:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(81667),a=l(82210),o=l(43676),i=l(47117),r=l(40731),s=l(27894),u=l(6058);const d={noOptionsMessage:()=>"Kh\xf4ng c\xf3 l\u1ef1a ch\u1ecdn",placeholder:"Nh\u1ea5p \u0111\u1ec3 ch\u1ecdn",loadingMessage:()=>"\u0110ang t\xecm ki\u1ebfm"},h=(0,a.forwardRef)(((e,t)=>{let{onChange:l,loadData:h,id:c,name:g,placeholder:p,getOptionLabel:m,getOptionValue:f,onAdd:v,value:C,...x}=e;const[b,y]=(0,a.useState)(null);p&&(d.placeholder=p);const T=(0,a.useCallback)((e=>new Promise((t=>{setTimeout((()=>{t(h(e))}),1e3)}))),[h]);(0,a.useEffect)((()=>{C&&y(C)}),[C]);(0,a.useCallback)((async e=>{const t=await T(),[l]=t.filter((t=>t[f||"value"]===e));return l||null}),[f,T]);const A=(0,a.useCallback)((e=>{l(e)}),[l]);return(0,u.jsx)(n.A,{children:(0,u.jsxs)(i.A,{className:v&&"d-flex justify-content-between",children:[(0,u.jsx)(r.A,{className:"pr-0",children:(0,u.jsx)(o.Ay,{defaultOptions:!0,value:b,name:g,isClearable:!0,onChange:A,getOptionValue:e=>e,inputId:g,id:c,instanceId:g,loadOptions:T,...d})}),v&&(0,u.jsx)(r.A,{md:"1",className:"pl-0",children:(0,u.jsx)(s.UN,{className:"h-100",onClick:v})})]})})})),c=(0,a.memo)(h)},56078:(e,t,l)=>{function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return{style:{alignment:{horizontal:"center"}},rows:[[{value:"T\u1ec8NH \u1ee6Y B\xccNH \u0110\u1ecaNH",colspan:e}],[{value:"TR\u01af\u1edcNG CH\xcdNH TR\u1eca",colspan:e,style:{font:{bold:!0}}}]]}}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return{style:{alignment:{horizontal:"center"}},rows:[[{value:"C\u1ed8NG H\xd2A X\xc3 H\u1ed8I CH\u1ee6 NGH\u0128A VI\u1ec6T NAM",colspan:e,style:{font:{bold:!0}}}],[{value:"\u0110\u1ed9c l\u1eadp - T\u1ef1 do - H\u1ea1nh ph\xfac",colspan:e,style:{font:{bold:!0}}}],[{value:"-----***-----",colspan:e}]]}}function o(){return{style:{alignment:{horizontal:"center"},font:{bold:!0,underline:"single"}},rows:[[{value:"\u0110\u1ea2NG C\u1ed8NG S\u1ea2N VI\u1ec6T NAM",colspan:arguments.length>0&&void 0!==arguments[0]?arguments[0]:3}]]}}function i(e,t,l){if(!e)throw new Error("T\u1ed5ng s\u1ed1 c\u1ed9t c\u1ea7n merge cell ph\u1ea3i l\u1edbn h\u01a1n 0");return{style:{alignment:{horizontal:"center"}},rows:[[{value:t,colspan:e,style:{font:{bold:!0}}}],[{value:l,colspan:e,style:{font:{italic:!0}}}]]}}l.r(t),l.d(t,{ExportDonVi:()=>n,ExportInfo:()=>i,ExportParty:()=>o,ExportQuocHieu:()=>a})},61316:(e,t,l)=>{l.d(t,{A:()=>v});var n=l(82210),a=l(29083),o=l(98991),i=l(5774),r=l(6058);const s=e=>(0,r.jsx)("div",{className:"spinner-border-sm spinner-border text-danger"}),u={multiValueLabel:e=>({...e,padding:"0px 0px 0px 6px",fontSize:13}),menuPortal:e=>({...e,zIndex:9999}),control:e=>({...e,backgroundColor:"white",minHeight:"38px",fontSize:"0.76563rem",lineHeight:"1.5",cursor:"pointer",borderRadius:"0.2rem"}),menu:e=>({...e,zIndex:2300}),option:e=>({...e,fontSize:"0.76563rem",cursor:"pointer"}),input:e=>({...e,position:"unset"}),placeholder:e=>({...e,marginLeft:5,marginRight:5}),singleValue:(e,t)=>{let{data:l}=t;return{...e,marginTop:1,transform:"inherit",top:"unset"}},container:e=>({...e,width:"100%"}),valueContainer:e=>({...e,padding:"2px 8px"})},d=e=>(0,r.jsx)(s,{...e}),h=e=>(0,r.jsx)(a.F.IndicatorsContainer,{...e,getStyles:()=>({display:"flex",height:"100%"})}),c=e=>{const{innerProps:{ref:t,...l}}=e;return(0,r.jsx)("div",{...l,ref:t,style:{color:"rgb(204, 204, 204)",transition:"color 150ms ease 0s",boxSizing:"border-box"},children:(0,r.jsx)(i.A,{fa:"times",style:{marginTop:2,padding:"5px 5px 5px 5px",verticalAlign:"bottom"}})})},g=e=>{let{innerProps:t}=e;return(0,r.jsx)("span",{...t,style:{alignSelf:"stretch",width:1,backgroundColor:"rgb(204, 204, 204)",marginTop:2,marginBottom:2,marginRight:5,marginLeft:5}})},p=e=>(0,r.jsx)(a.F.DropdownIndicator,{...e,getStyles:()=>({color:"hsl(0,0%,80%)"}),children:(0,r.jsx)(i.A,{fa:"angle-down",style:{marginTop:2,padding:"5px 9px 5px 5px"}})}),m=e=>(0,r.jsx)(a.F.MenuList,{...e,getStyles:()=>({maxHeight:300,zIndex:1021,overflowY:"auto"}),children:e.children});class f extends n.Component{constructor(e){super(e),this.state={valueRequire:null},this.RefReactSelect=n.createRef()}render(){const{placeholder:e,noOptionsMessage:t,loadingMessage:l,required:a,isDisabled:i,menuPlacement:s,...f}=this.props,{valueRequire:v}=this.state;return(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)(o.Ay,{...f,ref:this.RefReactSelect,classNamePrefix:"select",styles:u,placeholder:e,noOptionsMessage:t,loadingMessage:l,isDisabled:i,components:{IndicatorsContainer:h,ClearIndicator:c,IndicatorSeparator:g,DropdownIndicator:p,LoadingIndicator:d,MenuList:m},onChange:e=>{this.props.onChange(e),this.setState({valueRequire:e?e.name:null})},menuPortalTarget:document.body,menuPosition:"absolute",menuPlacement:s||"auto"}),(0,r.jsx)("input",{readOnly:!0,name:"requireInput",type:"text",tabIndex:1,autoComplete:"off",style:{opacity:0,height:0,position:"absolute"},value:v||"",onFocus:()=>{this.RefReactSelect.current&&this.RefReactSelect.current.focus()}})]})}}f.defaultProps={placeholder:"Ch\u1ecdn...",isDisabled:!1,noOptionsMessage:()=>"Kh\xf4ng c\xf3 l\u1ef1a ch\u1ecdn",loadingMessage:()=>"\u0110ang t\u1ea3i"};const v=f},76156:(e,t,l)=>{l.d(t,{A:()=>r});var n=l(82210),a=l(48895),o=l(6058);class i extends n.Component{render(){const{value:e,onChange:t,options:l}=this.props,n=e||"";return(0,o.jsx)(a.A,{value:n,onChange:t,options:l,valueRef:"value",labelRef:"label",placeholder:"Ch\u1ecdn..."})}}i.defaultProps={placeholder:"Ch\u1ecdn..."};const r=i},76638:(e,t,l)=>{l.d(t,{GN:()=>r,YI:()=>s,Zz:()=>h,eK:()=>o,eS:()=>c,fY:()=>u,li:()=>d,vw:()=>i});var n=l(12020),a=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"}},i={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"}}}},r=a()({},{font:{bold:!0,size:12},alignment:{horizontal:"center",wrapText:!0}}),s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",u={font:{bold:!0,size:10}},d={background:"#F2F2F2"},h={alignment:{horizontal:"center",vertical:"middle",wrapText:!0}},c={alignment:{horizontal:"right",vertical:"middle",wrapText:!0}}},79069:(e,t,l)=>{l.r(t),l.d(t,{default:()=>n});const n={}},84278:(e,t,l)=>{l.d(t,{Z:()=>n.A});var n=l(5774)},89920:(e,t,l)=>{l.r(t),l.d(t,{default:()=>j});var n=l(82210),a=l(20136),o=l(59701),i=l(33851),r=l(4191),s=l(40731),u=l(47117),d=l(36599),h=(l(79069),l(20278)),c=l(10592),g=l(27894),p=l(14658),m=l(35065),f=l(53546),v=l(61278),C=l(84278),x=l(61342),b=l.n(x),y=l(79209),T=l(34985),A=l(6058);const j=(0,n.forwardRef)(((e,t)=>{let{NhanVienId:l}=e;const[x,j]=(0,n.useState)({Nam:(new Date).getFullYear()}),[N,w]=(0,n.useState)({OrganId:null,Name:""}),[$,k]=(0,n.useState)(!1),[D,S]=(0,n.useState)([]),[L,V]=(0,n.useState)(null),[I,_]=(0,n.useState)([]),[E,R]=(0,n.useState)(!1),O=(0,n.useRef)([]),H=()=>{window.pageYOffset>50?R(!0):R(!1)};(0,n.useEffect)((()=>{window.addEventListener("scroll",H)}),[]);(0,n.useEffect)((()=>(async()=>{const{value:e}=await p.Ap.getAll("?$filter=Status eq true");_((t=>({...t,DuAn:e})))})()),[]),(0,n.useEffect)((()=>{O.current=D}),[D]);const F=(0,n.useCallback)((()=>{const{Nam:e}=x,{OrganId:t}=N;t?(k(!0),c.zq.getDataBangKeChiTiet({Nam:e,CuaHangId:t}).then((e=>{let{ResultObj:t}=e;for(let n=0;n<t.length;n++){const e=t[n];e.ChiTietVatLieuTheoDon=b().mapValues(b().groupBy(e.ChiTietVatLieuTheoDon,"Ngay"),(e=>e.map((e=>b().omit(e,"Ngay")))));const l={};Object.keys(e.ChiTietVatLieuTheoDon).forEach((t=>l[(0,v.Yq)(t)]=e.ChiTietVatLieuTheoDon[t])),delete e.ChiTietVatLieuTheoDon,e.ChiTietVatLieuTheoNgay=l;let a=0;Object.keys(e.ChiTietVatLieuTheoNgay).forEach((t=>{e.ChiTietVatLieuTheoNgay[t].forEach((e=>{const t=e.ListChiTietVatLieu.reduce(((e,t)=>e+t.ThanhTien),0);a+=t}))})),e.ChiTietVatLieuTheoNgay.sum={TenVatLieu:"T\u1ed5ng c\u1ed9ng",ThanhTien:a,style:!0}}const l=t.map((e=>({...e,name:e.Name})));S(l),k(!1)}))):(0,m.AB)("Vui l\xf2ng ch\u1ecdn c\u1eeda h\xe0ng")}),[x,N]),G=(0,n.useCallback)((async()=>{const{Nam:e}=x,{OrganId:t,Name:l}=N;if(D.length)return(0,f.default)({Nam:e,OrganId:t,data:D,listNhom:I},`Chi ti\u1ebft v\u1eadt li\u1ec7u c\u1eeda h\xe0ng ${l}.xlsx`);(0,m.AB)("L\u1ea5y d\u1eef li\u1ec7u c\xf4ng n\u1ee3 tr\u01b0\u1edbc khi xu\u1ea5t")}),[x,N,D,I]),P=(0,n.useCallback)(((e,t)=>{j((l=>({...l,[e]:t}))),w({OrganId:t.Id,Name:t.OrganName})}),[]),B=(0,n.useMemo)((()=>{const e=L||D;return(0,A.jsx)("div",{className:"CongNoTra",children:(0,A.jsxs)(o.A,{bordered:!0,size:"sm",children:[(0,A.jsx)("thead",{children:(0,A.jsxs)("tr",{children:[(0,A.jsx)("th",{children:"Ng\xe0y nh\u1eadp"}),(0,A.jsx)("th",{children:"T\xean v\u1eadt li\u1ec7u"}),(0,A.jsx)("th",{children:"\u0110VT"}),(0,A.jsx)("th",{children:"S\u1ed1 l\u01b0\u1ee3ng"}),(0,A.jsx)("th",{children:"\u0110\u01a1n gi\xe1"}),(0,A.jsx)("th",{children:"Th\xe0nh ti\u1ec1n"}),(0,A.jsx)("th",{children:"T\u1ea1m \u1ee9ng"})]})}),(0,A.jsx)("tbody",{children:(0,A.jsxs)(h.default,{loading:$,children:[e&&e.map(((e,t)=>{const l=e.ChiTietVatLieuTheoNgay;return(0,A.jsxs)(n.Fragment,{children:[(0,A.jsxs)("tr",{style:{background:"#ffd700"},children:[(0,A.jsx)("td",{className:"font-weight-bold",colSpan:"6",children:e&&e.Name}),(0,A.jsx)("td",{style:{textAlign:"right"},children:(0,v.vv)(e.CongNo)})]}),Object.keys(l).map((e=>{let t="sum"===e?1:l[e].reduce(((e,t)=>e+t.ListChiTietVatLieu.length),1)+l[e].length;return"sum"!==e?(0,A.jsxs)(n.Fragment,{children:[(0,A.jsx)("tr",{children:(0,A.jsx)("td",{rowSpan:t,style:{verticalAlign:"middle"},children:e})}),l[e].map(((e,t)=>(0,A.jsxs)(n.Fragment,{children:[(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{style:{verticalAlign:"middle"},children:e.MaDonHang}),(0,A.jsx)("td",{}),(0,A.jsx)("td",{}),(0,A.jsx)("td",{}),(0,A.jsx)("td",{}),(0,A.jsx)("td",{})]}),e.ListChiTietVatLieu.map((e=>(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{className:e.style?"bg-light":"bg-green-lt",style:e.style&&{fontWeight:"bold"},children:e.TenVatLieu}),(0,A.jsx)("td",{children:e.DVT}),(0,A.jsx)("td",{style:{textAlign:"right"},children:e.SoLuong}),(0,A.jsx)("td",{style:{textAlign:"right"},children:(0,v.vv)(e.DonGia)}),(0,A.jsx)("td",{className:e.style?"bg-light":null,style:{textAlign:"right"},children:(0,v.vv)(e.ThanhTien)}),(0,A.jsx)("td",{})]})))]})))]}):(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{children:" "}),(0,A.jsxs)("td",{children:[" ",l[e].TenVatLieu," "]}),(0,A.jsx)("td",{children:" "}),(0,A.jsx)("td",{style:{textAlign:"right"},children:" "}),(0,A.jsx)("td",{style:{textAlign:"right"},children:" "}),(0,A.jsx)("td",{className:l[e].style?"bg-light":null,style:{textAlign:"right"},children:(0,v.vv)(l[e].ThanhTien)}),(0,A.jsx)("td",{})]})}))]})}))," "]})})]})})}),[D,L,$]);const M=(0,n.useCallback)((e=>{const t=new T.A(O.current,{keys:["name"],includeScore:!0,shouldSort:!0,threshold:.5,ignoreLocation:!0,minMatchCharLength:2,useExtendedSearch:!0}).search(e);V(e?t.map((e=>e.item)):null)}),[]);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(i.A,{children:(0,A.jsxs)(r.A,{className:"mt-1 row",children:[(0,A.jsx)(s.A,{xs:"3",children:(0,A.jsxs)(u.A,{children:[(0,A.jsx)(s.A,{xs:"6",children:(0,A.jsx)(a.A,{data:d.formCondition.Nam,value:x&&x.Nam||null,onChange:P})}),(0,A.jsx)(s.A,{xs:"6",children:(0,A.jsx)(a.A,{data:d.formCondition.OrganId,value:N&&N.OrganId||null,onChange:P})})]})}),(0,A.jsxs)(s.A,{xs:"6",className:"mb-4",children:[(0,A.jsx)(g.QB,{onClick:F,children:"L\u1ea5y d\u1eef li\u1ec7u c\xf4ng n\u1ee3"}),(0,A.jsx)(g.QB,{color:"success",onClick:G,style:{marginLeft:"5px"},children:"Xu\u1ea5t b\xe1o c\xe1o"})]}),(0,A.jsx)(s.A,{xs:"3",children:(0,A.jsx)(y.Z,{onReload:F,onChange:M})}),(0,A.jsx)(s.A,{xs:"12",children:B})]})}),E&&(0,A.jsx)("div",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:(0,A.jsx)("h2",{style:{position:"fixed",right:"50",bottom:"100"},className:"d-1",children:(0,A.jsx)(C.Z,{fa:"fas fa-arrow-circle-up",style:{float:"right"}})})})]})}))}}]); //# sourceMappingURL=8880.94285123.chunk.js.map