/** * 初始化人才认定申报详情对话框 */ var TalentInfoInfoDlg = { talentInfoInfoData : {}, }; /** * 获取人才认定 */ TalentInfoInfoDlg.getIdentifyCondition = function() { var level = $("#talentArrange").val(); var type = $("#type").val(); var source = $("#source").val(); var talentType = $("#talentType").val(); if(level==null||level==''){ $("#identifyCondition").empty(); $("#identifyCondition").trigger('chosen:updated'); return; } if(type==null||type==''){ Feng.info("请先选择申报类别"); return ; } if(source==null||source==''){ $("#identifyCondition").empty(); $("#identifyCondition").trigger('chosen:updated'); $("#talentArrange").val(""); Feng.info("请先选择申报来源"); return ; } if(talentType==null||talentType==''){ $("#identifyCondition").empty(); $("#identifyCondition").trigger('chosen:updated'); $("#talentArrange").val(""); Feng.info("请先选择人才标签"); return ; } if(source == 2){ source = 1; } Feng.addAjaxSelect({ "id": "identifyCondition", "displayCode": "id", "displayName": "name", "type": "GET", "url": Feng.ctxPath + "/api/common/findIdentifyConditionByLevel?talentLevel="+level+"&type="+type+"&source="+source+"&talentType="+talentType }); $("#identifyCondition").trigger('chosen:updated'); } TalentInfoInfoDlg.bankChange = function () { var bank = $("#bank").val(); if($.trim(bank)=='中国工商银行'){ $("#bankNumber").val('102391050013'); }else { $("#bankNumber").val(''); } } /** * 加载市 */ TalentInfoInfoDlg.afterSelectProvince = function () { var province = $("#provinceCode").val(); $("#cityCode").empty(); $("#countyCode").empty(); if(province==null||province==''){ return; } Feng.addAjaxSelect({ "id": "cityCode", "displayCode": "code", "displayName": "name", "type": "GET", "url": Feng.ctxPath + "/api/commonLocation/findCityByProvinceSelect/"+province }); } /** * 加载县 */ TalentInfoInfoDlg.afterSelectCity = function (){ var city = $("#cityCode").val(); $("#countyCode").empty(); if(city==null||city==''){ return; } Feng.addAjaxSelect({ "id": "countyCode", "displayCode": "code", "displayName": "name", "type": "GET", "url": Feng.ctxPath + "/api/commonLocation/findCountyByCitySelect/"+city }); } //人才标签变化 TalentInfoInfoDlg.typeChange = function(context){ var talentType = $(context).val(); if(talentType=='gbwszb' || talentType=='zzbsh' || talentType == 'sydw'){ $("#letterTime").parent().attr("style","display:block"); // }else if(talentType=='gyqyl' || talentType=="gyqyh"){ // $("#letterTime").parent().attr("style","display:none"); // $("#letterTime").val(''); }else{ $("#letterTime").parent().attr("style","display:none"); $("#letterTime").val(''); } } TalentInfoInfoDlg.sourceChange = function(){ var source = $("#source").val(); if(source==1){ $("#fromCity").parent().attr("style","display:none"); $("#qzBatch").parent().attr("style","display:block"); $("#qzgccrcActiveTime").parent().attr("style","display:block"); $("#certificateStartTime").parent().attr("style","display:block"); $("#ourCitySource").parent().attr("style","display:block"); $("#fromCity").val(""); } if(source==2){ $("#qzgccrcActiveTime").parent().attr("style","display:block"); $("#certificateStartTime").parent().attr("style","display:block"); $("#fromCity").parent().attr("style","display:block"); $("#qzBatch").parent().attr("style","display:block"); $("#ourCitySource").parent().attr("style","display:none"); $("#ourCitySource").val(""); } if(source==3||source==null||source==''){ $("#qzgccrcActiveTime").parent().attr("style","display:none"); $("#certificateStartTime").parent().attr("style","display:none"); $("#fromCity").parent().attr("style","display:none"); $("#qzBatch").parent().attr("style","display:none"); $("#ourCitySource").parent().attr("style","display:none"); $("#ourCitySource").val(""); $("#qzgccrcActiveTime").val(''); $("#certificateStartTime").val(''); $("#fromCity").val(""); $("#qzBatch").val(""); } $("#talentArrange").val("").trigger("change"); // $("#identifyCondition").empty(); // $("#identifyCondition").trigger('chosen:updated'); } //初始化附件类别表单 TalentInfoInfoDlg.initFileTable = function (){ var queryData = {}; queryData['project'] = CONFIG.project_rcrd; queryData['type'] = $("#type").val(); $("#fileTable").bootstrapTable({ url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType", 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, //是否显示父子表 pageList: [10, 30, 50], queryParams: function (params) { return $.extend(queryData,params) }, rowStyle: function (row, index) { return {classes:"info"}; }, columns: TalentInfoInfoDlg.initFileTypeColumn(), onPostBody: function () { $("td.uitd_showTip").bind("mouseover", function () { var htm = $(this).html(); $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show'); }); }, onLoadSuccess: function (data) { $("#fileTable").bootstrapTable('expandAllRows'); }, onExpandRow: function (index, row, $detail) { var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/listTalentFile", function (data) { if(data==null||data.length==0){ return; } var html = '