var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(h){var x=0;return function(){return x<h.length?{done:!1,value:h[x++]}:{done:!0}}};$jscomp.arrayIterator=function(h){return{next:$jscomp.arrayIteratorImpl(h)}};$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(h,x,K){if(h==Array.prototype||h==Object.prototype)return h;h[x]=K.value;return h};$jscomp.getGlobal=function(h){h=["object"==typeof globalThis&&globalThis,h,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var x=0;x<h.length;++x){var K=h[x];if(K&&K.Math==Math)return K}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(h,x){var K=$jscomp.propertyToPolyfillSymbol[x];if(null==K)return h[x];K=h[K];return void 0!==K?K:h[x]};
$jscomp.polyfill=function(h,x,K,W){x&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(h,x,K,W):$jscomp.polyfillUnisolated(h,x,K,W))};$jscomp.polyfillUnisolated=function(h,x,K,W){K=$jscomp.global;h=h.split(".");for(W=0;W<h.length-1;W++){var U=h[W];if(!(U in K))return;K=K[U]}h=h[h.length-1];W=K[h];x=x(W);x!=W&&null!=x&&$jscomp.defineProperty(K,h,{configurable:!0,writable:!0,value:x})};
$jscomp.polyfillIsolated=function(h,x,K,W){var U=h.split(".");h=1===U.length;W=U[0];W=!h&&W in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var fa=0;fa<U.length-1;fa++){var qa=U[fa];if(!(qa in W))return;W=W[qa]}U=U[U.length-1];K=$jscomp.IS_SYMBOL_NATIVE&&"es6"===K?W[U]:null;x=x(K);null!=x&&(h?$jscomp.defineProperty($jscomp.polyfills,U,{configurable:!0,writable:!0,value:x}):x!==K&&(void 0===$jscomp.propertyToPolyfillSymbol[U]&&(K=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[U]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(U):$jscomp.POLYFILL_PREFIX+K+"$"+U),$jscomp.defineProperty(W,$jscomp.propertyToPolyfillSymbol[U],{configurable:!0,writable:!0,value:x})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(h){if(h)return h;var x=function(fa,qa){this.$jscomp$symbol$id_=fa;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:qa})};x.prototype.toString=function(){return this.$jscomp$symbol$id_};var K="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",W=0,U=function(fa){if(this instanceof U)throw new TypeError("Symbol is not a constructor");return new x(K+(fa||"")+"_"+W++,fa)};return U},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(h){if(h)return h;h=Symbol("Symbol.iterator");for(var x="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),K=0;K<x.length;K++){var W=$jscomp.global[x[K]];"function"===typeof W&&"function"!=typeof W.prototype[h]&&$jscomp.defineProperty(W.prototype,h,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return h},"es6",
"es3");$jscomp.iteratorPrototype=function(h){h={next:h};h[Symbol.iterator]=function(){return this};return h};$jscomp.iteratorFromArray=function(h,x){h instanceof String&&(h+="");var K=0,W=!1,U={next:function(){if(!W&&K<h.length){var fa=K++;return{value:x(fa,h[fa]),done:!1}}W=!0;return{done:!0,value:void 0}}};U[Symbol.iterator]=function(){return U};return U};
$jscomp.polyfill("Array.prototype.keys",function(h){return h?h:function(){return $jscomp.iteratorFromArray(this,function(x){return x})}},"es6","es3");$jscomp.findInternal=function(h,x,K){h instanceof String&&(h=String(h));for(var W=h.length,U=0;U<W;U++){var fa=h[U];if(x.call(K,fa,U,h))return{i:U,v:fa}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(h){return h?h:function(x,K){return $jscomp.findInternal(this,x,K).v}},"es6","es3");
(function(){"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.scene&&(com.kingdee.bos.qing.scene={});var h=com.kingdee.bos.qing.scene;h.SubjectModelingFacade=function(X,na,ka,ea){K.call(this,X,na,ka,ea);var N=this.protectedMethod;this.loadModel=function(ca){N.remote("loadModel",{themeID:ca})};this.checkSubjectIsRejectPrepareData=
function(ca){N.remote("checkSubjectIsRejectPrepareData",{themeID:ca})};this.saveModel=function(ca,G){ca={model:JSON.stringify(G),themeID:ca};N.remote("saveModel",ca)}};var x,K,W,U,fa,qa;(function(){var X=com.kingdee.bos.qing;x=X.CodeLoader;X=com.kingdee.bos.qing.framework.common;K=X.AbstractFacade;W=X.IconsFile;U=X.MultilanguageManager.createPackageAccessor(h);X=com.kingdee.bos.qing.data;fa=X.Icons;qa=X.BizSourceTypeContext})();h.DataModellingContext=new function(){function X(){var O=x.getSkinName(),
ba=new W;ba.setFilePath("scene/skin/"+O+"/res/dm-impl.png");ba.setStartPosition(1,1);ba.setIconSize(16,16);O=ba.createDescription(0,2);fa.regist("f7",O)}var na=[],ka={},ea=[],N={},ca={},G=[],ja=[],n,l={};this.addSourceType=function(O){na.push(O)};var Y=function(){for(var O=0;O<na.length;O++){var ba=na[O];ba&&ba(S)}},S=function(O,ba,oa,la,ta,z,M){ea.push(O);ja.push(ba);O=O.getName();N[O]=oa;ca[O]=z;la&&(ka[O]=la);ta&&G.push(ta);M&&(l[O]=M)};this.init=function(O){Y();n=O;for(var ba=0;ba<ja.length;ba++)(O=
ja[ba])&&O();X();O=qa;O.setTitle(U.get("ERPCloudEntity","\u91d1\u8776\u4e91\u82cd\u7a79"));O.setPermissionChecker(ha);O.setSourceTypes(ea);var oa=Object.keys(ca);for(ba=0;ba<oa.length;ba++){var la=oa[ba],ta=ca[la];O.addSourceFilterUIRender(la,ta)}O.setStepProvider(function(z,M,t,q,I,f){var a=z.getExistSource();z=z.getName();var g=N[z];return g?g(n,z,a,M,t,q,I,f):[]});O.setMutexChecker(function(z,M,t){M=M.getName();for(var q=0;q<G.length;q++)if((0,G[q])(z,M,t))return!0;return!1});O.addSourceFilterUIRender(la,
ta);ta=Object.keys(l);for(ba=0;ba<ta.length;ba++)la=ta[ba],O.addSourceModifyingEditor(la,l[la])};var ha=function(O,ba,oa,la){(O=ka[O])?O(n,ba,oa,la):oa()}}})();(function(){function h(){N.call(this);var n=this;this.getShortDisplay=function(){return X.get("bussinessEntity","\u4e1a\u52a1\u5b9e\u4f53")};this.protectedIsTheSame=function(l){return!0};this.isModifiable=function(){return!1};this.fissionFor=function(l){l=new h;l.setTypeName(n.getTypeName());return l};this.getMergeType=function(){return ca.BIZ_MERGE};this.supportMergeTable=function(){return!0};this.protectedToJsonObject=function(l){};this.protectedFromJsonObject=function(l){};this.isSupportFlexModel=
function(){return!0};this.getEntityIconName=function(l){return"entity"};this.isShowEntityMark=function(){return!0}}function x(){na.call(this);this.getSubTitle=function(){return X.get("selectEntity","\u9009\u62e9\u5b9e\u4f53")};this.isScannable=function(){return!0}}function K(n,l,Y,S,ha){Y||(Y=new h,Y.setName("s"+(new Date).getTime()),Y.setTypeName(l));n=new x;n.setSource(Y);l=new ka;l.setSource(Y);return[n,l]}function W(){var n=fa.getSkinName(),l=new qa;l.setFilePath("scene/skin/"+n+"/res/dm-impl.png");
l.setStartPosition(1,1);l.setIconSize(16,16);ea.regist("entity",l.createDescription(0,0));ea.regist("entity_selected",l.createDescription(1,0));ea.regist("entity-sub",l.createDescription(0,1));ea.regist("entity-sub_selected",l.createDescription(1,1));ea.regist("head-biz-union",l.createDescription(2,0));ea.regist("head-biz-union_selected",l.createDescription(3,0));ea.regist("entry-biz-union",l.createDescription(2,1));ea.regist("entry-biz-union_selected",l.createDescription(3,1));ea.regist("query_entity",
l.createDescription(0,3));ea.regist("query_entity_selected",l.createDescription(0,4));ea.regist("query_entity-sub",l.createDescription(0,7));ea.regist("query_entity-sub_selected",l.createDescription(0,8));ea.regist("with_post_processor_entity",l.createDescription(0,5));ea.regist("with_post_processor_entity_selected",l.createDescription(0,6));ea.regist("with_post_processor_entity-sub",l.createDescription(0,9));ea.regist("with_post_processor_entity-sub_selected",l.createDescription(0,10));l.setStartPosition(1,
69);l.setIconSize(90,45);n=l.createDescription(1,0);ea.regist("source_ERPCloud_blue",n)}"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.scene&&(com.kingdee.bos.qing.scene={});var U=com.kingdee.bos.qing.scene,fa,qa,X,na,ka,ea,N,ca,G,ja;(function(){var n=com.kingdee.bos.qing;fa=n.CodeLoader;n=com.kingdee.bos.qing.framework.common;
qa=n.IconsFile;X=n.MultilanguageManager.createPackageAccessor(U);n=com.kingdee.bos.qing.data;na=n.DbSelectTableStep;ka=n.DbSelectFieldStep;ea=n.Icons;N=n.AbstractBizMetaSource;ca=n.AbstractSource;G=n.SourceType;ja=U.DataModellingContext})();h.ENTITY="ERPCloudEntity";ja.addSourceType(function(n){n(new G(h.ENTITY,X.get("bussinessEntity","\u4e1a\u52a1\u5b9e\u4f53"),"source_ERPCloud_blue",h),W,K,null,null,null)})})();(function(){function h(){ja.call(this);var z=this,M={},t={},q,I,f,a,g,w=!1;this.isBasedOnDB=function(){return!0};this.isModifiable=function(){return!0};this.isShowChangeSourceTypeButtonInMenu=function(){return!1};this.supportMergeTable=function(){return!0};this.getMergeType=function(){return l.COMMON_MERGE};this.isSupportColumnToRow=function(){return!0};this.getShortDisplay=function(){return N.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")};this.addUserSql=function(c){var d=c.getName();M[d]=c};this.setAllUserSql=
function(c){M=c};this.hasUserSql=function(){return M&&"{}"!==JSON.stringify(M)};this.isUserSql=function(c){return!!M[c]};this.getUserSql=function(c){return M[c]};this.getAllUserSqlName=function(){return Object.keys(M)};this.getAllUserSql=function(){return M};this.removeUserSql=function(c){delete M[c]};this.supportStoredProcedure=function(){return!1};this.addStoredProcedure=function(c){var d=c.getName();t[d]=c};this.setAllStoredProcedure=function(c){t=c};this.hasStoredProcedure=function(){return t&&
"{}"!==JSON.stringify(t)};this.isStoredProcedure=function(c){return!!t[c]};this.getStoredProcedure=function(c){return t[c]};this.getAllStoredProcedureName=function(){return Object.keys(t)};this.getAllStoredProcedure=function(){return t};this.removeStoredProcedure=function(c){delete t[c]};this.setSchemaName=function(c){q=c};this.getSchemaName=function(){return q};this.setDbAddress=function(c){f=c};this.getDbAddress=function(){return f};this.setDbName=function(c){I=c};this.getDbName=function(){return I};
this.setUserName=function(c){a=c};this.getUserName=function(){return a};this.setPassword=function(c){g=c};this.getPassword=function(){return g};this.setQueryEntries=function(c){w=c};this.isQueryEntries=function(){return w};this.protectedToJsonObject=function(c){for(var d=[],y=z.getAllUserSqlName(),r=0;r<y.length;r++){var e=y[r];if(z.isUserSql(e)){var C={},A=z.getUserSql(e);C.name=e;C.sqlType=A.getSqlType();C.content=A.getContent();d.push(C)}}c.userSqls=d;c.schemaName=q;c.dbName=I;c.dbAddress=f;c.userName=
a;g&&(c.password=na.encode(g));c.isQueryEntries=w};this.protectedFromJsonObject=function(c){if(c.userSqls)for(var d=c.userSqls,y=0;y<d.length;y++){var r=new n,e=d[y];r.setName(e.name);r.setContent(e.content);r.setSqlType(e.sqlType);z.addUserSql(r)}q=c.schemaName;I=c.dbName;f=c.dbAddress;a=c.userName;c.password&&(g=na.decode(c.password));w=c.isQueryEntries};this.isTheSame=function(c){return z.getTypeName()==c.getTypeName()&&z.getSchemaName()==c.getSchemaName()&&z.getDbAddress()==c.getDbAddress()&&
z.getDbName()==c.getDbName()};this.clone=function(){var c=new h;c.setName("s"+(new Date).getTime());c.setTypeName(z.getTypeName());for(var d={},y=z.getAllUserSqlName(),r=0;r<y.length;r++)d[y[r]]=M[y[r]];c.setAllUserSql(d);c.setSchemaName(q);c.setDbName(I);c.setDbAddress(f);c.setUserName(a);c.setPassword(g);return c};this.clear=function(){q=g=a=f=I=null};this.mergeFrom=function(c){for(var d=c.getAllUserSqlName(),y=0;y<d.length;y++){var r=d[y];c.isUserSql(r)&&(r=c.getUserSql(r),z.addUserSql(r))}z.setSchemaName(c.getSchemaName());
z.setDbName(c.getDbName());z.setDbAddress(c.getDbAddress());z.setUserName(c.getUserName());z.setPassword(c.getPassword())};this.fissionFor=function(c){var d=new h;d.setName("s"+(new Date).getTime());c=c.getName();if(z.isUserSql(c)){var y=z.getUserSql(c);d.addUserSql(y);z.removeUserSql(c)}return d};this.isShowEntityMark=function(){return!0};this.isPublic=function(){return!0};this.getConnectionType=function(){return l.DBCONNECTION_TYPE_SUPERQUERY}}function x(){var z,M;this.createStep=function(t,q,I,
f,a,g){z=t.clone();q?M=new oa:(M=new S,M.setChangeSourceType(I),M.setMessageCurtain(g),M.setOldEntity(f),M.setDModel(a));M.setSource(z);return M}}function K(z,M,t,q,I,f,a,g){t||(t=new h,t.setName("s"+(new Date).getTime()),t.setTypeName(M));return[(new x).createStep(t,I,f,a,g,q)]}function W(){var z=qa.getSkinName(),M=new ea;M.setFilePath("scene/skin/"+z+"/res/dm-impl.png");M.setStartPosition(1,1);M.setIconSize(16,16);M.setStartPosition(1,69);M.setIconSize(90,45);z=M.createDescription(1,0);G.regist("source_SuperQuery",
z)}function U(){ha.call(this);var z=this,M=this.protectedMethod,t,q,I,f,a,g,w,c,d,y,r;this.propectedCreateJqUi=function(E,b,m,k,D){g=E;I=k;q=D;w=b;c=m;t||(t=$("<div>"),e());return t};var e=function(){var E=c.clone();E.setSchemaName(null);var b=c.getSchemaName();I.createFacade(function(m){f=[];for(var k=Object.keys(m),D=0;D<k.length;D++){var u=new ba;u.setName(k[D]);u.setAlias(m[k[D]]);b==k[D]&&(a=u);f.push(u)}0==f.length&&(m=N.get("noAuthentication","\u6ca1\u6709\u53ef\u7528\u7684\u6a21\u5f0f\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u6388\u6743\u6a21\u5f0f\u3002"),
M.getMessageCurtain().showPrompt(m));a||(m=new ba,m.setName(b),m.setAlias(b),a=m);C();return!0},function(m,k){f=[];C();M.getMessageCurtain().showPrompt(k);return!0}).getUsableSchemas(E.toJsonObject())},C=function(){var E=0;E="";null!=c.getDbAddress()?(r=new ta,r.setSchemas(f),r.setSelectedSchema(a),r.setSource(c),r.setCtxApi(I),r.setMessageCurtain(M.getMessageCurtain()),d=r,t.append(r.getJqUi()),E=N.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")+"-"+N.get("otherSystem","\u5176\u5b83\u7cfb\u7edf"),r.setTitle(E),
E=324):(y=new la,y.setSchemas(f),y.setSelectedSchema(a),d=y,t.append(y.getJqUi()),y.setTitle(N.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")),E=108);var b=new O;b.setClosingAction(function(m){var k=z.getConfirmListener();k&&k(m)});b.setCloseCallerDialogCallback(function(){M.destroy()});b.setChangeDataSourceParameter(g,w,I,q,c);b=b.getJqUi();X.layoutCtrl(b,0,E,120,60)};this.protectedAccepted=function(E,b){var m=d.getErrorMessage();if(m)return M.getMessageCurtain().showPrompt(m),!1;var k=c.clone();a=
d.getSchema();if(null!=c.getDbAddress()){var D=a.getName(),u=d.getCloneSource();u.setSchemaName(D);I.createFacade(function(L){k.setSchemaName(D);k.setDbAddress(u.getDbAddress());k.setDbName(u.getDbName());k.setUserName(u.getUserName());k.setPassword(u.getPassword());A(E,b,k);return!0},function(L,P){3201001==L&&(P=N.get("noSchemaPerm","\u201c#1\u201d\u7528\u6237\u6ca1\u6709\u201c#2\u201d\u6a21\u5f0f\u7684\u6743\u9650\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u6a21\u5f0f\u6216\u8054\u7cfb\u7ba1\u7406\u5458\u6388\u6743\u3002").replace("#1",
u.getUserName()).replace("#2",u.getSchemaName()));M.getMessageCurtain().showPrompt(P);return!0}).getUsableSchemas(u.toJsonObject())}else k.setSchemaName(a.getName()),A(E,b,k)};var A=function(E,b,m){m.isTheSame(b)||(E.setSource(m),m=g.getSources(),E.mergeSource(m),g.funClearUserSqlsAndStoredProcedures(b));z.refreshDesigntimeDataObject(w,w.getSource(),I);if(d.isChecked()){E=g.getAllEntity();for(var k in E)b=E[k],!b.isUnion()&&c.isTheSame(b.getSource())&&w.getName()!==b.getName()&&(b.setSource(w.getSource()),
b.mergeSource(g.getSources()),z.refreshDesigntimeDataObject(b,b.getSource(),I))}};this.protectedIsValidToAccepted=function(E){E(!0)}}"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.scene&&(com.kingdee.bos.qing.scene={});var fa=com.kingdee.bos.qing.scene;fa.SuperQuerySource=h;fa.SuperQueryFacade=function(z,
M,t,q){ka.call(this,z,M,t,q);var I=this.protectedMethod;this.checkSuperQueryPermission=function(){I.remote("checkSuperQueryPermission",{})};this.loadUsableSchemas=function(f){f={source:JSON.stringify(f.toJsonObject())};I.remote("loadUsableSchemas",f)}};var qa,X,na,ka,ea,N,ca,G,ja,n,l,Y,S,ha,O,ba,oa,la,ta;(function(){var z=com.kingdee.bos.qing;qa=z.CodeLoader;z=com.kingdee.bos.qing.common;X=z.DomUtil;na=z.Base64Util;z=com.kingdee.bos.qing.framework.common;ka=z.AbstractFacade;N=z.MultilanguageManager.createPackageAccessor(fa);
ea=z.IconsFile;z=com.kingdee.bos.qing.data;ca=z.SourceType;G=z.Icons;ja=z.AbstractBizMetaSource;l=z.AbstractSource;n=z.UserSqlObj;S=z.SuperQueryConnectionStep;ha=z.AbstractSourceModifyingEditor;O=z.AdvancedSettingPane;ba=z.SchemaInfo;oa=z.MergeSuperQueryStep;la=z.ModifyDirectConnPanel;ta=z.ModifySqlConnPanel;Y=fa.DataModellingContext})();h.ENTITY="SuperQuery";Y.addSourceType(function(z){z(new ca(h.ENTITY,N.get("superQuery","\u8d85\u7ea7\u67e5\u8be2"),"source_SuperQuery",h),W,K,null,null,null,U)})})();(function(){function h(a,g,w,c){ea.call(this,a,g,w,c);var d=this.protectedMethod;this.checkDBCenterPermission=function(){d.remote("checkDBCenterPermission",{})};this.loadAppNameByAppNumber=function(y){d.remote("loadAppNameByAppNumber",{appNumber:y})};this.getDBCenterAppDBType=function(y){d.remote("getDBCenterAppDBType",{appNumber:y})}}function x(){S.call(this);var a=this,g,w,c={},d={},y=t.checkEnvironment(t.COSMIC),r=!y;this.isBasedOnDB=function(){return!0};this.isModifiable=function(){return y};
this.isShowChangeSourceTypeButtonInMenu=function(){return r};this.setShowChangeSourceTypeButtonInMenu=function(e){r=e};this.supportMergeTable=function(){return!0};this.getMergeType=function(){return oa.COMMON_MERGE};this.isSupportColumnToRow=function(){return!0};this.setAppNumber=function(e){g=e};this.getAppNumber=function(){return g};this.setAppName=function(e){w=e};this.getAppName=function(){return w};this.getShortDisplay=function(){return ca.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3")};
this.isUserSql=function(e){return c[e]?!0:!1};this.protectedToJsonObject=function(e){e.appNumber=g;e.appName=w;for(var C=[],A=a.getAllUserSqlName(),E=0;E<A.length;E++){var b=A[E];if(a.isUserSql(b)){var m=a.getUserSql(b),k=m.getContent();m=m.getSqlType();var D={};D.name=b;D.content=k;D.sqlType=m;C.push(D)}}e.userSqls=C;C=[];A=a.getAllStoredProcedureName();for(E=0;E<A.length;E++)b=A[E],a.isStoredProcedure(b)&&(b=a.getStoredProcedure(b),C.push(b.toJsonObject()));e.storedProcedures=C};this.protectedFromJsonObject=
function(e){g=e.appNumber;w=e.appName;var C=e.userSqls;if(C)for(var A=0;A<C.length;A++){var E=C[A],b=new O;b.setName(E.name);b.setContent(E.content);b.setSqlType(E.sqlType);a.addUserSql(b)}if(e=e.storedProcedures)for(A=0;A<e.length;A++)C=e[A],E=new ba,E.fromJsonObject(C),a.addStoredProcedure(E)};this.isTheSame=function(e){return a.getTypeName()==e.getTypeName()&&a.getAppNumber()==e.getAppNumber()};this.clone=function(){var e=new x;e.setName("s"+(new Date).getTime());e.setTypeName(a.getTypeName());
e.setAppNumber(g);var C={},A;for(A in c)C[A]=c[A];e.setAllUserSql(C);C={};for(var E in d)C[E]=d[E];e.setAllStoredProcedure(C);return e};this.mergeFrom=function(e){g=e.getAppNumber();for(var C=e.getAllUserSqlName(),A=0;A<C.length;A++){var E=C[A];e.isUserSql(E)&&(E=e.getUserSql(E),a.addUserSql(E))}C=e.getAllStoredProcedureName();for(A=0;A<C.length;A++)E=C[A],e.isStoredProcedure(E)&&(E=e.getStoredProcedure(E),a.addStoredProcedure(E))};this.isUserSql=function(e){return c[e]?!0:!1};this.getUserSql=function(e){return c[e]};
this.removeUserSql=function(e){delete c[e]};this.addStoredProcedure=function(e){var C=e.getName();d[C]=e};this.removeStoredProcedure=function(e){delete d[e]};this.getStoredProcedure=function(e){return d[e]};this.getAllStoredProcedureName=function(){var e=[],C;for(C in d)e.push(C);return e};this.isStoredProcedure=function(e){return d[e]?!0:!1};this.supportStoredProcedure=function(){return!1};this.fissionFor=function(e){var C=new x;C.setName("s"+(new Date).getTime());e=e.getName();if(a.isUserSql(e)){var A=
a.getUserSql(e);C.addUserSql(A);a.removeUserSql(e)}a.isStoredProcedure(e)&&(A=a.getStoredProcedure(e),C.addStoredProcedure(A),a.removeStoredProcedure(e));return C};this.addUserSql=function(e){var C=e.getName();c[C]=e};this.getAllUserSqlName=function(){var e=[],C;for(C in c)e.push(C);return e};this.setAllUserSql=function(e){c=e};this.getAllUserSql=function(){return c};this.hasUserSql=function(){return c&&"{}"!==JSON.stringify(c)?!0:!1};this.hasStoredProcedure=function(){return d&&"{}"!==JSON.stringify(d)?
!0:!1};this.setAllStoredProcedure=function(e){d=e};this.getAllStoredProcedure=function(){return d};this.getConnectionType=function(){return oa.DBCONNECTION_TYPE_DBCENTER}}function K(a,g,w,c,d,y,r,e){w||(w=new x,w.setName("s"+(new Date).getTime()),w.setTypeName(g));return[(new fa(a)).createStep(w,d,y,r,e)]}function W(){var a=na.getSkinName(),g=new N;g.setFilePath("scene/skin/"+a+"/res/dm-impl.png");g.setStartPosition(1,1);g.setIconSize(16,16);g.setStartPosition(1,69);g.setIconSize(90,45);a=g.createDescription(1,
0);Y.regist("source_ERPCloudDBCenter",a)}function U(){var a,g,w,c;this.getJqUi=function(){if(!g){g=$("<div>");w=new ja;w.setText(ca.get("chooseApp","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528"));w.setReadonly("readonly");var r=w.getJqUi();r.on("click",y);var e=$("<div>");Y.background(e,"f7");e.css("z-index","1");e.css("cursor","pointer");e.on("click",y);ka.layoutCtrl(r,0,0,180,23);ka.layoutCtrl(e,160,0,16,16);e.appendTo(g);r.appendTo(g)}return g};this.setFunSelectedChangeListener=function(r){c=r};
this.setSelectedValue=function(r){a=r;w&&w.setText(d());c(a)};this.getSelectedValue=function(){return a};var d=function(){var r=ca.get("chooseApp","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528");a&&(r=a.text);return r},y=function(){var r=com.kingdee.bos.qing.integration.AppChooseForm;r.setCallBack(function(e){if(e&&e.content){e=e.content;var C=e.appNumber,A={};A.text=e.appName;A.value=C;a=A;w&&w.setText(d());c(a)}});r.openAppChooseForm()}}function fa(a){var g,w=new U,c;this.createStep=function(C,A,
E,b,m){g=C.clone();A?c=new ta:(c=new ha,c.setChangeSourceType(E),c.setOldEntity(b),c.setDModel(m));c.isShowDataBase(!0);c.setDataBaseJqUiCreator(y);c.setDbChecker(d);c.setSource(g);return c};var d=function(C,A){var E=w.getSelectedValue();if(E)return C.setAppNumber(E.value),!0;A.showPrompt(ca.get("chooseAppCurtain","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528\u3002"));return!1},y=function(C){var A=$("<div>"),E=(new G(ca.get("app","\u5e94\u7528"))).getJqUi(),b=w.getJqUi();w.setFunSelectedChangeListener(e);
ka.layoutCtrl(E,15,0,70,23);ka.layoutCtrl(b,60,0,200,23);A.append(E);A.append(b);r(C);return A},r=function(C){var A=g.getAppNumber();A&&(new h(a,function(E){E?w.setSelectedValue({text:E.appName,value:A}):C.showPrompt(ca.get("loadAppNameError","\u83b7\u53d6\u5e94\u7528\u540d\u79f0\u5931\u8d25\u3002"),2E3)},function(E,b){b?C.showPrompt(b,2E3):C.showPrompt(ca.get("loadAppNameError","\u83b7\u53d6\u5e94\u7528\u540d\u79f0\u5931\u8d25\u3002"),2E3);return!0})).loadAppNameByAppNumber(A)},e=function(C){C=C.value;
(new h(a,function(A){c.changeDBType(A)},function(A){return!1})).getDBCenterAppDBType(C)}}function qa(){z.call(this);var a=this,g=this.protectedMethod,w,c,d,y,r,e,C,A=new com.kingdee.bos.qing.data.RemoteImpl,E,b=new U;this.propectedCreateJqUi=function(u,L,P,p,Q){w=u;c=L;y=p;d=P;C=Q;r||m();return r};var m=function(){r=$("<div>");var u=(new G(ca.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3"))).getJqUi(),L=(new G(ca.get("app","\u5e94\u7528"))).getJqUi(),P=b.getJqUi();b.setFunSelectedChangeListener(function(){});
var p=d.getAppNumber();p&&(A.setRemoteUrl(k()),D(A,p));e=new n;e.setText(ca.get("actOnTheSameDatabase","\u540c\u65f6\u4fee\u6539\u5f53\u524d\u4e3b\u9898\u4e2d\u5176\u4ed6\u540c\u6e90\u6570\u636e\u8868"));e.setChecked(!0);p=e.getJqUi();ka.layoutCtrl(u,0,0,120,23);ka.layoutCtrl(L,20,40,70,23);ka.layoutCtrl(P,70,40,280,23);ka.layoutCtrl(p,20,80,250,23);r.append(u);r.append(L);r.append(P);r.append(p);u=new M;var Q=a.getConfirmListener();u.setClosingAction(function(F){Q&&Q(F)});u.setCloseCallerDialogCallback(function(){g.destroy()});
u.setChangeDataSourceParameter(w,c,y,C,d);u=u.getJqUi();ka.layoutCtrl(u,0,120,120,60);r.append(u)},k=function(){var u=(new com.kingdee.bos.qing.data.DataModelingScene).getUrlParam("path");return(u?u:"/ierp")+"/qing/dataModeling.do"},D=function(u,L){(new com.kingdee.bos.qing.scene.DataCenterFacade(u,function(P){P&&b.setSelectedValue({text:P.appName,value:L})},function(P,p){b.setSelectedValue({text:L,value:L});p&&(E||(E=q.createWarning(),P=(new I).measureWidth(ca.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3"))+
14,ka.layoutCtrl(E,P,5,12,12),E.appendTo(r)),E.attr("title",p),E.show());return!0})).loadAppNameByAppNumber(L)};this.protectedIsValidToAccepted=function(u){u(!0)};this.protectedAccepted=function(u,L){var P=!e.isChecked(),p=d.clone();p.setAppNumber(b.getSelectedValue().value);if(P){if(!p.isTheSame(L)){var Q=u.getName();d.isUserSql(Q)?(Q=d.getUserSql(Q),p.addUserSql(Q)):d.isStoredProcedure(Q)&&(Q=d.getStoredProcedure(Q),p.addStoredProcedure(Q));Q=w.getSources();u.setSource(p);u.mergeSource(Q);w.funClearUserSqlsAndStoredProcedures(L)}a.refreshDesigntimeDataObject(c,
c.getSource(),y)}else for(Q in L.setAppNumber(p.getAppNumber()),a.refreshDesigntimeDataObject(c,c.getSource(),y),u=w.getAllEntity(),u)L=u[Q],L.isUnion()||c.getSource().isTheSame(L.getSource())&&c.getName()!==L.getName()&&a.refreshDesigntimeDataObject(L,c.getSource(),y)}}"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.scene&&
(com.kingdee.bos.qing.scene={});var X=com.kingdee.bos.qing.scene;X.AppChooseDialogSelector=U;X.ERPCloudDBCenterSource=x;X.DataCenterFacade=h;var na,ka,ea,N,ca,G,ja,n,l,Y,S,ha,O,ba,oa,la,ta,z,M,t,q,I;(function(){var a=com.kingdee.bos.qing;na=a.CodeLoader;a=com.kingdee.bos.qing.common;ka=a.DomUtil;I=a.TextMeasurer;a=com.kingdee.bos.qing.common.ui;q=a.CommonIconUtil;a=com.kingdee.bos.qing.framework.common;ea=a.AbstractFacade;N=a.IconsFile;ca=a.MultilanguageManager.createPackageAccessor(X);a=com.kingdee.bos.qing.ui.component;
G=a.Label;ja=a.TextField;n=a.CheckBox;a=com.kingdee.bos.qing.data;l=a.SourceType;Y=a.Icons;S=a.AbstractBizMetaSource;oa=a.AbstractSource;ha=a.MetaDBConnectionStep;ta=a.MergeDBCenterConnectionStep;O=a.UserSqlObj;ba=a.StoredProcedureModel;M=a.AdvancedSettingPane;z=a.AbstractSourceModifyingEditor;t=a.ProductLineEnvironment;la=X.DataModellingContext})();x.DBCENTER="ERPCloudDBCenter";var f=function(a,g,w,c){(new h(a,function(d){d?w():(g.showPrompt(ca.get("noDBCenterPermission","\u6ca1\u6709\u6570\u636e\u4e2d\u5fc3\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),
2E3),c())},function(d){c();return!1})).checkDBCenterPermission()};la.addSourceType(function(a){a(new l(x.DBCENTER,ca.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3"),"source_ERPCloudDBCenter",x),W,K,f,null,null,qa)})})();(function(){function h(){l.call(this);var t=this,q={},I,f;this.setModelId=function(a){I=a};this.getModelId=function(){return I};this.setModelType=function(a){f=a};this.getModelType=function(){return f};this.getAllModelType=function(){return q};this.setTotalModelType=function(a){q=a};this.addModelType=function(a,g){q[a]=g};this.isMetricModel=function(a){return q[a]==la};this.isMetricModelSelected=function(a){a=Object.keys(a);for(var g=0;g<a.length;g++)if(t.isMetricModel(a[g]))return!0;return!1};this.getShortDisplay=
function(){return N.get("dppSourceName","\u8f7b\u5efa\u6a21")};this.protectedIsTheSame=function(a){return!0};this.isModifiable=function(){return!1};this.fissionFor=function(a){a=new h;a.setTypeName(t.getTypeName());a.setModelId(t.getModelId());a.setModelType(t.getModelType());return a};this.getMergeType=function(){return Y.BIZ_MERGE};this.supportMergeTable=function(){return!1};this.protectedToJsonObject=function(a){a.modelId=I;a.modelType=f;a.allModelType=q};this.protectedFromJsonObject=function(a){I=
a.modelId;f=a.modelType;q=a.allModelType};this.isSupportFlexModel=function(){return!0};this.getEntityIconName=function(a){var g=a;-1!==a.indexOf("_")&&(g=a.lastIndexOf("_"),g=a.slice(0,g));return q[g]};this.mergeFrom=function(a){a=a.getAllModelType();for(var g=Object.keys(a),w=0;w<g.length;w++)q[g[w]]||(q[g[w]]=a[g[w]])};this.isShowEntityMark=function(){return!0};this.isSupportCustomField=function(a){return!t.isMetricModel(a)};this.isSupportChangeFieldType=function(a){return!t.isMetricModel(a)};this.isSupportCreateRelation=
function(a){return!t.isMetricModel(a)};this.isSupportExtractData=function(a){return!t.isMetricModel(a)};this.getDisplayName=function(a){return t.isMetricModel(a)?N.get("metricModel","\u6307\u6807\u6a21\u578b"):N.get("dataTableModel","\u6570\u636e\u8868\u6a21\u578b")}}function x(){ja.call(this);var t=this.protectedMethod,q=this,I,f;S.DPP_SOURCES=[new S("data_table_model",N.get("dataTableModel","\u6570\u636e\u8868\u6a21\u578b"),"source_data_table")];this.protectedCreateUi=function(){var d=$("<div class='dm-modeler'>"),
y=$("<div class='dm-source-type-typelist-title'>");y.text(N.get("type","\u7c7b\u578b"));y.on("mousedown",a);var r=new ha;r.setItemModels(S.DPP_SOURCES);r.setBorderVisible(!1);r.setCustomItemPainter(g);r.setCustomSelectedsPainter(w);r.addPressedListener(c);r=r.getJqUi();r.addClass("dm-source-type-typelist-list");d.append(y);d.append(r);return d};var a=function(d){d.ctrlKey&&20<=d.offsetX&&50>=d.offsetX&&(2===S.DPP_SOURCES.length&&S.DPP_SOURCES.pop(),S.DPP_SOURCES.push(new S(la,N.get("metricModel",
"\u6307\u6807\u6a21\u578b"),"source_metric")),$(".dm-modeler .dm-source-type-typelist-list").remove(),d=new ha,d.setItemModels(S.DPP_SOURCES),d.setSelecteds([f]),d.setBorderVisible(!1),d.setCustomItemPainter(g),d.setCustomSelectedsPainter(w),d.addPressedListener(c),d=d.getJqUi(),d.addClass("dm-source-type-typelist-list"),$(".dm-modeler").append(d))},g=function(d,y){d.attr("title",y.getText());d.addClass("dm-source-type-typelist-item");var r=$("<div>");r.addClass("dm-source-type-typelist-item-icon");
n.background(r,y.getIconName());r.appendTo(d);r=$("<div>");r.addClass("dm-source-type-typelist-item-text");r.text(y.getText());r.appendTo(d)},w=function(d,y){for(var r=0;r<d.length;r++){var e=d[r];e.removeClass("dm-source-type-typelist-item_selected");e.find(".dm-source-type-typelist-item_selected-mark").remove();e.find(".dm-source-type-typelist-item_selected-icon").remove()}for(r=0;r<y.length;r++)e=y[r],e.addClass("dm-source-type-typelist-item_selected"),d=$("<div>"),d.addClass("dm-source-type-typelist-item_selected-mark"),
d.appendTo(e),d=$("<div>"),n.background(d,"checked"),d.addClass("dm-source-type-typelist-item_selected-icon"),d.appendTo(e)},c=function(d,y){f=d.getSelecteds()[0]};this.isLastStep=function(){return!1};this.getSubTitle=function(){return N.get("dppSourceName","\u8f7b\u5efa\u6a21")};this.setBox=function(d){I=d};this.intoThisStep=function(d,y){};this.outThisStep=function(d,y){if(d)y(null);else if(f){d=I.getAllEntity();if(0<d.length){d=z(d);if(f.getName()===la&&!d){t.getMessageCurtain().showPrompt(N.get("unableSelectMetricModel",
"\u8f7b\u5efa\u6a21\u6307\u6807\u6a21\u578b\u4e0d\u5141\u8bb8\u4e0e\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u8868\u540c\u65f6\u5b58\u5728\uff0c\u5f53\u524d\u5df2\u5b58\u5728\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u8868\uff0c\u65e0\u6cd5\u6dfb\u52a0\u6307\u6807\u6a21\u578b\u3002"));return}if("data_table_model"===f.getName()&&d){t.getMessageCurtain().showPrompt(N.get("unableSelectOtherDataTable","\u8f7b\u5efa\u6a21\u6307\u6807\u6a21\u578b\u4e0d\u5141\u8bb8\u4e0e\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u8868\u540c\u65f6\u5b58\u5728\uff0c\u5f53\u524d\u5df2\u5b58\u5728\u6307\u6807\u6a21\u578b\uff0c\u65e0\u6cd5\u6dfb\u52a0\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u8868\u3002"));
return}}q.getSource().setModelType(f.getName());y(null)}else t.getMessageCurtain().showPrompt(N.get("selectADppModel","\u8bf7\u9009\u4e2d\u4e00\u9879\u6a21\u578b\u3002"))}}function K(){ca.call(this);var t=this;this.setBox=function(q){};this.getSubTitle=function(){return t.getSource().getModelType()===la?N.get("selectMetricModel","\u9009\u62e9\u6307\u6807\u6a21\u578b"):N.get("selectDataTableModel","\u9009\u62e9\u6570\u636e\u8868\u6a21\u578b")};this.protectedCreateNoTableTipUi=function(){var q=$("<div>");
q.css("line-height","20px");q.css("color","#666");q.append(N.get("noAuthorizedModelTip","\u6682\u65e0\u53ef\u9009\u62e9\u7684\u6a21\u578b<br/>\u73b0\u5728\u53bb\u8f7b\u5efa\u6a21"));var I=$("<span class='dm-source-table-btn-link'>");I.text(N.get("gotoQingModeler","\u65b0\u5efa\u6a21\u578b"));I.on("click",function(){var f=ba.decodeParamFromUrl(window.location.search,"path")+"/qing_modeler/homepage.do";O.openNewTabInAppId(N.get("qing_modeler","\u8f7b\u5efa\u6a21"),f,f,O.QING_MODELER)});q.append(I);
return q}}function W(){G.call(this);var t=this;this.protectedHandleEntities=function(q){var I={},f=t.getSource(),a=f.getAllModelType(),g;for(g in q){var w=q[g],c=w.getAssociateName();w.setDirectModel(f.isMetricModel(c));I[c]=a[c]}t.getSource().setTotalModelType(I)}}function U(t,q,I,f,a,g,w,c){t=new x;t.setBox(c);f=new K;f.setBox(c);c=new W;I?(q=new h,q.setName("s"+(new Date).getTime()),q.setTypeName(I.getTypeName()),q.setTotalModelType(I.getAllModelType()),q.setModelType(I.getModelType()),t.setSource(q),
f.setSource(q),c.setSource(q)):(I=new h,I.setName("s"+(new Date).getTime()),I.setTypeName(q),t.setSource(I),f.setSource(I),c.setSource(I));return[t,f,c]}function fa(){var t=na.getSkinName(),q=new ea;q.setFilePath("scene/skin/"+t+"/res/dm-impl.png");q.setStartPosition(1,1);q.setIconSize(16,16);n.regist("data_table_model",q.createDescription(2,4));n.regist("data_table_model_selected",q.createDescription(2,3));n.regist("data_table_model-sub",q.createDescription(2,4));n.regist("data_table_model-sub_selected",
q.createDescription(2,4));n.regist("entity_model",q.createDescription(1,4));n.regist("entity_model_selected",q.createDescription(1,3));n.regist("entity_model-sub",q.createDescription(1,4));n.regist("entity_model-sub_selected",q.createDescription(1,4));n.regist("metric_model",q.createDescription(1,5));n.regist("metric_model_selected",q.createDescription(1,6));n.regist("relation_model",q.createDescription(3,4));n.regist("relation_model_selected",q.createDescription(3,3));n.regist("relation_model-sub",
q.createDescription(3,4));n.regist("relation_model-sub_selected",q.createDescription(3,4));n.regist("dpp_head-biz-union",q.createDescription(2,0));n.regist("dpp_head-biz-union_selected",q.createDescription(3,0));n.regist("dpp_entry-biz-union",q.createDescription(2,1));n.regist("dpp_entry-biz-union_selected",q.createDescription(3,1));q.setStartPosition(1,69);q.setIconSize(90,45);t=q.createDescription(1,0);n.regist("source_dpp_blue",t);n.regist("source_metric",q.createDescription(0,1));n.regist("source_data_table",
q.createDescription(1,1))}function qa(t,q,I,f){ka.call(this,t,q,I,f);var a=this.protectedMethod;this.checkDppPermission=function(){a.remote("checkDppPermission",{})}}"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.scene&&(com.kingdee.bos.qing.scene={});var X=com.kingdee.bos.qing.scene,na,ka,ea,N,ca,
G,ja,n,l,Y,S,ha,O,ba,oa;(function(){var t=com.kingdee.bos.qing;na=t.CodeLoader;t=com.kingdee.bos.qing.framework.common;ka=t.AbstractFacade;ea=t.IconsFile;N=t.MultilanguageManager.createPackageAccessor(X);O=t.TabbedUiUtil;t=com.kingdee.bos.qing.data;ca=t.DbSelectTableStep;G=t.DbSelectFieldStep;ja=t.AbstractImportEntityStep;n=t.Icons;l=t.AbstractBizMetaSource;Y=t.AbstractSource;S=t.SourceType;t=com.kingdee.bos.qing.ui.component;ha=t.List;t=com.kingdee.bos.qing.common;ba=t.Util;oa=X.DataModellingContext})();
h.ENTITY="dpp";var la="metric_model",ta=function(t,q,I,f){(new qa(t,function(a){a&&I()},function(a){if(3101021==a)return q.showPrompt(N.get("noModelerLicense","\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u3010\u8f7b\u5efa\u6a21\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"),2E3),f(),!0;if(3010013==a)return q.showPrompt(N.get("nonSupportModeler","\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\u3010\u8f7b\u5efa\u6a21\u3011\u6a21\u5757\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"),
2E3),f(),!0;f();return!1})).checkDppPermission()},z=function(t){for(var q=0;q<t.length;q++){var I=t[q];if(I instanceof com.kingdee.bos.qing.data.Entity){var f=I.getSource();if(f instanceof h&&f.isMetricModel(I.getAssociateName()))return!0}}return!1},M=function(t,q,I){t=t.getAllEntity();if(q===h.ENTITY)return!1;(q=z(t))&&I.showPrompt(N.get("unableSelectOtherDataTable","\u8f7b\u5efa\u6a21\u6307\u6807\u6a21\u578b\u4e0d\u5141\u8bb8\u4e0e\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u8868\u540c\u65f6\u5b58\u5728\uff0c\u5f53\u524d\u5df2\u5b58\u5728\u6307\u6807\u6a21\u578b\uff0c\u65e0\u6cd5\u6dfb\u52a0\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u8868\u3002"));
return q};oa.addSourceType(function(t){t(new S(h.ENTITY,N.get("dppSourceName","\u8f7b\u5efa\u6a21"),"source_dpp_blue",h),fa,U,ta,M,null)})})();(function(){function h(b,m,k,D){ja.call(this,b,m,k,D);var u=this.protectedMethod;this.checkDmoPermission=function(){u.remote("checkDmoPermission",{})};this.getDmoProjectInfo=function(){u.remote("getDmoProjectInfo",{})};this.getDmoDatasourceInfo=function(L){u.remote("getDmoDatasourceInfo",{projectId:L})};this.getSchemas=function(L,P,p,Q){u.remote("getSchemas",{projectId:L,storageId:P,storageTypeName:p,name:Q})}}function x(){z.call(this);var b=this,m,k,D,u,L,P={};this.isBasedOnDB=function(){return!0};
this.isModifiable=function(){return!0};this.supportMergeTable=function(){return u!=A};this.getMergeType=function(){return w.COMMON_MERGE};this.isSupportColumnToRow=function(){return!0};this.setProjectId=function(p){m=p};this.getProjectId=function(){return m};this.setStorageId=function(p){k=p};this.getStorageId=function(){return k};this.setStorageTypeName=function(p){D=p};this.getStorageTypeName=function(){return D};this.setTableModelType=function(p){u=p};this.getTableModelType=function(){return u};
this.setSchema=function(p){L=p};this.getSchema=function(){return L};this.isUserSql=function(p){return P[p]?!0:!1};this.addUserSql=function(p){var Q=p.getName();P[Q]=p};this.getUserSql=function(p){return P[p]};this.supportStoredProcedure=function(){return!1};this.getAllStoredProcedureName=function(){return null};this.removeUserSql=function(p){delete P[p]};this.getAllUserSqlName=function(){var p=[],Q;for(Q in P)p.push(Q);return p};this.setAllUserSql=function(p){P=p};this.getAllUserSql=function(){return P};
this.hasUserSql=function(){return P&&"{}"!==JSON.stringify(P)?!0:!1};this.getShortDisplay=function(){return l.get("dmo","\u6570\u636e\u5f00\u53d1\u5e73\u53f0")};this.isTheSame=function(p){return b.getTypeName()==p.getTypeName()&&b.getProjectId()==p.getProjectId()&&b.getStorageId()==p.getStorageId()&&b.getTableModelType()==p.getTableModelType()&&b.getSchema()==p.getSchema()};this.clone=function(){var p=new x;p.setName("s"+(new Date).getTime());p.setTypeName(x.DMO);p.setProjectId(m);p.setStorageId(k);
p.setTableModelType(u);p.setStorageTypeName(D);p.setSchema(L);return p};this.protectedToJsonObject=function(p){p.projectId=m;p.storageId=k;p.storageTypeName=D;p.tableModelType=u;p.schema=L;for(var Q=[],F=b.getAllUserSqlName(),v=0;v<F.length;v++){var J=F[v];if(b.isUserSql(J)){var V=b.getUserSql(J),ma=V.getContent();V=V.getSqlType();var ra={};ra.name=J;ra.content=ma;ra.sqlType=V;Q.push(ra)}}p.userSqls=Q};this.protectedFromJsonObject=function(p){m=p.projectId;k=p.storageId;u=p.tableModelType;D=p.storageTypeName;
L=p.schema;if(p=p.userSqls)for(var Q=0;Q<p.length;Q++){var F=p[Q],v=new e;v.setName(F.name);v.setContent(F.content);v.setSqlType(F.sqlType);b.addUserSql(v)}};this.mergeFrom=function(p){m=p.getProjectId();k=p.getStorageId();u=p.getTableModelType();D=p.getStorageTypeName();L=p.getSchema();for(var Q=p.getAllUserSqlName(),F=0;F<Q.length;F++){var v=Q[F];p.isUserSql(v)&&(v=p.getUserSql(v),b.addUserSql(v))}}}function K(b,m,k,D,u,L,P,p){k||(k=new x,k.setName("s"+(new Date).getTime()),k.setTypeName(m));return[(new fa(b)).createStep(k,
u,L,P,p)]}function W(){var b=ca.getSkinName(),m=new n;m.setFilePath("scene/skin/"+b+"/res/dm-impl.png");m.setStartPosition(1,1);m.setIconSize(16,16);m.setStartPosition(1,69);m.setIconSize(90,45);b=m.createDescription(1,0);ta.regist("source_ERPCloudDmo",b)}function U(b,m){M.call(this);var k=this,D=this.protectedMethod,u,L,P,p,Q,F,v,J,V,ma=[],ra=[],ua=[],za,xa,Aa,Da,wa="dw_model",Ba;this.getSubTitle=function(){return l.get("dmo","\u6570\u636e\u5f00\u53d1\u5e73\u53f0")};this.setSelectEntity=function(H){Da=
H};this.isLastStep=function(){return k.getChangeSourceType()};this.getNewMergedEntity=function(){return k.getArrEntity()[0]};this.protectedCreateUi=function(){return $("<div>")};this.getSelectedValue=function(){return v};this.getProjects=function(){return ma};this.getDatasources=function(){return ra};this.getSelectedProject=function(){return v};this.getSelectedDatabaseSource=function(){return J};this.getSelectedEntity=function(){return wa};var Ja=function(){u=$("<div>");var H=$("<div>");H.addClass("left-selector-project");
var B=(new S(l.get("ProjectName","\u9879\u76ee"))).getJqUi();G.layoutCtrl(B,15,0,70,23);H.append(B);za=new ha;B=za.getJqUi();G.layoutCtrl(B,100,0,200,23);H.append(B);B=40;var R=new S(l.get("type","\u7c7b\u578b")),da=R.getJqUi();G.layoutCtrl(da,15,B,70,23);H.append(da);R=new O;P=new ba;P.setChecked(!0);P.setText(l.get("database","\u6570\u636e\u5e93"));var ia=P.getJqUi();G.layoutCtrl(ia,100,B,120,23);B+=40;H.append(ia);R.addElement(P);p=new ba;p.setText(l.get("labelModel","\u6807\u7b7e\u6a21\u578b"));
p.addCheckedListener(function(Ea,Fa){Fa&&(V=J=null,wa=A,L.hide())});ia=p.getJqUi();G.layoutCtrl(ia,100,B,120,23);m||k.getChangeSourceType()||H.append(ia);R.addElement(p);u.append(H);L=$("<div>");L.addClass("right-selector-datasource");var T=0;H=(new S(l.get("database","\u6570\u636e\u5e93"))).getJqUi();G.layoutCtrl(H,15,0,70,23);L.append(H);xa=new ha;H=xa.getJqUi();G.layoutCtrl(H,100,T,200,23);L.append(H);T+=40;var pa=(new S(l.get("dbschema","\u6a21\u5f0f"))).getJqUi();G.layoutCtrl(pa,15,T,70,23);
L.append(pa);Aa=new ha;Aa.addSelectedChangedListener(function(Ea,Fa,Ga){V=Ga});var va=Aa.getJqUi();G.layoutCtrl(va,100,T,200,23);L.append(va);pa.hide();va.hide();R=new S(l.get("type","\u7c7b\u578b"));da=R.getJqUi();G.layoutCtrl(da,15,T,70,23);L.append(da);Q=new ba;Q.setText(l.get("table","\u8868"));Q.setChecked(!0);var Ca=Q.getJqUi();G.layoutCtrl(Ca,100,T,120,23);L.append(Ca);T+=40;Ca=Q.getJqUi();F=new ba;F.setText(l.get("customSql","\u81ea\u5b9a\u4e49")+d.SQLTYPE_SQL);var ya=F.getJqUi();G.layoutCtrl(ya,
100,T,120,23);L.append(ya);R=new O;R.addElement(Q);R.addElement(F);u.append(L);xa.addSelectedChangedListener(function(Ea,Fa,Ga){V=null;Ia(Ga)});var Ia=function(Ea){J=Ea;wa==A&&(V=null);-1!=C.indexOf(J.getStorageTypeName().toUpperCase())?(T=40,pa.show(),va.show(),T+=40,G.layoutCtrl(da,15,T,70,23),G.layoutCtrl(Ca,100,T,120,23),T+=40,G.layoutCtrl(ya,100,T,120,23),Z(v.getProjectId(),J.getStorageId(),J.getStorageTypeName(),k.getSource().getName())):(V=null,T=40,pa.hide(),va.hide(),G.layoutCtrl(da,15,T,
70,23),G.layoutCtrl(Ca,100,T,120,23),T+=40,G.layoutCtrl(ya,100,T,120,23))};za.addSelectedChangedListener(function(Ea,Fa,Ga){v=Ga;aa(Ia)});P.addCheckedListener(function(Ea,Fa){Fa&&(wa="dw_model",L.show(),aa(Ia))});Ha(Ia);k.getJqUi().append(u)};this.intoThisStep=function(H,B){this.getChangeSourceType()?(Ba=new qa,Ba.setSource(k.getSource()),Ba.setChangeSourceType(k.getChangeSourceType()),k.getJqUi().append(Ba.getJqUi())):u||Ja()};this.outThisStep=function(H,B){H?B():(H=com.kingdee.bos.qing.data.BizSourceTypeContext.getPermissionChecker())&&
H(k.getSource().getTypeName(),D.getMessageCurtain(),function(){if(k.getChangeSourceType())B(null);else if(sa(k.getSource(),D.getMessageCurtain())){var R=k.getSource();R.setTableModelType(wa);J&&(R.setStorageId(J.getStorageId()),R.setStorageTypeName(J.getStorageTypeName()));V&&"dw_model"==wa?R.setSchema(V.getSchemaName()):R.setSchema(null);if(Q.isChecked()||wa==A){var da=new I,ia=new f;m&&(da=new g,da.setSelectEntity(Da),ia=new a,ia.setSelectEntity(Da));da.setCtxApi(k.getCtxApi());da.setSource(R);
ia.setCtxApi(k.getCtxApi());ia.setSource(R);B([da,ia])}else F.isChecked()&&(R=k.creatNextCustomSqlStep(),m&&(R=new y,R.setSqlType(d.SQLTYPE_SQL),R.setCtxApi(k.getCtxApi()),R.setSource(k.getSource()),R.setSelectEntity(Da)),B(R))}},function(){})};this.over=function(H,B){if(k.getOldEntity()&&k.getChangeSourceType()&&H){B=!Ba.getJustForSelf();var R=Ba.getSelectedProject(),da=Ba.getSelectedDataBasesource(),ia=Ba.getSelectedSchema();H=k.getOldEntity().getSource();var T=k.getSource().clone();T.setProjectId(R.getProjectId());
T.setStorageId(da.getStorageId());T.setStorageTypeName(da.getStorageTypeName());T.setTableModelType("dw_model");ia?T.setSchema(ia.getSchemaName()):T.setSchema(null);B?(T.isTheSame(H)||(B=k.getOldEntity().getName(),H.isUserSql(B)&&(B=H.getUserSql(B),T.addUserSql(B)),B=k.getDModel().getSources(),k.getOldEntity().setSource(T),k.getOldEntity().mergeSource(B),(H.hasUserSql()||H.hasStoredProcedure())&&k.getDModel().funClearUserSqlsAndStoredProcedures(H)),D.refreshDesigntimeDataObject(k.getOldEntity(),T)):
(H.hasUserSql()&&T.setAllUserSql(H.getAllUserSql()),(new r).updateSameSource(k.getDModel(),H,T,function(pa){pa.setSource(T);pa.mergeSource(k.getDModel().getSources());D.refreshDesigntimeDataObject(pa,T)},k.getOldEntity()))}};var Ha=function(H){(new h(b,function(B){if(B&&0<B.length){for(var R=0;R<B.length;R++){var da=new na;da.fromJsonObject(B[R]);ma.push(da)}za.setItemModels(ma);v=ma[0];za.setSelected(v);za.setCustomPainter(function(ia,T,pa){T.text(pa.getProjectName());T.attr("title",pa.getProjectName())});
aa(H)}else D.getMessageCurtain().showPrompt(l.get("noProjectPrompt","\u60a8\u8fd8\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u7684\u9879\u76ee\u5173\u7cfb\uff0c\u8bf7\u5148\u8fdb\u5165[\u6570\u636e\u5f00\u53d1\u5e73\u53f0]\u914d\u7f6e\u76f8\u5173\u4fe1\u606f\u3002"))},function(B,R){return 2215E3==B?(D.getMessageCurtain().showError(R),!0):2215006==B?(D.getMessageCurtain().showPrompt(l.get("noProjectPrompt","\u60a8\u8fd8\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u7684\u9879\u76ee\u5173\u7cfb\uff0c\u8bf7\u5148\u8fdb\u5165[\u6570\u636e\u5f00\u53d1\u5e73\u53f0]\u914d\u7f6e\u76f8\u5173\u4fe1\u606f\u3002")),
!0):302010029==B||302010030==B?(D.getMessageCurtain().showPrompt(l.get("noUserInDmo","\u60a8\u8fd8\u672a\u8fdb\u5165\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u8fdb\u884c\u540c\u6b65\u8d26\u53f7\uff0c\u8bf7\u5148\u8fdb\u5165[\u6570\u636e\u5f00\u53d1\u5e73\u53f0]\u8fdb\u884c\u521d\u59cb\u5316\u3002")),!0):382011002==B?(D.getMessageCurtain().showPrompt(l.get("noDmoPermission","\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),
2E3),!0):!1})).getDmoProjectInfo()},aa=function(H){ra=[];J=null;xa.setSelected(J);xa.setItemModels(ra);"dw_model"==wa&&(new h(b,function(B){if(B&&0<B.length){for(var R=0;R<B.length;R++){var da=new ka;da.fromJsonObject(B[R]);ra.push(da)}xa.setItemModels(ra);J=ra[0];xa.setSelected(J);xa.setCustomPainter(function(ia,T,pa){pa?(T.text(pa.getStorageName()),T.attr("title",pa.getStorageName())):T.text("")});H&&H(J)}else D.getMessageCurtain().showPrompt(l.get("noDataSourcePrompt","\u8be5\u9879\u76ee\u8fd8\u6ca1\u6709\u914d\u7f6e\u5bf9\u5e94\u7684\u6570\u636e\u6e90\uff0c\u8bf7\u5148\u8fdb\u5165\u3010\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u3011\u5e94\u7528\u8fdb\u884c\u914d\u7f6e\u3002"))},
function(B,R){return 2215E3==B?(D.getMessageCurtain().showError(R),!0):2215006==B?(D.getMessageCurtain().showPrompt(l.get("noDataSourcePrompt","\u8be5\u9879\u76ee\u8fd8\u6ca1\u6709\u914d\u7f6e\u5bf9\u5e94\u7684\u6570\u636e\u6e90\uff0c\u8bf7\u5148\u8fdb\u5165\u3010\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u3011\u5e94\u7528\u8fdb\u884c\u914d\u7f6e\u3002")),!0):382011002==B?(D.getMessageCurtain().showPrompt(l.get("noDmoPermission","\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),
2E3),!0):!1})).getDmoDatasourceInfo(v.getProjectId(),wa)},Z=function(H,B,R,da){ua=[];V=null;Aa.setSelected(V);Aa.setItemModels(ua);(new h(b,function(ia){if(ia&&0<ia.length){for(var T=0;T<ia.length;T++){var pa=new ea;pa.fromJsonObject(ia[T]);ua.push(pa)}Aa.setItemModels(ua);V=ua[0];Aa.setSelected(V);Aa.setCustomPainter(function(va,Ca,ya){ya?Ca.text(ya.getSchemaName()):Ca.text("")})}})).getSchemas(H,B,R,da)},sa=function(H,B){if(!v)return B.showPrompt(l.get("chooseProject","\u8bf7\u9009\u62e9\u4e00\u4e2a\u9879\u76ee\u3002")),
!1;if(!wa)return B.showPrompt(l.get("chooseEntityType","\u8bf7\u9009\u62e9\u9879\u76ee\u4e0b\u7c7b\u578b\u3002")),!1;if("dw_model"==wa&&!J)return B.showPrompt(l.get("chooseDatasource","\u6570\u636e\u6e90\u4e0d\u80fd\u4e3a\u7a7a\u3002")),!1;if("dw_model"==wa&&J&&-1!=C.indexOf(J.getStorageTypeName())&&!V)return B.showPrompt(l.get("chooseSchema","\u8bf7\u9009\u62e9\u6570\u636e\u6e90\u7684\u6a21\u5f0f\u3002")),!1;H.setProjectId(v.getProjectId());H.setTableModelType(wa);return!0}}function fa(b){var m,
k;this.createStep=function(D,u,L,P,p){m=D.clone();k=new U(b,u);k.isShowDataBase(!1);k.setSource(m);k.setChangeSourceType(L);k.setOldEntity(P);k.setDModel(p);return k}}function qa(){q.call(this);var b=this,m=this.protectedMethod,k,D,u,L,P,p,Q,F,v,J,V,ma,ra,ua=[],za=[],xa=[],Aa;this.setChangeSourceType=function(aa){Aa=aa};this.setSource=function(aa){u=aa};this.getSource=function(){return u};this.getSelectedProject=function(){return Q};this.getSelectedDataBasesource=function(){return v};this.getSelectedSchema=
function(){return V};this.propectedCreateJqUi=function(aa,Z,sa,H,B){k=aa;D=Z;L=H;u=sa;ra=B;P||Da();return P};this.getJqUi=function(){P||Da();return P};this.getJustForSelf=function(){return ma.isChecked()};var Da=function(){P=$("<div>");var aa=0,Z=(new S(l.get("project","\u9879\u76ee"))).getJqUi();G.layoutCtrl(Z,20,aa,70,23);P.append(Z);p=new ha;Z=p.getJqUi();G.layoutCtrl(Z,70,aa,200,23);P.append(Z);aa+=40;var sa=(new S(l.get("database","\u6570\u636e\u5e93"))).getJqUi();F=new ha;var H=F.getJqUi();
G.layoutCtrl(sa,20,aa,70,23);P.append(sa);G.layoutCtrl(H,70,aa,200,23);P.append(H);aa+=40;var B=(new S(l.get("dbschema","\u6a21\u5f0f"))).getJqUi();J=new ha;J.addSelectedChangedListener(function(va,Ca,ya){V=ya});var R=J.getJqUi();G.layoutCtrl(B,20,aa,70,23);P.append(B);G.layoutCtrl(R,70,aa,200,23);P.append(R);sa.hide();H.hide();B.hide();R.hide();aa+=40;ma=new oa;ma.setText(l.get("actOnTheSameDatabase","\u540c\u65f6\u4fee\u6539\u5f53\u524d\u4e3b\u9898\u4e2d\u5176\u4ed6\u540c\u6e90\u6570\u636e\u8868"));
ma.setChecked(!Aa);var da=ma.getJqUi();G.layoutCtrl(da,20,40,250,23);P.append(da);aa=new c;var ia=b.getConfirmListener();aa.setClosingAction(function(va){ia&&ia(va)});aa.setCloseCallerDialogCallback(function(){m.destroy()});aa.setChangeDataSourceParameter(k,D,L,ra,u);var T=aa.getJqUi();G.layoutCtrl(T,0,80,120,60);Aa||"dw_model"!=u.getTableModelType()||P.append(T);var pa=function(va){v=va;u.getTableModelType()==A?(V=null,sa.hide(),H.hide(),B.hide(),R.hide(),G.layoutCtrl(da,20,40,250,23),G.layoutCtrl(T,
0,80,120,60)):(sa.show(),H.show(),-1!=C.indexOf(v.getStorageTypeName().toUpperCase())?(B.show(),R.show(),G.layoutCtrl(da,20,120,250,23),G.layoutCtrl(T,0,160,120,60),Ja(Q.getProjectId(),v.getStorageId(),v.getStorageTypeName(),u.getName())):(V=null,B.hide(),R.hide(),G.layoutCtrl(da,20,80,250,23),G.layoutCtrl(T,0,120,120,60)))};p.addSelectedChangedListener(function(va,Ca,ya){Q=ya;Ba(pa)});F.addSelectedChangedListener(function(va,Ca,ya){V=null;pa(ya)});wa(pa)},wa=function(aa){(new h(Ha(),function(Z){if(Z&&
0<Z.length){for(var sa,H=0;H<Z.length;H++){var B=new na;B.fromJsonObject(Z[H]);ua.push(B);B.getProjectId()==u.getProjectId()&&(sa=B)}p.setItemModels(ua);Q=sa?sa:ua[0];p.setSelected(Q);p.setCustomPainter(function(R,da,ia){da.text(ia.getProjectName());da.attr("title",ia.getProjectName())});Ba(aa)}else m.getMessageCurtain().showPrompt(l.get("noProjectPrompt","\u60a8\u8fd8\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u7684\u9879\u76ee\u5173\u7cfb\uff0c\u8bf7\u5148\u8fdb\u5165[\u6570\u636e\u5f00\u53d1\u5e73\u53f0]\u914d\u7f6e\u76f8\u5173\u4fe1\u606f\u3002"))},
function(Z,sa){return 2215E3==Z?(m.getMessageCurtain().showError(sa),!0):2215006==Z?(m.getMessageCurtain().showPrompt(l.get("noProjectPrompt","\u60a8\u8fd8\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u7684\u9879\u76ee\u5173\u7cfb\uff0c\u8bf7\u5148\u8fdb\u5165[\u6570\u636e\u5f00\u53d1\u5e73\u53f0]\u914d\u7f6e\u76f8\u5173\u4fe1\u606f\u3002")),!0):382011002==Z?(m.getMessageCurtain().showPrompt(l.get("noDmoPermission","\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),
2E3),!0):!1})).getDmoProjectInfo()},Ba=function(aa){za=[];v=null;F.setSelected(v);F.setItemModels(za);u.getTableModelType()==A?aa&&aa(null):(new h(Ha(),function(Z){if(Z&&0<Z.length){for(var sa,H=0;H<Z.length;H++){var B=new ka;B.fromJsonObject(Z[H]);za.push(B);u.getStorageId()==B.getStorageId()&&(sa=B)}F.setItemModels(za);v=sa?sa:za[0];F.setSelected(v);F.setCustomPainter(function(R,da,ia){ia?(da.text(ia.getStorageName()),da.attr("title",ia.getStorageName())):da.text("")});aa&&aa(v)}else m.getMessageCurtain().showPrompt(l.get("noDataSourcePrompt",
"\u8be5\u9879\u76ee\u8fd8\u6ca1\u6709\u914d\u7f6e\u5bf9\u5e94\u7684\u6570\u636e\u6e90\uff0c\u8bf7\u5148\u8fdb\u53bb\u3010\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u3011\u8fdb\u884c\u914d\u7f6e\u3002"))},function(Z,sa){return 2215E3==Z?(m.getMessageCurtain().showError(sa),!0):2215006==Z?(m.getMessageCurtain().showPrompt(l.get("noDataSourcePrompt","\u8be5\u9879\u76ee\u8fd8\u6ca1\u6709\u914d\u7f6e\u5bf9\u5e94\u7684\u6570\u636e\u6e90\uff0c\u8bf7\u5148\u8fdb\u53bb\u3010\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u3011\u8fdb\u884c\u914d\u7f6e\u3002")),
!0):382011002==Z?(m.getMessageCurtain().showPrompt(l.get("noDmoPermission","\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),2E3),!0):!1})).getDmoDatasourceInfo(Q.getProjectId(),"dm_model")},Ja=function(aa,Z,sa,H){xa=[];V=null;J.setSelected(V);J.setItemModels(xa);(new h(Ha(),function(B){if(B&&0<B.length){for(var R,da=0;da<B.length;da++){var ia=new ea;ia.fromJsonObject(B[da]);xa.push(ia);u.getSchema()==ia.getSchemaName()&&
(R=ia)}J.setItemModels(xa);V=R?R:xa[0];J.setSelected(V);J.setCustomPainter(function(T,pa,va){va?pa.text(va.getSchemaName()):pa.text("")})}})).getSchemas(aa,Z,sa,H)},Ha=function(){var aa=new X,Z=(new com.kingdee.bos.qing.data.DataModelingScene).getUrlParam("path");aa.setRemoteUrl((Z?Z:"/ierp")+"/qing/dataModeling.do");return aa};this.protectedIsValidToAccepted=function(aa){aa(!0)};this.protectedAccepted=function(aa,Z){var sa=!ma.isChecked(),H=u.clone();H.setProjectId(Q.getProjectId());"dw_model"==
u.getTableModelType()&&(H.setStorageId(v.getStorageId()),H.setStorageTypeName(v.getStorageTypeName()));V&&"dw_model"==u.getTableModelType()?H.setSchema(V.getSchemaName()):H.setSchema(null);if(sa){if(!H.isTheSame(Z)){aa.getName();var B=k.getSources();aa.setSource(H);aa.mergeSource(B);k.funClearUserSqlsAndStoredProcedures(Z)}b.refreshDesigntimeDataObject(D,H,L)}else for(B in Z.setProjectId(Q.getProjectId()),"dw_model"==u.getTableModelType()&&(Z.setStorageId(v.getStorageId()),Z.setStorageTypeName(v.getStorageTypeName())),
V&&"dw_model"==u.getTableModelType()?Z.setSchema(V.getSchemaName()):Z.setSchema(null),b.refreshDesigntimeDataObject(D,D.getSource(),L),aa=k.getAllEntity(),aa)Z=aa[B],Z.isUnion()||D.getSource().isTheSame(Z.getSource())&&D.getName()!==Z.getName()&&b.refreshDesigntimeDataObject(Z,D.getSource(),L)}}function X(){Y.call(this);var b;this.getRemoteUrl=function(){return b};this.setRemoteUrl=function(m){b=m}}function na(){var b,m;this.setProjectId=function(k){b=k};this.getProjectId=function(){return b};this.getProjectName=
function(){return m};this.setProjectName=function(k){m=k};this.fromJsonObject=function(k){b=k.projectId;m=k.projectName};this.toJsonObject=function(){var k={};k.projectId=b;k.projectName=m;return k}}function ka(){var b,m,k;this.setStorageId=function(D){b=D};this.getStorageId=function(){return b};this.getStorageTypeName=function(){return m};this.setStorageTypeName=function(D){m=D};this.getStorageName=function(){return k};this.setStorageName=function(D){k=D};this.fromJsonObject=function(D){b=D.storageId;
m=D.storageTypeName;k=D.storageName};this.toJsonObject=function(){var D={};D.storageId=b;D.storageTypeName=m;D.storageName=k;return D}}function ea(){var b;this.setSchemaName=function(m){b=m};this.getSchemaName=function(){return b};this.fromJsonObject=function(m){b=m.schemaName};this.toJsonObject=function(){var m={};m.schemaName=b;return m}}"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.scene&&(com.kingdee.bos.qing.scene={});var N=com.kingdee.bos.qing.scene;N.ERPCloudDmoSource=x;N.DmoFacade=h;var ca,G,ja,n,l,Y,S,ha,O,ba,oa,la,ta,z,M,t,q,I,f,a,g,w,c,d,y,r,e;(function(){var b=com.kingdee.bos.qing;ca=b.CodeLoader;b=com.kingdee.bos.qing.common;G=b.DomUtil;b=com.kingdee.bos.qing.framework.common;ja=b.AbstractFacade;Y=b.AbstractRemoteCall;n=b.IconsFile;l=b.MultilanguageManager.createPackageAccessor(N);b=com.kingdee.bos.qing.ui.component;
S=b.Label;ha=b.ComboBox;O=b.RadioButtonGroup;ba=b.RadioButton;oa=b.CheckBox;b=com.kingdee.bos.qing.data;la=b.SourceType;ta=b.Icons;z=b.AbstractBizMetaSource;c=b.AdvancedSettingPane;M=b.MetaDBConnectionStep;q=b.AbstractSourceModifyingEditor;I=b.DbSelectTableStep;f=b.DbSelectFieldStep;a=b.DataFieldRelationSetStep;g=b.DbSelectTable4MergeStep;w=b.AbstractSource;d=b.DBSource;y=b.DBMergeCustomSqlStep;r=b.SourceChangeHelper;e=b.UserSqlObj;c=b.AdvancedSettingPane;t=N.DataModellingContext})();var C=["POSTGRESQL",
"ORACLE"],A="tag_model";x.DMO="ERPCloudDmo";var E=function(b,m,k,D){(new h(b,function(u){u?k():(m.showPrompt(l.get("noDmoPermission","\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),2E3),D())},function(u){if(2215013==u)return m.showPrompt(l.get("noDmoConfig","\u60a8\u5c1a\u672a\u914d\u7f6e\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u5e94\u7528\u3002"),
2E3),!0;if(382011002==u)return m.showPrompt(l.get("noDmoPermission","\u6ca1\u6709\u6570\u636e\u5f00\u53d1\u5e73\u53f0\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),2E3),!0;D();return!1})).checkDmoPermission()};t.addSourceType(function(b){b(new la(x.DMO,l.get("dmo","\u6570\u636e\u5f00\u53d1\u5e73\u53f0"),"source_ERPCloudDmo",x),W,K,E,null,null,qa)})})();(function(){function h(f,a,g,w){N.call(this,f,a,g,w);var c=this.protectedMethod;this.checkERPCloudMDDPermission=function(){c.remote("checkERPCloudMDDPermission",{})}}function x(){oa.call(this);var f,a;this.getShortDisplay=function(){return G.get("ERPCloudMDD","\u91d1\u8776\u591a\u7ef4\u6570\u636e\u5e93")};this.isModifiable=function(){return!1};this.isSupportSelectField=function(){return!1};this.isSupportCustomField=function(){return!1};this.getEntityIconName=function(g){return"table"};this.setSourceId=
function(g){f=g};this.getSourceId=function(){return f};this.setSourceDisplayName=function(g){a=g};this.getSourceDisplayName=function(){return a};this.protectedToJsonObject=function(g){g.sourceId=f;g.sourceDisplayName=a};this.protectedFromJsonObject=function(g){f=g.sourceId;a=g.sourceDisplayName}}function K(f,a,g,w){(new h(f,function(c){c?g():(a.showPrompt(G.get("noERPCloudMDDPermission","\u6ca1\u6709\u91d1\u8776\u591a\u7ef4\u5e93\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),
2E3),w())},function(c){w();return!1})).checkERPCloudMDDPermission()}function W(){var f=ea.getSkinName(),a=new ca;a.setFilePath("scene/skin/"+f+"/res/dm-impl.png");a.setStartPosition(1,1);a.setIconSize(16,16);a.setStartPosition(1,69);a.setIconSize(90,45);f=a.createDescription(1,0);ba.regist("source_ERPCloudMDD",f)}function U(f,a,g){if(0!=f.getEntityCount()){if(x.ERPCloudMDD==a)return g.showPrompt(G.get("ERPCloudMDDOneEntityLimit","\u5f53\u524d\u4e3b\u9898\u5b58\u5728\u5176\u4ed6\u7684\u6570\u636e\u8868\uff0c\u4e0d\u5141\u8bb8\u5f15\u5165\u91d1\u8776\u591a\u7ef4\u5e93\u6570\u636e\u8868\u3002")),
!0;f=f.getSources();for(a=0;a<f.length;a++)if(x.ERPCloudMDD==f[a].getTypeName())return g.showPrompt(G.get("ERPCloudMDDExistLimit","\u5f53\u524d\u4e3b\u9898\u5b58\u57281\u4e2a\u91d1\u8776\u591a\u7ef4\u5e93\u6570\u636e\u8868, \u4e0d\u5141\u8bb8\u5f15\u5165\u5176\u4ed6\u7684\u6570\u636e\u8868\u3002")),!0}return!1}function fa(f,a,g,w,c,d,y,r){g||(g=new x,g.setName("s"+(new Date).getTime()),g.setTypeName(a));f=new qa;f.setSource(g);return[f]}function qa(){la.call(this);var f=this,a=this.protectedMethod,
g,w,c=null,d=null,y=null,r={},e=null,C,A;this.isLastStep=function(){return!0};this.getSubTitle=function(){return G.get("ERPCloudMDD","\u91d1\u8776\u591a\u7ef4\u6570\u636e\u5e93")};this.protectedCreateUi=function(){var F=$("<div>"),v=(new l(G.get("ERPCloudMDDApp","\u5e94\u7528"))).getJqUi();g=new n;g.addSelectedChangedListener(b);g.setCustomPainter(E);var J=g.getJqUi();ja.layoutCtrl(v,15,0,75,23);ja.layoutCtrl(J,75,0,200,23);F.append(v);F.append(J);v=(new l(G.get("ERPCloudMDDsystem","\u4f53\u7cfb"))).getJqUi();
_oCubeDropdownSelector=new Y;_oCubeDropdownSelector.setCustomPainter(k);_oCubeDropdownSelector.setDropdownCreator(D);_oCubeDropdownSelector.addSelectionListener(P);J=_oCubeDropdownSelector.getJqUi();ja.layoutCtrl(v,420,0,75,23);ja.layoutCtrl(J,480,0,200,23);F.append(v);F.append(J);v=new l(G.get("ERPCloudMDDMemberRange","\u6210\u5458\u8303\u56f4"));w=new X;w.setFunGetCurrentEntity(function(){return y});J=w.getJqUi();A=$("<div>");A.css("box-shadow","0px 0px 2px 0px #dbdbdb");C=v.getJqUi();ja.layoutCtrl(C,
15,40,90,23);ja.layoutCtrlWithLRTB(A,15,15,null,76,2,null);A.append(J);F.append(C);F.append(A);C.hide();A.hide();return F};var E=function(F,v,J){J?v.text(J.getDisplayName()):v.text(G.get("selectApp","\u8bf7\u9009\u62e9\u5e94\u7528"))},b=function(F,v,J){c=J;F=f.getSource();F.setSourceId(c.getName());F.setSourceDisplayName(c.getDisplayName());m()},m=function(){d=e=null;_oCubeDropdownSelector.setSelectedModel(null);var F=f.getSource().toJsonObject();f.getCtxApi().createFacade(function(v){var J=new t;
J.fromJsonObject(v);v=new ha.BranchNode(J);v.setExpanded(!0);L(v,J);e=v},function(v,J){return!1}).getUsableEntities(F)},k=function(F,v){F?v.text(F.getDisplayName()):v.text(G.get("selectCube","\u8bf7\u9009\u62e9\u4f53\u7cfb"))},D=function(F,v,J){if(!e)return[-1,40];var V=0;e.visiting(function(){V++;return 10<V?!0:!1});v=new ha;var ma=v.getJqUi();ma.css("background","#ffffff");var ra=v.getLineHeight()*(V-1)+3;ja.layoutCtrlWithLRTB(ma,0,0,null,0,0,null);v.addSelectedListener(function(ua){ua=ua.getSelecteds();
0<ua.length&&(d=ua[0],ua=d.getUserObject(),J(ua))});v.setNodePainter(u);v.setRootVisible(!1);v.setRoot(e);v.setSelecteds(d?[d]:null);ma.appendTo(F);return[-1,ra]},u=function(F,v){F.css("padding-left","4px");F.css("padding-right","4px");F.text(v.getUserObject().getDisplayName())},L=function(F,v){if(v=v.getChildren())for(var J=0;J<v.length;J++){var V=v[J];if(V instanceof t){var ma=new ha.BranchNode(V);ma.setExpanded(!0);ma.setSelectable(!1);L(ma,V)}else ma=new ha.LeafNode(V);F.addChild(ma)}},P=function(F,
v){if(F=F.getSelectedModel()){v=c.getName();var J=r[v];J||(J={},r[v]=J);var V=F.getName();if(F=J[V])p(F);else{F=f.getSource();var ma={};ma[F.getName()]=F;F=F.toJsonObject();f.getCtxApi().createFacade(function(ra){var ua=new q;ua.fromJsonObject(ra,ma);ra=ua.getEntityByAssociateName(V);J[V]=ra;p(ra)},function(ra,ua){return!1}).getDesigntimeDataObject(F,V)}}else p(null)},p=function(F){null!=F?(C.show(),A.show()):(C.hide(),A.hide());y=F;w.updateUi(y)};this.intoThisStep=function(F,v){v||Q()};var Q=function(){var F=
f.getSource().toJsonObject();f.getCtxApi().createFacade(function(v){var J=[];if(v)for(var V=0;V<v.length;V++){var ma=v[V],ra=new M;ra.fromJson(ma);J.push(ra)}g.setItemModels(J)},function(v,J){return!1}).getCatlog(F)};this.outThisStep=function(F,v){F?v(null):c?d?v(null):a.getMessageCurtain().showPrompt(G.get("selectCubeCurtain","\u8bf7\u9009\u62e9\u4f53\u7cfb\u3002"),2E3):a.getMessageCurtain().showPrompt(G.get("selectAppCurtain","\u8bf7\u9009\u62e9\u5e94\u7528\u3002"),2E3)};this.over=function(F){F&&
f.getCtxApi().finish([y],[])}}function X(){ta.call(this);var f=this.protectedMethod,a;this.protectedInit=function(){a=$("<div>");ja.layoutCtrlWithLRTB(a,0,0,null,0,0,null);a.css("overflow","auto");return a};this.updateUi=function(g){a.empty();if(g){var w=g.getFilters(),c={};if(w)for(var d=0;d<w.length;d++){var y=w[d],r=y.getProperty().getName();c[r]=y}w=g.getParild();r=20;for(d=0;d<w.length;d++){var e=w[d];y=e.getIdFieldName();y=c[y];var C=g,A=new na;A.setModel(C,e,y);A.setCheckError(f.checkError);
A.setFirePreviewRefreshWithOnlyRepaint(f.firePreviewRefreshWithOnlyRepaint);y=A.getJqUi();0==d%3?ja.layoutCtrl(y,5,r,250,66):1==d%3?ja.layoutCtrl(y,322,r,250,66):(ja.layoutCtrl(y,639,r,250,66),r+=66);a.append(y)}}};this.afterResize=function(){};this.locateToErrorRow=function(g,w){}}function na(){var f,a,g,w,c,d,y;this.getJqUi=function(){if(!f){f=$("<div>");a=new l;var b=a.getJqUi();ja.layoutCtrl(b,15,0,230,23);f.append(b);g=new S;g.setClearable(!0);g.setCustomPainter(e);g.addActionListener(C);g.addClearListener(A);
b=g.getJqUi();ja.layoutCtrl(b,15,23,230,23);f.append(b)}r();return f};this.setModel=function(b,m,k){w=b;c=m;d=k;r()};this.setCheckError=function(b){y=b};this.setFirePreviewRefreshWithOnlyRepaint=function(b){_funFirePreviewRefreshWithOnlyRepaint=b};var r=function(){if(f){c&&a.setText(c.getAlias());var b=null;d&&(b=JSON.parse(d.getValue()));g.setModel(b)}},e=function(b,m){b=b?b.text:"";m&&m.text(b);return b},C=function(b){var m=w.getSource().getSourceId(),k=w.getAssociateName(),D=c.getAssociateName(),
u=null;(b=b.getModel())&&(u=b.value);b=com.kingdee.bos.qing.integration.ERPCloudMDDParildFilterChooseForm;b.setCallBack(E);b.openERPCloudMDDParildFilterChooseForm(m,k,D,u)},A=function(){for(var b=0,m=w.getFilters(),k=0;k<m.length;k++){var D=m[k];if(c.getIdField().getName()==D.getProperty().getName()){b=k;break}}b==m.length-1&&0<=b-1&&m[b-1].setLogicOp(null);m.splice(b,1);d=null;g.setModel(null);y&&y();_funFirePreviewRefreshWithOnlyRepaint&&_funFirePreviewRefreshWithOnlyRepaint(!1)},E=function(b){var m=
b.content;b=null;m&&m.text&&(b={},b.text=m.text,b.value=m.value);b?(d||(d=new z,d.setProperty(c.getIdField()),d.setCompareType(z.COMPARE_WITH_APPOINTED),d.setCompareOp(z.COMPARE_CUSTOM_VARIABALE),d.setValueMode(z.MODE_SYS_VAR),d.setRelativeDateRange(null),m=w.getFilters(),0<m.length&&m[m.length-1].setLogicOp(z.LOGIC_AND),m.push(d)),d.setValue(JSON.stringify(b)),g.setModel(b)):A();y&&y();_funFirePreviewRefreshWithOnlyRepaint&&_funFirePreviewRefreshWithOnlyRepaint(!1)}}"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.scene&&(com.kingdee.bos.qing.scene={});var ka=com.kingdee.bos.qing.scene,ea,N,ca,G,ja,n,l,Y,S,ha,O,ba,oa,la,ta,z,M,t,q,I;(function(){var f=com.kingdee.bos.qing;ea=f.CodeLoader;f=com.kingdee.bos.qing.framework.common;N=f.AbstractFacade;ca=f.IconsFile;G=f.MultilanguageManager.createPackageAccessor(ka);
f=com.kingdee.bos.qing.common;ja=f.DomUtil;f=com.kingdee.bos.qing.ui.component;n=f.ComboBox;l=f.Label;Y=f.DropdownSelector;S=f.F7Selector;ha=f.Tree;f=com.kingdee.bos.qing.data;O=f.SourceType;ba=f.Icons;oa=f.AbstractBizMetaSource;la=f.AbstractImportEntityStep;ta=f.AbstractFilterUIRender;z=f.FilterItem;M=f.NameVO;t=f.FolderNode;q=f.DesigntimeDataObject;I=ka.DataModellingContext})();x.ERPCloudMDD="ERPCloudMDD";I.addSourceType(function(f){f(new O(x.ERPCloudMDD,G.get("ERPCloudMDD","\u91d1\u8776\u591a\u7ef4\u6570\u636e\u5e93"),
"source_ERPCloudMDD",x,!1),W,fa,K,U,X)})})();(function(){"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.scene&&(com.kingdee.bos.qing.scene={});var h=com.kingdee.bos.qing.scene,x,K,W,U,fa,qa;(function(){var X=com.kingdee.bos.qing.framework.common;x=X.MultilanguageManager.createPackageAccessor(h);K=X.TabbedUiUtil;X=com.kingdee.bos.qing.ui.component;
W=X.MessageCurtain;X=com.kingdee.bos.qing.data;U=X.DataModelingScene;fa=h.SubjectModelingFacade;qa=h.DataModellingContext})();h.ERPDataModelingScene=function(){U.call(this);var X=this,na=X.getUrlParam("themeID"),ka=X.getUrlParam("path"),ea="true"==X.getUrlParam("isPreset"),N;this.protectedGetRemoteUrl=function(){return(ka?ka:"/ierp")+"/qing/dataModeling.do"};this.protectedImportMoreCode=function(n){n.loadJs("env.js");n.loadJs("db-manage/qing-db-manage.js");n.loadJs("macro/qing-macro-runtime.js");
n.loadI18n("macro","macro");n.loadSkinCss("macro","qing-macro");n.loadSkinJs("macro","skin")};this.protectedCustomInitEnv=function(){qa.init(X.getRemoteImpl());var n=com.kingdee.bos.qing.behavior.BehaviorManager;n.interestInBehaviorEntrance(n.ENTRANCE_DATA_MODELING);ja();n=com.kingdee.bos.qing.common.Util.decodeParamFromUrl(window.location.search,"path");var l=(n?n:"/ierp")+"/qing/macroManage.do";n=new com.kingdee.bos.qing.macro.RemoteImpl;n.setRemoteUrl(l);l=com.kingdee.bos.qing.macro.MacroVarHelper;
l.setRemoteImpl(n);n=com.kingdee.bos.qing.data.VariateHelperFactory;n.registImpl(n.MACRO_VAR_HELPER,l);n=com.kingdee.bos.qing.data.ProductLineEnvironment;n.setEnvironment(n.COSMIC)};this.protectedCustomInitDesigner=function(n){n.getConductor().setDirtyListener(function(Y){com.kingdee.bos.qing.integration.TabStatusHelper.setTabStatus(Y)});ea?(N||(N=new W,N.getJqUi().appendTo($(document.body))),N.showPrompt(x.get("presetDMTips","\u9884\u7f6e\u7684\u4e3b\u9898\u4e0d\u5141\u8bb8\u4fdd\u5b58\uff0c\u5982\u6709\u9700\u8981\uff0c\u53ef\u590d\u5236\u540e\u518d\u8fdb\u884c\u64cd\u4f5c\u3002"),
5E3)):n.getConductor().insertToolbarButton(function(Y){(Y=n.getJsonModel())&&G(n,Y)},"btn_save",x.get("save","\u4fdd\u5b58"));var l=x.get("closeTab","\u9000\u51fa");n.getConductor().appendToolbarButton(function(){n.getConductor().isDirty()?com.kingdee.bos.qing.integration.TabStatusHelper.showConfirmExitDialog():K.closeCurrentTab()},"error_close",l)};this.protectedLoadingImpl=function(n,l,Y){(new fa(n,function(S){S?(l.setJsonModel(S),Y(!0)):(l.setJsonModel(null),Y(!1));ca(n,na,l,S)},function(S,ha){return 1030001==
S?(com.kingdee.bos.qing.framework.common.RemoteFramework.openErrorPage(S,com.kingdee.bos.qing.common.Base64Util.encode(encodeURIComponent(ha))),!0):!1})).loadModel(na)};var ca=function(n,l,Y,S){var ha=!1;if((S=S.designtimeMacros)&&0<S.length)for(var O=0,ba=S.length;O<ba;O++){var oa=S[O].macroCheckResult;if(oa&&"MACRO_REJECT"==oa.macroStatus){ha=!0;break}}ha?Y.getConductor().getMessageCurtain().showPrompt(x.get("marcoRejectTip","\u5f53\u524d\u4e1a\u52a1\u4e3b\u9898\u5f15\u7528\u7684\u5b8f\u53d8\u91cf\u56e0\u5b58\u5728\u6162\u67e5\u8be2\uff0c\u5df2\u88ab\u4e34\u65f6\u7981\u7528\u3002\u8bf7\u4f18\u5316\u6267\u884c\u7f13\u6162\u7684\u6570\u636e\u8868\u540e\uff0c\u63d0\u4ea4\u5de5\u5355\u8054\u7cfb\u8fd0\u7ef4\u56e2\u961f\u5904\u7406\u3002"),
-1):(new fa(n,function(la){la&&Y.getConductor().getMessageCurtain().showPrompt(x.get("subjectRejectPrepareDataTip","\u5f53\u524d\u4e1a\u52a1\u4e3b\u9898\u56e0\u5b58\u5728\u6162\u67e5\u8be2\uff0c\u5df2\u88ab\u4e34\u65f6\u7981\u7528\u3002\u8bf7\u4f18\u5316\u6267\u884c\u7f13\u6162\u7684\u6570\u636e\u8868\u540e\uff0c\u63d0\u4ea4\u5de5\u5355\u8054\u7cfb\u8fd0\u7ef4\u56e2\u961f\u5904\u7406\u3002"),-1)},function(la,ta){return!1})).checkSubjectIsRejectPrepareData(l)},G=function(n,l){(new fa(X.getRemoteImpl(),
function(Y){n.saveAfterRefreshUploadTypeSource(Y);n.getConductor().clearDirty();n.getConductor().getMessageCurtain().showSuccess(x.get("saveSuccess","\u4fdd\u5b58\u6210\u529f\u3002"))},function(Y,S){if(1000006==Y)return n.getConductor().getMessageCurtain().showPrompt(S,2E3),!0;if(2010001==Y)return n.getConductor().getMessageCurtain().showPrompt(x.get("themeHasBeenDeletedCurtain","\u5bf9\u5e94\u4e3b\u9898\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),!0;if(2010002==Y)return n.getConductor().getMessageCurtain().showPrompt(x.get("resourceFileLimit",
"\u4fdd\u5b58\u5931\u8d25\uff0c\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"),2E3),!0;if(2010003==Y)return n.getConductor().getMessageCurtain().showPrompt(x.get("noOperationPermissionsCurtain","\u6ca1\u6709\u64cd\u4f5c\u6743\u9650\u3002"),2E3),!0})).saveModel(na,l)},ja=function(){var n=com.kingdee.bos.qing.macro.MacroVarSelector;com.kingdee.bos.qing.data.MacroVariateSelectorRegister.registerConstructor(com.kingdee.bos.qing.macro.MacroVarSelector);var l=com.kingdee.bos.qing.common.Util.decodeParamFromUrl(window.location.search,
"path");l=(l?l:"/ierp")+"/qing/macroManage.do";var Y=new com.kingdee.bos.qing.macro.RemoteImpl;Y.setRemoteUrl(l);n.registerRemoteImpl(Y);com.kingdee.bos.qing.dbmanage.BizMetaSourceCreatorRegister.setCreator(new function(){this.createBizMetaSource=function(S){var ha=null;S.bizMetaType==h.ERPCloudDBCenterSource.DBCENTER?(ha=new h.ERPCloudDBCenterSource,ha.fromJsonObject(S)):S.bizMetaType==h.SuperQuerySource.ENTITY&&(ha=new h.SuperQuerySource,ha.fromJsonObject(S));return ha}})}}})();
//qingVersionTag: 20250807