Browse Source

改版员工,修改企业主页、,修改文章发布、新增上传附件

luyanan 6 years ago
parent
commit
b73ac29a1c

+ 12 - 0
articalPreview.html

@ -30,6 +30,9 @@
30 30
					<div class="showMain" id="articleContent">
31 31

32 32
					</div>
33
					<!--附件模块-->
34
					<ul class="atachList" id="atachList">
35
					</ul>
33 36
					<!--标签模块-->
34 37
					<ul class="tagList" id="tagList">
35 38
						
@ -51,6 +54,15 @@
51 54
							</ul>
52 55
						</div>
53 56
					</div>
57
					<!--相关产品-->
58
					<div class="form-item otherShow displayNone">
59
						<div class="aboutTit">相关产品</div>
60
						<div class="form-result aboutRes">
61
							<ul id="oProducts">
62
								
63
							</ul>
64
						</div>
65
					</div>
54 66
					<!--相关资源-->
55 67
					<div class="form-item otherShow displayNone">
56 68
						<div class="aboutTit">相关资源</div>

+ 12 - 1
articalShow.html

@ -31,9 +31,11 @@
31 31
							<div class="showBigOpen" id="articleImg"></div>
32 32
							<!--文章内容区-->
33 33
							<div class="showMain" id="articleContent"></div>
34
							<!--附件模块-->
35
							<ul class="atachList" id="atachList">
36
							</ul>
34 37
							<!--标签模块-->
35 38
							<ul class="tagList" id="tagList">
36
							
37 39
							</ul>
38 40
							<!--相关专家-->
39 41
							<div class="form-item otherShow otherShowFirst displayNone">
@ -52,6 +54,15 @@
52 54
									</ul>
53 55
								</div>
54 56
							</div>
57
							<!--相关产品-->
58
							<div class="form-item otherShow displayNone">
59
								<div class="aboutTit">相关产品</div>
60
								<div class="form-result aboutRes">
61
									<ul id="oProducts">
62
										
63
									</ul>
64
								</div>
65
							</div>
55 66
							<!--相关资源-->
56 67
							<div class="form-item otherShow displayNone">
57 68
								<div class="aboutTit">相关资源</div>

+ 70 - 59
cmp-portal/articalIssue.html

@ -13,6 +13,10 @@
13 13
<link type="text/css" href="css/common.css" rel="stylesheet">
14 14
<link type="text/css" href="css/cmpindex.css" rel="stylesheet">
15 15
<script type="text/javascript" src="js/public/jquery-1.11.1.js"></script>
16
<style type="text/css">
17
	.rightconBox .conItem{display: none;}
18
	.rightconBox .conItem:first-child{display: block;}
19
</style>
16 20
</head>
17 21
<body>
18 22
<header id="header">
@ -125,21 +129,6 @@
125 129
							</ul>
126 130
						</div>
127 131
					</div>
128
					<!--<div class="form-item otherBlock">
129
						<div class="aboutTit">相关资源<span class="frmconmsg"></span></div>
130
						<input type="text" class="frmtype frmcontype" placeholder="请输入资源名称" id="checkZy" value="" />
131
						<div class="form-drop displayNone">
132
							<ul class="expertlist" id="resouselist">
133
								
134
							</ul>
135
						</div>
136
						<div class="form-result">
137
							<ul class="addexpert" id="resources">
138
								
139
							</ul>
140
						</div>
141
					</div>-->
142
					
143 132
				</div>
144 133
				<div class="conItem">
145 134
					<div class="form-item otherBlock">
@ -188,6 +177,30 @@
188 177
						</div>
189 178
					</div>
190 179
				</div>
180
				<div class="conItem">
181
					<div class="form-item otherBlock">
182
						<div class="aboutTit">本文相关产品<span class="frmconmsg"></span></div>
183
						<input type="text" class="frmtype frmcontype" placeholder="请输入产品名称" id="product" value="">
184
						<div class="form-drop">
185
							<ul class="expertlist" id="productlist">
186
							</ul>
187
						</div>
188
						<div class="form-result">
189
							<ul class="addexpert" id="productli">
190
							</ul>
191
						</div>
192
					</div>
193
				</div>
194
				<div class="conItem">
195
					<div class="form-item otherBlock">
196
						<div class="aboutTit">上传附件</div>
197
						<div id="upAttachPicker" class="upAttech">点击这里上传附件</div>
198
						<div class="form-result" style="margin-top:0">
199
							<ul class="addexpert" id="fileAttachList">
200
							</ul>
201
						</div>
202
					</div>
203
				</div>
191 204
			</div>
192 205
		</div>
193 206
	</div>
@ -237,51 +250,49 @@ $(".mb_close,.mb_btnNo").click(function() {
237 250
})
238 251
//初始引用编辑器
239 252
ue = UE.getEditor('editor', {});
240
// 初始化Web Uploader
253
// 上传图片
241 254
var uploader = WebUploader.create({
242
    auto: true,
243
    swf: '../js/webuploader/Uploader.swf',
244
    server: '../ajax/cachedFileUpload',
245
    fileSingleSizeLimit: 2 * 1024 * 1024,
246
    duplicate:true,
247
    pick : {
248
    	id : "#filePicker",
249
    	multiple: false
250
    	},
251
    accept: {// 只允许选择图片文件。
252
        title: 'Images',
253
        extensions: 'jpg,jpeg,png',
254
        mimeTypes: 'image/jpg,image/jpeg,image/png'
255
    }
256
   
257
});
258
uploader.onError = function(code) {
259
	if(code=="F_EXCEED_SIZE"){
260
		$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过2M')	
261
	}
262
};
263
// 当有文件添加进来的时候
264
uploader.on( 'fileQueued', function( file ) {
265
    uploader.makeThumb( file, function( error, src ) {
266
        $("#uploader").css("background-image","url("+src+")");
267
        $(".imgtis").text("");
268
        $(".upFront").hide();
269
        $(".upBackbtn").show();
270
    }, 1, 1 );
271
    
272
});
273

274
// 文件上传成功,给item添加成功class, 用样式标记上传成功。
275
cacheImageKey="";
276
uploader.on( 'uploadSuccess', function(file,data) {
277
	if(data.success) {
278
		cacheImageKey =data.data[0].cacheKey;
279
		$("#uploader").attr("data-id",cacheImageKey);
280
	}else{
281
		$.MsgBox.Alert('提示', '只支持jpeg/jpg/png格式的图片');
282
		$("#uploader").css("background-image","url('')");
283
	}
284
});
255
	    auto: true,
256
	    swf: '../js/webuploader/Uploader.swf',
257
	    server: '../ajax/cachedFileUpload',
258
	    fileSingleSizeLimit: 2 * 1024 * 1024,
259
	    duplicate:true,
260
	    pick : {
261
	    	id : "#filePicker",
262
	    	multiple: false
263
	    	},
264
	    accept: {// 只允许选择图片文件。
265
	        title: 'Images',
266
	        extensions: 'jpg,jpeg,png',
267
	        mimeTypes: 'image/jpg,image/jpeg,image/png'
268
	    }
269
	   
270
	});
271
	uploader.onError = function(code) {
272
		if(code=="F_EXCEED_SIZE"){
273
			$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过2M')	
274
		}
275
	};
276
	// 当有文件添加进来的时候
277
	uploader.on( 'fileQueued', function( file ) {
278
	    uploader.makeThumb( file, function( error, src ) {
279
	        $("#uploader").css("background-image","url("+src+")");
280
	        $(".imgtis").text("");
281
	        $(".upFront").hide();
282
	        $(".upBackbtn").show();
283
	    }, 1, 1 );
284
	    
285
	});
286
	cacheImageKey="";
287
	uploader.on( 'uploadSuccess', function(file,data) {
288
		if(data.success) {
289
			cacheImageKey =data.data[0].cacheKey;
290
			$("#uploader").attr("data-id",cacheImageKey);
291
		}else{
292
			$.MsgBox.Alert('提示', '只支持jpeg/jpg/png格式的图片');
293
			$("#uploader").css("background-image","url('')");
294
		}
295
	});
285 296
</script>
286 297

287 298
</body>

+ 30 - 2
cmp-portal/articalModify.html

@ -15,7 +15,10 @@
15 15
<link type="text/css" href="css/cmpindex.css" rel="stylesheet">
16 16

17 17
<script type="text/javascript" src="js/public/jquery-1.11.1.js"></script>
18

18
<style type="text/css">
19
	.rightconBox .conItem{display: none;}
20
	.rightconBox .conItem:first-child{display: block;}
21
</style>
19 22
</head>
20 23

21 24
<body>
@ -189,7 +192,32 @@
189 192
							</ul>
190 193
						</div>
191 194
					</div>
192
				</div>	</div>
195
				</div>
196
				<div class="conItem">
197
					<div class="form-item otherBlock">
198
						<div class="aboutTit">本文相关产品<span class="frmconmsg"></span></div>
199
						<input type="text" class="frmtype frmcontype" placeholder="请输入产品名称" id="product" value="">
200
						<div class="form-drop">
201
							<ul class="expertlist" id="productlist">
202
							</ul>
203
						</div>
204
						<div class="form-result">
205
							<ul class="addexpert" id="productli">
206
							</ul>
207
						</div>
208
					</div>
209
				</div>
210
				<div class="conItem">
211
					<div class="form-item otherBlock">
212
						<div class="aboutTit">上传附件<span class="frmconmsg"></span></div>
213
						<div id="upAttachPicker" class="upAttech">点击这里上传附件</div>
214
						<div class="form-result" style="margin-top:0">
215
							<ul class="addexpert" id="fileAttachList">
216
							</ul>
217
						</div>
218
					</div>
219
				</div>
220
			</div>
193 221
		</div>
194 222
	</div>
195 223
</div>

+ 0 - 63
cmp-portal/cmp-UnstaffList.html

@ -1,63 +0,0 @@
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>员工-企业工作台-科袖网</title>
8
<link rel="shortcut icon" href="images/favicon.ico "/>
9
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
10
<link type="text/css" href="../css/genindex.css" rel="stylesheet">
11
<link type="text/css" rel="stylesheet" href="css/common.css">
12
<link type="text/css" rel="stylesheet" href="css/cmpindex.css">
13
<script type="text/javascript" src="js/public/jquery-1.11.1.js"></script>
14
</head>
15
<body>
16

17
<!--头部-->
18
<header>
19
	<script type="text/javascript" src="js/public/cmpHeader.js"></script>
20
</header>
21

22
<!--中间-->
23
<div id="container">
24
	<div class="containerCon">
25
		<div class="con-center contentCon clearfix conBlock">
26
	        <div class="workmenu">
27
	        	<script src="js/public/workMenu.js"></script>
28
	        </div>
29
		    <div class="workcon workconG">
30
			    <div class="workcontit">
31
			    	<a href="cmp-staffList.html" class="worksamlltit">员工管理</a>
32
					<a class="worksamlltit worksamlltitnow">员工认证</a>
33
			    </div>	
34
			    <div class="worksubcon clearfix">
35
					<!--员工认证-->
36
					<div class="workblock clearfix">
37
						<div class="workselectcon">
38
							<form class="stafffrm">
39
								<p class="smalltip">列表中的用户在资料中填写了您的企业名称,点击认证后,该用户将成为您的【企业认证员工】,能够以您企业的名义发布需求。</p>
40
							</form>
41
							<ul class="staffMana bgRadius clearfix" id="UnauthorizedUserList">
42
								
43
							</ul>
44
						</div>
45
					</div>	
46
				</div>
47
			</div>
48
        </div>
49
	</div>
50
</div>
51

52

53
<!--底部-->
54
<footer>
55
	<script type="text/javascript" src="js/public/cmpFooter.js"></script>
56
</footer>
57
<script type="text/javascript"src="js/public/jquery.cookie.js"></script>
58
<script type="text/javascript"src="js/public/jquery.similar.msgbox.js"></script>
59
<script type="text/javascript" src="../js/public/baseUtil.js"></script> 
60
<script type="text/javascript" src="js/public/cmpCom.js"></script>   
61
<script type="text/javascript"src="js/cmp-UnstaffList.js"></script>
62
</body>
63
</html>

+ 3 - 3
cmp-portal/cmp-settled-reg.html

@ -26,8 +26,8 @@
26 26
		<form class="cmpAllFrm">
27 27
			<ul class="cmpAllUl cmpSettledul" id="cmpSettledul">
28 28
				<li>
29
					<p class="smalltip">请输入与营业执照一致的企业名称,注册后不可更改</p>
30
					<input type="text" class="frmtype frmtypeW" placeholder="请输入企业名称" id="companyName"/>
29
					<p class="smalltip">请输入与营业执照一致的企业名称,注册后不可更改</p>
30
					<input type="text" class="frmtype frmtypeW" placeholder="请输入与营业执照一致的企业名称,注册后不可更改" id="companyName"/>
31 31
					<div class="frmmsg msgReg1"><span></span></div>
32 32
					<!--<div class="frmmsg msgReg1"><span>该企业已注册企业账户,若您是企业管理者,<a class="cmpColor" href="cmp-settled-reback.html">您可以点击这里找回账户</a></span></div>
33 33
					<div class="frmmsg msgReg1"><span>该企业已成为【科袖认证企业】,若有问题请联系客服 010-62343359</span></div>-->
@ -44,7 +44,7 @@
44 44
				<li>
45 45
					<!--选中状态为图片business_button_xuanze_hig.png-->
46 46
					<img class="cmpAgree ifxuanze" src="images/business_button_xuanze_hig.png" />
47
					<span>我是本企业的官方代表,且有权代表企业注册此账户</span>
47
					<span>我是本企业的官方代表,且有权代表企业注册此账户</span>
48 48
				</li>
49 49
				<li>
50 50
					<button type="button" disabled class="frmtype frmtypeW btnModel btnModelBig headRadius save-block" id="registerSubmit">创建企业账户</button>

+ 91 - 0
cmp-portal/cmp-staff-invite-log.html

@ -0,0 +1,91 @@
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>员工邀请-登录</title>
8
<link rel="shortcut icon" href="images/favicon.ico "/>
9
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
10
<link type="text/css" rel="stylesheet" href="css/common.css">
11
<link type="text/css" rel="stylesheet" href="css/cmpindex.css">
12
<script type="text/javascript" src="js/public/jquery-1.11.1.js"></script>
13
</head>
14
<body class="covbodyBg">
15

16
<div class="containerCon">
17
	<a href="../index.html" class="headlogo signLogo"></a>
18
</div>
19
<!--中间-->
20
<div id="container">
21
	<div class="containerCon contConP">
22
		<div class="covFrmblock">
23
			<form class="cmpAllFrm cmp-invite-block" data-step="1">
24
				<div class="cmp-info-box alignCenter">
25
					<div class="cmp-img-box">
26
						<div class="boxBlock">
27
							<img class="boxBlockimg" src="" id="orgHeadLogo" />
28
						</div>
29
					</div>
30
					<div class="cmp-base-box">
31
						<span class="cmpOrgName"></span><br />
32
						<span class="h2Font">邀请您加入「科袖网」 ,成为企业认证员工</span>
33
					</div>
34
				</div>
35
				<div class="waysBlock loginBl">
36
					<div class="loginWays">
37
						<ul class="cmpAllUl cmpCoverUl">
38
							<li>
39
								<input type="text" class="frmtype frmtypeW username" placeholder="请输入手机或邮箱" onBlur="nameVal(this)" onfocus="getFocus(this)" onkeyup="checkLoginButtn(this)"  />
40
			    				<div class="frmmsg msgLog1"><span></span></div>
41
							</li>
42
							<li>
43
								<input type="password" class="frmtype frmtypeW passwd" placeholder="请输入密码" onBlur="passwordVal(this)" onfocus="getFocus(this)"  onkeyup="checkLoginButtn(this)"/>
44
							    <div class="frmmsg msgLog2"><span></span></div>
45
							</li>
46
							<li>
47
								<button type="button" class="frmtype frmtypeW btnModel save-block loginSubmit" disabled onclick="login(this)" >登录</button>
48
								 <div class="frmmsg"><span></span></div>
49
							</li>
50
						</ul>
51
					</div>
52
					<div class="clearfix" style="margin-top:-15px;">
53
						<a href="cmp-pwdReset01.html" target="_blank" class="fontLink floatL">忘记密码?</a>
54
						<span class="floatR" style="color:#999">没有账号?<a href="cmp-staff-invite.html" class="fontLink">立即注册</a></span>
55
					</div>	
56
				</div>
57
				<div class="waysBlock sureIBl displayNone">
58
					<div class="cmp-info-box">
59
						<div class="cmp-base-box">
60
							<div class="h2Font">系统检测到您当前为 <span class="cmpOrgName"></span> 的认证员工,请确认是否要变更您的认证信息?</div>
61
							<span class="h4Font">若确认,我们将修改您的所在机构信息,并取消之前的相关联系人身份。</span>
62
						</div>
63
						<div class="clearfix" style="margin-top:20px">
64
							<button type="button" class="frmtype frmtypeW btnModel sureUpData" style="margin:10px 0">确认变更</button>
65
							<div class="fontLink alignCenter"><span class="reject-btn">拒绝并退出</span></div>
66
						</div>
67
					</div>
68
				</div>
69
			</form>
70
			<form class="cmpAllFrm cmp-success-block" data-step="2">
71
				<ul class="cmpAllUl" style="width: 100%;">
72
					<li class="successImg"></li>
73
					<li class="importBlock cmp-base-box">
74
						<p class="importTip">恭喜您已成为<br><span class="cmpOrgName"></span><br>企业认证员工!</p>
75
					</li>
76
					<li>
77
						<a href="/index.html"><button type="button" class="frmtype frmtypeW btnModel btnModelBig">登录科袖网</button></a>
78
					</li>
79
				</ul>
80
			</form>
81
		</div>
82
	</div>
83
</div>
84
<script type="text/javascript"src="js/public/jquery.cookie.js"></script>
85
<script type="text/javascript" src="js/public/jquery.similar.msgbox.js"></script>
86
<script type="text/javascript" src="js/public/ajaxfileupload.js"></script>
87
<script type="text/javascript" src="../js/public/baseUtil.js"></script> 
88
<script type="text/javascript" src="js/public/cmpCom.js"></script>   
89
<script type="text/javascript" src="js/cmp-staff-invite-log.js"></script>
90
</body>
91
</html>

+ 88 - 0
cmp-portal/cmp-staff-invite.html

@ -0,0 +1,88 @@
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>员工邀请</title>
8
<link rel="shortcut icon" href="images/favicon.ico "/>
9
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
10
<link type="text/css" rel="stylesheet" href="css/common.css">
11
<link type="text/css" rel="stylesheet" href="css/cmpindex.css">
12
<script type="text/javascript" src="js/public/jquery-1.11.1.js"></script>
13
</head>
14
<body class="covbodyBg">
15

16
<div class="containerCon">
17
	<a href="../index.html" class="headlogo signLogo"></a>
18
</div>
19
<!--中间-->
20
<div id="container">
21
	<div class="containerCon contConP">
22
		<div class="covFrmblock">
23
			<form class="cmpAllFrm">
24
				<div class="cmp-info-box alignCenter">
25
					<div class="cmp-img-box">
26
						<div class="boxBlock">
27
							<img class="boxBlockimg" src="" id="orgHeadLogo" />
28
						</div>
29
					</div>
30
					<div class="cmp-base-box">
31
						<span class="mainColor cmpOrgName"></span><br />
32
						<span class="h2Font">邀请您加入「科袖网」 ,成为企业认证员工</span>
33
					</div>
34
				</div>
35
				<ul class="cmpAllUl cmpCoverUl" id="cmpSettledul">
36
					<li>
37
						<input type="text" class="frmtype frmtypeW" placeholder="请输入您的真实姓名" id="companyName"/>
38
					    <div class="frmmsg msgCmp01"><span></span></div>
39
					</li>
40
					<li>
41
						<input type="tel" class="frmtype frmtypeW" placeholder="请输入您的手机号码" id="companyPhone"/>
42
					    <div class="frmmsg msgCmp02"><span></span></div>
43
					</li>
44
					<li>
45
						<div class="col-w-7">
46
							<input type="text" class="frmtype frmtypeW" style="width: 98%;" placeholder="请输入图形验证码" id="imgCode"/>
47
						    <div class="frmmsg msgImage"><span></span></div>
48
					    </div>
49
					    <div class="col-w-5">
50
					    	<img src="/ajax/PictureVC" alt="" class="frmtypeW" id="changImage"/>
51
					    </div>
52
					</li>
53
					<li>
54
						<div class="col-w-7">
55
							<input type="tel" class="frmtype frmtypeW" style="width: 98%;" placeholder="请输入短信验证码" id="companysc"/>
56
						    <div class="frmmsg msgCmp03"><span></span></div>
57
					    </div>
58
					    <div class="col-w-5">
59
					    	<button type="button" disabled class="frmtype frmtypeW btnModel headRadius" id="getcode">获取验证码</button>
60
					    </div>
61
					</li>
62
					<li>
63
						<input type="password" class="frmtype frmtypeW" placeholder="请设置您的登录密码" id="companyPsw1"/>
64
					    <div class="frmmsg msgCmp04"><span></span></div>
65
					</li>
66
					<li>
67
						<img class="cmpAgree ifxuanze" src="images/business_button_xuanze_hig.png" />
68
						<span>我已阅读并同意<a href="privacy.html" class="mainColor" target="_blank">《科袖网用户协议》</a></span>
69
					</li>
70
					<li>
71
						<button type="button" class="frmtype frmtypeW btnModel save-block" disabled id="companyRet">接受并注册</button>
72
					</li>
73
					<li class="login-block">
74
						<a href="cmp-staff-invite-log.html" class="frmtype frmtypeW">已有账号,直接登录</a>
75
					</li>
76
				</ul>
77
			</form>
78
		</div>
79
	</div>
