123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- /**
- * 初始化人才基础信息变更详情对话框
- */
- var TalentBasicChangeInfoDlg = {
- talentBasicChangeInfoData: {},
- };
- /**
- * 关闭此对话框
- */
- TalentBasicChangeInfoDlg.close = function () {
- parent.layer.close(window.parent.TalentBasicChange.layerIndex);
- }
- /**
- * 提交审核
- */
- TalentBasicChangeInfoDlg.showCheckModal = function () {
- var checkState = $("#checkState").val();
- if (checkState != 1 && checkState != 9) {
- Feng.info("不在审核范围内");
- return;
- }
- layer.open({
- type: 1,
- id: "checkModel",
- title: '审核',
- area: ['800px', '450px'], //宽高
- fix: false, //不固定
- shade: 0,
- maxmin: true,
- content: " <form id=\"checkForm\" style='margin: 5px'>\n" +
- " <div class=\"form-group\">\n" +
- " <label for=\"checkState\" class=\"control-label\">审核状态</label>\n" +
- " <select class=\"form-control\" id=\"checkStateNow\" onchange=\"TalentBasicChangeInfoDlg.toggleField()\">\n" +
- " <option value=\"\"></option>\n" +
- " <option value=\"3\">审核通过</option>\n" +
- " <option value=\"2\">审核驳回</option>\n" +
- " </select>\n" +
- " </div>\n" +
- " <div class=\"form-group\">\n" +
- " <label for=\"msg\" class=\"control-label\">审核意见</label>\n" +
- " <textarea class=\"form-control\" id=\"msg\" rows='6'></textarea>\n" +
- " </div>\n" +
- " </form>",
- btn: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
- btnAlign: 'c',
- zIndex: layer.zIndex,
- success: function () {
- $("#checkForm")[0].reset();
- },
- yes: function (index, layero) {
- var id = $("#id").val();
- var checkState = $("#checkStateNow").val();
- var msg = $("#msg").val();
- if (checkState == null || checkState == '') {
- Feng.error("请选择审核状态");
- return;
- }
- if (msg == null || msg == '') {
- Feng.error("请填写审核意见");
- return;
- }
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/talentBasicChange/submitToCheck", function (data) {
- if (data.code == "200") {
- Feng.success(data.msg);
- window.parent.TalentBasicChange.table.refresh();
- layer.close(index);
- TalentBasicChangeInfoDlg.close();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": id, "checkState": checkState, "checkMsg": msg});
- ajax.start();
- }
- Feng.confirm("一旦提交,无法修改,确认提交审核吗?", operation);
- }
- });
- }
- TalentBasicChangeInfoDlg.toggleField = function () {
- var checkState = $("#checkStateNow").val();
- if (checkState == 3) {
- $("#msg").val("审核通过。");
- } else if (checkState == 2) {
- $("#msg").val("");
- }
- }
- $(function () {
- var id = $("#id").val();
- $(".date").each(function () {
- laydate.render({
- elem: this,
- type: "date",
- range: true,
- trigger: "click"
- })
- })
- //批量加载字典表数据
- var arr = [
- {"name": "oldNationality", "code": "nationality"},
- {"name": "oldNation", "code": "nation"},
- {"name": "oldPolitics", "code": "politics"},
- {"name": "oldCardType", "code": "card_type"},
- {"name": "newNationality", "code": "nationality"},
- {"name": "newNation", "code": "nation"},
- {"name": "newPolitics", "code": "politics"},
- {"name": "newCardType", "code": "card_type"}
- ];
- Feng.findChildDictBatch(JSON.stringify(arr));
- //select初始化
- $("select").each(function () {
- $(this).val($(this).attr("value")).trigger("change");
- });
- Feng.getCheckLog("logTable", {"type": CONFIG.project_basicchange, "mainId": id, "typeFileId": "", "active": 1})
- $("input,select").attr("style", "pointer-events: none;background-color: #eee;");
- });
|