????
Current Path : C:/inetpub/vhost/quanlycanbo.gdtvietnam.com/www/static/js/ |
Current File : C:/inetpub/vhost/quanlycanbo.gdtvietnam.com/www/static/js/139.80217aa9.chunk.js |
(this["webpackJsonpgdt-qlcb"]=this["webpackJsonpgdt-qlcb"]||[]).push([[139],{1065:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(38);function r(e,t,n){return(r="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(o.a)(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}},1070:function(e,t,n){"use strict";var o=n(10),r=n(11),i=n(17),c=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.call(this,"/online/ConfigSystem")).setPath=function(t){return e.path=t},e.update=function(t){return e.setPath("/category/ConfigSystem"),e.PutAuthenADMIN("/update",t)},e.getAll=function(){return e.setPath("/online/ConfigSystem"),e.GetAuthenPUBLIC("/listConfig").then((function(e){return{content:e}}))},e}return n}(n(70).a);t.a=new c},1583:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var o=n(1),r=(n(0),n(868)),i=n(10),c=n(34),a=n(11),u=n(17),l=n(70),d=new(function(e){Object(a.a)(n,e);var t=Object(u.a)(n);function n(){return Object(i.a)(this,n),t.call(this,"/DonViTinh")}return Object(c.a)(n,[{key:"getDataByID",value:function(e){var t="?search=uuid%20%40eq%20%28uuid%7C".concat(e,"%29&select=name%2Cuuid&page=0&size=100&count=true");return this.getAll(t)}}]),n}(l.a)),f=n(1065),s=n(38);new(function(e){Object(a.a)(n,e);var t=Object(u.a)(n);function n(){return Object(i.a)(this,n),t.call(this,"/DanhSachNganHang")}return Object(c.a)(n,[{key:"getAll",value:function(){return Object(f.a)(Object(s.a)(n.prototype),"getAll",this).call(this,"?count=true")}}]),n}(l.a)),n(1070);function h(){return Object(o.jsx)(r.a,{title:"Danh m\u1ee5c \u0111\u01a1n v\u1ecb t\xednh",columns:[{field:"uuid",dataID:!0,type:"uuid",hidden:!0},{title:"M\xe3",field:"code",type:"string",dataCheck:!0,searchable:!0,defaultSort:"asc"},{title:"T\xean \u0111\u01a1n v\u1ecb t\xednh",field:"name",type:"string",dataCheck:!0,searchable:!0},{title:"M\xf4 t\u1ea3",field:"description",type:"string",dataCheck:!0,searchable:!0}],queryRemote:function(e){return d.getAll(e)},onAdd:{onRowAdd:function(e){return d.add(e)}},onEdit:{onRowUpdate:function(e){return d.edit(e)}},onDelete:{onRowDelete:function(e){return d.delete(e)}}})}},778:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var o=n(1),r=n(0),i=n.n(r),c=n(5),a=n(6),u={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"}},l=i.a.lazy((function(){return Promise.all([n.e(0),n.e(3),n.e(4),n.e(6),n.e(87)]).then(n.bind(null,1575))})),d=i.a.lazy((function(){return Promise.all([n.e(0),n.e(4),n.e(38),n.e(120)]).then(n.bind(null,1260))})),f=i.a.lazy((function(){return n.e(142).then(n.bind(null,1246))})),s={color:"#000",padding:"4px",fontSize:"12px",fontWeight:"bold",textAlign:"center",backgroundColor:"rgb(245, 247, 255)",borderLeft:"0.5px solid rgb(224, 224, 224)"},h={even:"#FFF",odd:"rgb(247, 248, 255)"},p={fontSize:"0.778rem",borderLeft:"0.5px solid rgba(224, 224, 224, 1)"};function g(e){var t=e.addMoreRows,n=e.pageSize,r=e.search,i=e.CustumToolbar,h=e.CustumCell,g=e.SearchAdvanced,b=e.onRowClick,m=(e.dataCount,e.rowStyle),v=(e.rowsPerPage,e.page,Object(a.a)(e,["addMoreRows","pageSize","search","CustumToolbar","CustumCell","SearchAdvanced","onRowClick","dataCount","rowStyle","rowsPerPage","page"]));return Object(o.jsx)(l,Object(c.a)(Object(c.a)({},v),{},{addMoreRows:t,localization:u,options:{exportButton:!1,search:r,actionsColumnIndex:-1,pageSize:n,headerStyle:s,rowStyle:m},onRowClick:void 0===b?void 0:function(e,t){return b(e,t)},components:function(){var e={Toolbar:function(e){return Object(o.jsx)(d,Object(c.a)(Object(c.a)({},e),{},{SearchAdvanced:g}))},Cell:function(e){return Object(o.jsx)(f,Object(c.a)(Object(c.a)({},e),{},{style:p}))}};return i&&(e.Toolbar=i),h&&(e.Cell=h),e}()}))}g.defaultProps={rowStyle:function(e,t,n){return{backgroundColor:t%2===0?h.even:h.odd}},pageSize:10,search:!0};var b=function(e){return e&&e.includes(".")},m=function(e){return e.split(".").join(".")},v=function(e,t){return e?t.field:t},y=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t?"withColumns"===t?"".concat(e.reduce((function(e,t,o,r){if(t.customsRemote)return"";var i=v(n,t),c="".concat(e);return b(i)?c+="".concat(void 0===t.dataRef?"":t.dataRef[0]+",").concat(m(i)):c+="".concat(i),"".concat(c).concat(o===r.length-1?"":",")}),"")):"":"".concat(e.filter((function(e){return b(e.field)})).reduce((function(e,t){return"".concat(e,",").concat(m(v(n,t)))}),"*"))},C=function(e,t){return"string"===e||"datetime"===e||"uuid"===e?"'".concat(t,"'"):"".concat(t)},j=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return o?"string"===t?"".concat(e," @like (string|").concat(n,")"):"".concat(e," @eq (").concat(t,"|").concat(n,")"):"".concat(e," eq ").concat(C(t,n))},R=n(99);function w(e){var t=e.queryRemote,n=e.customQuery,r=e.selectType,i=e.tableRef,c=e.title,a=e.columns,u=e.pageSize,l=e.detailPanel,d=e.search,f=e.rowStyle,s=e.onRowClick,h=e.where,p=e.onRefresh,v=e.onAdd,C=e.onEdit,w=e.onDelete,O=e.onActions,T=e.SearchAdvanced,S=e.CustumToolbar,k=e.CustumCell,A=e.removeAlert,D=e.odata,P=function(e,t){return t[function(e){return e.filter((function(e){return e.dataID}))[0]}(e).field]},x=function(e){return a.filter((function(e){return b(e.field)&&e.dataRef})).map((function(e){return{column:e,field_split:e.field.split(".")}})).forEach((function(t){delete e[t.field_split[0]]}))},z=function(e){var t,n,o="?".concat(function(e,t){return"size=".concat(t,"&page=").concat(e,"&count=true")}(e.page,e.pageSize));o+="".concat(function(e,t){var n=y(e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);return n?"&select=".concat(n):""}(a,r)),e.orderBy&&void 0!==e.orderBy&&e.orderDirection&&""!==e.orderDirection&&(o+=(t=e.orderBy.field,n=e.orderDirection,"&orderby=".concat(b(t)?m(t):t," ").concat("asc"===n?"":n).trim()));var i=Array.of(h,function(e,t){if(e.filters&&e.filters.length>0){var n=e.filters.filter((function(e){return e.column.field&&e.column.type})).map((function(e){var t="".concat(b(e.column.field)?e.column.dataRef?e.column.dataRef[0]:m(e.column.field):e.column.field);return j(t,e.column.type,e.value)}));return n&&n.join(" and ")}if(e.search&&e.search.length>=1){var o=t.filter((function(e){return e.searchable&&e.field&&e.type})).map((function(t){var n="".concat(b(t.field)?m(t.field):t.field);return j(n,t.type,e.search,!0)}));return o&&o.join(" or ")}return""}(e,a)).filter((function(e){return e}));return o+=i.length>0?"&search=".concat(encodeURIComponent(i.join(" and "))):""},q=function(e){for(var t=a.filter((function(e){return e.dataCheck})),n=0;n<t.length;n++)if(b(t[n].field)&&t[n].dataRef){if(null===e[t[n].dataRef[0]]||void 0===e[t[n].dataRef[0]])return Object(R.g)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[n].title),!1}else if(void 0===e[t[n].field]||null===e[t[n].field])return Object(R.g)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[n].title),!1;return!0};return Object(o.jsx)(g,{search:d,pageSize:u,title:c,columns:a,tableRef:i,SearchAdvanced:T,CustumToolbar:S,CustumCell:k,data:function(e){return n?n(e,z(e)):t(z(e)).then((function(t){var n=D?null===t||void 0===t?void 0:t.value:(null===t||void 0===t?void 0:t.content)||[];return{data:n,page:e.page,totalCount:Number(t.totalElements)||n.length}}))},rowStyle:f,detailPanel:l,editable:function(){var e={};return v&&void 0===v.onClick&&(e.onRowAdd=function(e){return new Promise((function(t,n){x(e),v.defaultValues&&v.defaultValues.forEach((function(t){return e[t.field]=t.value})),q(e)?v.onRowAdd(e).then((function(){Object(R.f)("Th\xeam d\u1eef li\u1ec7u th\xe0nh c\xf4ng !"),t()})).catch((function(e){Object(R.e)("Th\xeam d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),n(e)})):n()}))}),C&&void 0===C.onClick&&(C.hidden&&("function"===typeof C.hidden?e.onUpdateHidden=function(e){return C.hidden(e)}:e.onUpdateHidden=C.hidden),C.disabled&&(e.isEditable=function(e){return C.disabled(e)}),e.onRowUpdate=function(e,t){return new Promise((function(n,o){x(e),q(e)?C.onRowUpdate(e,t,P(a,t)).then((function(){A||Object(R.f)("S\u1eeda d\u1eef li\u1ec7u th\xe0nh c\xf4ng !"),n()})).catch((function(e){Object(R.e)("S\u1eeda d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),o(e)})):o()}))}),w&&void 0===w.onClick&&(w.hidden&&("function"===typeof w.hidden?e.onDeleteHidden=function(e){return w.hidden(e)}:e.onDeleteHidden=w.hidden),w.disabled&&(e.isDeletable=function(e){return w.disabled(e)}),e.onRowDelete=function(e){return new Promise((function(t,n){return w.onRowDelete(P(a,e)).then((function(){Object(R.f)("X\xf3a d\u1eef li\u1ec7u th\xe0nh c\xf4ng !"),t()})).catch((function(e){Object(R.e)("X\xf3a d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),n(e)}))}))}),e}(),actions:function(){var e=[];return p?(p.icon="refresh",p.isRefresh=!0,p.tooltip="T\u1ea3i l\u1ea1i d\u1eef li\u1ec7u",p.isFreeAction=!0,e.push(p)):e.push({icon:"refresh",isRefresh:!0,tooltip:"T\u1ea3i l\u1ea1i d\u1eef li\u1ec7u",isFreeAction:!0,onClick:function(){return i.current&&i.current.onQueryChange()}}),O&&O.map((function(t){return e.push(t)})),v&&v.onClick&&(v.icon="add_box",v.tooltip="Th\xeam",v.isAdd=!0,v.isFreeAction=!0,e.push(v)),C&&C.onClick&&(C.icon="edit",C.tooltip="S\u1eeda",C.isEdit=!0,e.push(C)),w&&w.onClick&&(w.icon="delete",w.tooltip="X\xf3a",w.isDelete=!0,e.push(w)),e}(),onRowClick:s})}w.defaultProps={title:"",columns:[],pageSize:10,search:!0,selectType:"withColumns",tableRef:i.a.createRef()}},868:function(e,t,n){"use strict";n.d(t,"a",(function(){return o.a}));var o=n(778)}}]);