|
@@ -78,9 +78,11 @@ IdentifyConditionInfoDlg.collectData = function () {
|
|
|
.set('id')
|
|
|
.set('type')
|
|
|
.set('talentLevel')
|
|
|
+ .set('talentLevelCat')
|
|
|
.set('name')
|
|
|
.set('active')
|
|
|
- .set('description');
|
|
|
+ .set('description')
|
|
|
+ .set('isSalary');
|
|
|
var companys = $("#companyIds").val();
|
|
|
var bindFileTypes = $("#bindFileTypes").val();
|
|
|
var company_ids = "", bind_fts_ids = "";
|
|
@@ -117,18 +119,37 @@ IdentifyConditionInfoDlg.collectData = function () {
|
|
|
}
|
|
|
|
|
|
IdentifyConditionInfoDlg.otherValid = function () {
|
|
|
- if (this.identifyConditionInfoData.companyIds != '' && this.identifyConditionInfoData.bindFileTypes != '') {
|
|
|
- var fileTypes = this.identifyConditionInfoData.bindFileTypes.split(",");
|
|
|
- var total = fileTypes.length;
|
|
|
- var _goal = 0;
|
|
|
- for (var i = 0; i < total; i++) {
|
|
|
- var typeId = fileTypes[i];
|
|
|
- _goal += $("input[type=checkbox][value='" + typeId + "']:checked").length > 0 ? 1 : 0;
|
|
|
- }
|
|
|
- if (_goal != total) {
|
|
|
- Feng.error("选择了审核单位及审核附件后,每个附件必须与其中一个审核单位关联");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if (this.identifyConditionInfoData.companyIds == '') {
|
|
|
+ Feng.error("请选择审核单位");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.identifyConditionInfoData.bindFileTypes == '') {
|
|
|
+ Feng.error("请选择审核附件");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var companyIds = this.identifyConditionInfoData.companyIds.split(",");
|
|
|
+ var total = companyIds.length;
|
|
|
+ var _goal = 0;
|
|
|
+ for (var i = 0; i < total; i++) {
|
|
|
+ var companyId = companyIds[i];
|
|
|
+ _goal += $("input[type=checkbox][data-company-id='" + companyId + "']:checked").length > 0 ? 1 : 0;
|
|
|
+ }
|
|
|
+ if (_goal != total) {
|
|
|
+ Feng.error("存在审核单位没有成功关联附件");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var fileTypes = this.identifyConditionInfoData.bindFileTypes.split(",");
|
|
|
+ total = fileTypes.length;
|
|
|
+ _goal = 0;
|
|
|
+ for (var i = 0; i < total; i++) {
|
|
|
+ var typeId = fileTypes[i];
|
|
|
+ _goal += $("input[type=checkbox][value='" + typeId + "']:checked").length > 0 ? 1 : 0;
|
|
|
+ }
|
|
|
+ if (_goal != total) {
|
|
|
+ Feng.error("选择了审核单位及审核附件后,每个附件必须与其中一个审核单位关联");
|
|
|
+ return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
@@ -192,6 +213,16 @@ IdentifyConditionInfoDlg.onTypeChange = function () {
|
|
|
});
|
|
|
$("#bindFileTypes").trigger("chosen:updated");
|
|
|
}
|
|
|
+IdentifyConditionInfoDlg.onLayerChange = function () {
|
|
|
+ var lv = $("#talentLevel").val();
|
|
|
+ Feng.addAjaxSelect({
|
|
|
+ "id": "talentLevelCat",
|
|
|
+ "displayCode": "code",
|
|
|
+ "displayName": "name",
|
|
|
+ "type": "GET",
|
|
|
+ "url": Feng.ctxPath + "/common/api/getLayerCatsByLayer/level/" + lv
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
IdentifyConditionInfoDlg.onCompanyOrTypeChange = function () {
|
|
|
var companyIds = $("#companyIds").val();
|
|
@@ -309,6 +340,11 @@ $(function () {
|
|
|
$("select").each(function () {
|
|
|
$(this).val($(this).attr("selectVal"));
|
|
|
});
|
|
|
+ var lv = $("#talentLevel").val();
|
|
|
+ if (lv > 0) {
|
|
|
+ IdentifyConditionInfoDlg.onLayerChange();
|
|
|
+ $("#talentLevelCat").val($("#talentLevelCat").attr("selectVal"));
|
|
|
+ }
|
|
|
var companyIds = $("#companyIds").attr("selectVal");
|
|
|
if (Feng.isNotEmptyStr(companyIds)) {
|
|
|
$("#companyIds").val(companyIds.split(",")).trigger("chosen:updated");
|