(function(){function U(){var w=0;this.setRefTimeInTotal=function(f){w=f};this.getRefTimeInTotal=function(){return w};this.fromJsonObject=function(f){(f=f.refTimeInTotal)&&!isNaN(f)&&(w=parseInt(f))};this.copy=function(){var f=new U;f.setRefTimeInTotal(w);return f}}"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.macro&&
(com.kingdee.bos.qing.macro={});"undefined"==typeof com.kingdee.bos.qing.macro.model&&(com.kingdee.bos.qing.macro.model={});var V=com.kingdee.bos.qing.macro.model;V.Macro=function(w){var f,e,H,O,Q,c=w,d,h,B,b,n,E,J,C,k,r;this.getMacroStatus=function(){return d};this.setMacroStatus=function(a){d=a};this.getUid=function(){return f};this.setUid=function(a){f=a};this.getFid=function(){return e};this.setFid=function(a){e=a};this.getName=function(){return H};this.setName=function(a){H=a};this.getCreatorId=
function(){return h};this.setCreatorId=function(a){h=a};this.getCreatorName=function(){return B};this.setCreatorName=function(a){B=a};this.getCreateTime=function(){return b};this.setCreateTime=function(a){b=a};this.setModifierId=function(a){n=a};this.getModifierId=function(){return n};this.setModifierName=function(a){E=a};this.getModifierName=function(){return E};this.setModifyTime=function(a){J=a};this.getModifyTime=function(){return J};this.getDesc=function(){return O};this.setDesc=function(a){O=
a};this.isMultiValued=function(){return Q};this.setMultiValued=function(a){Q=a};this.getType=function(){return c};this.setType=function(a){c=a};this.getReference=function(){return r};this.setReference=function(a){r=a};this.getRefTimeInTotal=function(){return r?r.getRefTimeInTotal():0};this.getRefTimeByOthers=function(){return r?r.getRefTimeByOthers():0};this.isUsable=function(){return d==x.AVAILABLE||d==x.PROPERTY_ABNORMAL};this.getCreateFormatTime=function(){return C};this.getModifyFormatTime=function(){return k};
this.toJsonObject=function(){var a={};a.uid=f;a.fid=e;a.name=H;a.creatorId=h;a.modifierId=n;a.desc=O;a.multiValued=Q;a.type=c;a.macroStatus=d;a.creatorName=B;a.modifierName=E;a.createTime=b&&b.getTime();a.modifyTime=J&&J.getTime();return a};this.fromJsonObject=function(a){f=a.uid;e=a.fid;H=a.name;O=a.desc;Q=a.multiValued;h=a.creatorId;n=a.modifierId;B=a.creatorName;c=a.type;d=a.macroStatus;b=new Date(a.createTime);J=new Date(a.modifyTime);C=a.createFormatTime;k=a.modifyFormatTime;E=a.modifierName;
if(a=a.reference)r=new U,r.fromJsonObject(a)};this.validateModel=function(){var a=RegExp("^[\\da-z_]+$","g");if(f){if(50<f.length)return K.get("uidTooLong","\u7f16\u7801\u4e0d\u53ef\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(0<f.indexOf(" "))return K.get("uidWithSpace","\u7f16\u7801\u4e0d\u80fd\u643a\u5e26\u7a7a\u683c\u3002");if(!a.test(f))return K.get("invalidUid","\u7f16\u7801\u5fc5\u987b\u7531\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\u3002")}else return K.get("emptyUid",
"\u8bf7\u8f93\u5165\u7f16\u7801\u3002");a=RegExp("^[\u4e00-\u9fa5A-Za-z0-9_]+$","g");if(H){if(50<H.length)return K.get("nameTooLong","\u540d\u79f0\u4e0d\u53ef\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(0<H.indexOf(" "))return K.get("nameWithSpace","\u540d\u79f0\u4e0d\u80fd\u643a\u5e26\u7a7a\u683c\u3002");if(!a.test(H))return K.get("invalidName","\u540d\u79f0\u5fc5\u987b\u7531\u4e2d\u6587\u3001\u6570\u5b57\u6216\u5b57\u6bcd\u7ec4\u6210\u3002")}else return K.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002");
return O&&50<O.length?K.get("descTooLong","\u63cf\u8ff0\u4e0d\u53ef\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):this.validateModelForType()};this.getTypeText=function(){throw Error("override me");};this.getContentText=function(){throw Error("override me");};this.getTipsText=function(){throw Error("override me");};this.getStatusWarning=function(){throw Error("override me");};this.validateModelForType=function(){throw Error("override me");}};V.PreviewData=function(){function w(){var c=[];this.getColumn=
function(d){return c[d]};this.fromJsonObject=function(d){if(d=d.columns)for(var h=0;h<d.length;h++){var B=new f;B.fromJsonObject(d[h]);c.push(B)}}}function f(){var c;this.getValue=function(){return c};this.fromJsonObject=function(d){c=d.value}}var e=0,H=[],O=[],Q=[];this.getNoPermFieldIndex=function(){return Q};this.getFieldCount=function(){return H.length};this.getFieldTitle=function(c){return H[c]};this.getTotalRowCount=function(){return e};this.getActualRowCount=function(){return O.length};this.getRow=
function(c){return O[c]};this.fromJsonObject=function(c){var d=c.fields;d&&(H=d);(d=c.totalRowCount)&&(e=d);(d=c.noPermFieldIndex)&&(Q=d);if(c=c.rows)for(d=0;d<c.length;d++){var h=new w;h.fromJsonObject(c[d]);O.push(h)}}};V.Reference=U;var x={};V.MacroStatusEnum=x;V.MacroVarAdapter=function(w){var f=this,e;this.getId=function(){return w.getUid()};this.getDisplayName=function(){return w.getName()};this.getTextInUserSQL=function(){return e?e(f):f.getDisplayName()};this.getFilterMode=function(){return"MacroVar"};
this.getVariateType=function(){return"macro_var"};this.setUserSQLFormater=function(H){e=H};this.getRawModel=function(){return w};this.isUsable=function(){return w.isUsable()}};var K=com.kingdee.bos.qing.framework.common.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.macro);x.AVAILABLE="AVAILABLE";x.NOT_EXIST="NOT_EXIST";x.DB_NOT_EXIST="DB_NOT_EXIST";x.ENTITY_NOT_EXIST="ENTITY_NOT_EXIST";x.WITHOUT_DB_PERMISSION="WITHOUT_DB_PERMISSION";x.WITHOUT_ENTITY_PERMISSION="WITHOUT_ENTITY_PERMISSION";
x.WITHOUT_DB_CENTER_PERMISSION="WITHOUT_DB_CENTER_PERMISSION";x.WITHOUT_SCHEMA_PERMISSION="WITHOUT_SCHEMA_PERMISSION";x.PROPERTY_ABNORMAL="PROPERTY_ABNORMAL";x.DB_CENTER_NO_APP_METADATA="DB_CENTER_NO_APP_METADATA";x.DB_CENTER_APP_CLOUD_DISABLED="DB_CENTER_APP_CLOUD_DISABLED";x.DB_CENTER_APP_DISABLED="DB_CENTER_APP_DISABLED";x.DB_CENTER_NO_APP="DB_CENTER_NO_APP";x.MACRO_REJECT="MACRO_REJECT"})();(function(){function U(c,d,h,B){K.call(this,c,d,h,B);var b=this.protectedMethod;this.loadAllMacros=function(){b.remote("loadAllMacros",{})};this.preview=function(n,E,J){n={model:JSON.stringify(n.toJsonObject()),macroType:E,bEditMacro:J};b.remote("preview",n)};this.loadMacroByDisplayNames=function(n){n={displayNames:JSON.stringify(n)};b.remote("loadMacroByDisplayNames",n)};this.loadMacroByUids=function(n){n={macroUids:JSON.stringify(n)};b.remote("loadMacroByUids",n)}}function V(){w.call(this);var c;
this.getRemoteUrl=function(){return c};this.setRemoteUrl=function(d){c=d}}"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.macro&&(com.kingdee.bos.qing.macro={});var x=com.kingdee.bos.qing.macro;x.MacroRuntimeFacade=U;x.RemoteImpl=V;x.DraggableAdjustingCustomExpandor=function(){KTableUIDraggableAdjustingHandler.CustomExpendor.call(this);
this.getTailBlankForDragging=function(){return 0}};var K,w,f,e,H;(function(){var c=com.kingdee.bos.qing.framework.common;K=c.AbstractFacade;w=c.AbstractRemoteCall;H=c.AbstractIcons;c=com.kingdee.bos.qing.macro.model;f=c.MacroVarAdapter;e=c.Macro})();x.MacroVarHelper=new function(){var c=this,d;this.createMacroAdapter=function(b){return b?(b=new f(b),b.setUserSQLFormater(c.getFormatText),b):null};this.setRemoteImpl=function(b){d=b};this.getFormatText=function(b){var n=b.getDisplayName();Q.put(n,b.getId());
return h(n)};this.switchSQLToPersistentMode=function(b,n){var E=[],J=RegExp("\\'\\$(.+?)\\'","g");do{var C=J.exec(b);C&&E.push(C[1])}while(null!=C);J=[];C=0;for(var k=E.length;C<k;C++){var r=E[C],a=Q.get(r);if(a)for(r=h(r),a=h(a);0<=b.indexOf(r)&&r!=a;)b=b.replace(r,a);else J.push(r)}0<J.length?(new U(B(),function(l){if(l)for(var p=0,L=l.length;p<L;p++){var D=new e;D.fromJsonObject(l[p]);var A=c.createMacroAdapter(D);D=h(A.getDisplayName());for(A=h(A.getId());0<=b.indexOf(D)&&D!=A;)b=b.replace(D,
A)}n(b)},function(l){n(b);return!0})).loadMacroByDisplayNames(J):n(b)};this.switchSQLToDisplayMode=function(b,n){var E=[],J=RegExp("\\'\\$(.+?)\\'","g");do{var C=J.exec(b);C&&E.push(C[1])}while(null!=C);(new U(B(),function(k){if(k)for(var r=0,a=k.length;r<a;r++){var l=new e;l.fromJsonObject(k[r]);var p=c.createMacroAdapter(l);l=p.getDisplayName();p=p.getId();for(var L=h(l),D=h(p);0<=b.indexOf(D)&&L!=D;)b=b.replace(D,L);Q.put(l,p)}n(b)},function(k){n(b);return!0})).loadMacroByUids(E)};this.loadVarModelAdapter=
function(b,n){if(b){var E=O.get(b);if(E)n(E);else{E=new U(B(),function(C){var k=new e;k.fromJsonObject(C[0]);C=c.createMacroAdapter(k);n(C);O.put(b,C)},function(C){if(1200003==C)return n(null),!0});var J=[b];E.setShowBlocking(!1);E.loadMacroByUids(J)}}else n(b)};var h=function(b){return"'$%s'".replace("%s",b)},B=function(){if(!d){d=new V;var b=com.kingdee.bos.qing.common.Util.decodeParamFromUrl(window.location.search,"path");d.setRemoteUrl((b?b:"/ierp")+"/qing/macroManage.do")}return d}};var O=new function(){var c=
{};this.put=function(d,h){c[d]=h};this.get=function(d){return c[d]};this.clear=function(){c={}}},Q=new function(){var c={};this.put=function(d,h){c[d]=h};this.get=function(d){return c[d]}};x.Icons=new function(){H.call(this);var c=this.protectedMethod;this.protectedInit=function(h,B){h=com.kingdee.bos.qing.macro.ComboIcon;if(!h)throw Error("com.kingdee.bos.qing.macro.ComboIcon not found.");h.define(B,"nodata");c.registIcon(0,0,"nodata");h.define(B,"icon");d(0,0,"btn_create");d(0,1,"btn_edit");d(0,
2,"btn_preview");d(0,3,"btn_delete");d(0,4,"btn_refresh");d(0,5,"btn_import");d(0,6,"btn_export");h.define(B,"macro_error");c.registIcon(0,0,"macro_error")};var d=function(h,B,b){c.registIcon(h,B,b+"_hover");c.registIcon(h+1,B,b);c.registIcon(h+2,B,b+"_disabled")}}})();(function(){function U(k,r){d.call(this);var a=this,l=this.protectedMethod,p,L=!1,D;(function(){l.setTitle(e.get("preview","\u9884\u89c8"));a.setSize(700,500);l.setSelectable(!0);l.setContentPaneCreator(function(){if(p)var A=p.getJqUi();else p=new V(k),A=p.getJqUi(),(new E(k,function(R){var F=new n;F.fromJsonObject(R);p.setModel(F);D&&D(!0)},function(R,F){D&&D(!1);switch(R){case 1200004:var N=e.get("noConnectionPerm","\u60a8\u6ca1\u6709\u9009\u62e9\u7684\u201c\u6570\u636e\u5e93\u8fde\u63a5\u201d\u7684\u6743\u9650\u3002");
break;case 1200010:N=e.get("dbConnectionNotExist","\u60a8\u9009\u62e9\u7684\u201c\u6570\u636e\u5e93\u8fde\u63a5\u201d\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002");break;case 1200013:N=e.get("noEntityPerm","\u60a8\u6ca1\u6709\u9009\u62e9\u7684\u57fa\u7840\u8d44\u6599\u7684\u6743\u9650\u3002");break;case 1200014:N=e.get("entityNotExits","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u57fa\u7840\u8d44\u6599\u4e0d\u5b58\u5728\u3002");break;case 1200015:N=e.get("macroMetadataNotExist","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u5e94\u7528\u7684\u5143\u6570\u636e\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002");
break;case 1200016:N=e.get("macroAppCloudDisabled","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u5e94\u7528\u7684\u6240\u5728\u4e91\u5df2\u88ab\u7981\u7528\u3002");break;case 1200017:N=e.get("","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u5e94\u7528\u5df2\u88ab\u7981\u7528\u3002");break;case 1200018:N=e.get("","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u5e94\u7528\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002")}N?p.showPreviewError(N):p.showPreviewError(e.get("macroCannotExe","\u8be5\u5b8f\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5b8f\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002"),
F);return!0})).preview(r,r.getType(),L);return A});l.setFooterClosingOnly(!0);l.setClosingChecker2(null,function(A){l.destroy();return!0});l.setClosingAction(function(A){})})();this.setEditMacro=function(A){L=A};this.setFunPreviewCallback=function(A){D=A}}function V(){function k(u){KTDefaultCellRender.call(this,u);var M=this,q=this.paintCellUI;this.paintCellUI=function(v,m){var y=M.getCurrentRowIdx(),z=M.getCurrentRow(),I=M.getCurrentColIdx();z=z.getUserObject();var t=l.getNoPermFieldIndex();t=!t||
-1==t.indexOf(I);M.getCurrentRowIdx()<f.getHeadRowCount()?t?0==I?($(v).css("background-color","#DFDFDF"),1==y&&(m=l.getFieldTitle(I),y=e.get("previewPkTips","\u8be5\u5b57\u6bb5\u4e3a\u5b8f\u7684\u53d6\u503c\u5b57\u6bb5\u3002"),W(y,v,m))):q(v,m):($(v).css("background-color","#DFDFDF"),1==y&&(m=l.getFieldTitle(I),y=e.get("noFieldPermTips","\u60a8\u6ca1\u6709\u6743\u9650\u67e5\u770b\u8be5\u5b57\u6bb5\u6570\u636e\u3002"),W(y,v,m))):(m=z.getColumn(I).getValue(),t||(m="***"),y=$("<div>"),y.text(m),y.attr("title",
m),y.css({"line-height":"28px","padding-left":"2px","padding-right":"2px",overflow:"hidden"}),y.appendTo(v))}}function r(u,M){var q=new h;q.setCustomPainter(function(v,m){var y=$("<div>");y.text(M);var z=$('<textarea readonly="true" ></textarea>');z.text(m);z.addClass("sa-ctrl-msgdlg-detail");z.on("click",function(){z.select()});z.addClass("extreport-dataset-designer-top-border");w.layoutCtrlWithLRTB(z,0,0,268,35,0,160);y.appendTo(v);z.appendTo(v)});q.setOptionType(h.OPTION_OK);q.setButtonText(h.OPTION_OK,
e.get("ok","\u786e\u5b9a"));q.setMessage(u);q.showDialog(300,300)}var a,l,p,L,D,A,R,F,N,P;this.setModel=function(u){if(l=u)A.hide(),R.hide();X()};this.showPreviewError=function(u,M){A.hide();R.show();F&&F.empty();F=$("<div>");var q=$("<div>");K.Icons.background(q,"macro_error");w.layoutCtrlWithLRTB(q,0,0,null,0,0,null);q.css({"background-position":"center"});R.append(q);N=$("<span>");N.text(u);N.appendTo(F);M&&(u=$("<span>"),u.text(e.get("youCan","\u60a8\u53ef\u4ee5")),u.appendTo(F),q=$("<span>"),
q.text(e.get("moreDetailBlank"," \u67e5\u770b\u8be6\u7ec6 ")),q.addClass("macro-error-darkmask-button"),q.on("click",function(v){r(M,e.get("macroCannotExe","\u8be5\u5b8f\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5b8f\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002"))}),q.appendTo(u),q=$("<span>"),q.text(e.get("fullStop","\u3002")),q.appendTo(u));F.css({"line-height":"20px",color:"#333","font-size":"14px","text-align":"center"});w.layoutCtrlWithLRTB(F,0,0,null,"68%",null,20);R.append(F)};
this.setLoadingText=function(u){A.text(u)};this.getJqUi=function(){a||G();return a};var G=function(){a=$("<div>");Y();a.append(L);D=$("<div>");w.layoutCtrlWithLRTB(D,0,0,null,0,null,20);a.append(D);D.css({"line-height":"20px",color:"#333","font-size":"12px"});A=$("<div>");w.layoutCtrlWithLRTB(A,0,0,null,-5,null,35);a.append(A);A.css({"line-height":"35px",color:"#333","font-size":"14px"});A.text(e.get("loading","\u52a0\u8f7d\u4e2d..."));l&&A.hide();R=$("<div>");a.append(R);R.hide();P&&P.unobserve();
P=new H;P.setDelay(250);P.setCallback(function(){X()});P.observe()},Y=function(){p=f.createTable();p.setColumnFitVisibleWidth(!1);p.setDraggableAdjusting(!0,f.getHeadRowCount(),0,new C);var u=new k(p);u.setOutsideVisible(!0);p.setCellRender(u);p.setSyncUIWhenModelChanged(!0);L=$(p.getUI());w.layoutCtrlWithLRTB(L,0,0,null,20,0,null)},X=function(){p||Y();if(0!=document.body.clientHeight&&0!=document.body.clientWidth){f.clear(p);if(l){var u=l.getActualRowCount();var M=l.getTotalRowCount();p.addColumns(l.getFieldCount());
for(var q=f.createHeadRow(p),v=0;v<l.getFieldCount();v++)p.getColumn(v).setWidth(120),q.getCell(v).setValue(l.getFieldTitle(v));for(v=0;v<u;v++)q=l.getRow(v),f.createRow(p).setUserObject(q);v=e.get("previewRowNum","\u5171#1\u884c").replace("#1",M);u<M&&(v+=e.get("previewRowLimit","\uff0c\u4ec5\u663e\u793a\u524d#1\u884c").replace("#1",u));D.text(v)}f.refresh(p)}},W=function(u,M,q){var v=$("<div>");v.attr("title",q);v.text(q);v.css({display:"inline-block","line-height":"20px",height:"20px"});q=new B;
q.setIconType(B.ICON_TYPE_QUESTION);q.setTipsText(u);u=q.getJqUi();u.css({display:"inline-block",margin:"3px 0 0 3px"});v.appendTo(M);u.appendTo(M)}}function x(){function k(){function F(m){KTDefaultCellRender.call(this,m);var y=this,z=this.paintCellUI;this.paintCellUI=function(I,t){var S=y.getCurrentRowIdx(),g=y.getCurrentRow(),Z=y.getCurrentColIdx(),T=g.getUserObject();g=T?T.isUsable():!1;S<f.getHeadRowCount()?z(I,t):0==Z?(t=S-f.getHeadRowCount(),S=new O,S.addCheckedListener(v),g?(g=(g=W[t])&&g.isChecked(),
(a&&a.getUid()==T.getUid()||g)&&S.setChecked(!0)):S.setEnabled(!1),W[t]=S,p.addElement(S),S.setUserObject(T),g=S.getJqUi(),w.layoutCtrl(g,12,4,23,23),g.appendTo(I)):1==Z?(t=$("<div>"),t.css({"padding-left":"2px","padding-right":"2px","line-height":"28px",overflow:"hidden"}),g||(g=$("<span class='macro-db-connection-warning'>"),g.text("!"),S=e.get("macroAbnormalTips","\u5f53\u524d\u5b8f\u5b58\u5728\u5f02\u5e38\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002"),g.attr("title",S),t.append(g)),g=$("<span>"),
g.text(T.getUid()),g.attr("title",T.getUid()),t.append(g),t.appendTo(I)):2==Z?(g=$("<div>"),g.text(T.getName()),g.attr("title",T.getName()),g.css({"padding-left":"2px","padding-right":"2px","line-height":"28px",overflow:"hidden"}),g.appendTo(I)):3==Z?(g=$("<div>"),t=T.getDesc()?T.getDesc():e.get("noDesc","\u6682\u65e0\u63cf\u8ff0"),g.text(t),g.attr("title",t),g.css({"padding-left":"2px","padding-right":"2px","line-height":"28px",overflow:"hidden"}),g.appendTo(I)):4==Z?(g=$("<div>"),t=T.isMultiValued()?
e.get("multiValued","\u591a\u503c"):e.get("singleValued","\u5355\u503c"),g.text(t),g.attr("title",t),g.css({"padding-left":"2px","padding-right":"2px","line-height":"28px",overflow:"hidden"}),g.appendTo(I)):5==Z&&(t=new c(e.get("preview","\u9884\u89c8")),g||t.setEnabled(!1),g=t.getJqUi(),g.appendTo(I),t.addActionListener(function(){(new U(R(),T)).showDialog()}),w.layoutCtrl(g,5,0,50,28),g.css("line-height","28px"))}}var N=this,P,G,Y,X,W=[],u;this.getJqUi=function(){P||(P=$("<div>"),w.layoutCtrlWithLRTB(P,
0,0,null,0,0,null),q());return P};this.getSelected=function(){for(var m=0,y=W.length;m<y;m++){var z=W[m];if(z.isChecked())return m=z.getUserObject(),J.createMacroAdapter(m)}return null};this.setRadioButtonEnabled=function(m){if(0==W.length)u=m;else for(var y=0,z=W.length;y<z;y++){var I=W[y],t=I.getUserObject();t&&t.isUsable()?I.setEnabled(m):I.setEnabled(!1)}};this.updateUi=function(){M()};var M=function(){G||q();if(0!=document.body.clientHeight||0!=document.body.clientWidth){f.clearWithoutHead(G);
if(X)for(var m=0,y=X.length;m<y;m++){var z=X[m];f.createRow(G).setUserObject(z)}f.refresh(G)}},q=function(){G=f.createTable();G.setColumnFitVisibleWidth(!1);G.setDraggableAdjusting(!0,f.getHeadRowCount(),0,new C);var m=new F(G);m.setOutsideVisible(!0);G.setCellRender(m);G.setSyncUIWhenModelChanged(!0);G.addColumns(6);G.getColumn(0).setWidth(40);G.getColumn(1).setWidth(84);G.getColumn(2).setWidth(90);G.getColumn(3).setWidth(100);G.getColumn(4).setWidth(80);G.getColumn(5).setWidth(60);m=f.createHeadRow(G);
m.getCell(1).setValue(e.get("code","\u7f16\u7801"));m.getCell(2).setValue(e.get("name","\u540d\u79f0"));m.getCell(3).setValue(e.get("desc","\u63cf\u8ff0"));m.getCell(4).setValue(e.get("returnValueType","\u8fd4\u56de\u503c"));m.getCell(5).setValue(e.get("operation","\u64cd\u4f5c"));Y=$(G.getUI());w.layoutCtrlWithLRTB(Y,0,0,null,0,0,null);Y.appendTo(P);if(!X){var y=A(function(z){for(var I=[],t=0,S=z.length;t<S;t++){var g=new b;g.fromJsonObject(z[t]);f.createRow(G).setUserObject(g);I.push(g)}X=I;0==
X.length?(Y.remove(),z=$("<div>"),z.css({"text-align":"center",color:"#ccc","font-size":"16px"}),z.text(e.get("noMyOwnMacro","\u6682\u672a\u521b\u5efa\u5b8f")),w.layoutCtrlWithLRTB(z,0,0,null,20,0,null),z.appendTo(P)):M()},null,function(){null!=u&&N.setRadioButtonEnabled(u)});setTimeout(function(){y.loadAllMacros()},0)}},v=function(m,y){m.isChecked()&&(a=m.getUserObject())}}var r,a,l,p=new Q,L;this.getJqUi=function(){r||D();return r};this.setSelected=function(F){a=F&&F.getRawModel?F.getRawModel():
null;r&&a&&l&&l.updateUi()};this.getSelectedModel=function(){return l.getSelected()};this.setEnabled=function(F){l.setRadioButtonEnabled(F)};var D=function(){r=$("<div>");r.css("border","1px solid #ccc");l=new k;l.getJqUi().appendTo(r);L&&L.unobserve();L=new H;L.setDelay(50);L.setCallback(function(){l&&l.updateUi()});L.observe()},A=function(F,N,P){return new E(R(),F,N,P)},R=function(){if(!x.oRemoteImpl)throw Error("remoteImpl unregister");return x.oRemoteImpl}}"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.macro&&(com.kingdee.bos.qing.macro={});var K=com.kingdee.bos.qing.macro;K.PreviewDialog=U;K.MacroVarSelector=x;var w,f,e,H,O,Q,c,d,h,B,b,n,E,J=K.MacroVarHelper,C=K.DraggableAdjustingCustomExpandor;(function(){var k=com.kingdee.bos.qing.common;w=k.DomUtil;k=com.kingdee.bos.qing.ui.component;O=k.RadioButton;
Q=k.RadioButtonGroup;c=k.WorkButton;d=k.AbstractModalDialog;h=k.MessageDialog;B=k.HelpIcon;k=com.kingdee.bos.qing.framework.common;e=k.MultilanguageManager.createPackageAccessor(K);H=k.WindowResizeObserver;k=com.kingdee.bos.qing.common.ui;f=k.TableUtil;k=com.kingdee.bos.qing.macro.model;b=k.Macro;n=k.PreviewData;k=com.kingdee.bos.qing.macro;E=k.MacroRuntimeFacade})();x.registerRemoteImpl=function(k){x.oRemoteImpl=k}})();
//qingVersionTag: 20250807