ibizorder-ui-service-base.ts 47.0 KB
Newer Older
1
import { Environment } from '@/environments/environment';
2 3
import { UIActionTool, Util } from '@/utils';
import axios from 'axios';
4
import AppCenterService from "@service/app/app-center-service";
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import IBIZOrderAuthService from '@/authservice/ibizorder/ibizorder-auth-service';
import GridViewLoadUILogic from './grid-view-load-ui-logic';
import OpenYuQueUILogic from './open-yu-que-ui-logic';

/**
 * 订单UI服务对象基类
 * 基于 APP/src/uiservice/%DE_PKGPATH%/%DE_PKGPATH%-ui-service-base.ts.ftl 生成
 * @export
 * @class IBIZOrderUIServiceBase
 */
export default class IBIZOrderUIServiceBase extends UIService {

    /**
     * 是否支持工作流
     * 
     * @memberof  IBIZOrderUIServiceBase
     */
    public isEnableWorkflow:boolean = false;

    /**
     * 是否支持实体主状态
     * 
     * @memberof  IBIZOrderUIServiceBase
     */
    public isEnableDEMainState:boolean = true;

    /**
     * 当前UI服务对应的数据服务对象
     * 
     * @memberof  IBIZOrderUIServiceBase
     */
    public dataService:IBIZOrderService = new IBIZOrderService();

    /**
     * 状态值
     * 
     * @memberof  IBIZOrderUIServiceBase
     */ 
    public stateValue: number = 0;

    /**
     * 状态属性
     * 
     * @memberof  IBIZOrderUIServiceBase
     */ 
    public stateField: string = "";

    /**
     * 主状态属性集合
     * 
     * @memberof  IBIZOrderUIServiceBase
     */  
    public mainStateFields:Array<any> = ['orderstate'];

    /**
     * 主状态集合Map
     * 
     * @memberof  IBIZOrderUIServiceBase
     */  
    public allDeMainStateMap:Map<string,string> = new Map();

    /**
     * 主状态操作标识Map
     * 
     * @memberof  IBIZOrderUIServiceBase
     */ 
    public allDeMainStateOPPrivsMap:Map<string,any> = new Map();

    /**
     * Creates an instance of  IBIZOrderUIServiceBase.
     * 
     * @param {*} [opts={}]
     * @memberof  IBIZOrderUIServiceBase
     */
    constructor(opts: any = {}) {
        super(opts);
        this.authService = new IBIZOrderAuthService(opts);
        this.initViewMap();
        this.initDeMainStateMap();
        this.initDeMainStateOPPrivsMap();
    }

