????
Current Path : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/ |
Current File : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/9646.7db13d5b.chunk.js |
(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[9646],{85148:(e,n,a)=>{"use strict";a.d(n,{A:()=>W});var t=a(9950),i=a(50651),h=a(76991),s=a(52308),o=a(8743),l=a(36640),d=a(51445),r=a(52088),c=a(82376),u=a(4370),g=a(48738),x=a.n(g),T=a(67116),p=a(70349),m=a(23931),j=a(18849),D=a(73613),A=a(85560),y=a(36841),v=a(44414);const C=(e,n)=>[{title:"Id",field:"Id",type:"numeric",hidden:!0,editable:"never"},{title:"S\u1ea3n ph\u1ea9m, d\u1ecbch v\u1ee5",field:"DM_SanPhamDichVu.TenSanPham",type:"string",hidden:!1,editable:"never",searchable:!0},{field:"SanPhamDichVu_Id",hidden:!0,editable:"never"},{title:"S\u1ed1 l\u01b0\u1ee3ng",field:"SoLuong",type:"numeric",hidden:!1,editable:"never",render:e=>(0,y.vv)(e.SoLuong),cellStyle:{textAlign:"right"}},{title:"S\u1ed1 l\u01b0\u1ee3ng \u0111i\u1ec1u ch\u1ec9nh",field:"SoLuongConLai",type:"numeric",hidden:!n,editable:"never",render:e=>(0,y.vv)(e.SoLuongConLai),cellStyle:{textAlign:"right"}},{title:"\u0110VT",field:"DM_DonViTinh.Ten",type:"string",hidden:!1,editable:"never",cellStyle:{textAlign:"left"}},{title:"Chi\u1ebft kh\u1ea5u",field:"GiamGia",type:"numeric",hidden:!e,editable:"never",render:e=>(0,v.jsxs)("span",{children:[(0,y.vv)(e.GiamGia||e.PTGiamGia)," ",e.GiamGia?"VN\u0110":"%"]}),cellStyle:{textAlign:"right"}},{title:"Gi\u1ea3m gi\xe1",field:"GiamGia",type:"numeric",hidden:!0,editable:"never"},{title:"Ph\u1ea7n tr\u0103m gi\u1ea3m gi\xe1",field:"PTGiamGia",type:"numeric",hidden:!0,editable:"never"},{title:"S\u1ed1 l\u01b0\u1ee3ng c\xf2n l\u1ea1i",field:"SoLuongConLai",type:"numeric",hidden:!0,editable:"never"},{title:"\u0110\u01a1n gi\xe1",field:"DonGia",type:"numeric",hidden:!1,editable:"never",render:e=>(0,y.vv)(e.DonGia)},{title:"T\u1ed5ng ti\u1ec1n",field:"DonGia",type:"numeric",hidden:!1,editable:"never",render:e=>(0,v.jsx)("span",{children:(0,y.vv)(e.DonGia*e.SoLuong)})},{title:"Th\xe0nh ti\u1ec1n",field:"ThanhTien",type:"numeric",hidden:!1,editable:"never",render:e=>(0,y.vv)(e.ThanhTien)}];var I=a(44709),H=a(26124),P=a(55002),S=a(3908),f=a(65597);class N extends t.Component{constructor(e){super(e),this.renderButton=()=>{const{textLyDo:e}=this.state,{closePopupHuyDonHang:n}=this.props;return(0,v.jsxs)("div",{style:{float:"right"},children:[(0,v.jsx)(P.f8,{onClick:n,children:"H\u1ee7y"}),(0,v.jsx)(P.QB,{onClick:()=>this.saveHuyDonHang(e),children:"Ch\u1ea5p nh\u1eadn"})]})},this.saveHuyDonHang=e=>{const{IdDonHang:n,updateCountRadioList:a,reloadTableIndex:t,closeDetail:i,closePopupHuyDonHang:h,statusSoQuy:s,data:o}=this.props;e?(0,u.Pq)("PhieuThu_DHs?$filter=DonHang_Id eq ".concat(n)).then((s=>{if(h(),0!==s.value.length){let h=0;s.value.forEach((e=>h+=parseFloat(e.SoTien))),(0,T.K5)("Thanh to\xe1n l\u1ea1i s\u1ed1 ti\u1ec1n kh\xe1ch \u0111\xe3 thanh to\xe1n cho \u0111\u01a1n h\xe0ng ".concat(o.MaDonHang," v\u1edbi s\u1ed1 ti\u1ec1n ").concat((0,y.vv)(h)),"TH\xd4NG B\xc1O").then((h=>{h&&(0,u.Pq)("DonHang/HuyDonHang?DonHangId=".concat(n,"&LyDo=").concat(e),"DELETE","",!1).then((e=>{(0,u.Pq)("PhieuThu/XoaPhieuThu?donHang_Id=".concat(n),"POST",null,!1).then((()=>{(0,T.nw)(e),a(),t(),i()}))})).catch((e=>(0,T.a3)(e.Message)))}))}else(0,u.Pq)("DonHang/HuyDonHang?DonHangId=".concat(n,"&LyDo=").concat(e),"DELETE","",!1).then((e=>{(0,T.nw)(e),a(),t(),i()})).catch((e=>(0,T.a3)(e.Message)))})):(0,T.AB)("Vui l\xf2ng nh\u1eadp l\xfd do h\u1ee7y \u0111\u01a1n h\xe0ng","TH\xd4NG B\xc1O")},this.onChangeLyDo=e=>{this.setState({textLyDo:e})},this.state={textLyDo:""}}render(){const{openPopupHuyDonHang:e,closePopupHuyDonHang:n}=this.props;return(0,v.jsxs)(f.A,{open:e,handleClose:n,title:"Nh\u1eadp l\xfd do h\u1ee7y \u0111\u01a1n h\xe0ng",maxWidth:"xs",children:[(0,v.jsxs)(p.A,{children:[(0,v.jsx)(S.m,{xs:"4",children:"L\xfd do"}),(0,v.jsx)(m.A,{xs:"8",children:(0,v.jsx)("textarea",{type:"text",autoFocus:!0,className:"form-control",onBlur:e=>this.onChangeLyDo(e.target.value)})})]}),this.renderButton()]})}}var b=a(45418),M=a.n(b),_=a(55627),L=a(21205),K=a(19247),w=a(76152),k=a(51963),G=a(53744);class B extends t.Component{render(){const{dataChiTietDonHang:e,dataDonHang:n,ThanhTien:a,PTGiamGia:t}=this.props;let i=0,h=0;return e.forEach((e=>(i+=+e.SoLuong,h+=+e.ThanhTien,h))),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(p.A,{className:"profile-don-vi",children:(0,v.jsxs)(m.A,{style:{textAlign:"center"},children:[(0,v.jsx)("img",{src:"/assets/Logo/logoQLBH.png",alt:""}),(0,v.jsx)("h5",{style:{marginBottom:5},children:G.lg.TenDonVi}),(0,v.jsxs)("p",{style:{marginBottom:5,fontWeight:600},children:["S\u0110T: ",G.lg.DienThoai]}),(0,v.jsxs)("p",{style:{marginBottom:0,fontWeight:600},children:["\u0110\u1ecba ch\u1ec9: ",G.lg.DiaChi]})]})}),(0,v.jsx)(p.A,{style:{marginBottom:10},children:(0,v.jsxs)(m.A,{xs:"12",md:"12",children:[(0,v.jsx)("h3",{style:{textAlign:"center"},children:"H\xd3A \u0110\u01a0N B\xc1N H\xc0NG"}),(0,v.jsxs)("h6",{style:{textAlign:"center"},children:["S\u1ed1 H\u0110: ",n.MaDonHang]}),(0,v.jsxs)("h6",{style:{textAlign:"center"},children:["Th\u1eddi gian: ",(0,y.Rt)(n.NgayTao)]})]})}),(0,v.jsx)(p.A,{style:{marginBottom:5},children:(0,v.jsxs)(m.A,{xs:"12",md:"12",children:[(0,v.jsxs)(p.A,{style:{marginBottom:5},children:[(0,v.jsx)(m.A,{xs:"6",md:"5",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"\u0110i\u1ec3m kinh doanh:"})}),(0,v.jsx)(m.A,{xs:"6",md:"7",children:n.DM_DiemKinhDoanh.Ten})]}),(0,v.jsxs)(p.A,{style:{marginBottom:5},children:[(0,v.jsx)(m.A,{xs:"6",md:"5",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Thu ng\xe2n:"})}),(0,v.jsx)(m.A,{xs:"6",md:"7",children:n.NguoiTao})]})]})}),(0,v.jsxs)(L.A,{responsive:!0,size:"sm",className:"table-hoa-don",children:[(0,v.jsx)("thead",{children:(0,v.jsxs)("tr",{children:[(0,v.jsx)("th",{className:"text-left ten-sp",children:"T\xean s\u1ea3n ph\u1ea9m"}),(0,v.jsx)("th",{className:"text-left",children:"\u0110\u01a1n gi\xe1"}),(0,v.jsx)("th",{className:"text-right",children:"SL"}),(0,v.jsx)("th",{className:"text-right",children:"Th\xe0nh ti\u1ec1n"})]})}),(0,v.jsx)("tbody",{children:e&&e.map(((e,n)=>(0,v.jsxs)("tr",{children:[(0,v.jsx)("td",{style:{textAlign:"left"},children:(0,v.jsx)("span",{children:e.TenSanPham})}),(0,v.jsx)("td",{style:{textAlign:"left"},children:(0,v.jsx)("span",{children:(0,y.vv)(e.DonGia)})}),(0,v.jsx)("td",{style:{textAlign:"right",verticalAlign:"bottom",paddingBottom:5},children:(0,y.vv)(e.SoLuong)}),(0,v.jsx)("td",{style:{textAlign:"right",verticalAlign:"bottom",paddingBottom:5},children:(0,y.vv)(e.ThanhTien)})]},n)))})]}),e&&0!==e.length&&(0,v.jsxs)(p.A,{style:{marginTop:15,marginBottom:5},children:[(0,v.jsx)(m.A,{xs:"4",md:"4"}),(0,v.jsx)(m.A,{xs:"8",md:"8",children:(0,v.jsxs)(K.A,{children:[(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{xs:"8",md:"8",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"T\u1ed5ng s\u1ed1 l\u01b0\u1ee3ng:"})}),(0,v.jsx)(m.A,{xs:"4",md:"4",style:{textAlign:"right"},children:(0,y.vv)(i)})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{xs:"8",md:"8",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"T\u1ed5ng ti\u1ec1n h\xe0ng:"})}),(0,v.jsx)(m.A,{xs:"4",md:"4",style:{textAlign:"right"},children:(0,y.vv)(h)})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{xs:"8",md:"8",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Gi\u1ea3m gi\xe1 (%):"})}),(0,v.jsxs)(m.A,{xs:"4",md:"4",style:{textAlign:"right"},children:[(0,y.vv)(t)," "]})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{xs:"8",md:"8",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"T\u1ed5ng thanh to\xe1n:"})}),(0,v.jsx)(m.A,{xs:"4",md:"4",style:{textAlign:"right"},children:(0,y.vv)(a)})]})]})})]}),(0,v.jsx)(p.A,{style:{marginBottom:5},children:(0,v.jsx)(m.A,{children:(0,v.jsx)(w.A,{row:!0,children:(0,v.jsx)(m.A,{xs:"12",md:"12",style:{textAlign:"center"},children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:(0,v.jsxs)("i",{children:["(",(0,v.jsxs)("span",{className:"bang-chu",children:[(0,k.q)(+a).split(" ")[0]," "]}),(0,k.q)(+a).split(" ").splice(1,(0,k.q)(+a).split(" ").length).join(" ")," \u0111\u1ed3ng)"]})})})})})}),(0,v.jsx)(p.A,{children:(0,v.jsx)(m.A,{children:(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{xs:"6",md:"6",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"H\xecnh th\u1ee9c thanh to\xe1n:"})}),(0,v.jsxs)(m.A,{xs:"6",md:"6",style:{textAlign:"right"},children:[n.DM_HinhThucThanhToan.Ten,n.Phieu_Id?" (S\u1ed1 phi\u1ebfu: ".concat(n.Phieu_Id,") "):""]})]})})}),(0,v.jsx)(p.A,{style:{marginBottom:5},children:(0,v.jsx)(m.A,{children:(0,v.jsx)("h5",{style:{textAlign:"center"},children:(0,v.jsx)("i",{children:"C\u1ea3m \u01a1n v\xe0 h\u1eb9n g\u1eb7p l\u1ea1i!"})})})})]})}}class V extends t.Component{render(){const{openInPhieuDonHang:e,closeInPhieuDonHang:n,dataChiTietInPhieu:a,data:i,dataDonHang:h}=this.props;return(0,v.jsx)(t.Fragment,{children:(0,v.jsx)(c.A,{open:e,title:"IN PHI\xcaU B\xc1N H\xc0NG",onClose:n,renderButton:(0,v.jsx)(M(),{trigger:()=>(0,v.jsx)(j.A,{style:{height:"27px",padding:"0 10px"},color:"primary",children:"In phi\u1ebfu"}),content:()=>this.componentRef}),children:(0,v.jsx)("div",{ref:e=>this.componentRef=e,className:"inPhieuHD page-phieu",children:(0,v.jsx)(B,{dataChiTietDonHang:a,dataDonHang:i,ThanhTien:null===h||void 0===h?void 0:h.ThanhTien,PTGiamGia:null===h||void 0===h?void 0:h.PTGiamGia})})})})}}var q=a(78873),R=a(21812);class F extends t.Component{constructor(e){super(e),this.renderTrangThai=e=>{let n="",a="";switch(e){case H.c.DM:n="\u0110\u01a1n m\u1edbi",a="primary";break;case H.c.HT:n="Ho\xe0n th\xe0nh",a="success";break;case H.c.DH:n="\u0110\xe3 h\u1ee7y",a="danger"}return(0,v.jsx)(q.A,{color:a,children:n})},this.openDetailTraDonHang=(e,n)=>{this.setState({openDetailTraHang:!0,IdDonTraHang:e,MaTraHang:n})},this.state={}}render(){var e;const{data:n,dataDonHang:a,reloadTableIndex:t,className:i}=this.props,{openDetailTraHang:h,MaTraHang:s,IdDonTraHang:o}=this.state;return(0,v.jsxs)(p.A,{children:[(0,v.jsx)(m.A,{md:"8",children:(0,v.jsxs)(K.A,{children:[(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"3",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"M\xe3 \u0111\u01a1n h\xe0ng:"})}),(0,v.jsx)(m.A,{md:"9",children:n.MaDonHang})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"3",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Th\u1eddi gian:"})}),(0,v.jsx)(m.A,{md:"9",children:(0,y.Rt)(n.NgayTao)})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"3",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"\u0110i\u1ec3m kinh doanh:"})}),(0,v.jsx)(m.A,{md:"9",children:n.DM_DiemKinhDoanh.Ten})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"3",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Ng\u01b0\u1eddi t\u1ea1o:"})}),(0,v.jsx)(m.A,{md:"9",children:n.SYS_TaiKhoan.TenHienThi})]})]})}),(0,v.jsx)(m.A,{md:"4",children:(0,v.jsxs)(K.A,{children:[(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"5",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Kh\xe1ch h\xe0ng:"})}),(0,v.jsx)(m.A,{md:"7",children:null===a||void 0===a||null===(e=a.DM_LienHe)||void 0===e?void 0:e.Ten})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"5",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"H\xecnh th\u1ee9c thanh to\xe1n:"})}),(0,v.jsxs)(m.A,{md:"7",children:[n.DM_HinhThucThanhToan.Ten,n.Phieu_Id?" (S\u1ed1 phi\u1ebfu: ".concat(n.Phieu_Id,") "):""]})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"5",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Tr\u1ea1ng th\xe1i:"})}),(0,v.jsx)(m.A,{md:"7",children:this.renderTrangThai(n.TrangThai)})]}),n.LyDoHuy&&(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"5",children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"L\xfd do:"})}),(0,v.jsx)(m.A,{md:"7",children:n.LyDoHuy})]}),(null===a||void 0===a?void 0:a.DaTraHang)&&(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(w.A,{row:!0,children:(0,v.jsx)(m.A,{children:(0,v.jsx)(_.A,{children:(0,v.jsxs)("div",{className:"alert alert-warning",children:[(0,v.jsx)("b",{children:"\u0110\xe3 ph\xe1t sinh nghi\u1ec7p v\u1ee5 tr\u1ea3 h\xe0ng"})," ",(0,v.jsx)("br",{}),(0,v.jsxs)("i",{children:["Ch\u1ee9ng t\u1eeb tr\u1ea3 h\xe0ng",null===a||void 0===a?void 0:a.Sale_DonTraHang.map(((e,n)=>!1===e.IsDeleted&&(0,v.jsxs)("span",{style:{cursor:"pointer",color:"blue"},className:"font-weight-bold",onClick:()=>this.openDetailTraDonHang(e.Id,e.MaTraHang),children:[" ",(0,v.jsx)("u",{children:e.MaTraHang})," "]},n)))]})]})})})})})]})}),h&&(0,v.jsx)(R.A,{className:i,openDetailTraHang:h,closeDetailTraHang:()=>this.setState({openDetailTraHang:!1}),getDataDonHang:this.props.getDataDonHang,IdDonTraHang:o,MaTraHang:s,statusTraHang:!0,reloadTableIndexDonHang:t})]})}}class E extends t.Component{constructor(e){super(e),this.state={}}componentDidMount(){(0,y.EP)()}render(){const{dataChiTietInPhieu:e,dataDonHang:n}=this.props;return(0,v.jsx)(t.Fragment,{children:e&&0!==e.length&&(0,v.jsxs)(p.A,{style:{marginTop:"20px",marginBottom:"-30px"},children:[(0,v.jsx)(m.A,{md:"8"}),(0,v.jsx)(m.A,{md:"4",children:(0,v.jsxs)(K.A,{children:[(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"7",style:{textAlign:"right"},children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"T\u1ed5ng ti\u1ec1n h\xe0ng:"})}),(0,v.jsx)(m.A,{md:"5",style:{textAlign:"right"},children:(0,y.vv)(null===n||void 0===n?void 0:n.TienHang)})]}),(0,y.EP)()?(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"7",style:{textAlign:"right"},children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Ti\u1ec1n h\xe0ng chi\u1ebft kh\u1ea5u:"})}),(0,v.jsx)(m.A,{md:"5",style:{textAlign:"right"},children:(0,y.vv)(null===n||void 0===n?void 0:n.GiamGia)})]}):(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"7",style:{textAlign:"right"},children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Gi\u1ea3m gi\xe1 h\xf3a \u0111\u01a1n:"})}),(0,v.jsxs)(m.A,{md:"5",style:{textAlign:"right"},children:[(0,y.vv)(null===n||void 0===n?void 0:n.PTGiamGia)," ","%"]})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"7",style:{textAlign:"right"},children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Kh\xe1ch c\u1ea7n tr\u1ea3:"})}),(0,v.jsx)(m.A,{md:"5",style:{textAlign:"right"},children:(0,y.vv)(null===n||void 0===n?void 0:n.ThanhTien)})]}),(0,v.jsxs)(w.A,{row:!0,children:[(0,v.jsx)(m.A,{md:"7",style:{textAlign:"right"},children:(0,v.jsx)(_.A,{className:"font-weight-bold",children:"Kh\xe1ch h\xe0ng \u0111\xe3 tr\u1ea3:"})}),(0,v.jsx)(m.A,{md:"5",style:{textAlign:"right"},children:(0,y.EP)()?(0,y.vv)(null===n||void 0===n?void 0:n.TienKhachTra):(0,y.vv)(null===n||void 0===n?void 0:n.ThanhTien)})]})]})})]})})}}var O=a(38512),Q=a(34731),z=a(53031);const J=t.createRef(),$=()=>J.current&&J.current.onQueryChange();class Y extends t.Component{constructor(e){super(e),this.renderButtonByTrangThai=(e,n,a)=>(0,v.jsx)(p.A,{children:(0,v.jsxs)(m.A,{style:{marginTop:"30px",marginBottom:"-25px"},children:[e!==H.c.HT&&(0,y.EP)()?null:(0,v.jsxs)(j.A,{className:"cus-btn",color:"primary",onClick:this.inPhieuDonHang,disabled:n.IsDeleted,children:[(0,v.jsx)(D.A,{fa:"print"})," ","In phi\u1ebfu"]}),e===H.c.DM?null:(0,v.jsxs)(j.A,{className:"cus-btn",color:"success",onClick:this.openTraHang,disabled:n.IsDeleted||(null===a||void 0===a?void 0:a.DaTraHang),children:[(0,v.jsx)(D.A,{fa:"reply-all"})," ","Tr\u1ea3 h\xe0ng"]}),(0,v.jsxs)(j.A,{className:"cus-btn",color:"danger",onClick:this.huyDonHang,disabled:n.IsDeleted||(null===a||void 0===a?void 0:a.DaTraHang),children:[(0,v.jsx)(D.A,{fa:"times"})," ","H\u1ee7y \u0111\u01a1n h\xe0ng"]})]})}),this.inPhieuDonHang=()=>{this.setState({openInPhieuDonHang:!0})},this.huyDonHang=()=>{this.setState({openPopupHuyDonHang:!0})},this.openTraHang=()=>{const{dataChiTietDonHang:e}=this.props;0===e.length?(0,T.AB)("H\xe0ng h\xf3a trong h\xf3a \u0111\u01a1n kh\xf4ng cho ph\xe9p tr\u1ea3","TH\xd4NG B\xc1O"):this.setState({openTraHang:!0})},this.closeTraHang=(e,n)=>{const{getDataChiTietInPhieu:a,getDataDonHang:t,getDataChiTietDonHang:i}=this.props;this.setState({openTraHang:!1},(()=>{n&&(a(),t(),i())}))},this.state={openPopupHuyDonHang:!1,openInPhieuDonHang:!1,openTraHang:!1,openDetailTraHang:!1,IdDonTraHang:null,MaTraHang:null}}componentDidMount(){(0,y.EP)()}render(){const{data:e,IdDonHang:n,dataDonHang:a,dataChiTietInPhieu:i,ThanhTien:h,TongSoLuong:s,isDetailTheKho:o,status:l,updateCountRadioList:d,closeDetail:r,reloadTableIndex:c,className:u,TongSoLuongKhuyenMai:g,statusSoQuy:x}=this.props,{openPopupHuyDonHang:T,openInPhieuDonHang:p,openTraHang:m}=this.state,j=C((0,y.EP)(),e.DaTraHang);return(0,v.jsxs)(t.Fragment,{children:[(0,v.jsx)(F,{data:e,dataDonHang:a,className:u,reloadTableIndex:c}),(0,v.jsx)(A.A,{unRefresDatatable:!0,tableRef:J,url:"ChiTietDonHangs",columns:j,where:"DonHang_Id eq ".concat(n," and KhuyenMai_Id eq null"),selectType:"withColumns",pageSize:4,search:!1}),(0,v.jsx)(O.A,{Id:n,status:"DonHang",statusDaTraHang:e.DaTraHang}),(0,v.jsx)(E,{TongSoLuongKhuyenMai:g,dataDonHang:a,dataChiTietInPhieu:i,ThanhTien:h,TongSoLuong:s,getDataDonHang:this.props.getDataDonHang}),!o&&this.renderButtonByTrangThai(l,e,a),T&&(0,v.jsx)(N,{data:e,statusSoQuy:x,IdDonHang:n,openPopupHuyDonHang:T,closePopupHuyDonHang:()=>this.setState({openPopupHuyDonHang:!1}),updateCountRadioList:d,closeDetail:r,reloadTableIndex:c}),(0,y.EP)()?p&&(0,v.jsx)(Q.A,{open:p,title:e.MaPhieu,onClose:()=>this.setState({openInPhieuDonHang:!1}),maBaoCao:z.MaBaoCaoPhieuIn.HoaDonBanHan,phieuId:n}):p&&(0,v.jsx)(V,{openInPhieuDonHang:p,closeInPhieuDonHang:()=>this.setState({openInPhieuDonHang:!1}),dataChiTietInPhieu:i,data:e,dataDonHang:a}),m&&(0,v.jsx)(I.A,{statusSoQuy:x,dataDonHang:e,openTraDonHang:m,closeTraDonHang:this.closeTraHang,reloadTable:$,reloadTableIndex:c})]})}}class W extends t.Component{constructor(e){super(e),this.getDataChiTietInPhieu=()=>{const{IdDonHang:e}=this.props;(0,u.ID)("ChiTietDonHangs?$filter=DonHang_Id eq ".concat(e,"&$expand=DM_SanPhamDichVu"),"GET",null).then((e=>this.setState({dataChiTietInPhieu:e.value.map((e=>({...e,TenSanPham:e.DM_SanPhamDichVu.TenSanPham,SanPhamDichVuId:e.SanPhamDichVu_Id}))),loading:!1}))).catch((e=>(0,T.a3)(e)))},this.getDataChiTietDonHang=()=>{const{IdDonHang:e}=this.props;(0,u.ID)("ChiTietDonHangs?$filter=DonHang_Id eq ".concat(e," and DM_SanPhamDichVu/TrangThaiTonKho eq true&$expand=DM_SanPhamDichVu"),"GET",null).then((e=>{let n=[];e.value.forEach((e=>{n.push({TenSanPham:e.DM_SanPhamDichVu.TenSanPham,Id:e.Id,SanPhamDichVuId:e.SanPhamDichVu_Id,SoLuong:e.SoLuong,DonGia:e.DonGia,ThanhTien:e.ThanhTien,SoLuongConLai:e.SoLuongConLai})})),this.setState({dataChiTietDonHang:n,loading:!1})})).catch((e=>(0,T.a3)(e)))},this.getDataDonHang=()=>{const{IdDonHang:e}=this.props;(0,u.Pq)("DonHangs(".concat(e,")?$expand=Sale_DonTraHang,DM_LienHe, DM_DiemKinhDoanh, DM_HinhThucThanhToan, SYS_TaiKhoan"),"GET",null).then((e=>this.setState({dataDonHang:e,loading:!1}))).catch((e=>(0,T.a3)(e)))},this.toggle=e=>{const{activeTab:n}=this.state;n!==e&&this.setState({activeTab:e})},this.state={dataChiTietDonHang:[],activeTab:"1",dataDonHang:null,dataChiTietInPhieu:[]}}componentDidMount(){this.getDataChiTietDonHang(),this.getDataDonHang(),this.getDataChiTietInPhieu()}render(){const{openDetail:e,closeDetail:n,IdDonHang:a,reloadTableIndex:t,isDetailTheKho:u,className:g,updateCountRadioList:T,statusSoQuy:p}=this.props,{dataChiTietDonHang:m,activeTab:j,dataDonHang:D,dataChiTietInPhieu:A}=this.state;let y=0,C=0,I=0;A.map((e=>{var n;return null!==e&&void 0!==e&&null!==(n=e.Sale_ChiTietKhuyenMai)&&void 0!==n&&n.KhuyenMai_Id?I+=+e.SoLuong:y+=+e.SoLuong,C+=+e.ThanhTien,C}));return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(c.A,{className:g,open:e,title:"Chi ti\u1ebft \u0111\u01a1n h\xe0ng ".concat(null===D||void 0===D?void 0:D.MaDonHang),onClose:n,children:(0,v.jsx)("div",{className:"detail-don-hang",children:(0,v.jsx)(i.A,{children:(0,v.jsxs)(h.A,{children:[(0,v.jsx)(s.A,{tabs:!0,children:[{name:"Th\xf4ng tin",id:"1"}].map(((e,n)=>(0,v.jsx)(o.A,{children:(0,v.jsx)(l.A,{className:x()({activeTabs:j===e.id}),onClick:()=>{this.toggle(e.id)},children:(0,v.jsx)("b",{children:e.name})})},n)))}),(0,v.jsx)(d.A,{activeTab:j,className:u&&"detail-the-kho",children:(0,v.jsx)(r.A,{tabId:"1",children:D&&(0,v.jsx)(Y,{statusSoQuy:p,data:D,IdDonHang:a,dataDonHang:D,dataChiTietInPhieu:A,ThanhTien:C,TongSoLuong:y,TongSoLuongKhuyenMai:I,isDetailTheKho:u,dataChiTietDonHang:m,status:D.TrangThai,getDataDonHang:this.getDataDonHang,getDataChiTietDonHang:this.getDataChiTietDonHang,getDataChiTietInPhieu:this.getDataChiTietInPhieu,updateCountRadioList:T,closeDetail:n,reloadTableIndex:t,className:g})})})]})})})})})}}},53031:(e,n,a)=>{"use strict";a.r(n),a.d(n,{MaBaoCaoPhieuIn:()=>G,default:()=>B});var t=a(9950),i=a(18849),h=a(73613),s=a(58195),o=a(14113),l=a(99308),d=a(70349),r=a(23931),c=a(85907),u=a(36841),g=a(67116),x=a(53832),T=a(4370),p=a(34731),m={MaPhieu:{field_name:"MaPhieu",title:"M\xe3 phi\u1ebfu:",type:"textbox"},NgayTao:{field_name:"NgayTao",title:"Th\u1eddi gian:",type:"datetime",icon:!0,defaultValue:new Date},SoTien:{field_name:"SoTien",title:"Gi\xe1 tr\u1ecb:",type:"currency",required:!0},KhoanThuId:{field_name:"KhoanThuId",title:"Lo\u1ea1i thu:",type:"data-select",required:!0,dataSelect:{url:"DM_KhoanThu",where:"Hidden ne true",column:["Id","Ten"],value_field:"Id",text_field:"Ten"}},NguoiNopId:{field_name:"NguoiNopId",title:"Ng\u01b0\u1eddi n\u1ed9p:",type:"data-select",required:!0,dataSelect:{url:"DM_NhanVien",column:["Id","TenNhanVien"],value_field:"Id",text_field:"TenNhanVien"}},GhiChu:{field_name:"GhiChu",title:"Ghi ch\xfa:",type:"textarea",rows:"3"},HinhThucThanhToan_Id:{field_name:"HinhThucThanhToan_Id",title:"H\xecnh th\u1ee9c thanh to\xe1n:",type:"data-select",required:!0,dataSelect:{url:"DM_HinhThucThanhToan",column:["Id","Ten"],value_field:"Id",text_field:"Ten",placeholder:"Ch\u1ecdn h\xecnh th\u1ee9c thanh to\xe1n"}}},j=a(44414);class D extends t.Component{constructor(e){super(e),this.handleValidate=()=>{const e=Object.values(m).filter((e=>e.required));let{data:n}=this.state;for(let a=0;a<e.length;a++){const t=e[a];let i=n[t.field_name];if(null===i||""===i||void 0===i||0===i.length)return(0,g.AB)('Vui l\xf2ng nh\u1eadp "'+t.title+'"'),!1}return!0},this.setStateData=(e,n)=>{var{data:a}=this.state;a[e]=n,this.setState({data:a})},this.handleChange=(e,n)=>{this.setStateData(e,n)},this.state={data:{HinhThucThanhToan_Id:1},phieuThuVuaTao:null,openDialogInPhieu:!1,link_api:"",titlePhieuIn:null,dataKhoanThu:[],phieuId:null},this.save=this.save.bind(this),this.saveAndPrint=this.saveAndPrint.bind(this)}componentDidMount(){this.getDataKhoanThu()}getDataKhoanThu(){(0,T.Pq)("DM_KhoanThu","GET",null).then((e=>this.setState({dataKhoanThu:e.value}))).catch((e=>(0,g.a3)("Kh\xf4ng th\u1ec3 t\u1ea3i d\u1eef li\u1ec7u kho\u1ea3n thu","Th\xf4ng b\xe1o")))}saveAndPrint(){if(this.handleValidate()&&this.handleValidateSoTien()){let e=this.state.data;e.NgayTao=e.NgayTao||(0,u.FJ)(),(0,T.Pq)("PhieuThu/TaoPhieuThu","POST",JSON.stringify(e),!1).then((e=>{this.reset(),this.downloadPDF(e),(0,g.nw)("T\u1ea1o phi\u1ebfu thu th\xe0nh c\xf4ng","Th\xf4ng b\xe1o"),this.props.onClose(),this.props.reloadTable()})).catch((e=>(0,g.a3)("\u0110\xe3 x\u1ea3y ra l\u1ed7i!")))}}downloadPDF(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e&&this.setState({link_api:"/Print/InPhieuThu?phieuThuId=".concat(e.Id),titlePhieuIn:"".concat(e.MaPhieu),phieuId:e.Id},(()=>this.setState({openDialogInPhieu:!0})))}save(){if(this.handleValidate()&&this.handleValidateSoTien()){let e=this.state.data;e.NgayTao=e.NgayTao||(0,u.FJ)(),(0,T.Pq)("PhieuThu/TaoPhieuThu","POST",JSON.stringify(e),!1).then((e=>{this.reset(),this.props.onClose(),this.props.reloadTable(),(0,g.nw)("L\u1eadp phi\u1ebfu thu th\xe0nh c\xf4ng!")})).catch((()=>(0,g.a3)("\u0110\xe3 x\u1ea3y ra l\u1ed7i!")))}}reset(){this.setState({data:{KhoanThuId:"",SoTien:"",NguoiNopId:"",GhiChu:"",NgayTao:""}})}handleValidateSoTien(){let{data:e}=this.state;return!((null===e||void 0===e?void 0:e.SoTien)<=0)||((0,g.AB)("Vui l\xf2ng nh\u1eadp s\u1ed1 ti\u1ec1n l\u1edbn h\u01a1n 0"),!1)}checkHiddenKhoanThu(){const{data:e,dataKhoanThu:n}=this.state;let a=n.find((n=>n.Id===e.KhoanThuId));return null!==a&&void 0!==a&&a.AnLienHe?(m.NguoiNopId.required=!1,!0):(m.NguoiNopId.required=!0,!1)}render(){const{data:e,openDialogInPhieu:n,link_api:a,titlePhieuIn:t,phieuId:u}=this.state,{open:g,onClose:T}=this.props;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(s.A,{isOpen:g,size:"xl",toggle:T,className:"lap-phieu-thu",children:[(0,j.jsx)(o.A,{toggle:T,children:"L\u1eadp phi\u1ebfu thu"}),(0,j.jsx)(l.A,{children:(0,j.jsxs)(d.A,{md:"6",children:[(0,j.jsxs)(r.A,{children:[(0,j.jsx)(x.A,{data:m.MaPhieu,value:"M\xe3 phi\u1ebfu t\u1ef1 d\u1ed9ng",styleRow:{pointerEvents:"none"}}),(0,j.jsx)(x.A,{data:m.KhoanThuId,value:e.KhoanThuId,onChange:this.handleChange}),(0,j.jsx)(x.A,{data:m.SoTien,value:e.SoTien,onChange:this.handleChange}),(0,j.jsx)(x.A,{data:m.HinhThucThanhToan_Id,value:e.HinhThucThanhToan_Id,onChange:this.handleChange})]}),(0,j.jsxs)(r.A,{children:[(0,j.jsx)(x.A,{data:m.NgayTao,value:e.NgayTao,onChange:this.handleChange}),!this.checkHiddenKhoanThu()&&(0,j.jsx)(x.A,{data:m.NguoiNopId,value:e.NguoiNopId,onChange:this.handleChange}),(0,j.jsx)(x.A,{data:m.GhiChu,value:e.GhiChu,onChange:this.handleChange})]})]})}),(0,j.jsx)(c.A,{children:(0,j.jsx)(d.A,{children:(0,j.jsxs)(r.A,{style:{textAlign:"right"},children:[(0,j.jsxs)(i.A,{color:"success",onClick:this.save,children:[(0,j.jsx)(h.A,{fa:"save"})," ","L\u01b0u"]}),(0,j.jsxs)(i.A,{style:{marginLeft:"10px"},color:"success",onClick:this.saveAndPrint,children:[(0,j.jsx)(h.A,{fa:"save"})," ","L\u01b0u & In"]}),(0,j.jsxs)(i.A,{style:{marginLeft:"10px"},color:"dark",onClick:T,children:[(0,j.jsx)(h.A,{fa:"ban"})," ","B\u1ecf qua"]})]})})})]}),n&&(0,j.jsx)(p.A,{open:n,title:t,onClose:()=>this.setState({openDialogInPhieu:!1}),link_api:a,maBaoCao:G.PhieuThu,phieuId:u})]})}}a(86803),a(53139),a(97159);var A={MaPhieu:{field_name:"MaPhieu",title:"M\xe3 phi\u1ebfu:",type:"textbox"},NgayTao:{field_name:"NgayTao",title:"Th\u1eddi gian:",type:"datetime",icon:!0,defaultValue:new Date},SoTien:{field_name:"SoTien",title:"Gi\xe1 tr\u1ecb:",type:"currency",required:!0},KhoanChiId:{field_name:"KhoanChiId",title:"Lo\u1ea1i chi:",type:"data-select",required:!0,dataSelect:{url:"DM_KhoanChi",where:"Hidden ne true",column:["Id","Ten"],value_field:"Id",text_field:"Ten"}},GhiChu:{field_name:"GhiChu",title:"Ghi ch\xfa:",type:"textarea",rows:"3"},HinhThucThanhToan_Id:{field_name:"HinhThucThanhToan_Id",title:"H\xecnh th\u1ee9c thanh to\xe1n:",type:"data-select",required:!0,dataSelect:{url:"DM_HinhThucThanhToan",column:["Id","Ten"],value_field:"Id",text_field:"Ten",placeholder:"Ch\u1ecdn h\xecnh th\u1ee9c thanh to\xe1n"}}};class y extends t.Component{constructor(e){super(e),this.handleValidate=()=>{const e=Object.values(A).filter((e=>e.required));let{data:n}=this.state;for(let a=0;a<e.length;a++){const t=e[a];let i=n[t.field_name];if(null===i||""===i||void 0===i||0===i.length)return(0,g.AB)('Vui l\xf2ng nh\u1eadp "'+t.title+'"'),!1}return!0},this.setStateData=(e,n)=>{var{data:a}=this.state;a[e]=n,this.setState({data:a})},this.handleChange=(e,n)=>{this.setStateData(e,n)},this.state={data:{KhoanChiId:"",SoTien:"",NguoiNhanId:"",HinhThucThanhToan_Id:1,GhiChu:"",NgayTao:""},openDialogInPhieu:!1,maPhieuChi:null,titlePhieuIn:null,link_api:"",phieuId:null},this.save=this.save.bind(this),this.saveAndPrint=this.saveAndPrint.bind(this)}saveAndPrint(){if(this.handleValidate()&&this.handleValidateSoTien()){let e=this.state.data;e.NgayTao=e.NgayTao||(0,u.FJ)(),(0,T.Pq)("PhieuChi/TaoPhieuChi","POST",JSON.stringify(e),!1).then((e=>{this.reset(),(0,g.nw)("L\u1eadp phi\u1ebfu chi th\xe0nh c\xf4ng!"),this.downloadPDF(e),this.props.onClose(),this.props.reloadTable()})).catch((e=>(0,g.a3)(e.Message,"Th\xf4ng b\xe1o")))}}downloadPDF(e){e&&this.setState({link_api:"/Print/InPhieuChi?phieuChiId=".concat(e.Id),titlePhieuIn:"".concat(e.MaPhieu),phieuId:e.Id},(()=>this.setState({openDialogInPhieu:!0})))}save(){if(this.handleValidate()&&this.handleValidateSoTien()){let e=this.state.data;e.NgayTao=e.NgayTao||(0,u.FJ)(),(0,T.Pq)("PhieuChi/TaoPhieuChi","POST",JSON.stringify(e),!1).then((e=>{this.reset(),this.props.onClose(),this.props.reloadTable(),(0,g.nw)("L\u1eadp phi\u1ebfu chi th\xe0nh c\xf4ng!")})).catch((e=>(0,g.a3)(e.Message,"Th\xf4ng b\xe1o")))}}reset(){this.setState({data:{KhoanChiId:"",SoTien:"",NguoiNhanId:"",GhiChu:"",NgayTao:""}})}handleValidateSoTien(){let{data:e}=this.state;return!((null===e||void 0===e?void 0:e.SoTien)<=0)||((0,g.AB)("Vui l\xf2ng nh\u1eadp s\u1ed1 ti\u1ec1n l\u1edbn h\u01a1n 0"),!1)}render(){const{data:e,openDialogInPhieu:n,titlePhieuIn:a,link_api:u,phieuId:g}=this.state,{open:T,onClose:m}=this.props;return(0,j.jsxs)(t.Fragment,{children:[(0,j.jsxs)(s.A,{isOpen:T,size:"xl",toggle:m,className:"lap-phieu-chi",children:[(0,j.jsx)(o.A,{toggle:m,children:"L\u1eadp phi\u1ebfu chi"}),(0,j.jsx)(l.A,{children:(0,j.jsxs)(d.A,{md:"6",children:[(0,j.jsxs)(r.A,{children:[(0,j.jsx)(x.A,{data:A.MaPhieu,value:"M\xe3 phi\u1ebfu t\u1ef1 d\u1ed9ng",styleRow:{pointerEvents:"none"}}),(0,j.jsx)(x.A,{data:A.KhoanChiId,value:e.KhoanChiId,onChange:this.handleChange}),(0,j.jsx)(x.A,{data:A.SoTien,value:e.SoTien,onChange:this.handleChange})]}),(0,j.jsxs)(r.A,{children:[(0,j.jsx)(x.A,{data:A.HinhThucThanhToan_Id,value:e.HinhThucThanhToan_Id,onChange:this.handleChange}),(0,j.jsx)(x.A,{data:A.NgayTao,value:e.NgayTao,onChange:this.handleChange}),(0,j.jsx)(x.A,{data:A.GhiChu,value:e.GhiChu,onChange:this.handleChange})]})]})}),(0,j.jsx)(c.A,{children:(0,j.jsx)(d.A,{children:(0,j.jsxs)(r.A,{style:{textAlign:"right"},children:[(0,j.jsxs)(i.A,{color:"success",onClick:this.save,children:[(0,j.jsx)(h.A,{fa:"save"})," ","L\u01b0u"]}),(0,j.jsxs)(i.A,{style:{marginLeft:"10px"},color:"success",onClick:this.saveAndPrint,children:[(0,j.jsx)(h.A,{fa:"save"})," ","L\u01b0u & In"]}),(0,j.jsxs)(i.A,{style:{marginLeft:"10px"},color:"dark",onClick:m,children:[(0,j.jsx)(h.A,{fa:"ban"})," ","B\u1ecf qua"]})]})})})]}),n&&(0,j.jsx)(p.A,{open:n,title:a,onClose:()=>this.setState({openDialogInPhieu:!1}),link_api:u,maBaoCao:G.PhieuChi,phieuId:g})]})}}var v=a(53744);class C extends t.Component{constructor(e){super(e),this.reloadTable=()=>{this.props.reloadTable()},this.state={base64img:null}}onDownload(){const{loaiThuId:e,loaiChiId:n,startDay:a,endDay:t}=this.props;(0,T.RN)("CrazyReport/LoadSoQuy?DiemKinhDoanhId=".concat(v.b9.DiemKinhDoanhId,"&MaPhieu=null&KhoanThu_Id=").concat(e,"&KhoanChi_Id=").concat(n,"&tuNgay=").concat(a,"&denNgay=").concat(t,"&dataMau=false&mode=download_pdf"),"LoadSoQuy.pdf","GET",null,!0).then((e=>e)).catch((e=>(0,g.a3)("\u0110\xe3 x\u1ea3y ra l\u1ed7i t\u1ea3i file!","Th\xf4ng b\xe1o")))}render(){const{isOpenDialog:e,openLapPhieuChi:n}=this.state;return(0,j.jsxs)("div",{className:"container-lap-phieu",children:[(0,j.jsxs)("div",{className:"right-lap-phieu",children:[(0,j.jsxs)(i.A,{size:"sm",color:"success",className:"mr-2",onClick:()=>this.setState({isOpenDialog:!0}),children:[(0,j.jsx)(h.A,{fa:"plus"})," ","L\u1eadp phi\u1ebfu thu"]}),(0,j.jsxs)(i.A,{size:"sm",color:"success",className:"mr-2",onClick:()=>this.setState({openLapPhieuChi:!0}),children:[(0,j.jsx)(h.A,{fa:"plus"})," ","L\u1eadp phi\u1ebfu chi"]}),(0,j.jsxs)(i.A,{size:"sm",color:"success",onClick:()=>this.onDownload(),children:[(0,j.jsx)(h.A,{fa:"file"})," ","Xu\u1ea5t file"]})]}),(0,j.jsx)(D,{reloadTable:this.reloadTable,open:e,onClose:()=>this.setState({isOpenDialog:!1})}),(0,j.jsx)(y,{reloadTable:this.reloadTable,open:n,onClose:()=>this.setState({openLapPhieuChi:!1})})]})}}class I extends t.Component{constructor(e){super(e),this.loadDataStatisticsByMouth=()=>{const{startDay:e,endDay:n}=this.props;e&&n&&this.callApiStatistics(e,n)},this.callApiStatistics=(e,n)=>{e&&n&&(0,T.Pq)("SoQuyTienMats/SoQuy?tuNgay=".concat(e,"&denNgay=").concat(n),"GET",null,!1).then((e=>{this.setState({dataRes:e})}))},this.state={dataRes:{}}}componentDidMount(){this.loadDataStatisticsByMouth()}componentDidUpdate(e,n){const{startDay:a,endDay:t}=this.props;a===e.startDay&&t===e.endDay||this.callApiStatistics(a,t)}render(){const{dataRes:e}=this.state;return(0,j.jsx)("div",{className:"container-thong-ke-quy",children:(0,j.jsxs)("div",{className:"thong-ke",children:[(0,j.jsxs)("div",{className:"quy",children:[(0,j.jsx)("span",{children:"Qu\u1ef9 \u0111\u1ea7u k\u1ef3"}),(0,j.jsxs)("span",{style:{color:"#297E7F"},children:[e.QuyDauKy?(0,u.vv)(e.QuyDauKy):0," VN\u0110"]})]}),(0,j.jsxs)("div",{className:"quy",children:[(0,j.jsx)("span",{children:"T\u1ed5ng thu"}),(0,j.jsxs)("span",{style:{color:"#297E7F"},children:[e.TongThu?(0,u.vv)(e.TongThu):0," VN\u0110"]})]}),(0,j.jsxs)("div",{className:"quy",children:[(0,j.jsx)("span",{children:"T\u1ed5ng chi"}),(0,j.jsxs)("span",{style:{color:"#921B1C"},children:[e.TongChi?(0,u.vv)(e.TongChi):0," VN\u0110"]})]}),(0,j.jsxs)("div",{className:"quy",children:[(0,j.jsx)("span",{children:"T\u1ed3n qu\u1ef9"}),(0,j.jsxs)("span",{style:{color:"#659528"},children:[e.TonQuy?(0,u.vv)(e.TonQuy):0," VN\u0110"]})]})]})})}}var H=a(85560),P=a(60833),S=[{title:"M\xe3 phi\u1ebfu",field:"MaPhieu",type:"string",dataID:!0,hidden:!1,editable:"never"},{title:"Ng\xe0y t\u1ea1o",field:"NgayTao",type:"datetime",hidden:!1,editable:"never",cellStyle:{textAlign:"left"}},{title:"S\u1ed1 ti\u1ec1n( VN\u0110 )",field:"SoTien",type:"currency",hidden:!1,editable:"never",render:e=>{const n=e.MaPhieu.slice(0,2);return"PT"===n?(0,j.jsxs)("div",{style:{color:"green"},children:["+ ",(0,u.vv)(e.SoTien)]}):"PC"===n?(0,j.jsxs)("div",{style:{color:"red"},children:["- ",(0,u.vv)(e.SoTien)]}):void 0}},{title:"Lo\u1ea1i thu chi",field:"LoaiThuChi",type:"string",hidden:!1,editable:"never"},{title:"H\xecnh th\u1ee9c thanh to\xe1n",field:"HinhThucThanhToan_Name",type:"string",hidden:!1,editable:"never"},{title:"Li\xean h\u1ec7",field:"LienHe",type:"string",hidden:!1,editable:"never"}];class f extends t.Component{constructor(e){super(e),this.state={isOpenDetail:!1,rowData:{}}}render(){const{maPhieu:e,loaiChiId:n,loaiThuId:a,reloadTable:t,startDay:i,endDay:h,maTaiKhoan:s,LoaiKhoan:o,hinhThucThanhToan:l}=this.props,{rowData:d,isOpenDetail:r}=this.state;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"container-table-so-quy",children:[i&&h&&(0,j.jsx)(H.A,{tableRef:this.props.tableRef,unRefresDatatable:!0,className:"data-table",urlExt:"SoQuyTienMats/GetList?MaPhieu=".concat(e||"","&KhoanThu_Id=").concat(a||null,"&KhoanChi_Id=").concat(n||null,"&tuNgay=").concat(i,"&denNgay=").concat(h,"&nguoiTao=").concat(s,"&LoaiKhoan=").concat(o,"&HinhThucThanhToan=").concat(l),columns:S,selectType:"withColumns",search:!1,onRowClick:(e,n)=>this.setState({isOpenDetail:!0,rowData:n})}),(0,j.jsx)(N,{data:this.props})]}),r&&(0,j.jsx)(P.A,{isOpenDetail:r,handleClose:()=>this.setState({isOpenDetail:!1}),data:d,reloadTable:t,startDay:i,endDay:h})]})}}const N=e=>{let{data:n}=e;const[a,i]=(0,t.useState)(null);return(0,t.useEffect)((()=>{(null===n||void 0===n?void 0:n.startDay)&&(null===n||void 0===n?void 0:n.endDay)&&(0,T.Pq)("SoQuyTienMats/GetList?MaPhieu=".concat(n.maPhieu?n.maPhieu:"","&KhoanThu_Id=").concat(n.loaiThuId?n.loaiThuId:null,"&KhoanChi_Id=").concat(n.loaiChiId?n.loaiChiId:null,"&tuNgay=").concat(n.startDay,"&denNgay=").concat(n.endDay,"&nguoiTao=").concat(n.maTaiKhoan,"&LoaiKhoan=").concat(n.LoaiKhoan,"&HinhThucThanhToan=").concat(n.hinhThucThanhToan,"\n "),"GET",null,!1).then((e=>i(e.TongCong)))}),[n.LoaiKhoan,n.endDay,n.hinhThucThanhToan,n.loaiChiId,n.loaiThuId,n.maPhieu,n.maTaiKhoan,n.startDay]),(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("p",{style:{width:"max-content"},className:"h6 mt-3 bg-white p-2 rounded",children:["T\u1ed5ng c\u1ed9ng:"," ",(0,j.jsxs)("strong",{className:"text-success",children:[(0,u.vv)(a)," VN\u0110"]})]})})};var b=a(62181),M=a(18383);class _ extends t.Component{constructor(e){super(e),this.onChangeDate=(e,n,a)=>{e&&this.setState({startDay:n?(0,M.A)(n,"yyyy-MM-dd"):null,endDay:a?(0,M.A)(a,"yyyy-MM-dd"):null},(()=>this.props.getDay(this.state.startDay,this.state.endDay)))},this.setMaPhieu=e=>{const{setDataFilter:n}=this.props;13===e.charCode&&this.setState({maPhieu:e.target.value.trim()},(()=>n("maPhieu",this.state.maPhieu)))},this.state={month:(new Date).getMonth()+1,year:(new Date).getFullYear(),loaiThuId:"",loaiChiId:"",LoaiKhoan:"",hinhThucThanhToan:null,maPhieu:null,maTaiKhoan:v.lg.MaTaiKhoan}}render(){const{setDataFilter:e}=this.props,{loaiChiId:n,loaiThuId:a,maPhieu:i,maTaiKhoan:h,LoaiKhoan:s,hinhThucThanhToan:o}=this.state;return(0,j.jsxs)(t.Fragment,{children:[(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{title:"T\xecm ki\u1ebfm",defaultValue:i,onKeyPress:e=>this.setMaPhieu(e),placeholder:"T\xecm ki\u1ebfm theo m\xe3 phi\u1ebfu ..."})}),(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{type:"dropdown-list",title:"Ng\u01b0\u1eddi t\u1ea1o",placeholder:"Ch\u1ecdn ng\u01b0\u1eddi t\u1ea1o ...",url:"TaiKhoans",where:"loai_tai_khoan eq 'don_vi' and IDDonVi eq '".concat(v.lg.IDDonVi,"' and SYS_DM_VaiTro/MaVaiTro eq 'dieuhanh' or SYS_DM_VaiTro/MaVaiTro eq 'ketoan' and TinhTrangHoatDong eq true"),valueField:"MaTaiKhoan",textField:"TenHienThi",value:h,onChange:n=>this.setState({maTaiKhoan:n||""},(()=>e("maTaiKhoan",this.state.maTaiKhoan)))})}),(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{title:"Th\u1eddi gian",type:"date-report",onChangeDate:this.onChangeDate,status:!0,defaultValueDate:"Th\xe1ng n\xe0y"})}),(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{type:"dropdown-list",title:"Lo\u1ea1i kho\u1ea3n",options:[{Id:"TatCa",Ten:"T\u1ea5t c\u1ea3"},{Id:"KhoanThu",Ten:"Kho\u1ea3n thu"},{Id:"KhoanChi",Ten:"Kho\u1ea3n chi"}],placeholder:"--Ch\u1ecdn lo\u1ea1i kho\u1ea3n--",valueField:"Id",textField:"Ten",value:s,onChange:n=>this.setState({LoaiKhoan:n},(()=>e("LoaiKhoan",this.state.LoaiKhoan)))})}),(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{type:"dropdown-list",title:"H\xecnh th\u1ee9c thanh to\xe1n",placeholder:"--Ch\u1ecdn h\xecnh th\u1ee9c thanh to\xe1n--",url:"DM_HinhThucThanhToan",valueField:"Id",textField:"Ten",value:o,onChange:n=>this.setState({hinhThucThanhToan:n},(()=>e("hinhThucThanhToan",this.state.hinhThucThanhToan)))})}),(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{type:"dropdown-list",title:"Kho\u1ea3n thu",url:"DM_KhoanThu",placeholder:"--Ch\u1ecdn kho\u1ea3n thu--",valueField:"Id",textField:"Ten",value:a,onChange:n=>this.setState({loaiThuId:n,loaiChiId:null},(()=>e("loaiThuId",this.state.loaiThuId)))})}),(0,j.jsx)(r.A,{md:"12",className:"p-0 mb-2",children:(0,j.jsx)(b.A,{type:"dropdown-list",title:"Kho\u1ea3n chi",url:"DM_KhoanChi",placeholder:"--Ch\u1ecdn kho\u1ea3n chi--",valueField:"Id",textField:"Ten",value:n,onChange:n=>this.setState({loaiChiId:n,loaiThuId:null},(()=>e("loaiChiId",this.state.loaiChiId)))})})]})}}var L=a(28412),K=a(30616),w=a(32385);class k extends t.Component{constructor(e){super(e),this.reloadTable=()=>{this.thongKeQuyRef.current&&this.thongKeQuyRef.current.loadDataStatisticsByMouth(),this.tableRef.current&&this.tableRef.current.onQueryChange()},this.getDay=(e,n)=>{this.setState({startDay:e,endDay:n},(()=>this.reloadTable()))},this.setDataFilter=(e,n)=>{this.setState({...this.state,[e]:n},(()=>this.reloadTable()))},this.tableRef=t.createRef(),this.thongKeQuyRef=t.createRef(),this.state={maPhieu:"",loaiPhieu:"",loaiChiId:"",loaiThuId:"",startDay:null,endDay:null,link_api:"",LoaiKhoan:"",hinhThucThanhToan:null,maTaiKhoan:v.lg.MaTaiKhoan}}render(){const{maPhieu:e,loaiThuId:n,loaiChiId:a,startDay:t,endDay:i,maTaiKhoan:h,LoaiKhoan:s,hinhThucThanhToan:o}=this.state;return(0,j.jsxs)(K.A,{children:[(0,j.jsx)(L.A,{NoTabs:!0,PageBaoCao:!0,children:(0,j.jsx)(_,{reloadTable:this.reloadTable,getDay:this.getDay,setDataFilter:this.setDataFilter})}),(0,j.jsxs)(w.A,{FilterNoHeader:!0,children:[(0,j.jsxs)("div",{className:"thongke-lapphieu d-flex p-2",children:[(0,j.jsx)("div",{className:"index-thong-ke-quy",children:(0,j.jsx)(I,{ref:this.thongKeQuyRef,startDay:t,endDay:i,reloadTable:this.reloadTable})}),(0,j.jsx)("div",{className:"index-lap-phieu",children:(0,j.jsx)(C,{startDay:t,endDay:i,loaiChiId:a,loaiThuId:n,reloadTable:this.reloadTable})})]}),(0,j.jsx)("div",{children:(0,j.jsx)(f,{hinhThucThanhToan:o,LoaiKhoan:s,maTaiKhoan:h,startDay:t,endDay:i,maPhieu:e,loaiChiId:a,loaiThuId:n,tableRef:this.tableRef,reloadTable:this.reloadTable})})]})]})}}const G={PhieuGiaoNhanVaThanhToan:"giao-nhan-va-thanh-toan",PhieuXuatHang:"xuat-hang",PhieuMuaHang:"mua-hang",PhieuThu:"phieu-thu",PhieuChi:"phieu-chi",HoaDonBanHan:"hoa-don-ban-hang",GiaoHangChiTietTheoNVGH:"giao-hang-chi-tiet-theo-nvgh"};class B extends t.Component{constructor(e){super(e),this.state={data:null}}componentDidMount(){}render(){return(0,j.jsx)(k,{})}}},34731:(e,n,a)=>{"use strict";a.d(n,{A:()=>T});var t=a(9950),i=a(45418),h=a.n(i),s=a(18849),o=a(53744),l=a(82376),d=a(73613),r=a(73114),c=a(43613),u=a(44414);const g=function(e){let{url:n,isBlob:a}=e;const i=(0,t.useRef)(null);return(0,t.useEffect)((()=>{r.GlobalWorkerOptions.workerSrc="".concat("https://qlk.qfoody.vn","/pdf.worker.js");var e=i.current,t=new c.EventBus,h=new c.PDFLinkService({eventBus:t}),s=new c.PDFFindController({linkService:h,eventBus:t}),o=new c.PDFViewer({container:e,linkService:h,eventBus:t,findController:s});(h.setViewer(o),document.addEventListener("pagesinit",(function(){o.currentScaleValue="page-width"})),n&&(n.length>0||n.byteLength>0))&&(a&&"string"===typeof n&&(n=Uint8Array.from(atob(n),(e=>e.charCodeAt(0)))),r.getDocument(n).promise.then((function(e){o.setDocument(e),h.setDocument(e,null)})))}),[n]),(0,u.jsx)("div",{className:"pdfViewer-container",ref:i,children:(0,u.jsx)("div",{className:"pdfViewer"})})};var x=a(4370);class T extends t.Component{constructor(e){super(e),this.state={paperSize:"",direction:""}}componentDidMount(){const{maBaoCao:e}=this.props;e&&(0,x.ID)("DanhMucBaoCaos?$filter=MaBaoCao eq '".concat(e,"'&$expand=SYS_KhoGiay&$select=SYS_KhoGiay/Name, Landscape")).then((e=>{var n,a;return this.setState({paperSize:null===(n=e.value[0])||void 0===n||null===(a=n.SYS_KhoGiay)||void 0===a?void 0:a.Name,direction:e.value[0].Landscape?"landscape":""})}))}render(){const{open:e,title:n,onClose:a,maBaoCao:t,phieuId:i}=this.props,{paperSize:r,direction:c}=this.state;return e&&(0,u.jsx)(l.A,{open:e,className:"in-phieu-so-quy",title:n||"",onClose:a,renderButton:(0,u.jsx)(h(),{trigger:()=>(0,u.jsxs)(s.A,{size:"sm mr-2",color:"primary",children:[" ",(0,u.jsx)(d.A,{fa:"print"})," ","In phi\u1ebfu"]}),content:()=>this.componentRef,pageStyle:"@media print {\n @page {\n size: ".concat(r," ").concat(c," !important;\n margin: 0mm !important;\n padding: 0mm !important;\n }\n }")}),children:(0,u.jsx)("div",{ref:e=>this.componentRef=e,className:"print-document",children:0!==t&&(0,u.jsx)(g,{url:x.Eh+"/CrazyReport/LoadReport?phieuId=".concat(i,"&MaBaoCao=").concat(t,"&DiemKinhDoanhId=").concat(o.b9.DiemKinhDoanhId,"&tuNgay=&denNgay=&nguoiTao=&mode=blob")})})})}}},60833:(e,n,a)=>{"use strict";a.d(n,{A:()=>H});var t=a(9950),i=a(82376),h=a(73613),s=a(4370),o=a(36841),l=a(67116),d=a(18849),r=a(50651),c=a(75490),u=a(76991),g=a(70349),x=a(23931),T=a(55627),p=a(85077),m=a(21205),j=a(34731),D=a(97159),A=a(53139),y=a(53031),v=(a(53744),a(85148),a(44414)),C="PT",I="PC";class H extends t.Component{constructor(e){super(e),this.loadData=()=>{const{data:e}=this.props;if(e&&e.MaPhieu){const n=e.MaPhieu.slice(0,2);(0,s.Pq)("/SoQuyTienMats/ChiTietPhieu?PhieuId=".concat(e.PhieuId,"&MaPhieu=").concat(n),"GET",null,!1).then((e=>{e&&this.setState({dataRes:e,backupData:e})}))}else(0,l.AB)("Kh\xf4ng x\xe1c \u0111\u1ecbnh \u0111\u01b0\u1ee3c m\xe3 phi\u1ebfu","TH\xd4NG B\xc1O")},this.closeDialog=()=>{const{loadData:e,props:{reloadTable:n}}=this;this.props.handleClose(),e(),n&&n()},this.save=()=>{const{dataRes:e}=this.state;(0,s.Pq)("SoQuyTienMats/CapNhatPhieu","POST",JSON.stringify(e),!1).then((()=>{(0,l.nw)("C\u1eadp nh\u1eadt phi\u1ebfu thu th\xe0nh c\xf4ng!"),this.loadData(),this.setState({isEdit:!1})})).catch((()=>(0,l.a3)("\u0110\xe3 x\u1ea3y ra l\u1ed7i c\u1eadp nh\u1eadt!")))},this.popupDetail=e=>{const{dataRes:n}=this.state;this.setState({ChungTuId:e}),"thanh-toan-no"!==n.MaKhoan&&"ban-hang"!==n.MaKhoan||this.setState({openDetailDonHang:!0})},this.state={isOpenDialogMoPhieu:!1,dataRes:{},isOpenDownloadFile:!1,link:"",isEdit:!1,backupData:{},donHang:{},link_api:"",maBaoCao:"",phieuId:null,openDetailDonHang:!1,ChungTuId:null}}componentDidMount(){const{data:e}=this.props;let n=e.MaPhieu.slice(0,2);e&&(n===I?this.setState({link_api:"/Print/InPhieuChi?phieuChiId=".concat(e.PhieuId),maBaoCao:y.MaBaoCaoPhieuIn.PhieuChi,phieuId:e.PhieuId}):n===C&&this.setState({link_api:"/Print/InPhieuThu?phieuThuId=".concat(e.PhieuId),maBaoCao:y.MaBaoCaoPhieuIn.PhieuThu,phieuId:e.PhieuId})),this.loadData()}render(){const{isOpenDetail:e,data:n}=this.props,{dataRes:a,isEdit:t,backupData:s,isOpenDownloadFile:l,link_api:y,maBaoCao:C,phieuId:I,openDetailDonHang:H,ChungTuId:P}=this.state;return(0,v.jsxs)("div",{className:"container-index-row-datail",children:[(0,v.jsx)(i.A,{open:e,onClose:this.closeDialog,title:"Th\xf4ng tin chi ti\u1ebft c\u1ee7a m\xe3 phi\u1ebfu ".concat(n.MaPhieu),renderButton:(0,v.jsxs)("div",{className:"d-flex justify-content-end",children:[t?(0,v.jsxs)(d.A,{color:"success",size:"sm",style:{marginRight:"10px"},onClick:this.save,children:[(0,v.jsx)(h.A,{fa:"save"})," L\u01b0u"]}):(0,v.jsx)(v.Fragment,{}),t?(0,v.jsxs)(d.A,{color:"secondary",size:"sm",className:"mr-2",onClick:()=>this.setState({isEdit:!1,dataRes:s}),children:[(0,v.jsx)(h.A,{fa:"ban"})," B\u1ecf qua"]}):(0,v.jsxs)(d.A,{color:"primary",size:"sm",className:"mr-2",onClick:()=>this.setState({isOpenDownloadFile:!0}),children:[(0,v.jsx)(h.A,{fa:"print"})," In phi\u1ebfu"]})]}),children:(0,v.jsxs)(r.A,{children:[(0,v.jsx)(c.A,{style:{backgroundColor:"rgb(3,56,99)",color:"#fff"},children:(0,v.jsx)("b",{className:"font-lg",children:"Th\xf4ng tin"})}),(0,v.jsxs)(u.A,{children:[(0,v.jsxs)(g.A,{children:[(0,v.jsxs)(x.A,{md:"4",xs:"12",children:[(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"M\xe3 phi\u1ebfu:"})})}),(0,v.jsx)(x.A,{style:{color:"#435986"},md:"8",children:null===a||void 0===a?void 0:a.MaPhieu})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i:"})})}),(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.SoDienThoai})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"\u0110\u1ecba ch\u1ec9:"})})}),(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.DiaChi})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"Ng\u01b0\u1eddi t\u1ea1o:"})})}),(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.NguoiTao})]})]}),(0,v.jsxs)(x.A,{md:"4",xs:"12",children:[(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"Lo\u1ea1i thu chi:"})})}),(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.LoaiThuChi})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"H\xecnh th\u1ee9c thanh to\xe1n:"})})}),(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.HinhThucThanhToan_Name})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"Ng\xe0y t\u1ea1o:"})})}),t?(0,v.jsx)(x.A,{md:"8",children:(0,v.jsx)(A.I8,{name:"NgayTao",value:null===a||void 0===a?void 0:a.NgayTao,onChange:e=>this.setState({dataRes:{...a,NgayTao:e}})})}):(0,v.jsx)(x.A,{md:"8",children:(0,o.Rt)(null===a||void 0===a?void 0:a.NgayTao)})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:null!==a&&void 0!==a&&a.NguoiNop?"Ng\u01b0\u1eddi n\u1ed9p:":"Li\xean h\u1ec7:"})})}),t?(0,v.jsx)(x.A,{md:"8",children:(0,v.jsx)(D.A,{odata:!0,url:"DM_LienHe",value:a.LienHe_Id,valueField:"Id",textField:"Ten",onChange:e=>this.setState({dataRes:{...a,LienHe_Id:e}})})}):null!==a&&void 0!==a&&a.NguoiNop?(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.NguoiNop}):(0,v.jsx)(x.A,{md:"8",children:null===a||void 0===a?void 0:a.LienHe})]}),(0,v.jsxs)(g.A,{children:[(0,v.jsx)(x.A,{md:"4",children:(0,v.jsx)(T.A,{children:(0,v.jsx)("b",{children:"S\u1ed1 ti\u1ec1n:"})})}),!t||a.HoaDonId&&0!==a.HoaDonId?(0,v.jsxs)(x.A,{md:"8",children:[(0,o.vv)(null===a||void 0===a?void 0:a.SoTien),"VN\u0110"]}):(0,v.jsx)(x.A,{md:"8",children:(0,v.jsx)(A.Sm,{name:"SoTien",placeholder:"S\u1ed1 ti\u1ec1n",defaultValue:null===a||void 0===a?void 0:a.SoTien,onChange:e=>this.setState({dataRes:{...a,SoTien:e.target.value}})})})]})]}),(0,v.jsxs)(x.A,{md:"4",xs:"12",children:[(0,v.jsx)(T.A,{for:"exampleText",children:"Ghi ch\xfa:"}),t?(0,v.jsx)(p.A,{style:{resize:"none",height:"134px",background:"#fff"},type:"textarea",name:"text",id:"exampleText",defaultValue:null===a||void 0===a?void 0:a.GhiChu,onChange:e=>this.setState({dataRes:{...a,GhiChu:e.target.value}})}):(0,v.jsx)("div",{children:a.GhiChu})]})]}),a.listChungTu&&0!==a.listChungTu.length&&(0,v.jsx)(g.A,{children:(0,v.jsxs)(m.A,{children:[(0,v.jsx)("thead",{className:"header-table",children:(0,v.jsxs)("tr",{children:[(0,v.jsx)("th",{children:"M\xe3 ch\u1ee9ng t\u1eeb"}),(0,v.jsx)("th",{children:"Th\u1eddi gian"}),(0,v.jsx)("th",{children:"Gi\xe1 tr\u1ecb phi\u1ebfu"})]})}),(0,v.jsx)("tbody",{children:a.listChungTu.map(((e,n)=>(0,v.jsxs)("tr",{children:[(0,v.jsx)("td",{children:e.MaChungTu}),(0,v.jsx)("td",{children:(0,o.Rt)(e.ThoiGian)}),(0,v.jsx)("td",{children:(0,o.vv)(e.SoTien)})]},n)))})]})})]})]})}),y&&(0,v.jsx)(j.A,{open:l,title:n.MaPhieu,onClose:()=>this.setState({isOpenDownloadFile:!1}),link_api:y,maBaoCao:C,phieuId:I})]})}}},23237:()=>{},97492:()=>{},31815:()=>{},66671:()=>{},82787:()=>{}}]);