var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(g){var w=0;return function(){return w<g.length?{done:!1,value:g[w++]}:{done:!0}}};$jscomp.arrayIterator=function(g){return{next:$jscomp.arrayIteratorImpl(g)}};$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(g,w,z){if(g==Array.prototype||g==Object.prototype)return g;g[w]=z.value;return g};$jscomp.getGlobal=function(g){g=["object"==typeof globalThis&&globalThis,g,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var w=0;w<g.length;++w){var z=g[w];if(z&&z.Math==Math)return z}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(g,w){var z=$jscomp.propertyToPolyfillSymbol[w];if(null==z)return g[w];z=g[z];return void 0!==z?z:g[w]};
$jscomp.polyfill=function(g,w,z,G){w&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(g,w,z,G):$jscomp.polyfillUnisolated(g,w,z,G))};$jscomp.polyfillUnisolated=function(g,w,z,G){z=$jscomp.global;g=g.split(".");for(G=0;G<g.length-1;G++){var H=g[G];if(!(H in z))return;z=z[H]}g=g[g.length-1];G=z[g];w=w(G);w!=G&&null!=w&&$jscomp.defineProperty(z,g,{configurable:!0,writable:!0,value:w})};
$jscomp.polyfillIsolated=function(g,w,z,G){var H=g.split(".");g=1===H.length;G=H[0];G=!g&&G in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var P=0;P<H.length-1;P++){var Z=H[P];if(!(Z in G))return;G=G[Z]}H=H[H.length-1];z=$jscomp.IS_SYMBOL_NATIVE&&"es6"===z?G[H]:null;w=w(z);null!=w&&(g?$jscomp.defineProperty($jscomp.polyfills,H,{configurable:!0,writable:!0,value:w}):w!==z&&(void 0===$jscomp.propertyToPolyfillSymbol[H]&&(z=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[H]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(H):$jscomp.POLYFILL_PREFIX+z+"$"+H),$jscomp.defineProperty(G,$jscomp.propertyToPolyfillSymbol[H],{configurable:!0,writable:!0,value:w})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(g){if(g)return g;var w=function(P,Z){this.$jscomp$symbol$id_=P;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:Z})};w.prototype.toString=function(){return this.$jscomp$symbol$id_};var z="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",G=0,H=function(P){if(this instanceof H)throw new TypeError("Symbol is not a constructor");return new w(z+(P||"")+"_"+G++,P)};return H},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(g){if(g)return g;g=Symbol("Symbol.iterator");for(var w="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),z=0;z<w.length;z++){var G=$jscomp.global[w[z]];"function"===typeof G&&"function"!=typeof G.prototype[g]&&$jscomp.defineProperty(G.prototype,g,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return g},"es6",
"es3");$jscomp.iteratorPrototype=function(g){g={next:g};g[Symbol.iterator]=function(){return this};return g};$jscomp.iteratorFromArray=function(g,w){g instanceof String&&(g+="");var z=0,G=!1,H={next:function(){if(!G&&z<g.length){var P=z++;return{value:w(P,g[P]),done:!1}}G=!0;return{done:!0,value:void 0}}};H[Symbol.iterator]=function(){return H};return H};$jscomp.polyfill("Array.prototype.keys",function(g){return g?g:function(){return $jscomp.iteratorFromArray(this,function(w){return w})}},"es6","es3");
$jscomp.findInternal=function(g,w,z){g instanceof String&&(g=String(g));for(var G=g.length,H=0;H<G;H++){var P=g[H];if(w.call(z,P,H,g))return{i:H,v:P}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(g){return g?g:function(w,z){return $jscomp.findInternal(this,w,z).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 g=com.kingdee.bos.qing.scene;g.SubjectModelingFacade=function(O,X,T,B){z.call(this,O,X,T,B);var C=this.protectedMethod;this.loadModel=function(E){C.remote("loadModel",{themeID:E})};this.checkSubjectIsRejectPrepareData=
function(E){C.remote("checkSubjectIsRejectPrepareData",{themeID:E})};this.saveModel=function(E,L){E={model:JSON.stringify(L),themeID:E};C.remote("saveModel",E)}};var w,z,G,H,P,Z;(function(){var O=com.kingdee.bos.qing;w=O.CodeLoader;O=com.kingdee.bos.qing.framework.common;z=O.AbstractFacade;G=O.IconsFile;H=O.MultilanguageManager.createPackageAccessor(g);O=com.kingdee.bos.qing.data;P=O.Icons;Z=O.BizSourceTypeContext})();g.DataModellingContext=new function(){function O(){var J=w.getSkinName(),N=new G;
N.setFilePath("scene/skin/"+J+"/res/dm-impl.png");N.setStartPosition(1,1);N.setIconSize(16,16);J=N.createDescription(0,2);P.regist("f7",J)}var X=[],T={},B=[],C={},E={},L=[],Q=[],n,x={};this.addSourceType=function(J){X.push(J)};var R=function(){for(var J=0;J<X.length;J++){var N=X[J];N&&N(U)}},U=function(J,N,ba,V,da,r,D){B.push(J);Q.push(N);J=J.getName();C[J]=ba;E[J]=r;V&&(T[J]=V);da&&L.push(da);D&&(x[J]=D)};this.init=function(J){R();n=J;for(var N=0;N<Q.length;N++)(J=Q[N])&&J();O();J=Z;J.setTitle(H.get("ERPCloudEntity",
"\u91d1\u8776\u4e91\u82cd\u7a79"));J.setPermissionChecker(ca);J.setSourceTypes(B);var ba=Object.keys(E);for(N=0;N<ba.length;N++){var V=ba[N],da=E[V];J.addSourceFilterUIRender(V,da)}J.setStepProvider(function(r,D,m,h,y,e){var a=r.getExistSource();r=r.getName();var f=C[r];return f?f(n,r,a,D,m,h,y,e):[]});J.setMutexChecker(function(r,D,m){D=D.getName();for(var h=0;h<L.length;h++)if((0,L[h])(r,D,m))return!0;return!1});J.addSourceFilterUIRender(V,da);da=Object.keys(x);for(N=0;N<da.length;N++)V=da[N],J.addSourceModifyingEditor(V,
x[V])};var ca=function(J,N,ba,V){(J=T[J])?J(n,N,ba,V):ba()}}})();(function(){function g(){C.call(this);var n=this;this.getShortDisplay=function(){return O.get("bussinessEntity","\u4e1a\u52a1\u5b9e\u4f53")};this.protectedIsTheSame=function(x){return!0};this.isModifiable=function(){return!1};this.fissionFor=function(x){x=new g;x.setTypeName(n.getTypeName());return x};this.getMergeType=function(){return E.BIZ_MERGE};this.supportMergeTable=function(){return!0};this.protectedToJsonObject=function(x){};this.protectedFromJsonObject=function(x){};this.isSupportFlexModel=
function(){return!0};this.getEntityIconName=function(x){return"entity"};this.isShowEntityMark=function(){return!0}}function w(){X.call(this);this.getSubTitle=function(){return O.get("selectEntity","\u9009\u62e9\u5b9e\u4f53")};this.isScannable=function(){return!0}}function z(n,x,R,U,ca){R||(R=new g,R.setName("s"+(new Date).getTime()),R.setTypeName(x));n=new w;n.setSource(R);x=new T;x.setSource(R);return[n,x]}function G(){var n=P.getSkinName(),x=new Z;x.setFilePath("scene/skin/"+n+"/res/dm-impl.png");
x.setStartPosition(1,1);x.setIconSize(16,16);B.regist("entity",x.createDescription(0,0));B.regist("entity_selected",x.createDescription(1,0));B.regist("entity-sub",x.createDescription(0,1));B.regist("entity-sub_selected",x.createDescription(1,1));B.regist("head-biz-union",x.createDescription(2,0));B.regist("head-biz-union_selected",x.createDescription(3,0));B.regist("entry-biz-union",x.createDescription(2,1));B.regist("entry-biz-union_selected",x.createDescription(3,1));B.regist("query_entity",x.createDescription(0,
3));B.regist("query_entity_selected",x.createDescription(0,4));B.regist("query_entity-sub",x.createDescription(0,7));B.regist("query_entity-sub_selected",x.createDescription(0,8));B.regist("with_post_processor_entity",x.createDescription(0,5));B.regist("with_post_processor_entity_selected",x.createDescription(0,6));B.regist("with_post_processor_entity-sub",x.createDescription(0,9));B.regist("with_post_processor_entity-sub_selected",x.createDescription(0,10));x.setStartPosition(1,69);x.setIconSize(90,
45);n=x.createDescription(1,0);B.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 H=com.kingdee.bos.qing.scene,P,Z,O,X,T,B,C,E,L,Q;(function(){var n=com.kingdee.bos.qing;P=n.CodeLoader;n=com.kingdee.bos.qing.framework.common;
Z=n.IconsFile;O=n.MultilanguageManager.createPackageAccessor(H);n=com.kingdee.bos.qing.data;X=n.DbSelectTableStep;T=n.DbSelectFieldStep;B=n.Icons;C=n.AbstractBizMetaSource;E=n.AbstractSource;L=n.SourceType;Q=H.DataModellingContext})();g.ENTITY="ERPCloudEntity";Q.addSourceType(function(n){n(new L(g.ENTITY,O.get("bussinessEntity","\u4e1a\u52a1\u5b9e\u4f53"),"source_ERPCloud_blue",g),G,z,null,null,null)})})();(function(){function g(){Q.call(this);var r=this,D={},m={},h,y,e,a,f,p=!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 x.COMMON_MERGE};this.isSupportColumnToRow=function(){return!0};this.getShortDisplay=function(){return C.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")};this.addUserSql=function(b){var c=b.getName();D[c]=b};this.setAllUserSql=
function(b){D=b};this.hasUserSql=function(){return D&&"{}"!==JSON.stringify(D)};this.isUserSql=function(b){return!!D[b]};this.getUserSql=function(b){return D[b]};this.getAllUserSqlName=function(){return Object.keys(D)};this.getAllUserSql=function(){return D};this.removeUserSql=function(b){delete D[b]};this.supportStoredProcedure=function(){return!1};this.addStoredProcedure=function(b){var c=b.getName();m[c]=b};this.setAllStoredProcedure=function(b){m=b};this.hasStoredProcedure=function(){return m&&
"{}"!==JSON.stringify(m)};this.isStoredProcedure=function(b){return!!m[b]};this.getStoredProcedure=function(b){return m[b]};this.getAllStoredProcedureName=function(){return Object.keys(m)};this.getAllStoredProcedure=function(){return m};this.removeStoredProcedure=function(b){delete m[b]};this.setSchemaName=function(b){h=b};this.getSchemaName=function(){return h};this.setDbAddress=function(b){e=b};this.getDbAddress=function(){return e};this.setDbName=function(b){y=b};this.getDbName=function(){return y};
this.setUserName=function(b){a=b};this.getUserName=function(){return a};this.setPassword=function(b){f=b};this.getPassword=function(){return f};this.setQueryEntries=function(b){p=b};this.isQueryEntries=function(){return p};this.protectedToJsonObject=function(b){for(var c=[],q=r.getAllUserSqlName(),k=0;k<q.length;k++){var d=q[k];if(r.isUserSql(d)){var t={},u=r.getUserSql(d);t.name=d;t.sqlType=u.getSqlType();t.content=u.getContent();c.push(t)}}b.userSqls=c;b.schemaName=h;b.dbName=y;b.dbAddress=e;b.userName=
a;f&&(b.password=X.encode(f));b.isQueryEntries=p};this.protectedFromJsonObject=function(b){if(b.userSqls)for(var c=b.userSqls,q=0;q<c.length;q++){var k=new n,d=c[q];k.setName(d.name);k.setContent(d.content);k.setSqlType(d.sqlType);r.addUserSql(k)}h=b.schemaName;y=b.dbName;e=b.dbAddress;a=b.userName;b.password&&(f=X.decode(b.password));p=b.isQueryEntries};this.isTheSame=function(b){return r.getTypeName()==b.getTypeName()&&r.getSchemaName()==b.getSchemaName()&&r.getDbAddress()==b.getDbAddress()&&r.getDbName()==
b.getDbName()};this.clone=function(){var b=new g;b.setName("s"+(new Date).getTime());b.setTypeName(r.getTypeName());for(var c={},q=r.getAllUserSqlName(),k=0;k<q.length;k++)c[q[k]]=D[q[k]];b.setAllUserSql(c);b.setSchemaName(h);b.setDbName(y);b.setDbAddress(e);b.setUserName(a);b.setPassword(f);return b};this.clear=function(){h=f=a=e=y=null};this.mergeFrom=function(b){for(var c=b.getAllUserSqlName(),q=0;q<c.length;q++){var k=c[q];b.isUserSql(k)&&(k=b.getUserSql(k),r.addUserSql(k))}r.setSchemaName(b.getSchemaName());
r.setDbName(b.getDbName());r.setDbAddress(b.getDbAddress());r.setUserName(b.getUserName());r.setPassword(b.getPassword())};this.fissionFor=function(b){var c=new g;c.setName("s"+(new Date).getTime());b=b.getName();if(r.isUserSql(b)){var q=r.getUserSql(b);c.addUserSql(q);r.removeUserSql(b)}return c};this.isShowEntityMark=function(){return!0};this.isPublic=function(){return!0};this.getConnectionType=function(){return x.DBCONNECTION_TYPE_SUPERQUERY}}function w(){var r,D;this.createStep=function(m,h,y,
e,a,f){r=m.clone();h?D=new ba:(D=new U,D.setChangeSourceType(y),D.setMessageCurtain(f),D.setOldEntity(e),D.setDModel(a));D.setSource(r);return D}}function z(r,D,m,h,y,e,a,f){m||(m=new g,m.setName("s"+(new Date).getTime()),m.setTypeName(D));return[(new w).createStep(m,y,e,a,f,h)]}function G(){var r=Z.getSkinName(),D=new B;D.setFilePath("scene/skin/"+r+"/res/dm-impl.png");D.setStartPosition(1,1);D.setIconSize(16,16);D.setStartPosition(1,69);D.setIconSize(90,45);r=D.createDescription(1,0);L.regist("source_SuperQuery",
r)}function H(){ca.call(this);var r=this,D=this.protectedMethod,m,h,y,e,a,f,p,b,c,q,k;this.propectedCreateJqUi=function(v,l,A,M,Y){f=v;y=M;h=Y;p=l;b=A;m||(m=$("<div>"),d());return m};var d=function(){var v=b.clone();v.setSchemaName(null);var l=b.getSchemaName();y.createFacade(function(A){e=[];for(var M=Object.keys(A),Y=0;Y<M.length;Y++){var K=new N;K.setName(M[Y]);K.setAlias(A[M[Y]]);l==M[Y]&&(a=K);e.push(K)}0==e.length&&(A=C.get("noAuthentication","\u6ca1\u6709\u53ef\u7528\u7684\u6a21\u5f0f\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u6388\u6743\u6a21\u5f0f\u3002"),
D.getMessageCurtain().showPrompt(A));a||(A=new N,A.setName(l),A.setAlias(l),a=A);t();return!0},function(A,M){e=[];t();D.getMessageCurtain().showPrompt(M);return!0}).getUsableSchemas(v.toJsonObject())},t=function(){var v=0;v="";null!=b.getDbAddress()?(k=new da,k.setSchemas(e),k.setSelectedSchema(a),k.setSource(b),k.setCtxApi(y),k.setMessageCurtain(D.getMessageCurtain()),c=k,m.append(k.getJqUi()),v=C.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")+"-"+C.get("otherSystem","\u5176\u5b83\u7cfb\u7edf"),k.setTitle(v),
v=324):(q=new V,q.setSchemas(e),q.setSelectedSchema(a),c=q,m.append(q.getJqUi()),q.setTitle(C.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")),v=108);var l=new J;l.setClosingAction(function(A){var M=r.getConfirmListener();M&&M(A)});l.setCloseCallerDialogCallback(function(){D.destroy()});l.setChangeDataSourceParameter(f,p,y,h,b);l=l.getJqUi();O.layoutCtrl(l,0,v,120,60)};this.protectedAccepted=function(v,l){var A=c.getErrorMessage();if(A)return D.getMessageCurtain().showPrompt(A),!1;var M=b.clone();a=
c.getSchema();if(null!=b.getDbAddress()){var Y=a.getName(),K=c.getCloneSource();K.setSchemaName(Y);y.createFacade(function(W){M.setSchemaName(Y);M.setDbAddress(K.getDbAddress());M.setDbName(K.getDbName());M.setUserName(K.getUserName());M.setPassword(K.getPassword());u(v,l,M);return!0},function(W,fa){3201001==W&&(fa=C.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",
K.getUserName()).replace("#2",K.getSchemaName()));D.getMessageCurtain().showPrompt(fa);return!0}).getUsableSchemas(K.toJsonObject())}else M.setSchemaName(a.getName()),u(v,l,M)};var u=function(v,l,A){A.isTheSame(l)||(v.setSource(A),A=f.getSources(),v.mergeSource(A),f.funClearUserSqlsAndStoredProcedures(l));r.refreshDesigntimeDataObject(p,p.getSource(),y);if(c.isChecked()){v=f.getAllEntity();for(var M in v)l=v[M],!l.isUnion()&&b.isTheSame(l.getSource())&&p.getName()!==l.getName()&&(l.setSource(p.getSource()),
l.mergeSource(f.getSources()),r.refreshDesigntimeDataObject(l,l.getSource(),y))}};this.protectedIsValidToAccepted=function(v){v(!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 P=com.kingdee.bos.qing.scene;P.SuperQuerySource=g;P.SuperQueryFacade=function(r,
D,m,h){T.call(this,r,D,m,h);var y=this.protectedMethod;this.checkSuperQueryPermission=function(){y.remote("checkSuperQueryPermission",{})};this.loadUsableSchemas=function(e){e={source:JSON.stringify(e.toJsonObject())};y.remote("loadUsableSchemas",e)}};var Z,O,X,T,B,C,E,L,Q,n,x,R,U,ca,J,N,ba,V,da;(function(){var r=com.kingdee.bos.qing;Z=r.CodeLoader;r=com.kingdee.bos.qing.common;O=r.DomUtil;X=r.Base64Util;r=com.kingdee.bos.qing.framework.common;T=r.AbstractFacade;C=r.MultilanguageManager.createPackageAccessor(P);
B=r.IconsFile;r=com.kingdee.bos.qing.data;E=r.SourceType;L=r.Icons;Q=r.AbstractBizMetaSource;x=r.AbstractSource;n=r.UserSqlObj;U=r.SuperQueryConnectionStep;ca=r.AbstractSourceModifyingEditor;J=r.AdvancedSettingPane;N=r.SchemaInfo;ba=r.MergeSuperQueryStep;V=r.ModifyDirectConnPanel;da=r.ModifySqlConnPanel;R=P.DataModellingContext})();g.ENTITY="SuperQuery";R.addSourceType(function(r){r(new E(g.ENTITY,C.get("superQuery","\u8d85\u7ea7\u67e5\u8be2"),"source_SuperQuery",g),G,z,null,null,null,H)})})();(function(){function g(a,f,p,b){B.call(this,a,f,p,b);var c=this.protectedMethod;this.checkDBCenterPermission=function(){c.remote("checkDBCenterPermission",{})};this.loadAppNameByAppNumber=function(q){c.remote("loadAppNameByAppNumber",{appNumber:q})};this.getDBCenterAppDBType=function(q){c.remote("getDBCenterAppDBType",{appNumber:q})}}function w(){U.call(this);var a=this,f,p,b={},c={},q=m.checkEnvironment(m.COSMIC),k=!q;this.isBasedOnDB=function(){return!0};this.isModifiable=function(){return q};this.isShowChangeSourceTypeButtonInMenu=
function(){return k};this.setShowChangeSourceTypeButtonInMenu=function(d){k=d};this.supportMergeTable=function(){return!0};this.getMergeType=function(){return ba.COMMON_MERGE};this.isSupportColumnToRow=function(){return!0};this.setAppNumber=function(d){f=d};this.getAppNumber=function(){return f};this.setAppName=function(d){p=d};this.getAppName=function(){return p};this.getShortDisplay=function(){return E.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3")};this.isUserSql=function(d){return b[d]?
!0:!1};this.protectedToJsonObject=function(d){d.appNumber=f;d.appName=p;for(var t=[],u=a.getAllUserSqlName(),v=0;v<u.length;v++){var l=u[v];if(a.isUserSql(l)){var A=a.getUserSql(l),M=A.getContent();A=A.getSqlType();var Y={};Y.name=l;Y.content=M;Y.sqlType=A;t.push(Y)}}d.userSqls=t;t=[];u=a.getAllStoredProcedureName();for(v=0;v<u.length;v++)l=u[v],a.isStoredProcedure(l)&&(l=a.getStoredProcedure(l),t.push(l.toJsonObject()));d.storedProcedures=t};this.protectedFromJsonObject=function(d){f=d.appNumber;
p=d.appName;var t=d.userSqls;if(t)for(var u=0;u<t.length;u++){var v=t[u],l=new J;l.setName(v.name);l.setContent(v.content);l.setSqlType(v.sqlType);a.addUserSql(l)}if(d=d.storedProcedures)for(u=0;u<d.length;u++)t=d[u],v=new N,v.fromJsonObject(t),a.addStoredProcedure(v)};this.isTheSame=function(d){return a.getTypeName()==d.getTypeName()&&a.getAppNumber()==d.getAppNumber()};this.clone=function(){var d=new w;d.setName("s"+(new Date).getTime());d.setTypeName(a.getTypeName());d.setAppNumber(f);var t={},
u;for(u in b)t[u]=b[u];d.setAllUserSql(t);t={};for(var v in c)t[v]=c[v];d.setAllStoredProcedure(t);return d};this.mergeFrom=function(d){f=d.getAppNumber();for(var t=d.getAllUserSqlName(),u=0;u<t.length;u++){var v=t[u];d.isUserSql(v)&&(v=d.getUserSql(v),a.addUserSql(v))}t=d.getAllStoredProcedureName();for(u=0;u<t.length;u++)v=t[u],d.isStoredProcedure(v)&&(v=d.getStoredProcedure(v),a.addStoredProcedure(v))};this.isUserSql=function(d){return b[d]?!0:!1};this.getUserSql=function(d){return b[d]};this.removeUserSql=
function(d){delete b[d]};this.addStoredProcedure=function(d){var t=d.getName();c[t]=d};this.removeStoredProcedure=function(d){delete c[d]};this.getStoredProcedure=function(d){return c[d]};this.getAllStoredProcedureName=function(){var d=[],t;for(t in c)d.push(t);return d};this.isStoredProcedure=function(d){return c[d]?!0:!1};this.supportStoredProcedure=function(){return!1};this.fissionFor=function(d){var t=new w;t.setName("s"+(new Date).getTime());d=d.getName();if(a.isUserSql(d)){var u=a.getUserSql(d);
t.addUserSql(u);a.removeUserSql(d)}a.isStoredProcedure(d)&&(u=a.getStoredProcedure(d),t.addStoredProcedure(u),a.removeStoredProcedure(d));return t};this.addUserSql=function(d){var t=d.getName();b[t]=d};this.getAllUserSqlName=function(){var d=[],t;for(t in b)d.push(t);return d};this.setAllUserSql=function(d){b=d};this.getAllUserSql=function(){return b};this.hasUserSql=function(){return b&&"{}"!==JSON.stringify(b)?!0:!1};this.hasStoredProcedure=function(){return c&&"{}"!==JSON.stringify(c)?!0:!1};this.setAllStoredProcedure=
function(d){c=d};this.getAllStoredProcedure=function(){return c};this.getConnectionType=function(){return ba.DBCONNECTION_TYPE_DBCENTER}}function z(a,f,p,b,c,q,k,d){p||(p=new w,p.setName("s"+(new Date).getTime()),p.setTypeName(f));return[(new P(a)).createStep(p,c,q,k,d)]}function G(){var a=X.getSkinName(),f=new C;f.setFilePath("scene/skin/"+a+"/res/dm-impl.png");f.setStartPosition(1,1);f.setIconSize(16,16);f.setStartPosition(1,69);f.setIconSize(90,45);a=f.createDescription(1,0);R.regist("source_ERPCloudDBCenter",
a)}function H(){var a,f,p,b;this.getJqUi=function(){if(!f){f=$("<div>");p=new Q;p.setText(E.get("chooseApp","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528"));p.setReadonly("readonly");var k=p.getJqUi();k.on("click",q);var d=$("<div>");R.background(d,"f7");d.css("z-index","1");d.css("cursor","pointer");d.on("click",q);T.layoutCtrl(k,0,0,180,23);T.layoutCtrl(d,160,0,16,16);d.appendTo(f);k.appendTo(f)}return f};this.setFunSelectedChangeListener=function(k){b=k};this.setSelectedValue=function(k){a=k;p&&
p.setText(c());b(a)};this.getSelectedValue=function(){return a};var c=function(){var k=E.get("chooseApp","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528");a&&(k=a.text);return k},q=function(){var k=com.kingdee.bos.qing.integration.AppChooseForm;k.setCallBack(function(d){if(d&&d.content){d=d.content;var t=d.appNumber,u={};u.text=d.appName;u.value=t;a=u;p&&p.setText(c());b(a)}});k.openAppChooseForm()}}function P(a){var f,p=new H,b;this.createStep=function(t,u,v,l,A){f=t.clone();u?b=new da:(b=new ca,b.setChangeSourceType(v),
b.setOldEntity(l),b.setDModel(A));b.isShowDataBase(!0);b.setDataBaseJqUiCreator(q);b.setDbChecker(c);b.setSource(f);return b};var c=function(t,u){var v=p.getSelectedValue();if(v)return t.setAppNumber(v.value),!0;u.showPrompt(E.get("chooseAppCurtain","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528\u3002"));return!1},q=function(t){var u=$("<div>"),v=(new L(E.get("app","\u5e94\u7528"))).getJqUi(),l=p.getJqUi();p.setFunSelectedChangeListener(d);T.layoutCtrl(v,15,0,70,23);T.layoutCtrl(l,60,0,200,23);u.append(v);
u.append(l);k(t);return u},k=function(t){var u=f.getAppNumber();u&&(new g(a,function(v){v?p.setSelectedValue({text:v.appName,value:u}):t.showPrompt(E.get("loadAppNameError","\u83b7\u53d6\u5e94\u7528\u540d\u79f0\u5931\u8d25\u3002"),2E3)},function(v,l){l?t.showPrompt(l,2E3):t.showPrompt(E.get("loadAppNameError","\u83b7\u53d6\u5e94\u7528\u540d\u79f0\u5931\u8d25\u3002"),2E3);return!0})).loadAppNameByAppNumber(u)},d=function(t){t=t.value;(new g(a,function(u){b.changeDBType(u)},function(u){return!1})).getDBCenterAppDBType(t)}}
function Z(){r.call(this);var a=this,f=this.protectedMethod,p,b,c,q,k,d,t,u=new com.kingdee.bos.qing.data.RemoteImpl,v,l=new H;this.propectedCreateJqUi=function(K,W,fa,aa,ea){p=K;b=W;q=aa;c=fa;t=ea;k||A();return k};var A=function(){k=$("<div>");var K=(new L(E.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3"))).getJqUi(),W=(new L(E.get("app","\u5e94\u7528"))).getJqUi(),fa=l.getJqUi();l.setFunSelectedChangeListener(function(){});var aa=c.getAppNumber();aa&&(u.setRemoteUrl(M()),Y(u,aa));d=new n;
d.setText(E.get("actOnTheSameDatabase","\u540c\u65f6\u4fee\u6539\u5f53\u524d\u4e3b\u9898\u4e2d\u5176\u4ed6\u540c\u6e90\u6570\u636e\u8868"));d.setChecked(!0);aa=d.getJqUi();T.layoutCtrl(K,0,0,120,23);T.layoutCtrl(W,20,40,70,23);T.layoutCtrl(fa,70,40,280,23);T.layoutCtrl(aa,20,80,250,23);k.append(K);k.append(W);k.append(fa);k.append(aa);K=new D;var ea=a.getConfirmListener();K.setClosingAction(function(I){ea&&ea(I)});K.setCloseCallerDialogCallback(function(){f.destroy()});K.setChangeDataSourceParameter(p,
b,q,t,c);K=K.getJqUi();T.layoutCtrl(K,0,120,120,60);k.append(K)},M=function(){var K=(new com.kingdee.bos.qing.data.DataModelingScene).getUrlParam("path");return(K?K:"/ierp")+"/qing/dataModeling.do"},Y=function(K,W){(new com.kingdee.bos.qing.scene.DataCenterFacade(K,function(fa){fa&&l.setSelectedValue({text:fa.appName,value:W})},function(fa,aa){l.setSelectedValue({text:W,value:W});aa&&(v||(v=h.createWarning(),fa=(new y).measureWidth(E.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3"))+14,T.layoutCtrl(v,
fa,5,12,12),v.appendTo(k)),v.attr("title",aa),v.show());return!0})).loadAppNameByAppNumber(W)};this.protectedIsValidToAccepted=function(K){K(!0)};this.protectedAccepted=function(K,W){var fa=!d.isChecked(),aa=c.clone();aa.setAppNumber(l.getSelectedValue().value);if(fa){if(!aa.isTheSame(W)){var ea=K.getName();c.isUserSql(ea)?(ea=c.getUserSql(ea),aa.addUserSql(ea)):c.isStoredProcedure(ea)&&(ea=c.getStoredProcedure(ea),aa.addStoredProcedure(ea));ea=p.getSources();K.setSource(aa);K.mergeSource(ea);p.funClearUserSqlsAndStoredProcedures(W)}a.refreshDesigntimeDataObject(b,
b.getSource(),q)}else for(ea in W.setAppNumber(aa.getAppNumber()),a.refreshDesigntimeDataObject(b,b.getSource(),q),K=p.getAllEntity(),K)W=K[ea],W.isUnion()||b.getSource().isTheSame(W.getSource())&&b.getName()!==W.getName()&&a.refreshDesigntimeDataObject(W,b.getSource(),q)}}"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 O=com.kingdee.bos.qing.scene;O.AppChooseDialogSelector=H;O.ERPCloudDBCenterSource=w;O.DataCenterFacade=g;var X,T,B,C,E,L,Q,n,x,R,U,ca,J,N,ba,V,da,r,D,m,h,y;(function(){var a=com.kingdee.bos.qing;X=a.CodeLoader;a=com.kingdee.bos.qing.common;T=a.DomUtil;y=a.TextMeasurer;a=com.kingdee.bos.qing.common.ui;h=a.CommonIconUtil;a=com.kingdee.bos.qing.framework.common;B=a.AbstractFacade;C=a.IconsFile;E=a.MultilanguageManager.createPackageAccessor(O);a=com.kingdee.bos.qing.ui.component;
L=a.Label;Q=a.TextField;n=a.CheckBox;a=com.kingdee.bos.qing.data;x=a.SourceType;R=a.Icons;U=a.AbstractBizMetaSource;ba=a.AbstractSource;ca=a.MetaDBConnectionStep;da=a.MergeDBCenterConnectionStep;J=a.UserSqlObj;N=a.StoredProcedureModel;D=a.AdvancedSettingPane;r=a.AbstractSourceModifyingEditor;m=a.ProductLineEnvironment;V=O.DataModellingContext})();w.DBCENTER="ERPCloudDBCenter";var e=function(a,f,p,b){(new g(a,function(c){c?p():(f.showPrompt(E.get("noDBCenterPermission","\u6ca1\u6709\u6570\u636e\u4e2d\u5fc3\u6743\u9650\uff0c\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002"),
2E3),b())},function(c){b();return!1})).checkDBCenterPermission()};V.addSourceType(function(a){a(new x(w.DBCENTER,E.get("dataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3"),"source_ERPCloudDBCenter",w),G,z,e,null,null,Z)})})();(function(){function g(){x.call(this);var m=this,h={},y,e;this.setModelId=function(a){y=a};this.getModelId=function(){return y};this.setModelType=function(a){e=a};this.getModelType=function(){return e};this.getAllModelType=function(){return h};this.setTotalModelType=function(a){h=a};this.addModelType=function(a,f){h[a]=f};this.isMetricModel=function(a){return h[a]==V};this.isMetricModelSelected=function(a){a=Object.keys(a);for(var f=0;f<a.length;f++)if(m.isMetricModel(a[f]))return!0;return!1};this.getShortDisplay=
function(){return C.get("dppSourceName","\u8f7b\u5efa\u6a21")};this.protectedIsTheSame=function(a){return!0};this.isModifiable=function(){return!1};this.fissionFor=function(a){a=new g;a.setTypeName(m.getTypeName());a.setModelId(m.getModelId());a.setModelType(m.getModelType());return a};this.getMergeType=function(){return R.BIZ_MERGE};this.supportMergeTable=function(){return!1};this.protectedToJsonObject=function(a){a.modelId=y;a.modelType=e;a.allModelType=h};this.protectedFromJsonObject=function(a){y=
a.modelId;e=a.modelType;h=a.allModelType};this.isSupportFlexModel=function(){return!0};this.getEntityIconName=function(a){var f=a;-1!==a.indexOf("_")&&(f=a.lastIndexOf("_"),f=a.slice(0,f));return h[f]};this.mergeFrom=function(a){a=a.getAllModelType();for(var f=Object.keys(a),p=0;p<f.length;p++)h[f[p]]||(h[f[p]]=a[f[p]])};this.isShowEntityMark=function(){return!0};this.isSupportCustomField=function(a){return!m.isMetricModel(a)};this.isSupportChangeFieldType=function(a){return!m.isMetricModel(a)};this.isSupportCreateRelation=
function(a){return!m.isMetricModel(a)};this.isSupportExtractData=function(a){return!m.isMetricModel(a)};this.getDisplayName=function(a){return m.isMetricModel(a)?C.get("metricModel","\u6307\u6807\u6a21\u578b"):C.get("dataTableModel","\u6570\u636e\u8868\u6a21\u578b")}}function w(){Q.call(this);var m=this.protectedMethod,h=this,y,e;U.DPP_SOURCES=[new U("data_table_model",C.get("dataTableModel","\u6570\u636e\u8868\u6a21\u578b"),"source_data_table")];this.protectedCreateUi=function(){var c=$("<div class='dm-modeler'>"),
q=$("<div class='dm-source-type-typelist-title'>");q.text(C.get("type","\u7c7b\u578b"));q.on("mousedown",a);var k=new ca;k.setItemModels(U.DPP_SOURCES);k.setBorderVisible(!1);k.setCustomItemPainter(f);k.setCustomSelectedsPainter(p);k.addPressedListener(b);k=k.getJqUi();k.addClass("dm-source-type-typelist-list");c.append(q);c.append(k);return c};var a=function(c){c.ctrlKey&&20<=c.offsetX&&50>=c.offsetX&&(2===U.DPP_SOURCES.length&&U.DPP_SOURCES.pop(),U.DPP_SOURCES.push(new U(V,C.get("metricModel","\u6307\u6807\u6a21\u578b"),
"source_metric")),$(".dm-modeler .dm-source-type-typelist-list").remove(),c=new ca,c.setItemModels(U.DPP_SOURCES),c.setSelecteds([e]),c.setBorderVisible(!1),c.setCustomItemPainter(f),c.setCustomSelectedsPainter(p),c.addPressedListener(b),c=c.getJqUi(),c.addClass("dm-source-type-typelist-list"),$(".dm-modeler").append(c))},f=function(c,q){c.attr("title",q.getText());c.addClass("dm-source-type-typelist-item");var k=$("<div>");k.addClass("dm-source-type-typelist-item-icon");n.background(k,q.getIconName());
k.appendTo(c);k=$("<div>");k.addClass("dm-source-type-typelist-item-text");k.text(q.getText());k.appendTo(c)},p=function(c,q){for(var k=0;k<c.length;k++){var d=c[k];d.removeClass("dm-source-type-typelist-item_selected");d.find(".dm-source-type-typelist-item_selected-mark").remove();d.find(".dm-source-type-typelist-item_selected-icon").remove()}for(k=0;k<q.length;k++)d=q[k],d.addClass("dm-source-type-typelist-item_selected"),c=$("<div>"),c.addClass("dm-source-type-typelist-item_selected-mark"),c.appendTo(d),
c=$("<div>"),n.background(c,"checked"),c.addClass("dm-source-type-typelist-item_selected-icon"),c.appendTo(d)},b=function(c,q){e=c.getSelecteds()[0]};this.isLastStep=function(){return!1};this.getSubTitle=function(){return C.get("dppSourceName","\u8f7b\u5efa\u6a21")};this.setBox=function(c){y=c};this.intoThisStep=function(c,q){};this.outThisStep=function(c,q){if(c)q(null);else if(e){c=y.getAllEntity();if(0<c.length){c=r(c);if(e.getName()===V&&!c){m.getMessageCurtain().showPrompt(C.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"===e.getName()&&c){m.getMessageCurtain().showPrompt(C.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}}h.getSource().setModelType(e.getName());q(null)}else m.getMessageCurtain().showPrompt(C.get("selectADppModel","\u8bf7\u9009\u4e2d\u4e00\u9879\u6a21\u578b\u3002"))}}function z(){E.call(this);var m=this;this.setBox=function(h){};this.getSubTitle=function(){return m.getSource().getModelType()===V?C.get("selectMetricModel","\u9009\u62e9\u6307\u6807\u6a21\u578b"):C.get("selectDataTableModel","\u9009\u62e9\u6570\u636e\u8868\u6a21\u578b")};this.protectedCreateNoTableTipUi=function(){var h=$("<div>");
h.css("line-height","20px");h.css("color","#666");h.append(C.get("noAuthorizedModelTip","\u6682\u65e0\u53ef\u9009\u62e9\u7684\u6a21\u578b<br/>\u73b0\u5728\u53bb\u8f7b\u5efa\u6a21"));var y=$("<span class='dm-source-table-btn-link'>");y.text(C.get("gotoQingModeler","\u65b0\u5efa\u6a21\u578b"));y.on("click",function(){var e=N.decodeParamFromUrl(window.location.search,"path")+"/qing_modeler/homepage.do";J.openNewTabInAppId(C.get("qing_modeler","\u8f7b\u5efa\u6a21"),e,e,J.QING_MODELER)});h.append(y);return h}}
function G(){L.call(this);var m=this;this.protectedHandleEntities=function(h){var y={},e=m.getSource(),a=e.getAllModelType(),f;for(f in h){var p=h[f],b=p.getAssociateName();p.setDirectModel(e.isMetricModel(b));y[b]=a[b]}m.getSource().setTotalModelType(y)}}function H(m,h,y,e,a,f,p,b){m=new w;m.setBox(b);e=new z;e.setBox(b);b=new G;y?(h=new g,h.setName("s"+(new Date).getTime()),h.setTypeName(y.getTypeName()),h.setTotalModelType(y.getAllModelType()),h.setModelType(y.getModelType()),m.setSource(h),e.setSource(h),
b.setSource(h)):(y=new g,y.setName("s"+(new Date).getTime()),y.setTypeName(h),m.setSource(y),e.setSource(y),b.setSource(y));return[m,e,b]}function P(){var m=X.getSkinName(),h=new B;h.setFilePath("scene/skin/"+m+"/res/dm-impl.png");h.setStartPosition(1,1);h.setIconSize(16,16);n.regist("data_table_model",h.createDescription(2,4));n.regist("data_table_model_selected",h.createDescription(2,3));n.regist("data_table_model-sub",h.createDescription(2,4));n.regist("data_table_model-sub_selected",h.createDescription(2,
4));n.regist("entity_model",h.createDescription(1,4));n.regist("entity_model_selected",h.createDescription(1,3));n.regist("entity_model-sub",h.createDescription(1,4));n.regist("entity_model-sub_selected",h.createDescription(1,4));n.regist("metric_model",h.createDescription(1,5));n.regist("metric_model_selected",h.createDescription(1,6));n.regist("relation_model",h.createDescription(3,4));n.regist("relation_model_selected",h.createDescription(3,3));n.regist("relation_model-sub",h.createDescription(3,
4));n.regist("relation_model-sub_selected",h.createDescription(3,4));n.regist("dpp_head-biz-union",h.createDescription(2,0));n.regist("dpp_head-biz-union_selected",h.createDescription(3,0));n.regist("dpp_entry-biz-union",h.createDescription(2,1));n.regist("dpp_entry-biz-union_selected",h.createDescription(3,1));h.setStartPosition(1,69);h.setIconSize(90,45);m=h.createDescription(1,0);n.regist("source_dpp_blue",m);n.regist("source_metric",h.createDescription(0,1));n.regist("source_data_table",h.createDescription(1,
1))}function Z(m,h,y,e){T.call(this,m,h,y,e);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 O=com.kingdee.bos.qing.scene,X,T,B,C,E,L,Q,n,x,R,U,ca,J,N,ba;(function(){var m=
com.kingdee.bos.qing;X=m.CodeLoader;m=com.kingdee.bos.qing.framework.common;T=m.AbstractFacade;B=m.IconsFile;C=m.MultilanguageManager.createPackageAccessor(O);J=m.TabbedUiUtil;m=com.kingdee.bos.qing.data;E=m.DbSelectTableStep;L=m.DbSelectFieldStep;Q=m.AbstractImportEntityStep;n=m.Icons;x=m.AbstractBizMetaSource;R=m.AbstractSource;U=m.SourceType;m=com.kingdee.bos.qing.ui.component;ca=m.List;m=com.kingdee.bos.qing.common;N=m.Util;ba=O.DataModellingContext})();g.ENTITY="dpp";var V="metric_model",da=
function(m,h,y,e){(new Z(m,function(a){a&&y()},function(a){if(3101021==a)return h.showPrompt(C.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),e(),!0;if(3010013==a)return h.showPrompt(C.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),e(),!0;e();return!1})).checkDppPermission()},r=function(m){for(var h=0;h<m.length;h++){var y=m[h];if(y instanceof com.kingdee.bos.qing.data.Entity){var e=y.getSource();if(e instanceof g&&e.isMetricModel(y.getAssociateName()))return!0}}return!1},D=function(m,h,y){m=m.getAllEntity();if(h===g.ENTITY)return!1;(h=r(m))&&y.showPrompt(C.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 h};ba.addSourceType(function(m){m(new U(g.ENTITY,C.get("dppSourceName","\u8f7b\u5efa\u6a21"),"source_dpp_blue",g),P,H,da,D,null)})})();(function(){function g(e,a,f,p){C.call(this,e,a,f,p);var b=this.protectedMethod;this.checkERPCloudMDDPermission=function(){b.remote("checkERPCloudMDDPermission",{})}}function w(){ba.call(this);var e,a;this.getShortDisplay=function(){return L.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(f){return"table"};this.setSourceId=
function(f){e=f};this.getSourceId=function(){return e};this.setSourceDisplayName=function(f){a=f};this.getSourceDisplayName=function(){return a};this.protectedToJsonObject=function(f){f.sourceId=e;f.sourceDisplayName=a};this.protectedFromJsonObject=function(f){e=f.sourceId;a=f.sourceDisplayName}}function z(e,a,f,p){(new g(e,function(b){b?f():(a.showPrompt(L.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),p())},function(b){p();return!1})).checkERPCloudMDDPermission()}function G(){var e=B.getSkinName(),a=new E;a.setFilePath("scene/skin/"+e+"/res/dm-impl.png");a.setStartPosition(1,1);a.setIconSize(16,16);a.setStartPosition(1,69);a.setIconSize(90,45);e=a.createDescription(1,0);N.regist("source_ERPCloudMDD",e)}function H(e,a,f){if(0!=e.getEntityCount()){if(w.ERPCloudMDD==a)return f.showPrompt(L.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;e=e.getSources();for(a=0;a<e.length;a++)if(w.ERPCloudMDD==e[a].getTypeName())return f.showPrompt(L.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 P(e,a,f,p,b,c,q,k){f||(f=new w,f.setName("s"+(new Date).getTime()),f.setTypeName(a));e=new Z;e.setSource(f);return[e]}function Z(){V.call(this);var e=this,a=this.protectedMethod,f,
p,b=null,c=null,q=null,k={},d=null,t,u;this.isLastStep=function(){return!0};this.getSubTitle=function(){return L.get("ERPCloudMDD","\u91d1\u8776\u591a\u7ef4\u6570\u636e\u5e93")};this.protectedCreateUi=function(){var I=$("<div>"),F=(new x(L.get("ERPCloudMDDApp","\u5e94\u7528"))).getJqUi();f=new n;f.addSelectedChangedListener(l);f.setCustomPainter(v);var S=f.getJqUi();Q.layoutCtrl(F,15,0,75,23);Q.layoutCtrl(S,75,0,200,23);I.append(F);I.append(S);F=(new x(L.get("ERPCloudMDDsystem","\u4f53\u7cfb"))).getJqUi();
_oCubeDropdownSelector=new R;_oCubeDropdownSelector.setCustomPainter(M);_oCubeDropdownSelector.setDropdownCreator(Y);_oCubeDropdownSelector.addSelectionListener(fa);S=_oCubeDropdownSelector.getJqUi();Q.layoutCtrl(F,420,0,75,23);Q.layoutCtrl(S,480,0,200,23);I.append(F);I.append(S);F=new x(L.get("ERPCloudMDDMemberRange","\u6210\u5458\u8303\u56f4"));p=new O;p.setFunGetCurrentEntity(function(){return q});S=p.getJqUi();u=$("<div>");u.css("box-shadow","0px 0px 2px 0px #dbdbdb");t=F.getJqUi();Q.layoutCtrl(t,
15,40,90,23);Q.layoutCtrlWithLRTB(u,15,15,null,76,2,null);u.append(S);I.append(t);I.append(u);t.hide();u.hide();return I};var v=function(I,F,S){S?F.text(S.getDisplayName()):F.text(L.get("selectApp","\u8bf7\u9009\u62e9\u5e94\u7528"))},l=function(I,F,S){b=S;I=e.getSource();I.setSourceId(b.getName());I.setSourceDisplayName(b.getDisplayName());A()},A=function(){c=d=null;_oCubeDropdownSelector.setSelectedModel(null);var I=e.getSource().toJsonObject();e.getCtxApi().createFacade(function(F){var S=new m;
S.fromJsonObject(F);F=new ca.BranchNode(S);F.setExpanded(!0);W(F,S);d=F},function(F,S){return!1}).getUsableEntities(I)},M=function(I,F){I?F.text(I.getDisplayName()):F.text(L.get("selectCube","\u8bf7\u9009\u62e9\u4f53\u7cfb"))},Y=function(I,F,S){if(!d)return[-1,40];var ha=0;d.visiting(function(){ha++;return 10<ha?!0:!1});F=new ca;var ia=F.getJqUi();ia.css("background","#ffffff");var ja=F.getLineHeight()*(ha-1)+3;Q.layoutCtrlWithLRTB(ia,0,0,null,0,0,null);F.addSelectedListener(function(ka){ka=ka.getSelecteds();
0<ka.length&&(c=ka[0],ka=c.getUserObject(),S(ka))});F.setNodePainter(K);F.setRootVisible(!1);F.setRoot(d);F.setSelecteds(c?[c]:null);ia.appendTo(I);return[-1,ja]},K=function(I,F){I.css("padding-left","4px");I.css("padding-right","4px");I.text(F.getUserObject().getDisplayName())},W=function(I,F){if(F=F.getChildren())for(var S=0;S<F.length;S++){var ha=F[S];if(ha instanceof m){var ia=new ca.BranchNode(ha);ia.setExpanded(!0);ia.setSelectable(!1);W(ia,ha)}else ia=new ca.LeafNode(ha);I.addChild(ia)}},fa=
function(I,F){if(I=I.getSelectedModel()){F=b.getName();var S=k[F];S||(S={},k[F]=S);var ha=I.getName();if(I=S[ha])aa(I);else{I=e.getSource();var ia={};ia[I.getName()]=I;I=I.toJsonObject();e.getCtxApi().createFacade(function(ja){var ka=new h;ka.fromJsonObject(ja,ia);ja=ka.getEntityByAssociateName(ha);S[ha]=ja;aa(ja)},function(ja,ka){return!1}).getDesigntimeDataObject(I,ha)}}else aa(null)},aa=function(I){null!=I?(t.show(),u.show()):(t.hide(),u.hide());q=I;p.updateUi(q)};this.intoThisStep=function(I,
F){F||ea()};var ea=function(){var I=e.getSource().toJsonObject();e.getCtxApi().createFacade(function(F){var S=[];if(F)for(var ha=0;ha<F.length;ha++){var ia=F[ha],ja=new D;ja.fromJson(ia);S.push(ja)}f.setItemModels(S)},function(F,S){return!1}).getCatlog(I)};this.outThisStep=function(I,F){I?F(null):b?c?F(null):a.getMessageCurtain().showPrompt(L.get("selectCubeCurtain","\u8bf7\u9009\u62e9\u4f53\u7cfb\u3002"),2E3):a.getMessageCurtain().showPrompt(L.get("selectAppCurtain","\u8bf7\u9009\u62e9\u5e94\u7528\u3002"),
2E3)};this.over=function(I){I&&e.getCtxApi().finish([q],[])}}function O(){da.call(this);var e=this.protectedMethod,a;this.protectedInit=function(){a=$("<div>");Q.layoutCtrlWithLRTB(a,0,0,null,0,0,null);a.css("overflow","auto");return a};this.updateUi=function(f){a.empty();if(f){var p=f.getFilters(),b={};if(p)for(var c=0;c<p.length;c++){var q=p[c],k=q.getProperty().getName();b[k]=q}p=f.getParild();k=20;for(c=0;c<p.length;c++){var d=p[c];q=d.getIdFieldName();q=b[q];var t=f,u=new X;u.setModel(t,d,q);
u.setCheckError(e.checkError);u.setFirePreviewRefreshWithOnlyRepaint(e.firePreviewRefreshWithOnlyRepaint);q=u.getJqUi();0==c%3?Q.layoutCtrl(q,5,k,250,66):1==c%3?Q.layoutCtrl(q,322,k,250,66):(Q.layoutCtrl(q,639,k,250,66),k+=66);a.append(q)}}};this.afterResize=function(){};this.locateToErrorRow=function(f,p){}}function X(){var e,a,f,p,b,c,q;this.getJqUi=function(){if(!e){e=$("<div>");a=new x;var l=a.getJqUi();Q.layoutCtrl(l,15,0,230,23);e.append(l);f=new U;f.setClearable(!0);f.setCustomPainter(d);f.addActionListener(t);
f.addClearListener(u);l=f.getJqUi();Q.layoutCtrl(l,15,23,230,23);e.append(l)}k();return e};this.setModel=function(l,A,M){p=l;b=A;c=M;k()};this.setCheckError=function(l){q=l};this.setFirePreviewRefreshWithOnlyRepaint=function(l){_funFirePreviewRefreshWithOnlyRepaint=l};var k=function(){if(e){b&&a.setText(b.getAlias());var l=null;c&&(l=JSON.parse(c.getValue()));f.setModel(l)}},d=function(l,A){l=l?l.text:"";A&&A.text(l);return l},t=function(l){var A=p.getSource().getSourceId(),M=p.getAssociateName(),
Y=b.getAssociateName(),K=null;(l=l.getModel())&&(K=l.value);l=com.kingdee.bos.qing.integration.ERPCloudMDDParildFilterChooseForm;l.setCallBack(v);l.openERPCloudMDDParildFilterChooseForm(A,M,Y,K)},u=function(){for(var l=0,A=p.getFilters(),M=0;M<A.length;M++){var Y=A[M];if(b.getIdField().getName()==Y.getProperty().getName()){l=M;break}}l==A.length-1&&0<=l-1&&A[l-1].setLogicOp(null);A.splice(l,1);c=null;f.setModel(null);q&&q();_funFirePreviewRefreshWithOnlyRepaint&&_funFirePreviewRefreshWithOnlyRepaint(!1)},
v=function(l){var A=l.content;l=null;A&&A.text&&(l={},l.text=A.text,l.value=A.value);l?(c||(c=new r,c.setProperty(b.getIdField()),c.setCompareType(r.COMPARE_WITH_APPOINTED),c.setCompareOp(r.COMPARE_CUSTOM_VARIABALE),c.setValueMode(r.MODE_SYS_VAR),c.setRelativeDateRange(null),A=p.getFilters(),0<A.length&&A[A.length-1].setLogicOp(r.LOGIC_AND),A.push(c)),c.setValue(JSON.stringify(l)),f.setModel(l)):u();q&&q();_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 T=com.kingdee.bos.qing.scene,B,C,E,L,Q,n,x,R,U,ca,J,N,ba,V,da,r,D,m,h,y;(function(){var e=com.kingdee.bos.qing;B=e.CodeLoader;e=com.kingdee.bos.qing.framework.common;C=e.AbstractFacade;E=e.IconsFile;L=e.MultilanguageManager.createPackageAccessor(T);
e=com.kingdee.bos.qing.common;Q=e.DomUtil;e=com.kingdee.bos.qing.ui.component;n=e.ComboBox;x=e.Label;R=e.DropdownSelector;U=e.F7Selector;ca=e.Tree;e=com.kingdee.bos.qing.data;J=e.SourceType;N=e.Icons;ba=e.AbstractBizMetaSource;V=e.AbstractImportEntityStep;da=e.AbstractFilterUIRender;r=e.FilterItem;D=e.NameVO;m=e.FolderNode;h=e.DesigntimeDataObject;y=T.DataModellingContext})();w.ERPCloudMDD="ERPCloudMDD";y.addSourceType(function(e){e(new J(w.ERPCloudMDD,L.get("ERPCloudMDD","\u91d1\u8776\u591a\u7ef4\u6570\u636e\u5e93"),
"source_ERPCloudMDD",w,!1),G,P,z,H,O)})})();(function(){function g(){com.kingdee.bos.qing.framework.common.AbstractRemoteCall.call(this);var B,C;this.getRemoteUrl=function(E){E.tag=C;return B};this.setRemoteUrl=function(E){B=E};this.setTag=function(E){C=E}}function w(B,C,E,L){P.call(this,B,C,E,L);var Q=this.protectedMethod;this.resetModel=function(){Q.remote("resetModel",{})}}"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 z=com.kingdee.bos.qing.scene,G,H,P,Z,O,X,T;(function(){var B=com.kingdee.bos.qing.framework.common;G=B.MultilanguageManager.createPackageAccessor(z);H=B.TabbedUiUtil;P=B.AbstractFacade;B=com.kingdee.bos.qing.data;Z=B.DataModelingScene;B=com.kingdee.bos.qing.common;O=B.Util;T=z.SubjectModelingFacade;X=z.DataModellingContext})();z.QHFDataModelingScene=function(){Z.call(this);var B=this,C=B.getUrlParam("tag"),
E;this.protectedGetRemoteUrl=function(){var n=O.decodeParamFromUrl(location.search,"path");return(n?n:"/ierp")+"/qing/qhfDm.do"};this.protectedImportMoreCode=function(n){n.loadJs("env.js")};this.protectedCustomInitEnv=function(){X.init(B.getRemoteImpl())};this.getRemoteImpl=function(){E||(E=new g,E.setRemoteUrl(B.protectedGetRemoteUrl()),E.setTag(C));return E};this.protectedCustomInitDesigner=function(n){n.getConductor().setDirtyListener(function(R){com.kingdee.bos.qing.integration.TabStatusHelper.setTabStatus(R)});
n.getConductor().insertToolbarButton(function(R){(R=n.getJsonModel())&&L(n,R)},"",G.get("save","\u4fdd\u5b58"));n.getConductor().insertToolbarButton(function(R){Q(n)},"",G.get("reset","\u91cd\u7f6e"));var x=G.get("closeTab","\u9000\u51fa");n.getConductor().appendToolbarButton(function(){H.closeCurrentTab()},"error_close",x)};this.protectedLoadingImpl=function(n,x,R){(new T(n,function(U){U?(x.setJsonModel(U),R(!0)):(x.setJsonModel(null),R(!1))},function(U,ca){return 1030001==U?(com.kingdee.bos.qing.framework.common.RemoteFramework.openErrorPage(U,
com.kingdee.bos.qing.common.Base64Util.encode(encodeURIComponent(ca))),!0):!1})).loadModel(C)};var L=function(n,x){(new T(B.getRemoteImpl(),function(R){n.saveAfterRefreshUploadTypeSource(R);n.getConductor().clearDirty();n.getConductor().getMessageCurtain().showSuccess(G.get("saveSuccess","\u4fdd\u5b58\u6210\u529f\u3002"))},function(R,U){return!1})).saveModel(C,x)},Q=function(n){(new w(B.getRemoteImpl(),function(x){n.setJsonModel(x);n.getConductor().clearDirty();n.getConductor().getMessageCurtain().showSuccess(G.get("resetSuccess",
"\u91cd\u7f6e\u6210\u529f\u3002"))},function(x,R){return!1})).resetModel()}}})();
//qingVersionTag: 20250807