    /**
     * 初始化视图Map
     * 
     * @memberof  IBIZOrderUIServiceBase
     */  
    public initViewMap(){
96 97 98 99 100 101 102 103 104
        this.allViewMap.set(':',{viewname:'pickuptreeview',viewType:'DEPICKUPTREEVIEW',srfappde:'ibizorders',component:'ibizorder-pickup-tree-view'});
        this.allViewMap.set(':',{viewname:'f10editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-f10-edit-view'});
        this.allViewMap.set(':',{viewname:'usr5editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-usr5-edit-view'});
        this.allViewMap.set(':',{viewname:'seditview2_layout',viewType:'DEEDITVIEW2',srfappde:'ibizorders',component:'ibizorder-sedit-view2-layout'});
        this.allViewMap.set(':',{viewname:'sgridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sgrid-view'});
        this.allViewMap.set(':',{viewname:'sf2editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-sf2-edit-view'});
        this.allViewMap.set(':',{viewname:'f9editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-f9-edit-view'});
        this.allViewMap.set(':',{viewname:'selecteditview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-select-edit-view'});
        this.allViewMap.set(':',{viewname:'dataviewexpview',viewType:'DEDATAVIEWEXPVIEW',srfappde:'ibizorders',component:'ibizorder-data-view-exp-view'});
105
        this.allViewMap.set(':',{viewname:'pluginexgridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-plugin-ex-grid-view'});
106 107 108 109 110 111
        this.allViewMap.set(':',{viewname:'sf15gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf15-grid-view'});
        this.allViewMap.set(':',{viewname:'testcustomlayoutpanelgridexpview',viewType:'DEGRIDEXPVIEW',srfappde:'ibizorders',component:'ibizorder-test-custom-layout-panel-grid-exp-view'});
        this.allViewMap.set(':',{viewname:'listview',viewType:'DELISTVIEW',srfappde:'ibizorders',component:'ibizorder-list-view'});
        this.allViewMap.set(':',{viewname:'dataviewexpview_layout',viewType:'DEDATAVIEWEXPVIEW',srfappde:'ibizorders',component:'ibizorder-data-view-exp-view-layout'});
        this.allViewMap.set(':',{viewname:'wfactionview',viewType:'DEWFACTIONVIEW',srfappde:'ibizorders',component:'ibizorder-wfaction-view'});
        this.allViewMap.set(':',{viewname:'sf4gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf4-grid-view'});
112
        this.allViewMap.set(':',{viewname:'uiactionplugingridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-uiaction-plugin-grid-view'});
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
        this.allViewMap.set(':',{viewname:'sgridview2',viewType:'DEGRIDVIEW2',srfappde:'ibizorders',component:'ibizorder-sgrid-view2'});
        this.allViewMap.set(':',{viewname:'sf5gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf5-grid-view'});
        this.allViewMap.set(':',{viewname:'usr2gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-usr2-grid-view'});
        this.allViewMap.set(':',{viewname:'seditview2',viewType:'DEEDITVIEW2',srfappde:'ibizorders',component:'ibizorder-sedit-view2'});
        this.allViewMap.set(':',{viewname:'seditview4',viewType:'DEEDITVIEW4',srfappde:'ibizorders',component:'ibizorder-sedit-view4'});
        this.allViewMap.set(':',{viewname:'testcltreeexpview',viewType:'DETREEEXPVIEW',srfappde:'ibizorders',component:'ibizorder-test-cltree-exp-view'});
        this.allViewMap.set(':',{viewname:'sf3gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf3-grid-view'});
        this.allViewMap.set('EDITVIEW:MSTAG:30',{viewname:'state30editview2',viewType:'DEEDITVIEW2',srfappde:'ibizorders',component:'ibizorder-state30-edit-view2'});
        this.allViewMap.set(':',{viewname:'f8editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-f8-edit-view'});
        this.allViewMap.set(':',{viewname:'seditview3_layout',viewType:'DEEDITVIEW3',srfappde:'ibizorders',component:'ibizorder-sedit-view3-layout'});
        this.allViewMap.set(':',{viewname:'sf20gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf20-grid-view'});
        this.allViewMap.set(':',{viewname:'usr2chartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-usr2-chart-view'});
        this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-grid-view'});
        this.allViewMap.set(':',{viewname:'wfdynaactionview',viewType:'DEWFDYNAACTIONVIEW',srfappde:'ibizorders',component:'ibizorder-wfdyna-action-view'});
        this.allViewMap.set(':',{viewname:'zdytpgridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-zdytpgrid-view'});
128
        this.allViewMap.set(':',{viewname:'ctrlpluginexgridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-ctrl-plugin-ex-grid-view'});
129 130 131 132 133 134
        this.allViewMap.set(':',{viewname:'wfstartview',viewType:'DEWFSTARTVIEW',srfappde:'ibizorders',component:'ibizorder-wfstart-view'});
        this.allViewMap.set(':',{viewname:'piechartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-pie-chart-view'});
        this.allViewMap.set(':',{viewname:'calendarexpview',viewType:'DECALENDAREXPVIEW',srfappde:'ibizorders',component:'ibizorder-calendar-exp-view'});
        this.allViewMap.set(':',{viewname:'treegridexview_layout',viewType:'DETREEGRIDEXVIEW',srfappde:'ibizorders',component:'ibizorder-tree-grid-ex-view-layout'});
        this.allViewMap.set(':',{viewname:'sf4editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-sf4-edit-view'});
        this.allViewMap.set(':',{viewname:'barchartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-bar-chart-view'});
135
        this.allViewMap.set(':',{viewname:'viewpluginexgridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-view-plugin-ex-grid-view'});
136 137 138 139 140 141
        this.allViewMap.set(':',{viewname:'editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-edit-view'});
        this.allViewMap.set(':',{viewname:'usr3editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-usr3-edit-view'});
        this.allViewMap.set(':',{viewname:'ganttview_layout',viewType:'DEGANTTVIEW',srfappde:'ibizorders',component:'ibizorder-gantt-view-layout'});
        this.allViewMap.set(':',{viewname:'linechartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-line-chart-view'});
        this.allViewMap.set(':',{viewname:'seditview4_layout',viewType:'DEEDITVIEW4',srfappde:'ibizorders',component:'ibizorder-sedit-view4-layout'});
        this.allViewMap.set(':',{viewname:'calendarexpview_layout',viewType:'DECALENDAREXPVIEW',srfappde:'ibizorders',component:'ibizorder-calendar-exp-view-layout'});
142
        this.allViewMap.set(':',{viewname:'proivateplugingridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-proivate-plugin-grid-view'});
143 144 145 146 147 148 149 150 151
        this.allViewMap.set(':',{viewname:'usr2editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-usr2-edit-view'});
        this.allViewMap.set(':',{viewname:'gridview9',viewType:'DEGRIDVIEW9',srfappde:'ibizorders',component:'ibizorder-grid-view9'});
        this.allViewMap.set(':',{viewname:'sf6gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf6-grid-view'});
        this.allViewMap.set(':',{viewname:'radarchartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-radar-chart-view'});
        this.allViewMap.set(':',{viewname:'listexpview_layout',viewType:'DELISTEXPVIEW',srfappde:'ibizorders',component:'ibizorder-list-exp-view-layout'});
        this.allViewMap.set(':',{viewname:'odsp_wfexpview',viewType:'DEWFEXPVIEW',srfappde:'ibizorders',component:'ibizorder-odsp-wfexp-view'});
        this.allViewMap.set(':',{viewname:'sf7editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-sf7-edit-view'});
        this.allViewMap.set(':',{viewname:'s2editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-s2-edit-view'});
        this.allViewMap.set(':',{viewname:'areachartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-area-chart-view'});
152
        this.allViewMap.set('REDIRECTVIEW:',{viewname:'redirectview',viewType:'DEREDIRECTVIEW',srfappde:'ibizorders',component:'ibizorder-redirect-view'});
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
        this.allViewMap.set(':',{viewname:'testclchartview',viewType:'DECHARTVIEW',srfappde:'ibizorders',component:'ibizorder-test-clchart-view'});
        this.allViewMap.set(':',{viewname:'f19editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-f19-edit-view'});
        this.allViewMap.set(':',{viewname:'f17editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-f17-edit-view'});
        this.allViewMap.set(':',{viewname:'seditview3',viewType:'DEEDITVIEW3',srfappde:'ibizorders',component:'ibizorder-sedit-view3'});
        this.allViewMap.set(':',{viewname:'listexpview',viewType:'DELISTEXPVIEW',srfappde:'ibizorders',component:'ibizorder-list-exp-view'});
        this.allViewMap.set(':',{viewname:'ganttview',viewType:'DEGANTTVIEW',srfappde:'ibizorders',component:'ibizorder-gantt-view'});
        this.allViewMap.set(':',{viewname:'pickupgridview',viewType:'DEPICKUPGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-pickup-grid-view'});
        this.allViewMap.set(':',{viewname:'seditview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-sedit-view'});
        this.allViewMap.set(':',{viewname:'testcleditview2',viewType:'DEEDITVIEW2',srfappde:'ibizorders',component:'ibizorder-test-cledit-view2'});
        this.allViewMap.set(':',{viewname:'treegridexview',viewType:'DETREEGRIDEXVIEW',srfappde:'ibizorders',component:'ibizorder-tree-grid-ex-view'});
        this.allViewMap.set('EDITVIEW:MSTAG:10',{viewname:'state10editview2',viewType:'DEEDITVIEW2',srfappde:'ibizorders',component:'ibizorder-state10-edit-view2'});
        this.allViewMap.set(':',{viewname:'usr4editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-usr4-edit-view'});
        this.allViewMap.set(':',{viewname:'treeexpview',viewType:'DETREEEXPVIEW',srfappde:'ibizorders',component:'ibizorder-tree-exp-view'});
        this.allViewMap.set(':',{viewname:'sf1editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-sf1-edit-view'});
        this.allViewMap.set('EDITVIEW:MSTAG:40',{viewname:'state40editview2',viewType:'DEEDITVIEW2',srfappde:'ibizorders',component:'ibizorder-state40-edit-view2'});
        this.allViewMap.set(':',{viewname:'sf1gridview',viewType:'DEGRIDVIEW',srfappde:'ibizorders',component:'ibizorder-sf1-grid-view'});
        this.allViewMap.set(':',{viewname:'treeexpview_layout',viewType:'DETREEEXPVIEW',srfappde:'ibizorders',component:'ibizorder-tree-exp-view-layout'});
        this.allViewMap.set(':',{viewname:'testlogiccustomview',viewType:'DECUSTOMVIEW',srfappde:'ibizorders',component:'ibizorder-test-logic-custom-view'});
        this.allViewMap.set(':',{viewname:'gridexpview',viewType:'DEGRIDEXPVIEW',srfappde:'ibizorders',component:'ibizorder-grid-exp-view'});
        this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',viewType:'DEPICKUPVIEW',srfappde:'ibizorders',component:'ibizorder-pickup-view'});
        this.allViewMap.set(':',{viewname:'tabexpview',viewType:'DETABEXPVIEW',srfappde:'ibizorders',component:'ibizorder-tab-exp-view'});
        this.allViewMap.set(':',{viewname:'usr2calendarexpview',viewType:'DECALENDAREXPVIEW',srfappde:'ibizorders',component:'ibizorder-usr2-calendar-exp-view'});
        this.allViewMap.set(':',{viewname:'dashboardview',viewType:'DEPORTALVIEW',srfappde:'ibizorders',component:'ibizorder-dashboard-view'});
        this.allViewMap.set(':',{viewname:'f13editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-f13-edit-view'});
        this.allViewMap.set(':',{viewname:'sf3editview',viewType:'DEEDITVIEW',srfappde:'ibizorders',component:'ibizorder-sf3-edit-view'});
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
    }

