| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516 | 
							- /**
 
-  * 积分申报审核
 
-  */
 
- var IntegralVerify = {
 
-     id: "IntegralVerifyTable", //表格id
 
-     seItem: null, //选中的条目
 
-     table: null,
 
-     layerIndex: -1
 
- };
 
- IntegralVerify.formParams = function () {
 
-     var queryData = {};
 
-     queryData['name'] = $("#name").val();
 
-     queryData['card_number'] = $("#card_number").val();
 
-     queryData['phone'] = $("#phone").val();
 
-     queryData['email'] = $("#email").val();
 
-     queryData['checkState'] = $("#checkState").val();
 
-     queryData['apply_year'] = $("#apply_year").val();
 
-     queryData['enterprise_id'] = $("#enterprise_id").val();
 
-     queryData['shareholder'] = $("#shareholder").val();
 
-     return queryData;
 
- }
 
- /**
 
-  * 初始化表格的列
 
-  */
 
- IntegralVerify.initColumn = function () {
 
-     var type = $("#type").val();
 
-     return [
 
-         {field: 'selectItem', radio: true},
 
-         {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', width: '80px'},
 
-         {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px",
 
-             formatter: function (value, row, index) {
 
-                 if (row.sex == 1) {
 
-                     return value + '<span style="color:#6495ED">【男】</span>';
 
-                 } else if (row.sex == 2) {
 
-                     return value + '<span style="color:#FF82AB">【女】</span>';
 
-                 } else {
 
-                     return value;
 
-                 }
 
-             }
 
-         },
 
-         {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
 
-         {title: '所属单位', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: "100px"},
 
-         {title: '是否股东', field: 'shareholder', visible: true, align: 'center', valign: 'middle', width: "100px",
 
-             formatter: function (value, row, index) {
 
-                 if (value == 1) {
 
-                     return '是';
 
-                 }
 
-                 if (value == 2) {
 
-                     return '否';
 
-                 }
 
-             }
 
-         },
 
-         {title: '申报标准', field: 'details', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
 
-         {title: '首次提交时间', field: 'first_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
 
-         {title: '最新提交时间', field: 'new_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
 
-         {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "100px",
 
-             formatter: function (value, row, index) {
 
-                 if (row.real_state != row.checkState) {
 
-                     switch (row.real_state) {
 
-                         case 4:
 
-                             return "<span class='label label-danger'>初审驳回</span>";
 
-                         case 7:
 
-                             //复审驳回
 
-                             return "<span class='label label-success'>待重新初审</span>";
 
-                     }
 
-                 } else {
 
-                     switch (value) {
 
-                         case 2:
 
-                             if (row.last_state == 4) {
 
-                                 return "<span class='label label-success'>待初审(重新提交)</span>";
 
-                             }
 
-                             return "<span class='label label-success'>待初审</span>";
 
-                         case 3:
 
-                             return "<span class='label label-success'>待复审</span>";
 
-                         case 5:
 
-                             return "<span class='label label-danger'>初审不通过</span>";
 
-                         case 6:
 
-                             return "<span class='label label-success'>复审通过待核查征信</span>";
 
-                         case 8:
 
-                             return "<span class='label label-danger'>复审不通过</span>";
 
-                     }
 
-                 }
 
-             }
 
-         },
 
-         {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
 
-             formatter: function (value, row, index) {
 
-                 return "<span class='label label-success' onclick=\"IntegralVerify.showLog('" + value + "')\" >" +
 
-                         "<i class=\"fa fa-book\"></i>日志" +
 
-                         "</span>";
 
-             }
 
-         }
 
-     ];
 
- };
 
- /**
 
-  * 检查是否选中
 
-  */
 
- IntegralVerify.check = function () {
 
-     var selected = $('#' + this.id).bootstrapTable('getSelections');
 
-     if (selected.length != 1) {
 
-         Feng.info("请先选中表格中的某一记录!");
 
-         return false;
 
-     } else {
 
-         IntegralVerify.seItem = selected[0];
 
-         return true;
 
-     }
 
- };
 
- /**
 
-  * 查询人才认定申报列表
 
-  */
 
- IntegralVerify.search = function () {
 
-     IntegralVerify.table.refresh({query: IntegralVerify.formParams()});
 
- };
 
- /**
 
-  * 重置
 
-  */
 
- IntegralVerify.reset = function () {
 
-     $("#name").val("");
 
-     $("#card_number").val("");
 
-     $("#phone").val("");
 
-     $("#email").val("");
 
-     $("#checkState").val("");
 
-     $("#apply_year").val("");
 
-     $("#enterprise_id").val("").trigger("chosen:updated");
 
-     $("#shareholder").val("");
 
- }
 
- /**
 
-  * 显示导出模态框
 
-  */
 
- IntegralVerify.showExportModal = function () {
 
-     $("#exportForm")[0].reset();
 
-     $("#commonExportModal").modal("show");
 
- }
 
- /**
 
-  * 导出提交
 
-  */
 
- IntegralVerify.export = function (process) {
 
-     var names = '';
 
-     var values = '';
 
-     var commonExport = "";
 
-     $("#field_info li input").each(function (index) {
 
-         if ($(this).is(":checked")) {
 
-             values = values + $(this).val() + ",";
 
-             names = names + $(this).next().text() + ",";
 
-         }
 
-     });
 
-     var queryData = IntegralVerify.formParams();
 
-     var process = parseInt($("#process").val());
 
-     switch (process) {
 
-         case 1:
 
-             commonExport = "fstVerifyListExport";
 
-             break;
 
-         case 2:
 
-             commonExport = "reVerifyListExport";
 
-             break;
 
-         case 3:
 
-             commonExport = "preListExport";
 
-             break;
 
-     }
 
-     $("#commonExportModal").modal('hide');
 
-     var params = $("#exportForm").serialize();
 
-     var url = "/admin/integralVerify/" + commonExport + "?" + params;
 
-     window.location.href = url;
 
- }
 
- /**
 
-  * 下载
 
-  */
 
- IntegralVerify.download = function () {
 
-     if (this.check()) {
 
-         window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=20&id=" + IntegralVerify.seItem.id));
 
-     }
 
- }
 
- IntegralVerify.openCheckIntegralVerify = function () {
 
-     var process = $("#process").val();
 
-     var title = "";
 
-     switch (process) {
 
-         case "1":
 
-             title = "初审";
 
-             break;
 
-         case "2":
 
-             title = "复审";
 
-             break;
 
-         default:
 
-             break;
 
-     }
 
-     if (this.check()) {
 
-         var index = layer.open({
 
-             type: 2,
 
-             title: '积分申报' + " - " + title,
 
-             area: ['800px', '420px'], //宽高
 
-             fix: false, //不固定
 
-             maxmin: true,
 
-             content: '/admin/integralVerify/detail/id/' + IntegralVerify.seItem.id + '/1',
 
-             btn: ['<i class="fa fa-eye"></i>  保存未提交', '<i class="fa fa-save"></i>  提交审核', '<i class="fa fa-eraser"></i>  关闭'],
 
-             btnAlign: 'c',
 
-             btn1: function (index, layero) {
 
-                 var obj = layero.find("iframe")[0].contentWindow;
 
-                 obj.IntegralVerifyInfoDlg.showFirstCheckModal();
 
-             }, btn2: function (index, layero) {
 
-                 var obj = layero.find("iframe")[0].contentWindow;
 
-                 obj.IntegralVerifyInfoDlg.submitCheck();
 
-                 return false;
 
-             }
 
-         });
 
-         layer.full(index);
 
-         IntegralVerify.layerIndex = index;
 
-     }
 
- }
 
- /**
 
-  * 显示审核日志
 
-  */
 
- IntegralVerify.showLog = function (id) {
 
-     layer.open({
 
-         type: 1,
 
-         title: "日志",
 
-         fixed: false,
 
-         content: '<table id="' + id + '"></table>',
 
-         area: ['80%', '80%'],
 
-         maxmin: true,
 
-         success: function (layero, index) {
 
-             Feng.getCheckLog(id, {"type": CONFIG.project_integral_apply, "mainId": id, "typeFileId": "", "active": 1})
 
-         }
 
-     });
 
- }
 
- /**
 
-  * 修改驳回的字段及附件
 
-  */
 
- IntegralVerify.updateFieldsAndFiles = function () {
 
-     if (this.check()) {
 
-         var ajax = new $ax("/admin/integralVerify/findFieldsAndFiles?id=" + IntegralVerify.seItem.id, function (data) {
 
-             var obj = data.obj;
 
-             if (data.code == 200) {
 
-                 layer.open({
 
-                     type: 1,
 
-                     id: "neewFieldFormModel",
 
-                     title: '修改',
 
-                     area: ['800px', '450px'], //宽高
 
-                     fix: false, //不固定
 
-                     shade: 0,
 
-                     maxmin: true,
 
-                     content: IntegralVerify.creatFieldCheckModal(),
 
-                     btn: ['<i class="fa fa-save"></i>  提交', '<i class="fa fa-eraser"></i>  关闭'],
 
-                     btnAlign: 'c',
 
-                     zIndex: layer.zIndex,
 
-                     success: function (layero, index) {
 
-                         var obj = data.obj.record;
 
-                         if (typeof data.obj.fieldList != "undefined" && data.obj.fieldList.length > 0) {
 
-                             var fieldList = data.obj.fieldList;
 
-                             var html1 = '';
 
-                             for (var key in fieldList) {
 
-                                 html1 = html1 + '<li style="float:left;margin:0 10px 10px 0;"><input type="checkbox" value="' + fieldList[key]["key"] + '"><span>' + fieldList[key]["value"] + '</span></li>';
 
-                             }
 
-                         }
 
-                         var html2 = '';
 
-                         html2 = html2 + '<ul><li style="width: 100%"><input type="checkbox" value="1"><span>允许修改</span></li></ul>';
 
-                         $("#field_info ul").css("overflow", "hidden").empty().append(html1);
 
-                         $("#field_file").css("overflow", "hidden").empty().append(html2);
 
-                         if (obj.fields != null && obj.fields != '') {
 
-                             $("#field_info input").each(function () {
 
-                                 for (var key in obj.fields) {
 
-                                     if ($(this).val() == obj.fields[key]) {
 
-                                         this.checked = true;
 
-                                     }
 
-                                 }
 
-                             });
 
-                         }
 
-                         if (obj.files == 1) {
 
-                             $("#field_file input").each(function () {
 
-                                 this.checked = true;
 
-                             });
 
-                         }
 
-                     },
 
-                     yes: function (index, layero) {
 
-                         IntegralVerify.submitFieldsAndFiles(index, IntegralVerify.seItem.id);
 
-                     }
 
-                 });
 
-             } else {
 
-                 Feng.error(data.msg);
 
-             }
 
-         }, function (data) {
 
-             Feng.error("查询失败!" + data.responseJSON.message + "!");
 
-         });
 
-         ajax.start();
 
-     }
 
- }
 
- /**
 
-  * 修改提交
 
-  * @param index
 
-  * @param id
 
-  */
 
- IntegralVerify.submitFieldsAndFiles = function (index, id) {
 
-     var fields = '';
 
-     var files = '';
 
-     $("#firstCheckForm #field_info li input").each(function (index) {
 
-         if ($(this).is(":checked")) {
 
-             fields = fields + $(this).val() + ",";
 
-         }
 
-     });
 
-     $("#field_file li input").each(function (index) {
 
-         if ($(this).is(":checked")) {
 
-             files = files + $(this).val() + ",";
 
-         }
 
-     });
 
-     if (fields == '' && files == '') {
 
-         Feng.info("请选择可修改的字段或附件!");
 
-         return;
 
-     }
 
-     var ajax = new $ax("/admin/integralVerify/updateFieldsAndFiles", 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, "fields": fields, "files": files})
 
-     ajax.start();
 
- }
 
- /**
 
-  * 审核不通过
 
-  */
 
- IntegralVerify.setNotPass = function () {
 
-     var selecteds = $('#' + this.id).bootstrapTable('getSelections');
 
-     if (selecteds.length == 0) {
 
-         Feng.info("请选择需要设置审核不通过的行");
 
-         return;
 
-     }
 
-     var ids = "";
 
-     for (var key in selecteds) {
 
-         ids = ids + selecteds[key].id + ",";
 
-     }
 
-     ids = ids.substring(0, ids.length - 1);
 
-     layer.open({
 
-         type: 1,
 
-         id: "notPassModal",
 
-         title: '修改',
 
-         area: ['800px', '450px'], //宽高
 
-         fix: false, //不固定
 
-         shade: 0,
 
-         maxmin: true,
 
-         content: '<form id="checkNotPass">\n' +
 
-                 '                    <div class="form-group" style="margin: 10px;">\n' +
 
-                 '                        <label for="checkMsgNotPass" class="control-label" >审核不通过原因</label>\n' +
 
-                 '                        <textarea class="form-control" id="checkMsgNotPass" placeholder="此功能适用于未在申报提交截止时间内提交的数据"  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,
 
-         yes: function (index, layero) {
 
-             var checkMsg = $("#checkMsgNotPass").val();
 
-             if (Feng.isEmptyStr(checkMsg)) {
 
-                 Feng.info("请填写审核不通过原因");
 
-                 return;
 
-             }
 
-             var operation = function () {
 
-                 var ajax = new $ax("/admin/integralVerify/cancel_verify", function (data) {
 
-                     if (data.code == 200) {
 
-                         Feng.success(data.msg);
 
-                         IntegralVerify.table.refresh();
 
-                         layer.close(index);
 
-                     } else {
 
-                         Feng.error(data.msg);
 
-                     }
 
-                 }, function (data) {
 
-                     Feng.error("设置审核不通过失败!" + data.responseJSON.message + "!");
 
-                 });
 
-                 ajax.set("ids", ids);
 
-                 ajax.set("msg", checkMsg);
 
-                 ajax.start();
 
-             }
 
-             Feng.confirm("一旦提交无法修改,确定设置所选数据为审核不通过?", operation);
 
-         }
 
-     });
 
- }
 
- IntegralVerify.creatFieldCheckModal = function () {
 
-     return '<form id="firstCheckForm">\n' +
 
-             '                    <div class="form-group" style="margin: 10px;">\n' +
 
-             '                        <div >\n' +
 
-             '                            <label for="checkMsg" class="control-label">可修改字段</label>\n' +
 
-             '                            <div id="field_info">\n' +
 
-             '                                <ul>\n' +
 
-             '                                </ul>\n' +
 
-             '                            </div>\n' +
 
-             '                            <label for="checkMsg" class="control-label">可修改附件</label>\n' +
 
-             '                            <div id="field_file">\n' +
 
-             '                            </div>\n' +
 
-             '                            <div class="form-group" style="text-align: center">\n' +
 
-             '                                <button type="button" class="btn btn-primary" onclick="IntegralVerify.checkAll()">全选</button>\n' +
 
-             '                                <button type="button" class="btn btn-success" onclick="IntegralVerify.unCheckAll()">反选</button>\n' +
 
-             '                            </div>\n' +
 
-             '                        </div>\n' +
 
-             '                    </div>\n' +
 
-             '                </form>';
 
- }
 
- IntegralVerify.fieldCheckd = function (context) {
 
-     if ($(context).get(0).checked) {
 
-         $(context).parent().next().children()[0].checked = true;
 
-         $(context).parent().next().children().eq(0).trigger("change");
 
-     }
 
- }
 
- IntegralVerify.sourceCheckd = function (context) {
 
-     if ($(context).get(0).checked) {
 
-         $("#talentArrangeCheckBox").attr("checked", true);
 
-         $("#talentArrangeCheckBox").trigger("change");
 
-     }
 
- }
 
- IntegralVerify.getPhones = function () {
 
-     var process = $("#process").val();
 
-     var ajax = new $ax("/admin/integralVerify/getPhones/process/" + process, function (data) {
 
-         if (data.code == 200) {
 
-             layer.open({
 
-                 type: 1,
 
-                 title: "手机号码",
 
-                 area: ['830px', '300px'], //宽高
 
-                 fix: false, //不固定
 
-                 maxmin: true,
 
-                 content: "<span style='word-break:break-all'>" + data.obj + "</span>"
 
-             });
 
-         } else {
 
-             Feng.info(data.msg);
 
-         }
 
-     }, function (data) {
 
-         Feng.error("操作失败!");
 
-     });
 
-     ajax.setData(IntegralVerify.formParams());
 
-     ajax.start();
 
- }
 
- IntegralVerify.getEnterprisePhones = function () {
 
-     var process = $("#process").val();
 
-     var ajax = new $ax("/admin/integralVerify/getEnterprisePhones/process/" + process, function (data) {
 
-         if (data.code == 200) {
 
-             layer.open({
 
-                 type: 1,
 
-                 title: "手机号码",
 
-                 area: ['830px', '300px'], //宽高
 
-                 fix: false, //不固定
 
-                 maxmin: true,
 
-                 content: "<span style='word-break:break-all'>" + data.obj + "</span>"
 
-             });
 
-         } else {
 
-             Feng.info(data.msg);
 
-         }
 
-     }, function (data) {
 
-         Feng.error("操作失败!");
 
-     });
 
-     ajax.setData(IntegralVerify.formParams());
 
-     ajax.start();
 
- }
 
- /**
 
-  * 全选
 
-  */
 
- IntegralVerify.checkAll = function () {
 
-     $("#field_info input").each(function () {
 
-         this.checked = true;
 
-     })
 
- }
 
- /**
 
-  * 反选
 
-  */
 
- IntegralVerify.unCheckAll = function () {
 
-     $("#field_info input").each(function () {
 
-         if (this.checked) {
 
-             this.checked = false;
 
-         } else {
 
-             this.checked = true;
 
-         }
 
-     })
 
- }
 
- $(function () {
 
-     var defaultColunms = IntegralVerify.initColumn();
 
-     var process = $("#process").val();
 
-     var table = new BSTable(IntegralVerify.id, "/admin/integralVerify/list/process/" + process, defaultColunms);
 
-     table.setPaginationType("server");
 
-     table.setSingleSelect(false);
 
-     table.setOnDblClickRow(function () {
 
-         IntegralVerify.openCheckIntegralVerify();
 
-     });
 
-     IntegralVerify.table = table.init();
 
-     $("#enterprise_id").on('chosen:ready', function (e, params) {
 
-         $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
 
-     });
 
-     $("#enterprise_id").val("");
 
-     $("#enterprise_id").trigger('chosen:updated');
 
-     $("#enterprise_id").chosen({
 
-         search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
 
-         disable_search: false,
 
-         width: "100%",
 
-         enable_split_word_search: true
 
-     });
 
- });
 
 
  |