shr.defineClass("shr.cmpdesign.SalaryAdjustQuerySchemeList", shr.framework.List, {
	initalizeDOM : function() {
		shr.cmpdesign.SalaryAdjustQuerySchemeList.superClass.initalizeDOM.call(this);
	},

	/**
	 * 启用
	 */
	enableSchemeAction:function(){
		var self = this;
		var	selectedIds = self.getSelectedIds();
		if (!selectedIds) {
			return;
		}
		shr.callHandler(
			{
				handler: "com.kingdee.shr.cmpdesign.web.handler.SalaryAdjustQuerySchemeListHandler",
				action: "enableScheme",
				param: {
					billIds:selectedIds
				},
				async: false,
				success : function(res) {
					shr.showInfo({message: "启用成功"});
					self.reloadGrid();
				}
			});
	},

	/**
	 * 禁用
	 */
	disableSchemeAction:function(){
		var self = this;
		var	selectedIds = self.getSelectedIds();
		if (!selectedIds) {
			return;
		}
		shr.callHandler(
			{
				handler: "com.kingdee.shr.cmpdesign.web.handler.SalaryAdjustQuerySchemeListHandler",
				action: "disableScheme",
				param: {
					billIds:selectedIds
				},
				async: false,
				success : function(res) {
					shr.showInfo({message: "禁用成功"});
					self.reloadGrid();
				}
			});
	},

	/**
	 * 描述:删除操作
	 * @action
	 */
	deleteAction:function(){

		var sid = $("#grid").jqGrid("getSelectedRows");
		for (var i = 0;i<sid.length; i++) {
			var item = sid[i];
			var data = $("#grid").jqGrid("getRowData", item);
			if(data.salarySchemeState == '1'){
				shr.showWarning({
					message: "选中的方案含有启用状态的数据，启用状态下的方案不可删除，请先禁用"
				});
				return;
			}

		}


		var selectedIds = this.getSelectedIds();
		if (selectedIds) {
			this.deleteRecord(selectedIds);
		}
	},



});