    /**
     * 初始化主状态集合
     * 
     * @memberof  IBIZOrderUIServiceBase
     */  
    public initDeMainStateMap(){
        this.allDeMainStateMap.set('10','10');
        this.allDeMainStateMap.set('30','30');
        this.allDeMainStateMap.set('40','40');
    }

    /**
     * 初始化主状态操作标识
     * 
     * @memberof  IBIZOrderUIServiceBase
     */  
    public initDeMainStateOPPrivsMap(){
        this.allDeMainStateOPPrivsMap.set('10',Object.assign({'CREATE':1,'DELETE':1,'READ':1,'UPDATE':1},{}));
        this.allDeMainStateOPPrivsMap.set('30',Object.assign({'CREATE':1,'DELETE':1,'READ':1,'UPDATE':1},{}));
        this.allDeMainStateOPPrivsMap.set('40',Object.assign({'CREATE':1,'DELETE':1,'READ':1,'UPDATE':1},{}));
    }

202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
        /**
     * 界面行为插件示例
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
    public async IBIZOrder_ActionPluginEx(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
        let data: any = {};
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'SINGLEKEY';
        if (_args && args[0] && args[0]['ibizorderid']) {
            Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
        } else {
            Object.assign(tempContext, { ibizorder: '%ibizorder%' });
        }
        Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
        Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
        tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
        Object.assign(context, tempContext);
        Object.assign(params, data);
        let parentObj:any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
        Object.assign(context, parentObj);
        const openPopupApp = (url: string) => {
            window.open(url, '_blank');
            return { ok: true, result: _args };
        }
        const url = `https://www.yuque.com/ibiz/zmg893`;
        return openPopupApp(url);
    }

247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
        /**
     * 单数据主键保存
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
    public async IBIZOrder_BUIAction1(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
        let data: any = {};
262 263 264
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
265 266 267
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'SINGLEKEY';
268 269 270 271
        if (_args && args[0] && args[0]['ibizorderid']) {
            Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
        } else {
            Object.assign(tempContext, { ibizorder: '%ibizorder%' });
272
        }
273 274 275 276 277
        Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
        Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
        Object.assign(tempContext, {CONTEXTPARAM1:"%ibizorderid%"});
        Object.assign(tempViewParam, {param2:"%ibizorderid%"});
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
278
        data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
279
        if (Object.is(actionTarget, "MULTIKEY")) {
280
            let tempDataArray:Array<any> = [];
281 282 283
            if ((_args.length > 1) && (Object.keys(data).length > 0)) {
                for(let i =0; i < _args.length; i++){
                    let tempObject: any = {};
284
                    Object.keys(data).forEach((key:string) =>{
285
                        Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
286 287 288
                    })
                    tempDataArray.push(tempObject);
                }
289
            } else {
290 291 292 293
                tempDataArray.push(data);
            }
            data = tempDataArray;
        }
294 295 296 297 298
        Object.assign(context, tempContext);
        let parentObj: any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
299
        if(!Object.is(actionTarget,"MULTIKEY")){
300
            Object.assign(data, parentObj);
301
        }
302
        Object.assign(context, parentObj);
303 304
        // 直接调实体服务需要转换的数据
        if(context && context.srfsessionid){
305
            context.srfsessionkey = context.srfsessionid;
306 307 308
            delete context.srfsessionid;
        }
        const backend = () => {
309 310
            if (xData && xData.formValidateStatus instanceof Function) {
                if (!xData.formValidateStatus()) {
311
                    actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
312 313 314 315 316 317 318
                    return;
                }
            }
            const curService: IBIZOrderService =  new IBIZOrderService();
            let promise: any = curService['Update'](context, data);
            promise.then(async (response: any) => {
                if ((!response || response.status !== 200) && !Array.isArray(response)) {
319 320 321
                    actionContext.$Notice.error({ title: '错误', desc: response.message });
                    return;
                }
322 323 324 325 326 327 328
                let { data } = response;
                if (Array.isArray(response) && response.length > 0) {
                    data = [];
                    response.forEach((item: any) => {
                        data.push(item.data);
                    })
                }
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
                actionContext.$Notice.success({ title: '成功', desc: '后台界面行为(保存)执行成功' });
            }).catch((response: any) => {
                if (response && response.status && response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
                    return;
                }
                if (!response || !response.status || !response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
                    return;
                }
                return response;
            });
        };
        backend();
    }

        /**
     * 删除
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
    public async IBIZOrder_Delete(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
        let data: any = {};
360 361 362
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
363 364 365
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'SINGLEKEY';
366 367 368 369
        if (_args && args[0] && args[0]['ibizorderid']) {
            Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
        } else {
            Object.assign(tempContext, { ibizorder: '%ibizorder%' });
370
        }
371 372 373
        Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
        Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
374
        data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
375
        if (Object.is(actionTarget, "MULTIKEY")) {
376
            let tempDataArray:Array<any> = [];
377 378 379
            if ((_args.length > 1) && (Object.keys(data).length > 0)) {
                for(let i =0; i < _args.length; i++){
                    let tempObject: any = {};
380
                    Object.keys(data).forEach((key:string) =>{
381
                        Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
382 383 384
                    })
                    tempDataArray.push(tempObject);
                }
385
            } else {
386 387 388 389
                tempDataArray.push(data);
            }
            data = tempDataArray;
        }
390 391 392 393 394
        Object.assign(context, tempContext);
        let parentObj: any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
395
        if(!Object.is(actionTarget,"MULTIKEY")){
396
            Object.assign(data, parentObj);
397
        }
398
        Object.assign(context, parentObj);
399 400
        // 直接调实体服务需要转换的数据
        if(context && context.srfsessionid){
401
            context.srfsessionkey = context.srfsessionid;
402 403 404
            delete context.srfsessionid;
        }
        const backend = () => {
405 406
            if (xData && xData.formValidateStatus instanceof Function) {
                if (!xData.formValidateStatus()) {
407
                    actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
408 409 410 411 412 413 414
                    return;
                }
            }
            const curService: IBIZOrderService =  new IBIZOrderService();
            let promise: any = curService['Remove'](context, data);
            promise.then(async (response: any) => {
                if ((!response || response.status !== 200) && !Array.isArray(response)) {
415 416 417
                    actionContext.$Notice.error({ title: '错误', desc: response.message });
                    return;
                }
418 419 420 421 422 423 424
                let { data } = response;
                if (Array.isArray(response) && response.length > 0) {
                    data = [];
                    response.forEach((item: any) => {
                        data.push(item.data);
                    })
                }
425 426 427 428
                actionContext.$Notice.success({ title: '成功', desc: '成功删除数据!' });
                if (xData && xData.refresh && xData.refresh instanceof Function) {
                    xData.refresh(args);
                }
429
                if (xData && xData.getControlType instanceof Function && xData.getControlType() == 'FORM') {
430
                    AppCenterService.notifyMessage({ name: "IBIZOrder", action: 'appRefresh', data: args });
431
                }
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
            }).catch((response: any) => {
                if (response && response.status && response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
                    return;
                }
                if (!response || !response.status || !response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
                    return;
                }
                return response;
            });
        };
        backend();
    }

        /**
     * 前台界面行为(编辑)
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
460
    public async IBIZOrder_FUIAction1(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
461
        let data: any = {};
462 463 464
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
465 466 467
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'NONE';
468 469 470 471 472 473 474 475 476 477 478
        Object.assign(tempContext, {IBIZORDERID:"15c8e85a50dae2893c26945df5b58e4e",CONTEXTPARAM1:"%ibizorderid%",IBIZORDER:"15c8e85a50dae2893c26945df5b58e4e"});
        Object.assign(tempViewParam, {param2:"%ibizorderid%"});
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
        tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
        Object.assign(context, tempContext);
        Object.assign(params, data);
        let parentObj:any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
        Object.assign(context, parentObj);
479 480 481 482 483 484 485 486
        let deResParameters: any[] = [];
        const parameters: any[] = [
            { pathName: 'ibizorders', parameterName: 'ibizorder' },
            { pathName: 'editview', parameterName: 'editview' },
        ];
        const openIndexViewTab = (data: any) => {
            const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
            actionContext.$router.push(routePath);
487
            //  后续界面行为
488
            return { ok: true, result: args };
489
        }
490
        return openIndexViewTab(data);
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507
    }

        /**
     * 删除
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
    public async IBIZOrder_ZDYUpdate(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
        let data: any = {};
508 509 510
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
511 512 513
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'SINGLEKEY';
514 515 516 517
        if (_args && args[0] && args[0]['ibizorderid']) {
            Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
        } else {
            Object.assign(tempContext, { ibizorder: '%ibizorder%' });
518
        }
519 520 521
        Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
        Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
522
        data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
523
        if (Object.is(actionTarget, "MULTIKEY")) {
524
            let tempDataArray:Array<any> = [];
525 526 527
            if ((_args.length > 1) && (Object.keys(data).length > 0)) {
                for(let i =0; i < _args.length; i++){
                    let tempObject: any = {};
528
                    Object.keys(data).forEach((key:string) =>{
529
                        Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
530 531 532
                    })
                    tempDataArray.push(tempObject);
                }
533
            } else {
534 535 536 537
                tempDataArray.push(data);
            }
            data = tempDataArray;
        }
538 539 540 541 542
        Object.assign(context, tempContext);
        let parentObj: any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
543
        if(!Object.is(actionTarget,"MULTIKEY")){
544
            Object.assign(data, parentObj);
545
        }
546
        Object.assign(context, parentObj);
547 548
        // 直接调实体服务需要转换的数据
        if(context && context.srfsessionid){
549
            context.srfsessionkey = context.srfsessionid;
550 551 552
            delete context.srfsessionid;
        }
        const backend = () => {
553 554
            if (xData && xData.formValidateStatus instanceof Function) {
                if (!xData.formValidateStatus()) {
555
                    actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
556 557 558 559 560 561 562
                    return;
                }
            }
            const curService: IBIZOrderService =  new IBIZOrderService();
            let promise: any = curService['Remove'](context, data);
            promise.then(async (response: any) => {
                if ((!response || response.status !== 200) && !Array.isArray(response)) {
563 564 565
                    actionContext.$Notice.error({ title: '错误', desc: response.message });
                    return;
                }
566 567 568 569 570 571 572
                let { data } = response;
                if (Array.isArray(response) && response.length > 0) {
                    data = [];
                    response.forEach((item: any) => {
                        data.push(item.data);
                    })
                }
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603
                actionContext.$Notice.success({ title: '成功', desc: '删除成功!' });
            }).catch((response: any) => {
                if (response && response.status && response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
                    return;
                }
                if (!response || !response.status || !response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
                    return;
                }
                return response;
            });
        };
        backend();
    }

        /**
     * 多项数据主键保存
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
    public async IBIZOrder_mulUpdate(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
        let data: any = {};
604 605 606
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
607 608 609
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'MULTIKEY';
610 611 612 613
        if (_args && args[0] && args[0]['ibizorderid']) {
            Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
        } else {
            Object.assign(tempContext, { ibizorder: '%ibizorder%' });
614
        }
615 616 617 618
        Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
        Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
        Object.assign(tempViewParam, {ordertype:"%ordertype%",orderstate:"%orderstate%"});
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
619
        data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
620
        if (Object.is(actionTarget, "MULTIKEY")) {
621
            let tempDataArray:Array<any> = [];
622 623 624
            if ((_args.length > 1) && (Object.keys(data).length > 0)) {
                for(let i =0; i < _args.length; i++){
                    let tempObject: any = {};
625
                    Object.keys(data).forEach((key:string) =>{
626
                        Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
627 628 629
                    })
                    tempDataArray.push(tempObject);
                }
630
            } else {
631 632 633 634
                tempDataArray.push(data);
            }
            data = tempDataArray;
        }
635 636 637 638 639
        Object.assign(context, tempContext);
        let parentObj: any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
640
        if(!Object.is(actionTarget,"MULTIKEY")){
641
            Object.assign(data, parentObj);
642
        }
643
        Object.assign(context, parentObj);
644 645
        // 直接调实体服务需要转换的数据
        if(context && context.srfsessionid){
646
            context.srfsessionkey = context.srfsessionid;
647 648 649
            delete context.srfsessionid;
        }
        const backend = () => {
650 651
            if (xData && xData.formValidateStatus instanceof Function) {
                if (!xData.formValidateStatus()) {
652
                    actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
653 654 655 656
                    return;
                }
            }
            const curService: IBIZOrderService =  new IBIZOrderService();
657
            const promiseArray: any[] = [];
658 659 660 661
            if (data && data.length > 0) {
                const srfkeys = context['ibizorder'] ? context['ibizorder'].split(',') : [];
                data.forEach((ele: any, index: number) => {
                    const tempContext = Util.deepCopy(context);
662
                    Object.assign(tempContext, { ibizorder: srfkeys[index] });
663 664 665 666 667 668
                    promiseArray.push(curService['MulUpdate'](tempContext, ele));
                })
            }
            let promise: any = Promise.all(promiseArray);
            promise.then(async (response: any) => {
                if ((!response || response.status !== 200) && !Array.isArray(response)) {
669 670 671
                    actionContext.$Notice.error({ title: '错误', desc: response.message });
                    return;
                }
672 673 674 675 676 677 678
                let { data } = response;
                if (Array.isArray(response) && response.length > 0) {
                    data = [];
                    response.forEach((item: any) => {
                        data.push(item.data);
                    })
                }
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707
                actionContext.$Notice.success({ title: '成功', desc: '批量修改成功' });
            }).catch((response: any) => {
                if (response && response.status && response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
                    return;
                }
                if (!response || !response.status || !response.data) {
                    actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
                    return;
                }
                return response;
            });
        };
        backend();
    }

        /**
     * 打开文档
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
708
    public async IBIZOrder_open_document(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
709
        let data: any = {};
710 711 712
        let tempData: any = {};
        let tempContext: any = {};
        let tempViewParam: any = {};
713 714 715
        const _this: any = actionContext;
        const _args: any[] = Util.deepCopy(args);
        const actionTarget: string | null = 'NONE';
716 717 718 719 720 721 722 723 724
        tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
        tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
        Object.assign(context, tempContext);
        Object.assign(params, data);
        let parentObj:any = {
            srfparentdename: srfParentDeName ? srfParentDeName : null,
            srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
        };
        Object.assign(context, parentObj);
725 726
        const openPopupApp = (url: string) => {
            window.open(url, '_blank');
727
            return { ok: true, result: _args };
728 729
        }
        const url = `https://www.yuque.com/ibiz/wuf19n/cwqg10`;
730
        return openPopupApp(url);
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
    }

        /**
     * 界面逻辑
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
746
    public async IBIZOrder_panel_A424afda77415fcfb6f_button_calluilogic16_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764
        const _context: any = Object.assign(context, actionContext.context);
        const _params: any = Object.assign(params, actionContext.viewparams);
        return this.executeUILogic('OpenYuQue', args, _context, _params, $event, xData, actionContext, srfParentDeName);
    }

        /**
     * 语雀文档
     *
     * @param {any[]} args 当前数据
     * @param {any} context 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @param {*} [srfParentDeName] 父实体名称
     * @returns {Promise<any>}
     * @memberof IBIZOrderUIService
     */
765
    public async IBIZOrder_panel_Usr1102678360_open_yuque_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
766 767 768 769 770 771 772 773 774 775 776
        const _context: any = Object.assign(context, actionContext.context);
        const _params: any = Object.assign(params, actionContext.viewparams);
        return this.executeUILogic('OpenYuQue', args, _context, _params, $event, xData, actionContext, srfParentDeName);
    }


    /**
     * 获取指定数据的重定向页面
     * 
     * @param srfkey 数据主键
     * @param isEnableWorkflow  重定向视图是否需要处理流程中的数据
777
     * @param args  {context,viewParams} 用于计算流程   
778 779
     * @memberof  IBIZOrderUIServiceBase
     */
