????

Your IP : 3.145.146.15


Current Path : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/
Upload File :
Current File : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/8683.69f2ee17.chunk.js

"use strict";(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[8683],{68754:(e,n,a)=>{a.d(n,{A:()=>f});var i=a(9950),l=a(67116),s=a(82376),t=a(4370),h=(a(29079),a(70349)),d=a(23931),c=a(50651),o=a(76991),r=a(18849),u=a(36841),m=a(53139),x=a(73613),p=a(34182),j=a(95688),g=a(44414);class v extends i.Component{constructor(e){super(e),this.handleDeletePhieuXuat=e=>{(0,l.A1)("B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a!","Th\xf4ng b\xe1o").then((()=>{(0,t.Pq)("XuatHang/XoaPhieuXuat?idPhieuXuat=".concat(e),"DELETE",null,!1).then((e=>{(0,l.nw)("X\xf3a phi\u1ebfu th\xe0nh c\xf4ng"),this.props.onCloseTaoPhieu&&this.props.onCloseTaoPhieu(),this.props.getDataPhieuChuyenKho&&this.props.getDataPhieuChuyenKho()})).catch((e=>{(0,l.a3)(e.Message)}))}))},this.state={}}render(){var e;const{dataKho:n,phieuNhapSelected:a,searchDataDetail:i,refTimKiemSanPham:l,isDelete:s,reloadListFix:t,dataDonViTinh:v}=this.props;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(h.A,{className:"tao-phieu-nhap-hang xem-phieu",children:[(0,g.jsx)(d.A,{md:"4",className:"thong-tin-phieu-nhap",children:(0,g.jsxs)(c.A,{children:[(0,g.jsx)("div",{className:"card-header",children:(0,g.jsx)("b",{children:"Th\xf4ng tin phi\u1ebfu xu\u1ea5t h\xe0ng"})}),(0,g.jsxs)(o.A,{children:[s&&(0,g.jsxs)(r.A,{color:"danger",style:{backgroundColor:"red",position:"fixed",right:"6rem",zIndex:1e4,top:"0.35rem"},className:"mr-2",size:"sm",onClick:()=>this.handleDeletePhieuXuat(a.Id),children:[(0,g.jsx)(x.A,{fa:"trash"})," X\xf3a phi\u1ebfu xu\u1ea5t"]}),(0,g.jsxs)(h.A,{className:"form-input form-lapphieu",children:[(0,g.jsxs)(d.A,{md:"12",children:[(0,g.jsxs)(h.A,{children:[(0,g.jsx)(d.A,{md:"4",children:"M\xe3 kho: "}),(0,g.jsx)(d.A,{children:null===a||void 0===a?void 0:a.Kho_Id})]}),(0,g.jsxs)(h.A,{children:[(0,g.jsx)(d.A,{md:"4",children:"M\xe3 ch\u1ee9ng t\u1eeb: "}),(0,g.jsx)(d.A,{children:null===a||void 0===a?void 0:a.MaXuatHang})]}),n&&(0,g.jsxs)(h.A,{children:[(0,g.jsx)(d.A,{md:"4",children:"Xu\u1ea5t t\u1eeb kho: "}),(0,g.jsx)(d.A,{children:(()=>{var e;return n&&n.length&&(null===a||void 0===a||null===(e=a.Sale_ChiTietXuatHang[0])||void 0===e?void 0:e.Kho_Id)&&n.find((e=>{var n;return e.Id===(null===a||void 0===a||null===(n=a.Sale_ChiTietXuatHang[0])||void 0===n?void 0:n.Kho_Id)})).Ten})()})]}),(0,g.jsxs)(h.A,{children:[(0,g.jsx)(d.A,{md:"4",children:"Gi\xe1 tr\u1ecb: "}),(0,g.jsx)(d.A,{children:(0,u.vv)(null===a||void 0===a?void 0:a.ThanhTien)})]})]}),(0,g.jsxs)(d.A,{md:"12",children:[(0,g.jsxs)(h.A,{children:[(0,g.jsx)(d.A,{md:"4",children:"Th\u1eddi gian: "}),(0,g.jsx)(d.A,{children:(0,u.Rt)(null===a||void 0===a?void 0:a.NgayXuat)})]}),(0,g.jsxs)(h.A,{children:[(0,g.jsx)(d.A,{md:"4",children:"Ghi ch\xfa: "}),(0,g.jsxs)(d.A,{children:[(0,g.jsx)(x.A,{fa:"pencil"}),(0,g.jsx)(m.fs,{rows:"5",placeholder:"Ghi ch\xfa",style:{pointerEvents:"none",paddingRight:"1.5rem"},value:null===a||void 0===a?void 0:a.GhiChu,name:"GhiChu"})]})]})]})]})]})]})}),(0,g.jsx)(d.A,{md:"8",className:"chi-tiet-nhap-hang",children:(0,g.jsxs)(c.A,{children:[(0,g.jsxs)("div",{className:"card-header",children:[(0,g.jsx)("b",{children:"Chi ti\u1ebft phi\u1ebfu xu\u1ea5t h\xe0ng"}),(0,g.jsx)(p.A,{searchDataDetail:i,ref:l})]}),(0,g.jsx)(o.A,{children:(0,g.jsx)(h.A,{md:"12",className:"form-input",children:(0,g.jsx)(d.A,{children:(0,g.jsxs)("table",{width:"100%",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{children:"STT"}),(0,g.jsx)("td",{children:"M\xe3 h\xe0ng"}),(0,g.jsx)("td",{children:"T\xean h\xe0ng"}),(0,g.jsx)("td",{children:"\u0110VT"}),(0,g.jsx)("td",{children:"S\u1ed1 l\u01b0\u1ee3ng"}),(0,g.jsx)("td",{children:"\u0110\u01a1n gi\xe1"}),(0,g.jsx)("td",{children:"Th\xe0nh ti\u1ec1n"}),(0,g.jsx)("td",{children:"Ghi ch\xfa"})]})}),(0,g.jsx)("tbody",{children:(null===a||void 0===a||null===(e=a.Sale_ChiTietXuatHang)||void 0===e?void 0:e.length)>0?null===a||void 0===a?void 0:a.Sale_ChiTietXuatHang.map(((e,n)=>{var i,l,s;return(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{children:n+1}),(0,g.jsx)("td",{className:"text-left",children:null===(i=e.DM_SanPhamDichVu)||void 0===i?void 0:i.MaSanPham}),(0,g.jsx)("td",{className:"text-left",children:null===(l=e.DM_SanPhamDichVu)||void 0===l?void 0:l.TenSanPham}),(0,g.jsx)("td",{className:"text-left",children:null===(s=v.filter((n=>{var a;return n.Id===(null===e||void 0===e||null===(a=e.DM_SanPhamDichVu)||void 0===a?void 0:a.DonViTinh_Id)}))[0])||void 0===s?void 0:s.Ten}),(0,g.jsx)("td",{className:"text-right",style:{maxWidth:"30px"},children:(0,g.jsx)(j.A,{url:"FixLoi/UpdatePhieuXuat?idPhieuXuat=".concat(a.Id,"&sanPhamDichVu_Id=").concat(e.SanPhamDichVu_Id),soLuong:(0,u.vv)(e.SoLuong),reloadList:t})}),(0,g.jsx)("td",{className:"text-right",children:(0,u.vv)(e.DonGia)}),(0,g.jsx)("td",{className:"text-right",children:(0,u.vv)(e.ThanhTien)}),(0,g.jsx)("td",{children:e.GhiChu})]},e.SanPhamDichVu_Id)})):(0,g.jsx)("tr",{})})]})})})})]})})]})})}}const N=v;class f extends i.Component{constructor(e){super(e),this.handleDeletePhieuXuat=e=>{(0,l.A1)("B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a!","Th\xf4ng b\xe1o").then((()=>{(0,t.Pq)("XuatHang/XoaPhieuXuat?idDonChuyenKho=".concat(e),"DELETE",null,!1).then((e=>{(0,l.nw)("X\xf3a phi\u1ebfu th\xe0nh c\xf4ng"),this.props.onCloseTaoPhieu&&this.props.onCloseTaoPhieu(),this.props.getDataPhieuChuyenKho&&this.props.getDataPhieuChuyenKho()}))}))},this.state={phieuNhapSelected:null,originalPhieuNhap:null,dataDonViTinh:[],data:{MaXuatHang:"",NgayNhap:"",HinhThucThanhToan_Id:"",ThanhTien:"",ThanhTienFormat:"",Kho_Id:"",GhiChu:"",ListChiTietPhieuNhapHang:[]}},this.TimKiemSanPham=i.createRef(),this.searchDataDetail=this.searchDataDetail.bind(this)}componentDidMount(){this.getDataDonViTinh(),"add"!==this.props.modeDialog&&this.setState({phieuNhapSelected:this.props.phieuNhapSelected,originalPhieuNhap:this.props.phieuNhapSelected})}getDataDonViTinh(){(0,t.Pq)("DM_DonViTinh","GET",null).then((e=>this.setState({dataDonViTinh:e.value}))).catch((e=>(0,l.a3)("Kh\xf4ng th\u1ec3 l\u1ea5y d\u1eef li\u1ec7u kho!")))}searchDataDetail(e){let{phieuNhapSelected:n,originalPhieuNhap:a}=this.state;if(n){let i=a.Sale_ChiTietXuatHang.filter((n=>n.DM_SanPhamDichVu.MaSanPham.toUpperCase().includes(e.toUpperCase().trim())||n.DM_SanPhamDichVu.TenSanPham.toUpperCase().includes(e.toUpperCase().trim())));this.setState({phieuNhapSelected:{...n,Sale_ChiTietXuatHang:i}})}}render(){const{openTaoPhieu:e,onCloseTaoPhieu:n,modeDialog:a,isDelete:i,fncDelete:l}=this.props,{phieuNhapSelected:t,dataDonViTinh:h}=this.state;let d=(0,g.jsx)(g.Fragment,{}),c=(0,g.jsx)(N,{phieuNhapSelected:t,dataDonViTinh:h,searchDataDetail:this.searchDataDetail,refTimKiemSanPham:this.TimKiemSanPham,onCloseTaoPhieu:n,getDataPhieuChuyenKho:this.props.getDataPhieuChuyenKho,isDelete:i}),o=(0,g.jsx)(g.Fragment,{}),u="";switch(a){case"detail":o=c,u="Xem th\xf4ng tin phi\u1ebfu xu\u1ea5t h\xe0ng";break;case"edit":o=d,u="Ch\u1ec9nh s\u1eeda phi\u1ebfu xu\u1ea5t h\xe0ng";break;case"add":o=d,u="T\u1ea1o phi\u1ebfu xu\u1ea5t h\xe0ng"}return(0,g.jsx)(s.A,{className:"custom-modal",title:u,open:e,onClose:n,renderButton:(0,g.jsx)(g.Fragment,{children:l&&(0,g.jsxs)(r.A,{color:"danger",style:{backgroundColor:"red"},className:"mr-2",size:"sm",onClick:()=>l(t.Id),children:[(0,g.jsx)(x.A,{fa:"trash"})," X\xf3a phi\u1ebfu xu\u1ea5t"]})}),children:o})}}},43126:(e,n,a)=>{a.d(n,{y:()=>r});var i=a(9950),l=a(65476),s=a(53139),t=a(67116),h=a(73613),d=a(68315),c=a(36841),o=(a(14944),a(44414));const r=e=>{let{list:n,choose:a,hiddenDonGia:r,isSearchQR:u}=e;const[m,x]=(0,i.useState)(""),[p,j]=(0,i.useState)([]),[g,v]=(0,i.useState)({actForm:!1,actQR:void 0===u||u}),N=(0,i.useRef)();return(0,l.W)(N,(()=>v((e=>({...e,actForm:!1}))))),(0,i.useEffect)((()=>{const e=n.filter((e=>e.TenSanPham.toUpperCase().includes(m.toUpperCase())||e.MaSanPham.toUpperCase().includes(m.toUpperCase())));j(e)}),[n,m]),(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{onClick:()=>!g.actQR&&v((e=>({...e,actForm:!0}))),className:"form-input-search-qr",ref:N,children:[(0,o.jsx)(s.Sm,{placeholder:g.actQR?"Qu\xe9t m\xe3 v\u1ea1ch...":"T\xecm ki\u1ebfm...",id:"input-search-qr",onClick:function(){const e=document.getElementById("input-search-qr");e.focus(),e.select()},className:"input-search-qr ".concat(g.actForm&&!g.actQR?"input-search-qr-active":""),onChange:e=>{x(e.target.value)},onKeyPress:e=>{13===e.charCode&&a&&(p.length&&g.actQR?a(p[0]):(0,t.AB)("Kh\xf4ng c\xf3 m\xe3 s\u1ea3n ph\u1ea9m n\xe0y","TH\xd4NG B\xc1O"),x(""))},value:m}),(0,o.jsx)("div",{onClick:()=>v((e=>({...e,actQR:!e.actQR}))),className:"icon-input-search-qr ".concat(g.actQR?"icon-input-search-qr-active":""),children:(0,o.jsx)(h.A,{fa:g.actQR?"qrcode":"search"})}),!!m&&!g.actQR&&g.actForm&&(0,o.jsxs)("div",{className:"list-suggest-search-qr",children:[(0,o.jsx)("p",{children:(0,o.jsx)("b",{children:"K\u1ebft qu\u1ea3 t\xecm ki\u1ebfm :"})}),p.length?p.map((e=>(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{onClick:()=>a&&a(e),className:"item-suggest-search-qr",children:[(0,o.jsx)(d.RB,{url:e.HinhAnh150,style:{borderRadius:"50%",width:"3rem"}}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"mb-0 text-secondary",children:(0,o.jsx)("i",{children:e.MaSanPham})}),(0,o.jsx)("p",{className:"mb-0 font-weight-bold",children:e.TenSanPham})]}),(0,o.jsxs)("div",{children:["\u0110VT: ",(0,o.jsx)("b",{children:e.DonViTinh})]}),(0,o.jsx)("p",{style:{color:"#4680fe"},className:"h6 font-weight-bold mb-0",children:!r&&"".concat((0,c.vv)(e.GiaBan)," VN\u0110")})]})}))):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"d-flex text-secondary p-4 align-items-center justify-content-center",children:(0,o.jsxs)("i",{children:['Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 n\xe0o cho "',m,'"']})})})]})]})})}},17750:(e,n,a)=>{a.d(n,{mo:()=>p,ul:()=>j,Ay:()=>x});var i=a(9950),l=a(68315),s=a(36841),t=a(73613),h=a(18849),d=a(37746),c=a(14353),o=a.n(c),r=(a(14944),a(44414));const u=e=>{let{open:n,list:a,close:i}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(d.A,{onClose:i,open:n,children:[(0,r.jsxs)("div",{id:"headerprint",className:"header-print-bar-code",children:[(0,r.jsxs)("div",{className:"d-flex align-items-center",children:[(0,r.jsx)(t.A,{style:{fontSize:"30px"},fa:"barcode"})," ",(0,r.jsx)("h1",{className:"font-weight-bold ml-2",children:"BarCode"})]}),(0,r.jsxs)("div",{style:{gap:"1rem"},className:"d-flex align-items-center pl-3 border-left",children:[(0,r.jsx)(h.A,{onClick:()=>{i()},className:"btn-print-bar-code",children:"H\u1ee7y"}),(0,r.jsx)(h.A,{className:"btn-print-bar-code btn-print-bar-code-active",onClick:()=>{document.getElementById("headerprint").style.display="none",document.getElementById("mydiv").style.padding="0",window.print(),document.getElementById("formPrintScale").style.width="100%",document.getElementById("headerprint").style.display="flex",document.getElementById("mydiv").style.padding="1rem 20vw"},children:"In m\xe3 v\u1ea1ch"})]})]}),(0,r.jsx)("div",{id:"mydiv",className:"body-print-bar-code",children:(0,r.jsx)("div",{id:"formPrintScale",className:"form-print-barcode",children:a.map((e=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(m,{item:e})})))})})]})})},m=e=>{let{item:n}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"form-item-print-bar-code",children:[(0,r.jsx)("div",{className:"d-flex justify-content-center",children:(0,r.jsx)(o(),{value:n.MaSanPham})}),(0,r.jsxs)("div",{id:"formBodyTitleBarCode",children:[(0,r.jsx)("div",{className:"d-flex justify-content-center",children:(0,r.jsx)("p",{className:"font-weight-bold mb-0",children:n.TenSanPham})}),(0,r.jsx)("div",{className:"d-flex justify-content-center",children:(0,r.jsxs)("strong",{children:[(0,s.vv)(n.GiaBan),"VN\u0110 (",n.DonViTinh,")"]})})]})]},n.Id)})},x=e=>{let{list:n,remove:a,isSoLuong:d,hiddenDonGia:c,onChange:o,title:m,icon:x,onClick:j,renderBtn:g,hidden:v,renderChild:N,renderBtnSecondary:f}=e;const[T,b]=(0,i.useState)(!1);let S=[...new Set(n)];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-list-choose-pro-qr ".concat(v?"d-none":""),children:[(0,r.jsx)("div",{className:"d-flex justify-content-between mb-3 bg-light p-3",children:(0,r.jsxs)("div",{className:"form-title-list-choose-pro-qr ml-2",children:[(0,r.jsx)(t.A,{style:{fontSize:"22px",marginTop:"0.2rem"},fa:x||"qrcode"})," ",m||"S\u1ea2N PH\u1ea8M C\u1ea6N IN"]})}),N&&(0,r.jsx)("div",{style:{maxHeight:"10vh",overflowY:"auto"},children:N}),S.length?(0,r.jsxs)("div",{style:N?{height:"70vh"}:{},className:"table-choose-pro-qr p-3",children:[(0,r.jsxs)("div",{className:"row-table-choose-pro-qr header-table-choose-pro-qr ",children:[(0,r.jsx)("b",{children:"STT"}),(0,r.jsx)("b",{}),(0,r.jsx)("b",{children:"M\xe3 s\u1ea3n ph\u1ea9m"}),(0,r.jsx)("b",{children:"T\xean s\u1ea3n ph\u1ea9m"}),d&&(0,r.jsx)("b",{children:"S\u1ed1 l\u01b0\u1ee3ng"}),(0,r.jsx)("b",{children:"\u0110VT"}),!c&&(0,r.jsx)("b",{children:"\u0110\u01a1n gi\xe1"}),(0,r.jsx)("b",{})]}),S.length?S.map(((e,n)=>(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"row-table-choose-pro-qr ",children:[(0,r.jsx)("span",{className:"text-muted",children:n+1}),(0,r.jsx)("span",{children:(0,r.jsx)(l.RB,{style:{width:"2.5rem",borderRadius:"50%"},url:e.HinhAnh150})}),(0,r.jsx)("span",{className:"text-muted",style:{fontWeight:"bolder"},children:e.MaSanPham}),(0,r.jsx)("span",{children:e.TenSanPham}),d&&(0,r.jsx)(p,{id:e.Id,value:e.SoLuong,onChange:n=>o(e,n)}),(0,r.jsx)("span",{children:e.DonViTinh}),!c&&(0,r.jsxs)("span",{style:{color:"#4680fe"},children:[(0,s.vv)(e.GiaBan)," VN\u0110"]}),(0,r.jsx)("span",{children:(0,r.jsx)("div",{onClick:()=>a(e),className:"btn-x-item-list-choose-qr",children:(0,r.jsx)(t.A,{fa:"times"})})})]})}))):(0,r.jsx)("div",{className:"p-5 d-flex align-items-center justify-content-center text-secondary",children:(0,r.jsx)("i",{children:"Ch\u01b0a c\xf3 s\u1ea3n ph\u1ea9m n\xe0o \u0111\u01b0\u1ee3c ch\u1ecdn"})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"not-list-choose-pro text-secondary",children:(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsx)("div",{className:"d-flex justify-content-center",children:(0,r.jsx)(t.A,{style:{fontSize:"90px"},fa:"codepen"})}),(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)("span",{className:"h3",children:"Ch\u01b0a c\xf3 s\u1ea3n ph\u1ea9m"}),(0,r.jsxs)("span",{style:{display:"block",fontSize:"15px",textAlign:"center"},children:["Vui l\xf2ng ch\u1ecdn s\u1ea3n ph\u1ea9m cho"," ",m?(0,r.jsx)("span",{className:"text-lowercase",children:m}):"h\xf3a \u0111\u01a1n"]})]})]})})}),(0,r.jsxs)("div",{style:{borderRadius:"0 0 10px 10px",height:"4rem",position:"absolute",left:0,right:0,bottom:0},className:"d-flex justify-content-between align-items-center bg-light p-3",children:[(0,r.jsxs)("div",{className:"text-muted",children:[(0,r.jsx)(t.A,{fa:"cubes"})," S\u1ed1 l\u01b0\u1ee3ng s\u1ea3n ph\u1ea9m:"," ",(0,r.jsx)("b",{className:"text-dark",children:S.length})]}),(0,r.jsxs)("div",{style:{gap:"0.5rem"},className:"d-flex",children:[f,!!S.length&&(0,r.jsxs)(h.A,{onClick:()=>j?j(S):b(!0),disabled:!S.length,className:"btn-in-ma-vach",children:[(0,r.jsx)(t.A,{style:{fontSize:"22px",marginTop:"0.1rem"},fa:(null===g||void 0===g?void 0:g.icon)||"qrcode"})," ",(null===g||void 0===g?void 0:g.title)||"In m\xe3 v\u1ea1ch"]})]})]})]}),T&&(0,r.jsx)(u,{open:T,list:S,close:()=>b(!1)})]})},p=e=>{let{id:n,value:a,onChange:l,min:s,max:t}=e;const h=(0,i.useRef)(null);let d="text-box-".concat(n);return(0,r.jsx)("input",{className:"input-so-luong-choose-pro",ref:h,id:d,maxlength:"6",onClick:()=>{h.current.select()},type:"number",placeholder:"S\u1ed1 l\u01b0\u1ee3ng",value:a,onChange:e=>{(e=>{let n=null;parseInt(e)>=t&&(n=t),parseInt(e)<=s&&(n=s),l(null!==n?n:e)})(e.target.value)}})},j=e=>{let{textTitle:n,textSecond:a,icon:i,style:l}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"w-100 d-flex align-items-center justify-content-center text-secondary",style:l||{},children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"d-flex justify-content-center",children:(0,r.jsx)(t.A,{style:{fontSize:"90px"},fa:i||"codepen"})}),(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)("span",{className:"h3",children:n||"Ch\u01b0a c\xf3 s\u1ea3n ph\u1ea9m"}),(0,r.jsx)("span",{style:{display:"block",fontSize:"15px",textAlign:"center"},children:a||"Vui l\xf2ng ch\u1ecdn s\u1ea3n ph\u1ea9m cho h\xf3a \u0111\u01a1n"})]})]})})})}},68315:(e,n,a)=>{a.d(n,{Ay:()=>t,RB:()=>d});a(9950);var i=a(36841),l=a(73613),s=(a(14944),a(44414));const t=e=>{let{list:n,choose:a,hiddenDonGia:i}=e;return(0,s.jsx)(s.Fragment,{children:n.length?(0,s.jsx)("div",{className:"form-list-pro-qr",children:n.map(((e,n)=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(h,{onClick:e=>a&&a(e),item:e,index:n,hiddenDonGia:i})})))}):(0,s.jsx)(c,{style:{marginTop:"4rem"}})})},h=e=>{let{item:n,index:a,onClick:l,hiddenDonGia:t}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{onClick:()=>l(n,a),className:"item-pro-qr",children:[(0,s.jsx)(d,{url:n.HinhAnh150}),(0,s.jsx)("p",{className:"mb-1 mt-2",children:(0,i.yv)(n.TenSanPham,2,"...","","hover",a)}),(0,s.jsx)("i",{style:{color:"#b1b1b1",fontSize:"12px"},children:n.MaSanPham}),(0,s.jsxs)("p",{className:"font-weight-light d-flex mb-3",children:["\u0110\u01a1n v\u1ecb t\xednh :"," ",(0,s.jsx)("p",{className:"font-weight-bold ml-1 mb-0",children:n.DonViTinh})]}),!t&&(0,s.jsxs)("h6",{className:"mb-0",style:{fontWeight:"bolder",color:"#4680fe"},children:[(0,i.vv)(n.GiaBan)," VN\u0110"]})]},a)})},d=e=>{let{url:n,style:a}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("img",{style:a,src:n?"/api"+n:"assets/default.jpg",className:"img-item-pro-qr",alt:""})})},c=e=>{let{style:n}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{style:n,className:"bg-no-product text-secondary",children:[(0,s.jsx)(l.A,{style:{fontSize:"90px"},fa:"dropbox"}),(0,s.jsx)("p",{children:"Kh\xf4ng c\xf3 h\xe0ng h\xf3a"})]})})}},4485:(e,n,a)=>{a.d(n,{A:()=>p,B:()=>j});var i=a(59051),l=a.n(i),s=a(9950),t=a(18849),h=a(4370),d=a(68754),c=a(93443),o=a(60833),r=a(22488),u=a(67116),m=a(73613),x=(a(25987),a(44414));const p=e=>{let{data:n,reset:a}=e;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{className:"form-info-lenh-che-bien-2",children:[(0,x.jsx)("div",{className:"d-flex mb-3 justify-content-between",children:(0,x.jsxs)("div",{children:[(0,x.jsx)("p",{style:{fontSize:"10px"},className:"mb-0 text-muted",children:"Ng\u01b0\u1eddi t\u1ea1o"}),(0,x.jsxs)("div",{className:"d-flex align-items-center",children:[(0,x.jsx)("h6",{className:"font-weight-bold mb-0 mr-1",children:n.SYS_TaiKhoan.TenHienThi}),(0,x.jsxs)("span",{children:["(",n.NguoiTao,")"]})]})]})}),((null===n||void 0===n?void 0:n.PhieuXuatNVL_Id)||(null===n||void 0===n?void 0:n.PhieuNhapThanhPham_Id))&&(0,x.jsx)(j,{data:n,reset:a,listBill:["XuatHang","NhapHang"]}),(0,x.jsxs)("div",{className:"form-item-info-lenh-che-bien-2",children:[(0,x.jsxs)("div",{className:"d-flex mb-2 border-bottom-item-info-lenh-che-bien-2 pl-1 pb-1",children:[(0,x.jsx)("span",{className:"w-75 text-muted",children:"Ng\xe0y t\u1ea1o:"}),(0,x.jsx)("span",{className:"w-100",children:l()(n.NgayTao).format("DD/MM/YYYY hh:mm:ss A")})]}),(0,x.jsxs)("div",{className:"d-flex mb-2 border-bottom-item-info-lenh-che-bien-2 pl-1 pb-1",children:[(0,x.jsx)("span",{className:"w-75 text-muted",children:"M\xe3 l\u1ec7nh:"}),(0,x.jsx)("span",{className:"w-100",children:"15"})]}),(0,x.jsxs)("div",{className:"d-flex mb-2 border-bottom-item-info-lenh-che-bien-2 pl-1 pb-1",children:[(0,x.jsx)("span",{className:"w-75 text-muted",children:"Lo\u1ea1i:"}),(0,x.jsx)("span",{className:"w-100",children:n.DM_LoaiSanPham.TenLoai})]}),(0,x.jsxs)("div",{className:"d-flex border-bottom-item-info-lenh-che-bien-2 pl-1 pb-1",children:[(0,x.jsx)("span",{className:"w-75 text-muted",children:"Tr\u1ea1ng th\xe1i:"}),(0,x.jsx)("span",{style:{color:"luutam"===n.TrangThai?"#ff9b00":"#0092db"},className:"w-100 font-weight-bold",children:n.CheBien_DMTrangThai.Name})]})]})]})})},j=e=>{var n,a,i,m,p,j,v,N,f,T,b,S,y,D,P,C,A,_,H,M;let{data:X,reset:I,listBill:w}=e;const[k,V]=(0,s.useState)(X),[K,q]=(0,s.useState)(null),[B,F]=(0,s.useState)(null),[R,G]=(0,s.useState)(null),[E,Y]=(0,s.useState)([]),[z,L]=(0,s.useState)(null);let Q=!!w.length&&!!w.filter((e=>"NhapHang"===e)).length,U=!!w.length&&!!w.filter((e=>"XuatHang"===e)).length,W=!!w.length&&!!w.filter((e=>"PhieuThu"===e)).length;(0,s.useEffect)((()=>{var e,n,a,i,l,s;(null===k||void 0===k||null===(e=k.Sale_XuatHang)||void 0===e?void 0:e.Id)&&(0,h.Pq)("Sale_XuatHang(".concat(null===(n=k.Sale_XuatHang)||void 0===n?void 0:n.Id,")?$expand=Sale_ChiTietXuatHang,Sale_ChiTietXuatHang/DM_SanPhamDichVu,Sale_ChiTietXuatHang/DM_DonViTinh")).then((e=>F(e))),(null===k||void 0===k||null===(a=k.Sale_NhapHang)||void 0===a?void 0:a.Id)&&(0,h.Pq)("Sale_NhapHang(".concat(null===(i=k.Sale_NhapHang)||void 0===i?void 0:i.Id,")?$expand=Sale_ChiTietNhapHang,Sale_ChiTietNhapHang/DM_SanPhamDichVu,Sale_ChiTietNhapHang/DM_DonViTinh,Sale_MuaHang")).then((e=>q(e))),(null===k||void 0===k||null===(l=k.Sale_PhieuThu)||void 0===l?void 0:l.Id)&&(0,h.Pq)("SoQuyTienMats/ChiTietPhieu?PhieuId=".concat(null===(s=k.Sale_PhieuThu)||void 0===s?void 0:s.Id,"&MaPhieu=PT"),"GET",null,!1).then((e=>G(e))),(0,h.Pq)("DM_DonViTinh").then((e=>{Y(e.value)}))}),[k]);const O=(e,n)=>{let a="Sale_".concat(e,"Hang");(0,u.A1)("B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a phi\u1ebfu!","Th\xf4ng b\xe1o").then((i=>{(0,h.Pq)("CheBien/XoaPhieu".concat(e,"CheBien?IdPhieu").concat(e,"=").concat(n),"DELETE",null,!1).then((n=>{(0,u.nw)("X\xf3a phi\u1ebfu th\xe0nh c\xf4ng!"),V((e=>({...e,[a]:null}))),L(null),"Xuat"===e&&I()}))}))};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"mb-4 form-btn-pn-and-px-nlcb",children:[!!U&&(0,x.jsx)("div",{className:"w-100",children:(0,x.jsxs)(t.A,{disabled:!(null!==k&&void 0!==k&&null!==(n=k.Sale_XuatHang)&&void 0!==n&&n.MaXuatHang),onClick:()=>L("xh"),className:"btn-pn-and-px-nlcb",children:[(0,x.jsxs)("div",{className:"form-file-text-o",children:[(0,x.jsx)("div",{className:"d-flex justify-content-center mb-2",children:(0,x.jsx)("div",{className:"text-code-info-pn-px",children:null===k||void 0===k||null===(a=k.Sale_XuatHang)||void 0===a?void 0:a.MaXuatHang})}),(0,x.jsx)("span",{className:"text-dark",children:null!==k&&void 0!==k&&null!==(i=k.Sale_XuatHang)&&void 0!==i&&i.MaXuatHang?"Phi\u1ebfu xu\u1ea5t":"Ch\u01b0a c\xf3 phi\u1ebfu!"}),(0,x.jsx)("div",{style:{fontSize:"10px"},children:(null===k||void 0===k||null===(m=k.Sale_XuatHang)||void 0===m?void 0:m.NgayTao)&&l()(null===k||void 0===k||null===(p=k.Sale_XuatHang)||void 0===p?void 0:p.NgayTao).format("DD/MM/YYYY hh:mm:ss A")})]}),(null===k||void 0===k||null===(j=k.Sale_XuatHang)||void 0===j?void 0:j.MaXuatHang)&&(0,x.jsx)(g,{onDelete:null!==(v=k.Sale_NhapHang)&&void 0!==v&&v.Id?null:()=>{var e;return O("Xuat",null===(e=k.Sale_XuatHang)||void 0===e?void 0:e.Id)}})]})}),!!Q&&(0,x.jsx)("div",{className:"w-100",children:(0,x.jsxs)(t.A,{disabled:!(null!==k&&void 0!==k&&null!==(N=k.Sale_NhapHang)&&void 0!==N&&N.MaNhapHang),onClick:()=>L("nh"),className:"btn-pn-and-px-nlcb",children:[(0,x.jsxs)("div",{className:"form-file-text-o",children:[(0,x.jsx)("div",{className:"d-flex justify-content-center mb-2",children:(0,x.jsx)("div",{className:"text-code-info-pn-px",children:null===k||void 0===k||null===(f=k.Sale_NhapHang)||void 0===f?void 0:f.MaNhapHang})}),(0,x.jsxs)("span",{className:"text-dark",children:[null!==k&&void 0!==k&&null!==(T=k.Sale_NhapHang)&&void 0!==T&&T.MaNhapHang?"Phi\u1ebfu nh\u1eadp":"Ch\u01b0a c\xf3 phi\u1ebfu!"," "]}),(0,x.jsx)("div",{style:{fontSize:"10px"},children:(null===k||void 0===k||null===(b=k.Sale_NhapHang)||void 0===b?void 0:b.NgayTao)&&l()(null===k||void 0===k||null===(S=k.Sale_NhapHang)||void 0===S?void 0:S.NgayTao).format("DD/MM/YYYY hh:mm:ss A")})]}),(null===k||void 0===k||null===(y=k.Sale_NhapHang)||void 0===y?void 0:y.MaNhapHang)&&(0,x.jsx)(g,{onDelete:()=>{var e;return O("Nhap",null===(e=k.Sale_NhapHang)||void 0===e?void 0:e.Id)}})]})}),!!W&&(0,x.jsx)("div",{className:"w-100",children:(0,x.jsxs)(t.A,{disabled:!(null!==k&&void 0!==k&&null!==(D=k.Sale_PhieuThu)&&void 0!==D&&D.MaPhieu),onClick:()=>L("pt"),className:"btn-pn-and-px-nlcb",children:[(0,x.jsxs)("div",{className:"form-file-text-o",children:[(0,x.jsx)("div",{className:"d-flex justify-content-center mb-2",children:(0,x.jsx)("div",{className:"text-code-info-pn-px",children:null===k||void 0===k||null===(P=k.Sale_PhieuThu)||void 0===P?void 0:P.MaPhieu})}),(0,x.jsxs)("span",{className:"text-dark",children:[null!==k&&void 0!==k&&null!==(C=k.Sale_PhieuThu)&&void 0!==C&&C.MaPhieu?"Phi\u1ebfu thu":"Ch\u01b0a c\xf3 phi\u1ebfu!"," "]}),(0,x.jsx)("div",{style:{fontSize:"10px"},children:(null===k||void 0===k||null===(A=k.Sale_PhieuThu)||void 0===A?void 0:A.NgayTao)&&l()(null===k||void 0===k||null===(_=k.Sale_PhieuThu)||void 0===_?void 0:_.NgayTao).format("DD/MM/YYYY hh:mm:ss A")})]}),(null===k||void 0===k||null===(H=k.Sale_PhieuThu)||void 0===H?void 0:H.MaPhieu)&&(0,x.jsx)(g,{})]})})]}),"xh"===z&&B&&(0,x.jsx)(d.A,{modeDialog:"detail",phieuNhapSelected:B,dataKho:[{Id:1,Ten:"CN Ch\xednh",DiemKinhDoanh_Id:11,NgayTao:"2020-09-24T00:00:00",NguoiTao:"gdt",NgaySua:"2023-03-06T10:11:07.943",NguoiSua:"dieuhanh",ThuKho:"dieuhanh",IsKhoTong:!0,PT_ChuyenKho:null}],dataDonViTinh:E,openTaoPhieu:"xh"===z,onCloseTaoPhieu:()=>L(null),fncDelete:null!==k&&void 0!==k&&null!==(M=k.Sale_NhapHang)&&void 0!==M&&M.MaNhapHang?null:e=>O("Xuat",e)}),"nh"===z&&K&&(0,x.jsx)(c.A,{modeDialog:"detail",phieuNhapSelected:K,loaiPhieu:r._.ChuyenKho,dataKho:[{Id:1,Ten:"CN Ch\xednh",DiemKinhDoanh_Id:11,NgayTao:"2020-09-24T00:00:00",NguoiTao:"gdt",NgaySua:"2023-03-06T10:11:07.943",NguoiSua:"dieuhanh",ThuKho:"dieuhanh",IsKhoTong:!0,PT_ChuyenKho:null}],dataDonViTinh:E,openTaoPhieu:"nh"===z,onCloseTaoPhieu:()=>L(null),fncDelete:e=>O("Nhap",e)}),"pt"===z&&R&&(0,x.jsx)(o.A,{isOpenDetail:"pt"===z,handleClose:()=>L(null),data:R})]})},g=e=>{let{onDelete:n}=e;return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{className:"outline-form-btn-action-pn-and-px-nlcb",children:(0,x.jsxs)("div",{className:"form-btn-action-pn-and-px-nlcb",children:[(0,x.jsx)("div",{className:"item-btn-action-pn-and-px-nlcb xem-thong-tin",children:(0,x.jsx)(m.A,{fa:"search"})}),n&&(0,x.jsx)("div",{onClick:e=>{e.stopPropagation(),n()},className:"item-btn-action-pn-and-px-nlcb xoa-thong-tin",children:(0,x.jsx)(m.A,{fa:"trash"})})]})})})}},14944:()=>{},25987:()=>{}}]);