80
</div>
81
<script type="text/javascript"src="js/public/jquery.cookie.js"></script>
82
<script type="text/javascript" src="js/public/jquery.similar.msgbox.js"></script>
83
<script type="text/javascript" src="js/public/ajaxfileupload.js"></script>
84
<script type="text/javascript" src="../js/public/baseUtil.js"></script> 
85
<script type="text/javascript" src="js/public/cmpCom.js"></script>   
86
<script type="text/javascript" src="js/cmp-staff-invite.js"></script>
87
</body>
88
</html>

+ 73 - 40
cmp-portal/cmp-staffList.html

@ -18,8 +18,20 @@
18 18
<header>
19 19
	<script type="text/javascript" src="js/public/cmpHeader.js"></script>
20 20
</header>
21

22
<!--中间-->
21
<div class="blackcover2"></div>
22
<div class="setTimeBlock modelContain">
23
	<span class="mb_tit">邀请员工</span>
24
	<a class="mb_close"></a>
25
	<div class="mb_msg clearfix" id="promotTh">
26
		<div class="col-w-9">
27
			<input type="email" name="staffemail" class="frmcontype staffemail" placeholder="请输入员工的邮箱地址" id="mailVal"/>
28
			<div class="mb_success"></div>
29
		</div>
30
		<div class="col-w-3" id="mailPub">
31
			<button type="button" class="frmcontype btnModel identBtn">邀请</button>
32
		</div>
33
	</div>
34
</div>
23 35
<div id="container">
24 36
	<div class="containerCon">
25 37
		<div class="con-center contentCon clearfix conBlock">
@ -27,57 +39,78 @@
27 39
	        	<script src="js/public/workMenu.js"></script>
28 40
	        </div>
29 41
		    <div class="workcon workconG">
30
			    <div class="workcontit" id="costf">
31
			    	<a class="worksamlltit worksamlltitnow">员工管理</a>
32
					<a href="cmp-UnstaffList.html"class="worksamlltit">员工认证</a>
33
			    </div>
34
			    <div class="worksubcon clearfix">
35
			    	<!--未认证-->
36
		            <div class="workblock identityState" id="identityState" style="display:none;">
37
						<div class="nowState">
38
						   <p><span class="identProcess" id="identProcess">通过企业认证后,您可以在这里认证企业员工,<br />这些【企业认证员工】可以在科袖网发布企业需求。</span><span class="identts" id="identts"></span></p>
39
						   <a href="cmp-setAuth.html?auth=1"><button type="button" class="frmtype btnModel headRadius identBtn" id="identBtn">马上认证</button></a>
42
				<div class="workcontit"><a class="worksamlltit worksamlltitnow">企业员工</a></div>
43
				<div class="itemListBolck main-wrapper" id="staffContent">
44
					<div class="list-wrapper">
45
						<div class="block-title">默认联系人</div>
46
						<div class="block-wrapper">
47
							<div class="block-container" id="defaultUserList">
48
								<!--<a class="block-item" target="_blank">
49
							        <div class="show-head" style="background-image:url()"></div>
50
							        <div class="show-info">
51
							          <div class="info-tit ellipsisSty">{{item.name}}<em class="authicon"></em></div>
52
							          <div class="info-tag ellipsisSty" v-if="item.offt">{{item.offt}}</div>
53
							        </div>
54
							    </a>-->
55
							</div>
56
						</div>
57
						<div class="goSpan"><span>邀请</span></div>
58
					</div>
59
					<div class="list-wrapper">
60
						<div class="block-title">认证员工(<span id="authStaffs">0</span>)</div>
61
						<div class="block-wrapper">
62
							<div class="block-container" id="authorizedUserList">
63
							     <!--<div class="block-item">
64
							     	<a class="block-item-child" href="">
65
								        <div class="show-head" style="background-image:url()"></div>
66
								        <div class="show-info">
67
								          <div class="info-tit ellipsisSty">{{item.name}}<em class="authicon"></em></div>
68
								          <div class="info-tag ellipsisSty" v-if="item.offt">{{item.offt}}</div>
69
								        </div>
70
							        </a>
71
							        <div class="block-btn">
72
							        	<span class="block-btn-1">设为默认联系人</span>
73
							        	<span>取消认证</span>
74
							        </div>
75
							     </div>-->
76
							</div>
77
							<div class="tcdPageCode" id="authtcdPageCode"></div>
40 78
						</div>
41 79
					</div>
42
					<!--员工管理-->
43
					<div class="workblock clearfix" id="staff" style="display:none;">
44
						<div class="workselectcon">
45
							<form class="stafffrm">
46
								<div class="clearfix">
47
									<div class="col-w-10">
48
										<input type="email" name="staffemail" class="frmcontype staffemail" placeholder="请输入您企业员工的邮箱地址" id="mail"/>
49
									</div>
50
									<div class="col-w-2">
51
										<button type="button" class="frmcontype btnModel identBtn">邀请</button>
52
									</div>
53
								</div>
54
								
55
								<ul class="staffTip smalltip clearfix">
56
									<li>* 对方接受邀请后,将成为您的【企业认证员工】,能够以您企业的名义发布需求。</li>
57
									<li>* 若输入的邮箱已注册账户,说明该员工已拥有「科袖」账户,您可以要求该员工将个人资料中的“所在机构”修改正确,就可以在【员工认证】列表中看到该员工了。</li>
58
								</ul>
59
								<p class="smalltip">点击移除后,该用户将不再是您的【企业认证员工】,不能再发布企业需求,您可以在【需求管理】中关闭他之前发布的需求。</p>
60
							</form>
61
							<ul class="staffMana bgRadius clearfix" id="authorizedUserList">
62
								
63
							</ul>
80
					<div class="list-wrapper">
81
						<div class="block-title">待认证的员工</div>
82
						<div class="block-wrapper">
83
							<div class="block-container" id="UnauthorizedUserList">
84
								<!--<div class="block-item">
85
							     	<a class="block-item-child" href="">
86
								        <div class="show-head" style="background-image:url()"></div>
87
								        <div class="show-info">
88
								          <div class="info-tit ellipsisSty">{{item.name}}<em class="authicon"></em></div>
89
								          <div class="info-tag ellipsisSty" v-if="item.offt">{{item.offt}}</div>
90
								        </div>
91
							        </a>
92
							        <div class="block-btn block-btnT">
93
							        	<span class="block-btn-1">认证</span>
94
							        </div>
95
							    </div>-->
96
							</div>
97
							<div class="tcdPageCode" id="UnauthtcdPageCode"></div>
64 98
						</div>
65
					</div>					
99
					</div>
66 100
				</div>
67 101
			</div>
68
        </div>
102
		</div>
69 103
	</div>
70 104
</div>
71

72

73
<!--底部-->
74 105
<footer>
75 106
	<script type="text/javascript" src="js/public/cmpFooter.js"></script>
76 107
</footer>
108

77 109
<script type="text/javascript"src="js/public/jquery.cookie.js"></script>
78 110
<script type="text/javascript"src="js/public/jquery.similar.msgbox.js"></script>
111
<script type="text/javascript" src="../js/jquery.page.js"></script>
79 112
<script type="text/javascript" src="../js/public/baseUtil.js"></script> 
80 113
<script type="text/javascript" src="js/public/cmpCom.js"></script>   
81
<script type="text/javascript"src="js/cmp-staffList.js"></script>
114
<script type="text/javascript"src="js/cmp-staffListNew.js"></script>
82 115
</body>
83 116
</html>

+ 53 - 2
cmp-portal/cmpInformation.html

@ -15,6 +15,7 @@
15 15
<style type="text/css">
16 16
	.form-result>ul>li{padding:12px 30px}
17 17
	.establishments{display: none;}
18
	.productions{display: none;}
18 19
</style>
19 20
</head>
20 21
@ -27,6 +28,35 @@
27 28
<div id="container">
28 29
	<div class="containerCon">
29 30
		<div class="contentCon">
31
			<div class="headconBox productions">
32
				<div class="headLeadtit">如何打造精美的企业主页?如何让专家和客户快速了解您的企业?</div>
33
				<ul class="headLead">
34
					<li>
35
						<span>1</span>
36
						<p>完善企业资料<br>让人一目了然</p>
37
					</li>
38
					<li></li>
39
					<li>
40
						<span>2</span>
41
						<p>发布企业新闻<br>增加企业知名度</p>
42
					</li>
43
					<li></li>
44
					<li>
45
						<span>3</span>
46
						<p>进行企业认证<br>开启全部功能</p>
47
					</li>
48
					<li></li>
49
					<li>
50
						<span>4</span>
51
						<p>发布企业需求<br>让专家解决研发难题</p>
52
					</li>
53
					<li></li>
54
					<li>
55
						<span>5</span>
56
						<p>发布企业产品<br>让更多客户发现您</p>
57
					</li>
58
				</ul>
59
			</div>
30 60
			<div class="headconBox flexCenter">
31 61
				<div class="headimgBox cmpimgBox">
32 62
					<div class="boxBlock">
@ -34,7 +64,7 @@
34 64
					</div>
35 65
				</div>
36 66
                <div class="reInfoBlock" style="padding-left: 230px;">
37
                	<div class="h1Font"><span id="proName"></span><em class="authiconNew" id="proAuth"></em></div>
67
                	<div class="h1Font"><span id="proName"></span><em class="authicon" id="proAuth"></em></div>
38 68
                	<div class="h2Font ellipsisSty"><span id="proTit"></span> <span id="proOther"></span></div>
39 69
                	<div class="operateBlock bottomShow">
40 70
                		<ul class="clearfix">
@ -60,6 +90,7 @@
60 90
				<div class="navconBox">
61 91
					<ul class="mainNavUl clearfix">
62 92
						<li rel="item1user" class="liNow" rel="item1user">主页</li>
93
						<li class="productions" rel="item10user" id="tab10user">产品 <span class="counts" id="productCount"></span></li>
63 94
						<li class="establishments" rel="item9user">服务 <span class="counts" id="serCount"></span></li>
64 95
						<li class="establishments" rel="item2user">资源 <span class="counts" id="resCount"></span></li>
65 96
						<li rel="item3user">文章 <span class="counts" id="artCount"></span></li>
@ -81,6 +112,16 @@
81 112
								</ul>
82 113
							</div>
83 114
						</div>
115
						<div class="coninfobox splitBlock clearfix displayNone">
116
							<div class="form-item otherShow">
117
								<div class="coninfotit">我们的产品<span class="seeMore" id="seeMorePd">查看全部<em></em></span></div>
118
								<div class="coninfocon form-result aboutRes">
119
									<ul id="showProduct">
120
										
121
									</ul>
122
								</div>
123
							</div>
124
						</div>
84 125
						<div class="coninfobox splitBlock clearfix displayNone">
85 126
							<div class="form-item otherShow displayNone">
86 127
								<div class="coninfotit">可提供服务<span class="seeMore" id="seeMoreS">查看全部<em></em></span></div>
@ -220,6 +261,16 @@
220 261
							</div>
221 262
						</div>
222 263
					</div>
264
					<div id="item10user" class="leftconItem">
265
						<div class="coninfobox form-item otherShow">
266
							<div class="coninfocon form-result aboutRes">
267
								<ul id="proProduct">
268
									
269
								</ul>
270
								<button class="js-load-more"></button>
271
							</div>
272
						</div>
273
					</div>
223 274
				</div>
224 275
			</div>
225 276
			<div class="rightconBox floatR">
@ -232,7 +283,7 @@
232 283
				<div class="myoneself">
233 284
					<div class="conItem statisticsBox alignCenter clearfix" style="padding:30px 10px">
234 285
						<div class="col-w-12">
235
							<p>发布文章,管理需求、员工</p>
286
							<p class="goworkspaceSpan"></p>
236 287
							<a class="goarrow" target="_blank" href="cmp-needList.html">进入企业工作台<em></em></a>
237 288
						</div>
238 289
					</div>

+ 57 - 1
cmp-portal/css/cmpindex.css

