shr.defineClass("shr.compensation.CmpPersonHasDynamicListExt", shr.compensation.CmpPersonHasDynamicList, {
    isSum : false,
    isSchemeItems : false,
    initalizeDOM : function () {
        var it = this;
        //this.initCustomSetting();
        shr.compensation.CmpPersonHasDynamicListExt.superClass.initalizeDOM.call(this);
//		this.initBreadcrumb();
    },


    /**
     * 直接添加需要核算员工名单
     */

    immediateAddPersonAction : function(){
        var it = this;
        var confirmMessage ="是否将已有核算员工清空后（已锁定或已审核除外）添加";
        it.showDelConfirm(confirmMessage, function(){
            it.immediateAddPersonExe(1);
        },function(){it.immediateAddPersonExe(0)});

    },


    immediateAddPersonExe : function(isDel){
        var it = this;
        var param = {isDel:isDel,cmpschemeid:it.cmpschemeid};
        it.remoteCall({
            type : "post",
            showBlock : true,
            method : "immediateAddPerson",
            param : param,
            success : function(res){
                shr.showInfo({
                    message : res.message,
                    hideAfter : 5
                });
                it.queryGrid(true);
            }
        });
    },

    // 添加args支持确认的时候的参数传递   格式如[a, b, c]  数组形式
    showDelConfirm: function(message, action, cancel, args) {
        shr.msgHideAll();
        shr.startMask();
        var msg = _top.Messenger().post({
            message: message,
            hideAfter: null,
            showCloseButton: true,
            close: function(){
                shr.stopMask();
            },
            actions: {
                retry: {
                    label: "是",
                    auto: false,
                    delay: 0,
                    showCloseButton: true,
                    action: function() {
                        shr.msgHideAll();
                        shr.stopMask();
                        if (action && $.isFunction(action)) {
                            if(args){
                                action.apply(this,args);
                            }else{
                                action.apply(this);
                            }
                        }
                    }
                },
                cancel: {
                    label: "否",
                    action: function() {
                        shr.msgHideAll();
                        shr.stopMask();
                        if (cancel && $.isFunction(cancel)) {
                            if(args){
                                cancel.apply(this,args);
                            }else{
                                cancel.apply(this);
                            }
                        } else {
                            return msg.cancel();
                        }
                    }
                }
            }
        });
        return msg;
    },

});