123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854 |
- /**
- * 初始化人才认定申报详情对话框
- */
- var TalentAllowanceInfoDlg = {
- talentAllowanceData: {}
- };
- /**
- * 关闭此对话框
- */
- TalentAllowanceInfoDlg.close = function () {
- parent.layer.close(window.parent.TalentAllowanceInfo.layerIndex);
- }
- /**
- * 初始化工作单位及核查项目情况表
- */
- 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, // 是否显示行间隔色
- escape: true,
- pagination: false, // 设置为 true 会在表格底部显示分页条
- paginationHAlign: "left",
- paginationDetailHAlign: "right",
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
- showColumns: false,
- detailView: true, //父子表
- queryParams: function (params) {
- return $.extend({"mainId": $("#id").val()}, params)
- },
- columns: TalentAllowanceInfoDlg.initContractColumns(),
- onPostBody: function () {
- $("td.uitd_showTip").bind("mouseover", function () {
- var htm = $(this).html();
- $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
- });
- },
- onLoadSuccess: function (data) {
- $("#projectTable").bootstrapTable('expandAllRows');
- },
- onExpandRow: function (index, row, $detail) {
- 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, // 是否显示行间隔色
- escape: true,
- pagination: false, // 设置为 true 会在表格底部显示分页条
- paginationHAlign: "left",
- paginationDetailHAlign: "right",
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
- showColumns: false,
- queryParams: function (params) {
- var companyCode = "";
- if ($("#process").val() == 1) {
- companyCode = $("#companyCode").val();
- }
- return $.extend({"mainId": $("#id").val(), "baseId": row.id, "companyCode": companyCode}, params)
- },
- onPostBody: function () {
- $("td.uitd_showTip").bind("mouseover", function () {
- var htm = $(this).html();
- $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
- });
- },
- onLoadSuccess: function (data) {
- $(".imgs").viewer({
- // toolbar:false,
- fullscreen: false
- });
- },
- columns: TalentAllowanceInfoDlg.initProjectColumns(enterpriseId),
- });
- }
- });
- TalentAllowanceInfoDlg.initArrange();
- }
- /**
- * 初始化人才层次
- */
- 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, // 是否显示行间隔色
- escape: true,
- pagination: false, // 设置为 true 会在表格底部显示分页条
- paginationHAlign: "left",
- paginationDetailHAlign: "right",
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
- showColumns: false,
- pageList: [10, 30, 50],
- queryParams: function (params) {
- return $.extend({"mainId": $("#id").val()}, params)
- },
- columns: TalentAllowanceInfoDlg.initArrangeColumn(),
- onPostBody: function () {
- $("td.uitd_showTip").bind("mouseover", function () {
- var htm = $(this).html();
- $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
- });
- }
- });
- }
- //显示修改工作单位合同情况模态框
- 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'});
- });
- $("#contractModal").modal("show");
- } else {
- Feng.info(data.msg);
- }
- }, 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.start();
- }
- //修改合同起止时间提交
- TalentAllowanceInfoDlg.editContract = function () {
- var id = $("#contractId").val();
- var startTime = $("#startTime").val();
- var endTime = $("#endTime").val();
- if (startTime == null || startTime == '') {
- Feng.info("请选择合同起始时间");
- return;
- }
- if (endTime == null || endTime == '') {
- Feng.info("请选择合同截止时间");
- return;
- }
- 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 {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.set({"id": id, "startTime": startTime, "endTime": endTime, "process": $("#process").val()});
- ajax.start();
- }
- //显示编辑项目模态框
- 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) {
- $("#description").val(desc);
- TalentAllowanceInfoDlg.initICheck();
- switch (project) {
- case "1":
- $("#contractCheckForm")[0].reset();
- $("#contractCheckId").val(id);
- $("#contractEnterpriseId").val(enterpriseId);
- $("#contractCheckModal").modal("show");
- break;
- case "4":
- 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 != '') {
- var arr = months.split(",");
- 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);
- });
- }
- }
- $("#attendanceModal").modal("show");
- } else if (type == 1) {
- $('#jjAttendanceModal').on('show.bs.modal', function () {
- $("#jjAttendanceForm")[0].reset();
- $("#jjmonths input").each(function () {
- $(this).iCheck("uncheck");
- });
- $("#jjAttendanceId").val(id);
- $("#jjAttendanceEnterpriseId").val(enterpriseId);
- 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 (days != null && days != '')
- $("#days").val(days);
- $("#jjAttendanceModal").modal("show");
- }
- break;
- case "15":
- $("#attendanceModalLabel").html("在境时间");
- $("#heading").html("请填写每月在境内天数<span style=\"color: red\">(不填写则代表为0天)</span>");
- $("#attendanceForm")[0].reset();
- $("#attendanceId").val(id);
- $("#attendanceEnterpriseId").val(enterpriseId);
- if (months != null && months != '') {
- var arr = months.split(",");
- 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);
- });
- }
- }
- $("#attendanceModal").modal("show");
- break;
- case "16":
- $("#attendanceModalLabel").html("境内工作日时间");
- $("#heading").html("请填写每月境内工作日天数<span style=\"color: red\">(不填写则代表为0天)</span>");
- $("#attendanceForm")[0].reset();
- $("#attendanceId").val(id);
- $("#attendanceEnterpriseId").val(enterpriseId);
- if (months != null && months != '') {
- var arr = months.split(",");
- 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);
- });
- }
- }
- $("#attendanceModal").modal("show");
- break;
- default:
- $('#projectModal').on('show.bs.modal', function () {
- $("#months input").each(function () {
- $(this).iCheck("uncheck");
- });
- $("#projectId").val(id);
- $("#enterpriseId").val(enterpriseId);
- TalentAllowanceInfoDlg.initICheck();
- if (Feng.isNotEmptyStr(months)) {
- var arr = months.split(",");
- for (var key in arr) {
- $("#months input").each(function () {
- if ($(this).val() == arr[key])
- $(this).iCheck("check");
- });
- }
- }
- });
- $("#projectModal").modal("show");
- break;
- }
- } else {
- Feng.info(data.msg);
- }
- }, 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.start();
- }
- //审核合同满两年提交
- 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) {
- Feng.success(data.msg);
- $("#" + enterpriseId).bootstrapTable("refresh", {});
- $("#contractCheckModal").modal("hide");
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.set({"id": id, "months": months, "description": description, "process": $("#process").val()});
- ajax.start();
- }
- //编辑项目提交
- TalentAllowanceInfoDlg.editProject = function () {
- var id = $("#projectId").val();
- var enterpriseId = $("#enterpriseId").val();
- var description = $("#description").val();
- var months = "";
- $("#months input").each(function () {
- if (this.checked) {
- months = months + $(this).val() + ",";
- }
- })
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $("#" + enterpriseId).bootstrapTable("refresh", {});
- $("#projectModal").modal("hide");
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.set({"id": id, "months": months, "description": description, "process": $("#process").val()});
- ajax.start();
- }
- /**
- * 提交晋江市现代产业体系人才的考勤
- */
- 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) {
- months = months + $(this).val() + ",";
- }
- })
- if (months == "" && (days == null || days == "")) {
- Feng.info("请填写考勤信息");
- return;
- }
- if (months != null && months != '' && days != null && days != '') {
- Feng.info("考勤天数和考勤月份只能选择一个填写");
- return;
- }
- $("#attendanceMonths").val(months);
- $("#jjAttendanceForm")[0].submit();
- // var ajax = new $ax(Feng.ctxPath + "/talentAllowanceInfo/editProject", function(data){
- // if(data.code==200){
- // Feng.success(data.msg);
- // $("#"+enterpriseId).bootstrapTable("refresh", {});
- // $("#jjAttendanceModal").modal("hide");
- // }else{
- // Feng.info(data.msg);
- // }
- // },function(data){
- // Feng.error("提交失败!" + data.responseJSON.message + "!");
- // });
- // ajax.set({"id":id,"months":months,"days":days,"description":description,"process":$("#process").val()});
- // ajax.start();
- }
- TalentAllowanceInfoDlg.editAttendanceProject = function () {
- var id = $("#attendanceId").val();
- var enterpriseId = $("#attendanceEnterpriseId").val();
- var description = $("#attendanceDescription").val();
- var months = "";
- var error = "";
- $("#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 (days == null || days == '') {
- days = 0;
- }
- months = months + num + "=" + days + ",";
- });
- if (error != "") {
- Feng.error(error);
- return;
- }
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $("#" + enterpriseId).bootstrapTable("refresh", {});
- $("#attendanceModal").modal("hide");
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.set({"id": id, "months": months, "description": description, "process": $("#process").val()});
- ajax.start();
- }
- /**
- * 锁定工作单位合同
- * @param id
- */
- 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) {
- Feng.success(data.msg);
- $("#projectTable").bootstrapTable("refresh", {});
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("删除失败!" + data.responseJSON.message + "!");
- });
- ajax.set("id", id);
- ajax.set("process", $("#process").val())
- ajax.start();
- }
- Feng.confirm("一旦锁定无法修改,确认锁定吗?", operation);
- } else {
- Feng.info(data.msg);
- }
- }, 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.start();
- }
- /**
- * 锁定项目
- * @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 () {
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/lockProject", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $("#" + 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.start();
- }
- Feng.confirm("一旦锁定无法修改,确认锁定吗?", operation);
- } else {
- Feng.info(data.msg);
- }
- }, 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.start();
- }
- /**
- * 显示审核模态框
- */
- TalentAllowanceInfoDlg.showCheckModal = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/validateIsCheck", function (data) {
- if (data.code == 200) {
- layer.open({
- type: 1,
- id: "neewFieldFormModel",
- title: '审核',
- area: ['800px', '450px'], //宽高
- fix: false, //不固定
- shade: 0,
- maxmin: true,
- 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) {
- var projectList = data.obj.projects;
- var fileList = data.obj.files;
- var concatList = data.obj.concats;
- var files = data.obj.info.files;
- var projects = data.obj.info.projects;
- var concats = data.obj.info.concats;
- var fields = data.obj.info.fields;
- var info = data.obj.info;
- //初始化附件、核查项目、合同
- 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>';
- }
- html = html + "</ul>";
- $("#field_project").empty().append(html);
- }
- 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>';
- }
- $("#field_file").empty().append(html);
- }
- 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>';
- }
- $("#field_concat").empty().append(html);
- }
- TalentAllowanceInfoDlg.initICheck();
- //回显数据
- $("#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");
- $("#checkMsg").val(info.checkMsg);
- if (Feng.isNotEmptyStr(projects)) {
- $("#field_project input").each(function () {
- if (projects.indexOf($(this).val()) != -1) {
- $(this).iCheck("check");
- }
- });
- }
- if (files != null && files != '') {
- $("#field_file input").each(function () {
- if (files.indexOf($(this).val()) != -1) {
- $(this).iCheck("check");
- }
- });
- }
- if (concats != null && concats != '') {
- $("#field_concat input").each(function () {
- if (concats.indexOf($(this).val()) != -1) {
- $(this).iCheck("check");
- }
- });
- }
- if (Feng.isNotEmptyStr(fields)) {
- $("#field_field input").each(function () {
- if (fields.indexOf($(this).val()) != -1) {
- $(this).iCheck("check");
- }
- });
- }
- },
- yes: function (index, layero) {
- TalentAllowanceInfoDlg.checkSubmit(index);
- }
- });
- } else {
- Feng.info(data.msg);
- }
- }, 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.start();
- }
- /**
- * 显示/隐藏设置津补贴类型
- */
- TalentAllowanceInfoDlg.toggleSetAllowance = function () {
- var checkState = $("#reviewState").val();
- 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");
- }
- }
- /**
- * 保存复核审核结果
- */
- TalentAllowanceInfoDlg.saveReviewCheck = function () {
- var id = $("#id").val();
- 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 == '') {
- Feng.info("请选择审核状态");
- return;
- }
- var toPorcess = $("#toProcess").val();
- var allowanceType = null, months = "", allowanceMsg = null;
- if (checkState == 3) {
- allowanceType = $("#newAllowanceType").val();
- $("#allowanceMonths input[type=checkbox]").each(function () {
- 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) {
- Feng.success(res.msg)
- } else {
- Feng.error(res.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- checkAjax.setData(param);
- checkAjax.start();
- } else {
- Feng.error(data.msg);
- }
- }, 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.start();
- }
- /**
- * 显示字段或者隐藏字段选择
- */
- TalentAllowanceInfoDlg.toggleField = function () {
- var checkState = $("#checkStateModal").val();
- var process = $("#process").val();
- if (checkState == 2) {
- $("#toProcessDiv").css("display", process == 3 ? "block" : "none");
- $("#field").show();
- } else {
- if (checkState == 3) {
- $("#checkMsg").val(process == 3 ? "复核通过,待核查征信" : "初审通过");
- }
- $("#field").hide();
- $("#field").find("input[type=checkbox]").each(function () {
- $(this).iCheck("uncheck");
- });
- $("#toProcessDiv").css("display", "none");
- }
- }
- /**
- * 审核信息提交
- */
- 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)) {
- Feng.info("请选择审核状态");
- return;
- }
- if (Feng.isEmptyStr(checkMsg)) {
- Feng.info("请填写审核意见");
- return;
- }
- /*if (process == 3 && checkState == 2) {
- var toProcess = $("#toProcess").val();
- if (Feng.isEmptyStr(toProcess)) {
- Feng.info("请选择驳回至流程");
- return;
- }
- if (toProcess == 1) {
- var toDep = $("#toDep").val();
- for (var key in toDep) {
- companyCodes = companyCodes + toDep[key] + ",";
- }
- if (Feng.isEmptyStr(companyCodes)) {
- Feng.info("请选择驳回单位");
- return;
- }
- }
- }*/
- 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")) {
- 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(process ==1 && checkState==2 && projects=='' && files==''){
- // Feng.info("请选择可修改的项目或附件!");
- // return ;
- // }
- if (Feng.isNotEmptyStr(companyCodes)) {
- companyCodes = companyCodes.substring(0, companyCodes.length - 1);
- }
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/check", function (data) {
- if (data.code == 200) {
- layer.close(index);
- Feng.success(data.msg);
- } 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.start();
- }
- /**
- * 提交审核
- */
- TalentAllowanceInfoDlg.submitCheck = function () {
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/submitCheck", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- window.parent.TalentAllowanceInfo.table.refresh();
- TalentAllowanceInfoDlg.close();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("提交审核失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()});
- ajax.start();
- }
- Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
- }
- TalentAllowanceInfoDlg.attendanceCallBack = function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $("#" + data.obj).bootstrapTable("refresh", {});
- $("#jjAttendanceModal").modal("hide");
- } else {
- Feng.info(data.msg);
- }
- }
- TalentAllowanceInfoDlg.initICheck = function () {
- $('input[type=checkbox]').iCheck({
- labelHover: false,
- cursor: true,
- checkboxClass: 'icheckbox_square-green',
- radioClass: 'iradio_square-greene',
- increaseArea: '20%'
- });
- }
- TalentAllowanceInfoDlg.showAllLog = function () {
- var id = $("#id").val();
- 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();
- var pos = file.lastIndexOf("\\");
- $("#fileInput").val(file.substring(pos + 1));
- }
- $(function () {
- if ($("#type").val() == 2) {
- $("#bankNumberSpan,#talentTypeSpan,#introductionModeSpan,#firstInJJTimeSpan").attr("style", "display:none");
- }
- $("select").each(function () {
- +
- $(this).val($(this).attr("value"));
- });
- TalentAllowanceInfoDlg.initFileTable();
- TalentAllowanceInfoDlg.initCommonFileTable();
- TalentAllowanceInfoDlg.initContract();
- TalentAllowanceInfoDlg.showAllLog();
- //批量加载时间控件
- $(".date").each(function () {
- laydate.render({elem: "#" + $(this).attr("id"), type: 'date', trigger: 'click'});
- });
- var process = $("#process").val();
- var compayCode = $("#companyCode").val();
- });
|