123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- $(document).ready(function() {
- $(".onlogin .headnavbtn li").eq(0).addClass("navcurrent");
- var id = $.cookie('orgId');
- if(id == "" || id == null || id == "null"){
- location.href = "cmp-settled-log.html";
- }
-
- function companyInformation() {
- $.ajax({
- url: "/ajax/org/" + id,
- type: "GET",
- timeout: 10000,
- dataType: "json",
- beforeSend: function() {},
- success: function(data, textState) {
- if(data.success) {
- var $data = data.data;
- var otext, oguimo;
- console.log(data);
- if($data.authStatus != 3) {
-
- $("#photoClass").attr("title", "未认证企业");*/
- $("#authBad").show();
- } else {
- $("#photoClass").addClass("authicon-com-ok");
- $("#authOk").show();
- $("#photoClass").attr("title", "认证企业");
- }
- $(".h1Font").find("span").text($data.name);
- if($data.hasOrgLogo) {
- $("#oimg").attr("src", "/images/org/" + $data.id + ".jpg");
- } else {
- $("#oimg").attr("src", "../images/default-icon.jpg");
- }
- if($data.orgUrl) {
- $("#inteAddress").val($data.orgUrl);
- }
- if($data.city) {
- $("#ocity").text($data.city);
- }
- if($data.orgType) {
- switch($data.orgType) {
- case '2':
- otext = "上市企业";
- break;
- case '3':
- otext = "国有企业";
- break;
- case '4':
- otext = "合资企业";
- break;
- case '5':
- otext = "私人企业";
- break;
- case '6':
- otext = "外资企业";
- break;
- case '7':
- otext = "初创企业";
- break;
- default:
- otext = "";
- break;
- }
- if(otext != "")
- $("#cmpBasic").append("<span>" + otext + "</span>")
- }
- if($data.orgSize) {
- switch($data.orgSize) {
- case '1':
- oguimo = "50人以内";
- break;
- case '2':
- oguimo = "50-100人";
- break;
- case '3':
- oguimo = "100-200人";
- break;
- case '4':
- oguimo = "200-500人";
- break;
- case '5':
- oguimo = "500-1000人";
- break;
- case '6':
- oguimo = "1000人以上";
- break;
- default:
- oguimo = "";
- break;
- }
- if(oguimo!="")
- $("#cmpBasic").append("<span>" + oguimo + "</span>")
- }
- if($data.foundTime) {
- var oTime = timeGeshi($data.foundTime);
- $("#cmpBasic").append("<span>" + oTime + "</span>")
- }
- }
- },
- error: function(XMLHttpRequest, textStats, errorThrown) {
- $.MsgBox.Alert('提示', '服务器请求失败')
- }
- })
- }
-
- function timeGeshi(otm) {
- var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8);
- return otme;
- }
- companyInformation();
-
- function companyUser() {
- $.ajax({
- url: "/ajax/professor/qaOrgAuth",
- type: "GET",
- timeout: 10000,
- dataType: "json",
- data: {
- "orgId": id,
- "orgAuth": 1
- },
- beforeSend: function() {},
- success: function(data, textState) {
- if(data.success) {
- console.log(data);
- var $info = data.data;
- userHtml($info);
- }
- },
- error: function(XMLHttpRequest, textStats, errorThrown) {
- $.MsgBox.Alert('提示', '服务器请求失败')
- }
- })
- }
- companyUser();
- function userHtml(arr) {
- for(var i = 0; i < arr.length; i++) {
- var tiof = "",
- img;
- if(arr[i].hasHeadImage) {
- img = "/images/head/" + arr[i].id + "_l.jpg";
- } else {
- img = "../images/default-photo.jpg"
- }
- var oString = '<dd>'
- oString += '<div style="width: 60px;">'
- oString += '<img class="userRadius" src="' + img + '" width="100%" />'
- oString += '<div class="h4Font"><span>' + arr[i].name + '</span></div></div></dd>'
- $("#userList").append(oString);
- }
- }
-
- function companyDemand() {
- $.ajax({
- url: "/ajax/demand/pqOrg",
- type: "GET",
- timeout: 10000,
- dataType: "json",
- data: {
- "orgId": id,
- "demandStatus": 1,
- 'pageSize': 3
- },
- beforeSend: function() {},
- success: function(data, textState) {
- if(data.success) {
- console.log(data);
- var $info = data.data.data;
- companyDemandHtml($info);
- }
- },
- error: function(XMLHttpRequest, textStats, errorThrown) {
- $.MsgBox.Alert('提示', '服务器请求失败')
- }
- })
- }
-
- function companyDemandHtml(arr) {
- for(var i = 0; i < arr.length; i++) {
- var tiof = "",
- img, oTime;
- if(arr[i].professor.hasHeadImage) {
- img = "/images/head/" + arr[i].professor.id + "_l.jpg";
- } else {
- img = "../images/default-photo.jpg"
- }
- if(arr[i].demandAim == 1) {
- tiof = "技术咨询";
- } else if(arr[i].demandAim == 2) {
- tiof = "寻找资源";
- } else if(arr[i].demandAim == 3) {
- tiof = "其他需求";
- }
- if(arr[i].createTime) {
- oTime = arr[i].createTime.substring(0, 4) + '年' + arr[i].createTime.substring(4, 6) + "月" + arr[i].createTime.substring(6, 8) + "日 " + arr[i].createTime.substring(8, 10) + ":" + arr[i].createTime.substring(10, 12)
- }
- var ostring = '<li>'
- ostring += '<div class="leftlogo floatL">'
- ostring += '<img class="userRadius" src="' + img + '" width="100%"/>'
- ostring += '<div class="h4Font"><span>' + arr[i].professor.name + '</span></div></div>'
- ostring += '<div class="rightinfo floatL">'
- ostring += '<p class="h3Font fontweight ellipsisSty">' + arr[i].demandTitle + '</p>'
- ostring += '<p class="h5Font"><span>' + tiof + '</span>-<span>' + oTime + '</span></p></div></li>'
- $(".needUlist").append(ostring);
- }
- }
- companyDemand();
-
- $("#conmliu").on("click",function(){
- window.open("../cmpInforShow.html?orgId="+id);
- })
- })
|