@ -462,9 +462,10 @@ ul.tagList>li .h2Font{color:#666}
462 462
.setTimeBlock{z-index: 999999; width: 400px; position: fixed; background-color: white; border-radius: 6px; box-shadow: rgb(102, 102, 102) 1px 1px 20px 4px;top:50%;left:50%;margin:-167px 0 0 -200px;}
463 463
.setTimeBlock .mb_tit{display: block; font-size: 18px; color: rgb(255, 255, 255); background-color:#28b8fa; line-height: 60px; text-align: center; border-radius: 6px 6px 0 0; }
464 464
.setTimeBlock .mb_close{display: block; position: absolute; right: 20px; top: 18px; background: url(../../images/sign_icon_guanbi_nor.png) center center no-repeat; width: 20px; height: 20px; cursor: pointer;}
465
.setTimeBlock .mb_msg{position: relative; padding: 30px 40px 20px; line-height: 24px; text-align: center; font-size: 16px;}
465
.setTimeBlock .mb_msg{position: relative;min-height:140px; padding: 30px 40px 20px; line-height: 24px; text-align: center; font-size: 16px;}
466 466
.setTimeBlock .mb_msg .mb-list{margin:6px 6px 12px 6px}
467 467
.setTimeBlock .mb_msg .mb-list p{margin:6px;}
468
.setTimeBlock .mb_msg .mb_success{text-align: left;color:#28b8fa;margin-top:10px;}
468 469
/*.setTimeBlock .formTime,.setTimeBlock .form-control{padding:10px 24px;}*/
469 470
.setTimeBlock .mb_btnbox{margin: 0px auto 30px; text-align: center; position: relative;}
470 471
.setTimeBlock .mb_btn{width: 100px; font-size: 14px; height: 32px; color: white; border: none; background-image: none; padding: 0px; margin: 0px 10px; border-radius: 6px;}
@ -490,6 +491,7 @@ ul.tagList>li .h2Font{color:#666}
490 491
.form-item .addexpertRe ul.addexpert>li .selectNull{position:absolute; right:20px;top:50%;margin-top:-11px;width:22px; height:22px;background-image: url(../../images/c-sign-on_button_xuanze_nor.png);background-size: cover;}
491 492
.form-item .addexpertRe ul.addexpert>li .selectAdd{background-image: url(../../images/c-sign-on_button_xuanze_hig.png);}
492 493
494
.form-item .addexpertRe ul.link-man-list{max-height:350px;overflow-y: auto;}
493 495
/*资源图片展示*/
494 496
.Imagebox{width:360px;}
495 497
.Imagebox .tb-pic a{display:table-cell;text-align:center;vertical-align:middle;}
@ -560,3 +562,57 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
560 562
.statisticsBox p>a{color: #28b8fa;}
561 563
.goarrow{color: #28b8fa;}
562 564
.goarrow em:before{border-left-color: #28b8fa;}
565
566
/*企业员工改版2018-7-6*/
567
.main-wrapper{padding:20px}
568
.list-wrapper{position:relative;margin-top:30px;}
569
.list-wrapper:first-child{margin:0}
570
.goSpan{position: absolute;right:0;top:-8px;}
571
.goSpan>span{background:#28b8fa;margin:0;}
572
.block-title{font-size:18px;margin-bottom:10px;}
573
.block-container{display: flex;flex-wrap: wrap;margin-right:-10px;margin-bottom:-10px;}
574
.block-item{position:relative;display:flex;align-items: center;width:48.8%;box-sizing:border-box;padding:10px;margin-right:10px;margin-bottom:10px;border:1px solid #ccc;}
575
.block-item:hover{box-shadow: 1px 1px 10px 1px #ccc;}
576
.block-item-child{flex:1;display:flex;align-items: center;width:100%;}
577
.block-item .show-head{width:60px;height:60px;border-radius:50%;background-size:cover;}
578
.block-item .show-info{flex:1 0 60px;padding-left:15px;width: 100%;overflow: hidden;}
579
.block-item .info-tit{font-size:16px;line-height:26px;color:#333;}
580
.block-item .info-tag{color:#666;font-size:14px;line-height:24px;}
581
.block-btn{position:absolute;right:15px;top:50%;margin-top:-26px;display: none;}
582
.block-btnT{margin-top:-13px;}
583
.block-btn>span{line-height:26px;display:block;text-align: right;cursor: pointer;color:#999}
584
.block-btn>span.block-btn-1{color: #28b8fa;}
585
.block-item:hover .block-btn{display: block;}
586
.default-text{text-align: center;font-size:18px;line-height:40px;padding:140px 0;color:#999}
587
.default-text a{color:#0088CC}
588
.default-text-2{width:100%;font-size:14px;line-height:28px;padding:50px 0;border:1px solid #ccc}
589
.default-text-3{width: 48.8%;font-size:14px;line-height:20px;border: 1px solid #ccc;padding:20px}
590
591
.cmp-info-box{}
592
.cmp-img-box{width:162px;height: 109px;overflow: hidden;border: 1px solid #E5E5E5;margin:0 auto 20px;}
593
.cmp-img-box .boxBlock{width:160px;height:108px;}
594
.cmp-base-box {font-size:22px; line-height: 30px;}
595
.cmp-base-box .cmpOrgName{color: #28b8fa;}
596
.cmp-base-box .h4Font{color: #999;line-height:20px;}
597
.reject-btn{cursor: pointer;color: #999;}
598
ul.cmpAllUl>li.login-block{border-top: 1px solid #ccc;margin-top:10px;padding-top:15px}
599
.login-block .frmtype{display:block;text-align:center;line-height:40px;padding:0;background: none;color: #28b8fa;border-color: #28b8fa;}
600
.cmp-success-block,.cmp-invite-block{display: none}
601
.cmp-invite-block .waysBlock{margin-top:20px}
602
603
.headLeadtit{font-size:17px;}
604
.headLead{display:flex;display: -webkit-flex;text-align: center;margin-top:20px}
605
.headLead>li{flex:1 0 110px}
606
.headLead>li>span{display: inline-block;width: 50px;height:50px;border:1px solid #999;color:#666;border-radius: 50%;line-height: 50px;font-size:18px;margin-bottom: 15px;}
607
.headLead>li:nth-child(even){position:relative;flex:1 0 80px}
608
.headLead>li:nth-child(even):after{position: absolute;content: '';background: #ccc;left:10px;right:10px;height:1px;top:25%;}
609
610
.upAttech.webuploader-container{height: 160px;background: none;bottom:0;}
611
.upAttech .webuploader-pick{background:none; color: #28b8fa;width: 100%;margin: 0;line-height:160px}
612
.upAttech .webuploader-element-invisible{height:160px}
613
.upAtteched.webuploader-container{height:0px;text-align: right;right:0;top:-36px;}
614
.upAtteched .webuploader-pick{width:80px;line-height:30px;padding:0}
615
.upAtteched .webuploader-element-invisible{height:30px;}
616
617
#fileAttachList li{min-height:40px;padding-right:42px;max-height:60px;height:auto;}
618
.null-data{color:#999;line-height:32px;padding:0 15px}

+ 2 - 2
cmp-portal/css/common.css

@ -12,9 +12,9 @@ button,input,select,textarea{font-size:100%;}
12 12
table{border-collapse:collapse;border-spacing:0;}
13 13

14 14
body{height:auto;position: relative;min-height: 100%;}
15
a{text-decoration:none;}
15
a{text-decoration:none;color:#666}
16 16
a:focus{}
17
a:active,a:hover{outline:0;text-decoration:none;}
17
a:active,a:hover,a:link{outline:0;text-decoration:none;}
18 18
/*栅格化宽度类型*/
19 19
.col-w-1,.col-w-2,.col-w-3,.col-w-4,.col-w-5,.col-w-6,.col-w-7,.col-w-8,.col-w-9,.col-w-10,.col-w-11,.col-w-12{float:left;}
20 20
.col-w-1{width:8.333333333333332%}

+ 267 - 153
cmp-portal/js/articalIssue.js

@ -5,13 +5,18 @@ $(function() {
5 5
	var articleId;
6 6
	var fa = false;
7 7
    var orgId = $.cookie("orgId");
8
   var colMgr = $.cookie("colMgr");
9
	var resMgr = $.cookie("resMgr");
10
	if(colMgr =='false' && resMgr=='false') {
11
		$(".conItem").hide().eq(0).show();
12
	}else if(resMgr=='true') {
13
		$(".conItem").eq(1).hide();
14
		$(".conItem").eq(4).hide();
8
    var colMgr = stringToBoolean($.cookie("colMgr"));
9
	var resMgr = stringToBoolean($.cookie("resMgr"));
10
	
11
	if(!colMgr && !resMgr) {
12
		$(".conItem").eq(5).show();
13
	}
14
	if(resMgr) {
15
		$(".conItem").eq(2).show();
16
		$(".conItem").eq(3).show();
17
	}
18
	if(colMgr) {
19
		$(".conItem").show().eq(5).hide();
15 20
	}
16 21
    var hbur,hburEnd;
17 22
  	var pr,prEnd;
@ -20,6 +25,44 @@ $(function() {
20 25
    if(orgId == "" || orgId == null || orgId == "null"){
21 26
    	location.href = "cmp-settled-log.html";
22 27
    }
28
    // 上传附件
29
	var uploaderFile =new WebUploader.create({
30
			auto: true,
31
			fileNumLimit: 5,
32
			server: '../ajax/article/files/upload',
33
			fileSingleSizeLimit: 50 * 1024 * 1024,
34
			pick: {
35
				id: "#upAttachPicker",
36
				multiple: false
37
			}
38
		});
39
		var fileId,fileArr=[];
40
		// 当有文件添加进来的时候
41
		uploaderFile.on('fileQueued', function(file) {
42
			fileId = file.id;
43
			var $li = $(
44
					'<li class="ellipsisSty-2">'+
45
						file.name +
46
						'<div class="deleteThis"></div>'+
47
					'</li>'
48
				),
49
				$file = $li.find('li');
50
			var $list = $("#fileAttachList");
51
			$list.prepend($li);
52
			
53
			var $len = $("#fileAttachList").find("li").length;
54
			if($len>0){
55
				$("#upAttachPicker").addClass("upAtteched")
56
				$("#upAttachPicker>.webuploader-pick").text('继续上传')
57
			}
58
		});
59
		uploaderFile.on('uploadSuccess', function(file, data) {
60
			if(data.success) {
61
				uploaderFile.removeFile(fileId);
62
				var fileItem = data.data[0]
63
				fileArr.push(fileItem)
64
			}
65
		});
23 66
	//校验标题
24 67
	$("#newstitle").on({
25 68
		focus: function() {
@ -62,10 +105,11 @@ $(function() {
62 105
	$("#sevrice").on("focus", function() {
63 106
		$(this).prev().find("span").text("最多选择5个服务");
64 107
	})
65
	$("#checkZj,#checkZy,#sevrice").on("blur", function() {
108
	$("#product").on("focus", function() {
109
		$(this).prev().find("span").text("最多选择5个产品");
110
	})
111
	$("#checkZj,#checkZy,#sevrice,#product").on("blur", function() {
66 112
		$(this).prev().find("span").text("");
67
		//$(this).val("");
68
		//$(this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
69 113
	})
70 114

71 115
	$("#checkZj").on("keyup", function() {
@ -76,12 +120,10 @@ $(function() {
76 120
			return;
77 121
		}
78 122
		setTimeout(function(){
79
				if( ti===pr && ti!== prEnd) {
80
					checkZj(_this,ti);
81
				}
82
				
83
			},500)
84
		
123
			if( ti===pr && ti!== prEnd) {
124
				checkZj(_this,ti);
125
			}
126
		},500)
85 127
	})
86 128

87 129
	$("#checkZy").on("keyup", function() {
@ -92,11 +134,10 @@ $(function() {
92 134
		}
93 135
		var _this = this;
94 136
		setTimeout(function(){
95
				if( ti===re && ti!== reEnd) {
96
					checkZy(_this,ti);
97
				}
98
				
99
			},500)
137
			if( ti===re && ti!== reEnd) {
138
				checkZy(_this,ti);
139
			}
140
		},500)
100 141
		
101 142
	})
102 143
	var se,seEnd;
@ -108,13 +149,26 @@ $(function() {
108 149
		}
109 150
		var _this = this;
110 151
		setTimeout(function(){
111
				if( ti===se && ti!== seEnd) {
112
					checkSy(_this,ti);
113
				}
114
				
115
			},500)
152
			if( ti===se && ti!== seEnd) {
153
				checkSy(_this,ti);
154
			}
155
		},500)
116 156
		
117 157
	})
158
	var proD,proDEnd;
159
	$("#product").on("keyup", function() {
160
		var ti=$(this).val();
161
		proD=ti;
162
		if($(this).val()=="") {
163
			return;
164
		}
165
		var _this = this;
166
		setTimeout(function(){
167
			if( ti===proD && ti!== proDEnd) {
168
				checkProDy(_this,ti);
169
			}
170
		},500)
171
	})
118 172
	$("#expertlist").on("click", "li", function() {
119 173
		var _this = this;
120 174
		expertlist(_this, "该专家已选择");
@ -127,6 +181,10 @@ $(function() {
127 181
		var _this = this;
128 182
		expertlist(_this, "该服务已选择");
129 183
	});
184
	$("#productlist").on("click", "li", function() {
185
		var _this = this;
186
		expertlist(_this, "该产品已选择");
187
	});
130 188
	//点击右侧搜索出的专家和资源列表
131 189
	function expertlist(_this, title) {
132 190
		var liId = $(_this).html();
@ -173,31 +231,34 @@ $(function() {
173 231
				console.log(data);
174 232
				if(data.success) {
175 233
					if(data.data != "") {
176
							if(prEnd == prd){
177
								$(_this).next().removeClass("displayNone");
178
								var itemlist = '';
179
								$("#expertlist").html("");
180
								for(var i = 0; i < data.data.length; i++) {
181
									var itemlist = '<li id="usid" class="flexCenter">';
182
									itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
183
									itemlist += '<div class="madiaInfo">';
184
									itemlist += '<p class="ellipsisSty"><span class="h1Font" id="name"></span><span class="h2Font" style="margin-left:10px;" id="title"></span></p>';
185
									itemlist += '<p class="h2Font ellipsisSty" id="orgName"></p>';
186
									itemlist += '</div><div class="deleteThis"></div></li>';
187
									$itemlist = $(itemlist);
188
									$("#expertlist").append($itemlist);
189
									var datalist = data.data[i];
190
									$itemlist.attr("data-id", datalist.id);
191
									$itemlist.find("#name").text(datalist.name);
192
									$itemlist.find("#title").text(datalist.title);
193
									$itemlist.find("#orgName").text(datalist.orgName);
194
									if(datalist.hasHeadImage == 1) {
195
										$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + datalist.id + "_l.jpg);");
196
									}
234
						if(prEnd == prd){
235
							$(_this).next().removeClass("displayNone");
236
							var itemlist = '';
237
							$("#expertlist").html("");
238
							for(var i = 0; i < data.data.length; i++) {
239
								var itemlist = '<li id="usid" class="flexCenter">';
240
								itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
241
								itemlist += '<div class="madiaInfo">';
242
								itemlist += '<p class="ellipsisSty"><span class="h1Font" id="name"></span><span class="h2Font" style="margin-left:10px;" id="title"></span></p>';
243
								itemlist += '<p class="h2Font ellipsisSty" id="orgName"></p>';
244
								itemlist += '</div><div class="deleteThis"></div></li>';
245
								$itemlist = $(itemlist);
246
								$("#expertlist").append($itemlist);
247
								var datalist = data.data[i];
248
								$itemlist.attr("data-id", datalist.id);
249
								$itemlist.find("#name").text(datalist.name);
250
								$itemlist.find("#title").text(datalist.title);
251
								$itemlist.find("#orgName").text(datalist.orgName);
252
								if(datalist.hasHeadImage == 1) {
253
									$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + datalist.id + "_l.jpg);");
254
								}
197 255
							}		
198 256
						}
199 257
					} else {
200
						$(_this).next().addClass("displayNone");
258
						$(_this).next().removeClass("displayNone");
259
						var itemlist = '<div class="null-data">没有找到相关专家</div>'
260
						$("#expertlist").html(itemlist);
261
						return;
201 262
					}
202 263
				} else {
203 264
					$(_this).next().addClass("displayNone");
@ -208,7 +269,6 @@ $(function() {
208 269
			}
209 270
		});
210 271
	}
211

212 272
	function checkZy(_this, prd) {
213 273
		reEnd = prd;
214 274
		$.ajax({
@ -239,7 +299,9 @@ $(function() {
239 299
							}
240 300
						}
241 301
					} else {
242
						$(_this).next().addClass("displayNone");
302
						$(_this).next().removeClass("displayNone");
303
						var itemlist = '<div class="null-data">没有找到相关资源</div>'
304
						$("#resouselist").html(itemlist);
243 305
					}
244 306
				} else {
245 307
					$(_this).next().addClass("displayNone");
@ -281,7 +343,9 @@ $(function() {
281 343
							}
282 344
						}
283 345
					} else {
284
						$(_this).next().addClass("displayNone");
346
						$(_this).next().removeClass("displayNone");
347
						var itemlist = '<div class="null-data">没有找到相关服务</div>'
348
						$("#sevricelist").html(itemlist);
285 349
					}
286 350
				} else {
287 351
					$(_this).next().addClass("displayNone");
@ -292,6 +356,45 @@ $(function() {
292 356
			}
293 357
		});
294 358
	}
359
	function checkProDy(_this, prd) {
360
		proDEnd = prd;
361
		$.ajax({
362
			"url": "../ajax/product/publish",
363
			"type": "get",
364
			"data": {
365
				owner:orgId,
366
				rows:5
367
			},
368
			"success": function(data) {
369
				console.log(data);
370
				if(data.success) {
371
					if(data.data != "") {
372
						if(proDEnd == prd) {
373
							$(_this).next().removeClass("displayNone");
374
							$("#productlist").html("");
375
							for(var i = 0; i < data.data.length; i++) {
376
								var itemlist = '<li id="usid" class="flexCenter" >' +
377
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
378
									'<div class="deleteThis"></div></li>'
379
								$itemlist = $(itemlist);
380
								$("#productlist").append($itemlist);
381
								var datalist = data.data[i];
382
								$itemlist.attr("data-id", datalist.id);
383
								$itemlist.find("#resourceName").text(datalist.name);
384

385
							}
386
						}
387
					} else {
388
						$(_this).next().removeClass("displayNone");
389
						var itemlist = '<div class="null-data">没有找到相关产品</div>'
390
						$("#productlist").html(itemlist);
391
					}
392
				} else {
393
					$(_this).next().addClass("displayNone");
394
				}
395
			}
396
		});
397
	}
295 398
	var titleflase = false;
296 399
	var imgflase = false;
297 400
	//交验图片和标题不能为空
@ -299,7 +402,6 @@ $(function() {
299 402
		var ImageKey = $("#uploader").attr("data-id");
300 403
		var newstitle = $("#newstitle").val();
301 404
		if(ImageKey == "") {
302
			//$(".imgtis").text("请上传封面图片");
303 405
			$.MsgBox.Alert('提示', '请上传封面图片');
304 406
			return;
305 407
		} else {
@ -307,7 +409,6 @@ $(function() {
307 409
			imgflase = true;
308 410
		}
309 411
		if(newstitle == "") {
310
			//$("#aboutTit span").text("请输入文章标题");
311 412
			$.MsgBox.Alert('提示', '请输入文章标题');
312 413
			return;
313 414
		} else {
@ -325,7 +426,6 @@ $(function() {
325 426
		});
326 427
		return $.unique(experarray);
327 428
	}
328

329 429
	//获取相关资源
330 430
	function resourcesli() {
331 431
		resourcesarray=[];
@ -343,6 +443,22 @@ $(function() {
343 443
		});
344 444
		return $.unique(arr);
345 445
	}
446
	function productli() {
447
		var arr=[];
448
		$("#productli li").each(function(i) {
449
			var liid = $(this).attr("data-id");
450
			arr.push(liid);
451
		});
452
		return $.unique(arr);
453
	}
454
	function fileArrli() {
455
		var arr=[];
456
		for(var i=0;i<fileArr.length;i++){
457
			var item=fileArr[i].uri+','+i+','+fileArr[i].size+','+fileArr[i].name;
458
			arr.push(item)
459
		}
460
		return $.unique(arr);
461
	}
346 462
	var seleClum ='<div class="mb-list mb-listL"><p>请选择文章发布的栏目:</p>'+
347 463
		'<select class="form-control form-column" id="seletColum"></select></div>';
348 464
	var seleTime = '<div class="mb-list mb-listR"><p class="msg-tit">请设置文章发布的时间:</p>'+
@ -363,8 +479,7 @@ $(function() {
363 479
		}
364 480
		noTitleImg();
365 481
		if(imgflase && titleflase) {
366
			console.log(colMgr)
367
			if(colMgr=="true"){
482
			if(colMgr){
368 483
				$(".blackcover2").fadeIn();
369 484
				var btnOk='<input class="mb_btn mb_btnOk mb_btnOkpub" type="button" value="确定">'
370 485
				$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
@ -409,7 +524,7 @@ $(function() {
409 524
				oflag: 1,
410 525
			});
411 526
			$(".mb-listR .form_datetime .frmcontype").val(getNowFormatDate());
412
			if(colMgr=="true"){
527
			if(colMgr){
413 528
				$(".mb-listL").remove();
414 529
				$("#promotTh").prepend(seleClum);
415 530
				fillColum(7);//填充select栏目
@ -475,11 +590,13 @@ function getAttrId() {
475 590
		$data.professors = experarray;
476 591
		$data.resources = resourcesarray;
477 592
		$data.wares=seli();
478
		if(colMgr=="true"){
593
		$data.products=productli();
594
		if(colMgr){
479 595
			$data.colNum = $("#seletColum").val();
480 596
			if(publishTime!="") {
481 597
				$data.publishTime = publishTime;
482 598
			}
599
			$data.files=fileArrli();
483 600
		}else{
484 601
			if(publishTime!="") {
485 602
				$data.publishTime = publishTime;
@ -644,106 +761,103 @@ function getAttrId() {
644 761
    relatCompanies("#company");
645 762
    /*添加相关企业*/
646 763
    function  relatCompanies(sel) {
647

648
	$(sel).bind({
649
		paste: function(e) {
650
			var pastedText;
651
			if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
652
				            
653
				pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
654
			} 
655
			else  {            
656
				pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
657
				          
658
			}
659
			$(this).val(pastedText);
660
			e.preventDefault();
661
		},
662
		cut: function(e) {
663
			var $this = $(this);
664
		},
665
		blur: function() {
666
			var $this = $(this);
667
			$(this).siblings(".aboutTit").find("span").text("");
668
			setTimeout(function() {
669
				$this.siblings(".form-drop").hide();
670
			}, 500)
671
		},
672
		focus: function() {
673
			$(this).siblings(".form-drop").show();
674
			$(this).siblings(".aboutTit").find("span").text("最多选择5家企业");
675
		},
676
		keyup: function(e) {
677
			 var ti=$(this).val();
678
			 orgr=ti;
679
			 var $this=$(this);
680
			if($(this).val().trim()) {
681
				var lNum = $.trim($(this).val()).length;
682
				if(0 < lNum) {
683
					setTimeout(function(){
684
						if( ti===orgr && ti!== orgrEnd) {
685
							var tt=ti;
686
							orgrEnd=tt;
687
					$("#companylist").parent().show();
688
					$.ajax({
689
						"url": "/ajax/org/qr",
690
						"type": "GET",
691
						"data":{
692
							kw: $this.val(),
693
							limit:3
694
						},
695
						"success": function(data) {
696
							console.log(data);
697
							if(data.success) {
698
								if(orgrEnd==tt) {
699
									if(data.data.length == 0) {
700
										$this.siblings(".form-drop").addClass("displayNone");
701
										$this.siblings(".form-drop").find("ul").html("");
702
									} else {
703
										$this.siblings(".form-drop").removeClass("displayNone");
704
										var oSr = "";
705
										for(var i = 0; i < data.data.length; i++) {
706
											var busName=(data.data[i].forShort)?data.data[i].forShort:data.data[i].name;
707
											oSr += '<li style="min-height:40px;position:static;"data-id="'+data.data[i].id+'">' + busName + '</li>';
764
		$(sel).bind({
765
			paste: function(e) {
766
				var pastedText;
767
				if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
768
					            
769
					pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
770
				} 
771
				else  {            
772
					pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
773
					          
774
				}
775
				$(this).val(pastedText);
776
				e.preventDefault();
777
			},
778
			cut: function(e) {
779
				var $this = $(this);
780
			},
781
			blur: function() {
782
				var $this = $(this);
783
				$(this).siblings(".aboutTit").find("span").text("");
784
				setTimeout(function() {
785
					$this.siblings(".form-drop").hide();
786
				}, 500)
787
			},
788
			focus: function() {
789
				$(this).siblings(".form-drop").show();
790
				$(this).siblings(".aboutTit").find("span").text("最多选择5家企业");
791
			},
792
			keyup: function(e) {
793
				 var ti=$(this).val();
794
				 orgr=ti;
795
				 var $this=$(this);
796
				if($(this).val().trim()) {
797
					var lNum = $.trim($(this).val()).length;
798
					if(0 < lNum) {
799
						setTimeout(function(){
800
							if( ti===orgr && ti!== orgrEnd) {
801
								var tt=ti;
802
								orgrEnd=tt;
803
								$("#companylist").parent().show();
804
								$.ajax({
805
									"url": "/ajax/org/qr",
806
									"type": "GET",
807
									"data":{
808
										kw: $this.val(),
809
										limit:3
810
									},
811
									"success": function(data) {
812
										console.log(data);
813
										if(data.success) {
814
											if(orgrEnd==tt) {
815
												if(data.data.length == 0) {
816
													$this.parent().removeClass("displayNone");
817
													var itemlist = '<div class="null-data">没有找到相关企业</div>'
818
													$("#companylist").html(itemlist);
819
												} else {
820
													$this.siblings(".form-drop").removeClass("displayNone");
821
													var oSr = "";
822
													for(var i = 0; i < data.data.length; i++) {
823
														var busName=(data.data[i].forShort)?data.data[i].forShort:data.data[i].name;
824
														oSr += '<li style="min-height:40px;position:static;"data-id="'+data.data[i].id+'">' + busName + '</li>';
825
													}
826
													$this.siblings(".form-drop").find("ul").html(oSr);
827
												}
828
											}
829
										} else {
830
											$this.siblings(".form-drop").addClass("displayNone");
831
											$this.siblings(".form-drop").find("ul").html("");
708 832
										}
709
										$this.siblings(".form-drop").find("ul").html(oSr);
710
									}
711
								}
712
							} else {
713
								$this.siblings(".form-drop").addClass("displayNone");
714
								$this.siblings(".form-drop").find("ul").html("");
833
									},
834
									dataType: "json"
835
								});
715 836
							}
716
						},
717
						dataType: "json",
718
						'error': function() {
719
							$.MsgBox.Alert('提示', '服务器连接超时!');
720
						}
721
					});
837
						},500)
722 838
					}
723
					},500)
839
				} else {
840
					$(this).siblings(".form-drop").addClass("displayNone");
841
					$(this).siblings(".form-drop").find("ul").html("");
724 842
				}
725
			} else {
726
				$(this).siblings(".form-drop").addClass("displayNone");
727
				$(this).siblings(".form-drop").find("ul").html("");
728 843
			}
729
		}
730
	})
731
	$("#company").siblings(".form-drop").on("click", "li", function() {
732
		var oValue = $(this).text();
733
		var oJudge = $(this).parents(".form-drop").siblings(".form-result").find("ul li");
734
		for(var i = 0; i < oJudge.length; i++) {
735
			if(oValue == oJudge[i].innerText) {
736
				$.MsgBox.Alert('提示', '该企业已选择.');
737
				return;
844
		})
845
		$("#company").siblings(".form-drop").on("click", "li", function() {
846
			var oValue = $(this).text();
847
			var oJudge = $(this).parents(".form-drop").siblings(".form-result").find("ul li");
848
			for(var i = 0; i < oJudge.length; i++) {
849
				if(oValue == oJudge[i].innerText) {
850
					$.MsgBox.Alert('提示', '该企业已选择.');
851
					return;
852
				}
738 853
			}
739
		}
740
		$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis"></div></li>');
741
		$(this).parents(".form-drop").siblings("input").val("");
742
		if(oJudge.length == 4) {
854
			$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis"></div></li>');
743 855
			$(this).parents(".form-drop").siblings("input").val("");
744
			$("#company").hide();
745
		}
746
		$(this).parent("ul").html("")
747
	})
748
}
856
			if(oJudge.length == 4) {
857
				$(this).parents(".form-drop").siblings("input").val("");
858
				$("#company").hide();
859
			}
860
			$(this).parent("ul").html("")
861
		})
862
	}
749 863
});

+ 343 - 178
cmp-portal/js/articalModify.js

@ -6,13 +6,17 @@ $(function() {
6 6
    var modifyTimeval;
7 7
    var settime = false;
8 8
	var orgId = $.cookie("orgId");
9
	var colMgr = $.cookie("colMgr");
10
	var resMgr = $.cookie("resMgr");
11
	if(colMgr =='false' && resMgr=='false') {
12
		$(".conItem").hide().eq(0).show();
13
	}else if(resMgr=='true') {
14
		$(".conItem").eq(1).hide();
15
		$(".conItem").eq(4).hide();
9
    var colMgr = stringToBoolean($.cookie("colMgr"));
10
	var resMgr = stringToBoolean($.cookie("resMgr"));
11
	if(!colMgr && !resMgr) {
12
		$(".conItem").eq(5).show();
13
	}
14
	if(resMgr) {
15
		$(".conItem").eq(2).show();
16
		$(".conItem").eq(3).show();
17
	}
18
	if(colMgr) {
19
		$(".conItem").show().eq(5).hide();
16 20
	}
17 21
	if(orgId == "" || orgId == null || orgId == "null"){
18 22
    	location.href = "cmp-settled-log.html";
@ -24,7 +28,46 @@ $(function() {
24 28
	articleshow();
25 29
	relevantExperts();
26 30
	relevantResources();
31
	queryFileAtach();
27 32
	
33
	// 上传附件
34
	var uploaderFile =new WebUploader.create({
35
			auto: true,
36
			fileNumLimit: 5,
37
			server: '../ajax/article/files/upload',
38
			fileSingleSizeLimit: 50 * 1024 * 1024,
39
			pick: {
40
				id: "#upAttachPicker",
41
				multiple: false
42
			}
43
		});
44
		var fileId,fileArr=[];
45
		// 当有文件添加进来的时候
46
		uploaderFile.on('fileQueued', function(file) {
47
			fileId = file.id;
48
			var $li = $(
49
				'<li class="ellipsisSty-2">'+
50
					file.name +
51
					'<div class="deleteThis"></div>'+
52
				'</li>'
53
			),
54
				$file = $li.find('li');
55
			var $list = $("#fileAttachList");
56
			$list.prepend($li);
57
			var $len = $("#fileAttachList").find("li").length;
58
			if($len>0){
59
				$("#upAttachPicker").addClass("upAtteched")
60
				$("#upAttachPicker>.webuploader-pick").text('继续上传')
61
			}
62
		});
63
		uploaderFile.on('uploadSuccess', function(file, data) {
64
			if(data.success) {
65
				uploaderFile.removeFile(fileId);
66
				console.log(data)
67
				var fileItem = data.data[0]
68
				fileArr.push(fileItem)
69
			}
70
		});
28 71
	//校验标题
29 72
	$("#newstitle").on({
30 73
		focus: function() {
@ -75,19 +118,22 @@ $(function() {
75 118
	}
76 119
	
77 120
	//校验右侧专家和资源
78
	$("#checkZj").on("focus",function(){
121
	$("#checkZj").on("focus", function() {
79 122
		$(this).prev().find("span").text("最多选择5位专家");
80 123
	})
81
	$("#checkZy").on("focus",function(){
124
	$("#checkZy").on("focus", function() {
82 125
		$(this).prev().find("span").text("最多选择5个资源");
83 126
	})
84 127
	$("#sevrice").on("focus", function() {
85 128
		$(this).prev().find("span").text("最多选择5个服务");
86 129
	})
87
	$("#checkZj,#checkZy,#sevrice").on("blur",function(){
130
	$("#product").on("focus", function() {
131
		$(this).prev().find("span").text("最多选择5个产品");
132
	})
133
	$("#checkZj,#checkZy,#sevrice,#product").on("blur", function() {
88 134
		$(this).prev().find("span").text("");
89 135
	})
90
	
136

91 137
	$("#checkZj").on("keyup", function() {
92 138
		var _this = this;
93 139
		var ti=$(this).val();
@ -96,12 +142,10 @@ $(function() {
96 142
			return;
97 143
		}
98 144
		setTimeout(function(){
99
				if( ti===pr && ti!== prEnd) {
100
					checkZj(_this,ti);
101
				}
102
				
103
			},500)
104
		
145
			if( ti===pr && ti!== prEnd) {
146
				checkZj(_this,ti);
147
			}
148
		},500)
105 149
	})
106 150

107 151
	$("#checkZy").on("keyup", function() {
@ -112,11 +156,10 @@ $(function() {
112 156
		}
113 157
		var _this = this;
114 158
		setTimeout(function(){
115
				if( ti===re && ti!== reEnd) {
116
					checkZy(_this,ti);
117
				}
118
				
119
			},500)
159
			if( ti===re && ti!== reEnd) {
160
				checkZy(_this,ti);
161
			}
162
		},500)
120 163
		
121 164
	})
122 165
	var se,seEnd;
@ -128,31 +171,48 @@ $(function() {
128 171
		}
129 172
		var _this = this;
130 173
		setTimeout(function(){
131
				if( ti===se && ti!== seEnd) {
132
					checkSy(_this,ti);
133
				}
134
				
135
			},500)
174
			if( ti===se && ti!== seEnd) {
175
				checkSy(_this,ti);
176
			}
177
		},500)
136 178
		
137 179
	})
138
	$("#expertlist").on("click","li",function(){
180
	var proD,proDEnd;
181
	$("#product").on("keyup", function() {
182
		var ti=$(this).val();
183
		proD=ti;
184
		if($(this).val()=="") {
185
			return;
186
		}
187
		var _this = this;
188
		setTimeout(function(){
189
			if( ti===proD && ti!== proDEnd) {
190
				checkProDy(_this,ti);
191
			}
192
		},500)
193
	})
194
	$("#expertlist").on("click", "li", function() {
139 195
		var _this = this;
140
		expertlist(_this,"该专家已选择");
196
		expertlist(_this, "该专家已选择");
141 197
	});
142
	$("#resouselist").on("click","li",function(){
198
	$("#resouselist").on("click", "li", function() {
143 199
		var _this = this;
144
		expertlist(_this,"该资源已选择");
200
		expertlist(_this, "该资源已选择");
145 201
	});
146 202
	$("#sevricelist").on("click", "li", function() {
147 203
		var _this = this;
148 204
		expertlist(_this, "该服务已选择");
149 205
	});
206
	$("#productlist").on("click", "li", function() {
207
		var _this = this;
208
		expertlist(_this, "该产品已选择");
209
	});
150 210
	//点击右侧搜索出的专家和资源列表
151
	function expertlist(_this,title){
211
	function expertlist(_this, title) {
152 212
		var liId = $(_this).html();
153 213
		var plength = $(_this).parents(".otherBlock").find(".addexpert li");
154
		for(var i=0;i<plength.length;i++){
155
			if(plength[i].innerHTML==liId){
214
		for(var i = 0; i < plength.length; i++) {
215
			if(plength[i].innerHTML == liId) {
156 216
				$(_this).parents(".otherBlock").find(".aboutTit span").text(title);
157 217
				$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
158 218
				$(_this).parents(".otherBlock").find("input").val("");
@ -161,25 +221,25 @@ $(function() {
161 221
		}
162 222
		if(plength.length > 5) {
163 223
			$(_this).parents(".otherBlock").find("input").hide();
164
		 	$(_this).parents(".otherBlock").find(".addexpert").append($(_this).clone());
224
			$(_this).parents(".otherBlock").find(".addexpert").append($(_this).clone());
165 225
			$(_this).parents(".otherBlock").find("input").val("");
166 226
			$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
167
		}else{
227
		} else {
168 228
			$(_this).parents(".otherBlock").find(".addexpert").append($(_this).clone());
169 229
			$(_this).parents(".otherBlock").find("input").val("");
170 230
			$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
171 231
		}
172 232
	}
173
	
233

174 234
	//删除右侧搜索出的专家和资源
175
	$(".addexpert").on("click",".deleteThis",function(){
235
	$(".addexpert").on("click", ".deleteThis", function() {
176 236
		var plength = $(this).parent().parent().find("li").length;
177
		if(plength < 6){
237
		if(plength < 6) {
178 238
			$(this).parents(".otherBlock").find("input").show();
179 239
		}
180 240
		$(this).parent().remove();
181 241
	})
182
	
242

183 243
	function checkZj(_this,prd) {
184 244
		prEnd=prd;
185 245
		$.ajax({
@ -187,37 +247,40 @@ $(function() {
187 247
			"type": "get",
188 248
			"data": {
189 249
				"name": $("#checkZj").val(),
190
				"total": 5
250
				"total": 3
191 251
			},
192 252
			"success": function(data) {
193 253
				console.log(data);
194 254
				if(data.success) {
195 255
					if(data.data != "") {
196
							if(prEnd == prd){
197
								$(_this).next().removeClass("displayNone");
198
								var itemlist = '';
199
								$("#expertlist").html("");
200
								for(var i = 0; i < data.data.length; i++) {
201
									var itemlist = '<li id="usid" class="flexCenter">';
202
									itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
203
									itemlist += '<div class="madiaInfo">';
204
									itemlist += '<p class="ellipsisSty"><span class="h1Font" id="name"></span><span class="h2Font" style="margin-left:10px;" id="title"></span></p>';
205
									itemlist += '<p class="h2Font ellipsisSty" id="orgName"></p>';
206
									itemlist += '</div><div class="deleteThis"></div></li>';
207
									$itemlist = $(itemlist);
208
									$("#expertlist").append($itemlist);
209
									var datalist = data.data[i];
210
									$itemlist.attr("data-id", datalist.id);
211
									$itemlist.find("#name").text(datalist.name);
212
									$itemlist.find("#title").text(datalist.title);
213
									$itemlist.find("#orgName").text(datalist.orgName);
214
									if(datalist.hasHeadImage == 1) {
215
										$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + datalist.id + "_l.jpg);");
216
									}
256
						if(prEnd == prd){
257
							$(_this).next().removeClass("displayNone");
258
							var itemlist = '';
259
							$("#expertlist").html("");
260
							for(var i = 0; i < data.data.length; i++) {
261
								var itemlist = '<li id="usid" class="flexCenter">';
262
								itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
263
								itemlist += '<div class="madiaInfo">';
264
								itemlist += '<p class="ellipsisSty"><span class="h1Font" id="name"></span><span class="h2Font" style="margin-left:10px;" id="title"></span></p>';
265
								itemlist += '<p class="h2Font ellipsisSty" id="orgName"></p>';
266
								itemlist += '</div><div class="deleteThis"></div></li>';
267
								$itemlist = $(itemlist);
268
								$("#expertlist").append($itemlist);
269
								var datalist = data.data[i];
270
								$itemlist.attr("data-id", datalist.id);
271
								$itemlist.find("#name").text(datalist.name);
272
								$itemlist.find("#title").text(datalist.title);
273
								$itemlist.find("#orgName").text(datalist.orgName);
274
								if(datalist.hasHeadImage == 1) {
275
									$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + datalist.id + "_l.jpg);");
276
								}
217 277
							}		
218 278
						}
219 279
					} else {
220
						$(_this).next().addClass("displayNone");
280
						$(_this).next().removeClass("displayNone");
281
						var itemlist = '<div class="null-data">没有找到相关专家</div>'
282
						$("#expertlist").html(itemlist);
283
						return;
221 284
					}
222 285
				} else {
223 286
					$(_this).next().addClass("displayNone");
@ -228,7 +291,6 @@ $(function() {
228 291
			}
229 292
		});
230 293
	}
231

232 294
	function checkZy(_this, prd) {
233 295
		reEnd = prd;
234 296
		$.ajax({
@ -237,7 +299,7 @@ $(function() {
237 299
			"data": {
238 300
				"orgid": orgId,
239 301
				"resourceName": $("#checkZy").val(),
240
				"rows": 5
302
				"rows": 3
241 303
			},
242 304
			"success": function(data) {
243 305
				console.log(data);
@ -259,7 +321,9 @@ $(function() {
259 321
							}
260 322
						}
261 323
					} else {
262
						$(_this).next().addClass("displayNone");
324
						$(_this).next().removeClass("displayNone");
325
						var itemlist = '<div class="null-data">没有找到相关资源</div>'
326
						$("#resouselist").html(itemlist);
263 327
					}
264 328
				} else {
265 329
					$(_this).next().addClass("displayNone");
@ -301,7 +365,9 @@ $(function() {
301 365
							}
302 366
						}
303 367
					} else {
304
						$(_this).next().addClass("displayNone");
368
						$(_this).next().removeClass("displayNone");
369
						var itemlist = '<div class="null-data">没有找到相关服务</div>'
370
						$("#sevricelist").html(itemlist);
305 371
					}
306 372
				} else {
307 373
					$(_this).next().addClass("displayNone");
@ -312,6 +378,69 @@ $(function() {
312 378
			}
313 379
		});
314 380
	}
381
	function checkProDy(_this, prd) {
382
		proDEnd = prd;
383
		$.ajax({
384
			"url": "../ajax/product/publish",
385
			"type": "get",
386
			"data": {
387
				owner:orgId,
388
				rows:5
389
			},
390
			"success": function(data) {
391
				console.log(data);
392
				if(data.success) {
393
					if(data.data != "") {
394
						if(proDEnd == prd) {
395
							$(_this).next().removeClass("displayNone");
396
							$("#productlist").html("");
397
							for(var i = 0; i < data.data.length; i++) {
398
								var itemlist = '<li id="usid" class="flexCenter" >' +
399
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
400
									'<div class="deleteThis"></div></li>'
401
								$itemlist = $(itemlist);
402
								$("#productlist").append($itemlist);
403
								var datalist = data.data[i];
404
								$itemlist.attr("data-id", datalist.id);
405
								$itemlist.find("#resourceName").text(datalist.name);
406

407
							}
408
						}
409
					} else {
410
						$(_this).next().removeClass("displayNone");
411
						var itemlist = '<div class="null-data">没有找到相关产品</div>'
412
						$("#productlist").html(itemlist);
413
					}
414
				} else {
415
					$(_this).next().addClass("displayNone");
416
				}
417
			}
418
		});
419
	}
420
	//点击右侧搜索出的专家和资源列表
421
	function expertlist(_this,title){
422
		var liId = $(_this).html();
423
		var plength = $(_this).parents(".otherBlock").find(".addexpert li");
424
		for(var i=0;i<plength.length;i++){
425
			if(plength[i].innerHTML==liId){
426
				$(_this).parents(".otherBlock").find(".aboutTit span").text(title);
427
				$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
428
				$(_this).parents(".otherBlock").find("input").val("");
429
				return;
430
			}
431
		}
432
		if(plength.length > 5) {
433
			$(_this).parents(".otherBlock").find("input").hide();
434
		 	$(_this).parents(".otherBlock").find(".addexpert").append($(_this).clone());
435
			$(_this).parents(".otherBlock").find("input").val("");
436
			$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
437
		}else{
438
			$(_this).parents(".otherBlock").find(".addexpert").append($(_this).clone());
439
			$(_this).parents(".otherBlock").find("input").val("");
440
			$(_this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
441
		}
442
	}
443

315 444
    //初始化数据
316 445
	function articleshow(){
317 446
		$.ajax({
@ -346,7 +475,32 @@ $(function() {
346 475
			}
347 476
		});
348 477
	}
349
	
478
	//查询附件
479
	function queryFileAtach(){
480
		$.ajax({
481
			"url": "/ajax/article/files/byArticleId",
482
			"type": "get",
483
			"dataType" : "json",
484
			"data" :{"id":articleId},
485
			"success": function(data) {
486
				console.log(data)
487
				if(data.success && data.data) {
488
					for(var i = 0; i < data.data.length; i++) {
489
						var itlist = '<li class="ellipsisSty-2">'+
490
							data.data[i].name +
491
							'<div class="deleteThis"></div>'+
492
						'</li>'
493
						$("#fileAttachList").append(itlist);
494
					}
495
					var $len = $("#fileAttachList").find("li").length;
496
					if($len>0){
497
						$("#upAttachPicker").addClass("upAtteched")
498
						$("#upAttachPicker>.webuploader-pick").text('继续上传')
499
					}
500
				}
501
			}
502
		});
503
	}
350 504
	//相关专家
351 505
	function relevantExperts(){
352 506
		$.ajax({
@ -362,9 +516,6 @@ $(function() {
362 516
					}
363 517
					
364 518
				}
365
			},
366
			"error": function() {
367
				$.MsgBox.Alert('提示', '链接服务器超时')
368 519
			}
369 520
		});
370 521
	}
@ -509,14 +660,7 @@ releventService()
509 660
	var titleflase = false;
510 661
	//交验图片和标题不能为空
511 662
	function noTitleImg(){
512
		//var ImageKey = $("#uploader").attr("data-id");
513 663
		var newstitle = $("#newstitle").val();
514
		/*if(ImageKey==""){
515
			$(".imgtis").text("请上传封面图片");
516
		}else{
517
			$(".imgtis").text("");
518
			imgflase = true;
519
		}*/
520 664
		if(newstitle==""){
521 665
			$.MsgBox.Alert('提示', '请输入文章标题')
522 666
			return;
@ -554,6 +698,23 @@ releventService()
554 698
		});
555 699
		return $.unique(arr);
556 700
	}
701
	function productli() {
702
		var arr=[];
703
		$("#productli li").each(function(i) {
704
			var liid = $(this).attr("data-id");
705
			arr.push(liid);
706
		});
707
		return $.unique(arr);
708
	}
709
	function fileArrli() {
710
		var arr=[];
711
		for(var i=0;i<fileArr.length;i++){
712
			var item=fileArr[i].uri+','+i+','+fileArr[i].size+','+fileArr[i].name;
713
			arr.push(item)
714
		}
715
		return $.unique(arr);
716
	}
717
	
557 718
	var seleClum ='<div class="mb-list mb-listL"><p>请选择文章发布的栏目:</p>'+
558 719
		'<select class="form-control form-column" id="seletColum"></select></div>';
559 720
	var seleTime = '<div class="mb-list mb-listR"><p class="msg-tit">请设置文章发布的时间:</p>'+
@ -574,8 +735,7 @@ releventService()
574 735
		}
575 736
		noTitleImg();
576 737
		if(titleflase) {
577
			console.log(colMgr)
578
			if(colMgr=="true"){
738
			if(colMgr){
579 739
				$(".blackcover2").fadeIn();
580 740
				var btnOk='<input class="mb_btn mb_btnOk mb_btnOkpub" type="button" value="确定">'
581 741
				$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
@ -620,7 +780,7 @@ releventService()
620 780
				oflag: 1,
621 781
			});
622 782
			$(".mb-listR .form_datetime .frmcontype").val(getNowFormatDate());
623
			if(colMgr=="true"){
783
			if(colMgr){
624 784
				$(".mb-listL").remove();
625 785
				$("#promotTh").prepend(seleClum);
626 786
				fillColum(7);//填充select栏目
@ -693,11 +853,13 @@ releventService()
693 853
		$data.professors = experarray;
694 854
		$data.resources = resourcesarray;
695 855
		$data.wares=seli();
696
		if(colMgr=="true"){
856
		$data.products=productli();
857
		if(colMgr){
697 858
			$data.colNum = $("#seletColum").val();
698 859
			if(publishTime!="") {
699 860
				$data.publishTime = publishTime;
700 861
			}
862
			$data.files=fileArrli();
701 863
		}else{
702 864
			if(publishTime!="") {
703 865
				$data.publishTime = publishTime;
@ -858,111 +1020,114 @@ releventService()
858 1020
		var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8) + " " + otm.substring(8, 10)+ ":" + otm.substring(10, 12);
859 1021
		return otme;
860 1022
	}
861
 /*添加相关企业*/
862
relatCompanies("#company");
1023
 	/*添加相关企业*/
1024
	relatCompanies("#company");
863 1025
    /*添加相关企业*/
864 1026
    function  relatCompanies(sel) {
865
	$(sel).bind({
866
		paste: function(e) {
867
			var pastedText;
868
			if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
869
				            
870
				pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
871
872
			else  {            
873
				pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
874
				          
875
			}
876
			$(this).val(pastedText);
877
			e.preventDefault();
878
		},
879
		cut: function(e) {
880
			var $this = $(this);
881
		},
882
		blur: function() {
883
			var $this = $(this);
884
			setTimeout(function() {
885
				$this.siblings(".form-drop").hide();
886
			}, 500)
887
			$(this).siblings(".aboutTit").find("span").text("");
888
		},
889
		focus: function() {
890
			$(this).siblings(".form-drop").show();
891
			$(this).siblings(".aboutTit").find("span").text("最多选择3家企业");
892
		},
893
		keyup: function(e) {
894
			 var ti=$(this).val();
895
			 orgr=ti;
896
			 var $this=$(this);
897
			if($(this).val().trim()) {
898
				var lNum = $.trim($(this).val()).length;
899
				if(0 < lNum) {
900
					setTimeout(function(){
901
						if( ti===orgr && ti!== orgrEnd) {
902
							var tt=ti;
903
							orgrEnd=tt;
904
					$("#companylist").parent().show();
905
					$.ajax({
906
						"url": "/ajax/org/qr",
907
						"type": "GET",
908
						"data":{
909
							kw: $this.val(),
910
							limit:3
911
						},
912
						"success": function(data) {
913
							console.log(data);
914
							if(data.success) {
915
								if(orgrEnd==tt) {
916
									if(data.data.length == 0) {
917
										$this.siblings(".form-drop").addClass("displayNone");
918
										$this.siblings(".form-drop").find("ul").html("");
919
									} else {
920
										$this.siblings(".form-drop").removeClass("displayNone");
921
										var oSr = "";
922
										for(var i = 0; i < data.data.length; i++) {
923
											var busName=(data.data[i].forShort)?data.data[i].forShort:data.data[i].name;
924
											oSr += '<li style="min-height:40px;position:static;"data-id="'+data.data[i].id+'">' + busName + '</li>';
1027
		$(sel).bind({
1028
			paste: function(e) {
1029
				var pastedText;
1030
				if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
1031
					            
1032
					pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
1033
				
1034
				else  {            
1035
					pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
1036
					          
1037
				}
1038
				$(this).val(pastedText);
1039
				e.preventDefault();
1040
			},
1041
			cut: function(e) {
1042
				var $this = $(this);
1043
			},
1044
			blur: function() {
1045
				var $this = $(this);
1046
				$(this).siblings(".aboutTit").find("span").text("");
1047
				setTimeout(function() {
1048
					$this.siblings(".form-drop").hide();
1049
				}, 500)
1050
			},
1051
			focus: function() {
1052
				$(this).siblings(".form-drop").show();
1053
				$(this).siblings(".aboutTit").find("span").text("最多选择5家企业");
1054
			},
1055
			keyup: function(e) {
1056
				 var ti=$(this).val();
1057
				 orgr=ti;
1058
				 var $this=$(this);
1059
				if($(this).val().trim()) {
1060
					var lNum = $.trim($(this).val()).length;
1061
					if(0 < lNum) {
1062
						setTimeout(function(){
1063
							if( ti===orgr && ti!== orgrEnd) {
1064
								var tt=ti;
1065
								orgrEnd=tt;
1066
								$("#companylist").parent().show();
1067
								$.ajax({
1068
									"url": "/ajax/org/qr",
1069
									"type": "GET",
1070
									"data":{
1071
										kw: $this.val(),
1072
										limit:3
1073
									},
1074
									"success": function(data) {
1075
										console.log(data);
1076
										if(data.success) {
1077
											if(orgrEnd==tt) {
1078
												if(data.data.length == 0) {
1079
													$this.parent().removeClass("displayNone");
1080
													var itemlist = '<div class="null-data">没有找到相关企业</div>'
1081
													$("#companylist").html(itemlist);
1082
												} else {
1083
													$this.siblings(".form-drop").removeClass("displayNone");
1084
													var oSr = "";
1085
													for(var i = 0; i < data.data.length; i++) {
1086
														var busName=(data.data[i].forShort)?data.data[i].forShort:data.data[i].name;
1087
														oSr += '<li style="min-height:40px;position:static;"data-id="'+data.data[i].id+'">' + busName + '</li>';
1088
													}
1089
													$this.siblings(".form-drop").find("ul").html(oSr);
1090
												}
1091
											}
1092
										} else {
1093
											$this.siblings(".form-drop").addClass("displayNone");
1094
											$this.siblings(".form-drop").find("ul").html("");
925 1095
										}
926
										$this.siblings(".form-drop").find("ul").html(oSr);
927
									}
928
								}
929
							} else {
930
								$this.siblings(".form-drop").addClass("displayNone");
931
								$this.siblings(".form-drop").find("ul").html("");
1096
									},
1097
									dataType: "json"
1098
								});
1099
							}else{
1100
								$(_this).next().removeClass("displayNone");
1101
								var itemlist = '<div class="null-data">没有找到相关企业</div>'
1102
								$("#companylist").html(itemlist);
932 1103
							}
933
						},
934
						dataType: "json",
935
						'error': function() {
936
							$.MsgBox.Alert('提示', '服务器连接超时!');
937
						}
938
					});
1104
						},500)
939 1105
					}
940
					},500)
1106
				} else {
1107
					$(this).siblings(".form-drop").addClass("displayNone");
1108
					$(this).siblings(".form-drop").find("ul").html("");
941 1109
				}
942
			} else {
943
				$(this).siblings(".form-drop").addClass("displayNone");
944
				$(this).siblings(".form-drop").find("ul").html("");
945 1110
			}
946
		}
947
	})
948
	$("#company").siblings(".form-drop").on("click", "li", function() {
949
		var oValue = $(this).text();
950
		var oJudge = $(this).parents(".form-drop").siblings(".form-result").find("ul li");
951
		for(var i = 0; i < oJudge.length; i++) {
952
			if(oValue == oJudge[i].innerText) {
953
				$.MsgBox.Alert('提示', '该企业已选择.');
954
				return;
1111
		})
1112
		$("#company").siblings(".form-drop").on("click", "li", function() {
1113
			var oValue = $(this).text();
1114
			var oJudge = $(this).parents(".form-drop").siblings(".form-result").find("ul li");
1115
			for(var i = 0; i < oJudge.length; i++) {
1116
				if(oValue == oJudge[i].innerText) {
1117
					$.MsgBox.Alert('提示', '该企业已选择.');
1118
					return;
1119
				}
955 1120
			}
956
		}
957
		$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis"></div></li>');
958
		$(this).parents(".form-drop").siblings("input").val("");
959
		if(oJudge.length == 4) {
1121
			$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis"></div></li>');
960 1122
			$(this).parents(".form-drop").siblings("input").val("");
961
			$("#company").hide();
962
		}
963
		$(this).parent("ul").html("")
964
	})
965
}
1123
			if(oJudge.length == 4) {
1124
				$(this).parents(".form-drop").siblings("input").val("");
1125
				$("#company").hide();
1126
			}
1127
			$(this).parent("ul").html("")
1128
		})
1129
	}
1130

966 1131
    companylist()
967 1132
  //相关企业
968 1133
	function companylist() {

+ 0 - 110
cmp-portal/js/cmp-UnstaffList.js

@ -1,110 +0,0 @@
1
$(document).ready(function() {
2
	$(".onlogin .headnavbtn li").eq(0).addClass("navcurrent");
3
	$(".workmenu>ul>li.staffIcon").addClass("nowLi");
4
	var id = $.cookie('orgId');
5
	if(id == "" || id == null || id == "null"){
6
    	location.href = "cmp-settled-log.html";
7
    }
8
	resMgr(id);
9
	/*获取企业未认证的用户*/
10
	function UnauthorizedUser() {
11
		$.ajax({
12
			url: "/ajax/professor/qaOrgAuth",
13
			type: "GET",
14
			timeout: 10000,
15
			dataType: "json",
16
			data: {
17
				"orgId": id,
18
				"orgAuth": 0
19
			},
20
			success: function(data, textState) {
21
				if(data.success) {
22
					console.log(data);
23
					var $data = data.data;
24
					UnauthorizedUserHtml($data, "#UnauthorizedUserList", 1);
25
				}
26
			},
27
			error: function(XMLHttpRequest, textStats, errorThrown) {
28
				$.MsgBox.Alert('提示', '服务器请求失败')
29
			}
30
		})
31
	}
32
	UnauthorizedUser();
33
	/*企业未认证用户html*/
34
	function UnauthorizedUserHtml() {
35
		var arr = new Array();
36
		for(var i = 0; i < arguments[0].length; i++) {
37
			var img, tiof, deor, otex;
38
			if(arguments[0][i].hasHeadImage) {
39
				img = "/images/head/" + arguments[0][i].id + "_l.jpg";
40
			} else {
41
				img = "../images/default-photo.jpg"
42
			}
43
			if(arguments[0][i].title) {
44
				if(arguments[0][i].office) {
45
					tiof = arguments[0][i].title + " ," + arguments[0][i].office;
46
				} else {
47
					tiof = arguments[0][i].title;
48
				}
49
			} else {
50
				if(arguments[0][i].office) {
51
					tiof = arguments[0][i].office;
52
				} else {
53
					tiof = "";
54
				}
55
			}
56
			if(arguments[0][i].department) {
57
				if(arguments[0][i].orgName) {
58
					deor = arguments[0][i].department + " ," + arguments[0][i].orgName;
59
				} else {
60
					deor = arguments[0][i].department;
61
				}
62
			} else {
63
				if(arguments[0][i].orgName) {
64
					deor = arguments[0][i].orgName;
65
				} else {
66
					deor = "";
67
				}
68
			}
69
			if(arguments[2] == 1) {
70
				otex = "待认证";
71
			} else {
72
				otex = "移除";
73
			}
74
			var oString = "<li>"
75
			oString += "<div class='leftlogo floatL userRadius'>"
76
			oString += "<img class='headPhoto' src='" + img + "'  width='100%'>"
77
			oString += "</div>"
78
			oString += "<div class='rightinfo staffinfo floatL'>"
79
			oString += "<p class='h3Font'>" + arguments[0][i].name + "</p>"
80
			oString += "<p class='h5Font ellipsisSty'>" + tiof + "</p>"
81
			oString += "<p class='h5Font ellipsisSty'>" + deor + "</p>"
82
			oString += "</div>"
83
			oString += "<button type='button' class='frmtype fontLink btnPosition cmpColor headRadius' data-id='" + arguments[0][i].id + "'>" + otex + "</button>"
84
			oString += "</li>"
85
			$(arguments[1]).append(oString);
86
		}
87
	}
88
	/*认证企业员工*/
89
	$("#UnauthorizedUserList").on("click", "button", function() {
90
		var oDataId = $(this).attr("data-id");
91
		var oDa = $(this);
92
		$.ajax({
93
			url: "/ajax/professor/passOrgAuth",
94
			type: "POST",
95
			timeout: 10000,
96
			dataType: "json",
97
			data: {
98
				"id": oDataId,
99
			},
100
			success: function(data, textState) {
101
				if(data.success) {
102
					oDa.text("已认证")
103
				}
104
			},
105
			error: function(XMLHttpRequest, textStats, errorThrown) {
106
				$.MsgBox.Alert('提示', '服务器请求失败')
107
			}
108
		})
109
	})
110
})

+ 1 - 1
cmp-portal/js/cmp-articalList.js

@ -1,6 +1,6 @@
1 1
/*文章个人列表*/
2 2
var orgId = $.cookie("orgId");
3
var colMgr = $.cookie("colMgr");
3
var colMgr = stringToBoolean($.cookie("colMgr"));
4 4
if(orgId == "" || orgId == null || orgId == "null"){
5 5
	location.href = "cmp-settled-log.html";
6 6
}

+ 1 - 1
cmp-portal/js/cmp-settled-reg.js

@ -124,7 +124,7 @@ $(function() {
124 124
			});
125 125
		} else {
126 126
			$(".msgReg2").prev().addClass("frmmsg-warning");
127
			$(".msgReg2 span").text("请输入正确邮箱地址");
127
			$(".msgReg2 span").text("请输入正确邮箱地址");
128 128
		}
129 129
	}
130 130


+ 167 - 0
cmp-portal/js/cmp-staff-invite-log.js

@ -0,0 +1,167 @@
1
	var step = GetQueryString("step"),
2
		orgId = $.cookie("inviteId"),
3
		orgName = $.cookie("inviteName"),
4
		orgLogo = $.cookie("inviteLogo");
5
	var namePass = false;
6
	var passwordPass = false;
7
	
8
	$(".cmpOrgName").text(orgName);
9
	$("#orgHeadLogo").attr("src", orgLogo);
10
	var foL = $('.cmp-invite-block').attr('data-step'),
11
		foR = $('.cmp-success-block').attr('data-step');
12
	
13
	if(step === foR){
14
		$('.cmp-success-block').show();
15
	}else{
16
		$('.cmp-invite-block').show();
17
	}
18

19
	/*校验登录按钮显示状态*/
20
	function checkLoginButtn(_this) {
21
		var username = $(_this).parents(".cmpCoverUl").find(".username").val();
22
		var passwd = $(_this).parents(".cmpCoverUl").find(".passwd").val();
23
		if(username == "" || passwd == "") {
24
			$(_this).parents(".cmpCoverUl").find(".loginSubmit").attr("disabled", true);
25
		} else {
26
			$(_this).parents(".cmpCoverUl").find(".loginSubmit").attr("disabled", false);
27
		}
28
	}
29
	
30
	/*获取焦点*/
31
	function getFocus(_this) {
32
		$(_this).next().find("span").text("");
33
		$(_this).removeClass("frmmsg-warning");
34
	}
35
	
36
	//校验登录手机和邮箱账户
37
	function nameVal(_this) {
38
		var loginName = $(_this).val();
39
		var gunf = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
40
		var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
41
		if(loginName.length == "") {
42
			$(_this).next().find("span").text("请输入您的手机或邮箱");
43
			$(_this).addClass("frmmsg-warning");
44
		} else if(gunf.test(loginName.trim())) {
45
			userRegisterOk(_this);
46
			$(_this).next().find("span").text("");
47
			$(_this).removeClass("frmmsg-warning");
48
			namePass = true;
49
		} else if(hunPhone.test(loginName.trim())) {
50
			userRegisterOk(_this);
51
			$(_this).next().find("span").text("");
52
			$(_this).removeClass("frmmsg-warning");
53
			namePass = true;
54
		} else {
55
			$(_this).next().find("span").text("请输入正确的手机或邮箱");
56
			$(_this).addClass("frmmsg-warning");
57
		}
58
	}
59
	//判断账号是否注册
60
	function userRegisterOk(_this,org) {
61
		var loginName = $(_this).val();
62
		$.ajax("/ajax/isReg?key=" + loginName, {
63
			type: "GET",
64
			async: true,
65
			success: function($data) {
66
				if($data.data == true) {
67
					$(_this).next().find("span").text("该账号不存在,请检查后重试");
68
					$(_this).addClass("frmmsg-warning");
69
				} else {
70
					$(_this).next().find("span").text("");
71
					$(_this).removeClass("frmmsg-warning");
72
					if(org==1){
73
						doClick("#getcode");
74
						phoneVerificationCode("#getcode");
75
					}
76
				}
77
			}
78
		});
79
	}
80
	
81
	//校验登录密码
82
	function passwordVal(_this) {
83
		var passwd = $(_this).val();
84
		if(passwd.length == "") {
85
			$(_this).next().find("span").text("请输入您的登录密码");
86
			$(_this).addClass("frmmsg-warning");
87
		} else if(passwd.length < 6) {
88
			$(_this).next().find("span").text("密码由6-24个字符组成,区分大小写");
89
			$(_this).addClass("frmmsg-warning");
90
		} else {
91
			$(_this).next().find("span").text("");
92
			$(_this).removeClass("frmmsg-warning");
93
			passwordPass = true;
94
		}
95
	}
96
	//密码登录
97
	function passwdLogin(_this) {
98
		var loginName = $(_this).parents(".cmpCoverUl").find(".username").val();
99
		var passwordd = $(_this).parents(".cmpCoverUl").find(".passwd").val();
100
		if(namePass && passwordPass) {
101
			$.ajax("/ajax/login", {
102
				type: "POST",
103
				data: {
104
					"pw": passwordd,
105
					"lk": loginName
106
				},
107
				dataType: 'json',
108
				async: false,
109
				success: function(data) {
110
					if(data.success) {
111
						if(data.data != "null" && data.data != null) {
112
							getUserInfo(data.data.id)
113
						} else {
114
							$(_this).parents(".cmpCoverUl").find(".msgLog2 span").text("账号与密码不匹配,请检查后重试");
115
						}
116
					}
117
				}
118
			});
119
		}
120
	}
121
	
122
	function getUserInfo(id){
123
		$.ajax("/ajax/professor/baseInfo/"+id, {
124
			type: "GET",
125
			dataType: 'json',
126
			success: function(data) {
127
				if(data.success) {
128
					var auth = data.data.orgAuth
129
					$.ajax("/ajax/professor/joinAndPassOrgAuth", {
130
						type: "POST",
131
						async: true,
132
						data: {
133
							"pid": id,
134
							"oid": orgId
135
						},
136
						success: function(res) {
137
							if(auth === '1'){
138
								$('.loginBl').addClass('displayNone')
139
								$('.sureIBl').removeClass('displayNone')
140
								$('.sureIBl').on('click','.sureUpData',function(){
141
									$('.cmp-success-block').show();
142
									$('.cmp-invite-block').hide();
143
								})
144
								$('.sureIBl').on('click','.reject-btn',function(){
145
									$.cookie('userid', null);
146
									$.cookie('userAuth', null);
147
									$.cookie('userEmail', null);
148
									$.cookie('userMobilePhone', null);
149
									$.cookie('userName', null);
150
									$.cookie('userType', null);
151
									location.href = "../index.html"
152
								})
153
							}else if(auth === '0'){
154
								$('.cmp-success-block').show();
155
								$('.cmp-invite-block').hide();
156
							}
157
						}
158
					})
159
					
160
				}
161
			}
162
		});
163
	}
164
	//提交登录
165
	function login(_this) {
166
		passwdLogin(_this);
167
	}

+ 350 - 0
cmp-portal/js/cmp-staff-invite.js

@ -0,0 +1,350 @@
1
//接受企业邀请,注册「科袖」
2
$(function() {
3
//	var sc = GetQueryString("sc");
4
var sc = '9B9AD50F07A0480E840B178B34516ED8'
5
	var companyNameVal, companyPhoneVal, companyscVal, companyPswVal1;
6
	var setname = false;
7
	var phonePass = false;
8
	var phoneCode = false;
9
	var setnewpwd = false;
10
//	var setnewpwd2 = false;
11
//	var ifxuanze = true;
12

13
	initialVal()
14
	/*校验注册按钮显示状态*/
15
	$('#cmpSettledul').on('keyup', "#companyName,#companyPhone,#imgCode,#companysc,#companyPsw1", function() {
16
		if($("#companyName").val() == "" || $("#companyPhone").val() == "" || $("#companysc").val() == "" || $("#companyPsw1").val() == "" || $("#imgCode").val() == "") {
17
			$("#companyRet").attr("disabled", true);
18
		} else {
19
			$("#companyRet").attr("disabled", false);
20
		}
21
	});
22

23
	/*校验邀请人名称*/
24
	$('#companyName').on('focus', function() {
25
		$(".msgCmp01 span").text("");
26
	});
27
	$('#companyName').on('blur', function() {
28
		checkName();
29
	});
30

31
	/*校验邀请人手机*/
32
	$('#companyPhone').on('focus', function() {
33
		$(".msgCmp02").text("");
34
	});
35
	$('#companyPhone').on('keyup', function() {
36
		checkPhone();
37
	});
38
	$('#companyPhone').on('blur', function() {
39
		if($(".msgCmp02").text()!=""){
40
			$(".msgCmp02").prev().addClass("frmmsg-warning");
41
		}else{
42
			$(".msgCmp02").prev().removeClass("frmmsg-warning");
43
		}
44
	});
45
	/*改变图形验证码*/
46
	$("#changImage").on("click",function(){
47
		$(this).attr("src","/ajax/PictureVC?"+new Date().getTime());
48
	})
49
	/*校验邀请验证码*/
50
	$('#companysc').on('focus', function() {
51
		$(".msgCmp03").text("");
52
	});
53
	$('#companysc').on('blur', function() {
54
		checkSc();
55
	});
56

57
	/*校验新密码*/
58
	$('#companyPsw1').on('focus', function() {
59
		$(".msgCmp04 span").text("");
60
	});
61
	$('#companyPsw1').on('blur', function() {
62
		checkNewPwd();
63
	});
64

65
	/*校验单选框*/
66
//	$(".cmpAgree").on("click", function() {
67
//		if($(this).hasClass("ifxuanze")) {
68
//			$(this).removeClass("ifxuanze");
69
//			$(this).attr("src", "images/business_button_xuanze_nor.png")
70
//			ifxuanze = false;
71
//		} else {
72
//			$(this).addClass("ifxuanze");
73
//			$(this).attr("src", "images/business_button_xuanze_hig.png");
74
//			ifxuanze = true;
75
//		}
76
//	})
77
	var orgId = '';
78
	function initialVal() {
79
		$.ajax("/ajax/queryOrgByOrgInviteLogId", {
80
			type: "GET",
81
			data:{
82
				code:sc
83
			},
84
			success: function($data) {
85
				console.log($data)
86
				if($data.success || $data.data!=='') {
87
					orgId = $data.data.id;
88
					var orgName = $data.data.name
89
					$(".cmpOrgName").text(orgName);
90
					var imgS="/images/default-icon.jpg"
91
					if($data.data.hasOrgLogo){
92
						imgS="/images/org/" + $info.id + ".jpg";
93
					}
94
					$("#orgHeadLogo").attr("src", imgS);
95
					
96
					$.cookie("inviteId",orgId);
97
					$.cookie("inviteName",orgName);
98
					$.cookie("inviteLogo",imgS);
99
				} else {
100
					$.MsgBox.Alert('消息', '验证链接已失效')
101
				}
102
			}
103
		});
104
	}
105

106
	function checkName() {
107
		companyNameVal = $("#companyName").val();
108
		if(companyNameVal.length == "") {
109
			$(".msgCmp01").prev().addClass("frmmsg-warning");
110
			$(".msgCmp01 span").text("请输入您的真实姓名");
111
		} else {
112
			$(".msgCmp01").prev().removeClass("frmmsg-warning");
113
			$(".msgCmp01 span").text("");
114
			setname = true;
115
		}
116
	}
117

118
	function checkPhone() {
119
		companyPhoneVal = $("#companyPhone").val();
120
		$.ajax("/ajax/isReg?key=" + companyPhoneVal, {
121
			type: "GET",
122
			async: true,
123
			success: function($data) {
124
				if(companyPhoneVal.length == 0) {
125
					$(".msgCmp02").text("请输入您的手机号码");
126
					$("#getcode").attr("disabled", true);
127
				} else {
128
					var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
129
					if(hunPhone.test(companyPhoneVal.trim())) {
130
						if($data.data == false) {
131
							$(".msgCmp02").text("该手机已注册账户,您可以直接登录");
132
						} else {
133
							$(".msgCmp02").prev().removeClass("frmmsg-warning");
134
							$(".msgCmp02").text("");
135
							phonePass = true;
136
							$("#getcode").attr("disabled", false);
137
							addEvent(btn, "click", handler); //手机必须验证正确,才执行
138
						}
139
					} else {
140
						phonePass = false;
141
						$(".msgCmp02").text("请输入正确的手机号码");
142
						$("#getcode").attr("disabled", true);
143
					}
144
				}
145
			}
146
		});
147
	}
148

149
	function checkSc() {
150
		companyscVal = $("#companysc").val();
151
		if(companyscVal.length == 0) {
152
			$(".msgCmp03").prev().addClass("frmmsg-warning");
153
			$(".msgCmp03").text("请输入您收到的验证码");
154
			phoneCode = false;
155
		} else {
156
			var d = /^[0-9a-zA-Z]{4}$/;
157
			if(d.test(companyscVal.trim())) {
158
				$(".msgCmp03").prev().removeClass("frmmsg-warning");
159
				$(".msgCmp03").text("");
160
				phoneCode = true;
161
			} else {
162
				$(".msgCmp03").prev().addClass("frmmsg-warning");
163
				$(".msgCmp03").text("验证码为4位数字,请检查后重试");
164
				phoneCode = false;
165
			}
166
		}
167
	}
168

169
	//手机发送验证码
170
	var btn = document.getElementById("getcode");
171
	var handler = function() {
172
		doClick();
173
		getPhoneCode(); //调用发送手机验证码接口
174
		removeEvent(btn, 'click', handler); //取消绑定该事件
175
	}
176

177
	function addEvent(obj, type, handler) {
178
		if(obj.addEventListener) {
179
			obj.addEventListener(type, handler, false);
180
		} else if(obj.attachEvent) {
181
			obj.attachEvent('on' + type, handler);
182
		}
183
	}
184

185
	function removeEvent(obj, type, handler) {
186
		if(obj.removeEventListener) {
187
			obj.removeEventListener(type, handler, false);
188
		} else if(obj.detachEvent) {
189
			obj.detachEvent("on" + type, handler);
190
		}
191
	}
192
	function doClick() {
193
		$("#getcode").html("60s后重新获取");
194
		$("#getcode").attr("disabled",true);
195
		var clickTime = new Date().getTime();
196
		var Timer = setInterval(function() {
197
			var nowTime = new Date().getTime();
198
			var second = Math.ceil(60 - (nowTime - clickTime) / 1000);
199
			if(second > 0) {
200
				$("#getcode").html(second + "s后重新获取");
201
				if(second==1) {
202
					$("#changImage").attr("src","/ajax/PictureVC?"+new Date().getTime());
203
					$("#imgCode").val("");
204
				}
205
			} else {
206
				clearInterval(Timer);
207
				$("#getcode").html("免费获取验证码");
208
				$("#getcode").attr("disabled",false);
209
			}
210
		}, 1000);
211
	}
212
	$("#imgCode").on("blur",function(){
213
		if($("#imgCode").val().length==0) {
214
			$(".msgImage").text("请输入图形验证码");
215
			return;
216
		}else if($("#imgCode").val().length==4){
217
			$(".msgImage").text("");
218
			$(this).removeClass("frmmsg-warning");
219
		}else{
220
			$(".msgImage").text("图形验证码4位");
221
		}
222
	})
223
	$("#imgCode").on("focus",function(){
224
			$(".msgImage").text("");
225
			$(this).removeClass("frmmsg-warning");
226
	})
227

228
	function hasClass(obj, cls) {
229
		return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
230
	}
231

232
	function addClass(obj, cls) {
233
		if(!hasClass(obj, cls)) obj.className += " " + cls;
234
	}
235

236
	function removeClass(obj, cls) {
237
		if(hasClass(obj, cls)) {
238
			var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
239
			obj.className = obj.className.replace(reg, ' ');
240
		}
241
	}
242
	
243
	var state;
244
	/*发送手机验证码*/
245
	function getPhoneCode() {
246
		if($("#imgCode").val().length==0) {
247
			$(".msgImage").text("请输入图形验证码");
248
			return;
249
		}else if($("#imgCode").val().length==4){
250
			$(".msgImage").text("");
251
			$(this).removeClass("frmmsg-warning");
252
		}else{
253
			$(".msgImage").text("图形验证码4位");
254
			return;
255
		}
256
		$.ajax("/ajax/regmobilephone", {
257
			type: "get",
258
			async: true,
259
			success: function(data) {
260
				if(data.success) {
261
					state = data.data;
262
					doClick();
263
				}else{
264
					if(data.code==20001) {
265
						$(".msgImage").text("请输入正确的图形验证码");
266
						$("#changImage").attr("src","/ajax/PictureVC?"+new Date().getTime());
267
					}
268
				}
269
			},
270
			data: {
271
				"mobilePhone": $("#companyPhone").val(),
272
				"vcode":$('#imgCode').val(),
273
			},
274
			dataType: 'json'
275
		});
276
	}
277

278
	function checkNewPwd() {
279
		companyPswVal1 = $("#companyPsw1").val();
280
		if(companyPswVal1.length < 6) {
281
			$(".msgCmp04").prev().addClass("frmmsg-warning");
282
			$(".msgCmp04 span").text("密码由6-24个字符组成,区分大小写");
283
		} else {
284
			$(".msgCmp04").prev().removeClass("frmmsg-warning");
285
			$(".msgCmp04 span").text("");
286
			setnewpwd = true;
287
		}
288
	}
289

290
	function checkNewPwd2() {
291
		companyPswVal2 = $("#companyPsw2").val();
292
		if(companyPswVal2.length < 6) {
293
			$(".msgCmp05").prev().addClass("frmmsg-warning");
294
			$(".msgCmp05 span").text("密码由6-24个字符组成,区分大小写");
295
		} else if(companyPswVal1 != companyPswVal2) {
296
			$(".msgCmp05").prev().addClass("frmmsg-warning");
297
			$(".msgCmp05 span").text("两次输入不一致,请重新输入");
298
		} else {
299
			$(".msgCmp05").prev().removeClass("frmmsg-warning");
300
			$(".msgCmp05 span").text("");
301
			setnewpwd2 = true;
302
		}
303
	}
304
	function userReg() {
305
		$.ajax("/ajax/mobileReg", {
306
			type: "POST",
307
			async: true,
308
			data: {
309
				"state": state,
310
				"mobilePhone": $("#companyPhone").val(),
311
				"validateCode": $("#companysc").val(),
312
				"password": $("#companyPsw1").val(),
313
				"name" :$("#companyName").val()
314
			},
315
			dataType: 'json',
316
			success: function(data) {
317
				if(data.success) {
318
					var pid = data.data;
319
					$.ajax("/ajax/professor/joinAndPassOrgAuth", {
320
						type: "POST",
321
						async: true,
322
						data: {
323
							"pid": pid,
324
							"oid": orgId
325
						},
326
						success: function(res) {
327
							location.href = 'cmp-staff-invite-log.html?step=2'
328
						}
329
					})
330
				}else{
331
					if(data.code==-1){
332
						$.MsgBox.Alert('消息', '验证超时');
333
					}else if(data.code==-2){
334
						$(".msgCmp03 span").text('手机号与验证手机不匹配');
335
					}else if(data.code==-3){
336
						$(".msgCmp03 span").text('验证码错误,请检查后重试')
337
					}
338
				}
339
			}
340
			
341
		});
342
	}
343

344
	/*手机注册*/
345
	$("#companyRet").click(function(){
346
		if(setname==true && phonePass==true && phoneCode==true && setnewpwd==true) {
347
			userReg();
348
		}
349
	})
350
})

+ 0 - 213
cmp-portal/js/cmp-staffList.js

@ -1,213 +0,0 @@
1
$(document).ready(function() {
2
	$(".onlogin .headnavbtn li").eq(0).addClass("navcurrent");
3
	$(".workmenu>ul>li.staffIcon").addClass("nowLi");
4
	var id = $.cookie('orgId');
5
	if(id == "" || id == null || id == "null"){
6
    	location.href = "cmp-settled-log.html";
7
    }
8
	resMgr(id);
9
	/*判断企业是否认证*/
10
	function companyAuthStatus() {
11
		$.ajax({
12
			url: "/ajax/org/authStatus",
13
			type: "GET",
14
			timeout: 10000,
15
			dataType: "json",
16
			data: {
17
				"id": id
18
			},
19
			success: function(data, textState) {
20
				if(data.success) {
21
					if(data.data == 3) {
22
						$("#staff").show();
23
					} else {
24
						$("#identityState").show();
25
						$("#costf").html("员工管理");
26
					}
27
				}
28
			},
29
			error: function(XMLHttpRequest, textStats, errorThrown) {
30
				$.MsgBox.Alert('提示', '服务器请求失败')
31
			}
32
		})
33
	}
34
	companyAuthStatus();
35
	/*获取企业认证的用户*/
36
	function UnauthorizedUser() {
37
		$.ajax({
38
			url: "/ajax/professor/qaOrgAuth",
39
			type: "GET",
40
			timeout: 10000,
41
			dataType: "json",
42
			data: {
43
				"orgId": id,
44
				"orgAuth": 1
45
			},
46
			success: function(data, textState) {
47
				if(data.success) {
48
					console.log(data);
49
					var $data = data.data;
50
					UnauthorizedUserHtml($data, "#authorizedUserList", 0);
51
				}
52
			},
53
			error: function(XMLHttpRequest, textStats, errorThrown) {
54
				$.MsgBox.Alert('提示', '服务器请求失败')
55
			}
56
		})
57
	}
58
	UnauthorizedUser()
59
		/*企业认证用户html*/
60
	function UnauthorizedUserHtml() {
61
		var arr = new Array();
62
		for(var i = 0; i < arguments[0].length; i++) {
63
			var img, tiof, deor, otex;
64
			if(arguments[0][i].hasHeadImage) {
65
				img = "/images/head/" + arguments[0][i].id + "_l.jpg";
66
			} else {
67
				img = "../images/default-photo.jpg"
68
			}
69
			if(arguments[0][i].title) {
70
				if(arguments[0][i].office) {
71
					tiof = arguments[0][i].title + " ," + arguments[0][i].office;
72
				} else {
73
					tiof = arguments[0][i].title;
74
				}
75
			} else {
76
				if(arguments[0][i].office) {
77
					tiof = arguments[0][i].office;
78
				} else {
79
					tiof = "";
80
				}
81
			}
82
			if(arguments[0][i].department) {
83
				if(arguments[0][i].orgName) {
84
					deor = arguments[0][i].department + " ," + arguments[0][i].orgName;
85
				} else {
86
					deor = arguments[0][i].department;
87
				}
88
			} else {
89
				if(arguments[0][i].orgName) {
90
					deor = arguments[0][i].orgName;
91
				} else {
92
					deor = "";
93
				}
94
			}
95
			if(arguments[2] == 1) {
96
				otex = "待认证";
97
			} else {
98
				otex = "移除";
99
			}
100
			var oString = "<li>"
101
			oString += "<div class='leftlogo floatL userRadius'>"
102
			oString += "<img class='headPhoto' src='" + img + "'  width='100%'>"
103
			oString += "</div>"
104
			oString += "<div class='rightinfo staffinfo floatL'>"
105
			oString += "<p class='h3Font'>" + arguments[0][i].name + "</p>"
106
			oString += "<p class='h5Font ellipsisSty'>" + tiof + "</p>"
107
			oString += "<p class='h5Font ellipsisSty'>" + deor + "</p>"
108
			oString += "</div>"
109
			oString += "<button type='button' class='frmtype fontLink btnPosition cmpColor headRadius' data-id='" + arguments[0][i].id + "'>" + otex + "</button>"
110
			oString += "</li>"
111
			$(arguments[1]).append(oString);
112
		}
113
	}
114
	/*移除企业员工*/
115
	$("#authorizedUserList").on("click", "button", function() {
116
			var oDataId = $(this).attr("data-id");
117
			var oDa = $(this);
118
			$.ajax({
119
				url: "/ajax/professor/removeOrgAuth",
120
				type: "POST",
121
				timeout: 10000,
122
				dataType: "json",
123
				data: {
124
					"id": oDataId,
125
				},
126
				success: function(data, textState) {
127
					if(data.success) {
128
						oDa.parents("li").remove();
129

130
					}
131
				},
132
				error: function(XMLHttpRequest, textStats, errorThrown) {
133
					$.MsgBox.Alert('提示', '服务器请求失败')
134
				}
135
			})
136
		})
137
		/*检验邮箱*/
138
	$("#mail").on("blur", function() {
139
		var oMail = $(this).val();
140
		var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
141
		if(oMail.trim().length == 0) {
142
			$.MsgBox.Alert('提示', '请输入您企业员工的邮箱地址');
143
			return;
144
		}
145
		if(!gunf.test(oMail.trim())) {
146
			$.MsgBox.Alert('提示', '请输入正确的邮箱地址');
147
		}
148
	})
149
	$("button:contains('邀请')").on("click", function() {
150
		var oMail = $("#mail").val();
151
		var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
152
		if(oMail.trim().length == 0) {
153
			$.MsgBox.Alert('提示', '请输入您企业员工的邮箱地址');
154
			return;
155
		}
156
		if(!gunf.test(oMail.trim())) {
157
			$.MsgBox.Alert('提示', '请输入正确的邮箱地址');
158
			return;
159
		} else {
160
			/*验证邮箱是否注册*/
161
			$.ajax({
162
				url: "/ajax/isReg",
163
				type: "GET",
164
				timeout: 10000,
165
				dataType: "json",
166
				data: {
167
					"key": oMail
168
				},
169
				success: function(data, textState) {
170
					if(data.success) {
171
						if(data.data) {
172
							$.ajax({
173
								url: "/ajax/inviteStaffMail",
174
								type: "GET",
175
								timeout: 10000,
176
								dataType: "json",
177
								data: {
178
									"orgId": id,
179
									"mail": oMail
180
								},
181
								success: function(data, textState) {
182
									if(data.success) {
183
										if(data.data) {
184
											$.MsgBox.Alert('提示', '已发送邀请邮件');
185
											$("#mb_msgicon").css({
186
												"background-image": "url(images/sign_icon_chenggong_nor.png)",
187
												"background-size": "cover"
188
											});
189
											$("#mail").val("");
190
										}
191
									} else {
192
										$.MsgBox.Alert('提示', data.msg);
193
									}
194
								},
195
								error: function(XMLHttpRequest, textStats, errorThrown) {
196
									$.MsgBox.Alert('提示', '服务器请求失败')
197
								}
198
							})
199
						} else {
200
							$.MsgBox.Alert('提示', "该邮箱已注册账户");
201
						}
202
					} else {
203
						$.MsgBox.Alert('提示', data.msg);
204
					}
205
				},
206
				error: function(XMLHttpRequest, textStats, errorThrown) {
207
					$.MsgBox.Alert('提示', '服务器请求失败')
208
				}
209
			})
210

211
		}
212
	})
213
})

+ 313 - 0
cmp-portal/js/cmp-staffListNew.js

@ -0,0 +1,313 @@
1
$(document).ready(function() {
2
	$(".onlogin .headnavbtn li").eq(0).addClass("navcurrent");
3
	$(".workmenu>ul>li.staffIcon").addClass("nowLi");
4
	var orgId = $.cookie('orgId');
5
	if(orgId == "" || orgId == null || orgId == "null"){
6
    	location.href = "cmp-settled-log.html";
7
    }
8
	var pageSize = 10;
9
	
10
	resMgr(orgId);
11
	companyAuthStatus();
12
	getDefaultUser();
13
	authorizedUser(1,1,true);
14
	authorizedUser(1,0,true);
15
	/*判断企业是否认证*/
16
	function companyAuthStatus() {
17
		$.ajax({
18
			url: "/ajax/org/authStatus",
19
			type: "GET",
20
			timeout: 10000,
21
			dataType: "json",
22
			data: {
23
				"id": orgId
24
			},
25
			success: function(data) {
26
				if(data.success) {
27
					if(data.data !== '3') {
28
						var str = '<div class="default-text"><div>您的企业账户还未进行认证,还不能认证企业员工</div>'+
29
						   '<a href="cmp-setAuth.html?auth=1">点击这里认证企业信息</a></div>';
30
						$("#staffContent").html(str);
31
					}
32
				}
33
			}
34
		})
35
	}
36
	/*获取企业认证/待认证的用户*/
37
	function authorizedUser(pageNo,orgAuth,isbind) {
38
		var strId='',strPage='';
39
		if(orgAuth === 1){
40
			strId = "#authorizedUserList",
41
			strPage = "#authtcdPageCode"
42
		}else{
43
			strId = "#UnauthorizedUserList",
44
			strPage = "#UnauthtcdPageCode"
45
		}
46
		$.ajax({
47
			url: "/ajax/professor/pqOrgAuth",
48
			type: "GET",
49
			dataType: "json",
50
			data: {
51
				"orgId": orgId,
52
				"orgAuth": orgAuth,
53
				"pageSize":pageSize,
54
				"pageNo":pageNo
55
			},
56
			success: function(data) {
57
				if(data.success  && data.data.data != "") {
58
					console.log(data);
59
					var $data = data.data.data;
60
					$(strPage).show();
61
					$(strId).html('');
62
					$(strId).parents('.list-wrapper').show();
63
					$("#authStaffs").html(data.data.total)
64
					for(var i = 0; i < $data.length; i++) {
65
						$.ajax({
66
							url: "/ajax/professor/baseInfo/" + $data[i].id,
67
							type: "GET",
68
							dataType: "json",
69
							success: function(res) {
70
								if(res.success) {
71
									authorizedUserHtml(orgAuth, res.data, strId);
72
								}
73
							}
74
						})
75
					}
76
					//分页
77
					if(isbind) {
78
						$(strPage).createPage({
79
							pageCount: Math.ceil(data.data.total / pageSize),
80
							current: data.data.pageNo,
81
							backFn: function(p) {
82
								$(strId).html("");
83
								authorizedUser(p,orgAuth,false);
84
							}
85
						});
86
					}
87
				}else{
88
					if(orgAuth === 1){
89
						var str = '<div class="default-text default-text-2"><div>您还没有认证员工</div>'+
90
						   '<a class="goYaoqing" href="javascript:void(0)">点击邀请您的员工</a></div>';
91
						$(strId).html(str);
92
						$(strPage).hide();
93
					}else{
94
						$(strId).parents('.list-wrapper').hide();
95
					}
96
					
97
				}
98
			}
99
		})
100
	}
101
	/*获取默认联系人列表*/
102
	function getDefaultUser() {
103
		var strId = "#defaultUserList"
104
		$.ajax({
105
			url: "/ajax/org/linkman/queryAll",
106
			type: "GET",
107
			dataType: "json",
108
			data: {
109
				"oid": orgId
110
			},
111
			success: function(data) {
112
				if(data.success  && data.data != "") {
113
					$(strId).html('');
114
					var $data = data.data
115
					for(var i = 0; i < $data.length; i++){
116
						$.ajax({
117
							url: "/ajax/professor/baseInfo/" + $data[i].pid,
118
							type: "GET",
119
							dataType: "json",
120
							success: function(res) {
121
								if(res.success) {
122
									authorizedUserHtml(2, res.data, strId);
123
								}
124
							}
125
						})
126
					}
127
					
128
				}else{
129
					var str = '<div class="default-text default-text-3">您还没有设置默认联系人<br>用户可以通过他与您的企业取得联系</div>';
130
					$(strId).html(str);
131
				}
132
			}
133
		})
134
	}
135
	/*企业认证用户html*/
136
	function authorizedUserHtml(flag, $res, toHtm) {
137
		var img, tiof, deor, offt;
138
		if($res.hasHeadImage) {
139
			img = "/images/head/" + $res.id + "_l.jpg";
140
		} else {
141
			img = "../images/default-photo.jpg"
142
		}
143
		var userType = autho($res.authType, $res.orgAuth, $res.authStatus);
144
		if($res.title) {
145
			tiof = $res.title
146
		} else {
147
			if($res.office) {
148
				tiof = $res.office;
149
			} else {
150
				tiof = "";
151
			}
152
		}
153
		if($res.department) {
154
			if($res.orgName) {
155
				deor = $res.department + " ," + $res.orgName;
156
			} else {
157
				deor = $res.department;
158
			}
159
		} else {
160
			if($res.orgName) {
161
				deor = $res.orgName;
162
			} else {
163
				deor = "";
164
			}
165
		}
166
		if(tiof == ''){
167
			if(deor == ''){
168
				offt=''
169
			}else{
170
				offt = deor
171
			}
172
		}else{
173
			if(deor == ''){
174
				offt = tiof
175
			}else{
176
				offt = tiof + ',' + deor
177
			}
178
		}
179
		var btnStr='';
180
			if(flag===1){
181
				btnStr='<div class="block-btn" data-id="'+ $res.id +'">'+
182
							'<span class="block-btn-1 setDefault">设为默认联系人</span>'+
183
					        '<span class="cancelAuth">取消认证</span>'+
184
				        '</div>'
185
			}else if(flag===0){
186
				btnStr='<div class="block-btn block-btnT" data-id="'+ $res.id +'">'+
187
							'<span class="block-btn-1 setAuth">认证</span>'+
188
				        '</div>'
189
			}
190
		var oString = '<div class="block-item">'+
191
				     	'<a class="block-item-child" href="../userInforShow.html?professorId='+ $res.id +'">'+
192
					        '<div class="show-head" style="background-image:url('+img+')"></div>'+
193
					        '<div class="show-info">'+
194
					          '<div class="info-tit ellipsisSty">' + $res.name + '<em class="authicon '+ userType.sty +'" title="'+userType.title+'"></em></div>'+
195
					          '<div class="info-tag ellipsisSty">' + offt + '</div>'+
196
					        '</div>'+
197
				        '</a>'+ btnStr +
198
				     '</div>'
199
		$(toHtm).append(oString);
200

201
	}
202
	/*设置默认联系人*/
203
	$("#authorizedUserList").on("click", ".setDefault", function() {
204
		var oDataId = $(this).parent().attr("data-id");
205
		var oDa = $(this);
206
		$.ajax({
207
			url: '/ajax/org/linkman/save',
208
			type: "POST",
209
			dataType: "json",
210
			data: {
211
				"oid": orgId,
212
				"pid": '1,'+oDataId
213
			},
214
			success: function(data) {
215
				if(data.success) {
216
					getDefaultUser()
217
				}
218
			}
219
		})
220
	})
221
	/*setAuth员工认证*/
222
	$("#UnauthorizedUserList").on("click", ".setAuth", function() {
223
		var oDataId = $(this).parent().attr("data-id");
224
		$.ajax({
225
			url: '/ajax/professor/passOrgAuth',
226
			type: "POST",
227
			dataType: "json",
228
			data: {
229
				"id": oDataId
230
			},
231
			success: function(data) {
232
				if(data.success) {
233
					authorizedUser(1,1,true);
234
					authorizedUser(1,0,true);
235
				}
236
			}
237
		})
238
	})
239
	/*取消认证员工*/
240
	$("#authorizedUserList").on("click", ".cancelAuth", function() {
241
		var oDataId = $(this).parent().attr("data-id");
242
		$.MsgBox.Confirm ('提示', '确认取消该员工的认证?<br><span style="color:#999;line-height:28px;font-size:13px;">确认后会同时取消该员工的所有联系人身份</span>', function(){
243
			$.ajax({
244
				url: "/ajax/professor/removeOrgAuth",
245
				type: "POST",
246
				dataType: "json",
247
				data: {
248
					"id": oDataId
249
				},
250
				success: function(data) {
251
					if(data.success) {
252
						authorizedUser(1,1,true);
253
						authorizedUser(1,0,true);
254
						getDefaultUser();
255
					}
256
				}
257
			})				
258
		})
259
	})
260
	
261
	$('#staffContent').on("click", ".goSpan,.goYaoqing", function() {
262
		$("#mailVal").val('');
263
		$('.mb_success').html('');
264
		$(".blackcover2").fadeIn();
265
		$(".modelContain").show(); 
266
		$("body").addClass("modelOpen");
267
	})
268
	$(".mb_close").click(function() {
269
		$(".modelContain").hide();
270
		$(".blackcover2").fadeOut();
271
		$("body").removeClass("modelOpen");
272
	})
273
	/*检验邮箱*/
274
	$("#mailVal").on({
275
		keyup: function() {
276
			if($(this).val().length > 50) {
277
				$(this).val($(this).val().substr(0, 50));
278
			}
279
		}
280
	})
281
	$("#mailPub").on("click", function() {
282
		var oMail = $("#mailVal").val();
283
		var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
284
		if(oMail.trim().length == 0) {
285
			$.MsgBox.Alert('提示', '请输入您企业员工的邮箱地址');
286
			return;
287
		}
288
		if(!gunf.test(oMail.trim())) {
289
			$.MsgBox.Alert('提示', '请输入正确的邮箱地址');
290
			return;
291
		} else {
292
			$.ajax({
293
				url: "/ajax/sendMailWithInviteOrg",
294
				type: "POST",
295
				dataType: "json",
296
				data: {
297
					"oid": orgId,
298
					"mail": oMail
299
				},
300
				success: function(data) {
301
					if(data.success) {
302
						$('.mb_success').html('已发送邀请邮件!');
303
						$("#mailVal").val("");
304
						$(".blackcover2").fadeOut();
305
						$(".modelContain").hide();
306
					} else {
307
						$.MsgBox.Alert('提示', data.msg);
308
					}
309
				}
310
			})
311
		}
312
	})
313
})

+ 93 - 1
cmp-portal/js/cmpInformation.js

@ -9,7 +9,8 @@ $(function() {
9 9
			resShareId:"",
10 10
			
11 11
			serModifyTime: "",
12
			serId: "",
12
			
13
			prdModifyTime: ""
13 14
		},
14 15
		watchO={
15 16
			beiTime:"",
@ -64,6 +65,15 @@ $(function() {
64 65
					resourceListVal(true);
65 66
					serviceListVal(true);
66 67
					$(".establishments").show()
68
					$(".goworkspaceSpan").text('发布服务、资源、文章');
69
				}
70
				if(!$info.colMgr && !$info.resMgr){
71
					productListVal(true);
72
					$(".productions").show()
73
					$(".goworkspaceSpan").text('发布需求、产品和文章');
74
				}
75
				if($info.colMgr){
76
					$(".goworkspaceSpan").text('发布文章');
67 77
				}
68 78
				$.cookie("colMgr",$info.colMgr);
69 79
				$.cookie("resMgr",$info.resMgr);
@ -456,6 +466,70 @@ $(function() {
456 466
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
457 467
			})
458 468
		},
469
		productListVal=function(isbind){
470
			var aimId="proProduct",aimIdF="showProduct",newStr="企业尚未发布任何产品"
471
			oAjax("/ajax/product/publish",{
472
				"category":"2",
473
				"owner":orgId,
474
				"modifyTime":dataO.prdModifyTime,
475
				"rows": rows
476
			}, "get", function(res){
477
				var $info = res.data;
478
				if($info.length > 0) {
479
					$("#"+aimId).show()
480
					$("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
481
					$("#"+aimIdF).parents(".splitBlock").removeClass("displayNone");
482
					$("#"+aimIdF).parents(".coninfobox").show();
483
					dataO.prdModifyTime = $info[$info.length - 1].modifyTime;
484
			
485
					for(var i = 0; i < $info.length; i++) {
486
						var cnt="", hasImg="../images/default-product.jpg"
487
						if($info[i].images) {
488
							var subs = strToAry($info[i].images)
489
							if(subs.length > 0) {
490
								hasImg="/data/ware" + subs[0]
491
							}
492
						}
493
						if($info[i].cnt) {
494
							cnt = "内容:" +$info[i].cnt; 
495
						}
496
						var itemlist = '<li>';
497
							itemlist += '<a href="productShow.html?sevriceId=' + $info[i].id + '" class="flexCenter urlgo">';
498
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
499
							itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
500
							itemlist += '</a></li>';
501
						var $itemlist = $(itemlist);
502
						$("#"+aimId).append($itemlist)
503
						
504
						if(isbind && i==0){
505
							var $itemlist = $(itemlist);
506
							$("#"+aimIdF).append($itemlist);
507
						}
508
					}
509
				}
510
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
511
                removeNodata(aimId);
512
                if($info.length == 0 && liLen == 0 ){
513
                	$("#"+aimId).hide()
514
                    insertNodata(aimId,newStr);
515
                }
516
                if(isbind){
517
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
518
					 	serviceListVal(false)
519
					})
520
                }
521
				if ($info.length < rows) {
522
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
523
                    $("#"+aimId).parent().find(".js-load-more").hide();
524
                }
525
			},function(){
526
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
527
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
528
			},function(){
529
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
530
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
531
			})
532
		},
459 533
		queryPubCount=function(){
460 534
			oAjax("/ajax/watch/countProfessor",{//关注企业数量
461 535
				"id": orgId,
@ -496,6 +570,17 @@ $(function() {
496 570
					$("#serCount").text("99+");
497 571
				}
498 572
			});
573
			oAjax("/ajax/product/count/publish",{//产品总数
574
				"owner": orgId,
575
				"category":"2"
576
			}, "GET", function(data){
577
				if(data.data>0 && data.data<99){
578
					$("#productCount").text(data.data);
579
				}
580
				if(data.data>99){
581
					$("#productCount").text("99+");
582
				}
583
			});
499 584
		},
500 585
		attentMyself=function(isbind){
501 586
			var aimId="attendMy",newStr="企业尚未被任何人关注"
@ -579,6 +664,13 @@ $(function() {
579 664
			})
580 665
		},
581 666
		bindClickFun=function(){
667
			//点击查看全部产品
668
			$(".coninfobox").on("click", "#seeMorePd", function() {
669
				document.body.scrollTop = document.documentElement.scrollTop = 0;
670
				$("#tab10user").addClass("liNow").siblings().removeClass("liNow");
671
				$("#item1user").hide();
672
				$("#item10user").show();
673
			})
582 674
			//点击查看全部服务
583 675
			$(".coninfobox").on("click", "#seeMoreS", function() {
584 676
				document.body.scrollTop = document.documentElement.scrollTop = 0;

+ 154 - 139
cmp-portal/js/resourceIssue.js

@ -12,6 +12,7 @@ $(document).ready(function() {
12 12
	var array = [];
13 13
	var oProfessor=[];
14 14
	var hbur,hburEnd;
15
	var defaultLinkMan=[];
15 16
	ue = UE.getEditor('editor', {});
16 17
	/*获取资源信息*/
17 18
	function getRecourceMe() {
@ -100,104 +101,88 @@ $(document).ready(function() {
100 101
		}
101 102
	}
102 103
	var uploader = WebUploader.create({
103
		auto: true,
104
		fileNumLimit: 3,
105
		swf: '../js/webuploader/Uploader.swf',
106
		server: '../ajax/cachedFileUpload',
107
		fileSingleSizeLimit: 2 * 1024 * 1024,
108
		pick: {
109
			id: "#filePicker",
110
			multiple: false
111
		},
112
		accept: {
113
			title: 'Images',
114
			extensions: 'jpg,jpeg,png',
115
			mimeTypes: 'image/jpg,image/png'
116
		}
117

118
	});
119

120
	// 当有文件添加进来的时候
121
	uploader.on('fileQueued', function(file) {
122
		fileId = file.id;
123
		var $len = $("#fileList").find("img").length;
124
		if($len == 0 || $len == 1) {
125
			var oRemove = $("#fileList").find("dd");
126
			oRemove.eq(oRemove.length - 1).remove();
127
		}
128
		var $li = $(
129
				'<dd>' +
130
				'<div class="imgItem" id="' + file.id + '">' +
131
				'<img />' +
132
				'</div>' +
133
				//'<div class="info">' + file.name + '</div>' +
134
				'</dd>'
135
			),
136
			$btns = $('<div class="file-panel">' +
137
				'<span class="cancel"></span>' +
138
				'</div>').appendTo($li),
139
			$img = $li.find('img');
140
		var $list = $("#fileList");
141
		if($len == 1) {
142
			$list.find("dd").eq(0).after($li)
143
		} else if($len == 2) {
144
			$list.find("dd").eq(1).after($li)
145
		} else {
146
			$list.prepend($li);
147
		}
148

149
		// 创建缩略图
150
		// 如果为非图片文件,可以不用调用此方法。
151
		// thumbnailWidth x thumbnailHeight 为 100 x 100
152
		uploader.makeThumb(file, function(error, src) {
153
			if(error) {
154
				$img.replaceWith('<span>不能预览</span>');
155
				return;
104
			auto: true,
105
			fileNumLimit: 3,
106
			swf: '../js/webuploader/Uploader.swf',
107
			server: '../ajax/cachedFileUpload',
108
			fileSingleSizeLimit: 2 * 1024 * 1024,
109
			pick: {
110
				id: "#filePicker",
111
				multiple: false
112
			},
113
			accept: {
114
				title: 'Images',
115
				extensions: 'jpg,jpeg,png',
116
				mimeTypes: 'image/jpg,image/png'
117
			}
118
	
119
		});
120
		// 当有文件添加进来的时候
121
		uploader.on('fileQueued', function(file) {
122
			fileId = file.id;
123
			var $len = $("#fileList").find("img").length;
124
			if($len == 0 || $len == 1) {
125
				var oRemove = $("#fileList").find("dd");
126
				oRemove.eq(oRemove.length - 1).remove();
127
			}
128
			var $li = $(
129
					'<dd>' +
130
					'<div class="imgItem" id="' + file.id + '">' +
131
					'<img />' +
132
					'</div>' +
133
					'</dd>'
134
				),
135
				$btns = $('<div class="file-panel">' +
136
					'<span class="cancel"></span>' +
137
					'</div>').appendTo($li),
138
				$img = $li.find('img');
139
			var $list = $("#fileList");
140
			if($len == 1) {
141
				$list.find("dd").eq(0).after($li)
142
			} else if($len == 2) {
143
				$list.find("dd").eq(1).after($li)
144
			} else {
145
				$list.prepend($li);
146
			}
147
			// 创建缩略图
148
			// 如果为非图片文件,可以不用调用此方法。
149
			// thumbnailWidth x thumbnailHeight 为 100 x 100
150
			uploader.makeThumb(file, function(error, src) {
151
				if(error) {
152
					$img.replaceWith('<span>不能预览</span>');
153
					return;
154
				}
155
				$img.attr('src', src);
156
			}, 1, 1);
157
		});
158
		uploader.onError = function(code) {
159
			console.log(code)
160
			$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过2M')
161
		};
162
		uploader.on('uploadSuccess', function(file, data) {
163
			if(data.success) {
164
					uploader.removeFile(fileId);
165
					var cacheImageKey = temp.push(data.data[0].cacheKey);
166
			}else{
167
				$.MsgBox.Alert('提示', '只支持jpeg/jpg/png格式的图片');
168
			}
169
		});
170
		/*删除图片*/
171
		$("#fileList").on("click", ".cancel", function() {
172
			var flag = $(this).attr("flag");
173
			var oNum = $(this).parents("dd").index();
174
			if(flag == 1) {
175
				array.splice(oNum, 1);
176
			} else {
177
				temp.splice(oNum, 1);
178
			}
179
			$(this).parent().parent().remove();
180
	
181
			var $len = $("#fileList").find("img").length;
182
			if($len != 2) {
183
				$("#fileList").append("<dd></dd>")
156 184
			}
157
			$img.attr('src', src);
158
		}, 1, 1);
159
		/*$li.on('mouseenter', function() {
160
			$btns.stop().animate({
161
				height: 30
162
			});
163 185
		});
164

165
		$li.on('mouseleave', function() {
166
			$btns.stop().animate({
167
				height: 0
168
			});
169
		});*/
170

171
	});
172
	uploader.onError = function(code) {
173
		console.log(code)
174
		$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过2M')
175
	};
176
	uploader.on('uploadSuccess', function(file, data) {
177
		if(data.success) {
178
				uploader.removeFile(fileId);
179
				var cacheImageKey = temp.push(data.data[0].cacheKey);
180
		}else{
181
			$.MsgBox.Alert('提示', '只支持jpeg/jpg/png格式的图片');
182
		}
183
	});
184
	/*删除图片*/
185
	$("#fileList").on("click", ".cancel", function() {
186
		var flag = $(this).attr("flag");
187
		var oNum = $(this).parents("dd").index();
188
		if(flag == 1) {
189
			array.splice(oNum, 1);
190
		} else {
191
			temp.splice(oNum, 1);
192
		}
193
		$(this).parent().parent().remove();
194

195
		var $len = $("#fileList").find("img").length;
196
		if($len != 2) {
197
			$("#fileList").append("<dd></dd>")
198
		}
199

200
	});
201 186
	/*资源名称*/
202 187
	$("#resourceName").bind({
203 188
		focus: function() {
@ -325,7 +310,7 @@ $(document).ready(function() {
325 310
			return 0;
326 311
		}
327 312
		if(oLen==0) {
328
			$.MsgBox.Alert('提示', '至少选择一个负责人');
313
			$.MsgBox.Alert('提示', '至少选择一个联系人');
329 314
			return 0;
330 315
		}
331 316
	}
@ -418,58 +403,69 @@ $(document).ready(function() {
418 403
			success: function(data, textState) {
419 404
				if(data.success) {
420 405
					console.log(data);
421
					unauthUser(data.data);
406
					if(data.data.length>0){
407
						unauthUser(data.data);
408
					}else{
409
						var str = '<div class="default-text default-text-2" style="border:none"><div>您当前没有认证员工</div>'+
410
						   '<a href="cmp-staffList.html">点击这里进行认证</a></div>';
411
						$("#expertli").html(str);
412
					}
422 413
				}
423
			},
424
			error: function(XMLHttpRequest, textStats, errorThrown) {
425
				$.MsgBox.Alert('提示', '服务器请求失败')
426 414
			}
427 415
		})
428 416
	}
429 417
	UnauthorizedUser();
418
	getDefaultUser();
430 419
	function unauthUser($res) {
431 420
		if(resourceId) {
432
		selUse();
433
	}
434
	var osting=""
435
	for(var i = 0; i < $res.length; i++) {
436
		var img;
437
		//var styC="";
438
		var oClass = autho($res[i].authType, $res[i].orgAuth, $res[i].authStatus);
439
		var oTitle="";
440
		if(!resourceId) {
441
				/*if(i<5) {
442
				styC="selectAdd";
443
				oProfessor.push($res[i].id);
444
			}*/
445
		}
446
		
447
		if($res[i].title) {
448
			oTitle=$res[i].title;
449
		}else{
450
			if($res[i].office) {
451
				oTitle=$res[i].office;
421
			selUse();
422
		}
423
		var osting=""
424
		for(var i = 0; i < $res.length; i++) {
425
			var img;
426
			var styC="";
427
			var oClass = autho($res[i].authType, $res[i].orgAuth, $res[i].authStatus);
428
			var oTitle="";
429
			if(!resourceId) {
430
					/*if(i<5) {
431
					styC="selectAdd";
432
					oProfessor.push($res[i].id);
433
				}*/
452 434
			}
453
		}
454
		if($res[i].hasHeadImage) {
455
				img = "/images/head/" + $res[i].id + "_l.jpg";
456
			} else {
457
				img = "../images/default-photo.jpg"
435
			for(var j=0; j<defaultLinkMan.length;j++){
436
				if($res[i].id === defaultLinkMan[j]){
437
					styC="selectAdd";
438
				}
439
			}
440
			
441
			if($res[i].title) {
442
				oTitle=$res[i].title;
443
			}else{
444
				if($res[i].office) {
445
					oTitle=$res[i].office;
446
				}
458 447
			}
459
		var oSt = '<li class="flexCenter" style="cursor:pointer;" id="'+$res[i].id+'">'
460
		oSt += '<div class="madiaHead useHead" id="userimg" style="background-image: url('+img+');"></div>'
461
		oSt += '<div class = "madiaInfo">'
462
		oSt += '<p class = "ellipsisSty">'
463
		oSt += '<span class = "h1Font" id="name">'+$res[i].name+'</span><em class="authicon '+oClass.sty+'" title="'+oClass.title+'"></em >'
464
		oSt += '</p>'
465
		oSt += '<p class="h2Font ellipsisSty">'+oTitle+'</p>'
466
		oSt += '</div>'
467
		oSt += '<div class="selectNull " flag=1></div>'
468
		oSt += '</li>'
469
		osting+=oSt;
448
			if($res[i].hasHeadImage) {
449
					img = "/images/head/" + $res[i].id + "_l.jpg";
450
				} else {
451
					img = "../images/default-photo.jpg"
452
				}
453
			var oSt = '<li class="flexCenter" style="cursor:pointer;" id="'+$res[i].id+'">'
454
			oSt += '<div class="madiaHead useHead" id="userimg" style="background-image: url('+img+');"></div>'
455
			oSt += '<div class = "madiaInfo">'
456
			oSt += '<p class = "ellipsisSty">'
457
			oSt += '<span class = "h1Font" id="name">'+$res[i].name+'</span><em class="authicon '+oClass.sty+'" title="'+oClass.title+'"></em >'
458
			oSt += '</p>'
459
			oSt += '<p class="h2Font ellipsisSty">'+oTitle+'</p>'
460
			oSt += '</div>'
461
			oSt += '<div class="selectNull '+styC+'" flag=1></div>'
462
			oSt += '</li>'
463
			osting+=oSt;
464
		}
465
		$("#expertli").html(osting);
470 466
	}
471
	$("#expertli").html(osting);
472
}
467
	
468
	
473 469
	/*选择用户*/
474 470
	$("#expertli").on("click","li",function(){
475 471
		var userL=$("#expertli").find(".selectAdd").length;
@ -494,6 +490,25 @@ $(document).ready(function() {
494 490
		}
495 491
	});
496 492
	
493
	function getDefaultUser() {
494
		$.ajax({
495
			url: "/ajax/org/linkman/queryAll",
496
			type: "GET",
497
			dataType: "json",
498
			data: {
499
				"oid": orgId
500
			},
501
			success: function(data) {
502
				if(data.success  && data.data != "") {
503
					var $data = data.data
504
					for(var i = 0; i < $data.length; i++){
505
						defaultLinkMan.push($data[i].pid)	
506
					}
507
					
508
				}
509
			}
510
		})
511
	}
497 512
	function selUse() {
498 513
		$.ajax({
499 514
			url: "/ajax/resource/qaLinkman",

+ 2 - 11
cmp-portal/resourceIssue.html

@ -123,17 +123,8 @@
123 123
					<div class="form-item otherBlock">
124 124
						<div class="aboutTit">负责人/联系人<em class="requiredcon">*</em><span class="frmconmsg" id="linkman"></span></div>
125 125
						<div class="form-result addexpertRe">
126
							<ul class="addexpert" id="expertli">
127
								<li id="usid" data-id="7F26E3C720064AE8A10C7357BBBD239B">
128
									<div class="madiaHead useHead" id="userimg"></div>
129
									<div class="madiaInfo">
130
										<p class="ellipsisSty">
131
											<span class="h1Font" id="name"></span><em class="authicon authicon-staff-ok" title="企业认证员工"></em>
132
										</p>
133
										<p class="h2Font ellipsisSty"></p>
134
									</div>
135
									<div class="selectAdd"></div>
136
								</li>
126
							<ul class="addexpert link-man-list" id="expertli">
127
								
137 128
							</ul>
138 129
						</div>
139 130
					</div>

+ 23 - 0
cmpInforShow.html

@ -13,6 +13,7 @@
13 13
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
14 14
<style type="text/css">
15 15
	.establishments{display: none;}
16
	.productions{display: none;}
16 17
</style>
17 18
<script>
18 19
	var _hmt = _hmt || [];
@ -63,12 +64,14 @@
63 64
                </div>
64 65
                <div class="goSpan">
65 66
                	<span class="attenSpan" id="attentBtn">关注</span>
67
                	<span class="consultSpan" id="conbtn">联系</span>
66 68
				</div>
67 69
			</div>
68 70
			<div class="leftconBox floatL" style="padding-bottom: 40px;">
69 71
				<div class="navconBox">
70 72
					<ul class="mainNavUl clearfix">
71 73
						<li rel="item1user" class="liNow" id="tab1user">主页</li>
74
						<li class="productions" rel="item10user" id="tab10user">产品 <span class="counts" id="productCount"></span></li>
72 75
						<li class="establishments" rel="item9user" id="tab9user">服务 <span class="counts" id="serCount"></span></li>
73 76
						<li class="establishments" rel="item2user" id="tab2user">资源 <span class="counts" id="resCount"></span></li>
74 77
						<li rel="item3user" id="tab3user">文章 <span class="counts" id="artCount"></span></li>
@ -90,6 +93,16 @@
90 93
								</ul>
91 94
							</div>
92 95
						</div>
96
						<div class="coninfobox splitBlock clearfix displayNone">
97
							<div class="form-item otherShow">
98
								<div class="coninfotit">我们的产品<span class="seeMore" id="seeMorePd">查看全部<em></em></span></div>
99
								<div class="coninfocon form-result aboutRes">
100
									<ul id="showProduct">
101
										
102
									</ul>
103
								</div>
104
							</div>
105
						</div>
93 106
						<div class="coninfobox splitBlock clearfix displayNone">
94 107
							<div class="form-item otherShow displayNone">
95 108
								<div class="coninfotit">可提供服务<span class="seeMore" id="seeMoreS">查看全部<em></em></span></div>
@ -208,6 +221,16 @@
208 221
							<div class="coninfocon form-result aboutRes">
209 222
								<ul id="proService">
210 223
									
224
								</ul>
225
								<button class="js-load-more"></button>
226
							</div>
227
						</div>
228
					</div>
229
					<div id="item10user" class="leftconItem">
230
						<div class="coninfobox form-item otherShow">
231
							<div class="coninfocon form-result aboutRes">
232
								<ul id="proProduct">
233
									
211 234
								</ul>
212 235
								<button class="js-load-more"></button>
213 236
							</div>

+ 8 - 0
css/genindex.css

@ -404,6 +404,14 @@ ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #ff99
404 404
ul.tagList{margin:16px 0 2px;overflow: hidden;}
405 405
ul.tagList>li{float: left;margin-right:10px;margin-bottom:10px;padding:0 12px;color: #999;border: 1px solid #E5E5E5;border-radius: 20px;cursor: pointer;}
406 406
ul.tagList>li .h2Font{color:#666;font-size:14px;line-height:30px;}
407
ul.atachList{margin:16px 0 2px;overflow: hidden;}
408
ul.atachList>li{margin-bottom:10px;padding:2px 12px;border: 1px solid #E5E5E5;display: flex;display: -webkit-flex;align-items: center;justify-content: space-around;}
409
ul.atachList>li:hover{border-color:#28b8fa}
410
ul.atachList>li span,ul.atachList>li a{display:inline-block;color:#666;font-size:14px;line-height:36px;}
411
ul.atachList>li span.atach-name{width:540px;}
412
ul.atachList>li span.atach-size{width:120px;}
413
ul.atachList>li a.atach-down{width:60px;}
414
ul.atachList>li a.atach-down:hover{color:#28b8fa;text-decoration: underline;}
407 415
.otherShow{}
408 416
.otherShow.otherShowFirst{padding-bottom:12px;border-bottom:2px dashed #E5E5E5;}
409 417
.otherShow .aboutTit{font-size:18px;color:#666;}

+ 4 - 1
e/a.html

@ -601,7 +601,10 @@
601 601
		oArticleModule.oAjaxGet("../ajax/article/ralateOrg", {
602 602
			"articleId": oArticleModule.articleId
603 603
		}, "get", oArticleModule.correlationCompany);
604
		oArticleModule.oAjaxGet("/ajax/article/find", {pageSize:5}, "get", oArticleModule.correlationArticle);
604
		oArticleModule.oAjaxGet("/ajax/article/find", {
605
			"pageSize":5,
606
			"exclude":oArticleModule.articleId
607
		}, "get", oArticleModule.correlationArticle);
605 608
		oArticleModule.correlationService()
606 609
	
607 610
		/*微信分享*/

+ 12 - 1
fw_template_r3254/article.html

@ -35,9 +35,11 @@
35 35
							<div class="showBigOpen" id="articleImg"></div>
36 36
							<!--文章内容区-->
37 37
							<div class="showMain" id="articleContent"></div>
38
							<!--附件模块-->
39
							<ul class="atachList" id="atachList">
40
							</ul>
38 41
							<!--标签模块-->
39 42
							<ul class="tagList" id="tagList">
40
							
41 43
							</ul>
42 44
							<!--相关专家-->
43 45
							<div class="form-item otherShow otherShowFirst displayNone">
@ -56,6 +58,15 @@
56 58
									</ul>
57 59
								</div>
58 60
							</div>
61
							<!--相关产品-->
62
							<div class="form-item otherShow displayNone">
63
								<div class="aboutTit">相关产品</div>
64
								<div class="form-result aboutRes">
65
									<ul id="oProducts">
66
										
67
									</ul>
68
								</div>
69
							</div>
59 70
							<!--相关资源-->
60 71
							<div class="form-item otherShow displayNone">
61 72
								<div class="aboutTit">相关资源</div>

BIN
images/default-product.jpg


+ 90 - 5
js/articalPreview.js

@ -126,7 +126,27 @@ $(function() {
126 126
			}
127 127
		});
128 128
	}
129
	
129
	//附件
130
	function queryFileAtach(){
131
		$.ajax({
132
			"url": "/ajax/article/files/byArticleId",
133
			"type": "get",
134
			"dataType" : "json",
135
			"data" :{"id":articleId},
136
			"success": function(data) {
137
				if(data.success && data.data) {
138
					for(var i = 0; i < data.data.length; i++) {
139
						var itlist = '<li>'+
140
							'<span class="atach-name ellipsisSty">'+data.data[i].name+'</span>'+
141
							'<span class="atach-size">'+sizeTo(data.data[i].size)+'</span>'+
142
							'<a href="/data/article/file'+data.data[i].url+'?_dl='+data.data[i].name+'" class="atach-down">点击下载</a>'+
143
						'</li>'
144
						$("#atachList").append(itlist);
145
					}
146
				}
147
			}
148
		});
149
	}
130 150
	//专家信息
131 151
	function expert(professorId){
132 152
		$.ajax({
@ -178,11 +198,13 @@ $(function() {
178 198
					
179 199
					$("#QorgType").text(orgTypeShow[data.data.orgType])
180 200
					
181
				
201
					if(!data.data.colMgr && !data.data.resMgr) {
202
						relatedProducts();
203
					}
204
					if(data.data.colMgr) {
205
						queryFileAtach();
206
					}
182 207
				}
183
				},
184
			"error": function() {
185
				$.MsgBox.Alert('提示', '链接服务器超时')
186 208
			}
187 209
		});
188 210
	}
@ -467,6 +489,69 @@ $(function() {
467 489
		}
468 490
	
469 491
	}
492
	
493
	/*相关产品*/
494
	function relatedProducts() {
495
		$.ajax({
496
			"url": "/ajax/article/product",
497
			"type": "GET",
498
			"data": {
499
				"id": articleId,
500
				"rows":5
501
			},
502
			dataType: "json",
503
			"success": function(data) {
504
				if(data.success && data.data) {
505
					for(var i = 0; i < data.data.length; i++) {
506
						var productId = data.data[i].product;
507
						relatedProductsList(productId)
508
					}
509
					
510
				}
511
			}
512
		});
513
	}
514
	function relatedProductsList(Id){
515
		$.ajax({
516
			"url" : "/ajax/product/qo",
517
			"type" :  "GET" ,
518
			"dataType" : "json",
519
			"data" :{"id":Id},
520
			"success" : function(data) {
521
				if (data.success && data.data!=""){
522
					$("#oProducts").parents(".otherShow").removeClass("displayNone");
523
					var StrData = data.data
524
					var lengthT;
525
					if(StrData.length>5){
526
						lengthT=5;
527
					}else{
528
						lengthT=StrData.length
529
					}
530
					for(var i = 0; i < lengthT; i++) {
531
						var $html=StrData[i]
532
						var cnt="", img="../images/default-product.jpg"
533
						if($html.images) {
534
							var subs = strToAry($html.images)
535
							if(subs.length > 0) {
536
								img="/data/product" + subs[0]
537
							}
538
						}
539
						if($html.cnt){
540
							cnt="简介:"+$html.cnt
541
						}
542
						var itemlist = '<li data-id="'+$html.id+'">'
543
							itemlist += '<a class="flexCenter OflexCenter"><div class="madiaHead resourceHead" style="background-image:url('+img+')"></div>';
544
							itemlist += '<div class="madiaInfo OmadiaInfo">';
545
							itemlist += '<p class="ellipsisSty h1Font" id="usertitle">'+$html.name+'</p>';
546
							itemlist += '<p class="ellipsisSty-2 h2Font">'+cnt+'</p>';
547
							itemlist += '</div></a></li>';
548
						var $itemlist = $(itemlist);
549
						$("#oProducts").append($itemlist)
550
					}
551
				}
552
			}
553
		});
554
	}
470 555
});
471 556

472 557


+ 91 - 1
js/articalShow.js

@ -17,6 +17,7 @@ $(document).ready(function() {
17 17
	relevantExperts();
18 18
	relatedServices();
19 19
	relevantResources(); 
20
	relatedProducts();
20 21
	pageViewLog(articleId,3)
21 22
	wlog("article",articleId,"1");
22 23
	$('.wordHave').click(function(){$('html,body').animate({scrollTop: ($('.offmsg').outerHeight(true)+60)+'px'}, 800);}); //留言
@ -45,6 +46,27 @@ $(document).ready(function() {
45 46
			closeLog();
46 47
		})
47 48
	}
49
	//附件
50
	function queryFileAtach(){
51
		$.ajax({
52
			"url": "/ajax/article/files/byArticleId",
53
			"type": "get",
54
			"dataType" : "json",
55
			"data" :{"id":articleId},
56
			"success": function(data) {
57
				if(data.success && data.data) {
58
					for(var i = 0; i < data.data.length; i++) {
59
						var itlist = '<li>'+
60
							'<span class="atach-name ellipsisSty">'+data.data[i].name+'</span>'+
61
							'<span class="atach-size">'+sizeTo(data.data[i].size)+'</span>'+
62
							'<a href="/data/article/file'+data.data[i].url+'?_dl='+data.data[i].name+'" class="atach-down">点击下载</a>'+
63
						'</li>'
64
						$("#atachList").append(itlist);
65
					}
66
				}
67
			}
68
		});
69
	}
48 70
	//最近文章
49 71
	function recentlyArticle(num,obj) {
50 72
		var ourl=num==1?"/ajax/article/pqOrgPublish":"/ajax/article/pqProPublish";
@ -277,6 +299,13 @@ $(document).ready(function() {
277 299
					if(userid){
278 300
						ifcollectionAbout(data.data.id,$("#enterprise").find(".attenSpan"), 6)
279 301
					}
302
					
303
					if(!data.data.colMgr && !data.data.resMgr) {
304
						relatedProducts();
305
					}
306
					if(data.data.colMgr) {
307
						queryFileAtach();
308
					}
280 309
				}
281 310
			},
282 311
			"error": function() {
@ -482,7 +511,68 @@ $(document).ready(function() {
482 511
			}
483 512
		});
484 513
	}
485
	
514
	/*相关产品*/
515
	function relatedProducts() {
516
		$.ajax({
517
			"url": "/ajax/article/product",
518
			"type": "GET",
519
			"data": {
520
				"id": articleId,
521
				"rows":5
522
			},
523
			dataType: "json",
524
			"success": function(data) {
525
				if(data.success && data.data) {
526
					for(var i = 0; i < data.data.length; i++) {
527
						var productId = data.data[i].product;
528
						relatedProductsList(productId)
529
					}
530
					
531
				}
532
			}
533
		});
534
	}
535
	function relatedProductsList(Id){
536
		$.ajax({
537
			"url" : "/ajax/product/qo",
538
			"type" :  "GET" ,
539
			"dataType" : "json",
540
			"data" :{"id":Id},
541
			"success" : function(data) {
542
				if (data.success && data.data!=""){
543
					$("#oProducts").parents(".otherShow").removeClass("displayNone");
544
					var StrData = data.data
545
					var lengthT;
546
					if(StrData.length>5){
547
						lengthT=5;
548
					}else{
549
						lengthT=StrData.length
550
					}
551
					for(var i = 0; i < lengthT; i++) {
552
						var $html=StrData[i]
553
						var cnt="", img="../images/default-product.jpg"
554
						if($html.images) {
555
							var subs = strToAry($html.images)
556
							if(subs.length > 0) {
557
								img="/data/product" + subs[0]
558
							}
559
						}
560
						if($html.cnt){
561
							cnt="简介:"+$html.cnt
562
						}
563
						var itemlist = '<li data-id="'+$html.id+'">'
564
							itemlist += '<a class="flexCenter OflexCenter"><div class="madiaHead resourceHead" style="background-image:url('+img+')"></div>';
565
							itemlist += '<div class="madiaInfo OmadiaInfo">';
566
							itemlist += '<p class="ellipsisSty h1Font" id="usertitle">'+$html.name+'</p>';
567
							itemlist += '<p class="ellipsisSty-2 h2Font">'+cnt+'</p>';
568
							itemlist += '</div></a></li>';
569
						var $itemlist = $(itemlist);
570
						$("#oProducts").append($itemlist)
571
					}
572
				}
573
			}
574
		});
575
	}
486 576
	/*相关服务*/
487 577
	function relatedServices() {
488 578
		$.ajax({

+ 85 - 2
js/articalShow2.js

@ -16,7 +16,8 @@ $(document).ready(function() {
16 16
	articleshow();
17 17
	relevantExperts();
18 18
	relatedServices();
19
	relevantResources(); 
19
	relevantResources();
20
	queryFileAtach();
20 21
	pageViewLog(articleId,3)
21 22
	wlog("article",articleId,"1");
22 23
	$('.wordHave').click(function(){$('html,body').animate({scrollTop: ($('.offmsg').outerHeight(true)+60)+'px'}, 800);}); //留言
@ -44,6 +45,27 @@ $(document).ready(function() {
44 45
			closeLog();
45 46
		})
46 47
	}
48
	//附件
49
	function queryFileAtach(){
50
		$.ajax({
51
			"url": "/ajax/article/files/byArticleId",
52
			"type": "get",
53
			"dataType" : "json",
54
			"data" :{"id":articleId},
55
			"success": function(data) {
56
				if(data.success && data.data) {
57
					for(var i = 0; i < data.data.length; i++) {
58
						var itlist = '<li>'+
59
							'<span class="atach-name ellipsisSty">'+data.data[i].name+'</span>'+
60
							'<span class="atach-size">'+sizeTo(data.data[i].size)+'</span>'+
61
							'<a href="/data/article/file'+data.data[i].url+'?_dl='+data.data[i].name+'" class="atach-down">点击下载</a>'+
62
						'</li>'
63
						$("#atachList").append(itlist);
64
					}
65
				}
66
			}
67
		});
68
	}
47 69
	//最近文章
48 70
	function recentlyArticle(num,obj) {
49 71
		var ourl=num==1?"/ajax/article/pqOrgPublish":"/ajax/article/pqProPublish";
@ -488,7 +510,68 @@ $(document).ready(function() {
488 510
			}
489 511
		});
490 512
	}
491
	
513
	/*相关产品*/
514
	function relatedProducts() {
515
		$.ajax({
516
			"url": "/ajax/article/product",
517
			"type": "GET",
518
			"data": {
519
				"id": articleId,
520
				"rows":5
521
			},
522
			dataType: "json",
523
			"success": function(data) {
524
				if(data.success && data.data) {
525
					for(var i = 0; i < data.data.length; i++) {
526
						var productId = data.data[i].product;
527
						relatedProductsList(productId)
528
					}
529
					
530
				}
531
			}
532
		});
533
	}
534
	function relatedProductsList(Id){
535
		$.ajax({
536
			"url" : "/ajax/product/qo",
537
			"type" :  "GET" ,
538
			"dataType" : "json",
539
			"data" :{"id":Id},
540
			"success" : function(data) {
541
				if (data.success && data.data!=""){
542
					$("#oProducts").parents(".otherShow").removeClass("displayNone");
543
					var StrData = data.data
544
					var lengthT;
545
					if(StrData.length>5){
546
						lengthT=5;
547
					}else{
548
						lengthT=StrData.length
549
					}
550
					for(var i = 0; i < lengthT; i++) {
551
						var $html=StrData[i]
552
						var cnt="", img="../images/default-product.jpg"
553
						if($html.images) {
554
							var subs = strToAry($html.images)
555
							if(subs.length > 0) {
556
								img="/data/product" + subs[0]
557
							}
558
						}
559
						if($html.cnt){
560
							cnt="简介:"+$html.cnt
561
						}
562
						var itemlist = '<li data-id="'+$html.id+'">'
563
							itemlist += '<a class="flexCenter OflexCenter"><div class="madiaHead resourceHead" style="background-image:url('+img+')"></div>';
564
							itemlist += '<div class="madiaInfo OmadiaInfo">';
565
							itemlist += '<p class="ellipsisSty h1Font" id="usertitle">'+$html.name+'</p>';
566
							itemlist += '<p class="ellipsisSty-2 h2Font">'+cnt+'</p>';
567
							itemlist += '</div></a></li>';
568
						var $itemlist = $(itemlist);
569
						$("#oProducts").append($itemlist)
570
					}
571
				}
572
			}
573
		});
574
	}
492 575
	/*相关服务*/
493 576
	function relatedServices() {
494 577
		$.ajax({

+ 133 - 4
js/cmpInforShow.js

@ -14,12 +14,16 @@ $(function() {
14 14
			resShareId:"",
15 15
			
16 16
			serModifyTime: "",
17
			serId: "",
17
			
18
			prdModifyTime: ""
18 19
		},
19 20
		watchO={
20 21
			beiTime:"",
21 22
			beiProId:"",
22
		};
23
		},
24
		ifHasDefaultUser=false,
25
		firstLinkman;
26

23 27
	var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
24 28
			$.ajax({
25 29
				url:url,
@ -69,6 +73,10 @@ $(function() {
69 73
					serviceListVal(true);
70 74
					$(".establishments").show()
71 75
				}
76
				if(!$info.colMgr && !$info.resMgr){
77
					productListVal(true);
78
					$(".productions").show()
79
				}
72 80
				if($info.hasOrgLogo) {
73 81
					$("#proHead").attr("src", "/images/org/" + $info.id + ".jpg");
74 82
				}else{
@ -459,6 +467,70 @@ $(function() {
459 467
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
460 468
			})
461 469
		},
470
		productListVal=function(isbind){
471
			var aimId="proProduct",aimIdF="showProduct",newStr="企业尚未发布任何产品"
472
			oAjax("/ajax/product/publish",{
473
				"category":"2",
474
				"owner":orgId,
475
				"modifyTime":dataO.prdModifyTime,
476
				"rows": rows
477
			}, "get", function(res){
478
				var $info = res.data;
479
				if($info.length > 0) {
480
					$("#"+aimId).show()
481
					$("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
482
					$("#"+aimIdF).parents(".splitBlock").removeClass("displayNone");
483
					$("#"+aimIdF).parents(".coninfobox").show();
484
					dataO.prdModifyTime = $info[$info.length - 1].modifyTime;
485
			
486
					for(var i = 0; i < $info.length; i++) {
487
						var cnt="", hasImg="../images/default-product.jpg"
488
						if($info[i].images) {
489
							var subs = strToAry($info[i].images)
490
							if(subs.length > 0) {
491
								hasImg="/data/ware" + subs[0]
492
							}
493
						}
494
						if($info[i].cnt) {
495
							cnt = "内容:" +$info[i].cnt; 
496
						}
497
						var itemlist = '<li>';
498
							itemlist += '<a href="productShow.html?sevriceId=' + $info[i].id + '" class="flexCenter urlgo">';
499
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
500
							itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
501
							itemlist += '</a></li>';
502
						var $itemlist = $(itemlist);
503
						$("#"+aimId).append($itemlist)
504
						
505
						if(isbind && i==0){
506
							var $itemlist = $(itemlist);
507
							$("#"+aimIdF).append($itemlist);
508
						}
509
					}
510
				}
511
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
512
                removeNodata(aimId);
513
                if($info.length == 0 && liLen == 0 ){
514
                	$("#"+aimId).hide()
515
                    insertNodata(aimId,newStr);
516
                }
517
                if(isbind){
518
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
519
					 	serviceListVal(false)
520
					})
521
                }
522
				if ($info.length < rows) {
523
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
524
                    $("#"+aimId).parent().find(".js-load-more").hide();
525
                }
526
			},function(){
527
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
528
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
529
			},function(){
530
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
531
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
532
			})
533
		},
462 534
		relevantarticalList=function(){//相关文章信息
463 535
			oAjax("/ajax/article/byAssOrg",{
464 536
				"id":orgId
@ -563,6 +635,17 @@ $(function() {
563 635
					$("#serCount").text("99+");
564 636
				}
565 637
			});
638
			oAjax("/ajax/product/count/publish",{//产品总数
639
				"owner": orgId,
640
				"category":"2"
641
			}, "GET", function(data){
642
				if(data.data>0 && data.data<99){
643
					$("#productCount").text(data.data);
644
				}
645
				if(data.data>99){
646
					$("#productCount").text("99+");
647
				}
648
			});
566 649
		},
567 650
		attentMyself=function(isbind){
568 651
			var aimId="attendMy",newStr="企业尚未被任何人关注"
@ -645,6 +728,45 @@ $(function() {
645 728
				liItem.innerHTML = strAdd
646 729
			})
647 730
		},
731
		isInArray2=function(arr,value){
732
		    var index = $.inArray(value,arr);
733
		    if(index >= 0){
734
		        return true;
735
		    }
736
		    return false;
737
		},
738
		getDefaultLink=function(){
739
			oAjax("/ajax/org/linkman/queryAll",{
740
				"oid": orgId
741
			}, "GET", function(data){
742
				if(data.success) {
743
					console.log(data)
744
					var $data = data.data,linkmans=[];
745
					if($data.length>0){
746
						for(var i = 0; i < $data.length; i++){
747
							linkmans.push($data[i].pid)
748
						}
749
						if(!isInArray2(linkmans,userid)){
750
							firstLinkman=$data[0].pid
751
							ifHasDefaultUser = true;
752
							$("#conbtn").show()
753
							//点击联系按钮
754
							$("#conbtn").on('click', function(){
755
								if(userid && userid != null && userid != "null") {
756
									if(ifHasDefaultUser){
757
										location.href="tidings.html?id="+firstLinkman
758
									}
759
								} else {
760
									quickLog();
761
									operatTab();
762
									closeLog();
763
								}
764
							});
765
						};
766
					}
767
				}
768
			});
769
		},
648 770
		bindClickFun=function(){
649 771
			//点击关注按钮
650 772
			$("#attentBtn").on('click', function() {
@ -668,7 +790,6 @@ $(function() {
668 790
					closeLog();
669 791
				}
670 792
			});	
671
			
672 793
			//点击查看全部服务
673 794
			$(".coninfobox").on("click", "#seeMoreS", function() {
674 795
				document.body.scrollTop = document.documentElement.scrollTop = 0;
@ -676,6 +797,13 @@ $(function() {
676 797
				$("#item1user").hide();
677 798
				$("#item9user").show();
678 799
			})
800
			//点击查看全部产品
801
			$(".coninfobox").on("click", "#seeMorePd", function() {
802
				document.body.scrollTop = document.documentElement.scrollTop = 0;
803
				$("#tab10user").addClass("liNow").siblings().removeClass("liNow");
804
				$("#item1user").hide();
805
				$("#item10user").show();
806
			})
679 807
			//点击查看全部资源
680 808
			$(".coninfobox").on("click", "#seeMoreR", function() {
681 809
				document.body.scrollTop = document.documentElement.scrollTop = 0;
@ -726,8 +854,9 @@ $(function() {
726 854
	pageViewLog(orgId,6)
727 855
	queryPubCount();
728 856
	getCmpInfo(); //获取详细信息
857
	getDefaultLink();
729 858
	ifcollectionAbout(orgId,$(".goSpan").find(".attenSpan"),6);
730
	
859

731 860
	articalListVal(true);
732 861
	bindClickFun();
733 862
	

+ 27 - 0
js/public/baseUtil.js

@ -27,7 +27,30 @@ function strToAry(str){
27 27
	}
28 28
	return subs
29 29
}
30
//字符串string转换为数组Boolean
31
function stringToBoolean(str){
32
	switch(str.toLowerCase()){
33
		case "true": case "yes": case "1": return true;
34
		case "false": case "no": case "0": case null: return false;
35
		default: return Boolean(str);
36
	}
37
}
38
//保留小数
39
function SplitAndRound(a, n) {
40
	a = a * Math.pow(10, n);
41
	return (Math.round(a)) / (Math.pow(10, n));
42
}
30 43

44
//转换MB、KB、B
45
function sizeTo(str){
46
	if(str < 1024){
47
		return str + ' B';
48
	}else if(str >= 1024 && str < 1024*1024){
49
		return SplitAndRound(str/1024,2) + ' KB';
50
	}else if(str >= 1024*1024 && str < 1024*1024*1024){
51
		return SplitAndRound(str/1024/1024,2) + ' MB';
52
	}
53
}
31 54
/*标志*/
32 55
function autho() {
33 56
	if(arguments[0] == 1) {
@ -702,6 +725,10 @@ function pageViewLog(id,type){//增加浏览量
702 725
	    "10":{//服务
703 726
	    	url: '/ajax/ware/incPageViews',
704 727
	     	data: { 'id': id }
728
	    },
729
	    "11":{//产品
730
	    	url: '/ajax/product/incPageViews',
731
	    	data: {'id': id}
705 732
	    }
706 733
	    
707 734
	};