????

Your IP : 3.22.98.193


Current Path : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/
Upload File :
Current File : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/4130.ce7524d1.chunk.js

"use strict";(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[4130],{5338:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(58168),o=n(77387),a=n(9417),r=n(64467),l=n(9950),s=n(2241),h=n.n(s),d=n(71832),u=n(32602),c=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return t=e.call.apply(e,[this].concat(i))||this,(0,r.A)((0,a.A)((0,a.A)(t)),"refHandler",(function(e){(0,u.cZ)(t.props.innerRef,e),(0,u.oV)(t.props.setReferenceNode,e)})),t}(0,o.A)(t,e);var n=t.prototype;return n.componentWillUnmount=function(){(0,u.cZ)(this.props.innerRef,null)},n.render=function(){return h()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),(0,u.vq)(this.props.children)({ref:this.refHandler})},t}(l.Component);function p(e){return l.createElement(d.$$.Consumer,null,(function(t){return l.createElement(c,(0,i.A)({setReferenceNode:t},e))}))}},27800:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(43145);function o(e,t){if(e){if("string"==typeof e)return(0,i.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,i.A)(e,t):void 0}}},37004:(e,t,n)=>{n.d(t,{A:()=>x});var i=n(9950),o=n(44188),a=n(34057),r=n(73613),l=n(44414);const s=e=>(0,l.jsx)("div",{className:"spinner-border-sm spinner-border text-danger"}),h={multiValueLabel:e=>({...e,padding:"0px 0px 0px 6px",fontSize:13}),control:e=>({...e,backgroundColor:"white",minHeight:"28.38px",fontSize:"0.76563rem",lineHeight:"1.5",cursor:"pointer",borderRadius:"0.2rem"}),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:n}=t;return{...e,marginTop:1,transform:"inherit",top:"unset"}},container:e=>({...e,width:"100%"}),valueContainer:e=>({...e,padding:"0px 2px 0px 2px"})},d=e=>(0,l.jsx)(s,{...e}),u=e=>(0,l.jsx)(o.F.IndicatorsContainer,{...e,getStyles:()=>({display:"flex",height:"100%"})}),c=e=>{const{innerProps:{ref:t,...n}}=e;return(0,l.jsx)("div",{...n,ref:t,style:{color:"rgb(204, 204, 204)",transition:"color 150ms ease 0s",boxSizing:"border-box"},children:(0,l.jsx)(r.A,{fa:"times",style:{marginTop:2,padding:"5px 5px 5px 5px",verticalAlign:"bottom"}})})},p=e=>{let{innerProps:t}=e;return(0,l.jsx)("span",{...t,style:{alignSelf:"stretch",width:1,backgroundColor:"rgb(204, 204, 204)",marginTop:2,marginBottom:2,marginRight:5,marginLeft:5}})},g=e=>(0,l.jsx)(o.F.DropdownIndicator,{...e,getStyles:()=>({color:"hsl(0,0%,80%)"}),children:(0,l.jsx)(r.A,{fa:"angle-down",style:{marginTop:2,padding:"5px 9px 5px 5px"}})}),m=e=>(0,l.jsx)(o.F.MenuList,{...e,getStyles:()=>({maxHeight:250,zIndex:9999,overflowY:"auto"}),children:e.children});class f extends i.Component{render(){const{placeholder:e,noOptionsMessage:t,loadingMessage:n,...i}=this.props;return(0,l.jsx)(a.Ay,{...i,classNamePrefix:"select",styles:h,placeholder:e,noOptionsMessage:t,loadingMessage:n,components:{IndicatorsContainer:u,ClearIndicator:c,IndicatorSeparator:p,DropdownIndicator:g,LoadingIndicator:d,MenuList:m}})}}f.defaultProps={placeholder:"Ch\u1ecdn...",noOptionsMessage:()=>"Kh\xf4ng c\xf3 l\u1ef1a ch\u1ecdn",loadingMessage:()=>"\u0110ang t\u1ea3i"};const x=f},43145:(e,t,n)=>{function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}n.d(t,{A:()=>i})},45458:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(43145);var o=n(27800);function a(e){return function(e){if(Array.isArray(e))return(0,i.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},64469:(e,t,n)=>{n.r(t),n.d(t,{default:()=>x});var i=n(9950),o=n(18649),a=n(16328),r=n(33151),l=n(68879),s=n(53744),h=n(93047),d=n(73230),u=n(97159),c=n(4370),p=n(67116),g=n(36841),m=n(44414);const f=i.lazy((()=>n.e(2660).then(n.bind(n,72660))));class x extends i.Component{constructor(e){super(e),this.state={diemKinhDoanhIdCurrent:null,dataDiemKinhDoanh:null}}componentDidMount(){s.b9&&this.setState({diemKinhDoanhIdCurrent:s.b9.DiemKinhDoanhId}),this.getCauHinhKhac().then((()=>{let e=this.getCauHinhBanHang(),t=this.getDataDiemKinhDoanh();Promise.all([e,t]).then((e=>{e.find((e=>e))&&window.location.reload()}))}))}getCauHinhBanHang(){return new Promise(((e,t)=>{let n=!1;s.rz?e(n):(0,c.px)("CauHinh_BanHangs?$select=XuatHangTuDong, MoHinhKinhDoanh_Id","GET",null).then((e=>{n=!0,localStorage.setItem(s.tY,JSON.stringify({XuatHangTuDong:e.value[0].XuatHangTuDong,MoHinhKinhDoanh_Id:e.value[0].MoHinhKinhDoanh_Id}))})).catch((e=>(0,p.a3)("Kh\xf4ng th\u1ec3 l\u1ea5y d\u1eef li\u1ec7u C\u1ea5u h\xecnh b\xe1n h\xe0ng","Th\xf4ng b\xe1o"))).finally((()=>e(n)))}))}getCauHinhKhac(){return new Promise(((e,t)=>{let n=!1;s.Tq?e(n):(0,c.Pq)(`DonVi_CauHinhs/LayCauHinhTheoDonVi?donViId=${s.lg.IDDonVi}`,"GET",null,!1).then((e=>{n=!0;let t={};e.result.length?(e.result.forEach(((e,n)=>{t={...t,[e.MaCauHinh]:e.GiaTri}})),localStorage.setItem(s.td,JSON.stringify(t))):n=!1})).catch((e=>(0,p.a3)("Kh\xf4ng th\u1ec3 l\u1ea5y d\u1eef li\u1ec7u C\u1ea5u h\xecnh kh\xe1c","Th\xf4ng b\xe1o"))).finally((()=>e(n)))}))}getDataDiemKinhDoanh(){return new Promise(((e,t)=>{let n=!1;"dieuhanh"===s.lg.MaVaiTro?(0,c.Pq)("DiemKinhDoanhs?$expand=DM_Kho&$select=Id,Ten,DM_Kho/Id,DM_Kho/Ten,DM_Kho/IsKhoTong","GET",null).then((t=>{this.setState({dataDiemKinhDoanh:t.value}),s.b9||(n=!0,localStorage.setItem(s.Rs,JSON.stringify({DiemKinhDoanhId:t.value[0].Id,TenDiemKinhDoanh:t.value[0].Ten,Kho_Id:t.value[0].DM_Kho[0].Id,IsKhoTong:t.value[0].DM_Kho[0].IsKhoTong})),e(n))})).catch((e=>(0,p.a3)("Kh\xf4ng th\u1ec3 l\u1ea5y d\u1eef li\u1ec7u \u0110i\u1ec3m kinh doanh","Th\xf4ng b\xe1o"))).finally((()=>e(n))):(s.b9||(n=!0,localStorage.setItem(s.Rs,JSON.stringify({DiemKinhDoanhId:s.lg.DiemKinhDoanhId,TenDiemKinhDoanh:s.lg.TenDiemKinhDoanh,Kho_Id:s.lg.KhoId,IsKhoTong:s.lg.IsKhoTong}))),e(n))}))}setDiemKinhDoanh(e){e&&this.setState({diemKinhDoanhIdCurrent:e},(()=>{(0,c.Pq)(`DiemKinhDoanhs?$expand=DM_Kho&$select=Id,Ten,DM_Kho/Id,DM_Kho/Ten,DM_Kho/IsKhoTong&$filter=Id eq ${e}`,"GET",null).then((e=>{try{this.setLocalStorage({DiemKinhDoanhId:e.value[0].Id,TenDiemKinhDoanh:e.value[0].Ten||null,Kho_Id:e.value[0].DM_Kho.length>0?e.value[0].DM_Kho[0].Id:null,IsKhoTong:e.value[0].DM_Kho.length>0&&e.value[0].DM_Kho[0].IsKhoTong})}catch(t){}})).catch((e=>(0,p.a3)("Kh\xf4ng th\u1ec3 l\u1ea5y d\u1eef li\u1ec7u \u0111i\u1ec3m kinh doanh","Th\xf4ng b\xe1o")))}))}setLocalStorage(e){localStorage.setItem(s.Rs,JSON.stringify(e)),"dieuhanh"===s.lg.MaVaiTro&&window.location.reload()}render(){const{dataDiemKinhDoanh:e,diemKinhDoanhIdCurrent:t}=this.state;return(0,m.jsxs)("div",{className:"container header-top d-flex bd-highlight",children:[(0,m.jsx)(f,{}),(0,m.jsx)("div",{className:"flex-grow-1 bd-highlight",children:(0,m.jsx)("a",{className:"logo",href:s.lg.TrangChu||"/",children:(0,g.EP)()?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("img",{src:"/assets/Logo/icon-wad.png",width:"auto",height:"35",alt:"Qu\u1ea3n l\xfd b\xe1n h\xe0ng"}),(0,m.jsxs)("div",{className:"logo-r",children:[(0,m.jsx)("div",{className:"logo-text",children:"GDT-WAD"}),(0,m.jsx)("div",{className:"slogan",children:"Warehouse and distribution"})]})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("img",{src:"/assets/Logo/logoQLBH.png",width:"auto",height:"35",alt:"Qu\u1ea3n l\xfd b\xe1n h\xe0ng"}),(0,m.jsx)("div",{className:"logo-r",style:{display:"flex",alignItems:"center"},children:(0,m.jsx)("div",{className:"logo-text",children:"Target POS"})})]})})}),(0,m.jsxs)(o.A,{direction:"down",className:"select-chi-nhanh button-drop-right bd-highlight",children:[e?(0,m.jsx)(u.A,{options:e,valueField:"Id",textField:"Ten",placeholder:"Ch\u1ecdn \u0111i\u1ec3m kinh doanh",value:t,onChange:e=>this.setDiemKinhDoanh(e)}):(0,m.jsx)("input",{type:"text",className:"form-control-sm form-control",readOnly:!0,defaultValue:s.lg.TenDiemKinhDoanh}),(0,m.jsx)("i",{className:"fa fa-map-marker"})]}),(0,m.jsxs)(o.A,{direction:"down",className:"button-drop-right bd-highlight",children:[(0,m.jsxs)(a.A,{children:[(0,m.jsx)("div",{className:"mr-2",style:{fontSize:11,fontWeight:"500",textAlign:"right"},children:s.lg.TenHienThi}),(0,m.jsx)("img",{src:s.lg.Thumbnail50?`${s.Eh}${s.lg.Thumbnail50}`:"assets/profile-w.jpg",className:"img-avatar",width:30,height:30,alt:"gdtvietnam"})]}),(0,m.jsxs)(r.A,{right:!0,children:[(0,m.jsxs)(l.A,{tag:h.N_,to:"/thong-tin-tai-khoan",children:[(0,m.jsx)("i",{className:"fa fa-user-circle-o"})," Th\xf4ng tin ng\u01b0\u1eddi d\xf9ng"]}),(0,m.jsxs)(l.A,{onClick:e=>(0,d.Mw)(),children:[(0,m.jsx)("i",{className:"fa fa-sign-out"})," \u0110\u0103ng xu\u1ea5t"]})]})]})]})}}},68879:(e,t,n)=>{n.d(t,{A:()=>x});var i=n(58168),o=n(98587),a=n(9417),r=n(77387),l=n(9950),s=n(11942),h=n.n(s),d=n(48738),u=n.n(d),c=n(66609),p=n(44208),g=["className","cssModule","divider","tag","header","active","text"],m={children:h().node,active:h().bool,disabled:h().bool,divider:h().bool,tag:p.Wx,header:h().bool,onClick:h().func,className:h().string,cssModule:h().object,toggle:h().bool,text:h().bool},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind((0,a.A)(n)),n.getTabIndex=n.getTabIndex.bind((0,a.A)(n)),n}(0,r.A)(t,e);var n=t.prototype;return n.getRole=function(){return"listbox"===this.context.menuRole?"option":"menuitem"},n.onClick=function(e){var t=this.props,n=t.disabled,i=t.header,o=t.divider,a=t.text;n||i||o||a?e.preventDefault():(this.props.onClick&&this.props.onClick(e),this.props.toggle&&this.context.toggle(e))},n.getTabIndex=function(){var e=this.props,t=e.disabled,n=e.header,i=e.divider,o=e.text;return t||n||i||o?"-1":"0"},n.render=function(){var e=this.getTabIndex(),t=e>-1?this.getRole():void 0,n=(0,p.cJ)(this.props,["toggle"]),a=n.className,r=n.cssModule,s=n.divider,h=n.tag,d=n.header,c=n.active,m=n.text,f=(0,o.A)(n,g),x=(0,p.qO)(u()(a,{disabled:f.disabled,"dropdown-item":!s&&!d&&!m,active:c,"dropdown-header":d,"dropdown-divider":s,"dropdown-item-text":m}),r);return"button"===h&&(d?h="h6":s?h="div":f.href?h="a":m&&(h="span")),l.createElement(h,(0,i.A)({type:"button"===h&&(f.onClick||this.props.toggle)?"button":void 0},f,{tabIndex:e,role:t,className:x,onClick:this.onClick}))},t}(l.Component);f.propTypes=m,f.defaultProps={tag:"button",toggle:!0},f.contextType=c.r;const x=f},73613:(e,t,n)=>{n.d(t,{A:()=>a});n(9950);var i=n(44414);const o=e=>{const{fa:t,ariaHidden:n,style:o}=e;return(0,i.jsx)("i",{style:o,className:"fa fa-"+t,"aria-hidden":n})};o.defaultProps={ariaHidden:!0};const a=o},80045:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(98587);function o(e,t){if(null==e)return{};var n,o,a=(0,i.A)(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},80296:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(27800);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,l=[],s=!0,h=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);s=!0);}catch(e){h=!0,o=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(h)throw o}}return l}}(e,t)||(0,i.A)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},92901:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(20816);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,i.A)(o.key),o)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},97159:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(9950),o=n(37004),a=n(4370),r=n(36841),l=n(44414);const s={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:n}=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"})};class h extends i.Component{constructor(e){super(e),this.loadDataFromApi=()=>{let{columns:e,odata:t,url:n,where:i,valueField:o,textField:l,textFieldSub:s}=this.props,h=[],d="";!1!==t?(d=`${n}`,d+=i?`/?$filter=${i}&`:"/?",e&&e.length>0&&(d+=`$select=${this.props.columns.join()}`)):d=this.props.url,(0,a.Pq)(d,"GET",null,t).then((e=>{!1!==t?e.value.forEach((e=>{h.push({value:e[o],label:s?parseInt(e[s])+""==="NaN"?e[s]+" - "+e[l]:"number"===typeof parseInt(e[s])?e[l]+" - "+(0,r.vv)(e[s])+" VN\u0110":e[s]+" - "+e[l]:e[l],obj:e})})):h=e,this.setState({data:h,isLoading:!1}),this.setStateSelected(this.state.value)})).catch((e=>console.log(e)))},this.onChange=(e,t)=>{if(this.setState({selected:e}),this.props.isMulti){var n=[];for(let t=0;t<e.length;t++)n.push(e[t].value);this.props.onChange(n,null)}else this.props.onChange(e?e.value:null,e?e.obj:null)},this.state={data:[],value:null,selected:null,isLoading:!1}}componentDidMount(){this.setState({isLoading:!0});let{options:e,valueField:t,textField:n,textFieldSub:i}=this.props;if(e){let o=e.map((e=>({value:e[t],label:i?parseInt(e[i])+""==="NaN"?e[i]+" - "+e[n]:"number"===typeof parseInt(e[i])?e[n]+" - "+(0,r.vv)(e[i])+" VN\u0110":e[i]+" - "+e[n]:e[n],obj:e})));this.setState({data:o,isLoading:!1}),this.setStateSelected(this.state.value)}else this.loadDataFromApi()}getSnapshotBeforeUpdate(e,t){return e.value!==this.props.value?(this.setState({value:this.props.value}),this.setStateSelected(this.props.value),this.props.value||null):null}setStateSelected(e){this.props.isMulti?this.setState({selected:this.getOptionsMulti(e)}):this.setState({selected:this.getOptionsSingle(e)})}getOptionsSingle(e){let t=null,{data:n}=this.state;if(n&&n.length>0&&e)for(let i=0;i<n.length;i++){if(n[i].value&&n[i].value===e){t=n[i];break}if(n[i].options)for(let o=0;o<n[i].options.length;o++)if(n[i].options[o].value&&n[i].options[o].value===e){t=n[i].options[o];break}}return t}getOptionsMulti(e){let t=[],{data:n}=this.state;if(n&&n.length>0&&e)for(let i=0;i<n.length;i++){let o=n[i];for(let n=0;n<e.length;n++)o.value&&o.value===e[n]&&t.push(o)}return t}componentDidUpdate(e,t,n){let{options:i,valueField:o,textField:a,textFieldSub:l,where:s}=this.props;if(s!==e.where&&this.loadDataFromApi(),i!==e.options&&i){let e=i.map((e=>({value:e[o],label:l?parseInt(e[l])+""==="NaN"?e[l]+" - "+e[a]:"number"===typeof parseInt(e[l])?e[a]+" - "+(0,r.vv)(e[l])+" VN\u0110":e[l]+" - "+e[a]:e[a],obj:e})));this.setState({data:e,isLoading:!1}),this.setStateSelected(this.state.value)}}render(){let{placeholder:e,isMulti:t,isDetail:n,value:i,className:a}=this.props,r=t?this.getOptionsMulti(i):this.getOptionsSingle(i);return this.state.data.length>0&&n?(0,l.jsx)("span",{children:r&&r.label}):(0,l.jsx)(o.A,{isMulti:t,isLoading:this.state.isLoading,isDisabled:this.props.disabled,isClearable:!0,className:a||"dropdownlist",value:r,styles:s,options:this.state.data,onChange:this.onChange,placeholder:e})}}const d=h}}]);