(function(){function w(){this.open=function(a,b,c,e){var h=d.decodeParamFromUrl(location.search,"pageId");if(!e&&h&&0<=h.indexOf("qing_workbench")){var p=window.com.kingdee.bos.qing.AnalysisSceneOuterApi;if(p&&p.getFunOpenNewTab()){e=p.getFunOpenNewTab();b=d.appendParamToUrl(b,"markId",c);b=d.appendParamToUrl(b,"pageId",h);d.decodeParamFromUrl(location.search,"openFrom")||(b=d.appendParamToUrl(b,"openFrom","qing_workbench"));b=com.kingdee.bos.qing.integration.PageHelper.getIframeUrl(b);e&&e(a,b,c);
return}}a={methodParams:JSON.stringify({title:a,url:b,markId:c,appId:e}),methodName:"openTab"};try{top.window.invokeCustomEvent?top.window.invokeCustomEvent(h,"",[g,"QING_ANALYSIS",JSON.stringify(a)]):window.open(b)}catch(k){window.open(b)}};this.closeTab=function(){var a=d.decodeParamFromUrl(location.search,"pageId"),b={methodName:"closeTab"};top.window.invokeCustomEvent?top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(b)]):window.close()}}function x(){this.notifyClicked=function(){try{top.window.KD&&
top.window.KD.notifyPlatform&&top.window.KD.notifyPlatform(top.window.KD.IFRAMECLICK,"")}catch(a){}}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.integration&&(com.kingdee.bos.qing.integration={});var f=com.kingdee.bos.qing.integration,y=com.kingdee.bos.qing.framework.common.AbstractFacade,l=com.kingdee.bos.qing.ui.component.MessageDialog,
z=com.kingdee.bos.qing.framework.common.TabbedUiUtil,r=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister,u=com.kingdee.bos.qing.framework.remote.QingMessageSenderClient,m=com.kingdee.bos.qing.Seer,d=com.kingdee.bos.qing.common.Util,A=com.kingdee.bos.qing.framework.common.WindowMessageHelper;f.UserAndRoleForm=new function(){var a=d.decodeParamFromUrl(location.search,"pageId"),b;this.openUserForm=function(c,e,h){c={methodParams:JSON.stringify({arrUserId:c,isSingle:e,isShowDisabledFilter:h}),
methodName:"openUserForm"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(c)])};this.openRoleForm=function(c){c={methodParams:c,methodName:"openRoleForm"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(c)])};this.setCallBack=function(c){b=c};this.messageListener=function(c){c.content.pageId==a&&b&&b(c)}};f.OpenAppMenuForm=new function(){var a,b=d.decodeParamFromUrl(location.search,"pageId");this.setCallBack=
function(c){a=c};this.messageListener=function(c){c.content.pageId==b&&a&&a(c)};this.openAppMenuForm=function(){var c={methodName:"openAppMenuForm"},e=d.decodeParamFromUrl(location.search,"pageId");top.window.invokeCustomEvent&&top.window.invokeCustomEvent(e,"",[g,"QING_ANALYSIS",JSON.stringify(c)])}};f.RefreshCardHelper=new function(){var a=d.decodeParamFromUrl(location.search,"pageId"),b=d.decodeParamFromUrl(location.search,"gridContainerPageId"),c=d.decodeParamFromUrl(location.search,"gridContainerCardId");
this.refreshCard=function(){var e={methodParams:JSON.stringify({gridContainerPageId:b,gridContainerCardId:c}),methodName:"getHomepageCardNewPageId"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(e)])};this.messageListener=function(e){e=e.content.pageId;top.window.invokeCustomEvent&&top.window.invokeCustomEvent(e,"",[g,"refreshCard",JSON.stringify({clientID:g})])}};f.CardHomepageAddHelper=new function(){var a=d.decodeParamFromUrl(location.search,
"pageId");this.addCardToHomepage=function(b,c){b={clientID:g,methodParams:JSON.stringify({cardId:b,cardName:c}),methodName:"addCardToHomepage"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(b)])}};f.AppChooseForm=new function(){var a,b=d.decodeParamFromUrl(location.search,"pageId");this.setCallBack=function(c){a=c};this.messageListener=function(c){c.content.pageId==b&&a&&a(c)};this.openAppChooseForm=function(c){c=c?{methodParams:JSON.stringify({appId:c}),
methodName:"openAppChooseForm"}:{methodName:"openAppChooseForm"};var e=d.decodeParamFromUrl(location.search,"pageId");top.window.invokeCustomEvent&&top.window.invokeCustomEvent(e,"",[g,"QING_ANALYSIS",JSON.stringify(c)])}};f.ERPCloudMDDParildFilterChooseForm=new function(){var a,b=d.decodeParamFromUrl(location.search,"pageId");this.setCallBack=function(c){a=c};this.messageListener=function(c){c.content.pageId==b&&a&&a(c)};this.openERPCloudMDDParildFilterChooseForm=function(c,e,h,p){c={methodParams:JSON.stringify({sourceId:c,
entityAssociateName:e,parildAssociateName:h,filterValue:p}),methodName:"openERPCloudMDDParildFilterChooseForm"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(b,"",[g,"QING_ANALYSIS",JSON.stringify(c)])}};f.TabStatusHelper=new function(){var a=d.decodeParamFromUrl(location.search,"pageId"),b=this,c=!0,e,h;this.setClosingListener=function(k){e=k};this.getClosingListener=function(){return e};this.setTabStatus=function(k){var t=d.decodeParamFromUrl(location.search,"pageId");k={methodParams:k,
methodName:"setTabDirtyStatus"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(t,"",[g,"QING_ANALYSIS",JSON.stringify(k)])};this.messageListener=function(k){k.content.pageId==a&&b.showConfirmExitDialog()};var p={en:{confirmExit:"Change detected, do you want to exit without saving?",sureExit:"Exit",sureReturn:"Return"},zh_CN:{confirmExit:"\u68c0\u6d4b\u5230\u60a8\u6709\u66f4\u6539\u5185\u5bb9\uff0c\u662f\u5426\u4e0d\u4fdd\u5b58\u76f4\u63a5\u9000\u51fa\uff1f\u82e5\u4e0d\u4fdd\u5b58\uff0c\u5c06\u4e22\u5931\u8fd9\u4e9b\u66f4\u6539\u3002",
sureExit:"\u76f4\u63a5\u9000\u51fa",sureReturn:"\u8fd4\u56de\u7f16\u8f91"},zh_TW:{confirmExit:"\u6aa2\u6e2c\u5230\u60a8\u6709\u66f4\u6539\u5167\u5bb9\uff0c\u662f\u5426\u4e0d\u4fdd\u5b58\u76f4\u63a5\u9000\u51fa\uff1f\u82e5\u4e0d\u4fdd\u5b58\uff0c\u5c07\u4e1f\u5931\u9019\u4e9b\u66f4\u6539\u3002",sureExit:"\u76f4\u63a5\u9000\u51fa",sureReturn:"\u8fd4\u56de\u7de8\u8f2f"}};this.setI18n=function(k){h=k};this.getI18n=function(){return h?h:p};this.showConfirmExitDialog=function(){if(c){var k=m.getUrlParamValue("language");
k=b.getI18n()[k];null==k&&(k=b.getI18n().en);var t=k.confirmExit,q=l.createFeedbackDialog();q.setMsgImageType(l.MSG_SAVE);q.setButtonText(l.RETURN_OK,k.sureExit);q.setButtonText(l.RETURN_CANCEL,k.sureReturn);q.setMessage(t);q.showDialog();q.setClosingChecker(function(v){v==l.RETURN_OK&&com.kingdee.bos.qing.framework.common.TabbedUiUtil.closeCurrentTab();return!0});q.setClosedAction(function(v){c=!0});c=!1}}};f.CustomCardHelper=new function(){var a=d.decodeParamFromUrl(location.search,"pageId"),b;
this.setCallback=function(c){b=c};this.openSelector=function(){var c={clientID:g,methodName:"selectCustomcard"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(c)])};this.messageListener=function(c){c=c.content;c.pageId==a&&b&&b(c)}};f.CloudHubSubscribeCardHelper=new function(){var a=d.decodeParamFromUrl(location.search,"pageId"),b;this.setCallback=function(c){b=c};this.openSelector=function(){var c={methodName:"selectCloudHubSubscribeCard"};top.window.invokeCustomEvent&&
top.window.invokeCustomEvent(a,"",[g,"QING_ANALYSIS",JSON.stringify(c)])};this.messageListener=function(c){c=c.content;c.pageId==a&&b&&b(c)}};f.LinkageJumper=new function(){this.jump=function(a,b,c,e){var h=d.decodeParamFromUrl(location.search,"pageId");c=JSON.parse(c);a={methodParams:JSON.stringify({appId:c.appId,pageId:c.pageId,bizUiId:a,linkageTitle:b,foreignKeyMembersCachedId:c.foreignKeyMember,bEditUi:e,pkDataType:c.pkDataType}),methodName:"linkageJump"};(b=d.decodeParamFromUrl(window.parent.location.search,
"qingCrossRegion"))&&"true"===b&&window.parent.invokeCustomEvent?window.parent.invokeCustomEvent(h,"",[g,"QING_ANALYSIS",JSON.stringify(a)]):top.window.invokeCustomEvent?top.window.invokeCustomEvent(h,"",[g,"QING_ANALYSIS",JSON.stringify(a)]):(h={en:{notSupportLinkageJumper:"The current scene does not support navigate to"},zh_CN:{notSupportLinkageJumper:"\u5f53\u524d\u573a\u666f\u6682\u4e0d\u652f\u6301\u5355\u636e\u8054\u67e5"},zh_TW:{notSupportLinkageJumper:"\u7576\u524d\u5834\u666f\u66ab\u4e0d\u652f\u6301\u55ae\u64da\u806f\u67e5"}},
a=m.getUrlParamValue("language"),a=h[a],null==a&&(a=h.en),h=a.notSupportLinkageJumper,a=new l,a.setOptionType(l.OPTION_OK),a.setMessage(h),a.showDialog())}};f.CardCtrlMsgHandler=new function(){var a,b=d.decodeParamFromUrl(location.search,"pageId");this.setCallback=function(c){a=c};this.messageListener=function(c){c.content.pageId==b&&a&&a(c)}};f.ImglibUrlParser=new function(){this.hookUrlParser=function(){var a=d.decodeParamFromUrl(location.search,"path");a=a?a:"/ierp";com.kingdee.bos.qing.chart.model.ImglibHelper.hookUrlParser(function(b){b=
b.substring(9);var c=b.split("/")[0];return"WEBSITE"==c.toUpperCase()?(b=b.substring(c.length+1),a+"/"+b):com.kingdee.bos.qing.framework.common.RemoteFramework.getLoadImgUrlByFullPath(b)})}};f.GaiPrivacyAgreementActionHandler=new function(){var a,b=d.decodeParamFromUrl(location.search,"pageId");this.setCallback=function(c){a=c};this.openGaiPrivacyAgreement=function(c){c={methodParams:c,methodName:"openGaiPrivacyAgreement"};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(b,"",[g,"QING_ANALYSIS",
JSON.stringify(c)])};this.messageListener=function(c){c.content.pageId==b&&a&&a(c)}};f.PageHelper=new function(){this.getIframeUrl=function(a){return a=n(a)}};var g=m.getUrlParamValue("clientID"),n=function(a){var b=m.getUrlParamValue("access_token");b&&(a=d.appendParamToUrl(a,"access_token",b));(b=m.getUrlParamValue("kdcdc"))&&(a=d.appendParamToUrl(a,"kdcdc",b));return a};(function(){z.registerImpl(new w);var a=new x;$(document.body).on("click",a.notifyClicked);a=m.getUrlParamValue("path");a||(a=
window.location.toString(),a=a.substring(0,a.indexOf("/qinganalysis")));"/"==a[a.length-1]&&(a=a.substring(0,a.length-1));if(0!=a.indexOf("http")){var b=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");a="/"==a[0]?b+a:b+"/"+a}b=0==a.indexOf("https")?a.replace("https","wss")+"/msgwatch/":a.replace("http","ws")+"/msgwatch/";var c=m.getUrlParamValue("cookieName");b=b+"?identifytype=QING"+d.createUUID()+"&tenantsessionkey="+c;var e=n("/qingshared/remoteProxy.do");
g||(g=d.createUUID());c=m.getUrlParamValue("appID");u.start(c,g,a,b,e);r.setImpl(u);b=n(a+"/qing/downloadFile.do?appID="+c);r.setDownloadUrl(b);b=n(a+"/qing/uploadFile.do?appID="+c);r.setUploadUrl(b);b=n(a+"/qing/loadImg.do");r.setLoadImgUrl(b);b=n(a+"/qing/lappPrivateInfo.do");r.setLappPrivateUrl(b);b="error.do";(c=m.getUrlParamValue("language"))&&(b=d.appendParamToUrl(b,"language",c));b=n(b);r.setErrorPageUrl(b);c=a+"/qing/fontLibJs.do";b=n(a+"/qing/fontLibCss.do");c=n(c);com.kingdee.bos.qing.framework.common.FontLibSupporter.config(b,
c);com.kingdee.bos.qing.msgbus&&com.kingdee.bos.qing.msgbus.MsgBus&&com.kingdee.bos.qing.msgbus.MsgBus.init((a?a:"/ierp")+"/qing/msgbus.do")})();y.setCustomSuccessIntercepter(function(a){var b=a.RedirectURL;return b?(top.location.href=b,!0):(b=a.error_code)?(a=a.error_desc,100==b?top.location.reload():(a="Error code: "+b+"\n"+a,b=new l,b.setOptionType(l.OPTION_OK),b.setMessage(a),b.showDialog()),!0):!1});var B=new function(){this.call=function(a){var b=com.kingdee.bos.qing.SkinUtil;if(a.themeColor){var c=
a.themeColor;b.changeColorTheme(c.trim())}else console&&console.error("unsupported skin color theme: "+c)}};A.setEnvListener(function(a){try{var b=a.type;if("changeTheme"==b)B.call(a);else if("perm_role"==b||"bos_user"==b)f.UserAndRoleForm.messageListener(a);else if("openAppMenuForm"==b)f.OpenAppMenuForm.messageListener(a);else if("openAppChooseForm"==b)f.AppChooseForm.messageListener(a);else if("homepageCardNewPageId"==b)f.RefreshCardHelper.messageListener(a);else if("reExtractData"==b)"undefined"!=
typeof QingFacade&&QingFacade.reExtractData&&QingFacade.reExtractData();else if("cannotCloseTab"==b)a.stopPropagate=!0,f.TabStatusHelper.messageListener(a);else if("selectCustomcard"==b)f.CustomCardHelper.messageListener(a);else if("selectCloudHubSubscribeCard"==b)f.CloudHubSubscribeCardHelper.messageListener(a);else if("qing_hierarchy_filter"==b)f.ERPCloudMDDParildFilterChooseForm.messageListener(a);else if("qingCardCtrl"==b)f.CardCtrlMsgHandler.messageListener(a);else if("openGaiPrivacyAgreement"==
b)f.GaiPrivacyAgreementActionHandler.messageListener(a);else if("openQingGPT"==b)try{com.kingdee.bos.qing.assistant.common.Integration.openQingGPT(a.data)}catch(c){}}catch(c){console&&console.error("Unknow window message event",c)}})})();
//qingVersionTag: 20250415