/**
 * 事业部项目表_负责人list.js
 */
shr.defineClass("shr.custom.BusDepProjectList", shr.framework.List, {
	initalizeDOM: function () {
		shr.custom.BusDepProjectList.superClass.initalizeDOM.call(this);
		//渲染专员提醒
		this.renderReminderContent();
	},
	/**
	 * 获得自定义过滤条件，供子类覆写使用
	 */
	getCustomFilterItems: function () {
		var billId = shr.getUrlParam('parentId');
		return "parent.id = '" + billId + "'"
	},
	/**
	 * 查看
	 */
	viewAction: function (billId, rowid) {
		// 编辑界面禁用，则直接返回
		if (this.editViewDisable) {
			return;
		}
		this.reloadPage({
			uipk: this.getEditUIPK(),
			parentId: billId,
			permItemId: shr.getCurrentPagePermItemId()
		});
	},
	/**
	 *  渲染专员提醒内容
	 */
	renderReminderContent: function () {
		var self = this;
		var parentId = shr.getUrlParam('parentId');
		var options = {
			method: "getReminderContentByBonusCycleId",
			async: false,
			param: {
				bonusCycleId: parentId
			},
			success: function (res) {
				var html = "<pre style='color:red'>" + res + "</pre>";
				$("#reminderContent").append(html);
			}
		};
		shr.remoteCall(options);
	},

	/**
	 * 获取事业部状态
	 */
	getBusDepProjectState:function(){
		var self = this;
		var parentId = shr.getUrlParam('parentId');
		var options = {
			method: "getBusDepProjectState",
			async: false,
			param: {
				bonusCycleId: parentId
			},
			success: function (res) {
				var html = "<pre style='color:red'>" + res + "</pre>";
				$("#reminderContent").append(html);
			}
		};
		shr.remoteCall(options);	
	},
	/**
	 * 返回
	 */
	backAction: function () {
		this.back();
	},
});

