|
@@ -2,38 +2,38 @@
|
|
|
* 初始化人才认定申报详情对话框
|
|
|
*/
|
|
|
var TalentAllowanceInfoDlg = {
|
|
|
- talentAllowanceData : {}
|
|
|
+ talentAllowanceData: {}
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 关闭此对话框
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.close = function() {
|
|
|
+TalentAllowanceInfoDlg.close = function () {
|
|
|
parent.layer.close(window.parent.TalentAllowanceInfo.layerIndex);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 初始化工作单位及核查项目情况表
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.initContract = function(){
|
|
|
+TalentAllowanceInfoDlg.initContract = function () {
|
|
|
$("#projectTable").bootstrapTable({
|
|
|
url: Feng.ctxPath + "/admin/talentAllowance/findAllowanceContractDetail",
|
|
|
method: 'POST',
|
|
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
- search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
|
- showRefresh: false, // 是否显示刷新按钮
|
|
|
- clickToSelect: true, // 是否启用点击选中行
|
|
|
- singleSelect: true, // 设置True 将禁止多选
|
|
|
- striped: true, // 是否显示行间隔色
|
|
|
+ search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
|
+ showRefresh: false, // 是否显示刷新按钮
|
|
|
+ clickToSelect: true, // 是否启用点击选中行
|
|
|
+ singleSelect: true, // 设置True 将禁止多选
|
|
|
+ striped: true, // 是否显示行间隔色
|
|
|
escape: true,
|
|
|
- pagination: false, // 设置为 true 会在表格底部显示分页条
|
|
|
+ pagination: false, // 设置为 true 会在表格底部显示分页条
|
|
|
paginationHAlign: "left",
|
|
|
paginationDetailHAlign: "right",
|
|
|
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
|
|
|
+ sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
|
|
|
showColumns: false,
|
|
|
- detailView: true,//父子表
|
|
|
+ detailView: true, //父子表
|
|
|
queryParams: function (params) {
|
|
|
- return $.extend({"mainId":$("#id").val()},params)
|
|
|
+ return $.extend({"mainId": $("#id").val()}, params)
|
|
|
},
|
|
|
columns: TalentAllowanceInfoDlg.initContractColumns(),
|
|
|
onPostBody: function () {
|
|
@@ -46,29 +46,29 @@ TalentAllowanceInfoDlg.initContract = function(){
|
|
|
$("#projectTable").bootstrapTable('expandAllRows');
|
|
|
},
|
|
|
onExpandRow: function (index, row, $detail) {
|
|
|
- var enterpriseId = row.enterpriseId+index;
|
|
|
- var cur_table = $detail.html('<table id="'+enterpriseId+'"></table>').find('table');
|
|
|
+ var enterpriseId = row.enterpriseId + index;
|
|
|
+ var cur_table = $detail.html('<table id="' + enterpriseId + '"></table>').find('table');
|
|
|
$(cur_table).bootstrapTable({
|
|
|
url: Feng.ctxPath + "/admin/talentAllowance/findAllowanceProject",
|
|
|
method: 'POST',
|
|
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
- search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
|
- showRefresh: false, // 是否显示刷新按钮
|
|
|
- clickToSelect: true, // 是否启用点击选中行
|
|
|
- singleSelect: true, // 设置True 将禁止多选
|
|
|
- striped: true, // 是否显示行间隔色
|
|
|
+ search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
|
+ showRefresh: false, // 是否显示刷新按钮
|
|
|
+ clickToSelect: true, // 是否启用点击选中行
|
|
|
+ singleSelect: true, // 设置True 将禁止多选
|
|
|
+ striped: true, // 是否显示行间隔色
|
|
|
escape: true,
|
|
|
- pagination: false, // 设置为 true 会在表格底部显示分页条
|
|
|
+ pagination: false, // 设置为 true 会在表格底部显示分页条
|
|
|
paginationHAlign: "left",
|
|
|
paginationDetailHAlign: "right",
|
|
|
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
|
|
|
+ sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
|
|
|
showColumns: false,
|
|
|
queryParams: function (params) {
|
|
|
var companyCode = "";
|
|
|
- if($("#process").val()==1){
|
|
|
+ if ($("#process").val() == 1) {
|
|
|
companyCode = $("#companyCode").val();
|
|
|
}
|
|
|
- return $.extend({"mainId":$("#id").val(),"baseId":row.id,"companyCode":companyCode},params)
|
|
|
+ return $.extend({"mainId": $("#id").val(), "baseId": row.id, "companyCode": companyCode}, params)
|
|
|
},
|
|
|
onPostBody: function () {
|
|
|
$("td.uitd_showTip").bind("mouseover", function () {
|
|
@@ -79,7 +79,7 @@ TalentAllowanceInfoDlg.initContract = function(){
|
|
|
onLoadSuccess: function (data) {
|
|
|
$(".imgs").viewer({
|
|
|
// toolbar:false,
|
|
|
- fullscreen:false
|
|
|
+ fullscreen: false
|
|
|
});
|
|
|
},
|
|
|
columns: TalentAllowanceInfoDlg.initProjectColumns(enterpriseId),
|
|
@@ -92,25 +92,25 @@ TalentAllowanceInfoDlg.initContract = function(){
|
|
|
/**
|
|
|
* 初始化人才层次
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.initArrange = function(){
|
|
|
+TalentAllowanceInfoDlg.initArrange = function () {
|
|
|
$("#arrangeTable").bootstrapTable({
|
|
|
url: Feng.ctxPath + "/admin/talentAllowance/findAllowanceArrange",
|
|
|
method: 'POST',
|
|
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
- search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
|
- showRefresh: false, // 是否显示刷新按钮
|
|
|
- clickToSelect: true, // 是否启用点击选中行
|
|
|
- singleSelect: true, // 设置True 将禁止多选
|
|
|
- striped: true, // 是否显示行间隔色
|
|
|
+ search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
|
+ showRefresh: false, // 是否显示刷新按钮
|
|
|
+ clickToSelect: true, // 是否启用点击选中行
|
|
|
+ singleSelect: true, // 设置True 将禁止多选
|
|
|
+ striped: true, // 是否显示行间隔色
|
|
|
escape: true,
|
|
|
- pagination: false, // 设置为 true 会在表格底部显示分页条
|
|
|
+ pagination: false, // 设置为 true 会在表格底部显示分页条
|
|
|
paginationHAlign: "left",
|
|
|
paginationDetailHAlign: "right",
|
|
|
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
|
|
|
+ sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
|
|
|
showColumns: false,
|
|
|
pageList: [10, 30, 50],
|
|
|
queryParams: function (params) {
|
|
|
- return $.extend({"mainId":$("#id").val()},params)
|
|
|
+ return $.extend({"mainId": $("#id").val()}, params)
|
|
|
},
|
|
|
columns: TalentAllowanceInfoDlg.initArrangeColumn(),
|
|
|
onPostBody: function () {
|
|
@@ -123,61 +123,61 @@ TalentAllowanceInfoDlg.initArrange = function(){
|
|
|
}
|
|
|
|
|
|
//显示修改工作单位合同情况模态框
|
|
|
-TalentAllowanceInfoDlg.showEditContractModel = function(id){
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function(data){
|
|
|
- if(data.code==200){
|
|
|
+TalentAllowanceInfoDlg.showEditContractModel = function (id) {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
$("#contractForm")[0].reset();
|
|
|
$("#contractId").val(id);
|
|
|
- $(".date").each(function(){
|
|
|
- laydate.render({elem: "#"+$(this).attr("id"),type: 'date',trigger: 'click'});
|
|
|
+ $(".date").each(function () {
|
|
|
+ laydate.render({elem: "#" + $(this).attr("id"), type: 'date', trigger: 'click'});
|
|
|
});
|
|
|
$("#contractModal").modal("show");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("type",1);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
- ajax.set("companyId",$("#companyId").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("type", 1);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
+ ajax.set("companyId", $("#companyId").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
|
//修改合同起止时间提交
|
|
|
-TalentAllowanceInfoDlg.editContract = function(){
|
|
|
+TalentAllowanceInfoDlg.editContract = function () {
|
|
|
var id = $("#contractId").val();
|
|
|
var startTime = $("#startTime").val();
|
|
|
var endTime = $("#endTime").val();
|
|
|
- if(startTime==null || startTime==''){
|
|
|
+ if (startTime == null || startTime == '') {
|
|
|
Feng.info("请选择合同起始时间");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- if(endTime==null || endTime==''){
|
|
|
+ if (endTime == null || endTime == '') {
|
|
|
Feng.info("请选择合同截止时间");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editContract", function(data){
|
|
|
- if(data.code==200){
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editContract", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
$("#projectTable").bootstrapTable("refresh", {});
|
|
|
$("#contractModal").modal("hide");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("提交失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set({"id":id,"startTime":startTime,"endTime":endTime,"process":$("#process").val()});
|
|
|
+ ajax.set({"id": id, "startTime": startTime, "endTime": endTime, "process": $("#process").val()});
|
|
|
ajax.start();
|
|
|
}
|
|
|
//显示编辑项目模态框
|
|
|
-TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,months,days,content){
|
|
|
+TalentAllowanceInfoDlg.showEditProjectModal = function (project, id, enterpriseId, months, days, content) {
|
|
|
var desc = $(content).attr("data-value");
|
|
|
var type = $("#type").val();
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function(data){
|
|
|
- if(data.code==200){
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
$("#description").val(desc);
|
|
|
TalentAllowanceInfoDlg.initICheck();
|
|
|
switch (project) {
|
|
@@ -188,24 +188,25 @@ TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,m
|
|
|
$("#contractCheckModal").modal("show");
|
|
|
break;
|
|
|
case "4":
|
|
|
- if(type==2){
|
|
|
+ if (type == 2) {
|
|
|
$("#attendanceModalLabel").html("考勤");
|
|
|
$("#heading").html("请填写每月考勤天数<span style=\"color: red\">(不填写或填写0则代表无考勤记录)</span>");
|
|
|
$("#attendanceForm")[0].reset();
|
|
|
$("#attendanceId").val(id);
|
|
|
$("#attendanceEnterpriseId").val(enterpriseId);
|
|
|
- if(months!=null && months!=''){
|
|
|
+ if (months != null && months != '') {
|
|
|
var arr = months.split(",");
|
|
|
- for(var key in arr){
|
|
|
+ for (var key in arr) {
|
|
|
var num = arr[key].split("=")[0];
|
|
|
var day = arr[key].split("=")[1];
|
|
|
$("#attendMonths input").each(function () {
|
|
|
- if($(this).attr('num')==num)$(this).val(day);
|
|
|
+ if ($(this).attr('num') == num)
|
|
|
+ $(this).val(day);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
$("#attendanceModal").modal("show");
|
|
|
- }else if(type==1){
|
|
|
+ } else if (type == 1) {
|
|
|
$('#jjAttendanceModal').on('show.bs.modal', function () {
|
|
|
$("#jjAttendanceForm")[0].reset();
|
|
|
$("#jjmonths input").each(function () {
|
|
@@ -213,18 +214,20 @@ TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,m
|
|
|
});
|
|
|
$("#jjAttendanceId").val(id);
|
|
|
$("#jjAttendanceEnterpriseId").val(enterpriseId);
|
|
|
- if(Feng.isNotEmptyStr(months)) {
|
|
|
- if(months.indexOf(",")!=-1){
|
|
|
+ if (Feng.isNotEmptyStr(months)) {
|
|
|
+ if (months.indexOf(",") != -1) {
|
|
|
var arr = months.split(",");
|
|
|
for (var key in arr) {
|
|
|
$("#jjmonths input").each(function () {
|
|
|
- if ($(this).val() == arr[key]) $(this).iCheck("check");
|
|
|
+ if ($(this).val() == arr[key])
|
|
|
+ $(this).iCheck("check");
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- if(days!=null && days!='')$("#days").val(days);
|
|
|
+ if (days != null && days != '')
|
|
|
+ $("#days").val(days);
|
|
|
$("#jjAttendanceModal").modal("show");
|
|
|
}
|
|
|
break;
|
|
@@ -239,8 +242,9 @@ TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,m
|
|
|
for (var key in arr) {
|
|
|
var num = arr[key].split("=")[0];
|
|
|
var day = arr[key].split("=")[1];
|
|
|
- $("#attendMonths input").each(function() {
|
|
|
- if ($(this).attr('num') == num) $(this).val(day);
|
|
|
+ $("#attendMonths input").each(function () {
|
|
|
+ if ($(this).attr('num') == num)
|
|
|
+ $(this).val(day);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -257,8 +261,9 @@ TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,m
|
|
|
for (var key in arr) {
|
|
|
var num = arr[key].split("=")[0];
|
|
|
var day = arr[key].split("=")[1];
|
|
|
- $("#attendMonths input").each(function() {
|
|
|
- if ($(this).attr('num') == num) $(this).val(day);
|
|
|
+ $("#attendMonths input").each(function () {
|
|
|
+ if ($(this).attr('num') == num)
|
|
|
+ $(this).val(day);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -272,11 +277,12 @@ TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,m
|
|
|
$("#projectId").val(id);
|
|
|
$("#enterpriseId").val(enterpriseId);
|
|
|
TalentAllowanceInfoDlg.initICheck();
|
|
|
- if(Feng.isNotEmptyStr(months)) {
|
|
|
+ if (Feng.isNotEmptyStr(months)) {
|
|
|
var arr = months.split(",");
|
|
|
- for(var key in arr){
|
|
|
+ for (var key in arr) {
|
|
|
$("#months input").each(function () {
|
|
|
- if($(this).val()==arr[key])$(this).iCheck("check");
|
|
|
+ if ($(this).val() == arr[key])
|
|
|
+ $(this).iCheck("check");
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -284,86 +290,86 @@ TalentAllowanceInfoDlg.showEditProjectModal = function(project,id,enterpriseId,m
|
|
|
$("#projectModal").modal("show");
|
|
|
break;
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("type",2);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
- ajax.set("companyId",$("#companyId").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("type", 2);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
+ ajax.set("companyId", $("#companyId").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
//审核合同满两年提交
|
|
|
-TalentAllowanceInfoDlg.contractCheckSubmit = function(){
|
|
|
+TalentAllowanceInfoDlg.contractCheckSubmit = function () {
|
|
|
var id = $("#contractCheckId").val();
|
|
|
var enterpriseId = $("#contractEnterpriseId").val();
|
|
|
var description = $("#msg").val();
|
|
|
var months = $("#state").val();
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function(data){
|
|
|
- if(data.code==200){
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
- $("#"+enterpriseId).bootstrapTable("refresh", {});
|
|
|
+ $("#" + enterpriseId).bootstrapTable("refresh", {});
|
|
|
$("#contractCheckModal").modal("hide");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("提交失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set({"id":id,"months":months,"description":description,"process":$("#process").val()});
|
|
|
+ ajax.set({"id": id, "months": months, "description": description, "process": $("#process").val()});
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
|
//编辑项目提交
|
|
|
-TalentAllowanceInfoDlg.editProject = function(){
|
|
|
+TalentAllowanceInfoDlg.editProject = function () {
|
|
|
var id = $("#projectId").val();
|
|
|
var enterpriseId = $("#enterpriseId").val();
|
|
|
var description = $("#description").val();
|
|
|
var months = "";
|
|
|
$("#months input").each(function () {
|
|
|
- if(this.checked){
|
|
|
+ if (this.checked) {
|
|
|
months = months + $(this).val() + ",";
|
|
|
}
|
|
|
})
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function(data){
|
|
|
- if(data.code==200){
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
- $("#"+enterpriseId).bootstrapTable("refresh", {});
|
|
|
+ $("#" + enterpriseId).bootstrapTable("refresh", {});
|
|
|
$("#projectModal").modal("hide");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("提交失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set({"id":id,"months":months,"description":description,"process":$("#process").val()});
|
|
|
+ ajax.set({"id": id, "months": months, "description": description, "process": $("#process").val()});
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 提交晋江市现代产业体系人才的考勤
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.editJJAttendance = function(){
|
|
|
+TalentAllowanceInfoDlg.editJJAttendance = function () {
|
|
|
var id = $("#jjAttendanceId").val();
|
|
|
var enterpriseId = $("#jjAttendanceEnterpriseId").val();
|
|
|
var description = $("#jjDescription").val();
|
|
|
var days = $("#days").val();
|
|
|
var months = "";
|
|
|
$("#jjmonths input").each(function () {
|
|
|
- if(this.checked){
|
|
|
+ if (this.checked) {
|
|
|
months = months + $(this).val() + ",";
|
|
|
}
|
|
|
})
|
|
|
- if(months=="" && (days==null || days=="")){
|
|
|
+ if (months == "" && (days == null || days == "")) {
|
|
|
Feng.info("请填写考勤信息");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- if(months!=null && months!='' && days!=null && days!=''){
|
|
|
+ if (months != null && months != '' && days != null && days != '') {
|
|
|
Feng.info("考勤天数和考勤月份只能选择一个填写");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
$("#attendanceMonths").val(months);
|
|
|
$("#jjAttendanceForm")[0].submit();
|
|
@@ -382,43 +388,43 @@ TalentAllowanceInfoDlg.editJJAttendance = function(){
|
|
|
// ajax.start();
|
|
|
}
|
|
|
|
|
|
-TalentAllowanceInfoDlg.editAttendanceProject = function(){
|
|
|
+TalentAllowanceInfoDlg.editAttendanceProject = function () {
|
|
|
var id = $("#attendanceId").val();
|
|
|
var enterpriseId = $("#attendanceEnterpriseId").val();
|
|
|
var description = $("#attendanceDescription").val();
|
|
|
var months = "";
|
|
|
var error = "";
|
|
|
- $("#attendMonths input").each(function(){
|
|
|
+ $("#attendMonths input").each(function () {
|
|
|
var days = $(this).val();
|
|
|
var num = $(this).attr("num");
|
|
|
- if(isNaN(days)){
|
|
|
- error = error + num+"月的考勤天数不是数字;";
|
|
|
- }else{
|
|
|
- if(days<0 || days>31){
|
|
|
- error = error + num+"月的考勤天数不在范围内(1-31);";
|
|
|
+ if (isNaN(days)) {
|
|
|
+ error = error + num + "月的考勤天数不是数字;";
|
|
|
+ } else {
|
|
|
+ if (days < 0 || days > 31) {
|
|
|
+ error = error + num + "月的考勤天数不在范围内(1-31);";
|
|
|
}
|
|
|
}
|
|
|
- if(days==null || days==''){
|
|
|
+ if (days == null || days == '') {
|
|
|
days = 0;
|
|
|
}
|
|
|
months = months + num + "=" + days + ",";
|
|
|
});
|
|
|
- if(error!=""){
|
|
|
+ if (error != "") {
|
|
|
Feng.error(error);
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function(data){
|
|
|
- if(data.code==200){
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
- $("#"+enterpriseId).bootstrapTable("refresh", {});
|
|
|
+ $("#" + enterpriseId).bootstrapTable("refresh", {});
|
|
|
$("#attendanceModal").modal("hide");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("提交失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set({"id":id,"months":months,"description":description,"process":$("#process").val()});
|
|
|
+ ajax.set({"id": id, "months": months, "description": description, "process": $("#process").val()});
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
@@ -427,35 +433,35 @@ TalentAllowanceInfoDlg.editAttendanceProject = function(){
|
|
|
* 锁定工作单位合同
|
|
|
* @param id
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.lockContract = function(id){
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function(data){
|
|
|
- if(data.code==200){
|
|
|
- var operation = function(){
|
|
|
+TalentAllowanceInfoDlg.lockContract = function (id) {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
+ var operation = function () {
|
|
|
var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/lockContract", function (data) {
|
|
|
- if(data.code==200){
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
$("#projectTable").bootstrapTable("refresh", {});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
}, function (data) {
|
|
|
Feng.error("删除失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
Feng.confirm("一旦锁定无法修改,确认锁定吗?", operation);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("type",1);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
- ajax.set("companyId",$("#companyId").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("type", 1);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
+ ajax.set("companyId", $("#companyId").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
@@ -463,35 +469,35 @@ TalentAllowanceInfoDlg.lockContract = function(id){
|
|
|
* 锁定项目
|
|
|
* @param id
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.lockProject = function(id,enterpriseId){
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function(data){
|
|
|
- if(data.code==200){
|
|
|
- var operation = function(){
|
|
|
+TalentAllowanceInfoDlg.lockProject = function (id, enterpriseId) {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
+ var operation = function () {
|
|
|
var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/lockProject", function (data) {
|
|
|
- if(data.code==200){
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
- $("#"+enterpriseId).bootstrapTable("refresh", {});
|
|
|
- }else{
|
|
|
+ $("#" + enterpriseId).bootstrapTable("refresh", {});
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
}, function (data) {
|
|
|
Feng.error("删除失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
Feng.confirm("一旦锁定无法修改,确认锁定吗?", operation);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("type",2);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
- ajax.set("companyId",$("#companyId").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("type", 2);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
+ ajax.set("companyId", $("#companyId").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
@@ -499,22 +505,22 @@ TalentAllowanceInfoDlg.lockProject = function(id,enterpriseId){
|
|
|
/**
|
|
|
* 显示审核模态框
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.showCheckModal = function(){
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function(data){
|
|
|
- if(data.code==200){
|
|
|
+TalentAllowanceInfoDlg.showCheckModal = function () {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
layer.open({
|
|
|
type: 1,
|
|
|
- id:"neewFieldFormModel",
|
|
|
+ id: "neewFieldFormModel",
|
|
|
title: '审核',
|
|
|
area: ['800px', '450px'], //宽高
|
|
|
fix: false, //不固定
|
|
|
- shade:0,
|
|
|
+ shade: 0,
|
|
|
maxmin: true,
|
|
|
- content:TalentAllowanceInfoDlg.createCheckHtml(),
|
|
|
- btn: ['<i class="fa fa-save"></i> 提交' ,'<i class="fa fa-eraser"></i> 关闭'],
|
|
|
+ content: TalentAllowanceInfoDlg.createCheckHtml(),
|
|
|
+ btn: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
|
|
|
btnAlign: 'c',
|
|
|
zIndex: layer.zIndex,
|
|
|
- success:function(layero, index){
|
|
|
+ success: function (layero, index) {
|
|
|
var projectList = data.obj.projects;
|
|
|
var fileList = data.obj.files;
|
|
|
var concatList = data.obj.concats;
|
|
@@ -524,25 +530,25 @@ TalentAllowanceInfoDlg.showCheckModal = function(){
|
|
|
var fields = data.obj.info.fields;
|
|
|
var info = data.obj.info;
|
|
|
//初始化附件、核查项目、合同
|
|
|
- if(projectList!=null && projectList.length!=0){
|
|
|
+ if (projectList != null && projectList.length != 0) {
|
|
|
var html = '<ul>';
|
|
|
- for(var key in projectList){
|
|
|
- html = html + '<li style="width: 100%"><input type="checkbox" value="'+projectList[key].id+'"><span>'+projectList[key].projectName+'</span></li>';
|
|
|
+ for (var key in projectList) {
|
|
|
+ html = html + '<li style="width: 100%"><input type="checkbox" value="' + projectList[key].id + '"><span>' + projectList[key].projectName + '</span></li>';
|
|
|
}
|
|
|
html = html + "</ul>";
|
|
|
$("#field_project").empty().append(html);
|
|
|
}
|
|
|
- if(fileList!=null && fileList.length!=0){
|
|
|
+ if (fileList != null && fileList.length != 0) {
|
|
|
var html = '';
|
|
|
- for(var key in fileList){
|
|
|
- html = html + '<ul><li style="width: 100%"><input type="checkbox" value="'+fileList[key].id+'"><span>'+fileList[key].name+'</span></li></ul>';
|
|
|
+ for (var key in fileList) {
|
|
|
+ html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
|
|
|
}
|
|
|
$("#field_file").empty().append(html);
|
|
|
}
|
|
|
- if(concatList!=null && concatList.length!=0){
|
|
|
+ if (concatList != null && concatList.length != 0) {
|
|
|
var html = '';
|
|
|
- for(var key in concatList){
|
|
|
- html = html + '<ul><li style="width: 100%"><input type="checkbox" value="'+concatList[key].id+'"><span>'+concatList[key].enterpriseName+'</span></li></ul>';
|
|
|
+ for (var key in concatList) {
|
|
|
+ html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + concatList[key].id + '"><span>' + concatList[key].enterpriseName + '</span></li></ul>';
|
|
|
}
|
|
|
$("#field_concat").empty().append(html);
|
|
|
}
|
|
@@ -550,32 +556,33 @@ TalentAllowanceInfoDlg.showCheckModal = function(){
|
|
|
//回显数据
|
|
|
$("#checkStateModal").val(info.checkState).trigger("change");
|
|
|
$("#toProcess").val(info.toProcess).trigger("change");
|
|
|
- if(Feng.isNotEmptyStr(info.toDep)) $("#toDep").val(info.toDep.split(",")).trigger("chosen:updated");
|
|
|
+ if (Feng.isNotEmptyStr(info.toDep))
|
|
|
+ $("#toDep").val(info.toDep.split(",")).trigger("chosen:updated");
|
|
|
$("#checkMsg").val(info.checkMsg);
|
|
|
- if(Feng.isNotEmptyStr(projects)){
|
|
|
+ if (Feng.isNotEmptyStr(projects)) {
|
|
|
$("#field_project input").each(function () {
|
|
|
- if(projects.indexOf($(this).val())!=-1){
|
|
|
+ if (projects.indexOf($(this).val()) != -1) {
|
|
|
$(this).iCheck("check");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if(files!=null && files!=''){
|
|
|
+ if (files != null && files != '') {
|
|
|
$("#field_file input").each(function () {
|
|
|
- if(files.indexOf($(this).val())!=-1){
|
|
|
+ if (files.indexOf($(this).val()) != -1) {
|
|
|
$(this).iCheck("check");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if(concats!=null && concats!=''){
|
|
|
+ if (concats != null && concats != '') {
|
|
|
$("#field_concat input").each(function () {
|
|
|
- if(concats.indexOf($(this).val())!=-1){
|
|
|
+ if (concats.indexOf($(this).val()) != -1) {
|
|
|
$(this).iCheck("check");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if(Feng.isNotEmptyStr(fields)){
|
|
|
+ if (Feng.isNotEmptyStr(fields)) {
|
|
|
$("#field_field input").each(function () {
|
|
|
- if(concats.indexOf($(this).val())!=-1){
|
|
|
+ if (fields.indexOf($(this).val()) != -1) {
|
|
|
$(this).iCheck("check");
|
|
|
}
|
|
|
});
|
|
@@ -585,81 +592,81 @@ TalentAllowanceInfoDlg.showCheckModal = function(){
|
|
|
TalentAllowanceInfoDlg.checkSubmit(index);
|
|
|
}
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",$("#id").val());
|
|
|
- ajax.set("type",3);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
- ajax.set("companyId",$("#companyId").val())
|
|
|
+ ajax.set("id", $("#id").val());
|
|
|
+ ajax.set("type", 3);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
+ ajax.set("companyId", $("#companyId").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 显示/隐藏设置津补贴类型
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.toggleSetAllowance = function(){
|
|
|
+TalentAllowanceInfoDlg.toggleSetAllowance = function () {
|
|
|
var checkState = $("#reviewState").val();
|
|
|
- if(checkState==2 ){
|
|
|
- $("#setAllowanceHeading,#setAllowanceBody").css("display","none");
|
|
|
- $("#processLable,#processDiv").css("display","block");
|
|
|
+ if (checkState == 2) {
|
|
|
+ $("#setAllowanceHeading,#setAllowanceBody").css("display", "none");
|
|
|
+ $("#processLable,#processDiv").css("display", "block");
|
|
|
$("#checkMsg").val("审核通过");
|
|
|
- }else if(checkState==3){
|
|
|
- $("#setAllowanceHeading,#setAllowanceBody").css("display","block");
|
|
|
- $("#processLable,#processDiv").css("display","none");
|
|
|
+ } else if (checkState == 3) {
|
|
|
+ $("#setAllowanceHeading,#setAllowanceBody").css("display", "block");
|
|
|
+ $("#processLable,#processDiv").css("display", "none");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 保存复核审核结果
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.saveReviewCheck = function(){
|
|
|
+TalentAllowanceInfoDlg.saveReviewCheck = function () {
|
|
|
var id = $("#id").val();
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function(data){
|
|
|
- if(data.code==200){
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
var checkState = $("#reviewState").val();
|
|
|
var checkMsg = $("#allowanceCheckMsg").val();
|
|
|
- if(checkState==null||checkState==''){
|
|
|
+ if (checkState == null || checkState == '') {
|
|
|
Feng.info("请选择审核状态");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
var toPorcess = $("#toProcess").val();
|
|
|
- var allowanceType = null,months = "",allowanceMsg = null;
|
|
|
- if(checkState==3){
|
|
|
+ var allowanceType = null, months = "", allowanceMsg = null;
|
|
|
+ if (checkState == 3) {
|
|
|
allowanceType = $("#newAllowanceType").val();
|
|
|
$("#allowanceMonths input[type=checkbox]").each(function () {
|
|
|
- if(this.checked){
|
|
|
+ if (this.checked) {
|
|
|
months = months + $(this).val() + ",";
|
|
|
}
|
|
|
});
|
|
|
allowanceMsg = $("#newAllowanceMsg").val();
|
|
|
}
|
|
|
- var param = {"id":id,"checkState":checkState,"checkMsg":checkMsg,"process":$("#process").val(),
|
|
|
- "toPorcess":toPorcess,"allowanceType":allowanceType,"allowanceMsg":allowanceMsg,"months":months};
|
|
|
- var checkAjax = new $ax(Feng.ctxPath + "/admin/talentAllowance/reviewCheck", function(res){
|
|
|
- if(res.code==200){
|
|
|
+ var param = {"id": id, "checkState": checkState, "checkMsg": checkMsg, "process": $("#process").val(),
|
|
|
+ "toPorcess": toPorcess, "allowanceType": allowanceType, "allowanceMsg": allowanceMsg, "months": months};
|
|
|
+ var checkAjax = new $ax(Feng.ctxPath + "/admin/talentAllowance/reviewCheck", function (res) {
|
|
|
+ if (res.code == 200) {
|
|
|
Feng.success(res.msg)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.error(res.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("提交失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
checkAjax.setData(param);
|
|
|
checkAjax.start();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.error(data.msg);
|
|
|
}
|
|
|
- },function(data){
|
|
|
+ }, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("id",id);
|
|
|
- ajax.set("type",3);
|
|
|
- ajax.set("process",$("#process").val())
|
|
|
- ajax.set("companyId",$("#companyId").val())
|
|
|
+ ajax.set("id", id);
|
|
|
+ ajax.set("type", 3);
|
|
|
+ ajax.set("process", $("#process").val())
|
|
|
+ ajax.set("companyId", $("#companyId").val())
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
@@ -667,21 +674,21 @@ TalentAllowanceInfoDlg.saveReviewCheck = function(){
|
|
|
/**
|
|
|
* 显示字段或者隐藏字段选择
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.toggleField = function (){
|
|
|
+TalentAllowanceInfoDlg.toggleField = function () {
|
|
|
var checkState = $("#checkStateModal").val();
|
|
|
var process = $("#process").val();
|
|
|
- if(checkState==2){
|
|
|
- $("#toProcessDiv").css("display",process == 3?"block":"none");
|
|
|
+ if (checkState == 2) {
|
|
|
+ $("#toProcessDiv").css("display", process == 3 ? "block" : "none");
|
|
|
$("#field").show();
|
|
|
- }else{
|
|
|
- if(checkState == 3){
|
|
|
- $("#checkMsg").val(process == 3?"复核通过,待核查征信":"初审通过");
|
|
|
+ } else {
|
|
|
+ if (checkState == 3) {
|
|
|
+ $("#checkMsg").val(process == 3 ? "复核通过,待核查征信" : "初审通过");
|
|
|
}
|
|
|
$("#field").hide();
|
|
|
$("#field").find("input[type=checkbox]").each(function () {
|
|
|
$(this).iCheck("uncheck");
|
|
|
});
|
|
|
- $("#toProcessDiv").css("display","none");
|
|
|
+ $("#toProcessDiv").css("display", "none");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -689,83 +696,82 @@ TalentAllowanceInfoDlg.toggleField = function (){
|
|
|
/**
|
|
|
* 审核信息提交
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.checkSubmit = function(index){
|
|
|
+TalentAllowanceInfoDlg.checkSubmit = function (index) {
|
|
|
var id = $("#id").val();
|
|
|
var checkState = $("#checkStateModal").val();
|
|
|
var checkMsg = $("#checkMsg").val();
|
|
|
var process = $("#process").val();
|
|
|
var companyCode = $("#companyCode").val();
|
|
|
var companyCodes = "";
|
|
|
- if(Feng.isEmptyStr(checkState)){
|
|
|
+ if (Feng.isEmptyStr(checkState)) {
|
|
|
Feng.info("请选择审核状态");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- if(Feng.isEmptyStr(checkMsg)){
|
|
|
+ if (Feng.isEmptyStr(checkMsg)) {
|
|
|
Feng.info("请填写审核意见");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- if(process == 3 && checkState == 2){
|
|
|
+ if (process == 3 && checkState == 2) {
|
|
|
var toProcess = $("#toProcess").val();
|
|
|
- if(Feng.isEmptyStr(toProcess)){
|
|
|
+ if (Feng.isEmptyStr(toProcess)) {
|
|
|
Feng.info("请选择驳回至流程");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- if(toProcess == 1){
|
|
|
+ if (toProcess == 1) {
|
|
|
var toDep = $("#toDep").val();
|
|
|
- for(var key in toDep){
|
|
|
- companyCodes = companyCodes + toDep[key]+",";
|
|
|
+ for (var key in toDep) {
|
|
|
+ companyCodes = companyCodes + toDep[key] + ",";
|
|
|
}
|
|
|
- if(Feng.isEmptyStr(companyCodes)){
|
|
|
+ if (Feng.isEmptyStr(companyCodes)) {
|
|
|
Feng.info("请选择驳回单位");
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- var projects = '',files = '',concats='',fields="";
|
|
|
- if (process == 1){
|
|
|
- $("#field_project li input").each(function(index){
|
|
|
- if($(this).is(":checked")){
|
|
|
+ var projects = '', files = '', concats = '', fields = "";
|
|
|
+ if (process == 1) {
|
|
|
+ $("#field_project li input").each(function (index) {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
projects = projects + $(this).val() + ",";
|
|
|
}
|
|
|
});
|
|
|
- $("#field_file li input").each(function(index){
|
|
|
- if($(this).is(":checked")){
|
|
|
+ $("#field_file li input").each(function (index) {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
files = files + $(this).val() + ",";
|
|
|
}
|
|
|
});
|
|
|
- if(companyCode == CONFIG.COM_RSJ || companyCode == CONFIG.COM_IC){
|
|
|
- $("#field_concat li input").each(function(index){
|
|
|
- if($(this).is(":checked")){
|
|
|
- concats = concats + $(this).val() + ",";
|
|
|
- }
|
|
|
- });
|
|
|
- $("#field_field li input").each(function(index){
|
|
|
- if($(this).is(":checked")){
|
|
|
- fields = fields + $(this).val() + ",";
|
|
|
- }
|
|
|
- });
|
|
|
- fields = fields.substring(0,fields.length-1);
|
|
|
- }
|
|
|
+ //if(companyCode == CONFIG.COM_RSJ || companyCode == CONFIG.COM_IC){
|
|
|
+ $("#field_concat li input").each(function (index) {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
+ concats = concats + $(this).val() + ",";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#field_field li input").each(function (index) {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
+ fields = fields + $(this).val() + ",";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ fields = fields.substring(0, fields.length - 1);
|
|
|
+ //}
|
|
|
}
|
|
|
// if(process ==1 && checkState==2 && projects=='' && files==''){
|
|
|
// Feng.info("请选择可修改的项目或附件!");
|
|
|
// return ;
|
|
|
// }
|
|
|
- if(Feng.isNotEmptyStr(companyCodes)){
|
|
|
- companyCodes = companyCodes.substring(0,companyCodes.length-1);
|
|
|
+ if (Feng.isNotEmptyStr(companyCodes)) {
|
|
|
+ companyCodes = companyCodes.substring(0, companyCodes.length - 1);
|
|
|
}
|
|
|
var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/check", function (data) {
|
|
|
- console.log(data)
|
|
|
- if(data.code==200){
|
|
|
+ if (data.code == 200) {
|
|
|
layer.close(index);
|
|
|
Feng.success(data.msg);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.error(data.msg);
|
|
|
}
|
|
|
}, function (data) {
|
|
|
Feng.error("提交审核失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.setData({"id":id,"checkState":checkState,"checkMsg":checkMsg,"process":$("#process").val(),"projects":projects,"files":files,"concats":concats,"fields":fields,"companyId":$("#companyId").val(),"toProcess":$("#toProcess").val(),"toDep":companyCodes});
|
|
|
+ ajax.setData({"id": id, "checkState": checkState, "checkMsg": checkMsg, "process": $("#process").val(), "projects": projects, "files": files, "concats": concats, "fields": fields, "companyId": $("#companyId").val(), "toProcess": $("#toProcess").val(), "toDep": companyCodes});
|
|
|
ajax.start();
|
|
|
}
|
|
|
|
|
@@ -773,73 +779,74 @@ TalentAllowanceInfoDlg.checkSubmit = function(index){
|
|
|
/**
|
|
|
* 提交审核
|
|
|
*/
|
|
|
-TalentAllowanceInfoDlg.submitCheck = function(){
|
|
|
- var operation = function(){
|
|
|
+TalentAllowanceInfoDlg.submitCheck = function () {
|
|
|
+ var operation = function () {
|
|
|
var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/submitCheck", function (data) {
|
|
|
- if(data.code==200){
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
window.parent.TalentAllowanceInfo.table.refresh();
|
|
|
TalentAllowanceInfoDlg.close();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.error(data.msg);
|
|
|
}
|
|
|
}, function (data) {
|
|
|
Feng.error("提交审核失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.setData({"id":$("#id").val(),"process":$("#process").val(),"companyId":$("#companyId").val()});
|
|
|
+ ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()});
|
|
|
ajax.start();
|
|
|
}
|
|
|
Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
|
|
|
}
|
|
|
|
|
|
|
|
|
-TalentAllowanceInfoDlg.attendanceCallBack = function(data){
|
|
|
- if(data.code==200){
|
|
|
+TalentAllowanceInfoDlg.attendanceCallBack = function (data) {
|
|
|
+ if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
- $("#"+data.obj).bootstrapTable("refresh", {});
|
|
|
+ $("#" + data.obj).bootstrapTable("refresh", {});
|
|
|
$("#jjAttendanceModal").modal("hide");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-TalentAllowanceInfoDlg.initICheck = function(){
|
|
|
+TalentAllowanceInfoDlg.initICheck = function () {
|
|
|
$('input[type=checkbox]').iCheck({
|
|
|
- labelHover : false,
|
|
|
- cursor : true,
|
|
|
- checkboxClass : 'icheckbox_square-green',
|
|
|
- radioClass : 'iradio_square-greene',
|
|
|
- increaseArea : '20%'
|
|
|
+ labelHover: false,
|
|
|
+ cursor: true,
|
|
|
+ checkboxClass: 'icheckbox_square-green',
|
|
|
+ radioClass: 'iradio_square-greene',
|
|
|
+ increaseArea: '20%'
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-TalentAllowanceInfoDlg.showAllLog = function(){
|
|
|
+TalentAllowanceInfoDlg.showAllLog = function () {
|
|
|
var id = $("#id").val();
|
|
|
- if(Feng.isNotEmptyStr(id)){
|
|
|
- Feng.getCheckLog("logTable",{"type":CONFIG.project_jbt,"mainId":$("#id").val(),"typeFileId":"","active":1})
|
|
|
+ if (Feng.isNotEmptyStr(id)) {
|
|
|
+ Feng.getCheckLog("logTable", {"type": CONFIG.project_jbt, "mainId": $("#id").val(), "typeFileId": "", "active": 1})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-TalentAllowanceInfoDlg.fileChange = function(context){
|
|
|
- var file = $(context).val();
|
|
|
+TalentAllowanceInfoDlg.fileChange = function (context) {
|
|
|
+ var file = $(context).val();
|
|
|
var pos = file.lastIndexOf("\\");
|
|
|
- $("#fileInput").val(file.substring(pos+1));
|
|
|
+ $("#fileInput").val(file.substring(pos + 1));
|
|
|
}
|
|
|
|
|
|
-$(function() {
|
|
|
- if($("#type").val()==2){
|
|
|
- $("#bankNumberSpan,#talentTypeSpan,#introductionModeSpan,#firstInJJTimeSpan").attr("style","display:none");
|
|
|
+$(function () {
|
|
|
+ if ($("#type").val() == 2) {
|
|
|
+ $("#bankNumberSpan,#talentTypeSpan,#introductionModeSpan,#firstInJJTimeSpan").attr("style", "display:none");
|
|
|
}
|
|
|
- $("select").each(function () {+
|
|
|
- $(this).val($(this).attr("value"));
|
|
|
+ $("select").each(function () {
|
|
|
+ +
|
|
|
+ $(this).val($(this).attr("value"));
|
|
|
});
|
|
|
TalentAllowanceInfoDlg.initFileTable();
|
|
|
TalentAllowanceInfoDlg.initContract();
|
|
|
TalentAllowanceInfoDlg.showAllLog();
|
|
|
//批量加载时间控件
|
|
|
- $(".date").each(function(){
|
|
|
- laydate.render({elem: "#"+$(this).attr("id"),type: 'date',trigger: 'click'});
|
|
|
+ $(".date").each(function () {
|
|
|
+ laydate.render({elem: "#" + $(this).attr("id"), type: 'date', trigger: 'click'});
|
|
|
});
|
|
|
var process = $("#process").val();
|
|
|
var compayCode = $("#companyCode").val();
|