????
Current Path : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/ |
Current File : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/5507.37afc378.chunk.js |
"use strict";(self.webpackChunk_qlxd_frontend=self.webpackChunk_qlxd_frontend||[]).push([[2538,5507],{25507:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var i=t(82210),a=t(98991),l=t(3503),o=t(71516),h=t(60803),c=t(34211),s=t(57011),u=t(4911),r=t(4984),d=t(22699),g=t(46881),f=t(14658),y=t(35065),T=t(42538),x=t(6058);const m=i.forwardRef((function(e,n){return(0,x.jsx)(l.A,{direction:"up",ref:n,...e})})),b={TenCuaHang:"",SDT:"",DiaChi:"",ThongTinPhieuIn:{KhoGiay:"",KichThuoc:""},Data:[]};function p(e){const{isOpen:n,isClose:t,DonHangId:l,OrganId:p,IdDuAn:A}=e,[D,K]=(0,i.useState)(b),S=(0,i.useCallback)((e=>{let n=["Status eq true"];n.push(`DonHangId eq ${e}`),f.tZ.getDuAnVatLieusByFilterAndExpand(n,["DMVatLieu($expand=DMDonViTinh)"]).then((e=>K((n=>({...n,Data:e.value}))))).catch((e=>(0,y.a3)("L\u1ea5y d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng")))}),[]);(0,i.useEffect)((()=>{S(l)}),[l,S]),(0,i.useEffect)((()=>{f.yB.getOrganizationById(p).then((e=>K((n=>({...n,TenCuaHang:e.OrganName,SDT:e.Telephone,DiaChi:e.OrganAddress})))))}),[p]);const C=(0,i.useCallback)((()=>{let{ThongTinPhieuIn:e}=D;if(e.KhoGiay&&e.KichThuoc)return(0,T.default)({data:D});(0,y.AB)("Vui l\xf2ng ch\u1ecdn \u0111\u1ea7y \u0111\u1ee7 th\xf4ng tin")}),[D]);return(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)(o.A,{onClose:t,"aria-labelledby":"customized-dialog-title",open:n,TransitionComponent:m,maxWidth:"sm",children:[(0,x.jsx)(h.A,{id:"customized-dialog-title",children:"In phi\u1ebfu"}),(0,x.jsx)(c.A,{dividers:!0,children:(0,x.jsxs)(u.A,{style:{width:"400px"},children:[(0,x.jsxs)(r.A,{children:[(0,x.jsx)(d.A,{for:"KhoGiay",children:"Kh\u1ed5 gi\u1ea5y"}),(0,x.jsx)(a.Ay,{name:"KhoGiay",options:[{value:"landscape",label:"Kh\u1ed5 ngang"},{value:"portrait",label:"Kh\u1ed5 d\u1ecdc"}],menuPosition:"fixed",className:"cus-select",placeholder:"Ch\u1ecdn kh\u1ed5 gi\u1ea5y",onChange:e=>K((n=>({...n,ThongTinPhieuIn:{KichThuoc:n.ThongTinPhieuIn.KichThuoc,KhoGiay:e.value}}))),getOptionValue:e=>e,getOptionLabel:e=>e.label})]}),(0,x.jsxs)(r.A,{children:[(0,x.jsx)(d.A,{for:"KichThuoc",children:"K\xedch th\u01b0\u1edbc"}),(0,x.jsx)(a.Ay,{name:"KichThuong",options:[{value:"A3",label:"A3"},{value:"A4",label:"A4"},{value:"A5",label:"A5"}],menuPosition:"fixed",className:"cus-select",placeholder:"Ch\u1ecdn k\xedch th\u01b0\u1edbc gi\u1ea5y",onChange:e=>K((n=>({...n,ThongTinPhieuIn:{KhoGiay:n.ThongTinPhieuIn.KhoGiay,KichThuoc:e.value}}))),getOptionValue:e=>e,getOptionLabel:e=>e.label})]})]})}),(0,x.jsx)(s.A,{children:(0,x.jsx)(g.A,{onClick:()=>C(),variant:"contained",color:"primary",autoFocus:!0,children:"In phi\u1ebfu"})})]})})}},42538:(e,n,t)=>{t.r(n),t.d(n,{default:()=>c});t(82210);var i=t(87576),a=t.n(i),l=t(31832),o=t.n(l),h=t(61278);function c(e){let{data:n}=e;const{vfs:t}=o().pdfMake;a().vfs=t;const i={pageSize:n.ThongTinPhieuIn.KichThuoc,pageOrientation:n.ThongTinPhieuIn.KhoGiay,content:[{columns:[[{text:`C\u1eecA H\xc0NG: ${n.TenCuaHang||""}`,style:"header"},{text:`\u0110\u1ecba ch\u1ec9: ${n.DiaChi||""}`,style:"header"},{text:`\u0110i\u1ec7n tho\u1ea1i: ${n.SDT||""}`,style:"header"},{text:"H\xd3A \u0110\u01a0N ",style:{fontSize:30,alignment:"center",bold:!0}}]]},"\n",(()=>{let e=[];n.Data.forEach((n=>e.push([{text:`${n.DMVatLieu.Name}`,style:{fontSize:12,alignment:"left",bold:!0}},{text:`${n.DMVatLieu.DMDonViTinh.Name}`,style:{fontSize:12,alignment:"left"}},{text:`${(0,h.ZV)(n.SoLuong)}`,style:{fontSize:12,alignment:"right"}},{text:`${(0,h.ZV)(n.DonGia)}`,style:{fontSize:12,alignment:"right"}}])));return{columns:[[{text:"T\xean kh\xe1ch h\xe0ng: ",style:{fontSize:15,alignment:"left",bold:!0,lineHeight:2}},{text:"Danh s\xe1ch v\u1eadt li\u1ec7u: ",style:{fontSize:15,alignment:"left",bold:!0,lineHeight:2}},{table:{widths:["*","*","*","*"],body:[[{text:"V\u1eadt li\u1ec7u",style:{bold:!0,fontSize:14,color:"black"},alignment:"center"},{text:"\u0110VT",style:{bold:!0,fontSize:13,color:"black"},alignment:"center"},{text:"S\u1ed1 l\u01b0\u1ee3ng",style:{bold:!0,fontSize:13,color:"black"},alignment:"center"},{text:"\u0110\u01a1n gi\xe1",style:{bold:!0,fontSize:13,color:"black"},alignment:"center"}],...e]}}]]}})(),"\n","\n","\n",{columns:[{table:{widths:["*","*","*"],body:[["","","Ng\xe0y ..... Th\xe1ng .... N\u0103m 20... "],["Kh\xe1ch h\xe0ng","Ng\u01b0\u1eddi nh\u1eadn ti\u1ec1n","Ng\u01b0\u1eddi vi\u1ebft h\xf3a \u0111\u01a1n"]]},layout:"noBorders"}],alignment:"center"}],styles:{header:{fontSize:13,bold:!0,alignment:"left",lineHeight:2}}};a().createPdf(i).print()}}}]); //# sourceMappingURL=5507.37afc378.chunk.js.map