????

Your IP : 3.139.240.192


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/1187.61318024.chunk.js

"use strict";(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[1187],{428:(e,t,o)=>{o.d(t,{A5:()=>r,G5:()=>n,Is:()=>g,UI:()=>a,V$:()=>u,Yv:()=>h,Z5:()=>c,e9:()=>p,gn:()=>i,jB:()=>d,xz:()=>f});o(67116);const n=e=>e.filter((e=>e.dataID))[0],a=e=>n(e).field,i=e=>e&&e.includes("."),l=e=>e.split(".").join("/"),s=(e,t)=>e?t.field:t,h=(e,t,o)=>{const a=n(t);return`${e}(${"guid"===a.type?"guid":""}'${o[a.field]}')`},d=function(e,t,o){return arguments.length>3&&void 0!==arguments[3]&&arguments[3]?`substringof('${o}', ${e})`:`${e} eq ${((e,t)=>"string"===e?`'${t}'`:"datetime"===e?`datetime'${t}'`:"guid"===e?`guid'${t}'`:`${t}`)(t,o)}`},r=(e,t)=>{if(e.filters&&e.filters.length>0){const t=e.filters.filter((e=>e.column.field&&e.column.type)).map((e=>{const t=`${i(e.column.field)?e.column.dataRef?e.column.dataRef[0]:l(e.column.field):e.column.field}`;return d(t,e.column.type,e.value)}));return t&&t.join(" and ")}if(e.search&&e.search.length>=1){const o=t.filter((e=>e.searchable&&e.field&&e.type)).map((t=>{const o=`${i(t.field)?l(t.field):t.field}`;return d(o,t.type,e.search,!0)}));return o&&o.join(" or ")}return""},c=(e,t)=>`$top=${t}&$skip=${e*t}&$inlinecount=allpages`,u=(e,t)=>`&$orderby=${i(e)?l(e):e} ${t}`,p=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e.filter((e=>i(s(t,e))));return 0===o.length?"":`&$expand=${function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=[];return e.forEach(((e,n)=>{let a=s(t,e).split(".").reverse().splice(1).reverse().join("/");0===n?o.push(a):o.some((e=>e===a))||o.push(a)})),o.join(",")}(o,t)}`},g=function(e){const t=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t?"withColumns"===t?`${e.reduce(((e,t,n,a)=>{let h=s(o,t),d=`${e}`;return i(h)?d+=`${void 0===t.dataRef?"":t.dataRef[0]+","}${l(h)}`:d+=`${h}`,`${d}${n===a.length-1?"":","}`}),"")}`:"":`${e.filter((e=>i(e.field))).reduce(((e,t)=>`${e},${l(s(o,t))}`),"*")}`}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"withColumns",!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);return t?`&$select=${t}`:""},f=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"withColumns";return`${p(e,o)}${g(e,n,o)}${t?"&$filter="+t:""}`}},1254:(e,t,o)=>{o.d(t,{A:()=>g});var n=o(58168),a=o(98587),i=o(9950),l=o(11942),s=o.n(l),h=o(48738),d=o.n(h),r=o(44208),c=["className","cssModule","color","innerRef","pill","tag"],u={color:s().string,pill:s().bool,tag:r.Wx,innerRef:s().oneOfType([s().object,s().func,s().string]),children:s().node,className:s().string,cssModule:s().object},p=function(e){var t=e.className,o=e.cssModule,l=e.color,s=e.innerRef,h=e.pill,u=e.tag,p=(0,a.A)(e,c),g=(0,r.qO)(d()(t,"badge","badge-"+l,!!h&&"badge-pill"),o);return p.href&&"span"===u&&(u="a"),i.createElement(u,(0,n.A)({},p,{className:g,ref:s}))};p.propTypes=u,p.defaultProps={color:"secondary",pill:!1,tag:"span"};const g=p},10077:(e,t,o)=>{o.d(t,{A:()=>m});var n=o(9950),a=o(15255);const i={body:{emptyDataSourceMessage:"Kh\xf4ng c\xf3 d\u1eef li\u1ec7u \u0111\u1ec3 hi\u1ec3n th\u1ecb",addTooltip:"Th\xeam",editTooltip:"S\u1eeda",deleteTooltip:"X\xf3a",editRow:{deleteText:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn x\xf3a d\xf2ng n\xe0y kh\xf4ng?",cancelTooltip:"H\u1ee7y",saveTooltip:"L\u01b0u"}},toolbar:{exportTitle:"Xu\u1ea5t file",searchTooltip:"T\xecm ki\u1ebfm",showColumnsTitle:"Hi\u1ec7n c\u1ed9t",addRemoveColumns:"Th\xeam v\xe0 hi\u1ec3n th\u1ecb c\xe1c c\u1ed9t",searchPlaceholder:"T\xecm ki\u1ebfm"},pagination:{labelRowsPerPage:"S\u1ed1 d\xf2ng cho 1 trang",labelRowsSelect:"d\xf2ng",labelDisplayedRows:" {from}-{to} c\u1ee7a {count}",firstTooltip:"Trang \u0111\u1ea7u ti\xean",previousTooltip:"Trang tr\u01b0\u1edbc",nextTooltip:"Trang sau",lastTooltip:"Trang cu\u1ed1i c\xf9ng"},header:{actions:"Thao t\xe1c"}};var l=o(44414);const s=n.lazy((()=>Promise.all([o.e(9818),o.e(8185),o.e(3130),o.e(783),o.e(7930),o.e(7608),o.e(7476),o.e(484),o.e(7925),o.e(5060),o.e(2026),o.e(8190),o.e(537),o.e(1105)]).then(o.bind(o,38671)))),h=n.lazy((()=>Promise.all([o.e(9818),o.e(3130),o.e(783),o.e(7930),o.e(5060),o.e(5897)]).then(o.bind(o,46350)))),d=n.lazy((()=>Promise.all([o.e(9818),o.e(3435)]).then(o.bind(o,33435)))),r={color:"#000",padding:"2px",fontSize:"12px",fontWeight:"bold",textAlign:"center",backgroundColor:"powderblue",borderLeft:"0.5px solid rgb(224, 224, 224)",zIndex:99},c={even:"#FFF",odd:"rgb(247, 248, 255)"},u={fontSize:"12px",borderLeft:"0.5px solid rgba(224, 224, 224, 1)"};class p extends n.Component{render(){const{addMoreRows:e,pageSize:t,search:o,CustumToolbar:n,CustumCell:a,SearchAdvanced:c,onRowClick:p,dataCount:g,rowStyle:f,rowsPerPage:T,page:m,...K}=this.props;return(0,l.jsx)(s,{...K,addMoreRows:e,localization:i,options:{exportButton:!1,search:o,actionsColumnIndex:-1,pageSize:t,headerStyle:r,rowStyle:f},onRowClick:void 0===p?void 0:(e,t)=>p(e,t),components:(()=>{let e={Toolbar:e=>(0,l.jsx)(h,{...e,SearchAdvanced:c}),Cell:e=>(0,l.jsx)(d,{...e,style:u})};return n&&(e.Toolbar=n),a&&(e.Cell=a),e})()})}}p.defaultProps={rowStyle:(e,t,o)=>({backgroundColor:t%2===0?c.even:c.odd}),pageSize:10,search:!0};var g=o(428),f=o(4370),T=o(67116);class m extends n.Component{render(){const{tableRef:e,url:t,title:o,columns:n,pageSize:i,detailPanel:s,where:h,search:d,selectType:r,rowStyle:c,onAdd:u,onEdit:m,onDelete:K,onActions:b,onRowClick:v,SearchAdvanced:C,CustumToolbar:y,CustumCell:D,urlExt:S,unRefresDatatable:x,notCreateUUID:$,messageCustomDetele:I}=this.props,A=e=>n.filter((e=>g.gn(e.field)&&e.dataRef)).map((e=>({column:e,field_split:e.field.split(".")}))).forEach((t=>{delete e[t.field_split[0]]})),k=e=>{let t=n.filter((e=>e.dataCheck));for(var o=0;o<t.length;o++)if(g.gn(t[o].field)&&t[o].dataRef){if(null===e[t[o].dataRef[0]]||void 0===e[t[o].dataRef[0]]||""===e[t[o].field])return(0,T.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[o].title),!1}else if(void 0===e[t[o].field]||null===e[t[o].field]||""===e[t[o].field])return(0,T.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[o].title),!1;return!0};return(0,l.jsx)(p,{search:d,pageSize:i,title:o,columns:n,tableRef:e,SearchAdvanced:C,CustumToolbar:y,CustumCell:D,data:e=>S?(0,f.g3)((e=>`${S}${h?"?"+h:"&"}skip=${e.page*e.pageSize}&take=${e.pageSize}`)(e),"GET",null,!1).then((t=>({data:void 0===t.value?[]:t.value,page:e.page,totalCount:Number(t.count)}))):(0,f.g3)((e=>{let o=`${t}?${g.Z5(e.page,e.pageSize)}`;o+=`${g.e9(n)}${g.Is(n,r)}`,e.orderBy&&void 0!==e.orderBy&&e.orderDirection&&""!==e.orderDirection&&(o+=g.V$(e.orderBy.field,e.orderDirection));let a=g.A5(e,n);return o+=a?h?`&$filter=(${a}) and ${h}`:`&$filter=${a}`:h?"&$filter="+h:"",o})(e)).then((t=>({data:void 0===t.value?[]:t.value,page:e.page,totalCount:Number(t["odata.count"])}))),rowStyle:c,detailPanel:s,editable:(()=>{let e={};return u&&void 0===u.onClick&&!1===u.disabled&&(void 0===u.onRowAdd?e.onRowAdd=e=>new Promise(((o,i)=>{let l=g.G5(n);l.type&&"numeric"!==l.type&&($?delete e[g.UI(n)]:l.dataIdCustom||(e[g.UI(n)]=(0,a.A)())),A(e),u.defaultValues&&u.defaultValues.forEach((t=>e[t.field]=t.value)),k(e)?(0,f.g3)(`${t}`,"POST",JSON.stringify(e)).then((e=>o(e))).catch((e=>{e.json().then((e=>(0,T.AB)(e.value))),i(e)})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.addCallback&&this.props.addCallback()})):i()})).then((e=>this.props.addCallbackWithResponse&&this.props.addCallbackWithResponse(e))).catch((e=>console.log(e))):e.onRowAdd=e=>u.onRowAdd(e)),m&&void 0===m.onClick&&(m.hidden&&("function"===typeof m.hidden?e.onUpdateHidden=e=>m.hidden(e):e.onUpdateHidden=m.hidden),m.disabled&&(e.isEditable=e=>m.disabled(e)),void 0===m.onRowUpdate?e.onRowUpdate=(e,o)=>new Promise(((a,i)=>{A(e),k(e)?(0,f.g3)(g.Yv(t,n,o),"PATCH",JSON.stringify(e)).then((()=>a())).catch((e=>{e.json().then((e=>(0,T.AB)(e.value))),i(e)})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.updateCallback&&this.props.updateCallback()})):i()})):e.onRowUpdate=(e,t)=>m.onRowUpdate(e,t)),K&&void 0===K.onClick&&(K.hidden&&("function"===typeof K.hidden?e.onDeleteHidden=e=>K.hidden(e):e.onDeleteHidden=K.hidden),K.disabled&&(e.isDeletable=e=>K.disabled(e)),void 0===K.onRowDelete?e.onRowDelete=e=>new Promise(((o,a)=>(0,f.g3)(g.Yv(t,n,e),"DELETE").then((()=>{K.messageSuccess?o(null,K.messageSuccess):o("X\xf3a d\u1eef li\u1ec7u th\xe0nh c\xf4ng !")})).catch((e=>{I?(0,T.a3)(I,"Th\xf4ng b\xe1o"):(0,T.a3)("X\xf3a d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),K.messageError?a(e,K.messageError):a("X\xf3a d\u1eef li\u1ec7u th\u1ea5t b\u1ea1i !")})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.deleteCallback&&this.props.deleteCallback()})))):e.onRowDelete=e=>K.onRowDelete(e)),e})(),actions:(()=>{let e=[];return b&&b.map((t=>e.push(t))),u&&u.onClick&&(u.icon="add_box",u.tooltip="Th\xeam",u.isAdd=!0,u.isFreeAction=!0,e.push(u)),m&&m.onClick&&(m.icon="edit",m.tooltip="S\u1eeda",m.isEdit=!0,e.push(m)),K&&K.onClick&&(K.icon="delete",K.tooltip="X\xf3a",K.isDelete=!0,e.push(K)),e})(),onRowClick:void 0===v?void 0:(e,t)=>v(e,t)})}}m.defaultProps={title:"",columns:[],pageSize:10,search:!0,tableRef:n.createRef()}},15255:(e,t,o)=>{var n;o.d(t,{A:()=>c});var a=new Uint8Array(16);function i(){if(!n&&!(n="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const s=function(e){return"string"===typeof e&&l.test(e)};for(var h=[],d=0;d<256;++d)h.push((d+256).toString(16).substr(1));const r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase();if(!s(o))throw TypeError("Stringified UUID is invalid");return o};const c=function(e,t,o){var n=(e=e||{}).random||(e.rng||i)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){o=o||0;for(var a=0;a<16;++a)t[o+a]=n[a];return t}return r(n)}},32385:(e,t,o)=>{o.d(t,{A:()=>l});var n=o(9950),a=o(23931),i=o(44414);class l extends n.Component{render(){let{children:e,className:t,FilterSearchAdvanced:o,FilterNoHeader:n,NoTabs:l}=this.props,s=[];return t&&s.push(t),s.push("filter-datatable"),o&&s.push("filter-search-advanced"),n&&s.push("filter-no-header"),l&&s.push("filter-no-tabs"),(0,i.jsx)(a.A,{className:s.join(" "),md:"9",children:e})}}l.defaultProps={className:"",FilterSearchAdvanced:"",FilterNoHeader:"",NoTabs:""}},85907:(e,t,o)=>{o.d(t,{A:()=>g});var n=o(58168),a=o(98587),i=o(9950),l=o(11942),s=o.n(l),h=o(48738),d=o.n(h),r=o(44208),c=["className","cssModule","tag"],u={tag:r.Wx,className:s().string,cssModule:s().object},p=function(e){var t=e.className,o=e.cssModule,l=e.tag,s=(0,a.A)(e,c),h=(0,r.qO)(d()(t,"modal-footer"),o);return i.createElement(l,(0,n.A)({},s,{className:h}))};p.propTypes=u,p.defaultProps={tag:"div"};const g=p},99709:(e,t,o)=>{o.r(t),o.d(t,{default:()=>R});var n=o(9950),a=o(10077),i=o(70537),l=o(23931),s=o(1254),h=o(53744),d=o(58195),r=o(14113),c=o(99308),u=o(85907),p=o(18849),g=o(16272),f=o(73613),T=o(4370),m=o(67116),K=o(44414),b={KhoId:{field_name:"KhoId"},TenKho:{field_name:"TenKho",title:"T\xean kho",type:"textbox",required:!0,disabled:!0},ThuKho:{field_name:"ThuKho",title:"Th\u1ee7 kho",type:"data-select",dataSelect:{options:[],column:["MaTaiKhoan","TenHienThi"],value_field:"MaTaiKhoan",text_field:"TenHienThi"},required:!0},DiemKinhDoanhId:{field_name:"DiemKinhDoanhId",title:"\u0110i\u1ec3m kinh doanh: ",type:"data-select",dataSelect:{url:"DiemKinhDoanhs",column:["Id","Ten"],value_field:"Id",text_field:"Ten"},required:!0},isKhoTong:{title:"Lo\u1ea1i kho",field_name:"isKhoTong",type:"radio-list",data:[{value:"true",label:"Kho t\u1ed5ng"},{value:"false",label:"Kho chi nh\xe1nh"}]}};class v extends n.Component{constructor(e){super(e),this.loadData=()=>{this.props.ID?(0,T.Pq)(`DM_Kho(${this.props.ID})`,"GET",null).then((e=>{let{data:t}=this.state;t.KhoId=this.props.ID,t.TenKho=e.Ten,t.ThuKho=e.ThuKho,t.DiemKinhDoanhId=e.DiemKinhDoanh_Id,t.isKhoTong=e.IsKhoTong+"",this.setState({data:t})})):this.setState({data:{}})},this.setStateData=(e,t)=>{var{data:o}=this.state;o[e]=t,this.setState({data:o})},this.handleChange=(e,t)=>{"isKhoTong"===e?("true"===t&&this.setStateData("DiemKinhDoanhId",null),this.setStateData("isKhoTong",t)):this.setStateData(e,t)},this.state={data:{KhoId:null,TenKho:"",ThuKho:null,DiemKinhDoanhId:"",isKhoTong:"true"}},this.save=this.save.bind(this)}componentDidMount(){this.props.ID?(b.ThuKho.dataSelect.options=this.props.dataThuKho.filter((e=>0===e.DM_Kho.length||e.MaTaiKhoan===this.props.MaTaiKhoanSelect)),b.isKhoTong.disabled=!0):(b.ThuKho.dataSelect.options=this.props.dataThuKho.filter((e=>0===e.DM_Kho.length)),b.isKhoTong.disabled=!1),this.loadData()}save(){if(this.handleValidate()){let{data:e}=this.state;console.log(e);let t=e.KhoId?"QuanLyKho/CapNhatKho":"QuanLyKho/ThemKho",o=e.KhoId?"C\u1eadp nh\u1eadt kho th\xe0nh c\xf4ng!":"Th\xeam kho th\xe0nh c\xf4ng",n=e.KhoId?"PUT":"POST";(0,T.Pq)(t,n,JSON.stringify(e),!1).then((e=>(0,m.nw)(o))).then((()=>{this.reset(),this.props.onReloadTable(),this.props.onClose()})).catch((e=>(0,m.a3)("\u0110\xe3 x\u1ea3y ra l\u1ed7i")))}}reset(){this.setState({data:{KhoId:"",TenKho:"",DiemKinhDoanhId:"",isKhoTong:"true",ThuKho:""}})}handleValidate(){const e=Object.values(b).filter((e=>e.required));let{data:t}=this.state;for(let o=0;o<e.length;o++){const n=e[o];let a=t[n.field_name];return null!==a&&""!==a&&void 0!==a&&0!==a.length||((0,m.AB)('Vui l\xf2ng nh\u1eadp "'+n.title+'"'),!1)}}render(){const{data:e}=this.state,{openModal:t,ID:o,onClose:n}=this.props;let a=o?"Ch\u1ec9nh s\u1eeda kho":"Th\xeam m\u1edbi kho";return(0,K.jsxs)(d.A,{isOpen:t,className:"modal-them-sua-kho",children:[(0,K.jsx)(r.A,{children:a}),(0,K.jsxs)(c.A,{children:[(0,K.jsx)(g.A,{data:b.isKhoTong,value:e.isKhoTong||"true",onChange:this.handleChange}),(0,K.jsx)(g.A,{data:b.TenKho,value:e.TenKho,onChange:this.handleChange}),(0,K.jsx)(g.A,{data:b.ThuKho,value:e.ThuKho,onChange:this.handleChange})]}),(0,K.jsxs)(u.A,{children:[(0,K.jsxs)(p.A,{color:"success",style:{marginRight:"10px"},onClick:this.save,children:[(0,K.jsx)(f.A,{fa:"save"})," L\u01b0u"]}),(0,K.jsxs)(p.A,{color:"dark",onClick:()=>{n()},children:[(0,K.jsx)(f.A,{fa:"ban"})," B\u1ecf qua"]})]})]})}}var C=o(30616),y=o(28412),D=o(62181),S=o(32385),x=[{field:"Id",type:"numeric",dataID:!0,hidden:!0,editable:"never"},{title:"T\xean kho",field:"Ten",type:"string",searchable:!0,cellStyle:{textAlign:"left"}},{title:"Th\u1ee7 kho",field:"SYS_TaiKhoan.TenHienThi",type:"string",searchable:!0,dataRef:["ThuKho"]},{title:"Lo\u1ea1i kho",field:"IsKhoTong",type:"boolean",editable:"never",searchable:!0,cellStyle:{textAlign:"center"},render:e=>e.IsKhoTong?"Kho t\u1ed5ng":"Kho chi nh\xe1nh"}],$=[{field:"Id",type:"numeric",dataID:!0,hidden:!0,editable:"never"},{title:"T\xean kho",field:"Ten",type:"string",searchable:!0,cellStyle:{textAlign:"left"}},{title:"Th\u1ee7 kho",field:"SYS_TaiKhoan.TenHienThi",type:"string",searchable:!0,dataRef:["ThuKho"]},{title:"Lo\u1ea1i kho",field:"IsKhoTong",type:"boolean",editable:"never",searchable:!0,cellStyle:{textAlign:"center"},render:e=>e.IsKhoTong?"Kho t\u1ed5ng":"Kho chi nh\xe1nh"},{title:"\u0110i\u1ec3m kinh doanh",field:"DM_DiemKinhDoanh.Ten",type:"string",dataRef:["DiemKinhDoanh_Id"],dataCheck:!0,searchable:!0,editComponent:e=>(0,K.jsx)(i.rb,{url:"DiemKinhDoanhs",column:{field:"Id",label:"Ten",type:"int"},value:e.value,onChange:t=>t?e.onChange(t.value):e.onChange(null)}),cellStyle:{textAlign:"center"}}];const I=n.createRef(),A=()=>I.current&&I.current.onQueryChange();class k extends n.Component{constructor(e){super(e),this.handleChange=(e,t)=>{this.setState({IsKhoTong:t},(()=>A()))},this.getThuKhoTheoIDDonVi=()=>{(0,T.Pq)(`TaiKhoans?$expand=DM_Kho&$filter=IDDonVi eq '${h.lg.IDDonVi}'`,"GET",null).then((e=>this.setState({dataThuKho:e.value}))).catch((e=>(0,m.a3)("\u0110\xe3 x\u1ea3y ra l\u1ed7i!","Th\xf4ng b\xe1o")))},this.setSearchTenKho=e=>{13===e.charCode&&this.setState({searchTenKho:e.target.value},(()=>A()))},this.state={data:[],IsKhoTong:"true",openModal:!1,dataThuKho:null,MaTaiKhoanSelect:null,searchTenKho:null,diemKinhDoanhId:null}}componentDidMount(){this.getThuKhoTheoIDDonVi()}render(){const{IsKhoTong:e,openModal:t,ID:o,dataThuKho:n,searchTenKho:i,MaTaiKhoanSelect:h,diemKinhDoanhId:d}=this.state;let r=[];return"true"===e?r.push(`IsKhoTong eq ${"true"===e}`):r.push(`(IsKhoTong eq ${"true"===e} or IsKhoTong eq null)`),d&&r.push(`DiemKinhDoanh_Id eq ${d}`),i&&r.push(`(substringof('${i}', Ten) or substringof('${i}', SYS_TaiKhoan/TenHienThi))`),(0,K.jsxs)(C.A,{children:[(0,K.jsxs)(y.A,{NoTabs:!0,children:[(0,K.jsx)(l.A,{md:"12",className:"p-0 mb-2",children:(0,K.jsx)(D.A,{title:"T\xecm ki\u1ebfm",defaultValue:i,onKeyPress:e=>this.setSearchTenKho(e),placeholder:"T\xecm ki\u1ebfm theo t\xean kho, t\xean th\u1ee7 kho ..."})}),(0,K.jsx)(l.A,{md:"12",className:"p-0 mb-2",children:(0,K.jsx)(D.A,{type:"radio-list",title:"Lo\u1ea1i",data:[{label:(0,K.jsx)(s.A,{color:"primary",children:"Kho t\u1ed5ng"}),value:"true"},{label:(0,K.jsx)(s.A,{color:"info",children:"Kho chi nh\xe1nh "}),value:"false"}],value:e,onChange:(e,t)=>this.setState({IsKhoTong:t},(()=>A()))})}),"true"!==e&&(0,K.jsx)(l.A,{md:"12",className:"p-0 mb-2",children:(0,K.jsx)(D.A,{type:"dropdown-list",title:"\u0110i\u1ec3m kinh doanh",placeholder:"Ch\u1ecdn \u0111i\u1ec3m kinh doanh",url:"DiemKinhDoanhs",valueField:"Id",textField:"Ten",value:d,onChange:e=>this.setState({diemKinhDoanhId:e},(()=>A()))})})]}),(0,K.jsxs)(S.A,{NoTabs:!0,children:[(0,K.jsx)(a.A,{tableRef:I,title:"Danh s\xe1ch kho",where:r.join(" and "),url:"DM_Kho",columns:"true"===e?x:$,selectType:"withColumns",onEdit:{onClick:(e,t)=>this.setState({openModal:!0,ID:t.Id,MaTaiKhoanSelect:t.ThuKho})}}),t&&(0,K.jsx)(v,{ID:o,MaTaiKhoanSelect:h,onClose:()=>this.setState({openModal:!1}),openModal:t,onReloadTable:A,dataThuKho:n})]})]})}}class R extends n.Component{render(){return(0,K.jsx)(k,{})}}}}]);