shr.defineClass("shr.custom.interviewRecordEdit", shr.framework.Edit, {
	initalizeDOM: function () {
		shr.custom.interviewRecordEdit.superClass.initalizeDOM.call(this);
	},
	/**
	 * 重新加载页面
	 * @param {} params 
	 * @param {*} url 
	 */
	reloadPage: function (params, url) {
		//把考核结果id设置为参数
		var evaResultId = shr.getUrlRequestParam("evaResultId");
		if (evaResultId) {
			params.evaResultId = evaResultId;
		}
		shr.custom.interviewRecordEdit.superClass.reloadPage.call(this, params, url);
	},
	/**
	 * 校验附件
	 * @returns 
	 */
	checkAttachment: function () {
		var flag = true;
		var _self = this;
		var requiredAttachmentArr = [];
		var lastGradeLevel = $("#evaResult_lastGradeLevel").val()
		if ("C" == lastGradeLevel) {
			//等级等于C时,附件必填
			var fid = "#form" + _self.uuid;
			var attachmentUploadArea = $(fid).find(".attachmentUploadArea");
			if (attachmentUploadArea.length > 0) {
				for (var i = 0; i < attachmentUploadArea.length; i++) {
					var attachRequired = $(attachmentUploadArea[i]).find(">div[id$='_attachList']");
					for (var j = 0; j < attachRequired.length; j++) {
						var fileName = $(attachRequired[j]).prev().find('.attach_name').text();
						var rowData = $(attachRequired[j]).find("table:last").jqGrid('getRowData');
						if (rowData.length === 0 || Object.prototype.toString.call(rowData) === '[object Object]') {
							requiredAttachmentArr.push('[' + fileName + ']');
						}
					}
				}
			}
		}
		return requiredAttachmentArr;
	},
});