780
    public async getRDAppView(srfkey:string,isEnableWorkflow:boolean,args?:any){
781 782 783 784 785 786 787 788 789
        this.isEnableWorkflow = isEnableWorkflow;
        // 进行数据查询
        let result:any = await this.dataService.Get({ibizorder:srfkey});
        const curData:any = result.data;
        //判断当前数据模式,默认为true,todo
        const iRealDEModel:boolean = true;
        let bDataInWF:boolean = false;
		let bWFMode:any = false;
		if (this.isEnableWorkflow) {
790 791 792 793
            return this.getWFView();
        } else {
            if ((args && args.viewParam && args.viewParam.srfwf && this.InWorkflowArray.indexOf(args.viewParam.srfwf) !== -1)) {
                return this.getWFView();
794
            }
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926
        }
        let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
        return this.allViewMap.get(strPDTViewParam);
    }

    /**
	 * 获取实际的数据类型
     * 
     * @memberof  IBIZOrderUIServiceBase
	 */
	public getRealDEType(entity:any){

    }

    /**
     * 获取实体单数据实体视图预定义参数
     * 
     * @param curData 当前数据
     * @param bDataInWF 是否有数据在工作流中
     * @param bWFMode   是否工作流模式
     * @memberof  IBIZOrderUIServiceBase
     */
    public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
        let strPDTParam:string = '';
		if (bDataInWF) {
			// 判断数据是否在流程中
        }
        //多表单,todo
        const multiFormDEField:string|null =null;

        if (multiFormDEField) {
			const objFormValue:string = curData[multiFormDEField];
			if(!Environment.isAppMode){
				return 'MOBEDITVIEW:'+objFormValue;
			}
			return 'EDITVIEW:'+objFormValue;
        }
		if(!Environment.isAppMode){
            if(this.getDEMainStateTag(curData)){
                return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
            }
			return 'MOBEDITVIEW:';
        }
        if(this.getDEMainStateTag(curData)){
            return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
        }
		return 'EDITVIEW:';
    }

    /**
     * 获取数据对象的主状态标识
     * 
     * @param curData 当前数据
     * @memberof  IBIZOrderUIServiceBase
     */  
    public getDEMainStateTag(curData:any){
        if(this.mainStateFields.length === 0) return null;

        this.mainStateFields.forEach((singleMainField:any) =>{
            if(!(singleMainField in curData)){
                console.warn(`当前数据对象不包含属性「${singleMainField}」,根据「${singleMainField}」属性进行的主状态计算默认为空值`);
            }
        })
        for (let i = 0; i <= 1; i++) {
            let strTag:string = (curData[this.mainStateFields[0]] != null && curData[this.mainStateFields[0]] !== "")?(i == 0) ? `${curData[this.mainStateFields[0]]}` : "":"";
            if (this.mainStateFields.length >= 2) {
                for (let j = 0; j <= 1; j++) {
                    let strTag2:string = (curData[this.mainStateFields[1]] != null && curData[this.mainStateFields[1]] !== "")?`${strTag}__${(j == 0) ? `${curData[this.mainStateFields[1]]}` : ""}`:strTag;
                    if (this.mainStateFields.length >= 3) {
                        for (let k = 0; k <= 1; k++) {
                            let strTag3:string = (curData[this.mainStateFields[2]] != null && curData[this.mainStateFields[2]] !== "")?`${strTag2}__${(k == 0) ? `${curData[this.mainStateFields[2]]}` : ""}`:strTag2;
                            // 判断是否存在
                            return this.allDeMainStateMap.get(strTag3);
                        }
                    }else{
                        return this.allDeMainStateMap.get(strTag2);
                    }
                }
            }else{
                return this.allDeMainStateMap.get(strTag);
            }
        }
        return null;
    }

    /**
     * 获取数据对象当前操作标识
     * 
     * @param data 当前数据
     * @memberof  IBIZOrderUIServiceBase
     */  
    public getDEMainStateOPPrivs(data:any){
        if(this.getDEMainStateTag(data)){
            return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
        }else{
            return null;
        }
    }

    /**
     * 获取数据对象所有的操作标识
     * 
     * @param data 当前数据
     * @memberof  IBIZOrderUIServiceBase
     */ 
    public getAllOPPrivs(data:any){
       return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
    }

    /**
     * 执行界面逻辑
     *
     * @param {string} name
     * @param {any[]} args
     * @param {*} [context={}]
     * @param {*} [params={}]
     * @param {*} [$event]
     * @param {*} [xData]
     * @param {*} [actionContext]
     * @param {string} [srfParentDeName]
     * @memberof UIService
     */
    public async executeUILogic(name: string, args: any[], context?: any, params?: any, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string | undefined): Promise<any> {
        if (name === 'GridViewLoad') {
            return await GridViewLoadUILogic.getInstance().execute(args, context, params, $event, xData, actionContext, srfParentDeName);
        }
        if (name === 'OpenYuQue') {
            return await OpenYuQueUILogic.getInstance().execute(args, context, params, $event, xData, actionContext, srfParentDeName);
        }
    } 

}