var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(wa,da,pa){wa instanceof String&&(wa=String(wa));for(var Ia=wa.length,Qa=0;Qa<Ia;Qa++){var pb=wa[Qa];if(da.call(pa,pb,Qa,wa))return{i:Qa,v:pb}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(wa,da,pa){if(wa==Array.prototype||wa==Object.prototype)return wa;wa[da]=pa.value;return wa};$jscomp.getGlobal=function(wa){wa=["object"==typeof globalThis&&globalThis,wa,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var da=0;da<wa.length;++da){var pa=wa[da];if(pa&&pa.Math==Math)return pa}throw Error("Cannot find global object");};
$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(wa,da){var pa=$jscomp.propertyToPolyfillSymbol[da];if(null==pa)return wa[da];pa=wa[pa];return void 0!==pa?pa:wa[da]};
$jscomp.polyfill=function(wa,da,pa,Ia){da&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(wa,da,pa,Ia):$jscomp.polyfillUnisolated(wa,da,pa,Ia))};$jscomp.polyfillUnisolated=function(wa,da,pa,Ia){pa=$jscomp.global;wa=wa.split(".");for(Ia=0;Ia<wa.length-1;Ia++){var Qa=wa[Ia];if(!(Qa in pa))return;pa=pa[Qa]}wa=wa[wa.length-1];Ia=pa[wa];da=da(Ia);da!=Ia&&null!=da&&$jscomp.defineProperty(pa,wa,{configurable:!0,writable:!0,value:da})};
$jscomp.polyfillIsolated=function(wa,da,pa,Ia){var Qa=wa.split(".");wa=1===Qa.length;Ia=Qa[0];Ia=!wa&&Ia in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var pb=0;pb<Qa.length-1;pb++){var La=Qa[pb];if(!(La in Ia))return;Ia=Ia[La]}Qa=Qa[Qa.length-1];pa=$jscomp.IS_SYMBOL_NATIVE&&"es6"===pa?Ia[Qa]:null;da=da(pa);null!=da&&(wa?$jscomp.defineProperty($jscomp.polyfills,Qa,{configurable:!0,writable:!0,value:da}):da!==pa&&(void 0===$jscomp.propertyToPolyfillSymbol[Qa]&&(pa=1E9*Math.random()>>>0,
$jscomp.propertyToPolyfillSymbol[Qa]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(Qa):$jscomp.POLYFILL_PREFIX+pa+"$"+Qa),$jscomp.defineProperty(Ia,$jscomp.propertyToPolyfillSymbol[Qa],{configurable:!0,writable:!0,value:da})))};$jscomp.polyfill("Array.prototype.find",function(wa){return wa?wa:function(da,pa){return $jscomp.findInternal(this,da,pa).v}},"es6","es3");
(function(){function wa(){Qa.call(this);var na;this.getRemoteUrl=function(){return na};this.setRemoteUrl=function(Da){na=Da}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.manage&&(com.kingdee.bos.extreport.manage={});"undefined"==typeof com.kingdee.bos.extreport.manage.common&&(com.kingdee.bos.extreport.manage.common=
{});var da=com.kingdee.bos.extreport.manage.common;da.Facade=function(na,Da,O,Z){pa.call(this,na,Da,O,Z);var p=this.protectedMethod;this.getExtReportGroupList=function(){p.remote("loadExtReportGroups",{})};this.checkPresetManagePerm=function(){p.remote("checkPresetManagePerm",{})};this.saveExtReportGroup=function(k){k={model:JSON.stringify(k.toJsonObject())};p.remote("saveOrUpdateExtReportGroup",k)};this.editExtReportGroup=function(k){k={model:JSON.stringify(k.toJsonObject())};p.remote("saveOrUpdateExtReportGroup",
k)};this.deleteExtReportGroup=function(k){p.remote("deleteExtReportGroup",{extreportGroupID:k})};this.existExtReport=function(k,R){p.remote("existExtReport",{extReportType:k,extReportID:R})};this.loadExtReportByGroupIDS=function(k){k={arrExtReportGroupID:JSON.stringify(k)};p.remote("loadExtReportByGroupIDS",k)};this.saveOrUpdateExtReport=function(k){k={model:JSON.stringify(k.toJsonObject())};p.remote("saveOrUpdateExtReport",k)};this.moveExtReport=function(k,R,E,Aa){k={extreportGroupID:k,extReportList:JSON.stringify({extReportList:R}),
bMultiChoiceMove:E,bFirstTimeMove:Aa};p.remote("moveExtReport",k)};this.copyExtReport=function(k,R,E,Aa,ya,C){p.remote("copyExtReport",{extReportID:k,extreportGroupID:R,copyName:E,extRptType:Aa,dataSetType:ya,CopyExtReport:C})};this.deleteExtReport=function(k,R,E,Aa){p.remote("deleteExtReport",{extreportID:k,extreportGroupID:R,extRptType:E,isDeletePublish:Aa})};this.batchDeleteExtReport=function(k,R){k={extReportList:JSON.stringify({extReportList:k}),isDeletePublish:R};p.remote("batchDeleteExtReport",
k)};this.loadSortedExtReportByGroupId=function(k,R,E,Aa){p.remote("loadSortedExtReportByGroupId",{extreportGroupID:k,sSortField:R,sSortOrder:E,sTimeStamp:Aa})};this.loadExceptionLog=function(k){p.remote("loadExceptionLog",{id:k})};this.getAllExtReportForExport=function(){p.remote("getAllExtReportForExport",{})};this.confirmExportExtReport=function(k,R){k={extReportList:JSON.stringify({exportExtReportList:k}),withPublish:R};p.remote("confirmExportExtReport",k)};this.getExportedData=function(k){var R=
La.formatDate("yyyyMMdd_HHmmss");pb.downloadFile("Qing-"+R+".qing-rpt",k)};this.getSelectableForImportExtReport=function(k,R,E){p.remote("getSelectableForImportExtReport",{fileName:k,fileOrignalName:R,sCurrentExtReportGroupFullPath:E})};this.importSelectedExtReport=function(k,R,E,Aa,ya,C){k={sCurrentExtReportGroupFullPath:k,fileName:R,fileOrignalName:E,extReportList:JSON.stringify({exportExtReportList:Aa}),sourceStrategy:ya,firstTimeImport:C};p.remote("importSelectedExtReport",k)};this.saveOrderExtReportGroup=
function(k){k={extReportGroupList:JSON.stringify({extReportGroupList:k})};p.remote("saveOrderExtReportGroup",k)}};da.RemoteImpl=wa;var pa,Ia,Qa,pb,La;(function(){var na=com.kingdee.bos.qing.framework.common;pa=na.AbstractFacade;Ia=na.AbstractIcons;Qa=na.AbstractRemoteCall;pb=na.RemoteFramework;na=com.kingdee.bos.qing.common;La=na.Util})();da.Icons=new function(){Ia.call(this);var na=this.protectedMethod;this.protectedInit=function(Z,p){Z=com.kingdee.bos.extreport.manage.ComboIcon;if(!Z)throw Error("com.kingdee.bos.extreport.manage.ComboIcon not found.");
Z.define(p,"extreport");p.setGap(1);p.setStartPosition(1,1);p.setIconSize(16,16);Da(0,0,"btn-add-classification");Da(0,1,"btn-import");Da(0,2,"btn-export");Da(0,3,"btn-edit");Da(0,4,"btn-delete");Da(0,5,"btn-extreport");Da(0,6,"btn-preview");Da(0,7,"btn-publishto");Da(0,8,"btn-dataset");Da(0,9,"btn-moving");Da(0,10,"btn-copy");Da(0,11,"btn-program");Da(0,14,"btn-dataset-gui");p.setStartPosition(1,120);p.setIconSize(36,36);O(0,0,"icon-card-dataset");O(0,1,"icon-card-extreport");O(0,2,"icon-preset-small");
O(0,3,"icon-card-programablecard");p.setStartPosition(1,69);p.setIconSize(50,50);O(0,0,"icon-addcard");O(0,1,"icon-preset-big");p.setStartPosition(207,78);p.setIconSize(65,78);O(0,0,"icon-question");p.setGap(0);p.setStartPosition(0,0);Z.define(p,"icon_search");p.setIconSize(17,17);O(0,0,"icon_search");Z.define(p,"icon_search_hover");p.setIconSize(17,17);O(0,0,"icon_search_hover");Z.define(p,"btn_orderup");p.setIconSize(17,17);O(0,0,"btn_orderup");Z.define(p,"btn_orderup_hover");p.setIconSize(17,17);
O(0,0,"btn_orderup_hover");Z.define(p,"btn-add-classification");p.setIconSize(17,17);O(0,0,"btn-add-classification");Z.define(p,"btn-add-classification_hover");p.setIconSize(17,17);O(0,0,"btn-add-classification_hover");Z.define(p,"no-data");O(0,0,"no-data");Z.define(p,"group-extreport-no-data");p.setStartPosition(0,0);p.setGap(0);p.setIconSize(264,191);O(0,0,"group-extreport-no-data");Z.define(p,"extreport-icons");p.setStartPosition(0,0);p.setGap(1);p.setIconSize(16,16);O(6,0,"menu");O(7,0,"menu_hover");
O(8,14,"icon-order-up");O(9,14,"icon-order-up_hover");Z.define(p,"search_category");p.setIconSize(16,16);O(0,0,"search_category");Z.define(p,"search_category_hover");p.setIconSize(16,16);O(0,0,"search_category_hover");Z.define(p,"all_expand");p.setIconSize(16,16);O(0,0,"all_expand");Z.define(p,"all_expand_hover");p.setIconSize(16,16);O(0,0,"all_expand_hover");Z.define(p,"all_collapse");p.setIconSize(16,16);O(0,0,"all_collapse");Z.define(p,"all_collapse_hover");p.setIconSize(16,16);O(0,0,"all_collapse_hover");
Z.define(p,"extreport_search");p.setIconSize(16,16);p.setGap(1);p.setStartPosition(1,1);O(0,2,"arrow-down");O(0,3,"arrow-up")};var Da=function(Z,p,k){O(Z,p,k+"_hover");O(Z+1,p,k)},O=function(Z,p,k){na.registIcon(Z,p,k)}};da.Integration=new function(){var na,Da,O,Z,p,k,R=new wa,E,Aa,ya,C,za;this.setFunPublishContentEditEntrance=function(v){Aa=v};this.getFunPublishContentEditEntrance=function(){return Aa};this.setFunPublishContext=function(v){E=v};this.getFunPublishContext=function(){return E};this.setParamPathPrefix=
function(v){p=v};this.getParamPathPrefix=function(){return p};this.setFunPublishRemoteImpl=function(v){k=v};this.getFunPublishRemoteImpl=function(){return k};this.getRemoteImpl=function(){return R};this.setRemoteUrl=function(v){R.setRemoteUrl(v)};this.getExtReportDesignerEntrance=function(){return na};this.setExtReportDesignerEntrance=function(v){na=v};this.getExtReportPreviewEntrance=function(){return Da};this.setExtReportPreviewEntrance=function(v){Da=v};this.getDataSetDesignerEntrance=function(){return O};
this.setDataSetDesignerEntrance=function(v){O=v};this.getDataSetPreviewEntrance=function(){return Z};this.setDataSetPreviewEntrance=function(v){Z=v};this.getMessageRemoteUrl=function(){return ya};this.setMessageRemoteUrl=function(v){ya=v};this.setImportJSCodeForManager=function(v){C=v};this.getImportJSCodeForManager=function(){return C};this.getAppId=function(){return za};this.setAppId=function(v){za=v}};var Wa=new function(){var na;this.hookCollector=function(Da){na=Da};this.occur=function(Da,O){try{na&&
na(Da,O)}catch(Z){window.console&&console.warn(Z)}};this.getPublishTargetName=function(Da){if(0==Da)return"Appmenu";if(1==Da)return"Center"}};Wa.EXT_CREATE_EXTREPORT_TYPE="ext-create-extreport-type";Wa.EXT_EXTREPORT_ENTRANCE_TYPE="ext-extreport-entrance-type";Wa.PUBLISH_TO_TYPE="publish-to-type";Wa.SAVE_SNAP_TO_TYPE="save-snap-to-type";da.UserOperationReporter=Wa})();(function(){function wa(){var O=this,Z,p,k,R;this.setGroupName=function(E){R=E};this.getGroupName=function(){return R};this.setPropertyName=function(E){p=E};this.getPropertyName=function(){return p};this.setDescName=function(E){Z=E};this.getDescName=function(){return Z};this.setUserObject=function(E){k=E};this.getUserObject=function(){return k};this.fromJsonObject=function(E){O.setGroupName=E.groupName;O.setPropertyName=E.propertyName;O.setDescName=E.descName};this.toJsonObject=function(){var E={};
E.groupName=R;E.propertyName=p;E.descName=Z;return E}}function da(){var O=this,Z=[],p,k,R,E,Aa=da.SORT_TYPE_DESC;this.sort=function(){E&&E(R,Aa)};this.setFunSortModel=function(za){E=za};this.setSortTitle=function(za){p=za};this.setArrSortField=function(za){Z=za};this.getArrSortField=function(){return Z};this.getSortMenuModel=function(){if(!k&&Z&&0!=Z.length){k=new La;var za=p?p:na.get("sort","\u6392\u5e8f");k.setText(za);k.setGroupName(za);for(var v in Z){za=Z[v];var Ra=!1;0==v&&(Ra=!0,R=za);za=ya(za,
Ra);k.addItemModel(za)}k.addSeperator();v=new wa;v.setDescName(na.get("sortDESC","\u964d\u5e8f"));v.setGroupName("SortType");v.setPropertyName(da.SORT_TYPE_DESC);v=ya(v,!0);k.addItemModel(v);v=new wa;v.setDescName(na.get("sortASC","\u5347\u5e8f"));v.setGroupName("SortType");v.setPropertyName(da.SORT_TYPE_ASC);v=ya(v,!1);k.addItemModel(v)}return k};var ya=function(za,v){v=pb.createRadio(za.getDescName(),za.getPropertyName(),v,C);v.setUserObject(za);v.setGroupName(za.getGroupName());return v},C=function(za){if(za=
za.getUserObject()){var v=za.getPropertyName();v==da.SORT_TYPE_DESC||v==da.SORT_TYPE_ASC?Aa=v:R=za;O.sort()}}}function pa(){}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.manage&&(com.kingdee.bos.extreport.manage={});"undefined"==typeof com.kingdee.bos.extreport.manage.common&&(com.kingdee.bos.extreport.manage.common=
{});"undefined"==typeof com.kingdee.bos.extreport.manage.common.ui&&(com.kingdee.bos.extreport.manage.common.ui={});var Ia=com.kingdee.bos.extreport.manage.common.ui;Ia.StringUtil=pa;Ia.BlinkHelper=function(){var O=350,Z=250,p=6,k=!1,R,E;this.setDuration=function(Aa,ya){O=Aa;Z=ya};this.setTimes=function(Aa,ya){p=2*Aa+(ya?1:0);k=ya};this.setAction=function(Aa){R=Aa};this.blink=function(Aa,ya,C){if(0>=p)throw Error("Illegal usage");clearTimeout(E);var za=function(){if(0==p)R&&R();else{if(p%2==(k?0:
1)){Aa.addClass(ya);var v=O}else Aa.removeClass(ya),Aa.addClass(C),v=Z;E=setTimeout(za,v);p--}};za()}};Ia.SearchResultPanel=function(){var O=this,Z,p,k=[],R,E,Aa=0,ya,C,za;this.getJqUi=function(){Z||v();return Z};this.refresh=function(){var Ea=E.find(".lists-dir-rptlist");Ea.remove();Ea.css("top","40px");R.text(na.get("searchInfoTotalRecords","\u5171\u627e\u5230 #1 \u4e2a\u7ed3\u679c\uff0c\u6309\u4e00\u7ea7\u76ee\u5f55\u540d\u79f0\u5206\u7ec4\u5c55\u793a").replace("#1",Aa));if(k||0!==k.length)for(var Ma=
0;Ma<k.length;Ma++){var h=k[Ma],F=$("<div>");F.addClass("lists-dir-rptlist");F.css("width","298px");F.appendTo(E);Ra(h,F);var y=h;h=$("<div>");h.addClass("extreport-search-lists-dir-rptlist");h.css("height",90*y.length-3*(y.length-1));var A=y;y=new Qa;y.scrollSelectedToVisible();y.setBorderVisible(!1);y.setCustomItemPainter(za?za:gb);y.addSelectedChangedListener(wb);y.setUserObject(A);y.setItemModels(A);A=y.getJqUi();h.data("oList",y);A.appendTo(h);h.appendTo(F)}Ma=$(document.createDocumentFragment());
F=za?za:gb;for(h=0;h<k.length;h++){y=k[h];for(A=0;A<y.length;A++){var K=$("<div>");K.addClass("sa-ctrl-list-item");K.addClass("sa-ctrl-list-item_enabled");K.addClass("sa-ctrl-list-item-defaultlayout");K.css("left","0px");var l=y[A];K.data("model",l);F(K,l);Ma.append(K)}Ea.append(Ma)}0==k.length&&(Ma=Ea.append,F=$("<div>"),F.addClass("theme-search-no-result"),h=$("<div>"),Da.background(h,"no-data"),h.css("transform","scaleX(0.85) scaleY(0.85)"),Wa.layoutCtrl(h,null,null,280,230),y=$("<div>"),y.text(na.get("nodata",
"\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")),Wa.layoutCtrl(y,"19%","78%",null,null),h.appendTo(F),y.appendTo(F),Wa.layoutCtrl(F,"14%","27%",280,270),Ma.call(Ea,F))};var v=function(){Z=$("<div>");Z.addClass("search-result-lists");Z.css({"float":"right",right:"0px",height:"97%",width:"300px",position:"absolute",top:"46px",background:"white","z-index":"99999",border:"1px solid #dbdbdb"});R||(R=$("<div>"),R.addClass("theme-search-total-records"),R.text(na.get("searchInfoTotalRecords",
"\u5171\u627e\u5230 #1 \u4e2a\u7ed3\u679c\uff0c\u6309\u4e00\u7ea7\u76ee\u5f55\u540d\u79f0\u5206\u7ec4\u5c55\u793a").replace("#1",Aa)),R.css({"margin-top":"16px","margin-left":"10px",height:"30px",width:"280px"}),Z.append(R));var Ea=$("<div>");Ea.addClass("search-result-close");Ea.css({bottom:"20px",width:"100px",height:"28px",position:"absolute",left:"50%","margin-left":"-50px","font-size":"14px",color:"white","text-align":"center","line-height":"20px","border-radius":"2px","margin-bottom":"10px",
cursor:"pointer"});var Ma=$("<div>");Ma.text(na.get("closePanel","\u5173\u95ed"));Ma.css("margin-top","3px");Ma.appendTo(Ea);Ea.on("click",function(){C&&C()});Z.append(Ea);E=$("<div>");E.addClass("extreport-category-lists-dir");E.css({"float":"right",right:"0px",height:"calc(100% - 120px)",width:"300px",position:"absolute",top:"45px",background:"white","z-index":"99999","overflow-x":"hidden","overflow-y":"auto"});Z.append(E)},Ra=function(Ea,Ma){var h=$("<div>");h.addClass("extreport-search-lists-dir");
h.addClass("extreport-search-lists-dir-head");h.css("cursor","pointer");h.on("click",function(){var K=h.next();"block"==$(K).css("display")?(Da.background(A,"arrow-down"),$(K).hide()):(Da.background(A,"arrow-up"),$(K).show())});var F=$("<div>"),y=Ea[0].getGroupName();F.text(y.split(">")[0]);F.addClass("extreport-search-lists-dir-text");F.css("margin-right","74px");F.css("color","#666666");h.append(F);F=$("<div>");Ea=Ea.length;F.addClass("extreport-search-lists-dir-totalcount-text");F.text(na.get("searchInfoGroupCount",
"#1 \u4e2a\u7ed3\u679c").replace("#1",Ea));F.css("color","#666666");h.append(F);var A=$("<div>");A.addClass("select-tree-menu-head-icon");A.css("position","absolute");Da.background(A,"arrow-up");h.append(A);h.appendTo(Ma)},wb=function(Ea,Ma,h){h&&0<h.length&&(Ea=h[0],ya&&ya(Ea))},gb=function(Ea,Ma){Ea.addClass("search-result-item");Ea.css({width:"290px",height:"68px","border-bottom":"1px solid #E2E7EF",left:"6px",top:"6px"});var h=$("<div>");h.addClass("search-result-item-name");h.css({"font-size":"14px",
color:"black",width:"160px",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis","margin-left":"23px"});h.attr("title",Ma.getName());var F=$("<div>");F.text(Ma.getGroupName());F.addClass("search-result-item-group-name");F.css({width:"100px",position:"absolute",right:"0px",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",top:"0px",padding:"0px, 10px, 0px, 10px"});F.attr("title",Ma.getGroupName());var y=$("<div>"),A=Ma.getDesc();A&&45<A.length&&(A=A.substring(0,45)+
"...");y.addClass("search-result-item-desc");y.css({width:"280px",position:"absolute","white-space":"normal",top:"22px",height:"40px","word-wrap":"break-word"});y.attr("title",Ma.getDesc());Ea.append(h);Ea.append(F);Ea.append(y);p&&(O.doHighLightText(h,Ma.getName(),p),O.doHighLightText(y,A,p));Ea.on("click",function(K){O.clearSelected()})};this.doHighLightText=function(Ea,Ma,h){if(Ea&&Ma&&h){h=h.toUpperCase();var F=Ma.toUpperCase(),y=F.split(h),A=h.length,K;for(K in y){var l=F.indexOf(y[K]),m=Ma.substr(0,
y[K].length);l+=y[K].length;var q=F.length-l;F=F.substr(l,q);Ma=Ma.substr(l,q);l=$("<span>");l.text(m);l.appendTo(Ea);K!=y.length-1&&1<y.length&&(l=F.indexOf(h),m=Ma.substr(l,A),l+=A,q=F.length-l,F=F.substr(l,q),Ma=Ma.substr(l,q),l=$("<span>"),l.text(m),l.css("color","red"),l.clone().appendTo(Ea))}}};this.setFunCloseSearchResultPanel=function(Ea){C=Ea};this.setFunCustomPainter=function(Ea){za=Ea};this.setSearchText=function(Ea){p=Ea};this.setFunItemSelectedListener=function(Ea){ya=Ea};this.setArrSearchResultModel=
function(Ea){k=Ea};this.setTotalRecords=function(Ea){Aa=Ea};this.clearSelected=function(){var Ea=$(".extreport-category-lists-dir").find(".extreport-search-lists-dir-rptlist");if(Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)$(Ea[Ma]).data("oList").setSelecteds([])}};Ia.DefaultSearchResultModel=function(){var O,Z,p,k,R,E;this.setType=function(Aa){E=Aa};this.getType=function(){return E};this.setID=function(Aa){O=Aa};this.getID=function(){return O};this.setName=function(Aa){Z=Aa};this.getName=function(){return Z};
this.setDesc=function(Aa){p=Aa};this.getDesc=function(){return p};this.setGroupName=function(Aa){R=Aa};this.getGroupName=function(){return R};this.setGroupID=function(Aa){k=Aa};this.getGroupID=function(){return k}};Ia.SortWidget=da;Ia.SortField=wa;oPackage=com.kingdee.bos.qing.ui.component;var Qa=oPackage.List;var pb=oPackage.Menu;var La=oPackage.MenuModel;oPackage=com.kingdee.bos.qing.common;var Wa=oPackage.DomUtil;oPackage=com.kingdee.bos.qing.framework.common;var na=oPackage.MultilanguageManager.createPackageAccessor(Ia);
oPackage=com.kingdee.bos.extreport.manage.common;var Da=oPackage.Icons;da.SORT_TYPE_DESC=1;da.SORT_TYPE_ASC=2;pa.isValidString=function(O){return/^([\u4E00-\u9FA5a-zA-Z_])[\u4E00-\u9FA5a-zA-Z0-9_]{0,}$/.test(O)};pa.isKeywords=function(O){return/\b(null|true|false)\b/i.test(O)};pa.cutExceedCharacters=function(O,Z){var p=0,k=0;if(O.replace(/[^\x00-\xff]/g,"**").length>Z)for(var R=0;R<O.length;R++)if(p<Z)if(/^[\u0000-\u00ff]$/.test(O.charAt(R)))if(p+1.2<Z)p+=1.2,k++;else break;else if(p+1.8<Z)p+=1.8,
k++;else break;return 0==k?O:O.substring(0,k)+"..."}})();(function(){function wa(){var La=this,Wa,na,Da,O=[],Z,p,k=[];this.setUserObject=function(R){Z=R};this.getUserObject=function(){return Z};this.setParent=function(R){Wa=R};this.getParent=function(){return Wa};this.setChildren=function(R){if(!R)throw Error("Parameter 'arrChildren' must not be undefined.");O=R};this.getChildren=function(){return O};this.addChild=function(R){O||(O=[]);O.push(R)};this.setLevel=function(R){na=R};this.getLevel=function(){return na};this.setExpanded=function(R){Da=R};this.isExpanded=
function(){return Da};this.setName=function(R){p=R};this.getName=function(){return p};this.setTreeNodeList=function(R){k=R};this.getTreeNodeList=function(){return k};this.addTreeNode=function(R){k||(k=[]);k.push(R)};this.fromJsonObject=function(R){if(R=R.children)for(var E=0;E<R.length;E++){var Aa=R[E],ya=new wa;ya.setLevel(La.getLevel()+1);var C=new da;C.fromJsonObject(Aa);ya.fromJsonObject(Aa);ya.setExpanded(!1);ya.setParent(this);ya.setUserObject(C);ya.setName(C.getExtReportGroupName());O.push(ya)}}}
function da(){var La=this,Wa,na,Da,O,Z=!1,p;this.setOrderID=function(k){Da=k};this.getOrderID=function(){return Da};this.setIsPreset=function(k){O=k};this.isPreset=function(){return O};this.setExtReportGroupID=function(k){Wa=k};this.getExtReportGroupID=function(){return Wa};this.setExtReportGroupName=function(k){na=k};this.getExtReportGroupName=function(){return na};this.setHasData=function(k){Z=k};this.hasData=function(){return Z};this.setParentID=function(k){p=k};this.getParentID=function(){return p};
this.fromJsonObject=function(k){La.setExtReportGroupID(k.extreportGroupID);La.setExtReportGroupName(k.extreportGroupName);La.setIsPreset(k.isPreset);La.setOrderID(k.orderID);La.setParentID(k.parentID)};this.toJsonObject=function(){var k={};k.extreportGroupID=Wa;k.extreportGroupName=na;k.isPreset=O;k.orderID=Da;k.parentID=p;return k}}function pa(){var La=this,Wa,na,Da,O,Z,p,k,R,E,Aa,ya;this.copy=function(){var C=new pa;C.setExtReportID(Wa);C.setExtReportGroupID(na);C.setExtReportName(Da);C.setExtRptType(k);
C.setDataSetType(R);C.setDescription(O);C.setCreateTime(Z);C.setModifyTime(p);C.setTemplateType(E);return C};this.equal=function(C){return La.getExtReportID()===C.getExtReportID()&&La.getExtReportGroupID()===C.getExtReportGroupID()};this.setDataSetType=function(C){R=C};this.getDataSetType=function(){return R};this.setTemplateType=function(C){E=C};this.getTemplateType=function(){return E};this.setModifyTime=function(C){p=C};this.getModifyTime=function(){return p};this.setCreateTime=function(C){Z=C};
this.getCreateTime=function(){return Z};this.setExtRptType=function(C){k=C};this.getExtRptType=function(){return k};this.setExtReportID=function(C){Wa=C};this.getExtReportID=function(){return Wa};this.setExtReportGroupID=function(C){na=C};this.getExtReportGroupID=function(){return na};this.setExtReportName=function(C){Da=C};this.getExtReportName=function(){return Da};this.setDescription=function(C){O=C};this.getDescription=function(){return O};this.setBeforeMovedExtReportGroupId=function(C){Aa=C};
this.getBeforeMovedExtReportGroupId=function(){return Aa};this.setIsPreset=function(C){ya=C};this.isPreset=function(){return ya};this.fromJsonObject=function(C){La.setExtReportID(C.extReportID);La.setExtReportGroupID(C.extReportGroupID);La.setExtReportName(C.extReportName);La.setExtRptType(C.extRptType);La.setDataSetType(C.dataSetType);La.setDescription(C.description);La.setCreateTime(C.createTime);La.setModifyTime(C.modifyTime);La.setTemplateType(C.templateType);La.setIsPreset(C.isPreset)};this.toJsonObject=
function(){var C={};C.extReportID=Wa;C.extReportGroupID=na;C.extReportName=Da;C.extRptType=k;C.dataSetType=R;C.description=O;C.createTime=Z;C.modifyTime=p;C.templateType=E;C.isPreset=ya;return C};this.getDisplayTypeName=function(){if(k==pa.TYPE_EXTRPT)return pb.get("commonReport","\u62a5\u8868");if(k==pa.TYPE_DATASET){a:{var C=R;var za=Ia.AllDataSetType,v;for(v in za){var Ra=za[v];if(C==Ra.getTypeID()){C=pb.get(Ra.getI18nKey(),Ra.getDefaultDesc());break a}}C=void 0}return C}}}function Ia(La,Wa,na){this.getTypeID=
function(){return La};this.getI18nKey=function(){return Wa};this.getDefaultDesc=function(){return na}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.manage&&(com.kingdee.bos.extreport.manage={});"undefined"==typeof com.kingdee.bos.extreport.manage.model&&(com.kingdee.bos.extreport.manage.model=
{});var Qa=com.kingdee.bos.extreport.manage.model;Qa.ExtReportGroupModel=da;Qa.ExtReportModel=pa;Qa.ExtReportType=Ia;Qa.TreeNode=wa;var pb=com.kingdee.bos.qing.framework.common.MultilanguageManager.createPackageAccessor(Qa);pa.TYPE_EXTRPT="0";pa.TYPE_DATASET="1";pa.DATASET_TYPE_SQL_DATASET="1";pa.DATASET_TYPE_PROCEDURE_DATASET="2";pa.DATASET_TYPE_OQL_DATASET="9";pa.createInstance=function(La){if(La){var Wa=new pa;Wa.fromJsonObject(La);return Wa}};pa.pushIfAbsent=function(La,Wa){if(Wa){for(var na=
!0,Da=0;Da<Wa.length;Da++)if(Wa[Da].equal(La)){na=!1;break}na&&Wa.push(La)}};Ia.AllDataSetType=[new Ia(pa.DATASET_TYPE_SQL_DATASET,"addSqlDataSet","SQL\u6570\u636e\u96c6"),new Ia(pa.DATASET_TYPE_OQL_DATASET,"oqlDataSet","\u5b9e\u4f53\u67e5\u8be2\u6570\u636e\u96c6")];Ia.AllFilterType=[new Ia("ALL_TYPE","allType","\u5168\u90e8\u7c7b\u578b"),new Ia("EXTREPORT","commonReport","\u62a5\u8868"),new Ia("SQL_DATASET","sqlDataSet","\u6570\u636e\u96c6")]})();(function(){function wa(){function h(M){KTDefaultTreeHandlerRender.call(this,M);var T=this;this.create=function(ia,ha,G,qa,Ka,g,aa){var ca=20*ia.getLevel()+15;var ma=ca+17;var ra=null;if(T.protectedMethod.isTreeNodeHasChildren(ia,ha,G)||ia.isHaveHandlerAlways())ra=T.protectedMethod.createAbsoluteHtmlElement("div",ca,Ka,17,aa),ra.style.cursor="pointer",ha=$(ra),ha.addClass("tree-handler-icon"),G=$("<div>"),G.addClass("tree-handler-triangle-icon"),ha.append(G),ia.isExpanded()?(G.css("top","8px"),G.addClass("lower-triangle"),
ha.css("left",20*ia.getLevel()+22+"px"),G.removeClass("right-triangle")):(G.css("top","5px"),G.addClass("right-triangle"),ha.css("left",20*ia.getLevel()+15+"px"),G.removeClass("lower-triangle"));ha=[ra,ma,Ka,null];ia=ha[0];ma=ha[1];ra=ha[2];ha=ha[3];qa=T.protectedMethod.createAbsoluteHtmlElement("span",ma,ra,qa+g-ma,Ka+aa-ra);return[ia,qa,ha]}}function F(M){KTDefaultCellRender.call(this,M);var T=this;this.paintCellUI=function(ia,ha){var G=T.getCell().getValue(),qa=G.getId(),Ka=G.getName(),g=$("<div>");
g.addClass("extreport-export-area-list-item");g.attr("table-name",qa);g.attr("title",Ka);var aa=new k,ca=aa.getJqUi();ca.attr("table-name-checkbox",qa);ca.addClass("extreport-export-area-list-item-checkbox");ca.data("object",G);ca.data("model",aa);aa.setChecked(G.isChecked());aa.addCheckedListener(jb);qa=$("<div>");qa.addClass("extreport-export-area-list-item-text");g.append(ca);g.append(qa);if("0"==G.getSubNodeLevel())qa.text(Ka);else if(G instanceof La)qa.text(Ka);else{qa.css("left","66px");Ka=
G.getName();if(Sa&&Ka){ca=Sa.toUpperCase();aa=Ka.toUpperCase();var ma=aa.split(ca),ra=ca.length;for(Fa in ma){var H=aa.indexOf(ma[Fa]),U=Ka.substr(oa,ma[Fa].length);H+=ma[Fa].length;var Ga=aa.length-H;aa=aa.substr(H,Ga);Ka=Ka.substr(H,Ga);H=$("<span>");H.text(U);H.appendTo(qa);if(Fa!=ma.length-1&&1<ma.length){var oa=aa.indexOf(ca);U=Ka.substr(oa,ra);H=oa+ra;Ga=aa.length-H;aa=aa.substr(H,Ga);Ka=Ka.substr(H,Ga);H=$("<span>");H.text(U);H.css("color","red");H.clone().appendTo(qa)}}}else qa.text(Ka);qa.addClass("extreport-export-theme-name-label");
var Fa=$("<span>");za.layoutCtrl(Fa,45,3,16,16);oa="btn-dataset";G.getExtRptType()==gb.TYPE_EXTRPT&&(oa="btn-extreport");Z.background(Fa,oa);g.append(Fa)}ha?(ia=$(ha),ia.css("overflow","visible"),g.appendTo(ia)):(ia=$(ia),g.appendTo(ia));com.kingdee.bos.qing.common.DomUtil.layoutCtrlWithLRTB(g,0,0,null,0,0,null)}}var y=this,A,K={},l=[],m=[],q=[],u,W,ea=!1,S,Sa,xa,fa,e,ua,rb;this.setShowOnlyChecked=function(M){ea=M};this.setShowAllChecked=function(M){S=M;M=M.isChecked();if(0<q.length)for(var T=0;T<
q.length;T++)q[T].isPreset()||q[T].check(M,Ya,[],cb);eb()};this.createJqUi=function(M){q=M.getChildren();u=[];Ha(u,M);for(M=0;M<l.length;M++){var T=l[M];if(T.getExtRptType()===gb.TYPE_EXTRPT){var ia=T,ha=ia.getRelativeData();if(ha&&0!=ha.length&&ha&&0<ha.length){for(var G=[],qa=Y(l,m),Ka=0;Ka<ha.length;Ka++)for(var g=ha[Ka],aa=0;aa<qa.length;aa++){var ca=qa[aa];g===ca.getId()&&(G.push(ca),ca.getRelativeDataByExt().push(ia))}ia.setRelativeData(G)}ia=T;if((ha=ia.getRelativeExt())&&0!=ha.length&&ha&&
0<ha.length){G=[];qa=Y(l,m);for(Ka=0;Ka<ha.length;Ka++)for(g=ha[Ka],aa=0;aa<qa.length;aa++)ca=qa[aa],g===ca.getId()&&(G.push(ca),ca.getRelativeExtByExt().push(ia));ia.setRelativeExt(G)}}if(T.getExtRptType()===gb.TYPE_DATASET&&(ia=T.getRelativeDataSet())&&0!=ia.length&&ia&&0<ia.length){ha=[];G=Y(l,m);for(qa=0;qa<ia.length;qa++)for(Ka=ia[qa],g=0;g<G.length;g++)aa=G[g],Ka===aa.getId()&&(ha.push(aa),aa.getRelativeByDataSet().push(T));T.setRelativeDataSet(ha)}}A=$("<div>");A.addClass("extreport-export-area");
A.addClass("extreport-export-tree-selection-area");xa=$("<div>");xa.addClass("extreport-export-tree-selection-area-checked-prompt");xa.css("color","#666");za.layoutCtrlWithLRTB(xa,100,null,200,0,null,23);xa.prependTo(A);rb=db();A.append(rb);Ua(u,ua);ua.updateUI();zb();return A};this.searchKey=function(M){var T;Sa=M;for(T=0;T<l.length;T++){var ia=l[T];var ha=ia.isChecked();if(M){var G=-1<ia.getName().toUpperCase().indexOf(Sa.toUpperCase());ha=ea?G&&ha:G}else ha=ea?ia.isChecked():!0;ia.setVisible(ha)}for(M=
0;M<q.length;M++)T=q[M],ia=T.getChildren(),Ba(ia,T);hb();y.updateUi()};this.updateUi=function(){for(var M=!1,T=0;T<l.length;T++)M=M||l[T].isVisible();M?(fa&&fa.hide(),rb&&rb.remove(),rb=db(),A.append(rb),Ua(u,ua),ua.updateUI()):(fa||(fa=$("<div>"),fa.css({position:"absolute",top:"26px",left:"0",right:"0",bottom:"0","z-index":"2",color:"rgb(102, 102, 102)"}),e=$("<div>"),e.text(v.get("noDataPrompt","\u6ca1\u6709\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c")),za.layoutCtrlCenterAlign(e,500),e.css({height:"20px",
"line-height":"20px","text-align":"center","font-size":"16px",color:"#BBBBBB",top:"50%","margin-top":"98.5px"}),e.appendTo(fa),M=$("<div>"),Z.background(M,"no-data"),za.layoutCtrlCenterAlign(M,187),M.css({"background-size":"contain",top:"50%",height:"187px","margin-top":"-113.5px"}),M.appendTo(fa),A.append(fa)),fa.show(),rb.hide())};var zb=function(){for(var M=0,T=0;T<l.length;T++)l[T].isChecked()&&M++;M=v.get("checkedNumberPrompt","(\u5df2\u9009\u62e9 #1 \u9879)").replace("#1",M);xa.text(M)},Ba=
function(M,T){for(var ia=!0,ha=!1,G=0;G<M.length;G++){var qa=M[G];if(qa instanceof La){var Ka=qa.getChildren();Ka=Ba(Ka,qa);qa.isVisible()&&(ia=ia&&Ka[1]);ha=ha||Ka[0]}else qa.isVisible()&&(ia=ia&&qa.isChecked()),ha=ha||qa.isVisible()}ia=ia&&ha;T.setVisible(ha);T.setChecked(ia);return[ha,ia]};this.getSelectedExtReport=function(){return K};this.getSelectedExtReportNode=function(){for(var M=[],T=0;T<l.length;T++){var ia=l[T];ia.isChecked()&&M.push(ia.toJsonObject())}return M};var Ha=function(M,T){var ia=
function(qa){M.push(qa);if(qa instanceof na||qa instanceof Da)l.push(qa);else if((qa=qa.getChildren())&&0<qa.length)for(var Ka=0;Ka<qa.length;Ka++)ia(qa[Ka])},ha=function(qa){if(qa instanceof na||qa instanceof Da)m.push(qa);else if((qa=qa.getChildren())&&0<qa.length)for(var Ka=0;Ka<qa.length;Ka++)ha(qa[Ka])};if((T=T.getChildren())&&0<T.length)for(var G=0;G<T.length;G++)T[G].isPreset()?ha(T[G]):ia(T[G])},Y=function(M,T){return T&&0<T.length?M.concat(T):M},db=function(){ua=new KTable;var M=$(ua.getUI());
M.children().css("overflow-x","hidden");ua.setCellRender(new F(ua));ua.setTreeHandlerRender(new h(ua));ua.setSyncUIWhenModelChanged(!1);ua.addColumn().setWidth(400);za.layoutCtrlWithLRTB(M,0,0,null,23,0,null);return M},Ua=function(M,T){for(var ia=0;ia<M.length;ia++){var ha=M[ia];if(ha.isVisible()){var G=T.addRow();G.setHeight(23);var qa=G.getCell(0);qa.setValue(ha);ha=ha.getSubNodeLevel();ha=new KTCellTreeModel(ha);ha.setExpanded(!0);0<ha.getLevel()&&G.setHide(!1);qa.setTreeModel(ha)}}},eb=function(){for(var M=
0;M<u.length;M++){var T=u[M];if(T.isVisible()){var ia=T.getId();(ia=A.find("[table-name-checkbox='"+ia+"']").data("model"))&&ia.setChecked(T.isChecked())}}zb()},jb=function(M,T){T&&(W=[],M.getJqUi().data("object").check(M.isChecked(),Ya,W,cb),eb())},Ya=function(M){for(var T=!0,ia=M.getChildren(),ha=0;ha<ia.length;ha++){var G=ia[ha];G.isVisible()&&(T=T&&G.isChecked())}M.setChecked(T);cb(M.getParentNode());hb()},cb=function(M){var T=!0;if(M&&0<M.getChildren().length){for(var ia=M.getChildren(),ha=0;ha<
ia.length;ha++){var G=ia[ha];G.isVisible()&&(T=T&&G.isChecked())}M.setChecked(T)}hb()},hb=function(){for(var M=!0,T=!1,ia=0;ia<q.length;ia++){var ha=q[ia];!ha.isPreset()&&ha.isVisible()&&(M=M&&ha.isChecked(),T=!0)}T?S.setChecked(M):(M=S.isChecked(),S.setChecked(M))}}function da(){function h(K){KTDefaultCellRender.call(this,K);var l=this,m=this.paintCellUI;this.paintCellUI=function(ea,S){l.getCurrentRowIdx()<Ra.getHeadRowCount()?m(ea,S):($(ea),3==l.getCurrentColIdx()?W(ea,l.getCellWidth(),l.getCellHeight(),
l.getCurrentRow()):4==l.getCurrentColIdx()?q(ea,l.getCellWidth(),l.getCellHeight(),l.getCurrentRow()):m(ea,S))};var q=function(ea,S,Sa,xa){"0"===xa.getUserObject().extRptType&&(ea=Ra.createCtrlInCell(ea,S,Sa,p),xa.getCell(4).setUserObject(ea),S=xa.getUserObject().strategy==da.ALL_CONFLICTTYPE[1]?!0:!1,ea.setEnabled(S),ea.setSelected(xa.getUserObject().publishStrategy),ea.setItemModels(da.ALL_PUBLISHCONFLICTTYPE),ea.setUserObject(xa),ea.setCustomPainter(function(fa,e,ua){switch(ua){case da.ALL_PUBLISHCONFLICTTYPE[0]:fa=
v.get("noDisposal","\u4e0d\u5904\u7406");break;case da.ALL_PUBLISHCONFLICTTYPE[1]:fa=v.get("overwrite","\u8986\u76d6");break;default:fa=""}ua=$("<div>");ua.text(fa);ua.appendTo(e)}),ea.addSelectedChangedListener(u))},u=function(ea,S,Sa){ea.getUserObject().getUserObject().publishStrategy=Sa},W=function(ea,S,Sa,xa){ea=Ra.createCtrlInCell(ea,S,Sa,p);ea.setSelected(xa.getUserObject().strategy);ea.setItemModels(da.ALL_CONFLICTTYPE);ea.setUserObject(xa);ea.setCustomPainter(function(fa,e,ua){switch(ua){case da.ALL_CONFLICTTYPE[0]:fa=
v.get("ignore","\u5ffd\u7565");break;case da.ALL_CONFLICTTYPE[1]:fa=v.get("overwrite","\u8986\u76d6");break;case da.ALL_CONFLICTTYPE[2]:fa=v.get("rename","\u91cd\u547d\u540d");break;default:fa=""}ua=$("<div>");ua.text(fa);ua.appendTo(e)});ea.addSelectedChangedListener(function(fa,e,ua){if("0"===xa.getUserObject().extRptType){e=xa.getCell(4);var rb=ua==da.ALL_CONFLICTTYPE[1]?!0:!1;e.getUserObject().setEnabled(rb);e.getUserObject().setSelected(da.ALL_PUBLISHCONFLICTTYPE[0])}fa.getUserObject().getUserObject().strategy=
ua})}}var F=this,y,A;this.getConflictExtReportList=function(){return A};this.getJqUi=function(K){y=Ra.createTable();Ra.bindTableListenerForCtrl(y);var l=new h(y);l.setOutsideVisible(!1);y.setCellRender(l);y.addColumns(5);y.getColumn(0).setWidth(120);y.getColumn(1).setWidth(80);y.getColumn(2).setWidth(180);y.getColumn(3).setWidth(80);y.getColumn(4).setWidth(80);l=Ra.createHeadRow(y);l.getCell(0).setValue(v.get("groupName","\u76ee\u5f55\u540d\u79f0"));l.getCell(1).setValue(v.get("type","\u7c7b\u578b"));
l.getCell(2).setValue(v.get("nameField","\u540d\u79f0"));l.getCell(3).setValue(v.get("strategy","\u5904\u7406\u7b56\u7565"));l.getCell(4).setValue(v.get("publishStrategy","\u53d1\u5e03\u4fe1\u606f\u5904\u7406"));A=K;for(var m in K)A[m].strategy=da.ALL_CONFLICTTYPE[0],"0"===K[m].extRptType&&(A[m].publishStrategy=da.ALL_PUBLISHCONFLICTTYPE[0]);F.updateUi(K);Ra.refresh(y);K=$(y.getUI());K.addClass("extreport-import-selection-table");return K};this.updateUi=function(K){Ra.clearWithoutHead(y);Ra.refresh(y);
for(var l,m=0;m<K.length;m++){var q=K[m];l=Ra.createRow(y);l.setUserObject(q);l.getCell(0).setValue(q.extreportGroupName);0==q.extRptType?l.getCell(1).setValue(v.get("report","\u62a5\u8868")):1==q.extRptType&&l.getCell(1).setValue(v.get("dataSet","\u6570\u636e\u96c6"));l.getCell(2).setValue(q.extreportName);l.getCell(3).setValue(q.strategy);"0"===q.extRptType&&l.getCell(4).setValue(q.publishStrategy)}Ra.refresh(y)};this.refresh=function(){Ra.refresh(y)}}function pa(){E.call(this);var h=this,F=this.protectedMethod,
y=[],A,K,l,m,q,u,W,ea;this.setCurrentExtReportGroupFullPath=function(Ha){q=Ha};this.setGlobal=function(Ha){A=Ha};this.setFunRefreshExtReportGroupList=function(Ha){l=Ha};this.addConfirmListener=function(Ha){y.push(Ha)};this.createUi=function(Ha,Y,db){h.setSize(640,480);h.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);F.setTitle(v.get("importExtReportOrDataSet","\u5bfc\u5165\u8f7b\u62a5\u8868/\u6570\u636e\u96c6"));F.setContentPaneCreator(function(){var Ua=$("<div>");Ua.append(S());
Ua.append(xa());K=new wa;var eb=K.createJqUi(db),jb=fa();K.setShowAllChecked(ea);var Ya=v.get("sourceStrategy","\u8d44\u6e90\u51b2\u7a81\u5904\u7406\u7b56\u7565\uff08\u5730\u56fe\u3001\u56fe\u7247\uff09"),cb=(new Aa(Ya)).getJqUi();cb.attr("title",Ya);com.kingdee.bos.qing.common.DomUtil.layoutCtrl(cb,0,335,180,23);m=new p;m.setSelected(da.ALL_CONFLICTTYPE[1]);m.setItemModels(da.ALL_CONFLICTTYPE);m.setCustomPainter(function(hb,M,T){switch(T){case da.ALL_CONFLICTTYPE[0]:hb=v.get("ignore","\u5ffd\u7565");
break;case da.ALL_CONFLICTTYPE[1]:hb=v.get("overwrite","\u8986\u76d6");break;case da.ALL_CONFLICTTYPE[2]:hb=v.get("rename","\u91cd\u547d\u540d");break;default:hb=""}T=$("<div>");T.text(hb);T.appendTo(M)});Ya=m.getJqUi();com.kingdee.bos.qing.common.DomUtil.layoutCtrl(Ya,190,335,90,23);Ua.append(eb);Ua.append(jb);Ua.append(cb);Ua.append(Ya);return Ua});F.setClosingChecker(h.isValidToAccepted,!0);F.setClosingAction(function(Ua){Ua&&(Ua=K.getSelectedExtReportNode(),0!=Ua.length&&rb(Ha,Y,Ua))});h.showDialog()};
var S=function(){u=new C;u.addSearchListener(Sa);u.setSearchListenerDelay(400);u.setPlaceholder(v.get("searchBoxPlaceholder","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));u.setShowSearchIcon(!0);var Ha=u.getJqUi();Ha.addClass("extreport-export-search-box");return Ha},Sa=function(Ha){W=u.getText().trim();K.searchKey(W)},xa=function(){var Ha=new k;Ha.setChecked(!1);Ha.addCheckedListener(e);Ha.setText(v.get("showOnlyChecked","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));Ha=Ha.getJqUi();Ha.addClass("extreport-export-show-only-checked-box");
za.layoutCtrl(Ha,250,2,200,23);return Ha},fa=function(){ea=new k;ea.setChecked(!1);ea.addCheckedListener(ua);ea.setText(v.get("showAllChecked","\u5168\u9009"));var Ha=ea.getJqUi();Ha.addClass("extreport-export-show-all-checked-box");za.layoutCtrl(Ha,15,30,200,23);return Ha},e=function(Ha,Y){Y&&(K.setShowOnlyChecked(Ha.isChecked()),K.searchKey(W))},ua=function(Ha,Y){Y&&(K.setShowAllChecked(Ha),K.searchKey(W))};this.isValidToAccepted=function(Ha){0!=K.getSelectedExtReportNode().length?Ha(!0):(F.getMessageCurtain().showPrompt(v.get("selectNone",
"\u672a\u9009\u4e2d\u8f7b\u62a5\u8868/\u6570\u636e\u96c6\u3002")),Ha(!1))};var rb=function(Ha,Y,db){A.createFacade(function(Ua){var eb=Ua.conflictExtreportList;Ua=Ua.conflictPublishList;if(eb&&0<eb.length){$("<div>");Ua=null;for(var jb=0;jb<db.length;jb++){var Ya=db[jb].extreportName,cb=db[jb].extreportGroupName;if(null==Ua)for(var hb=0;hb<eb.length;hb++)eb[hb].extreportName!=Ya&&(Ua=cb)}jb=db.length-eb.length;Ya=new Ia;Ya.setSourceStrategy(m.getSelected());Ya.setGlobal(A);Ya.setCurrentExtReportGroupFullPath(q);
Ya.setFunRefreshExtReportGroupList(l);Ya.createUi(Ha,Y,eb,jb,Ua);Ya.repaint()}else zb(db,Ua)},function(Ua,eb){return 1020101==Ua||1100021==Ua?!0:!1}).importSelectedExtReport(q,Ha,Y,db,m.getSelected(),!0)},zb=function(Ha,Y){if(Y&&0!=Y.length){var db=new Qa;db.setClosedListener(function(){Ba(Ha)});db.showDialog(Y)}else Ba(Ha)},Ba=function(Ha){var Y;for(Y in Ha)var db=Ha[Y].extreportGroupName;l&&l(db)}}function Ia(){E.call(this);var h=this,F=this.protectedMethod,y=[],A,K,l,m,q=[],u,W,ea,S,Sa,xa,fa,e;
this.setCurrentExtReportGroupFullPath=function(Y){ea=Y};this.setSourceStrategy=function(Y){e=Y};this.setGlobal=function(Y){A=Y};this.setFunRefreshExtReportGroupList=function(Y){fa=Y};this.addConfirmListener=function(Y){y.push(Y)};this.createUi=function(Y,db,Ua,eb,jb){u=Y;W=db;S=Ua;Sa=jb;h.setSize(640,480);h.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);F.setTitle(v.get("importExtReportOrDataSet","\u5bfc\u5165\u8f7b\u62a5\u8868/\u6570\u636e\u96c6"));F.setContentPaneCreator(function(){var Ya=
$("<div>"),cb=v.get("importSuccessPrompt","\u6210\u529f\u5bfc\u5165#1\u4e2a\u8f7b\u62a5\u8868/\u6570\u636e\u96c6\u3002\u4ee5\u4e0b\u8f7b\u62a5\u8868/\u6570\u636e\u96c6\u540d\u79f0\u51b2\u7a81\uff0c\u8bf7\u5904\u7406\u3002").replace("#1",eb);cb=new Aa(cb);K=new ya(v.get("allIgnore","\u5168\u90e8\u5ffd\u7565"));l=new ya(v.get("allOverwrite","\u5168\u90e8\u8986\u76d6"));m=new ya(v.get("allRename","\u5168\u90e8\u91cd\u547d\u540d"));K.addActionListener(ua);l.addActionListener(rb);m.addActionListener(zb);
cb=cb.getJqUi();var hb=K.getJqUi(),M=l.getJqUi(),T=m.getJqUi();cb.addClass("extreport-import-selection-prompt");hb.addClass("extreport-import-selection-ignore-btn");M.addClass("extreport-import-selection-overwrite-btn");T.addClass("extreport-import-selection-rename-btn");Ya.append(cb);Ya.append(hb);Ya.append(M);Ya.append(T);xa=new da;Ya.append(xa.getJqUi(Ua));return Ya});F.setClosingChecker(h.isValidToAccepted,!0);F.setClosingAction(function(Ya){});h.showDialog()};this.repaint=function(){xa.refresh()};
var ua=function(){for(var Y in S)S[Y].strategy=da.ALL_CONFLICTTYPE[0],"0"===S[Y].extRptType&&(S[Y].publishStrategy=da.ALL_PUBLISHCONFLICTTYPE[0]);xa.updateUi(S)},rb=function(){for(var Y in S)S[Y].strategy=da.ALL_CONFLICTTYPE[1];xa.updateUi(S)},zb=function(){for(var Y in S)S[Y].strategy=da.ALL_CONFLICTTYPE[2],"0"===S[Y].extRptType&&(S[Y].publishStrategy=da.ALL_PUBLISHCONFLICTTYPE[0]);xa.updateUi(S)};this.isValidToAccepted=function(Y){Ba(u,W,S,Y)};var Ba=function(Y,db,Ua,eb){var jb=[],Ya;for(Ya in Ua)"ignore"!=
Ua[Ya].strategy&&(jb=jb.concat(Ua[Ya]));0==jb.length?(eb(!0),Ha(Sa)):A.createFacade(function(cb){eb(!0);var hb=jb[0].extreportGroupName;(cb=cb.conflictPublishList)&&0<cb.length&&(q=q.concat(cb));Ha(hb)},function(cb,hb){return 1020101==cb||1100021==cb?!0:!1}).importSelectedExtReport(ea,Y,db,jb,e,!1)},Ha=function(Y){if(0==q.length)fa&&fa(Y);else{var db=new Qa;db.setClosedListener(function(){fa&&fa(Y)});db.showDialog(q)}}}function Qa(){var h,F;this.setClosedListener=function(A){F=A};this.showDialog=
function(A){var K=$(document.body),l=$("<div class='sa-ctrl-common-modallayer'>");l.appendTo(K);var m=new R(l);m.setTitle(v.get("importExtReportOrDataSet","\u5bfc\u5165\u62a5\u8868/\u6570\u636e\u96c6"));var q=K.prop("clientWidth");K=K.prop("clientHeight");m.setBounds(q-640>>1,K-480>>1,640,480);m.setSelectable(!0);m.setToolbarVisible(!1);m.setContent(y(A));m.showFooterPane();m.addClosingListener(function(u,W){F&&F();l&&l.remove();u&&u.destroy()},!0);m.addClosedListener(function(u){});m.show();Ra.refresh(h)};
var y=function(A){var K=$("<div>"),l=$("<div>");l.addClass("theme-publish-conflict-tips");l.text(v.get("publishConflictTips","\u4ee5\u4e0b\u8bb0\u5f55\u56e0\u540d\u79f0\u91cd\u590d\u672a\u53d1\u5e03\u6210\u529f\uff0c\u53ef\u5230\u5bf9\u5e94\u7684\u8f7b\u62a5\u8868\u4e2d\u624b\u52a8\u53d1\u5e03"));l.appendTo(K);h=Ra.createTable();Ra.bindTableListenerForCtrl(h);h.addColumns(3);h.getColumn(0).setWidth(100);h.getColumn(1).setWidth(220);h.getColumn(2).setWidth(220);l=Ra.createHeadRow(h);l.getCell(0).setValue(v.get("publishName",
"\u53d1\u5e03\u540d\u79f0"));l.getCell(1).setValue(v.get("publishType","\u6765\u6e90"));l.getCell(2).setValue(v.get("publishPath","\u53d1\u5e03\u8def\u5f84"));l=$(h.getUI());l.addClass("extreport-publish-conflict-table");l.appendTo(K);Ra.clearWithoutHead(h);for(l=0;l<A.length;l++){var m=A[l],q=Ra.createRow(h);q.setUserObject(m);q.getCell(0).setValue(m.extreportName);q.getCell(1).setValue(m.extreportGroupName+"/\u8f7b\u62a5\u8868 : "+m.extrptName);q.getCell(2).setValue(m.publishPath)}Ra.refresh(h);
return K}}function pb(){var h=this,F,y,A,K=!1,l=!0,m=!1;this.setName=function(q){F=q};this.getName=function(){return F};this.setId=function(q){y=q};this.getId=function(){return y};this.setParentNode=function(q){A=q};this.getParentNode=function(){return A};this.setChecked=function(q){K=q};this.isChecked=function(){return K};this.setVisible=function(q){l=q};this.isVisible=function(){return l};this.setPreset=function(q){m=q};this.isPreset=function(){return m};this.getSubNodeLevel=function(){for(var q=
-1,u=A;u;)q++,u=u.getParentNode();return q};this.check=function(q){};this.protectedMethod={fromJsonObject:function(q){h.setId(q.id);h.setName(q.name);h.setPreset(q.isPreset)},toJsonObject:function(){var q={};q.extreportID=y;q.extreportName=F;return q}}}function La(){pb.call(this);var h=this,F=this.protectedMethod,y=!0,A=[];this.setExpanded=function(l){y=l};this.isExpanded=function(){return y};this.setChildren=function(l){A=l};this.getChildren=function(){return A};this.fromJsonObject=function(l){F.fromJsonObject(l);
if((l=l.children)&&0<l.length)for(var m=0;m<l.length;m++){var q=l[m],u,W=q.extRptType;W?W===gb.TYPE_EXTRPT?u=new na:W===gb.TYPE_DATASET&&(u=new Da):u=new La;u.fromJsonObject(q);u.setParentNode(h);A.push(u)}};this.toJsonObject=function(){return F.toJsonObject()};this.check=function(l,m,q,u){if(0!==A.length){h.setChecked(l);for(var W=0;W<A.length;W++){var ea=A[W];ea instanceof La&&ea.check(l,m,q,u);ea.isVisible()&&ea.check(l,m,q)}K(h.getParentNode(),u)}};var K=function(l,m){l&&(m&&m(l),K(l.getParentNode(),
m))}}function Wa(){pb.call(this);var h=this,F=this.protectedMethod,y,A,K,l;this.setTemplateType=function(u){l=u};this.getTemplateType=function(){return l};this.setDesc=function(u){K=u};this.getDesc=function(){return K};this.setDataSetType=function(u){A=u};this.getDataSetType=function(){return A};this.setExtRptType=function(u){y=u};this.getExtRptType=function(){return y};var m=function(u,W){if((u=u.getParentNode())&&u.getName()){W=u.getName().concat(W);var ea=u.getParentNode();if(ea&&ea.getParentNode())return W=
"/".concat(W),m(u,W)}return W},q=function(u,W){if((u=u.getParentNode())&&u.getId()){W=u.getId().concat(W);var ea=u.getParentNode();if(ea&&ea.getParentNode())return W="/".concat(W),q(u,W)}return W};this.protectedMethod={fromJsonObject:function(u){F.fromJsonObject(u);h.setExtRptType(u.extRptType);h.setDataSetType(u.dataSetType);h.setDesc(u.desc);h.setTemplateType(u.templateType)},toJsonObject:function(){var u=F.toJsonObject();var W=m(h,"");var ea=q(h,"");u.extRptType=y;u.dataSetType=A;u.description=
K;u.templateType=l;u.extreportGroupName=W;u.extreportGroupID=ea;return u}}}function na(){Wa.call(this);var h=this,F=this.protectedMethod,y=[],A=[],K=[];this.setRelativeExt=function(m){y=m};this.getRelativeExt=function(){return y};this.setRelativeData=function(m){A=m};this.getRelativeData=function(){return A};this.setRelativeExtByExt=function(m){K=m};this.getRelativeExtByExt=function(){return K};this.fromJsonObject=function(m){F.fromJsonObject(m);h.setRelativeData(m.relativeIds);h.setRelativeExt(m.outLinkIds)};
this.toJsonObject=function(){var m=F.toJsonObject(),q=[],u=[];if(A&&0<A.length)for(var W=0;W<A.length;W++)q.push(A[W].getId());m.relativeIds=q;if(y&&0<y.length)for(W=0;W<y.length;W++)u.push(y[W].getId());m.outLinkIds=u;return m};this.check=function(m,q,u,W){if(m!==h.isChecked()&&-1==u.indexOf(this.getId())){u.push(this.getId());h.setChecked(m);Ma(h,m,q,u,W);var ea=h,S=ea.getRelativeExt();if(S&&0!=S.length)for(var Sa=0;Sa<S.length;Sa++)if(ea=S[Sa],!ea.isPreset()){var xa=m;if(!xa){xa=ea.getRelativeExtByExt();
var fa=!1;if(xa&&0<xa.length)for(var e=0;e<xa.length;e++)fa=fa||xa[e].isChecked();xa=fa}ea.check(xa,q,u,W)}u.pop();q&&q(h.getParentNode());l(h.getParentNode(),W)}};var l=function(m,q){m&&(q&&q(m),l(m.getParentNode(),q))}}function Da(){Wa.call(this);var h=this,F=this.protectedMethod,y=[],A=[],K=[];this.setRelativeDataSet=function(m){y=m};this.getRelativeDataSet=function(){return y};this.setRelativeByDataSet=function(m){A=m};this.getRelativeByDataSet=function(){return A};this.setRelativeDataByExt=function(m){K=
m};this.getRelativeDataByExt=function(){return K};this.fromJsonObject=function(m){F.fromJsonObject(m);h.setRelativeDataSet(m.relativeIds)};this.toJsonObject=function(){var m=F.toJsonObject(),q=[];if(y&&0<y.length)for(var u=0;u<y.length;u++)q.push(y[u].getId());m.relativeIds=q;return m};this.check=function(m,q,u,W){m!==h.isChecked()&&-1==u.indexOf(this.getId())&&(u.push(this.getId()),h.setChecked(m),Ma(h,m,q,u,W),u.pop(),q&&q(h.getParentNode()),l(h.getParentNode(),W))};var l=function(m,q){m&&(q&&q(m),
l(m.getParentNode(),q))}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.manage&&(com.kingdee.bos.extreport.manage={});"undefined"==typeof com.kingdee.bos.extreport.manage.imexport&&(com.kingdee.bos.extreport.manage.imexport={});var O=com.kingdee.bos.extreport.manage.imexport;O.ExportDialog=
function(){E.call(this);var h=this,F=this.protectedMethod,y,A,K,l,m,q,u;this.setGlobal=function(fa){y=fa};this.setFolderNode=function(fa){K=fa};this.asyncShowExportDialog=function(){wb.setCallback(function(){W()});wb.loadJs("common/qing-table.js")};var W=function(){h.setSize(640,480);h.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);F.setTitle(v.get("exportExtReportDataSet","\u5bfc\u51fa\u62a5\u8868/\u6570\u636e\u96c6"));F.setContentPaneCreator(function(){var fa=$("<div>"),e=fa.append;
m=new C;m.addSearchListener(ea);m.setSearchListenerDelay(400);m.setPlaceholder(v.get("searchBoxPlaceholder","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));m.setShowSearchIcon(!0);var ua=m.getJqUi();ua.addClass("extreport-export-search-box");e.call(fa,ua);e=fa.append;ua=new k;ua.setChecked(!1);ua.addCheckedListener(S);ua.setText(v.get("showOnlyChecked","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));ua=ua.getJqUi();ua.addClass("extreport-export-show-only-checked-box");za.layoutCtrl(ua,250,2,200,23);e.call(fa,
ua);A=new wa;e=A.createJqUi(K);u=new k;u.setChecked(!1);u.addCheckedListener(Sa);u.setText(v.get("showAllChecked","\u5168\u9009"));ua=u.getJqUi();ua.addClass("extreport-export-show-all-checked-box");za.layoutCtrl(ua,15,30,200,23);A.setShowAllChecked(u);e.addClass("extreport-export-tree-selection-area");fa.append(e);fa.append(ua);l=new Ea;l.setOn(!1);e=l.getJqUi();e.addClass("extreport-export-with-publish-switchbutton");ua=(new Aa(v.get("carryPublish","\u643a\u5e26\u53d1\u5e03\u4fe1\u606f"))).getJqUi();
ua.addClass("extreport-export-with-publish-text");fa.append(e);fa.append(ua);return fa});F.setClosingChecker(h.isValidToAccepted,!0);F.setClosingAction(function(fa){fa&&(fa=A.getSelectedExtReportNode(),xa(fa))});h.showDialog()},ea=function(fa){q=m.getText().trim();A.searchKey(q)},S=function(fa,e){e&&(A.setShowOnlyChecked(fa.isChecked()),A.searchKey(q))},Sa=function(fa,e){e&&(A.setShowAllChecked(fa),A.searchKey(q))};this.isValidToAccepted=function(fa){var e=A.getSelectedExtReportNode();e&&0<e.length?
fa(!0):(F.getMessageCurtain().showPrompt(v.get("selectNone","\u672a\u9009\u4e2d\u8f7b\u62a5\u8868/\u6570\u636e\u96c6\u3002")),fa(!1))};var xa=function(fa){y.createFacade(function(e){y.createFacade().getExportedData(e)},function(e,ua){return!1}).confirmExportExtReport(fa,l.isOn())}};O.UploadPane=function(){var h,F,y,A,K;this.setCurrentExtReportGroupFullPath=function(W){K=W};this.createJqUi=function(W,ea,S){h=S;S=$("<div>");S.addClass("extreport-importing-exporting-main");var Sa=$(document.body),xa=
$("<div class='sa-ctrl-modallayer'>");xa.appendTo(Sa);xa.css("height",$(".extreport-manage").height());F=$("<progress value='0' max='100'>");F.addClass("extreport-importing-upload-progress");var fa=$("<div>");fa.addClass("extreport-importing-exporting-text");fa.text(v.get("uploading","\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u5019"));S.append(F);S.append(fa);Sa.append(S);l(W,ea,S,xa)};this.setFunRefreshExtReportGroupList=function(W){y=W};this.setFunErrorCallbackEvent=function(W){A=W};var l=
function(W,ea,S,Sa){var xa=new FormData;xa.append("filename",W);var fa=new XMLHttpRequest;fa.upload.addEventListener("progress",m,!1);fa.addEventListener("error",q,!1);var e=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister.getUploadUrl();fa.open("post",e,!0);fa.onload=function(ua){200==this.status&&(ua=JSON.parse(this.response),"number"==typeof ua.errorCode&&3099003==ua.errorCode?h.showError(ua.errorMessage):u(ua.data,W.name,ea),S.remove(),Sa.remove())};fa.send(xa)},m=function(W){var ea=
F.get(0);W.lengthComputable&&(ea.max=W.total,ea.value=W.loaded)},q=function(W){A&&A(v.get("uploadFail","\u4e0a\u4f20\u5931\u8d25"))},u=function(W,ea,S){S.createFacade(function(Sa){var xa=new La;xa.fromJsonObject(Sa);0!=xa.getChildren().length?(Sa=new pa(h),Sa.createUi(W,ea,xa),Sa.setGlobal(S),Sa.setFunRefreshExtReportGroupList(y),Sa.setCurrentExtReportGroupFullPath(K)):h.showPrompt(v.get("noExtReportAndGroup","\u672a\u627e\u5230\u8f7b\u62a5\u8868\u5206\u7c7b\u4e0e\u8f7b\u62a5\u8868\u3002"))},function(Sa,
xa){return!1}).getSelectableForImportExtReport(W,ea,K)}};O.FolderNode=La;var Z,p,k,R,E,Aa,ya,C,za,v,Ra,wb,gb,Ea;(function(){var h=com.kingdee.bos.qing.ui.component;p=h.ComboBox;k=h.CheckBox;R=h.Dialog;E=h.AbstractModalDialog;Aa=h.Label;ya=h.WorkButton;Ea=h.SwitchButton;C=h.SearchBox;h=com.kingdee.bos.qing.framework.common;v=h.MultilanguageManager.createPackageAccessor(O);h=com.kingdee.bos.qing.common;za=h.DomUtil;h=com.kingdee.bos.qing.common.ui;Ra=h.TableUtil;h=com.kingdee.bos.qing;wb=h.CodeLoader;
h=com.kingdee.bos.extreport.manage.common;Z=h.Icons;h=com.kingdee.bos.extreport.manage.model;gb=h.ExtReportModel})();da.ALL_CONFLICTTYPE=["ignore","overwrite","rename"];da.ALL_PUBLISHCONFLICTTYPE=["noDisposal","overwrite"];var Ma=function(h,F,y,A,K){if((h=h.getExtRptType()==gb.TYPE_EXTRPT?h.getRelativeData():h.getRelativeDataSet())&&0!=h.length)for(var l=0;l<h.length;l++){var m=h[l];if(!m.isPreset()){var q=F;if(!q){q=m.getRelativeByDataSet();q=m.getRelativeDataByExt().concat(q);var u=!1;if(q&&0<q.length)for(var W=
0;W<q.length;W++)u=u||q[W].isChecked();q=u}m.check(q,y,A,K)}}}})();(function(){function wa(g){pa.call(this,g)}function da(g){pa.call(this,g)}function pa(g){var aa=this,ca,ma,ra,H,U,Ga,oa,Fa,L;this.setArrExtReportModel=function(D){};this.setGlobalDependence=function(D){ca=D};this.setRefreshExtReportFunction=function(D){};this.setCopySuccessCallback=function(D){};this.setSelectedCardSuccessCallBack=function(D){Fa=D};this.setClickCardCallback=function(D){L=D};this.setCopyDifferentGroupSuccessCallBack=function(D){};this.setDelSuccessCallback=function(D){};this.setMoveSuccessCallback=
function(D){};this.setIconFileName=function(D){oa=D};this.getJqUi=function(){ma||n();return ma};this.setExtReportTypeName=function(D){Ga=D};this.getExtReportTypeName=function(){return Ga};this.setExtReportName=function(D){ra&&ra.text(D)};this.setDescription=function(D){H&&H.text(D)};var n=function(){ma=$("<div>");ma.addClass("extreport-card");ma.on("click",ba);ma.attr("id",g.getExtReportID());ma.attr("extrpttype",g.getExtRptType());ma.on("mouseover",function(){ma.find(".extreport-name").css("width",
"153px")});ma.on("mouseleave",function(){ma.find(".extreport-name").css("width","209px")});var D=$("<div>");D.addClass("extreport-detail-container");var ja=$("<span class='extreport-icon'>");E.background(ja,oa);ra=$("<span>");ra.addClass("extreport-name");var Na=g.getExtReportName();ra.text(Na);ra.attr("title",Na);ra.on("click",function(Za){t(aa.getJqUi());Za=aa.getExtReportTypeName()===e.get("dataSet","\u6570\u636e\u96c6")?ya.getDataSetPreviewEntrance():ya.getExtReportPreviewEntrance();ta(Za)});
H=$("<div>");H.addClass("extreport-description");Na=$("<div>");Na.addClass("manage-icon-container");Na.on("click",function(Za){Za.stopPropagation()});var I=$("<div>");I.addClass("icon-container");I.on("click",function(Za){Za.stopPropagation()});var la=g.isPreset();if(la){var Ta=$("<div>");Ta.addClass("extreport-preset-text");Ta.text(e.get("preset","\u9884 \u7f6e"));var Ja=$("<div>");Ja.addClass("extreport-preset-icon");E.background(Ja,"icon-preset-big");Ta.appendTo(Na);Ja.appendTo(Na)}U=$("<div>");
U.text(e.get("type","\u7c7b\u578b")+": "+g.getDisplayTypeName());U.css({"font-size":"12px",color:"#999999","margin-top":"6px"});Ta=g.getDescription();Ja=""==Ta||null==Ta?e.get("noDescription","\u6682\u65e0\u63cf\u8ff0"):e.get("description","\u63cf\u8ff0")+": "+eb.cutExceedCharacters(Ta,68);H.text(Ja);H.attr("title",Ta);ja.appendTo(D);ra.appendTo(D);Na.appendTo(D);U.appendTo(D);H.appendTo(D);D.appendTo(ma);I.appendTo(ma);B(Na,la);g.getExtRptType()==S.TYPE_DATASET?w(I):P(I,la)},ba=function(D){L&&L(D,
g)},t=function(D){var ja=ma.parent().children(".extreport-card-selected");0<ja.length&&ja.removeClass("extreport-card-selected");D.addClass("extreport-card-selected")},B=function(D,ja){ja||(ja=$("<span>"),ja.addClass("edit-icon icon"),ja.attr("title",e.get("edit","\u7f16\u8f91")),E.backgroundWithHover(ja,"btn-edit"),ja.on("click",sa),ja.appendTo(D));ja=new m;ja.setChecked(!1);ja.addCheckedListener(function(){t(aa.getJqUi());var Na=aa.getJqUi().find(".selected-icon");$(Na[0]).css("display","block");
Fa&&Fa(g)});ja=ja.getJqUi();ja.addClass("selected-icon icon");ja.appendTo(D)},P=function(D,ja){var Na=ya.getExtReportDesignerEntrance();Ca(e.get("reportDesigner","\u62a5\u8868\u8bbe\u8ba1\u5668"),"btn-extreport",function(la,Ta,Ja,Za,bb,kb,qb){var sb=ca.createFacade(function(){Na(la,Ta,Ja,Za,bb,kb,qb)},function(Pb,xb){return 8099001==Pb||8099002==Pb?(ca.getMessageCurtain().showPrompt(xb,2E3),!0):!1});sb.setShowBlocking(!1);sb.existExtReport(S.TYPE_EXTRPT,la)},D);var I=ya.getExtReportPreviewEntrance();
Ca(e.get("preview","\u9884\u89c8"),"btn-preview",I,D);ja||Ca(e.get("publishTo","\u53d1\u5e03\u5230"),"btn-publishto",V,D,x)},x=function(D){D.stopPropagation();var ja=com.kingdee.bos.qing.publish.model.PublishTargetType,Na=g.getExtReportID(),I=g.getExtReportName();D=$(D.currentTarget).parent();var la=$("<div>");la.addClass("extreport-publishto-selector");var Ta=$("<div>");Ta.addClass("extreport-publishto-selector-item");Ta.text(e.get("publishToAppMenu","\u53d1\u5e03\u5230\u5e94\u7528\u83dc\u5355")+
"...");Ta.on("click",function(bb){V(Na,I,e.get("publishToAppMenu","\u53d1\u5e03\u5230\u5e94\u7528\u83dc\u5355"),ja.APPMENU);la&&la.remove()});var Ja=$("<div>");Ja.addClass("extreport-publishto-selector-item");Ja.text(e.get("publishToCenter","\u53d1\u5e03\u5230\u6570\u636e\u5de5\u4f5c\u53f0\u9605\u89c8\u5939")+"...");Ja.on("click",function(bb){V(Na,I,e.get("publishToCenter","\u53d1\u5e03\u5230\u6570\u636e\u5de5\u4f5c\u53f0\u9605\u89c8\u5939"),ja.CENTER);la&&la.remove()});Ta.appendTo(la);Ja.appendTo(la);
la.appendTo(D);var Za=function(bb){for(bb=bb.target;bb!=document.body;){if(bb==la[0])return;bb=bb.parentNode}la&&la.remove();document.body.removeEventListener("mousedown",Za,!0)};document.body.addEventListener("mousedown",Za,!0)},V=function(D,ja,Na,I){var la=com.kingdee.bos.qing.publish.common.PublishFactory,Ta=com.kingdee.bos.qing.publish.model.PublishSourceType,Ja=new com.kingdee.bos.qing.publish.common.PublishContext;Ja.setBizTag(D);Ja.setCurrentSourceType(Ta.EXTREPORT);D=la.createPublishToDialog(Na,
ya.getFunPublishRemoteImpl()(),Ja,I,ya.getFunPublishContentEditEntrance()());D.addSuccessCallback(function(){ca.getMessageCurtain().showSuccess("\u201c"+ja+"\u201d"+e.get("publishSuccess","\u53d1\u5e03\u6210\u529f\u3002"),2E3);C.occur(C.PUBLISH_TO_TYPE,C.getPublishTargetName(I))});D.showDialog()},ka=function(D,ja,Na,I,la,Ta,Ja,Za,bb){var kb=ca.createFacade(function(){D(ja,Na,I,la,Ta,Ja,Za,bb)},function(qb,sb){return 8099001==qb||8099002==qb?(ca.getMessageCurtain().showPrompt(sb,2E3),!0):!1});kb.setShowBlocking(!1);
kb.existExtReport(S.TYPE_DATASET,ja)},w=function(D){var ja=ya.getDataSetDesignerEntrance();Ca(e.get("datasetDesigner","\u6570\u636e\u96c6\u8bbe\u8ba1\u5668"),"btn-dataset",function(Ta,Ja,Za,bb,kb,qb,sb){ka(ja,Ta,Ja,Za,bb,kb,qb,sb)},D);var Na=ya.getDataSetPreviewEntrance();Ca(e.get("datasetpreview","\u9884\u89c8\u6570\u636e\u96c6"),"btn-preview",Na,D);var I=Ca(e.get("guiDatasetDesigner","GUI\u6570\u636e\u96c6\u8bbe\u8ba1\u5668"),"btn-dataset-gui",function(Ta,Ja,Za,bb,kb,qb,sb){ka(ja,Ta,Ja,Za,bb,kb,
qb,sb,!0)},D),la=function(){I&&(ca.isShowGUIEnterIcon()?I.show():I.hide())};la();ca.addShowGUIEnterIconListener(function(){la()})},Ca=function(D,ja,Na,I,la){var Ta=$("<span>");Ta.addClass("extreport-icon icon");E.backgroundWithHover(Ta,ja);Ta.attr("title",D);Ta.on("click",function(Ja){t(aa.getJqUi());Ja.stopPropagation();la?la(Ja):ta(Na)});Ta.appendTo(I);return Ta},ta=function(D){var ja=ca.createFacade(function(Na){var I=g.getExtReportID(),la=g.getExtReportGroupID(),Ta=g.getExtReportName(),Ja=g.getTemplateType(),
Za=g.isPreset();Na=Na.presetManagePerm;g.getExtRptType()==S.TYPE_DATASET&&(Ja=g.getDataSetType());D(I,Ta,la,Ja,Za,Na,Va)},function(Na,I){return!1});ja.setShowBlocking(!0);ja.checkPresetManagePerm()},Va=function(){var D=g.getDisplayTypeName();C.occur(C.EXT_EXTREPORT_ENTRANCE_TYPE,D)},sa=function(){t(aa.getJqUi());var D=new Qa(g);D.setExtReportTypeName(Ga);D.addSuccessCallback(function(ja){var Na=ja.getExtReportName(),I=ja.getDescription();g.setExtReportName(Na);g.setDescription(I);g.setModifyTime(ja.getModifyTime());
ra.text(Na);ra.attr("title",Na);ja=""==I||null==I?e.get("noDescription","\u6682\u65e0\u63cf\u8ff0"):e.get("description","\u63cf\u8ff0")+": "+eb.cutExceedCharacters(I,68);H.text(ja);H.attr("title",I);I=e.get("editSuccess","\u7f16\u8f91\u6210\u529f\u3002");ca.getMessageCurtain().showSuccess(I,2E3)});D.setGlobal(ca);D.createDialog().show()}}function Ia(){this.createDialog=function(){throw Error("override");}}function Qa(g){Ia.call(this);var aa,ca=[400,300],ma=[],ra,H,U,Ga,oa;this.setExtReportTypeName=
function(n){oa=n};this.setGlobal=function(n){aa=n};this.addSuccessCallback=function(n){ma.push(n)};this.createDialog=function(){var n=$(document.body),ba=$("<div class='sa-ctrl-common-modallayer'>");ba.appendTo(n);var t=new za(ba);t.setSelectable(!0);var B=void 0!=g.getExtReportID()?oa===e.get("extreport","\u8f7b\u62a5\u8868")?e.get("editSth","\u7f16\u8f91#1").replace("#1",e.get("report","\u62a5\u8868")):e.get("editSth","\u7f16\u8f91#1").replace("#1",oa):oa===e.get("extreport","\u8f7b\u62a5\u8868")?
e.get("createSth","\u65b0\u5efa#1").replace("#1",e.get("report","\u62a5\u8868")):e.get("createSth","\u65b0\u5efa#1").replace("#1",oa);t.setTitle(B);B=ca[0];var P=ca[1],x=n.prop("clientWidth"),V=n.prop("clientHeight");t.setBounds(x-B>>1,V-P>>1,B,P);t.setToolbarVisible(!1);t.setContent(L());t.showFooterPane();ba.appendTo(n);var ka=function(){t.destroy();ba.remove()};t.addClosingListener(function(w,Ca){Ca?Fa(ka,w.getMessageCurtain()):ka()});return t};var Fa=function(n,ba){var t=$.trim(ra.getText()),
B=$.trim(H.getText()),P;""!=t&&50<t.length?P=e.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""==t?P=oa===e.get("extreport","\u8f7b\u62a5\u8868")?e.get("nameCannotBeEmpty","\u8bf7\u8f93\u5165#1\u540d\u79f0\u3002").replace("#1",e.get("report","\u62a5\u8868")):e.get("nameCannotBeEmpty","\u8bf7\u8f93\u5165#1\u540d\u79f0\u3002").replace("#1",oa):eb.isValidString(t)?eb.isKeywords(t)&&(P=e.get("isKeywords",'\u65e0\u6cd5\u4f7f\u7528"#1"\u4f5c\u4e3a\u540d\u79f0\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002').replace("#1",
t)):P=e.get("invalidName","\u540d\u79f0\u53ea\u80fd\u7531\u6c49\u5b57\u3001\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210,\u4e14\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\u3002");""!=B&&500<B.length&&(P=e.get("descriptionTooLong","\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7500\u4e2a\u5b57\u7b26\u3002"));if(P)ba.showPrompt(P,2E3);else{var x=g.copy();x.setExtReportName(t);x.setDescription(B);x.setDataSetType(Ga);t=aa.createFacade(function(V){x.fromJsonObject(V);V=0;for(var ka=
ma.length;V<ka;V++){var w=ma[V];w&&w(x)}n()},function(V,ka){return 8010001==V?(V=oa===e.get("extReport","\u8f7b\u62a5\u8868")?e.get("nameExist","#1\u540d\u79f0\u5df2\u5b58\u5728\u3002").replace("#1",e.get("qReport","\u62a5\u8868")):e.get("nameExist","#1\u540d\u79f0\u5df2\u5b58\u5728\u3002").replace("#1",oa),ba.showPrompt(V,2E3),!0):8099001==V||8099002==V?(ba.showPrompt(ka,2E3),!0):!1});t.setShowBlocking(!0);t.saveOrUpdateExtReport(x)}},L=function(){var n=$("<div>"),ba=!1;if(g.getExtRptType()==S.TYPE_DATASET)if(g.getExtReportID())Ga=
g.getDataSetType();else{ba=!0;var t=new gb;t.setRequired(!0);t.setText(e.get("dataSetType","\u6570\u636e\u96c6\u7c7b\u578b"));t=t.getJqUi();var B=Sa.AllDataSetType;U=new wb;U.setItemModels(B);U.setSelected(B[0]);U.setCustomPainter(function(w,Ca,ta){Ca.text(e.get(ta.getI18nKey(),ta.getDefaultDesc()))});U.addSelectedChangedListener(function(w,Ca,ta){Ga=ta.getTypeID()});var P=U.getJqUi();t.appendTo(n);P.appendTo(n);Ga=B[0].getTypeID()}B=new gb;B.setText(e.get("extreportName","\u540d\u79f0"));B.setRequired(!0);
B=B.getJqUi();ra=new Ma;g&&ra.setText(g.getExtReportName());ra.setText(g.getExtReportName());var x=ra.getJqUi(),V=new gb;V.setText(e.get("description","\u63cf\u8ff0"));V=V.getJqUi();H=new Ea;g&&H.setText(g.getExtReportName());H.setText(g.getDescription());var ka=H.getJqUi();B.appendTo(n);x.appendTo(n);V.appendTo(n);ka.appendTo(n);ba?(Ba.layoutCtrl(B,8,0,100,23),Ba.layoutCtrl(x,80,0,270,23),Ba.layoutCtrl(t,8,46,100,23),Ba.layoutCtrl(P,80,43,270,23),Ba.layoutCtrl(V,8,96,100,23),Ba.layoutCtrl(ka,80,
102,270,72)):(Ba.layoutCtrl(B,8,0,100,23),Ba.layoutCtrl(x,80,0,270,23),Ba.layoutCtrl(V,8,48,100,23),Ba.layoutCtrl(ka,80,54,270,120));return n}}function pb(g){Ia.call(this);var aa=this,ca=[400,300],ma=[],ra,H,U,Ga=!1;this.setExtReportTypeName=function(L){H=L};this.addSuccessCallback=function(L){ma.push(L)};this.setGlobal=function(L){ra=L};this.createDialog=function(){var L=$(document.body),n=$("<div class='sa-ctrl-common-modallayer'>");n.appendTo(L);var ba=new za(n);ba.setTitle(e.get("operateConfirm",
"\u64cd\u4f5c\u786e\u8ba4"));var t=ca[0],B=ca[1],P=L.prop("clientWidth"),x=L.prop("clientHeight");ba.setBounds(P-t>>1,x-B>>1,t,B);ba.setToolbarVisible(!1);ba.setContent(aa.createJqPanel());ba.addClosingListener(function(V,ka){ka&&Fa(V.getMessageCurtain());V.destroy();n.remove()});ba.showFooterPane();n.appendTo(L);oa(n);return ba};this.createJqPanel=function(){var L=$("<div>"),n=$("<span>");Aa.background(n,"msg-delete");var ba=$("<span>");ba.addClass("extreport-manage-deldialog-confirm-msg");var t=
e.get("confirmToDeleteExtReport","\u5220\u9664#1\u201c#2\u201d\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5#3\u5417\uff1f");1==g.length?H===e.get("extReport","\u8f7b\u62a5\u8868")?(t=t.replace("#1",e.get("report","\u62a5\u8868")),t=t.replace("#2",g[0].getExtReportName()),t=t.replace("#3",e.get("report","\u62a5\u8868"))):(t=t.replace("#1",e.get("datasetForConfirm","\u6570\u636e\u96c6")),t=t.replace("#2",g[0].getExtReportName()),t=t.replace("#3",e.get("datasetForConfirm",
"\u6570\u636e\u96c6"))):(t=e.get("multiSelectConfirmDelete","\u5c06\u5220\u9664#1\u9879\u6570\u636e\u5185\u5bb9\uff0c\u6570\u636e\u5185\u5bb9\u5220\u9664\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u5417\uff1f"),t=t.replace("#1",g.length));ba.text(t);ba.attr("title",t);n.appendTo(L);ba.appendTo(L);aa.protectedCustomLayout(L,n,ba);return L};var oa=function(L){(L=L.children(".sa-ctrl-dialog"))&&0<L.length&&(L=L.children(".sa-ctrl-dialog-title"))&&0<L.length&&L.css("border-bottom",
"0px")},Fa=function(L){for(var n=function(P){P=0;for(var x=ma.length;P<x;P++){var V=ma[P];V&&V()}},ba=function(P,x){return 8099001==P||8099002==P?(L.showPrompt(x,2E3),!0):!1},t=[],B=0;B<g.length;B++)t.push(g[B].toJsonObject());0<t.length&&(n=ra.createFacade(n,ba),n.setShowBlocking(!0),n.batchDeleteExtReport(t,Ga?U.isOn():!1))};this.protectedCustomLayout=function(L,n,ba){Ba.layoutCtrl(n,140,10,98,80);Ba.layoutCtrl(ba,0,100,370,70);for(n=0;n<g.length;n++)if(g[n].getExtRptType()==S.TYPE_EXTRPT){Ga=!0;
break}Ga&&(n=(new gb(e.get("deletePublishInfo","\u540c\u65f6\u5220\u9664\u53d1\u5e03\u4fe1\u606f"))).getJqUi(),U=new A,ba=U.getJqUi(),Ba.layoutCtrl(n,105,163,125,23),Ba.layoutCtrlWithLRTB(ba,230,null,31,165,null,19),"en"==k.getUrlParamValue("language")&&(Ba.layoutCtrl(n,75,163,175,23),Ba.layoutCtrlWithLRTB(ba,255,null,31,165,null,19)),L.append(ba),L.append(n))}}function La(g,aa){Ia.call(this);var ca=aa.getChildren(),ma=[],ra=[400,300],H,U,Ga,oa;this.setExtReportTypeName=function(n){};this.setCurrentGroupName=
function(n){oa=n};this.addSuccessCallback=function(n){ma.push(n)};this.setArrLoadedExtReport=function(n){Ga=n};this.setGlobal=function(n){H=n};this.createDialog=function(){var n=$(document.body),ba=$("<div class='sa-ctrl-common-modallayer'>");ba.appendTo(n);var t=new za(ba),B=e.get("moveTo","\u79fb\u52a8\u5230");t.setTitle(B);B=ra[0];var P=ra[1],x=n.prop("clientWidth");n=n.prop("clientHeight");var V=function(){t.destroy();ba.remove()};t.setBounds(x-B>>1,n-P>>1,B,P);t.setToolbarVisible(!1);t.setContent(Fa());
t.addClosingListener(function(ka,w){w?L(ka.getMessageCurtain(),V):V()});t.showFooterPane();return t};var Fa=function(){var n=$("<div>");n.addClass("move-subject-panel");var ba=new gb;ba.setText(e.get("extReportCategory","\u76ee\u5f55"));ba=ba.getJqUi();U=new K;var t=new O(ca);U.setSelectedModel(Ka.findTreeNodeByFullPath(aa,oa&&oa.split("/")));U.setCustomPainter(function(P,x){P=Ka.buildCategoryFullPath(P,"","/");x.text(P);x.attr("title",P)});U.setDropdownCreator(function(P,x,V){return t.createJqPopup(P,
x,V)});var B=U.getJqUi();ba.appendTo(n);B.appendTo(n);Ba.layoutCtrl(ba,25,50,70,23);Ba.layoutCtrl(B,100,50,240,23);return n},L=function(n,ba){var t=U.getSelectedModel(),B=t.getUserObject().getExtReportGroupID(),P=g[0].getExtReportGroupID();if(B==P)ba();else{var x=function(ta){if(ta&&0<ta.length)for(var Va=0;Va<ta.length;Va++){var sa=new S;sa.fromJsonObject(ta[Va]);for(var D=0;D<Ga.length;D++){var ja=Ga[D];sa.getExtReportGroupID()==ja.getExtReportGroupID()&&ja.getExtReportID()==sa.getExtReportID()&&
Ga.splice(D,1)}}},V=function(ta,Va,sa){if(ta&&0<ta.length)for(var D=0,ja=ma.length;D<ja;D++)for(var Na=0;Na<ta.length;Na++){var I=new S;I.fromJsonObject(ta[Na]);var la=new S;la.setExtReportID(I.getExtReportID());la.setExtReportGroupID(Va.getUserObject().getExtReportGroupID());la.setExtReportName(I.getExtReportName());la.setDescription(I.getDescription());la.setDataSetType(I.getDataSetType());la.setExtRptType(0==I.getExtRptType()?S.TYPE_EXTRPT:S.TYPE_DATASET);la.setModifyTime(I.getModifyTime());la.setBeforeMovedExtReportGroupId(sa);
(I=ma[D])&&I(la)}},ka=!1,w=[];for(ka=0;ka<g.length;ka++)w.push(g[ka].toJsonObject());ka=1==g.length?!1:!0;var Ca=H.createFacade(function(ta){var Va=g.length;V(ta.extreportList,t,P);if((ta=ta.conflictExtreportList)&&0<ta.length){Va-=ta.length;var sa=new Wa;sa.setDestCategoryTreeNode(t);sa.setArrSuccessCallback(ma);sa.setHandlerExtReportSuccessMove(V);sa.setUpdateLoadedExtReportCallback(x);sa.setCloseCallback(ba);sa.setGlobal(H);sa.createUi(ta,Va,P);sa.repaint()}ba&&ba()},function(ta,Va){return 8010001==
ta||8099001==ta||8099002==ta?(n.showPrompt(Va,2E3),!0):!1});Ca.setShowBlocking(!0);Ca.moveExtReport(B,w,ka,!0)}}}function Wa(){u.call(this);var g=this,aa=this.protectedMethod,ca,ma,ra,H,U,Ga,oa,Fa,L,n;this.setGlobal=function(x){ca=x};this.setDestCategoryTreeNode=function(x){Fa=x};this.setArrSuccessCallback=function(x){};this.setHandlerExtReportSuccessMove=function(x){L=x};this.setUpdateLoadedExtReportCallback=function(x){n=x};this.setCloseCallback=function(x){};this.createUi=function(x,V,ka){U=x;
Ga=ka;g.setSize(640,480);g.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);aa.setTitle(e.get("batchMoveData","\u6279\u91cf\u79fb\u52a8\u6570\u636e\u5185\u5bb9"));aa.setContentPaneCreator(function(){var w=$("<div>"),Ca=e.get("moveSuccessPrompt","\u6210\u529f\u5c06#1\u4e2a\u6570\u636e\u5185\u5bb9\u79fb\u52a8\u5230\u201c#2\u201d\u3002\u4ee5\u4e0b\u6570\u636e\u5185\u5bb9\u540d\u79f0\u51b2\u7a81\uff0c\u8bf7\u5904\u7406\u3002").replace("#1",V).replace("#2",Fa.getUserObject().getExtReportGroupName());
Ca=new gb(Ca);ma=new W(e.get("allIgnore","\u5168\u90e8\u5ffd\u7565"));ra=new W(e.get("allOverwrite","\u5168\u90e8\u8986\u76d6"));H=new W(e.get("allRename","\u5168\u90e8\u91cd\u547d\u540d"));ma.addActionListener(ba);ra.addActionListener(t);H.addActionListener(B);Ca=Ca.getJqUi();var ta=ma.getJqUi(),Va=ra.getJqUi(),sa=H.getJqUi();Ca.addClass("extreport-move-selection-prompt");ta.addClass("extreport-import-selection-ignore-btn");Va.addClass("extreport-import-selection-overwrite-btn");sa.addClass("extreport-import-selection-rename-btn");
w.append(Ca);w.append(ta);w.append(Va);w.append(sa);oa=new na;w.append(oa.getJqUi(x));return w});aa.setClosingChecker(g.isValidToAccepted,!0);aa.setClosingAction(function(w){});g.showDialog()};this.repaint=function(){oa.refresh()};var ba=function(){for(var x in U)U[x].strategy=na.ALL_CONFLICTTYPE[0];oa.updateUi(U)},t=function(){for(var x in U)U[x].strategy=na.ALL_CONFLICTTYPE[1];oa.updateUi(U)},B=function(){for(var x in U)U[x].strategy=na.ALL_CONFLICTTYPE[2];oa.updateUi(U)};this.isValidToAccepted=
function(x){P(U,x)};var P=function(x,V){var ka=[];for(w in x)"ignore"!=x[w].strategy&&(ka=ka.concat(x[w]));if(0==ka.length)V(!0);else{x=1==ka.length?!1:!0;var w=ca.createFacade(function(Ca){V(!0);var ta=Ca.extreportList;L&&L(ta,Fa,Ga);Ca=Ca.deleteExtreportList;n&&n(Ca)},function(Ca,ta){return 1020101==Ca||1100021==Ca?!0:!1});w.setShowBlocking(!0);w.moveExtReport(Fa.getUserObject().getExtReportGroupID(),ka,x,!1)}}}function na(){function g(ra){KTDefaultCellRender.call(this,ra);var H=this,U=this.paintCellUI;
this.paintCellUI=function(oa,Fa){H.getCurrentRowIdx()<Y.getHeadRowCount()?U(oa,Fa):($(oa),2==H.getCurrentColIdx()?Ga(oa,H.getCellWidth(),H.getCellHeight(),H.getCurrentRow()):U(oa,Fa))};var Ga=function(oa,Fa,L,n){oa=Y.createCtrlInCell(oa,Fa,L,wb);oa.setSelected(n.getUserObject().strategy);oa.setItemModels(na.ALL_CONFLICTTYPE);oa.setUserObject(n);oa.setCustomPainter(function(ba,t,B){switch(B){case na.ALL_CONFLICTTYPE[0]:ba=e.get("ignore","\u5ffd\u7565");break;case na.ALL_CONFLICTTYPE[1]:ba=e.get("overwrite",
"\u8986\u76d6");break;case na.ALL_CONFLICTTYPE[2]:ba=e.get("rename","\u91cd\u547d\u540d");break;default:ba=""}B=$("<div>");B.text(ba);B.appendTo(t)});oa.addSelectedChangedListener(function(ba,t,B){ba.getUserObject().getUserObject().strategy=B})}}var aa=this,ca,ma;this.getJqUi=function(ra){ca=Y.createTable();Y.bindTableListenerForCtrl(ca);var H=new g(ca);H.setOutsideVisible(!1);ca.setCellRender(H);ca.addColumns(3);ca.getColumn(0).setWidth(180);ca.getColumn(1).setWidth(180);ca.getColumn(2).setWidth(180);
H=Y.createHeadRow(ca);H.getCell(0).setValue(e.get("nameField","\u540d\u79f0"));H.getCell(1).setValue(e.get("type","\u7c7b\u578b"));H.getCell(2).setValue(e.get("strategy","\u5904\u7406\u7b56\u7565"));ma=ra;for(var U in ra)ma[U].strategy=na.ALL_CONFLICTTYPE[0];aa.updateUi(ra);Y.refresh(ca);ra=$(ca.getUI());ra.addClass("extreport-import-selection-table");return ra};this.updateUi=function(ra){Y.clearWithoutHead(ca);Y.refresh(ca);for(var H,U=0;U<ra.length;U++){var Ga=ra[U];H=Y.createRow(ca);H.setUserObject(Ga);
H.getCell(0).setValue(Ga.extReportName);0==Ga.extRptType?H.getCell(1).setValue(e.get("report","\u62a5\u8868")):1==Ga.extRptType&&H.getCell(1).setValue(e.get("dataSet","\u6570\u636e\u96c6"));H.getCell(2).setValue(Ga.strategy)}Y.refresh(ca)};this.refresh=function(){Y.refresh(ca)}}function Da(g,aa){Ia.call(this);var ca=this,ma=[400,300],ra=aa.getChildren(),H,U,Ga,oa=[],Fa,L,n;this.setExtReportTypeName=function(B){Fa=B};this.setCurrentGroupName=function(B){L=B};this.addSuccessCallback=function(B){oa.push(B)};
this.setGlobal=function(B){Ga=B};this.createDialog=function(){var B=$(document.body),P=$("<div class='sa-ctrl-common-modallayer'>");P.appendTo(B);var x=new za(P);Fa===e.get("report","\u62a5\u8868")?x.setTitle(e.get("copySth","\u590d\u5236#1").replace("#1",e.get("report","\u62a5\u8868"))):x.setTitle(e.get("copySth","\u590d\u5236#1").replace("#1",Fa));var V=ma[0],ka=ma[1],w=B.prop("clientWidth");B=B.prop("clientHeight");var Ca=function(){x.destroy();P.remove()};x.setBounds(w-V>>1,B-ka>>1,V,ka);x.setToolbarVisible(!1);
x.setContent(ca.createCopyExtReportPanel());x.addClosingListener(function(ta,Va){Va?t(ta.getMessageCurtain(),Ca):Ca()});x.showFooterPane();return x};this.createCopyExtReportPanel=function(){var B=$("<div>"),P=new gb;P.setText(e.get("extreportName","\u540d\u79f0"));P=P.getJqUi();H=new Ma;H.addEditedListener(function(){});var x=H.getJqUi(),V=new gb;V.setText(e.get("copyTo","\u590d\u5236\u5230"));V=V.getJqUi();U=new K;var ka=new O(ra),w=Ka.findTreeNodeByFullPath(aa,L&&L.split("/"));w||(w=Ga.getAllGroupModel()[0]);
U.setSelectedModel(w);U.setCustomPainter(function(Ca,ta){Ca=Ka.buildCategoryFullPath(Ca,"","/");ta.text(Ca);ta.attr("title",Ca)});U.setDropdownCreator(function(Ca,ta,Va){return ka.createJqPopup(Ca,ta,Va)});U.addSelectionListener(function(Ca,ta){ta&&ba(Ca.getSelectedModel().getUserObject().getExtReportGroupID())});ba(w.getUserObject().getExtReportGroupID());w=U.getJqUi();B.append(P);B.append(x);B.append(w);B.append(V);this.protectedCustomLayout(B,P,x,V,w);return B};var ba=function(B){var P=Ga.createFacade(function(x){var V=
g.getExtReportName(),ka=g.getExtRptType(),w=[],Ca=!1,ta=x.extreportList;x=0;for(var Va=ta.length;x<Va;x++){var sa=S.createInstance(ta[x]),D=sa.getExtReportName();sa=sa.getExtRptType();D==V&&sa==ka?Ca=!0:0==D.indexOf(V)&&w.push(D)}if(Ca){ka=1;for(x=!1;!x;){Ca=!1;for(x=0;x<w.length;x++)if(w[x]==V+"_"+ka){ka++;Ca=!0;break}x=!Ca}V=V+"_"+ka}H.setText(V)},function(x,V){return!1});P.setShowBlocking(!0);P.loadExtReportByGroupIDS([B])},t=function(B,P){var x=U.getSelectedModel().getUserObject().getExtReportGroupID(),
V=g.getExtRptType(),ka=$.trim(H.getText()),w;""!=ka&&50<ka.length?w=e.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""==ka?w=Fa===e.get("extreport","\u8f7b\u62a5\u8868")?e.get("nameCannotBeEmpty","\u8bf7\u8f93\u5165#1\u540d\u79f0\u3002").replace("#1",e.get("report","\u62a5\u8868")):e.get("nameCannotBeEmpty","\u8bf7\u8f93\u5165#1\u540d\u79f0\u3002").replace("#1",Fa):eb.isValidString(ka)?eb.isKeywords(ka)&&(w=e.get("isKeywords",'\u65e0\u6cd5\u4f7f\u7528"#1"\u4f5c\u4e3a\u540d\u79f0\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002').replace("#1",
ka)):w=e.get("invalidName","\u540d\u79f0\u53ea\u80fd\u7531\u6c49\u5b57\u3001\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210,\u4e14\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\u3002");if(w)B.showPrompt(w,2E3);else{w=Ga.createFacade(function(Va){for(var sa=0,D=oa.length;sa<D;sa++){var ja=oa[sa];ja&&ja(Va)}P()},function(Va,sa){var D=Va.toString();if(8099001==Va||8099002==Va)return B.showPrompt(sa,2E3),!0;if("80"==D.substr(0,2)&&7==D.length){var ja;8010001==Va&&"0"==V?ja=e.get("duplicateNameExtReportInCategory",
"\u5b58\u5728\u540c\u540d\u62a5\u8868\u3002"):8010001==Va&&"1"==V?ja=e.get("duplicateNameDataSetInCategory","\u5b58\u5728\u540c\u540d\u6570\u636e\u96c6\u3002"):8010005==Va&&(ja=e.get("RefrenceCirCle","\u5b58\u5728\u5faa\u73af\u5f15\u7528\u3002"));B.showPrompt(ja,2E3);return!0}return!1});w.setShowBlocking(!0);var Ca=g.getExtReportID(),ta=n&&n.isOn();w.copyExtReport(Ca,x,ka,g.getExtRptType(),g.getDataSetType(),ta)}};this.protectedCustomLayout=function(B,P,x,V,ka){Ba.layoutCtrl(P,20,20,80,23);Ba.layoutCtrl(x,
110,20,240,23);Ba.layoutCtrl(V,20,65,80,23);Ba.layoutCtrl(ka,110,65,240,23);g.isPreset()&&(Ba.layoutCtrl(V,20,110,80,23),Ba.layoutCtrl(ka,110,110,240,23),P=new gb,P.setText(e.get("extreportType","\u7c7b\u578b")),P=P.getJqUi(),x=new Ma,x.setText(e.get("myCategory","\u6211\u7684\u76ee\u5f55")),x.setEnabled(!1),x=x.getJqUi(),n=new A,n.setOn(!0),V=n.getJqUi(),"0"==g.getExtRptType()?(ka=new gb(e.get("copyIncludedExtReports","\u540c\u65f6\u590d\u5236\u5f15\u7528\u7684\u62a5\u8868/\u6570\u636e\u96c6")),
Ba.layoutCtrl(V,180,155,31,23)):(ka=new gb(e.get("copyOnlyIncludedDataSets","\u540c\u65f6\u590d\u5236\u5f15\u7528\u7684\u6570\u636e\u96c6")),Ba.layoutCtrl(V,150,155,31,23)),ka=ka.getJqUi(),P.appendTo(B),x.appendTo(B),ka.appendTo(B),V.appendTo(B),Ba.layoutCtrl(P,20,65,80,23),Ba.layoutCtrl(x,110,65,240,23),Ba.layoutCtrl(ka,20,155,150,23),"en"==k.getUrlParamValue("language")&&(Ba.layoutCtrl(ka,20,155,220,23),"0"==g.getExtRptType()?Ba.layoutCtrl(V,240,155,31,23):Ba.layoutCtrl(V,180,155,31,23)))}}function O(g){var aa,
ca;this.createJqPopup=function(L,n,ba){aa=ba;var t=new q;t.setRootVisible(!1);t.setNodePainter(ra);t.setRoot(U(g));t.addSelectingListener(H);t.getRoot().setExpanded(!0);t.getRoot().setSelectable(!1);t.setLineHeight(30);t.getJqUi().css({overflow:"hidden auto",border:"1px solid rgba(138, 153, 170, 0.4)",width:"100%",position:"absolute","max-height":"162px",background:"white"});ma(t,n,t.getRoot().getAllChildren());t.setSelecteds([ca]);setTimeout(function(){t.scrollSelectedToVisible()},0);t.getJqUi().appendTo(L);
return[-1,Math.min(30*g.length,162)]};var ma=function(L,n,ba){for(var t=0;t<ba.length;t++){var B=ba[t];B instanceof q.BranchNode&&ma(L,n,B.getAllChildren());if(n.getUserObject().getExtReportGroupID()===B.getUserObject().getUserObject().getExtReportGroupID()){L.expandToNode(B,!0);ca=B;break}}},ra=function(L,n){n=n.getUserObject().getUserObject().getExtReportGroupName();L.css("width","calc(100% - 30px)");L.css("padding-left","4px");L.css("padding-right","4px");L.text(n);L.attr("title",n)},H=function(L,
n){aa(n.getUserObject())},U=function(L){var n=new ea,ba=new xa;ba.setUserObject(n);n=Ga(ba);Fa(n,L);return n},Ga=function(L){var n=new q.BranchNode;n.setUserObject(L);return n},oa=function(L){var n=new q.LeafNode;n.setUserObject(L);return n},Fa=function(L,n){if(n&&0!==n.length)for(var ba=0;ba<n.length;ba++){var t=n[ba];if(t instanceof xa){var B=t.getChildren();B&&0<B.length?(t=Ga(t),Fa(t,B),L.addChild(t)):(B=oa(t),L.addChild(B))}else B=oa(t),L.addChild(B)}}}function Z(){var g,aa=[],ca,ma,ra=function(){var H=
new M;H.setDescName(e.get("sortFieldCreateTime","\u521b\u5efa\u65f6\u95f4"));H.setGroupName("SortField");H.setPropertyName("createTime");var U=new M;U.setDescName(e.get("sortFieldName","\u540d\u79f0"));U.setGroupName("SortField");U.setPropertyName("name");aa.push(H);aa.push(U);g=new hb;g.setArrSortField(aa);g.setFunSortModel(ma);var Ga=g.getSortMenuModel();H=e.get("sort","\u6392\u5e8f");U=new K;U.setSelectedModel(H);U.setDropdownCreator(function(oa,Fa,L,n){Fa=new l;Fa.setModel(Ga);Fa.setHideListener(function(){n()});
Fa=Fa.getJqUi();oa.append(Fa);return[Fa.prop("offsetWidth"),Fa.prop("offsetHeight")]});return ca=U.getJqUi()};this.getJqUi=function(){ca||(ca=ra());return ca};this.setSortModel=function(H){ma=H};this.sort=function(){g.sort()}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.manage&&(com.kingdee.bos.extreport.manage=
{});"undefined"==typeof com.kingdee.bos.extreport.manage.ui&&(com.kingdee.bos.extreport.manage.ui={});var p=com.kingdee.bos.extreport.manage.ui;p.Main=function(){function g(a){KTDefaultCellRender.call(this,a);var b=this,c,d,f;this.setFunMoveUpCategorySuccessCallback=function(r){c=r};this.setFunDeleteCategorySuccessCallback=function(r){d=r};this.setFunAddCategorySuccessCallback=function(r){f=r};this.paintCellUI=function(r,X){var Q=b.getCurrentRowIdx(),J=b.getCell().getValue();b.getCell().getTreeModel();
var va=J.getUserObject().getExtReportGroupName(),Oa=J.getUserObject().getExtReportGroupID(),$a=$(r);$a.addClass("extreport-category-cell-item");var lb=$("<span>");lb.addClass("extreport-category-list-item");lb.attr("title",va);var Qb=qb;Qb&&va?(Pb||(Pb=new Ya),Pb.doHighLightText(lb,va,Qb)):lb.text(va);$(r).on("click",{cellNode:J},Uc);w&&w.getExtReportGroupID()==Oa&&$a.addClass("extreport-category-cell-item-selected");J.getUserObject().isPreset()?(r=B.measureWidth(e.get("preset","\u9884\u7f6e"))+5,
Va[Oa]=$a,Ba.layoutCtrl(lb,r,8,null,null)):(ta[Oa]=$a,Ba.layoutCtrl(lb,10,8,null,null));$(X).append(lb);qb||Vc(X,J,Q)};var z=function(r,X,Q){$(".extreport-category-cell-item-selected").removeClass("extreport-category-cell-item-selected");var J=Q.getUserObject();w=J;X.addClass("extreport-category-cell-item-selected");X=X.find(".extreport-category-list-item")[0];var va=$(X),Oa=r.getText();Oa=Oa.trim();var $a=Oa.length;if(Oa)for(var lb=RegExp("/"),Qb=0;Qb<$a;Qb++)if(lb.test(Oa.substr(Qb,1))){Q=e.get("categoryNameCanNotDiagonalSymbol",
'\u540d\u79f0\u4e0d\u80fd\u5305\u542b "/" \u5b57\u7b26\u3002');Pa.getMessageCurtain().showPrompt(Q,2E3);return}J.getExtReportGroupID()&&(J.getExtReportGroupName()==Oa||!Oa||50<$a)?(r.getJqUi().hide(),va.show(),50<$a&&(Q=e.get("CategoryNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),Pa.getMessageCurtain().showPrompt(Q,2E3))):Oa?50<$a?(Q=e.get("CategoryNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),Pa.getMessageCurtain().showPrompt(Q,
2E3),r=I.getRowIndex(Ja[J.getExtReportGroupID()]),I.removeRow(r),Y.refresh(I)):N(r,X,J):(r=I.getRowIndex(Ja[J.getExtReportGroupID()]),I.removeRow(r),delete Ja[J.getExtReportGroupID()],sa.splice(sa.indexOf(Q),1),J=Q.getParent()?Q.getParent().getChildren():ja.getChildren(),J.splice(J.indexOf(Q),1),Y.refresh(I))},N=function(r,X,Q){var J=new ea;J.setExtReportGroupID(Q.getExtReportGroupID());J.setExtReportGroupName(r.getText().trim());J.setIsPreset(Q.isPreset());J.setOrderID(Q.getOrderID());J.setParentID(Q.getParentID());
var va=Pa.createFacade(function(Oa){var $a=Q.getExtReportGroupID();if(!$a){var lb=Ja[Q.getExtReportGroupID()];delete Ja[Q.getExtReportGroupID()];Ja[Oa]=lb}Xa(Oa,r,X,Q);$a||f(Q);Oa=$a?e.get("editCategorySuccess","\u4fee\u6539\u76ee\u5f55\u6210\u529f\u3002"):e.get("addCategorySuccess","\u65b0\u589e\u76ee\u5f55\u6210\u529f\u3002");Pa.getMessageCurtain().showSuccess(Oa,2E3)},function(Oa,$a){return 8010002==Oa?(Oa=e.get("extreportGroupNameHasExist","\u8be5\u76ee\u5f55\u540d\u79f0\u5df2\u5b58\u5728\u3002"),
Pa.getMessageCurtain().showPrompt(Oa,2E3),r.requestFocus(),!0):!1});va.setShowBlocking(!0);Q.getExtReportGroupID()?va.saveExtReportGroup(J):va.editExtReportGroup(J)},Xa=function(r,X,Q,J){var va=X.getText();va=va.trim();Q=$(Q);Q.text(va);Q.attr("title",va);X.setText(va);X.getJqUi().hide();Q.show();J.getExtReportGroupID()||J.setExtReportGroupID(r);J.setExtReportGroupName(X.getText().trim());sa.filter(function(Oa){return Oa.getUserObject().getExtReportGroupID()==J.getExtReportGroupID()})[0].setName(J.getExtReportGroupName())},
nb=function(r,X,Q){if(!Pa.isEdittingCategory()){var J=$(r.currentTarget);if((r=J.data("menu"))&&r.isShowing())J.data("menu",null),r.hide();else{Q=new fa;Q.addItemModel(ab(e.get("addSameLevelCategory","\u65b0\u5efa\u540c\u7ea7\u76ee\u5f55"),yb,X));Q.addItemModel(ab(e.get("addSubLevelCategory","\u65b0\u5efa\u5b50\u7ea7\u76ee\u5f55"),Wc,X));Q.addItemModel(ab(e.get("editExtReportCategory","\u91cd\u547d\u540d"),Xc,X));Q.addItemModel(ab(e.get("deleteExtReportCategory","\u5220\u9664"),Yc,X));r=new l;r.setModel(Q);
r.setHideListener(function(){J.data("menu",null)});J.data("menu",r);X=J.outerHeight();Q=H;var va=[0,X];va=Ba.upwardCoordinate(J[0],va,Q[0]);r.show(Q,va[0],va[1],J,!0,[0,-X])}}},ab=function(r,X,Q){r=l.createActionMenuItem(r,X);r.setUserObject(Q);return r},yb=function(r){r=r.getUserObject();r=ob(r,"ADD_CURRENT");Y.refresh(I);var X=ta[r.getUserObject().getExtReportGroupID()],Q=X.children()[0];ic(X,Q,r)},ob=function(r,X){var Q=r.getUserObject(),J=ja.getChildren();J=r.getParent()?r.getParent().getChildren():
J;if("ADD_CURRENT"==X){var va=r.getParent();va?(va=Cb(va),J=sa.indexOf(J[0])+va):J=sa.length}else"ADD_SUB"==X?(J=r.getChildren())&&0<J.length?(va=Cb(r),J=sa.indexOf(r)+va+1):J=sa.indexOf(r)+1:J=void 0;va=new xa;var Oa=new ea;Oa.setIsPreset(!1);"ADD_CURRENT"==X?(Oa.setParentID(Q.getParentID()?Q.getParentID():""),va.setParent(r.getParent()),r.getParent()?r.getParent().addChild(va):ja.addChild(va),va.setLevel(r.getLevel())):"ADD_SUB"==X&&(Oa.setParentID(Q.getExtReportGroupID()),va.setParent(r),r.addChild(va),
va.setLevel(r.getLevel()+1));va.setExpanded(!1);va.setUserObject(Oa);va.setName(Oa.getExtReportGroupName());r=I.insertRow(J);r.setHeight(35);X=r.getCell(0);X.setValue(va);Q=new KTCellTreeModel(va.getLevel());Q.setExpanded(va.isExpanded());X.setTreeModel(Q);Ja[va.getUserObject().getExtReportGroupID()]||(Ja[va.getUserObject().getExtReportGroupID()]=r);sa.splice(J,0,va);return va},Cb=function(r){if(!Array.isArray(r.getChildren()))return 0;for(var X=0,Q=0;Q<r.getChildren().length;Q++){var J=r.getChildren()[Q];
0<J.getChildren().length?(X++,X+=Cb(J)):X++}return X},Wc=function(r){r=r.getUserObject();if(3==r.getLevel())r=e.get("theMaxCategoryLevel","\u6700\u591a\u53ef\u652f\u63014\u7ea7\u76ee\u5f55\uff0c\u5f53\u524d\u76ee\u5f55\u4e3a\u7b2c4\u7ea7\u76ee\u5f55\uff0c\u65e0\u6cd5\u65b0\u589e\u4e0b\u7ea7\u76ee\u5f55\u3002"),Pa.getMessageCurtain().showPrompt(r,2E3);else{r=ob(r,"ADD_SUB");w=r.getUserObject();Y.refresh(I);var X=$(".extreport-category-cell-item-selected");X.removeClass("extreport-category-cell-item-selected");
var Q=X.children()[0];ic(X,Q,r)}},Xc=function(r){r=r.getUserObject();var X=$(".extreport-category-cell-item-selected");X.removeClass("extreport-category-cell-item-selected");var Q=r.getChildren()&&0<r.getChildren().length?X.children()[1]:X.children()[0];var J=X.find(".extreport-category-list-item")[0];$(J).hide();ic(X,Q,r)},ic=function(r,X,Q){var J=Q.getUserObject(),va=new Ma;va.setEnabled(!0);va.addBlurListener(function(){z(va,r,Q)});var Oa=va.getJqUi();Oa.addClass("extreport-category-name-editting");
Oa.show();Oa.on("click",function($a){$a.stopPropagation()});Oa.on("keydown",function($a){13==($a.keyCode||$a.which||$a.charCode)&&z(va,r,Q)});Oa.appendTo(X);va.setText(J?J.getExtReportGroupName():"");va.requestFocus()},Yc=function(r){r=r.getUserObject();r.getUserObject().getExtReportGroupID()&&Zc(r)},Zc=function(r){var X=r.getUserObject().getExtReportGroupID(),Q=Pa.createFacade(function(J){(J=J.extreportList)&&0<J.length?(J=e.get("deleteExtReportBeforeExtReportGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u62a5\u8868\u3001\u6570\u636e\u96c6\u518d\u5220\u9664\u76ee\u5f55\u3002"),
Pa.getMessageCurtain().showPrompt(J,2E3)):1==Pa.getAllGroupModel().length?(J=e.get("atLeastNeedOneUserExtReportGroup","\u81f3\u5c11\u9700\u8981\u4fdd\u7559\u4e00\u4e2a\u76ee\u5f55\u3002"),Pa.getMessageCurtain().showPrompt(J,2E3)):$c(r)},function(J,va){return!1});Q.setShowBlocking(!0);Q.loadExtReportByGroupIDS([X])},$c=function(r){var X=Ra.createFeedbackDialog();X.setOptionType(Ra.OPTION_OK_CANCEL);X.setMsgImageType(Ra.MSG_DELETE);X.setMessage(e.get("confirmToDeleteCategory","\u786e\u5b9a\u8981\u5220\u9664\u76ee\u5f55'#1'\u5417\uff1f").replace("#1",
r.getUserObject().getExtReportGroupName()));X.setClosingChecker(function(Q){Q==Ra.RETURN_OK&&ad(r);return!0});X.showDialog()},ad=function(r){var X=r.getUserObject().getExtReportGroupID();if(r.getChildren()&&0<r.getChildren().length)X=e.get("deleteCategoryFirst","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u5b50\u76ee\u5f55\u518d\u5220\u9664\u76ee\u5f55\u3002"),Pa.getMessageCurtain().showPrompt(X,2E3);else{var Q=Pa.createFacade(function(J){d(r);J=e.get("deleteExtReportGroupSuccess","\u5220\u9664\u76ee\u5f55\u6210\u529f\u3002");
Pa.getMessageCurtain().showSuccess(J,2E3)},function(J,va){return 8010003==J?(J=e.get("deleteExtReportBeforeExtReportGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u62a5\u8868\u518d\u5220\u9664\u76ee\u5f55\u3002"),Pa.getMessageCurtain().showPrompt(J,2E3),!0):!1});Q.setShowBlocking(!0);Q.deleteExtReportGroup(X)}},Vc=function(r,X,Q){var J=$(r);if(X.getUserObject().isPreset())bd(J);else{Q=0!=Q;if(X.getParent()){var va=X.getParent().getChildren()[0].getUserObject().getExtReportGroupName();Q=
Q&&X.getUserObject().getExtReportGroupName()!==va}var Oa=$("<span>");Q&&(Oa.addClass("moveup-button"),Oa.attr("title",e.get("moveupCategory","\u4e0a\u79fb\u76ee\u5f55")),Oa.on("click",function(){c(X,r)}),E.background(Oa,"icon-order-up"),Oa.appendTo(J));var $a=$("<span>");$a.addClass("group-operation-button");$a.attr("title",e.get("moreOperations","\u66f4\u591a\u64cd\u4f5c"));$a.on("mousedown",function(lb){nb(lb,X,r)});E.background($a,"menu");$a.appendTo(J);J.on("mouseenter",function(){var lb=J.find(".extreport-category-list-item");
lb&&0<lb.length&&$(lb[0]).css("right","50px");w.getExtReportGroupName()===X.getUserObject().getExtReportGroupName()?(E.background(Oa,"icon-order-up_hover"),E.background($a,"menu_hover")):(E.background(Oa,"icon-order-up"),E.background($a,"menu"))});J.on("mouseleave",function(){var lb=J.find(".extreport-category-list-item");lb&&0<lb.length&&$(lb[0]).css("right","10px")});J.on("mouseup",function(){E.background(Oa,"icon-order-up_hover");E.background($a,"menu_hover")})}},bd=function(r){var X=$("<div>");
X.text(e.get("preset","\u9884\u7f6e"));X.addClass("extreport-category-dir-preset");X.appendTo(r)},Uc=function(r){if(!Pa.isEdittingCategory()){for(var X=$(r.currentTarget),Q=$(".extreport-category-cell-item-selected"),J=0;J<Q.length;J++)Q.eq(J).removeClass("extreport-category-cell-item-selected"),Q.eq(J).find(".lower-triangle").css("border-top-color","#bbbbbb"),Q.eq(J).find(".right-triangle").css("border-left-color","#bbbbbb");X.addClass("extreport-category-cell-item-selected");(Q=$(".extreport-category-dir-preset_selected"))&&
Q.removeClass("extreport-category-dir-preset_selected");(Q=X.find(".extreport-category-dir-preset"))&&Q.addClass("extreport-category-dir-preset_selected");X.find(".lower-triangle").css("border-top-color","#ffffff");X.find(".right-triangle").css("border-left-color","#ffffff");w=r=r.data.cellNode.getUserObject();zc(r)}}}function aa(a){KTDefaultTreeHandlerRender.call(this,a);var b=this;this.create=function(c,d,f,z,N,Xa,nb){var ab=20*c.getLevel()+15;var yb=ab+17;var ob=null;if(b.protectedMethod.isTreeNodeHasChildren(c,
d,f)||c.isHaveHandlerAlways())ob=b.protectedMethod.createAbsoluteHtmlElement("div",ab,N,17,nb),ob.style.cursor="pointer",ab=$(ob),ab.addClass("tree-handler-icon"),f=$("<div>"),f.addClass("tree-handler-triangle-icon"),ab.append(f),c.isExpanded()?(f.addClass("lower-triangle"),ab.css("left",20*c.getLevel()+22+"px"),f.removeClass("right-triangle")):(f.addClass("right-triangle"),ab.css("left",20*c.getLevel()+15+"px"),f.removeClass("lower-triangle")),ab=Ja[w&&w.getExtReportGroupID()],ab=a.getRowIndex(ab),
d===ab&&(c.isExpanded()?f.css("border-top-color","#ffffff"):f.css("border-left-color","#ffffff"));ob=[ob,yb,N,null];c=ob[0];d=ob[1];yb=ob[2];ob=ob[3];z=b.protectedMethod.createAbsoluteHtmlElement("span",d,yb,z+Xa-d,N+nb-yb);return[c,z,ob]}}function ca(){var a,b,c;this.isSupported=function(){return!0};this.needRefreshExtReports=function(){return!1};this.getType=function(){return a};this.getIconFileName=function(){return c};this.getDisplayName=function(){return b};this.createCardUi=function(d){throw Error("override me");
};this.createExtReportModel=function(){throw Error("override me");};this.protectedMethod={setType:function(d){a=d},setDisplayName:function(d){b=d},setIconFileName:function(d){c=d}}}function ma(){ca.call(this);var a=this.protectedMethod,b=this;a.setIconFileName("icon-card-extreport");a.setType(S.TYPE_EXTRPT);a.setDisplayName(e.get("extreport","\u8f7b\u62a5\u8868"));var c;this.createCardUi=function(d){d=new wa(d);d.setIconFileName(b.getIconFileName());d.setExtReportTypeName(b.getDisplayName());d.setRefreshExtReportFunction(c);
return d};this.createExtReportModel=function(){var d=new S;d.setExtRptType(S.TYPE_EXTRPT);return d};this.needRefreshExtReports=function(){return!0};this.setRefreshExtReportFunction=function(d){c=d}}function ra(){ca.call(this);var a=this.protectedMethod,b=this;a.setIconFileName("icon-card-dataset");a.setType(S.TYPE_DATASET);a.setDisplayName(e.get("dataSet","\u6570\u636e\u96c6"));var c;this.createCardUi=function(d){d=new da(d);d.setIconFileName(b.getIconFileName());d.setExtReportTypeName(b.getDisplayName());
d.setRefreshExtReportFunction(c);return d};this.createExtReportModel=function(){var d=new S;d.setExtRptType(S.TYPE_DATASET);return d};this.needRefreshExtReports=function(){return!0};this.setRefreshExtReportFunction=function(d){c=d}}var H,U,Ga,oa,Fa,L,n,ba,t,B=new Ua;B.setFontSize(12);var P=[],x=[],V=[],ka=[],w,Ca=!1,ta={},Va={},sa=[],D=[],ja,Na,I,la,Ta,Ja={},Za,bb,kb,qb,sb=[],Pb,xb,Eb,Rb,Ab,Fb,ub,ib=[],Db=!1,ac=0,bc=0,Sb=0,vb,mb,Hb,fb,cc=Sa.AllFilterType,Tb=cc[0],Gb,Ac,jc="createTime",kc="DESC",dc,
Bb,lc,Wb,Ib,Jb,Xb,Kb,Bc,Lb,mc=!1,Ub,Pa=new function(){var a,b=new db;this.isShowGUIEnterIcon=function(){return mc};this.addShowGUIEnterIconListener=function(c){b.addListener(c)};this.fireShowGUIEnterIconEvent=function(){b.fireEvent(function(c){c()})};this.getAllGroupModel=function(){for(var c=[],d=0;d<I.getRowsCount();d++){var f=I.getRow(d).getCell(0).getValue();c.push(f)}return c};this.isEdittingCategory=function(){return 0<$(".extreport-category-cell-item-selected").find(".extreport-category-name-editting :visible").length};
this.getMessageCurtain=function(){a||(a=new v,a.getJqUi().appendTo($("body")));return a};this.createFacade=function(c,d,f){var z=ya.getRemoteImpl();return new R(z,c,function(N,Xa){return d?d(N,Xa):!1},f)}};this.createJqUi=function(){G.loadJs("biz-common/qing-biz-common.js");G.loadSkinCss("biz-common","biz-common");G.loadSkinJs("biz-common","skin");G.loadI18n("biz-common","biz-common");G.loadJs("common/qing-schedule.js");G.loadI18n("common","qing-schedule");G.loadSkinCss("publish","qing-publish");
G.loadSkinJs("publish","skin");G.loadI18n("publish","publish");G.loadJs("schema-manage/schema-manage-initialize.js");G.loadJs("schema-manage/schema-manage-ui.js");G.loadJs("publish/qing-publish.js");G.loadSkinCss("timedpush","qing-timedpush");G.loadSkinJs("timedpush","skin");G.loadI18n("timedpush","timedpush");G.loadJs("timedpush/qing-timedpush.js");G.loadJs("lightapp/common/qing-lapp-env.js");G.loadJs("timedpush/qing-timedpush-lapp.js");G.loadJs("timedpush/html2canvas.js");G.loadJs("core/qing-charts.js");
G.loadJs("core/qing-main.js");G.loadJs("dashboard/dsb-main.js");G.loadSkinJs("imagelib","skin");G.loadI18n("dashboard","dsb-integration");G.loadSkinCss("imagelib","qing-imagelib");G.loadJs("imagelib/imagelib.js");G.loadI18n("imagelib","imagelib");G.loadJs("dashboard/dsb-integration.js");G.loadSkinCss("dashboard","dsb-integration");G.loadSkinJs("linkage","skin");G.loadJs("linkage/linkage.js");G.loadSkinCss("linkage","linkage");H=$("<div>");H.addClass("extreport-manage");U=$("<div>");U.addClass("extreport-manage-toolbar");
dc=Mb(U,!1,cd,"btn_newCard",e.get("create","\u65b0\u5efa"),e.get("create","\u65b0\u5efa"));dc.getJqUi().css("margin-left","12px");Ib=Mb(U,!1,dd,"",e.get("deleteExtReport","\u5220\u9664"),e.get("deleteExtReport","\u5220\u9664"));Ib.setEnabled(!1);Jb=Mb(U,!1,ed,"",e.get("move","\u79fb\u52a8"),e.get("move","\u79fb\u52a8"));Jb.setEnabled(!1);Xb=Mb(U,!1,fd,"",e.get("copy","\u590d\u5236"),e.get("copy","\u590d\u5236"));Xb.setEnabled(!1);var a=$("<input type='file' id='uploadBtn'>");a.addClass("import-extreport-file");
a.attr("accept",[".kds",".kdsql",".qing-rpt"]);a.on("change",function(d){gd(d);a.val("")});a.appendTo(H);Bb=new h;Bb.setText(e.get("importExtReport","\u5bfc\u5165"));Bb.setIconSetter(function(d,f){E.background(d,f)});Bb.setIconName("btn_import");Bb.setTooltips(e.get("importExtReport","\u5bfc\u5165"));Bb.getJqUi().on("click",function(){a.click()});Bb.getJqUi().appendTo(U);Bb.getJqUi().attr("accept",[".kds",".kdsql",".qing-rpt"]);lc=Mb(U,!1,hd,"btn_export",e.get("exportExtReport","\u5bfc\u51fa"),e.get("exportExtReport",
"\u5bfc\u51fa"));Wb=id(U);Mb(U,!1,jd,"",e.get("refresh","\u5237\u65b0"),e.get("refresh","\u5237\u65b0"));U.appendTo(H);var b=$("<div>");b.addClass("extreport-toolbar-right");b.css({position:"relative","float":"right",height:"30px"});b.appendTo(U);b=$("<div>");b.addClass("extreport-search-icon");b.attr("title",e.get("search","\u641c\u7d22"));E.backgroundWithHover(b,"icon_search");b.on("mouseenter",function(){tb()&&0<ka.length?Cc(ka):!tb()&&0<V.length?Cc(V):Dc()});b.appendTo(U);var c=kd();ld(c,b);Ec();
b=new ua;b.setCallbackImmediately(function(){Ec();if(L&&vb){var d=fb&&"block"==fb.getJqUi().css("display");L&&L.css({width:Nb(d)+"px"});xb&&xb.css({width:Nb(d)+"px"});L&&L.css({height:document.documentElement.clientHeight-55-40-8+"px"});n&&n.css({width:Nb(d)+"px"});Lb&&Lb.setMessageDialogBounds(null,5,10,null)}});b.setCallback(function(){nc(w&&w.getExtReportGroupName())});b.setDelay(250);b.observe();b=$("<div>");b.addClass("extreport-manage-container");md(b);b.appendTo(H);Fc();$(document.body).on("keydown",
function(d){d.altKey&&d.shiftKey&&71==d.keyCode&&(mc=!mc,Pa.fireShowGUIEnterIconEvent())});return H};var ld=function(a,b){var c=50;"en"==k.getUrlParamValue("language")&&(c=80);G.setCallback(function(){var d=com.kingdee.bos.qing.message.common.Integration;d.setRemoteUrl(ya.getMessageRemoteUrl());d.setImportJSCodeForManager(ya.getImportJSCodeForManager());d.setAppId(ya.getAppId());Lb=new com.kingdee.bos.qing.message.ui.Main;Lb.setFunOpenMessageDialog(function(){Lb.setViewSize(null,5,10,null)});Lb.setMessageWidth(c);
d=Lb.getJqUi();d.css({position:"absolute","float":"right",top:"50%","margin-top":"-9px",right:"10px"});var f=c+20;Gb.getJqUi().css("right",f+"px");f=f+Gb.getJqUi().width()+11;b.css("right",f+"px");d.appendTo(U);d=Ha.decodeParamFromUrl(window.location.search,"path");com.kingdee.bos.qing.timedpush.LappIntegration.setLappPrivateUrl((d?d:"/ierp")+"/qing/lappPrivateInfo.do")});G.loadSkinCss("message","message");G.loadSkinJs("message","skin");G.loadJs("message/message-manage-ui.js");G.loadI18n("message",
"message");return c},Ec=function(){document.body.style.height=document.documentElement.clientHeight+"px"},id=function(a){var b=com.kingdee.bos.qing.ui.component.MenuItemModel,c=new com.kingdee.bos.qing.ui.component.MenuModel;b=new b(nd);b.setUserObject();b.setText(e.get("publishManager","\u53d1\u5e03\u7ba1\u7406")+"...");c.addItemModel(b);b=e.get("manager","\u7ba1\u7406");return Mb(a,!0,function(){return c},"manager",b,b)},nd=function(a){a=ya.getFunPublishContext()();var b=com.kingdee.bos.qing.publish.common.PublishManagerDialog;
var c=ya.getFunPublishRemoteImpl()();var d=ya.getFunPublishContentEditEntrance()();(new b(c,a,d,!0)).showDialog()},od=function(a,b,c,d){var f=a.data("menu");if(f&&f.isShowing())a.data("menu",null),f.hide();else{f=new l;f.setModel(c());f.setHideListener(function(){a.data("menu",null)});a.data("menu",f);c=a.prop("offsetLeft");var z=a.prop("offsetHeight")+a.prop("offsetTop");f.show(d,c,z,b,!0)}},jd=function(a){if(a&&!a.getUserObject()&&w){var b=w.getExtReportGroupName();var c=w.getExtReportGroupID()}ec(b,
c)};this.funRefreshData=function(){if(w){var a=w.getExtReportGroupName();var b=w.getExtReportGroupID()}ec(a,b)};var ec=function(a,b){P=[];x=[];V=[];ka=[];Ca=!1;Fc(a,function(){Y.clear(I);Y.clear(la)},b)},kd=function(){Gb=new wb;Gb.setItemModels(cc);Gb.setSelected(cc[0]);Gb.setCustomPainter(function(b,c,d){b=e.get(d.getI18nKey(),d.getDefaultDesc());c.text(b);c.attr("title",b)});Gb.addSelectedChangedListener(function(b,c,d){Tb=d;b=w.getExtReportGroupID();b=oc(b);Gc(b);fb&&"block"==fb.getJqUi().css("display")&&
pc()});var a=Gb.getJqUi();a.addClass("extreport-searchtype-combobox");Ba.layoutCtrlWithLRTB(a,null,80,84);Ba.layoutCtrlMiddleAlign(a,44);a.appendTo(U);return a},Gc=function(a){var b=$(".extreport-card-container").find(".extreport-card"),c={},d=ub&&ub.isChecked();a.forEach(function(Xa){c[Xa.getExtReportID()]=!0});for(var f=0;f<b.length;f++){var z=$(b[f]),N=z.attr("id");c[N]?d&&!$("#"+N+" .sa-ctrl-checkbox-checked_enabled").length?z.hide():z.show():z.hide()}d||a.forEach(function(Xa){$("#"+Xa.getExtReportID()).length||
fc(Xa).appendTo(L)});Ob()},sc=function(){if(w){var a=w.getExtReportGroupID(),b=mb&&mb.getText();a=oc(a,b);qc();for(var c in a)fc(a[c]).appendTo(L);rc();Ob()}},Hc=function(){Db?(0<ib.length?(Ib.setEnabled(!0),Jb.setEnabled(!0)):(Ib.setEnabled(!1),Jb.setEnabled(!1)),1==ib.length?Xb.setEnabled(!0):Xb.setEnabled(!1)):(Xb.setEnabled(!1),Ib.setEnabled(!1),Jb.setEnabled(!1))},Ob=function(){if(w){var a=w.getExtReportGroupID(),b=P;tb()&&(b=x);var c=[],d;for(d in b){var f=b[d];f.getExtReportGroupID()==a&&c.push(f)}bc=
c.length;Rb.text(e.get("selectionInfoTotalCount","\u5171#1\u4e2a").replace("#1",bc));Db&&(ac=ib.length,0==ac?rc():(a=$(".extreport-card .sa-ctrl-checkbox-checked_enabled:visible").length,$(".extreport-card:visible").length==a?Eb.text(e.get("selectInfoDeselectAll","\u53d6\u6d88\u5168\u9009")):Eb.text(e.get("selectInfoSelectAll","\u9009\u62e9\u5168\u90e8")),Ab.text(e.get("selectInfoSelected","\u5df2\u9009#1\u4e2a\uff0c").replace("#1",ac)),Ab.show(),ub.getJqUi().show()));mb&&mb.getText()||Tb!=cc[0]?
(Sb=$(".extreport-card:visible").length,Db?Ab.show():Ab.hide(),Fb.text(e.get("selectInfoFilter","\u7b5b\u9009\u540e\u5c55\u793a#1\u4e2a").replace("#1",Sb)),Fb.show(),Rb.text(e.get("selectionInfoTotalCountWithComma","\u5171#1\u4e2a\uff0c").replace("#1",bc)),0===Sb&&Eb.hide()):(Sb=0,Fb.hide(),Eb.show())}},rc=function(){ib=[];Ab.hide();ub.setChecked(!1);ub.getJqUi().hide();Db=!1;Eb.text(e.get("selectInfoSelectAll","\u9009\u62e9\u5168\u90e8"));Hc();for(var a=$(".extreport-card-container").find(".extreport-card"),
b=0;b<a.length;b++){var c=$(a[b]);tb()||(c.find(".edit-icon")[0].style.display=null);c.find(".selected-icon")[0].style.display=null}Ic()},md=function(a){vb=new y;vb.setHorizontalSplit(!0);vb.setEnabled(!0);vb.setSplitLineWide(4);vb.setResizeMode(y.RESIZE_MODE_FIRST_FIXED);vb.setFirstSize(230,200,640);vb.setSecondSize($(document).width()-234,0,-1);vb.getJqUi().addClass("sa-qing-publish-manager");a.append(vb.getJqUi());Ga=pd();Fa=qd();xb=rd();L=sd();Fa.append(xb);Fa.append(L);vb.setFirstChild(y.createChildWrapper(Ga,
function(){Ga&&Ga.css({width:vb.getNonemptyFirstWide()+"px"});var b=fb&&"block"==fb.getJqUi().css("display");L&&L.css({width:Nb(b)+"px"});xb&&xb.css({width:Nb(b)+"px"});L&&L.css({height:document.documentElement.clientHeight-55-40-8+"px"});n&&n.css({width:Nb(b)+"px"});I&&la&&(Y.refresh(I),Y.refresh(la))}));vb.setSecondChild(y.createChildWrapper(Fa))},Dc=function(a){if(Hb)Hb.css("display","block");else{Hb=$("<div>");mb=new F;mb.setSearchListenerDelay(1E3);mb.addSearchListener(pc);mb.setAlwaysShowCleanIcon(!0);
mb.setShowSearchIcon(!0);mb.setPlaceholder(e.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));a=mb.getJqUi();a.addClass("extreport-search-box");var b=165;"en"==k.getUrlParamValue("language")&&(b=185);Ba.layoutCtrlWithLRTB(a,null,b,180);Ba.layoutCtrlMiddleAlign(a,44);b=a.find(":input");b.on("keydown",function(c){13==(c.keyCode||c.which||c.charCode)&&pc()});b.focus(function(){mb.getText()&&Yb(!0)});Hb.on("mouseleave",function(){mb.getText()||Hb.css("display","none")});a.appendTo(Hb);
Hb.appendTo(U)}mb.setFoucs()},gc=function(a,b,c){a=td(b,a);c&&c.trim()&&(a=a.filter(function(d){return-1<d.getExtReportName().toUpperCase().indexOf(c.toUpperCase())||d.getDescription()&&-1<d.getDescription().toUpperCase().indexOf(c.toUpperCase())}),qb&&(a=a.filter(function(d){d=d.getExtReportGroupID();return!Ja[d].isHide()})));return a},td=function(a,b){var c=[];switch(a.getTypeID()){case "ALL_TYPE":c=b;break;case "EXTREPORT":a=S.TYPE_EXTRPT;c=[];for(var d=0;d<b.length;d++){var f=b[d];f.getExtRptType()==
a&&c.push(f)}break;case "SQL_DATASET":c=Jc(S.DATASET_TYPE_SQL_DATASET,b);case "OQL_DATASET":c=c.concat(Jc(S.DATASET_TYPE_OQL_DATASET,b));break;default:c=b}return c},Jc=function(a,b){for(var c=[],d=0;d<b.length;d++){var f=b[d];f.getDataSetType()==a&&c.push(f)}return c},pc=function(){var a=gc(P,Tb,mb.getText());tb()&&(a=gc(x,Tb,mb.getText()));fb||(fb=new Ya,fb.setFunCustomPainter(ud),fb.setFunCloseSearchResultPanel(vd),fb.setFunItemSelectedListener(wd),fb.getJqUi().appendTo(H));Yb(!0);var b=[];for(f in a){var c=
a[f],d=new cb;d.setName(c.getExtReportName());d.setID(c.getExtReportID());d.setDesc(c.getDescription());d.setGroupName(tc(c.getExtReportGroupID(),">"));d.setGroupID(c.getExtReportGroupID());d.setType(c.getExtRptType());b.push(d)}fb.setTotalRecords(b.length);fb.setArrSearchResultModel(xd(b));fb.refresh();mb&&!mb.getText()&&Yb(!1);if(w){Sb=0;b=[];var f=w.getExtReportGroupID();for(c=0;c<a.length;c++)d=a[c],d.getExtReportGroupID()==f&&b.push(d);Gc(b)}},xd=function(a){var b=[];if(!a||0===a.length)return b;
var c=ja.getChildren();tb()&&(c=Na.getChildren());for(var d=0;d<c.length;d++){var f=c[d].getUserObject().getExtReportGroupName(),z=a.filter(function(N){return N.getGroupName().split(">")[0]===f});z&&0<z.length&&b.push(z)}return b},ud=function(a,b){$(a.parentElement).css("overflow","hidden");a.addClass("search-result-item");a.css({width:"285px",height:"80px","border-bottom":"1px solid #E2E7EF",left:"6px","padding-top":"6px",color:"#828282",cursor:"pointer"});var c=$("<div>");c.addClass("search-result-item-icon");
b.getType()==S.TYPE_EXTRPT?E.background(c,"icon-card-extreport"):E.background(c,"icon-card-dataset");c.css({position:"absolute",height:"36px",width:"36px"});var d=$("<div>");d.addClass("search-result-item-name");d.css({"font-size":"14px",color:"black",width:"160px",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis","margin-left":"45px"});d.attr("title",b.getName());var f=$("<div>");f.text(e.get("searchInfoPath","\u8def\u5f84\uff1a")+b.getGroupName());f.addClass("search-result-item-group-name");
f.css({right:"0px","margin-left":"45px",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",top:"0px",padding:"0px, 10px, 0px, 10px"});f.attr("title",b.getGroupName());var z=$("<div>");z.addClass("search-result-item-desc");z.css({width:"280px",position:"absolute","white-space":"normal",top:"45px",height:"40px","word-wrap":"break-word"});var N=b.getDesc();N||(N=e.get("noDescription","\u6682\u65e0\u63cf\u8ff0"),z.css("margin-top","10px"));N&&45<N.length&&(N=N.substring(0,45)+"...");
z.attr("title",b.getDesc());a.append(c);a.append(d);a.append(f);a.append(z);(c=mb.getText())&&c.trim()&&(c=c.trim(),fb.doHighLightText(d,b.getName(),c),fb.doHighLightText(z,N,c));a.on("click",function(Xa){fb.clearSelected()})},tc=function(a,b){var c=sa;tb()&&(c=D);if(a&&c)for(var d in c){var f=c[d];if(f.getUserObject().getExtReportGroupID()==a)return Ka.buildCategoryFullPath(f,"",b)}},Mb=function(a,b,c,d,f,z){var N=new h;N.setIconSetter(function(Xa,nb){E.background(Xa,nb)});N.setIconName(d);N.setText(f);
N.setTooltips(z);b&&N.setShowDropdownArrow(!0);N.addActionListener(function(Xa,nb){b?od(Xa.getJqUi(),nb,c,a):c(Xa)});N.getJqUi().appendTo(a);return N},pd=function(){var a=$("<div>");a.addClass("extreport-group-container");yd(a);oa=$("<div class='extreport-group-all-list' />");oa.appendTo(a);return a},yd=function(a){Za?bb.css("display","block"):(Za=new F,Za.setSearchListenerDelay(1E3),Za.addSearchListener(Zb),Za.setAlwaysShowCleanIcon(!0),Za.setShowSearchIcon(!0),Za.setPlaceholder(e.get("searchCategory",
"\u641c\u7d22\u76ee\u5f55")),bb=Za.getJqUi(),bb.addClass("extreport-search-category-box"),bb.find(":input").on("keydown",function(b){13==(b.keyCode||b.which||b.charCode)&&Zb()}),bb.find(".sa-ctrl-searchbox-close").on("click",function(){qb="";Zb();kb&&kb.click()}),bb.hide(),bb.appendTo(a))},Zb=function(){sb=[];qb=Za.getText().trim();var a=tb(),b=I;a&&(b=la);if(b){for(var c=0;c<b.getRowsCount();c++){var d=b.getRow(c),f=d.getCell(0),z=f.getTreeModel();f=f.getValue();qb?$b(f.getUserObject())&&!hc(f.getChildren(),
!1)?(d.setHide(!1),z.setExpanded(!1),sb.push(f)):$b(f.getUserObject())&&hc(f.getChildren(),!1)?(d.setHide(!1),z.setExpanded(!0),sb.push(f)):hc(f.getChildren(),!1)?(d.setHide(!1),z.setExpanded(!0),sb.push(f)):d.setHide(!0):(d.setHide(!1),z.setExpanded(!0))}Y.refresh(b);if(w&&!$b(w)){for(b=0;b<sb.length;b++)if(c=sb[b],$b(c.getUserObject())){var N=c.getUserObject();N=a?Va[N.getExtReportGroupID()]:ta[N.getExtReportGroupID()];break}$(N).click()}}},hc=function(a,b){if(a&&0<a.length)for(var c=0;c<a.length;c++){var d=
a[c];if($b(d.getUserObject()))return!0;d.getChildren()&&0<d.getChildren().length&&(b=hc(d.getChildren(),b))}return b},$b=function(a){return-1!=a.getExtReportGroupName().toUpperCase().indexOf(qb.toUpperCase())},Bd=function(){var a=$("<div>");a.addClass("extreport-group-op");kb=$("<span>");kb.addClass("search-extreport-category");kb.attr("title",e.get("searchCategory","\u641c\u7d22\u76ee\u5f55"));kb.on("click",function(){bb.is(":hidden")?(bb.show(),Za.setFoucs(),kb.css("box-shadow","0 0 0 1px #5582f3"),
oa.css("top","85px"),E.background(kb,"search_category_hover")):(Za.clear(),Zb(),bb.hide(),kb.css("box-shadow",""),oa.css("top","48px"),E.background(kb,"search_category"))});E.background(kb,"search_category");kb.appendTo(a);var b=$("<span>");b.addClass("all_expand_extreport_category");b.attr("title",e.get("expandAllCategory","\u76ee\u5f55\u5168\u90e8\u5c55\u5f00"));b.on("mousedown",function(){b.css("box-shadow","0 0 0 1px #5582f3");E.background(b,"all_expand_hover");if(qb)for(var d=0;d<sb.length;d++){var f=
sb[d].getUserObject().getExtReportGroupID();f=Ja[f];f.setHide(!1);f=f.getCell(0).getTreeModel();f.setExpanded(!0)}else for(d=0;d<I.getRowsCount();d++)f=I.getRow(d),f.setHide(!1),f=f.getCell(0).getTreeModel(),f.setExpanded(!0);Y.refresh(I)});b.on("mouseup",function(){b.css("box-shadow","");E.background(b,"all_expand")});E.background(b,"all_expand");b.appendTo(a);var c=$("<span>");c.addClass("all_collapse_extreport_category");c.attr("title",e.get("collapseAllCategory","\u76ee\u5f55\u5168\u90e8\u6536\u8d77"));
c.on("mousedown",function(){c.css("box-shadow","0 0 0 1px #5582f3");E.background(c,"all_collapse_hover");for(var d=0;d<I.getRowsCount();d++){var f=I.getRow(d),z=f.getCell(0),N=z.getTreeModel();z.getValue().getParent()&&f.setHide(!0);N.setExpanded(!1)}Y.refresh(I)});c.on("mouseup",function(){c.css("box-shadow","");E.background(c,"all_collapse")});E.background(c,"all_collapse");c.appendTo(a);ba=D&&0<D.length?zd():Ad();ba.appendTo(a);a.appendTo(Ga)},Dd=function(a,b){jc=a.getPropertyName();kc=b==hb.SORT_TYPE_ASC?
"ASC":"DESC";Cd()},Cd=function(){Ub=(new Date).getTime()+"";var a=w.getExtReportGroupID(),b=P;tb()&&(b=x);var c=Pa.createFacade(function(d){if(Ub===d[0]){d=d[1].extreportList;for(var f=0;f<d.length;f++)for(var z=S.createInstance(d[f]),N=0;N<b.length;N++)b[N].getExtReportID()===z.getExtReportID()&&(b.splice(N,1),b.push(z));sc()}},function(d,f){return!1});c.setShowBlocking(!0);c.loadSortedExtReportByGroupId(a,jc,kc,Ub)},zd=function(){var a=[e.get("myCategory","\u6211\u7684\u76ee\u5f55"),e.get("presetCategory",
"\u9884\u7f6e\u76ee\u5f55")];t=new wb;t.setItemModels(a);t.setSelected(a[0]);t.setCustomPainter(function(b,c,d){c.text(d)});t.addSelectedChangedListener(function(b,c,d){d==e.get("presetCategory","\u9884\u7f6e\u76ee\u5f55")?Kc(!1):Kc(!0);nc()});a=t.getJqUi();a.css({width:"45%",height:"47px","float":"left"});a.children(".sa-ctrl-combobox-text").css({width:"45%",left:"13px"});a.children(".sa-ctrl-combobox-arrow").css({left:"40%",right:"125px"});return a},Ad=function(){var a=$("<span>");a.addClass("extreport-group-title");
a.text(e.get("extReportCategory","\u76ee\u5f55"));return a},Kc=function(a){a?(dc.getJqUi().css("display","block"),Bb.getJqUi().css("display","block"),lc.getJqUi().css("display","block"),Ib.getJqUi().css("display","block"),Jb.getJqUi().css("display","block"),Wb&&Wb.getJqUi().css("margin-left","0px")):(dc.getJqUi().css("display","none"),Bb.getJqUi().css("display","none"),lc.getJqUi().css("display","none"),Ib.getJqUi().css("display","none"),Jb.getJqUi().css("display","none"),Wb&&Wb.getJqUi().css("margin-left",
"4px"))},qd=function(){var a=$("<div>");a.addClass("extreport-container");var b=a.append;n=$("<div>");n.hide();n.addClass("extreport-no-data-bg-container");var c=$("<div>");E.background(c,"group-extreport-no-data");c.css({height:"140px",marginTop:"210px",backgroundSize:"contain",backgroundPosition:"center"});var d=$("<div>");d.css({marginTop:"21px",fontSize:"15px"});var f=e.get("nodataTips","\u8bf7\u70b9\u51fb\u5de5\u5177\u680f\u3010\u65b0\u5efa\u3011\u6309\u94ae\uff0c\u65b0\u5efa\u62a5\u8868\u6216\u6570\u636e\u96c6");
d.text(f);n.append(c);n.append(d);b.call(a,n);return a},sd=function(){var a=$("<div>");a.addClass("extreport-card-container");a.css("height",$(document).height()-55-40-8+"px");return a},rd=function(){var a=$("<div>");a.addClass("extreport-selection-info");Rb=$("<span>");Rb.addClass("extreport-selection-info-count");Rb.text(e.get("selectionInfoTotalCount","\u5171#1\u4e2a").replace("#1",bc));Ab=$("<span>");Ab.addClass("extreport-selection-info-count");Ab.hide();Ab.text(e.get("selectInfoSelected","\u5df2\u9009#1\u4e2a\uff0c").replace("#1",
ac));Fb=$("<span>");Fb.addClass("extreport-selection-info-count");Fb.hide();Fb.text(e.get("selectInfoFilter","\u7b5b\u9009\u540e\u5c55\u793a#1\u4e2a").replace("#1",Sb));Eb=Ed();ub=new m;ub.setChecked(!1);ub.addCheckedListener(Fd);ub.setText(e.get("showOnlyChecked","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));var b=ub.getJqUi();b.hide();b.addClass("extreport-selection-show-only-checked-box");var c=new Z;c.setSortModel(Dd);Ac=c;c=Ac.getJqUi();Ba.layoutCtrlWithLRTB(c,null,20,53,7);a.append(Ab);a.append(Rb);
a.append(Fb);a.append(Eb);a.append(b);a.append(c);return a},Ed=function(){var a=$("<span>");a.addClass("extreport-selection-info-all");a.text(e.get("selectInfoSelectAll","\u9009\u62e9\u5168\u90e8"));a.on("click",function(){var b=L.find(".extreport-card");if(a.text()===e.get("selectInfoSelectAll","\u9009\u62e9\u5168\u90e8")){a.text(e.get("selectInfoDeselectAll","\u53d6\u6d88\u5168\u9009"));for(var c=0;c<b.length;c++){var d=b[c];if(d&&"none"!=$(d).css("display")){var f=$(d).find(".edit-icon");$(f[0]).hide();
d=$(d).find(".selected-icon");$(d[0]).show();1>$(d).find(".sa-ctrl-checkbox-checked_enabled").length&&$(d[0]).click()}}}else for(ub.setChecked(!1),a.text(e.get("selectInfoSelectAll","\u9009\u62e9\u5168\u90e8")),c=0;c<b.length;c++)(d=b[c])&&"none"!=$(d).css("display")&&(d=$(d).find(".selected-icon"),0<$(d).find(".sa-ctrl-checkbox-checked_enabled").length&&$(d[0]).click())});return a},Fd=function(){if(ib&&0<ib.length&&w){Eb.text(e.get("selectInfoDeselectAll","\u53d6\u6d88\u5168\u9009"));var a=w.getExtReportGroupID(),
b=mb&&mb.getText();a=oc(a,b);for(b=0;b<a.length;b++){var c=a[b],d=c.getExtReportID();d=$("#"+d);ub&&ub.isChecked()&&0>ib.indexOf(c)?d.hide():d.show()}}Ob()},Yb=function(a){a?fb.getJqUi().show():fb.getJqUi().hide();a=Nb(a);L.css("width",a+"px");xb.css("width",a+"px")},Nb=function(a){var b=document.documentElement.clientWidth-Ga.width()-15;fb&&(a||"block"==fb.getJqUi().css("display"))&&(b-=fb.getJqUi().width());return b},vd=function(){fb&&Yb(!1)},wd=function(a){if(w&&w.getExtReportGroupID()!==a.getGroupID()&&
Db){var b=Ra.createFeedbackDialog();b.setTitle(e.get("categoryJumpPrompt","\u76ee\u5f55\u8df3\u8f6c\u63d0\u793a"));b.setOptionType(Ra.OPTION_OK_CANCEL);b.setButtonText(Ra.RETURN_OK,e.get("categoryJump","\u8df3\u8f6c"));b.setMsgImageType(Ra.MSG_CONFIRM);b.setMessage(e.get("categoryJumpContent","\u5373\u5c06\u8df3\u8f6c\u5230\u5176\u4ed6\u76ee\u5f55\u8fdb\u884c\u67e5\u770b\uff0c\u8df3\u8f6c\u540e\u4f1a\u6e05\u9664\u5f53\u524d\u76ee\u5f55\u5185\u5361\u7247\u7684\u9009\u62e9\u72b6\u6001\uff0c\u662f\u5426\u7ee7\u7eed\u8df3\u8f6c\uff1f"));
b.setClosingChecker(function(c){c==Ra.RETURN_OK&&Lc(a);Yb(!0);return!0});b.showDialog()}else Lc(a)},Lc=function(a){var b=a.getGroupID();b=uc(b);vc(b);Y.refresh(I);b=b.getUserObject().getExtReportGroupID();var c=ta[b];tb()&&(c=Va[b]);c&&c.click();var d=$("#"+a.getID());Gd("extreport-card-container",d);(a=$(".extreport-card-selected"))&&0<a.length&&a.removeClass("extreport-card-selected");a=new jb;a.setTimes(2,!0);a.blink(d,"extreport-twinkle-high-light","extreport-card-selected");a.setAction(function(){d.parent().children(".extreport-card-selected").removeClass("extreport-card-selected");
d.addClass("extreport-card-selected")})},vc=function(a){var b=a.getUserObject().getExtReportGroupID();b=Ja[b];var c=b.getCell(0).getTreeModel();if(b&&b.isHide()){var d=a.getParent();vc(d)}c.isExpanded()?b.setHide(!1):Mc(a)},uc=function(a){var b=sa;tb()&&(b=D);if((!b||0!=b.length)&&a)for(var c in b)if(a==b[c].getUserObject().getExtReportGroupID())return b[c]},Gd=function(a,b){document.querySelector("."+a).scrollTop=b.prop("offsetTop")},Fc=function(a,b,c){Pa.createFacade(function(d){b&&b();rb.unsubscribeChannel("PresetSubject",
Nc);clearInterval(Bc);Kb&&Kb.remove();if(null==d){var f=e.get("createCategoryFirst","\u60a8\u9700\u8981\u5148\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u3002");Pa.getMessageCurtain().showPrompt(f,2E3)}else{f=tb();var z=d.extreportGroupList;if(z&&0<z.length){sa=[];D=[];Ja={};ta={};Va={};ja=new xa;Na=new xa;for(d=0;d<z.length;d++){var N=new xa,Xa=new ea;Xa.fromJsonObject(z[d]);N.setExpanded(!1);N.setUserObject(Xa);N.setLevel(0);N.fromJsonObject(z[d]);N.setName(Xa.getExtReportGroupName());Xa.isPreset()?Na.addChild(N):
ja.addChild(N)}for(d=0;d<ja.getChildren().length;d++)z=ja.getChildren()[d],wc(z,!1);for(d=0;d<Na.getChildren().length;d++)z=Na.getChildren()[d],wc(z,!0);ba||Bd()}a&&!c&&(d=ja,f&&(d=Na),f=a.split("/"),(f=Ka.findTreeNodeByFullPath(d,f))&&(w=f.getUserObject()));a&&(f=a.split("/"),a=f[f.length-1]);I||(I=new KTable,Ta=new g(I),Ta.setFunMoveUpCategorySuccessCallback(Hd),Ta.setFunDeleteCategorySuccessCallback(Id),Ta.setFunAddCategorySuccessCallback(Jd),I.setColumnFitVisibleWidth(!0),I.setCellRender(Ta),
I.setTreeHandlerRender(new aa(I)),I.setScrollerVisible("hidden"));f=$(I.getUI());f.attr("id","myCategoryTreeTable");Ba.layoutCtrlWithLRTB(f,0,0,null,0,0,null);f.appendTo(oa);f.css("display","none");la||(la=new KTable,la.setColumnFitVisibleWidth(!0),la.setCellRender(new g(la)),la.setTreeHandlerRender(new aa(la)),la.setScrollerVisible("hidden"));f=$(la.getUI());f.attr("id","presetCategoryTreeTable");Ba.layoutCtrlWithLRTB(f,0,0,null,0,0,null);f.appendTo(oa);f.css("display","none");nc(a)}},function(d,
f){return!1}).getExtReportGroupList();rb.subscribeChannel("PresetSubject",Nc)},nc=function(a){if(la&&I&&0!=document.body.clientHeight&&0!=document.body.clientWidth){var b=tb();b?(Y.clear(la),la.setSyncUIWhenModelChanged(!1),la.addColumns(1),Oc(la,!0)):(Y.clear(I),I.setSyncUIWhenModelChanged(!1),I.addColumns(1),Oc(I,!1));var c=$(I.getUI()),d=$(la.getUI());b?(c.css("display","none"),d.css("display","block"),Y.refresh(la)):(d.css("display","none"),c.css("display","block"),Y.refresh(I));if(qb&&bb.is(":visible"))Zb();
else if(w&&w.getExtReportGroupName()==a){if(a=uc(w.getExtReportGroupID()))a.getParent()&&vc(a.getParent()),Y.refresh(I),a=a.getUserObject().getExtReportGroupID(),c=ta[a],b&&(c=Va[a]),c&&c.click()}else b?(a=$("#presetCategoryTreeTable").find(".extreport-category-cell-item-selected"),c=$("#presetCategoryTreeTable").find(".extreport-category-cell-item")):(a=$("#myCategoryTreeTable").find(".extreport-category-cell-item-selected"),c=$("#myCategoryTreeTable").find(".extreport-category-cell-item")),a&&0<
a.length?(a.removeClass("extreport-category-cell-item-selected"),a.click()):c&&0<c.length&&(a=c[0],a.click());b?(b=la.getRowIndex(Ja[w.getExtReportGroupID()]),la.scrollCellVisible(b,0,!1),b=la.keepScrollStatus(),b.h=0,la.restoreScrollStatus(b)):(b=I.getRowIndex(Ja[w.getExtReportGroupID()]),I.scrollCellVisible(b,0,!1),b=I.keepScrollStatus(),b.h=0,I.restoreScrollStatus(b))}},Oc=function(a,b){var c=sa;b&&(c=D);b=a.isSyncUIWhenModelChanged();a.setSyncUIWhenModelChanged(!1);for(var d=0;d<c.length;d++){var f=
c[d];f.getParent()||Pc(f,a,!0)}a.setSyncUIWhenModelChanged(b)},Pc=function(a,b){var c=b.addRow();c.setHeight(35);var d=c.getCell(0);d.setValue(a);var f=a.getLevel();f=new KTCellTreeModel(f);f.setExpanded(a.isExpanded());var z=a.getParent();z&&(z=z.isExpanded(),c.setHide(!z));if((z=a.getChildren())&&0<z.length)for(var N=0;N<z.length;N++)Pc(z[N],b);d.setTreeModel(f);Ja[a.getUserObject().getExtReportGroupID()]=c},wc=function(a,b){b?(D.push(a),ka.push(a.getUserObject().getExtReportGroupID())):(sa.push(a),
V.push(a.getUserObject().getExtReportGroupID()));if((a=a.getChildren())&&0<a.length)for(var c=0;c<a.length;c++)wc(a[c],b)},Hd=function(a,b){var c=$(b),d=c.prev(),f=a.getUserObject();b=ja.getChildren();var z=a.getParent()?a.getParent().getChildren():b;for(b=0;b<z.length;b++)if(a.getName()===z[b].getName()&&0!==b){var N=z[b];z[b]=z[b-1];z[b-1]=N;break}N=[];b=0;for(var Xa=z.length;b<Xa;b++){var nb=z[b].getUserObject();nb.setOrderID(Xa-b);N.push(nb.toJsonObject())}0<N.length&&Kd(N,function(){1==z.indexOf(a)&&
(d.children(".moveup-button").css("display",""),c.children(".moveup-button").css("display","none"));f.getExtReportGroupName()!==w.getExtReportGroupName()&&(ta[f.getExtReportGroupID()].removeClass("extreport-category-cell-item-selected"),w=f);ec(w.getExtReportGroupName(),w.getExtReportGroupID())})},Kd=function(a,b){b=Pa.createFacade(b,function(){});b.setShowBlocking(!1);b.saveOrderExtReportGroup(a)},Id=function(a){var b=a.getUserObject().getExtReportGroupID(),c=ja.getChildren();c=a.getParent()?a.getParent().getChildren():
c;for(var d=0,f=0;f<c.length;f++)if(b==c[f].getUserObject().getExtReportGroupID()){c.splice(f,1);d=f;a.getParent()?a.getParent().setChildren(c):ja.setChildren(c);break}w&&w.getExtReportGroupID()!=b||(b=a.getUserObject().getExtReportGroupID(),f=I.getRowIndex(Ja[b]),I.removeRow(f),delete Ja[b],sa.splice(sa.indexOf(a),1),delete ta[b],c&&0<c.length?(a=c[0>--d?0:d],a=ta[a.getUserObject().getExtReportGroupID()],$(a).click()):a.getParent()?(a=a.getParent().getUserObject(),a=ta[a.getExtReportGroupID()],$(a).click()):
w=null,Y.refresh(I))},Jd=function(a){var b=uc(a.getExtReportGroupID());b.getParent()&&!b.isExpanded()&&(Mc(b.getParent()),Y.refresh(I));zc(a)},Mc=function(a){Ja[a.getUserObject().getExtReportGroupID()].getCell(0).getTreeModel().setExpanded(!0);for(var b=0;b<a.getChildren().length;b++){var c=a.getChildren()[b];Ja[c.getUserObject().getExtReportGroupID()].setHide(!1)}},zc=function(a){qc();w=a;var b=a.getExtReportGroupID();-1<V.indexOf(b)?xc(a):-1<ka.indexOf(b)?xc(a):(Vb(a.hasData()),sc())},Vb=function(a){a?
(xb.show(),n.hide()):(xb.hide(),n.show())},Nc=function(a){if(1==JSON.parse(a)){$(document.body).find(".sa-common-loading-modallayer").remove();Kb=$("<div>");Kb.addClass("sa-common-loading-modallayer");Ba.layoutCtrl(Kb,0,0,"100%","100%");a=$("<div class='extreport-manage-preset-container'>");var b=$("<div class='extreport-manage-presete-sub-container'>"),c=$("<div class='extreport-manage-preset-big-img'>");c.css("background-image",zb.getIconUrl("common","htmlLoad/loading.gif"));var d=$("<div class='tm-preset-progress-img'>");
d.css("background-image",zb.getIconUrl("common","htmlLoad/sway.gif"));var f=$("<span class='extreport-manage-preset-progress-text'>"),z=e.get("initializing","\u8f7b\u62a5\u8868\u6b63\u5728\u6267\u884c\u670d\u52a1\u521d\u59cb\u5316\uff0c\u6839\u636e\u60a8\u7684\u7f51\u7edc\u73af\u5883\uff0c\u8fc7\u7a0b\u53ef\u80fd\u6301\u7eed\u6570\u5341\u79d2\u5230\u51e0\u5206\u949f\uff0c\u8bf7\u7a0d\u4f5c\u7b49\u5f85\u3002");f.text(z);var N=(new Date).getTime();Bc=setInterval(function(){var Xa=parseInt(((new Date).getTime()-
N)/1E3),nb=parseInt(Xa/60),ab=e.get("waitTime","\u5df2\u7b49\u5f85\uff1a");ab=0<nb?ab+nb+e.get("minute","\u5206")+(Xa-60*nb)+e.get("second","\u79d2\u3002"):ab+Xa+e.get("second","\u79d2\u3002");f.text(z+ab)},1E3);b.append(c);b.append(d);b.append(f);a.append(b);a.appendTo(Kb);Kb.appendTo($(document.body))}},tb=function(){var a=e.get("myCategory","\u6211\u7684\u76ee\u5f55"),b;t&&(b=t.getSelected());return b&&a!=b?!0:!1},oc=function(a,b){var c=gc(P,Tb,b);tb()&&(c=gc(x,Tb,b));b=[];for(var d in c){var f=
c[d];f.getExtReportGroupID()==a&&b.push(f)}return b},qc=function(){L.find(".extreport-card").remove()},xc=function(a){Ub=(new Date).getTime()+"";var b=a.getExtReportGroupID(),c=Pa.createFacade(function(d){if(Ub===d[0]){var f=P;if(a.isPreset()){var z=ka.indexOf(b);-1<z&&ka.splice(z,1);f=x}else z=V.indexOf(b),-1<z&&V.splice(z,1);if((z=d[1].extreportList)&&0<z.length){for(d=0;d<z.length;d++){var N=S.createInstance(z[d]);S.pushIfAbsent(N,f)}sc();f=N.getExtReportGroupID();N=a.isPreset()?D:sa;for(d=0;d<
N.length;d++)if(N[d].getUserObject().getExtReportGroupID()==f){f=N[d];f.getUserObject().setHasData(!0);break}Vb(!0)}else Vb(!1)}},function(d,f){return!1});c.setShowBlocking(!0);c.loadSortedExtReportByGroupId(b,jc,kc,Ub)},Cc=function(a){if(!Ca){Ca=!0;var b=Pa.createFacade(function(c){var d=[],f=P;tb()?(f=x,ka=[]):V=[];c=c.extreportList;for(var z=0;z<c.length;z++){var N=S.createInstance(c[z]);S.pushIfAbsent(N,f);d.push(N.getExtReportGroupID())}sa.forEach(function(Xa){-1!=d.indexOf(Xa.getUserObject().getExtReportGroupID())&&
Xa.getUserObject().setHasData(!0)});D.forEach(function(Xa){-1!=d.indexOf(Xa.getUserObject().getExtReportGroupID())&&Xa.getUserObject().setHasData(!0)});Dc();Ca=!1},function(c,d){return Ca=!1});b.setShowBlocking(!1);b.loadExtReportByGroupIDS(a)}},fc=function(a){var b=Qc.getInstance(a.getExtRptType());b.needRefreshExtReports()&&b.setRefreshExtReportFunction(Rc);a=b.createCardUi(a);a.setGlobalDependence(Pa);a.setCopySuccessCallback(Ld);a.setArrExtReportModel(P);a.setCopyDifferentGroupSuccessCallBack(Md);
a.setDelSuccessCallback(Sc);a.setMoveSuccessCallback(Tc);a.setSelectedCardSuccessCallBack(Nd);a.setClickCardCallback(Od);return a.getJqUi()},Ld=function(a){a=fc(a);var b=$(L);b.children()[0]?a.insertBefore(b.children()[0]):b.append(a)},Rc=function(a){-1==V.indexOf(a)&&V.push(a);for(var b=P.length-1;0<=b;b--)a==P[b].getExtReportGroupID()&&P.splice(b,1);w.getExtReportGroupID()==a&&(qc(w),xc(w))},Od=function(a,b){a=$(a.currentTarget);Db?(a=$(a).find(".selected-icon"),$(a[0]).click()):(b=a.parent().children(".extreport-card-selected"),
0<b.length&&b.removeClass("extreport-card-selected"),a.addClass("extreport-card-selected"))},Nd=function(a){-1<ib.indexOf(a)?ib.splice(ib.indexOf(a),1):ib.push(a);if(!Db){Db=!0;Ic();a=$(".extreport-card-container").find(".extreport-card");for(var b=0;b<a.length;b++){var c=$(a[b]),d=c.find(".edit-icon");$(d[0]).hide();c=c.find(".selected-icon");$(c[0]).show()}}Ob();Hc()},Ic=function(){for(var a=$(".extreport-card-container").find(".extreport-card"),b=0;b<a.length;b++){var c=$(a[b]),d=c.find(".extreport-name");
Db?(c.off("mouseover"),c.off("mouseleave"),d.css("width","190px")):(c.find(".edit-icon").is(":visible")?d.css("width","153px"):d.css("width","209px"),c.on("mouseover",function(){$(this).find(".extreport-name").css("width","153px")}),c.on("mouseleave",function(){$(this).find(".extreport-name").css("width","209px")}))}},Sc=function(){for(var a=0;a<ib.length;a++)var b=ib[a].getExtReportGroupID(),c=P.filter(function(f){return f.getExtReportGroupID()==b});rc();Ob();for(a=0;a<sa.length;a++)if(sa[a].getUserObject().getExtReportGroupID()===
b){var d=sa[a];break}0==c.length&&(d.getUserObject().setHasData(!1),Vb(!1))},Tc=function(a){var b=a.getBeforeMovedExtReportGroupId();a=a.getExtReportGroupID();for(var c=P.filter(function(N){return N.getExtReportGroupID()==b}),d=0;d<sa.length;d++){var f=sa[d],z=f.getUserObject().getExtReportGroupID();z==a?f.getUserObject().setHasData(!0):z==b&&0==c.length&&(f.getUserObject().setHasData(!1),Vb(!1))}},Md=function(a){a=a.getExtReportGroupID();for(var b,c=0;c<sa.length;c++)if(sa[c].getUserObject().getExtReportGroupID()==
a){b=sa[c];break}b.getUserObject().setHasData(!0)},cd=function(){var a=$("<div class='sa-ctrl-common-modallayer'>"),b=$(document.body);a.appendTo(b);for(var c=new za(a),d=function(){a.remove();c.destroy()},f=$("<div>"),z=Qc.getAllInstance(),N=0,Xa=z.length;N<Xa;N++){var nb=z[N],ab=$("<div>");Ba.layoutCtrl(ab,44+120*N,35,100,66);ab.css("cursor","pointer");ab.data("model",nb);ab.on("click",function(Cb){Cb=$(Cb.currentTarget).data("model");w?Pd(Cb):(Cb=e.get("createCategoryFirst","\u60a8\u9700\u8981\u5148\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u3002"),
Pa.getMessageCurtain().showPrompt(Cb,2E3));d()});ab.appendTo(f);var yb=$("<div>");yb.css("border-radius","4px");var ob=$("<div>");ob.css({"line-height":"16px","font-size":"14px",color:"rgb(78, 86, 103)","text-align":"center"});Ba.layoutCtrl(yb,32,0,36,36);Ba.layoutCtrl(ob,0,50,100,16);nb.getDisplayName()===e.get("extreport","\u8f7b\u62a5\u8868")?ob.text(e.get("commonReport","\u62a5\u8868")):ob.text(nb.getDisplayName());E.background(yb,nb.getIconFileName());yb.appendTo(ab);ob.appendTo(ab)}z=100+120*
z.length;N=b.prop("clientWidth");b=b.prop("clientHeight");c.setBounds(N-z>>1,b-210>>1,z,210);c.setToolbarVisible(!1);c.setContent(f);c.setTitle(e.get("create","\u65b0\u5efa"));c.addClosingListener(d);c.show()},dd=function(){var a=qa.getExtReportDelDialogCreator(ib);a.setGlobal(Pa);a.setExtReportTypeName(yc());a.addSuccessCallback(function(){for(var b=0;b<ib.length;b++){var c=ib[b],d=P.indexOf(c);-1<d&&P.splice(d,1);$("#"+c.getExtReportID()).remove()}Sc();b=e.get("deleteExtReportSuccess","\u5220\u9664\u6210\u529f\u3002");
Pa.getMessageCurtain().showSuccess(b,2E3)});a.createDialog().show()},yc=function(){if(1===ib.length){var a=ib[0];a=S.TYPE_EXTRPT===a.getExtRptType()?e.get("report","\u62a5\u8868"):S.TYPE_DATASET===a.getExtRptType()?e.get("dataSet","\u6570\u636e\u96c6"):""}return a},ed=function(){var a=qa.getExtReportMoveDialogCreator(ib,ja);a.setGlobal(Pa);a.setExtReportTypeName(yc());a.setCurrentGroupName(tc(w.getExtReportGroupID(),"/"));a.setArrLoadedExtReport(P);a.addSuccessCallback(function(b){for(var c,d=0;d<
ib.length;d++){var f=ib[d];if(b.getExtReportID()===f.getExtReportID()){c=f;ib.splice(d,1);break}}d=P.indexOf(c);-1<d&&P.splice(d,1);P.push(b);$("#"+c.getExtReportID()).remove();Tc(b);Ob();b=e.get("moveSuccess","\u79fb\u52a8\u6210\u529f\u3002");Pa.getMessageCurtain().showSuccess(b,2E3)});a.createDialog().show()},fd=function(){var a=qa.getExtReportCopyDialogCreator(ib,ja);a.setGlobal(Pa);a.setExtReportTypeName(yc());a.setCurrentGroupName(tc(w.getExtReportGroupID(),"/"));a.addSuccessCallback(function(b){b=
S.createInstance(b).getExtReportGroupID();Rc(b);b=e.get("copyExtReportSuccess","\u590d\u5236#1\u6210\u529f\u3002");Pa.getMessageCurtain().showSuccess(b,2E3)});a.createDialog().show()},Qc=new function(){var a,b=[],c=[ma,ra],d=function(){a={};for(var f=0,z=c.length;f<z;f++){var N=new c[f];N.isSupported()&&(b.push(N),a[N.getType()]=N)}};this.getInstance=function(f){!a&&d();f=a[f];if(!f)throw Error("Unknown theme type");return f};this.getAllInstance=function(){!a&&d();return b}},Pd=function(a){var b=
new S;b.setExtReportGroupID(w.getExtReportGroupID());b.setExtRptType(a.getType());b=new Qa(b);b.setExtReportTypeName(a.getDisplayName());b.setGlobal(Pa);b.addSuccessCallback(function(c){P=[c].concat(P);var d=fc(c),f=$(L),z=f.find(".extreport-card");z&&z[0]?d.insertBefore(z[0]):f.append(d);Pa.getMessageCurtain().showSuccess(e.get("createSuccess","\u65b0\u5efa\u6210\u529f\u3002"),2E3);d="1"==c.getExtRptType()?e.get("dataset","\u6570\u636e\u96c6"):e.get("extreport","\u8f7b\u62a5\u8868");Vb(!0);Ob();
c=c.getExtReportGroupID();for(f=0;f<sa.length;f++)if(sa[f].getUserObject().getExtReportGroupID()===c){var N=sa[f];break}N.getUserObject().setHasData(!0);C.occur(C.EXT_CREATE_EXTREPORT_TYPE,d)});b.createDialog().show()},hd=function(){Pa.createFacade(function(a){var b=new T;b.fromJsonObject(a);0<b.getChildren().length?(a=new ia,a.setFolderNode(b),a.setGlobal(Pa),a.asyncShowExportDialog()):Pa.getMessageCurtain().showPrompt(e.get("noExtReportForExport","\u6ca1\u6709\u53ef\u4f9b\u5bfc\u51fa\u7684\u62a5\u8868\u3002"),
2E3)},function(a,b){Pa.getMessageCurtain().showPrompt(b)}).getAllExtReportForExport()},gd=function(a){if(a=H.find("#uploadBtn").get(0).files[0]){var b=a.name,c=a.size,d=b.lastIndexOf(".");b=b.substring(d+1,b.length).toLowerCase();H.find("#uploadBtn").val("");"kds"!=b&&"qing-rpt"!=b&&"kdsql"!=b?Pa.getMessageCurtain().showPrompt(e.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3):0==c?Pa.getMessageCurtain().showPrompt(e.get("uploadFileIsNull",
"\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3):104857600<=c?Pa.getMessageCurtain().showPrompt(e.get("fileTooLarge","\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3):(c=new ha,w&&(b=sa.filter(function(f){return f.getUserObject().getExtReportGroupID()==w.getExtReportGroupID()}),c.setCurrentExtReportGroupFullPath(Ka.buildCategoryFullPath(b[0],"","/"))),c.createJqUi(a,Pa,Pa.getMessageCurtain()),c.setFunRefreshExtReportGroupList(ec),
c.setFunErrorCallbackEvent(Qd))}},Qd=function(){Pa.getMessageCurtain().showPrompt(e.get("uploadFailed","\u4e0a\u4f20\u6587\u4ef6\u5931\u8d25\u3002"),2E3)}};var k,R,E,Aa,ya,C,za,v,Ra,wb,gb,Ea,Ma,h,F,y,A,K,l,m,q,u,W,ea,S,Sa,xa,fa,e,ua,rb,zb,Ba,Ha,Y,db,Ua,eb,jb,Ya,cb,hb,M,T,ia,ha,G;(function(){var g=com.kingdee.bos.qing;G=g.CodeLoader;k=g.Seer;g=com.kingdee.bos.extreport.manage.common;R=g.Facade;E=g.Icons;ya=g.Integration;C=g.UserOperationReporter;g=com.kingdee.bos.qing.ui.component;za=g.Dialog;v=g.MessageCurtain;
Ra=g.MessageDialog;wb=g.ComboBox;gb=g.Label;Ea=g.TextArea;Ma=g.TextField;h=g.ToolbarButton;F=g.SearchBox;y=g.SplitPane;A=g.SwitchButton;K=g.DropdownSelector;l=g.Menu;Aa=g.Icons;fa=g.MenuModel;m=g.CheckBox;q=g.Tree;u=g.AbstractModalDialog;W=g.WorkButton;g=com.kingdee.bos.extreport.manage.model;ea=g.ExtReportGroupModel;S=g.ExtReportModel;Sa=g.ExtReportType;xa=g.TreeNode;g=com.kingdee.bos.qing.framework.common;e=g.MultilanguageManager.createPackageAccessor(p);ua=g.WindowResizeObserver;rb=g.RemoteFramework;
zb=g.Resource;g=com.kingdee.bos.qing.common;Ba=g.DomUtil;Ha=g.Util;db=g.EventListenerList;Ua=g.TextMeasurer;g=com.kingdee.bos.qing.common.ui;Y=g.TableUtil;g=com.kingdee.bos.extreport.manage.common.ui;eb=g.StringUtil;jb=g.BlinkHelper;Ya=g.SearchResultPanel;cb=g.DefaultSearchResultModel;hb=g.SortWidget;M=g.SortField;g=com.kingdee.bos.extreport.manage.imexport;T=g.FolderNode;ia=g.ExportDialog;ha=g.UploadPane})();var qa=new function(){this.getExtReportDelDialogCreator=function(g){return new pb(g)};this.getExtReportMoveDialogCreator=
function(g,aa){return new La(g,aa)};this.getExtReportCopyDialogCreator=function(g,aa){return new Da(g[0],aa)}},Ka=new function(){this.buildCategoryFullPath=function(g,aa,ca){if(!g.getParent())return g.getUserObject().getExtReportGroupName()+aa;var ma=g.getParent();return ma?(aa=g.getUserObject().getExtReportGroupName()+aa,this.buildCategoryFullPath(ma,ca+aa,ca)):aa};this.findTreeNodeByFullPath=function(g,aa){if(0===aa.length)return g;for(var ca=aa.shift(),ma=0;ma<g.getChildren().length;ma++){var ra=
g.getChildren()[ma];if(ra.getName()===ca)return this.findTreeNodeByFullPath(ra,aa)}}};na.ALL_CONFLICTTYPE=["ignore","overwrite","rename"]})();
//qingVersionTag: 20250415