Browse Source

新版专家录入和专家录入审核

XMTT 7 years ago
parent
commit
801c3c3d36

+ 149 - 0
css/model/sys/userinfo.css

@ -0,0 +1,149 @@
1
@charset "utf-8";
2
.sys_userinfo_index .tpl-btns .row,.sys_userinfo_check .tpl-btns .row {
3
    padding-left: 10px;
4
}
5
6
.sys_userinfo_index th.opt-check,.sys_userinfo_check th.opt-check {
7
    width: 35px;
8
}
9
10
.sys_userinfo_index td.table-opt.edit,.sys_userinfo_check td.table-opt.edit {
11
    padding: 1px;
12
    text-align: center;
13
}
14
15
.sys_userinfo_index .table-opt .name,.sys_userinfo_check .table-opt .name{
16
    cursor:pointer;
17
}
18
19
.sys_userinfo_new,.sys_userinfo_edit{
20
    width: 500px;
21
    height: 250px;
22
    padding: 0 20px 10px;
23
}
24
25
.sys_userinfo_review{
26
    width: 650px;
27
    height: 400px;
28
    padding: 0 20px 10px;
29
}
30
31
.sys_userinfo_review .icon-close {
32
    display: none;
33
}
34
35
.sys_userinfo_details{
36
    width: 800px;
37
    height: 600px;
38
    padding: 0 20px 10px;
39
}
40
41
.sys_userinfo_details .requiredSpan{
42
    color: #ff0000;
43
    position:relative;
44
    top:6px;
45
    left: -4px;
46
47
}
48
49
.sys_userinfo_details .citybox .frmtype, .sys_professor_edit .citybox .frmtype {
50
    border: 1px solid #B5B5B5;
51
}
52
53
.sys_userinfo_details .citybox span, .sys_professor_edit .citybox span {
54
    position: relative;
55
    width: 96%;
56
    display: inline-block;
57
    padding: 0 0 0 6px;
58
    cursor: pointer;
59
    margin: 0;
60
    background: #fff;
61
}
62
63
.sys_userinfo_details .citybox span .mr_show.mr_select,.sys_professor_edit .citybox span .mr_show.mr_select {
64
    color: #333;
65
}
66
67
.sys_userinfo_details .citybox span .mr_show, .sys_professor_edit .citybox span .mr_show {
68
    font-style: normal;
69
    color: #AAAAAA;
70
    width: 100%;
71
    display: inline-block;
72
    height: 32px;
73
    line-height: 32px;
74
    position: relative;
75
}
76
77
.sys_userinfo_details .citybox span .mr_show .mr_select, .sys_professor_edit .citybox span .mr_show .mr_select {
78
    color: #333;
79
}
80
81
.sys_userinfo_details .citybox span .mr_sj, .sys_professor_edit .citybox span .mr_sj {
82
    position: absolute;
83
    right: 10px;
84
    top: 15px;
85
    display: inline-block;
86
    height: 0;
87
    width: 0;
88
    border: 6px solid #fff;
89
    border-color: #28b8fa transparent transparent;
90
}
91
92
.sys_userinfo_details .citybox span ul, .sys_professor_edit .citybox span ul {
93
    width: 98%;
94
    border-radius: 0 0 5px 5px;
95
    position: absolute;
96
    border: 1px solid #E8E8E8;
97
    background: #fff;
98
    left: -1px;
99
    top: 38px;
100
    margin-bottom: 10px;
101
    display: none;
102
    z-index: 10;
103
    max-height: 280px;
104
    overflow: auto;
105
}
106
107
.sys_userinfo_details .citybox span ul li, .sys_professor_edit .citybox span ul li {
108
    width: 100%;
109
    float: left;
110
    overflow: hidden;
111
    border-top: 1px solid #E8E8E8;
112
}
113
114
.sys_userinfo_details .citybox span ul li:first-child, .sys_professor_edit .citybox span ul li:first-child {
115
    border-top: 0;
116
}
117
118
.sys_userinfo_details .citybox span ul li a, .sys_professor_edit .citybox span ul li a {
119
    display: block;
120
    height: 30px;
121
    line-height: 30px;
122
    padding: 0 8px;
123
    color: #494949;
124
}
125
126
.sys_userinfo_details .orgSize.dyn-mselect .icon-drop, .sys_org_edit .orgSize.dyn-mselect .icon-drop {
127
    display: none !important;
128
}
129
130
.sys_userinfo_details .orgSize.dyn-mselect .dd-drop, .sys_org_edit .orgSize.dyn-mselect .dd-drop {
131
    display: none !important;
132
}
133
134
.sys_userinfo_details .orgSize.dyn-mselect .placeholder, .sys_org_edit .orgSize.dyn-mselect .placeholder {
135
    display: none !important;
136
}
137
138
.sys_userinfo_project ,.sys_userinfo_honor,.sys_userinfo_job,.sys_userinfo_edu{
139
    width: 600px;
140
    padding: 0 20px 10px;
141
}
142
.sys_userinfo_project ,.sys_userinfo_honor{
143
    height: 350px;
144
}
145
.sys_userinfo_job,.sys_userinfo_edu{
146
    height: 470px;
147
}
148
149

+ 1 - 0
html/index.html

@ -170,6 +170,7 @@
170 170
	<script type="text/javascript" src="../js/typeahead.js"></script>
171 171
	<script type="text/javascript" src="../js/webuploader.js"></script>
172 172
	<script type="text/javascript" src="../js/city.min.js"></script>
173
	<script type="text/javascript" src="../js/static.js"></script>
173 174

174 175
	<script>
175 176
		$(function() {

+ 1 - 1
html/login.html

@ -78,7 +78,7 @@
78 78
//								window.location.href='index.html#sys_usercount_index';
79 79
//							}
80 80
						} else {
81
							$.util.error("invalid username or password");
81
							$.util.error("帐号密码错误,或者帐号失效");
82 82
						}
83 83
					}, true);
84 84


+ 2 - 2
html/model/sys/user/index.html

@ -56,7 +56,7 @@
56 56
				<i class="icon-edit"></i>编缉
57 57
			</div>
58 58
			<div class="btn opt-del">
59
				<i class="icon-remove-sign"></i>删除
59
				<i class="icon-remove-sign"></i>禁用
60 60
			</div>
61 61
			<div class="btn opt-role">
62 62
				<i class="icon-group"></i>角色
@ -78,7 +78,7 @@
78 78
					<th>名称</th>
79 79
					<th>手机</th>
80 80
					<th>邮箱</th>
81
					<th>是否有效</th>
81
					<th>是否启用</th>
82 82
					<th>创建时间</th>
83 83
				</tr>
84 84
			</thead>

+ 102 - 0
html/model/sys/userInfo/check.html

@ -0,0 +1,102 @@
1
<div class="sys_userinfo_check" loadUri="../ajax/userinfo/pqAll" pageSize="10" pageNo="1">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container dt-form">
6
        <div class="row">
7
            <div class="col-2 item-caption">用户名</div>
8
            <div class="col-3">
9
                <div class="form-item text trim " defVal="" name="name"></div>
10
            </div>
11
            <div class="col-1 item-caption">审核状态</div>
12
            <div class="col-2">
13
                <div class="form-item select" dictCode="user_info_state_check" name="state"></div>
14
            </div>
15
            <div class="col-1 item-caption">创建人</div>
16
            <div class="col-2">
17
                <div class="form-item text trim" name="creatorName"></div>
18
            </div>
19
            <div class="col-1"></div>
20
        </div>
21
        <div class="row">
22
            <div class="col-2 item-caption">所在机构</div>
23
            <div class="col-3">
24
                <div class="form-item text trim" defVal="" name="orgName"></div>
25
            </div>
26
            <div class="col-1 item-caption ">创建日期</div>
27
            <div class="col-2">
28
                <div class="form-item date" defVal="" name="bt"></div>
29
            </div>
30
            <div class="col-1 item-caption center">至</div>
31
            <div class="col-2">
32
                <div class="form-item date" defVal="" name="et"></div>
33
            </div>
34
            <div class="col-1"></div>
35
        </div>
36
        <div class="row">
37
            <div class="col-9"></div>
38
            <div class="col-2">
39
                <div class="btn opt-query pull-right">
40
                    <i class="icon-search"></i> 查询
41
                </div>
42
            </div>
43
            <div class="col-1"></div>
44
        </div>
45
    </div>
46
47
    <div class="container page-split"></div>
48
    <div class="container tpl-btns">
49
        <div class="row">
50
            <div class="btn opt-examine">
51
                查看用户信息
52
            </div>
53
            <div class="btn opt-review">
54
                审核
55
            </div>
56
        </div>
57
    </div>
58
    <div class="container dt-tpl">
59
        <table class="table table-bordered">
60
            <thead>
61
            <tr>
62
                <th class="opt-check"><i class="icon icon-st-check"></i></th>
63
                <th>序号</th>
64
                <th>用户名</th>
65
                <th>职称</th>
66
                <th>所在机构</th>
67
                <th>创建时间</th>
68
                <th>创建人</th>
69
                <th>审核状态</th>
70
                <th>审核人</th>
71
                <th>审核时间</th>
72
                <th>身份类型</th>
73
                <th>专家认证</th>
74
                <th>权重</th>
75
            </tr>
76
            </thead>
77
            <tbody>
78
            <tr ch-dir="list">
79
                <td class="opt-check"><i class="icon icon-st-check" userId="{{id}}"></i></td>
80
                <td>{{-_index}}</td>
81
                <td>{{name}}</td>
82
                <td>{{title}}</td>
83
                <td>{{orgName}}</td>
84
                <td>{{createTime-date}}</td>
85
                <td>{{creatorName}}</td>
86
                <td class="hand-dict" dict="user_info_state" code="{{state}}"></td>
87
                <td>{{reviewerName}}</td>
88
                <td>{{reviewTime-date}}</td>
89
                <td class="hand-dict" dict="authentication" code="{{authentication}}"></td>
90
                <td class="hand-dict" dict="auth_status" code="{{authStatusExpert}}"></td>
91
                <td>{{sortFirst}}</td>
92
            </tr>
93
            </tbody>
94
            <tbody ch-dir="array.empty">
95
            <tr>
96
                <td class="empty-desc" colspan="13">表格暂无数据</td>
97
            </tr>
98
            </tbody>
99
        </table>
100
    </div>
101
    <ul class="dt-pager"></ul>
102
</div>

+ 254 - 0
html/model/sys/userInfo/details.html

@ -0,0 +1,254 @@
1
<div class="sys_userinfo_details centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">专家姓名</div>
8
            <div class="col-4">
9
                <div class="form-item text required" defVal="" name="name"></div>
10
            </div>
11
            <span class="requiredSpan">*</span>
12
        </div>
13
        <div class="row">
14
            <div class="col-2 item-caption">职称</div>
15
            <div class="col-4">
16
                <div class="form-item text" defVal="" name="title"></div>
17
            </div>
18
            <div class="col-2 item-caption">职位</div>
19
            <div class="col-4">
20
                <div class="form-item text" defVal="" name="office"></div>
21
            </div>
22
        </div>
23
        <div class="row">
24
            <div class="col-2 item-caption">所在机构</div>
25
            <div class="col-4">
26
                <div class="form-item text" defVal="" name="orgName"></div>
27
            </div>
28
            <div class="col-2 item-caption">所属部门</div>
29
            <div class="col-4">
30
                <div class="form-item text" defVal="" name="department"></div>
31
            </div>
32
        </div>
33
        <div class="row me">
34
            <div class="col-2 item-caption">联系电话</div>
35
            <div class="col-4">
36
                <div class="form-item text" defVal="" name="pMobile"></div>
37
            </div>
38
            <div class="col-2 item-caption">联系邮箱</div>
39
            <div class="col-4">
40
                <div class="form-item text" defVal="" name="pEmail"></div>
41
            </div>
42
        </div>
43
        <div class="row">
44
            <div class="col-2 item-caption cityText">所在城市</div>
45
            <div class="col-8 city">
46
                <form action="" name="form1">
47
                    <div class=" col-6 citybox">
48
														<span class="frmtype frmtypeW" id="Province">
49
				                                        	<em class="mr_sj"></em>
50
				                                            <i class="mr_show" id="oprovince">请选择省份</i>
51
				                                            <ul>
52
				                                                <li><a href="javascript:void(0)"
53
                                                                       alt="请选择省份">请选择省份</a></li>
54
				                                            </ul>
55
				                                            <input type="hidden" name="cho_Province"
56
                                                                   value="请选择省份">
57
				                                        </span>
58
                    </div>
59
                    <div class="col-6 citybox">
60
														<span class="frmtype frmtypeW" id="City">
61
				                                       		<em class="mr_sj"></em>
62
				                                            <i class="mr_show" id="ocity"></i>
63
				                                            <ul>
64
				                                                <li><a href="javascript:void(0)"
65
                                                                       alt="请选择城市">请选择城市</a></li>
66
				                                            </ul>
67
				                                            <input type="hidden" name="cho_City" value="请选择城市 ">
68
				                                        </span>
69
                    </div>
70
                </form>
71
            </div>
72
        </div>
73
        <div class="row">
74
            <div class="col-2 item-caption">个人简介</div>
75
            <div class="col-6">
76
                <div class="form-item textarea" name="descp"></div>
77
            </div>
78
        </div>
79
        <div class="row">
80
            <div class="col-2 item-caption">学术领域</div>
81
            <div class="col-4">
82
                <div class="form-item text" defVal="" name="newSubject"></div>
83
            </div>
84
            <div class="col-2">
85
                <div class="btn pull-right opt-subject">
86
                    <i class="icon-check"></i> 添加
87
                </div>
88
            </div>
89
        </div>
90
        <div class="row">
91
            <div class="col-2"></div>
92
            <div class="col-6">
93
                <div class="form-item dyn-mselect orgSize" name="subjectList"></div>
94
            </div>
95
        </div>
96
        <div class="row">
97
            <div class="col-2 item-caption">行业领域</div>
98
            <div class="col-4">
99
                <div class="form-item text" defVal="" name="newIndustry"></div>
100
            </div>
101
            <div class="col-2">
102
                <div class="btn pull-right opt-industry">
103
                    <i class="icon-check"></i> 添加
104
                </div>
105
            </div>
106
        </div>
107
        <div class="row">
108
            <div class="col-2"></div>
109
            <div class="col-6">
110
                <div class="form-item dyn-mselect orgSize" name="industryList"></div>
111
            </div>
112
        </div>
113
        <div class="row">
114
            <div class="col-2 item-caption">研究方向</div>
115
            <div class="col-4">
116
                <div class="form-item text" defVal="" name="newResearchArea"></div>
117
            </div>
118
            <div class="col-2">
119
                <div class="btn pull-right opt-ra">
120
                    <i class="icon-check"></i> 添加
121
                </div>
122
            </div>
123
        </div>
124
        <div class="row">
125
            <div class="col-2"></div>
126
            <div class="col-6">
127
                <div class="form-item dyn-mselect orgSize" name="researchAreaList"></div>
128
            </div>
129
        </div>
130
        <div class="container">
131
            <table class="table table-bordered">
132
                <thead>
133
                <tr>
134
                    <th>项目经历</th>
135
                    <th class="col-3">
136
                        <div class="btn pull-right opt-project-new">
137
                            <i class="icon-check"></i> 添加
138
                        </div>
139
                    </th>
140
                </tr>
141
                </thead>
142
                <tbody class="dt-project">
143
                <tr ch-dir="list">
144
                    <td>{{projectName}}&nbsp;&nbsp;{{projectStart}}-{{projectStop}}<br>{{projectDescp}}</td>
145
                    <td class="table-opt edit" pNo="{{no}}">
146
                        <div class="btn opt-project-edit">
147
                            <i class="icon-edit"></i>
148
                            编辑
149
                        </div>
150
                        <div class="btn pull-right opt-project-del">
151
                            <i class="icon-edit"></i>
152
                            删除
153
                        </div>
154
                    </td>
155
                </tr>
156
            </table>
157
        </div>
158
        <div class="container">
159
            <table class="table table-bordered">
160
                <thead>
161
                <tr>
162
                    <th>荣誉奖项</th>
163
                    <th class="col-3">
164
                        <div class="btn pull-right opt-honor-new">
165
                            <i class="icon-check"></i> 添加
166
                        </div>
167
                    </th>
168
                </tr>
169
                </thead>
170
                <tbody class="dt-honor">
171
                <tr ch-dir="list">
172
                    <td>{{honorName}}&nbsp;&nbsp;{{honorYear}}<br>{{honorDescp}}</td>
173
                    <td class="table-opt edit" hNo="{{no}}">
174
                        <div class="btn opt-honor-edit">
175
                            <i class="icon-edit"></i>
176
                            编辑
177
                        </div>
178
                        <div class="btn pull-right opt-honor-del">
179
                            <i class="icon-edit"></i>
180
                            删除
181
                        </div>
182
                    </td>
183
                </tr>
184
                </tbody>
185
            </table>
186
        </div>
187
        <div class="container">
188
            <table class="table table-bordered">
189
                <thead>
190
                <tr>
191
                    <th>工作经历</th>
192
                    <th class="col-3">
193
                        <div class="btn pull-right opt-job-new">
194
                            <i class="icon-check"></i> 添加
195
                        </div>
196
                    </th>
197
                </tr>
198
                </thead>
199
                <tbody class="dt-job">
200
                <tr ch-dir="list">
201
                    <td>{{jobCompany}}-{{jobTitle}}-{{jobDepartment}}&nbsp;&nbsp;{{jobStart}}-{{jobStop}}<br>{{descp}}</td>
202
                    <td class="table-opt edit" jNo="{{no}}">
203
                        <div class="btn opt-job-edit">
204
                            <i class="icon-edit"></i>
205
                            编辑
206
                        </div>
207
                        <div class="btn pull-right opt-job-del">
208
                            <i class="icon-edit"></i>
209
                            删除
210
                        </div>
211
                    </td>
212
                </tr>
213
                </tbody>
214
            </table>
215
        </div>
216
        <div class="container">
217
            <table class="table table-bordered">
218
                <thead>
219
                <tr>
220
                    <th>教育背景</th>
221
                    <th class="col-3">
222
                        <div class="btn pull-right opt-edu-new">
223
                            <i class="icon-check"></i> 添加
224
                        </div>
225
                    </th>
226
                </tr>
227
                </thead>
228
                <tbody class="dt-edu">
229
                <tr ch-dir="list">
230
                    <td>{{eduSchool}}-{{eduCollege}}-{{eduMajor}}-{{eduDegree}}&nbsp;&nbsp;{{eduYear}}<br>{{descp}}</td>
231
                    <td class="table-opt edit" eNo="{{no}}">
232
                        <div class="btn opt-edu-edit">
233
                            <i class="icon-edit"></i>
234
                            编辑
235
                        </div>
236
                        <div class="btn pull-right opt-edu-del">
237
                            <i class="icon-edit"></i>
238
                            删除
239
                        </div>
240
                    </td>
241
                </tr>
242
                </tbody>
243
            </table>
244
        </div>
245
        <div class="row">
246
            <div class="col-10"></div>
247
            <div class="col-4 pull-right">
248
                <div class="btn pull-right opt-save">
249
                    <i class="icon-check"></i> 保存
250
                </div>
251
            </div>
252
        </div>
253
    </div>
254
</div>

+ 35 - 0
html/model/sys/userInfo/edit.html

@ -0,0 +1,35 @@
1
<div class="sys_userinfo_edit centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">用户名</div>
8
            <div class="col-6">
9
                <div class="form-item text required" defVal="" name="name"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption">手机</div>
14
            <div class="col-6">
15
                <div class="form-item text" defVal="" name="mobile"></div>
16
            </div>
17
        </div>
18
        <div class="row">
19
            <div class="col-2 item-caption">邮箱</div>
20
            <div class="col-6">
21
                <div class="form-item text" defVal="" name="email"></div>
22
            </div>
23
        </div>
24
        <div class="row">
25
            <div class="col-10"></div>
26
            <div class="col-2">
27
                <div class="btn pull-right opt-save">
28
                    <i class="icon-check"></i> SAVE
29
                </div>
30
31
            </div>
32
        </div>
33
    </div>
34
35
</div>

+ 53 - 0
html/model/sys/userInfo/edu.html

@ -0,0 +1,53 @@
1
<div class="sys_userinfo_edu centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">学校名称</div>
8
            <div class="col-6">
9
                <div class="form-item text" defVal="" name="eduSchool"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption">院系名称</div>
14
            <div class="col-6">
15
                <div class="form-item text" defVal="" name="eduCollege"></div>
16
            </div>
17
        </div>
18
        <div class="row">
19
            <div class="col-2 item-caption">专业名称</div>
20
            <div class="col-6">
21
                <div class="form-item text" defVal="" name="eduMajor"></div>
22
            </div>
23
        </div>
24
        <div class="row">
25
            <div class="col-2 item-caption">学位</div>
26
            <div class="col-6">
27
                <div class="form-item select" dictCode="user_degree" defVal="" name="eduDegree"></div>
28
            </div>
29
        </div>
30
        <div class="row">
31
            <div class="col-2 item-caption ">毕业时间</div>
32
            <div class="col-4">
33
                <div class="form-item date" defVal="" name="eduYear"></div>
34
            </div>
35
            <div class="col-6">
36
                <div class="btn pull-right opt-on">
37
                    <i class="icon-check"></i> 至今在读
38
                </div>
39
            </div>
40
        </div>
41
        <div class="row">
42
            <div class="col-10"></div>
43
            <div class="col-2">
44
                <div class="btn pull-right opt-save">
45
                    <i class="icon-check"></i> SAVE
46
                </div>
47
48
            </div>
49
50
        </div>
51
    </div>
52
53
</div>

+ 36 - 0
html/model/sys/userInfo/honor.html

@ -0,0 +1,36 @@
1
<div class="sys_userinfo_honor centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">奖项名称</div>
8
            <div class="col-6">
9
                <div class="form-item text" defVal="" name="honorName"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption ">获奖时间</div>
14
            <div class="col-4">
15
                <div class="form-item date" defVal="" name="honorYear"></div>
16
            </div>
17
        </div>
18
        <div class="row">
19
            <div class="col-2 item-caption">备注</div>
20
            <div class="col-6">
21
                <div class="form-item textarea" defVal="" name="honorDescp"></div>
22
            </div>
23
        </div>
24
        <div class="row">
25
            <div class="col-10"></div>
26
            <div class="col-2">
27
                <div class="btn pull-right opt-save">
28
                    <i class="icon-check"></i> SAVE
29
                </div>
30
31
            </div>
32
33
        </div>
34
    </div>
35
36
</div>

+ 104 - 0
html/model/sys/userInfo/index.html

@ -0,0 +1,104 @@
1
<div class="sys_userinfo_index" loadUri="../ajax/userinfo/pq" pageSize="10" pageNo="1">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container dt-form">
6
        <div class="row">
7
            <div class="col-2 item-caption">用户名</div>
8
            <div class="col-3">
9
                <div class="form-item text trim " defVal="" name="name"></div>
10
            </div>
11
            <div class="col-1 item-caption">审核状态</div>
12
            <div class="col-5">
13
                <div class="form-item select" dictCode="user_info_state" name="state"></div>
14
            </div>
15
            <div class="col-1"></div>
16
        </div>
17
        <div class="row">
18
            <div class="col-2 item-caption">所在机构</div>
19
            <div class="col-3">
20
                <div class="form-item text trim" defVal="" name="orgName"></div>
21
            </div>
22
            <div class="col-1 item-caption ">创建日期</div>
23
            <div class="col-2">
24
                <div class="form-item date" defVal="" name="bt"></div>
25
            </div>
26
            <div class="col-1 item-caption center">至</div>
27
            <div class="col-2">
28
                <div class="form-item date" defVal="" name="et"></div>
29
            </div>
30
            <div class="col-1"></div>
31
        </div>
32
        <div class="row">
33
            <div class="col-9">
34
            </div>
35
            <div class="col-2">
36
                <div class="btn opt-query pull-right">
37
                    <i class="icon-search"></i> 查询
38
                </div>
39
            </div>
40
            <div class="col-1"></div>
41
        </div>
42
    </div>
43
44
    <div class="container page-split"></div>
45
    <div class="container tpl-btns">
46
        <div class="row">
47
            <div class="btn opt-new">
48
                 新增账户
49
            </div>
50
            <div class="btn opt-edit">
51
                修改账户信息
52
            </div>
53
            <div class="btn opt-details">
54
                编辑用户资料
55
            </div>
56
            <div class="btn opt-check">
57
                提交审核
58
            </div>
59
            <div class="btn opt-del">
60
                删除
61
            </div>
62
        </div>
63
    </div>
64
    <div class="container dt-tpl">
65
        <table class="table table-bordered">
66
            <thead>
67
            <tr>
68
                <th class="opt-check"><i class="icon icon-st-check"></i> </th>
69
                <th>序号</th>
70
                <th>用户名</th>
71
                <th>职称</th>
72
                <th>所在机构</th>
73
                <th>手机</th>
74
                <th>邮箱</th>
75
                <th>创建时间</th>
76
                <th>审核状态</th>
77
                <th>审核人</th>
78
                <th>审核时间</th>
79
            </tr>
80
            </thead>
81
            <tbody>
82
            <tr ch-dir="list">
83
                <td class="opt-check"><i class="icon icon-st-check" userId="{{id}}"></i></td>
84
                <td>{{-_index}}</td>
85
                <td>{{name}}</td>
86
                <td>{{title}}</td>
87
                <td>{{orgName}}</td>
88
                <td>{{mobile}}</td>
89
                <td>{{email}}</td>
90
                <td>{{createTime-date}}</td>
91
                <td class="hand-dict" dict="user_info_state" code="{{state}}"></td>
92
                <td>{{reviewerName}}</td>
93
                <td>{{reviewTime-date}}</td>
94
            </tr>
95
            </tbody>
96
            <tbody ch-dir="array.empty">
97
            <tr>
98
                <td class="empty-desc" colspan="11">表格暂无数据</td>
99
            </tr>
100
            </tbody>
101
        </table>
102
    </div>
103
    <ul class="dt-pager"></ul>
104
</div>

+ 46 - 0
html/model/sys/userInfo/job.html

@ -0,0 +1,46 @@
1
<div class="sys_userinfo_job centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">机构名称</div>
8
            <div class="col-6">
9
                <div class="form-item text" defVal="" name="jobCompany"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption">所在部门</div>
14
            <div class="col-6">
15
                <div class="form-item text" defVal="" name="jobDepartment"></div>
16
            </div>
17
        </div>
18
        <div class="row">
19
            <div class="col-2 item-caption">职位</div>
20
            <div class="col-6">
21
                <div class="form-item text" defVal="" name="jobTitle"></div>
22
            </div>
23
        </div>
24
        <div class="row">
25
            <div class="col-2 item-caption ">任职时间</div>
26
            <div class="col-4">
27
                <div class="form-item date" defVal="" name="jobStart"></div>
28
            </div>
29
            <div class="col-1 item-caption center">至</div>
30
            <div class="col-4">
31
                <div class="form-item date" defVal="" name="jobStop"></div>
32
            </div>
33
        </div>
34
        <div class="row">
35
            <div class="col-10"></div>
36
            <div class="col-2">
37
                <div class="btn pull-right opt-save">
38
                    <i class="icon-check"></i> SAVE
39
                </div>
40
41
            </div>
42
43
        </div>
44
    </div>
45
46
</div>

+ 35 - 0
html/model/sys/userInfo/new.html

@ -0,0 +1,35 @@
1
<div class="sys_userinfo_new centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">手机</div>
8
            <div class="col-6">
9
                <div class="form-item text" defVal="" name="mobile"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption">邮箱</div>
14
            <div class="col-6">
15
                <div class="form-item text" defVal="" name="email"></div>
16
            </div>
17
        </div>
18
        <div class="row">
19
            <div class="col-2 item-caption">用户名</div>
20
            <div class="col-6">
21
                <div class="form-item text required" defVal="" name="name"></div>
22
            </div>
23
        </div>
24
        <div class="row">
25
            <div class="col-10"></div>
26
            <div class="col-2">
27
                <div class="btn pull-right opt-save">
28
                    <i class="icon-check"></i> SAVE
29
                </div>
30
31
            </div>
32
        </div>
33
    </div>
34
35
</div>

+ 38 - 0
html/model/sys/userInfo/project.html

@ -0,0 +1,38 @@
1
<div class="sys_userinfo_project centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">项目名称</div>
8
            <div class="col-6">
9
                <div class="form-item text" defVal="" name="projectName"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption ">项目时间</div>
14
            <div class="col-4">
15
                <div class="form-item date" defVal="" name="projectStart"></div>
16
            </div>
17
            <div class="col-1 item-caption center">至</div>
18
            <div class="col-4">
19
                <div class="form-item date" defVal="" name="projectStop"></div>
20
            </div>
21
        </div>
22
        <div class="row">
23
            <div class="col-2 item-caption">备注</div>
24
            <div class="col-6">
25
                <div class="form-item textarea" defVal="" name="projectDescp"></div>
26
            </div>
27
        </div>
28
        <div class="row">
29
            <div class="col-10"></div>
30
            <div class="col-2">
31
                <div class="btn pull-right opt-save">
32
                    <i class="icon-check"></i> SAVE
33
                </div>
34
            </div>
35
        </div>
36
    </div>
37
38
</div>

+ 47 - 0
html/model/sys/userInfo/review.html

@ -0,0 +1,47 @@
1
<div class="sys_userinfo_review centerModal">
2
    <div class="modal-ctrl">
3
        <i class="icon icon-times"></i>
4
    </div>
5
    <div class="container newForm">
6
        <div class="row">
7
            <div class="col-2 item-caption">审核状态</div>
8
            <div class="col-6">
9
                <div class="form-item select" defVal="" dictCode="user_info_state_review" name="state"></div>
10
            </div>
11
        </div>
12
        <div class="row">
13
            <div class="col-2 item-caption">用户身份</div>
14
            <div class="col-6">
15
                <div class="form-item select" defVal="" dictCode="authentication" name="authentication"></div>
16
            </div>
17
        </div>
18
        <div class="row">
19
            <div class="col-2 item-caption">实名认证</div>
20
            <div class="col-6">
21
                <div class="form-item select" defVal="" dictCode="auth_status" name="authStatus"></div>
22
            </div>
23
        </div>
24
        <div class="row">
25
            <div class="col-2 item-caption">专家认证</div>
26
            <div class="col-6">
27
                <div class="form-item select" defVal="" dictCode="auth_status" name="authStatusExpert"></div>
28
            </div>
29
        </div>
30
        <div class="row">
31
            <div class="col-2 item-caption">权重值</div>
32
            <div class="col-6">
33
                <div class="form-item text" defVal="" name="sortFirst"></div>
34
            </div>
35
        </div>
36
        <div class="row">
37
            <div class="col-10"></div>
38
            <div class="col-2">
39
                <div class="btn pull-right opt-save">
40
                    <i class="icon-check"></i> SAVE
41
                </div>
42
43
            </div>
44
        </div>
45
    </div>
46
47
</div>

+ 6 - 1
js/model/sys/role/index.js

@ -17,7 +17,12 @@ spa_define(function() {
17 17
							btns: [{
18 18
									caption: "删除",
19 19
									hand: function() {
20
										util.del("../ajax/sys/role/" + resId, load, {});
20
										util.post("../ajax/sys/role/" + resId, null,function (data) {
21
                                            if (data==0) {
22
                                                util.alert("该角色使用中,不可删除");
23
                                            }
24
                                            load();
25
                                        });
21 26
									}
22 27
								},
23 28
								{ caption: "取消" }

+ 88 - 0
js/model/sys/userInfo/check.js

@ -0,0 +1,88 @@
1
/**
2
 * Created by TT on 2017/7/12.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "pagedatagrid", "util"], function (spa, pdgf, util) {
7
        return {
8
            main: function () {
9
                var root = spa.findInMain(".sys_userinfo_check");
10
                var pdg = pdgf.build(root);
11
                root.find(".opt-query").on("click", function () {
12
                    pdg.load();
13
                });
14
                root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () {
15
                    var $this = $(this);
16
                    $this.toggleClass("checked");
17
                    if ($this.hasClass("checked")) {
18
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
19
                    } else {
20
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
21
                    }
22
                });
23
                root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () {
24
                    var $this = $(this);
25
                    $this.toggleClass("checked");
26
                });
27
                root.find(".opt-examine").on("click", function () {
28
                    var $org = root.find("td.opt-check>i.checked");
29
                    if ($org.length) {
30
                        if ($org.length > 1) {
31
                            util.alert("只能选择一个用户");
32
                        } else {
33
                            util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) {
34
                                if (data) {
35
                                        spa.showModal("sys_userinfo_examine", {
36
                                            data: data, hand: function () {
37
                                                pdg.load()
38
                                            }
39
                                        })
40
                                } else {
41
                                    util.alert("用户不存在了", function () {
42
                                        pdg.load();
43
                                    });
44
                                }
45
                            }, {});
46
                        }
47
                    } else {
48
                        util.alert("请选择一个用户");
49
                    }
50
                });
51
                root.find(".opt-review").on("click", function () {
52
                    var $check = root.find("td.opt-check>i.checked");
53
                    if ($check.length) {
54
                        if ($check.length > 1) {
55
                            util.alert("只能选择一个用户")
56
                        } else {
57
                            util.get("../ajax/userinfo/id/" + $check.attr("userId"), null, function (data) {
58
                                if (data) {
59
                                    if (data.state == "2") {
60
                                        spa.showModal("sys_userinfo_review", {
61
                                            data: data, hand: function () {
62
                                                pdg.load()
63
                                            }
64
                                        })
65
                                    } else {
66
                                        util.alert("只有待审核的可以点击");
67
                                    }
68
                                } else {
69
                                    util.alert("用户不存在了", function () {
70
                                        pdg.load();
71
                                    });
72
                                }
73
                            });
74
                        }
75
                    } else {
76
                        util.alert("请选择一名专家");
77
                    }
78
                });
79
                pdg.code.listen($.dict.doTransfer);
80
                pdg.load();
81
82
            },
83
            mainDestory: function () {
84
85
            },
86
        };
87
    });
88
});

+ 493 - 0
js/model/sys/userInfo/details.js

@ -0,0 +1,493 @@
1
/**
2
 * Created by TT on 2017/7/7.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form", "code"], function (spa, util, fb, code) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_details");
10
                var ca = {ready: true, items: []};
11
                var dp = code.parseCode(root.find(".dt-project"));
12
                var dh = code.parseCode(root.find(".dt-honor"));
13
                var dj = code.parseCode(root.find(".dt-job"));
14
                var de = code.parseCode(root.find(".dt-edu"));
15
                var form = fb.build(root.find(".newForm"), {
16
                    industryList: ca,
17
                    subjectList: ca,
18
                    researchAreaList: ca
19
                });
20
                var oValue;
21
                var oJudge;
22
                var trim = function (str) { //删除左右两端的空格			  
23
                    return str.replace(/(^\s*)|(\s*$)/g, "");
24
                };
25
                var saveBtn = root.find(".opt-save"),
26
                    save = function () {
27
                        form.val({
28
                            industry: oString(form.val().industryList),
29
                            subject: oString(form.val().subjectList),
30
                            researchArea: form.val().researchAreaList,
31
                            subjectList: "", industryList: "", researchAreaList: ""
32
                        });
33
                        if (form.val().title) {
34
                            var title = trim(form.val().title);
35
                            if (title.length > 20) {
36
                                util.alert("职称不得超过20个字");
37
                                return;
38
                            }
39
                        }
40
                        if (form.val().office) {
41
                            var office = trim(form.val().office);
42
                            if (office.length > 20) {
43
                                util.alert("职位不得超过20个字");
44
                                return;
45
                            }
46
                        }
47
                        if (form.val().orgName) {
48
                            var orgName = trim(form.val().orgName);
49
                            if (orgName.length > 50) {
50
                                util.alert("所在机构不得超过50个字");
51
                                return;
52
                            }
53
                        }
54
                        if (form.val().department) {
55
                            var department = trim(form.val().department);
56
                            if (department.length > 20) {
57
                                util.alert("所在部门不得超过20个字");
58
                                return;
59
                            }
60
                        }
61
                        if (form.val().descp) {
62
                            var descp = trim(form.val().descp);
63
                            if (descp.length > 500) {
64
                                util.alert("个人简介不得超过500个字");
65
                            }
66
                        }
67
                        if (form.val().mobile) {
68
                            var mobile = trim(form.val().mobile);
69
                            if (trim(mobile)) {
70
                                if (mobile.length > 50) {
71
                                    util.alert('提示', '联系电话不得超过50个字');
72
                                    return;
73
                                }
74
                            }
75
                        }
76
                        if (form.val().email) {
77
                            var email = trim(form.val().email);
78
                            var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
79
                            if (!gunf.test(email)) {
80
                                util.alert("联系邮箱格式有误,请检查后重新填写");
81
                                return;
82
                            }
83
                        }
84
                        if (form.val().name) {
85
                            var name = trim(form.val().name);
86
                            if (name.length > 10) {
87
                                util.alert("姓名最长为10个字");
88
                                return;
89
                            }
90
                        }
91
                        if (form.val().name == null) {
92
                            util.alert("请输入专家姓名");
93
                        } else if (form.val().mobile || form.val().email) {
94
                            form.doPut("../ajax/userinfo/update", function () {
95
                                spa.closeModal();
96
                                if (data.hand) {
97
                                    data.hand();
98
                                }
99
                            }, function (data) {
100
                                util.alert(data.msg);
101
                            });
102
                        } else {
103
                            util.alert("手机或邮箱至少输入一项");
104
                        }
105
                    };
106
                var part = function (one, list) {
107
                    oValue = one;
108
                    oJudge = list || [];
109
                    var repeat,
110
                        b;
111
                    if (!oValue) {
112
                        util.alert('提示', '请先填写内容');
113
                        return;
114
                    }
115
                    if (oValue.length > 10) {
116
                        util.alert('提示', '添加内容不能超过10个字');
117
                        return;
118
                    } else {
119
                        var oValueList = oValue.split(","),
120
                            length = oValueList.length;
121
                        for (var j = 0; j < length; j++) {
122
                            for (var n = j + 1; n < oValueList.length + 1;) {
123
                                if (oValueList[j] == oValueList[n]) {
124
                                    oValueList.remove(n);
125
                                    repeat = false;
126
                                } else {
127
                                    n++;
128
                                }
129
                            }
130
                        }
131
                        for (var j = 0; j < oValueList.length;) {
132
                            for (var i = 0; i < oJudge.length; i++) {
133
                                if (oValueList[j] == oJudge[i]) {
134
                                    oValueList.remove(j);
135
                                    repeat = false;
136
                                    b = true;
137
                                }
138
                            }
139
                            if (b) {
140
                                b = false
141
                            } else j++;
142
                        }
143
                        if (repeat == false) {
144
                            util.alert('提示', '添加内容不能重复');
145
                        }
146
                        for (var m = 0; m < oValueList.length; m++) {
147
                            ca.items.push({code: oValueList[m], caption: oValueList[m]});
148
                            oJudge.push(oValueList[m]);
149
                        }
150
                    }
151
                };
152
153
                var part2 = function (one, list) {
154
                    oValue = one;
155
                    oJudge = list || [];
156
                    var repeat,
157
                        b;
158
                    if (!oValue) {
159
                        util.alert('提示', '请先填写内容');
160
                        return;
161
                    }
162
                    if (oValue.length > 20) {
163
                        util.alert('提示', '添加内容不能超过20个字');
164
                        return;
165
                    } else {
166
                        var oValueList = oValue.split(","),
167
                            length = oValueList.length;
168
                        for (var j = 0; j < length; j++) {
169
                            for (var n = j + 1; n < oValueList.length + 1;) {
170
                                if (oValueList[j] == oValueList[n]) {
171
                                    oValueList.remove(n);
172
                                    repeat = false;
173
                                } else {
174
                                    n++;
175
                                }
176
                            }
177
                        }
178
                        for (var j = 0; j < oValueList.length;) {
179
                            for (var i = 0; i < oJudge.length; i++) {
180
                                if (oValueList[j] == oJudge[i]) {
181
                                    oValueList.remove(j);
182
                                    repeat = false;
183
                                    b = true;
184
                                }
185
                            }
186
                            if (b) {
187
                                b = false
188
                            } else j++;
189
                        }
190
                        if (repeat == false) {
191
                            util.alert('提示', '添加内容不能重复');
192
                        }
193
                        for (var m = 0; m < oValueList.length; m++) {
194
                            ca.items.push({code: oValueList[m], caption: oValueList[m]});
195
196
                            oJudge.push(oValueList[m]);
197
                        }
198
                    }
199
                };
200
201
                var split = function (data) {
202
                    var index = data.split(",");
203
                    var arr = [];
204
                    for (var m = 0; m < index.length; m++) {
205
                        ca.items.push({code: index[m], caption: index[m]});
206
                        arr.push(index[m]);
207
                    }
208
                    return arr;
209
                };
210
211
                var split2 = function (data) {
212
                    var arr = [];
213
                    for (var m = 0; m < data.length; m++) {
214
                        ca.items.push({code: data[m], caption: data[m]});
215
                        arr.push(data[m]);
216
                    }
217
                    return arr;
218
                };
219
220
                if (data.data.industry) {
221
                    form.val({industryList: split(data.data.industry)});
222
                }
223
                if (data.data.subject) {
224
                    form.val({subjectList: split(data.data.subject)});
225
                }
226
                if (data.data.researchArea) {
227
                    form.val({researchAreaList: split2(data.data.researchArea)});
228
                }
229
230
231
                Array.prototype.remove = function (obj) {
232
                    for (var i = 0; i < this.length; i++) {
233
                        var temp = this[i];
234
                        if (!isNaN(obj)) {
235
                            temp = i;
236
                        }
237
                        if (temp == obj) {
238
                            for (var j = i; j < this.length; j++) {
239
                                this[j] = this[j + 1];
240
                            }
241
                            this.length = this.length - 1;
242
                        }
243
                    }
244
                };
245
                function oString(data) {
246
                    var arry = new Array();
247
                    if (data) {
248
                        for (var i = 0; i < data.length; i++) {
249
                            arry.push(data[i]);
250
                        }
251
                    }
252
                    return arry.join(",");
253
                }
254
255
                root.find(".opt-industry").on("click", function () {
256
                    part(form.val().newIndustry, form.val().industryList);
257
                    form.val({newIndustry: "", industryList: oJudge});
258
                });
259
                root.find(".opt-subject").on("click", function () {
260
                    part(form.val().newSubject, form.val().subjectList);
261
                    form.val({newSubject: "", subjectList: oJudge});
262
                });
263
                root.find(".opt-ra").on("click", function () {
264
                    part2(form.val().newResearchArea, form.val().researchAreaList);
265
                    form.val({newResearchArea: "", researchAreaList: oJudge});
266
                });
267
                root.find(".modal-ctrl .icon-times").on("click", function () {
268
                    spa.closeModal();
269
                });
270
                root.find(".opt-project-new").on("click", function () {
271
                    spa.showModal("sys_userinfo_project_new", {
272
                        data: data.data.projects, hand: function () {
273
                            dp.val(data.data.projects);
274
                        }
275
                    });
276
                });
277
                root.on("click", ".opt-project-edit", function () {
278
                    var pNo = $(this).parent().attr("pNo");
279
                    spa.showModal("sys_userinfo_project_edit", {
280
                        data: data.data.projects[pNo], hand: function () {
281
                            dp.val(data.data.projects);
282
                        }
283
                    })
284
                });
285
                root.on("click", ".opt-project-del", function () {
286
                    var pNo = $(this).parent().attr("pNo");
287
                    if (pNo) {
288
                        util.boxMsg({
289
                            title: "确认删除",
290
                            content: "确认删除该项目经历?",
291
                            btns: [{
292
                                caption: "删除",
293
                                hand: function () {
294
                                    data.data.projects.remove(pNo);
295
                                    data.data.projects = data.data.projects || [];
296
                                    for (var i = 0; i < data.data.projects.length; ++i) {
297
                                        data.data.projects[i].no = i;
298
                                    }
299
                                    dp.val(data.data.projects);
300
                                    console.log(data.data.projects);
301
                                }
302
                            },
303
                                {caption: "取消"}
304
                            ]
305
                        });
306
                    } else {
307
                        util.alert("该项目经历不存在");
308
                    }
309
                });
310
                root.find(".opt-honor-new").on("click", function () {
311
                    spa.showModal("sys_userinfo_honor_new", {
312
                        data: data.data.honors, hand: function () {
313
                            dh.val(data.data.honors);
314
                        }
315
                    })
316
                });
317
                root.on("click", ".opt-honor-edit", function () {
318
                    var hNo = $(this).parent().attr("hNo");
319
                    spa.showModal("sys_userinfo_honor_edit", {
320
                        data: data.data.honors[hNo], hand: function () {
321
                            dh.val(data.data.honors);
322
                        }
323
                    })
324
                });
325
                root.on("click", ".opt-honor-del", function () {
326
                    var hNo = $(this).parent().attr("hNo");
327
                    if (hNo) {
328
                        util.boxMsg({
329
                            title: "确认删除",
330
                            content: "确认删除该荣誉奖项?",
331
                            btns: [{
332
                                caption: "删除",
333
                                hand: function () {
334
                                    data.data.honors.remove(hNo);
335
                                    data.data.honors = data.data.honors || [];
336
                                    for (var i = 0; i < data.data.honors.length; ++i) {
337
                                        data.data.honors[i].no = i;
338
                                    }
339
                                    dh.val(data.data.honors);
340
                                    console.log(data.data.honors);
341
                                }
342
                            },
343
                                {caption: "取消"}
344
                            ]
345
                        });
346
                    } else {
347
                        util.alert("该荣誉奖项不存在");
348
                    }
349
                });
350
                root.find(".opt-job-new").on("click", function () {
351
                    spa.showModal("sys_userinfo_job_new", {
352
                        data: data.data.jobs, hand: function () {
353
                            dj.val(data.data.jobs);
354
                        }
355
                    });
356
                });
357
                root.on("click", ".opt-job-edit", function () {
358
                    var jNo = $(this).parent().attr("jNo");
359
                    spa.showModal("sys_userinfo_job_edit", {
360
                        data: data.data.jobs[jNo], hand: function () {
361
                            dj.val(data.data.jobs);
362
                        }
363
                    })
364
                });
365
                root.on("click", ".opt-job-del", function () {
366
                    var jNo = $(this).parent().attr("jNo");
367
                    if (jNo) {
368
                        util.boxMsg({
369
                            title: "确认删除",
370
                            content: "确认删除该工作经历?",
371
                            btns: [{
372
                                caption: "删除",
373
                                hand: function () {
374
                                    data.data.jobs.remove(jNo);
375
                                    data.data.jobs = data.data.jobs || [];
376
                                    for (var i = 0; i < data.data.jobs.length; ++i) {
377
                                        data.data.jobs[i].no = i;
378
                                    }
379
                                    dj.val(data.data.jobs);
380
                                    console.log(data.data.jobs);
381
                                }
382
                            },
383
                                {caption: "取消"}
384
                            ]
385
                        });
386
                    } else {
387
                        util.alert("该工作经历不存在");
388
                    }
389
                });
390
                root.find(".opt-edu-new").on("click", function () {
391
                    spa.showModal("sys_userinfo_edu_new", {
392
                        data: data.data.edus, hand: function () {
393
                            de.val(data.data.edus);
394
                        }
395
                    });
396
                });
397
                root.on("click", ".opt-edu-edit", function () {
398
                    var eNo = $(this).parent().attr("eNo");
399
                    spa.showModal("sys_userinfo_edu_edit", {
400
                        data: data.data.edus[eNo], hand: function () {
401
                            de.val(data.data.edus);
402
                        }
403
                    })
404
                });
405
                root.on("click", ".opt-edu-del", function () {
406
                    var eNo = $(this).parent().attr("eNo");
407
                    if (eNo) {
408
                        util.boxMsg({
409
                            title: "确认删除",
410
                            content: "确认删除该工作经历?",
411
                            btns: [{
412
                                caption: "删除",
413
                                hand: function () {
414
                                    data.data.edus.remove(eNo);
415
                                    data.data.edus = data.data.edus || [];
416
                                    for (var i = 0; i < data.data.edus.length; ++i) {
417
                                        data.data.edus[i].no = i;
418
                                    }
419
                                    de.val(data.data.edus);
420
                                    console.log(data.data.edus);
421
                                }
422
                            },
423
                                {caption: "取消"}
424
                            ]
425
                        });
426
                    } else {
427
                        util.alert("该工作经历不存在");
428
                    }
429
                });
430
                $.fn.citySelect();
431
                $(document).on("click", "#City li a", function () {
432
                    var aVal = $(this).text();
433
                    $(this).parent().parent().parent().find('.mr_show').text(aVal);
434
                    $(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
435
                    if ($("#ocity").text() == "请选择城市") {
436
                        $("#ocity").removeClass("mr_select");
437
                    } else {
438
                        $("#ocity").addClass("mr_select");
439
                    }
440
                    if ($("#oprovince").text() != "请选择省份") {
441
                        form.val({province: $("#oprovince").text()});
442
                    }
443
                    if ($("#ocity").text() != "请选择城市") {
444
                        form.val({address: $("#ocity").text()});
445
                    }
446
447
                });
448
449
                if (data.data.province) {
450
                    $("#oprovince").text(data.data.province);
451
                }
452
                if (data.data.address) {
453
                    $("#ocity").text(data.data.address);
454
                }
455
                saveBtn.on("click", function () {
456
                    save();
457
                });
458
459
                data.data.projects = data.data.projects || [];
460
                for (var i = 0; i < data.data.projects.length; ++i) {
461
                    data.data.projects[i].no = i;
462
                }
463
                dp.val(data.data.projects);
464
465
                data.data.honors = data.data.honors || [];
466
                for (var i = 0; i < data.data.honors.length; ++i) {
467
                    data.data.honors[i].no = i;
468
                }
469
                dh.val(data.data.honors);
470
471
                data.data.jobs = data.data.jobs || [];
472
                for (var i = 0; i < data.data.jobs.length; ++i) {
473
                    data.data.jobs[i].no = i;
474
                }
475
                dj.val(data.data.jobs);
476
477
                data.data.edus = data.data.edus || [];
478
                for (var i = 0; i < data.data.edus.length; ++i) {
479
                    data.data.edus[i].no = i;
480
                }
481
                de.val(data.data.edus);
482
483
                if (!form.val().pMobile) {
484
                    form.val({pMobile: data.data.mobile})
485
                }
486
                if (!form.val().pEmail) {
487
                    form.val({pEmail: data.data.email})
488
                }
489
                form.val(data.data);
490
            }
491
        }
492
    });
493
});

+ 81 - 0
js/model/sys/userInfo/edit.js

@ -0,0 +1,81 @@
1
/**
2
 * Created by TT on 2017/7/7.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_edit");
10
                var form = fb.build(root.find(".newForm"));
11
                var trim = function (str) {
12
                    return str.replace(/(^\s*)|(\s*$)/g, "");
13
                };
14
                var saveBtn = root.find(".opt-save"),
15
                    save = function () {
16
                        if (form.val().mobile) {
17
                            var mobile = trim(form.val().mobile);
18
                            var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
19
                            if (!hunPhone.test(mobile)) {
20
                                util.alert("联系电话格式有误,请检查后重新填写");
21
                                return;
22
                            }
23
                        }
24
                        if (form.val().email) {
25
                            var email = trim(form.val().email);
26
                            var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
27
                            if (!gunf.test(email)) {
28
                                util.alert("联系邮箱格式有误,请检查后重新填写");
29
                                return;
30
                            }
31
                        }
32
                        if (form.val().name) {
33
                            var name = trim(form.val().name);
34
                            if (name.length > 10) {
35
                                util.alert("姓名最长为10个字");
36
                                return;
37
                            }
38
                        } else {
39
                            util.alert("请填写用户名");
40
                            return;
41
                        }
42
                        if (form.val().mobile || form.val().email) {
43
                            if (form.val().mobile != data.data.mobile || form.val().email != data.data.email) {
44
                                util.get("../ajax/userinfo/entryCheck", {
45
                                    mobile: form.val().mobile,
46
                                    email: form.val().email
47
                                }, function (success) {
48
                                    if (success) {
49
                                        form.doPut("../ajax/userinfo/update", function () {
50
                                            spa.closeModal();
51
                                            if (data.hand) {
52
                                                data.hand();
53
                                            }
54
                                        }, {});
55
                                    } else {
56
                                        util.alert("该账号已存在");
57
                                    }
58
                                });
59
                            } else {
60
                                form.doPut("../ajax/userinfo/update", closeThis, {});
61
                            }
62
                        } else {
63
                            util.alert("手机或邮箱至少输入一项");
64
                        }
65
                    };
66
                root.find(".modal-ctrl .icon-times").on("click", function () {
67
                    spa.closeModal();
68
                });
69
                var handler = data.hand;
70
                var closeThis = function () {
71
                    spa.closeModal();
72
                    if (handler) {
73
                        handler();
74
                    }
75
                };
76
                form.val(data.data);
77
                saveBtn.on("click", save);
78
            }
79
        };
80
    })
81
});

+ 67 - 0
js/model/sys/userInfo/eduEdit.js

@ -0,0 +1,67 @@
1
/**
2
 * Created by TT on 2017/7/11.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_edu");
10
                var form = fb.build(root.find(".newForm"));
11
                var saveBtn = root.find(".opt-save"),
12
                    save = function () {
13
                        if (form.val().eduSchool) {
14
                            var eduSchool = trim(form.val().eduSchool);
15
                            if (eduSchool.length > 50) {
16
                                util.alert("学校名称不得超过50个字");
17
                                return;
18
                            }
19
                            data.data.eduSchool = eduSchool;
20
                        } else {
21
                            util.alert("请填写学校名称");
22
                            return;
23
                        }
24
                        if (form.val().eduCollege) {
25
                            var eduCollege = trim(form.val().eduCollege);
26
                            if (eduCollege.length > 20) {
27
                                util.alert("项目描述不得超过20个字");
28
                                return;
29
                            }
30
                            data.data.eduCollege = eduCollege;
31
                        } else {
32
                            data.data.eduCollege = "";
33
                        }
34
                        if (form.val().eduMajor) {
35
                            var eduMajor = trim(form.val().eduMajor);
36
                            if (eduMajor.length > 20) {
37
                                util.alert("项目描述不得超过20个字");
38
                                return;
39
                            }
40
                            data.data.eduMajor = eduMajor;
41
                        } else {
42
                            data.data.eduMajor = ""
43
                        }
44
                        if (form.val().eduYear) {
45
                            data.data.eduYear = form.val().eduYear.substring(0, 4);
46
                        } else {
47
                            data.data.eduYear = "";
48
                        }
49
                        data.data.eduDegree = form.val().eduDegree;
50
                        data.hand();
51
                        spa.closeModal();
52
                    };
53
                root.find(".modal-ctrl .icon-times").on("click", function () {
54
                    spa.closeModal();
55
                });
56
                root.find(".opt-on").on("click", function () {
57
                    form.val({eduYear: "至今"})
58
                });
59
                saveBtn.on("click", save);
60
                form.val(data.data);
61
                function trim(str) { //删除左右两端的空格			  
62
                    return str.replace(/(^\s*)|(\s*$)/g, "");
63
                }
64
            }
65
        }
66
    });
67
});

+ 59 - 0
js/model/sys/userInfo/eduNew.js

@ -0,0 +1,59 @@
1
/**
2
 * Created by TT on 2017/7/11.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_edu");
10
                var form = fb.build(root.find(".newForm"));
11
                var saveBtn = root.find(".opt-save"),
12
                    save = function () {
13
                        if (form.val().eduSchool) {
14
                            var eduSchool = trim(form.val().eduSchool);
15
                            if (eduSchool.length > 50) {
16
                                util.alert("学校名称不得超过50个字");
17
                                return;
18
                            }
19
                        } else {
20
                            util.alert("请填写学校名称");
21
                            return;
22
                        }
23
                        if (form.val().eduCollege) {
24
                            var eduCollege = trim(form.val().eduCollege);
25
                            if (eduCollege.length > 20) {
26
                                util.alert("项目描述不得超过20个字");
27
                                return;
28
                            }
29
                        }
30
                        if (form.val().eduMajor) {
31
                            var eduMajor = trim(form.val().eduMajor);
32
                            if (eduMajor.length > 20) {
33
                                util.alert("项目描述不得超过20个字");
34
                                return;
35
                            }
36
                        }
37
                        if (form.val().eduYear) {
38
                            form.val({eduYear: form.val().eduYear.substring(0, 4)});
39
                        }
40
                        var item = form.val();
41
                        item.no = data.data.length;
42
                        data.data.push(item);
43
                        data.hand();
44
                        spa.closeModal();
45
                    };
46
                root.find(".modal-ctrl .icon-times").on("click", function () {
47
                    spa.closeModal();
48
                });
49
                root.find(".opt-on").on("click", function () {
50
                    form.val({eduYear: "至今"})
51
                });
52
                saveBtn.on("click", save);
53
                function trim(str) { //删除左右两端的空格			  
54
                    return str.replace(/(^\s*)|(\s*$)/g, "");
55
                }
56
            }
57
        }
58
    });
59
});

+ 505 - 0
js/model/sys/userInfo/examine.js

@ -0,0 +1,505 @@
1
/**
2
 * Created by TT on 2017/7/12.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form", "code"], function (spa, util, fb, code) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_details");
10
                $(".sys_userinfo_details .city").html('<div class="col-4"> <div class="form-item text" defVal="" name="province"></div> </div>' +
11
                    '<div class="col-4"> <div class="form-item text" defVal="" name="address"></div> </div>');
12
                $(".sys_userinfo_details .me").after('<div class="row me"> ' +
13
                    '<div class="col-2 item-caption">注册电话</div> ' +
14
                    '<div class="col-4"> ' +
15
                    '<div class="form-item text" defVal="" name="mobile"></div> ' +
16
                    '</div> ' +
17
                    '<div class="col-2 item-caption">注册邮箱</div> ' +
18
                    '<div class="col-4"> ' +
19
                    '<div class="form-item text" defVal="" name="email"></div> ' +
20
                    '</div> ' +
21
                    '</div>');
22
                $(".sys_userinfo_details .form-item").addClass("readOnly");
23
                $(".sys_userinfo_details .btn").hide();
24
                var id = util.data("loginUser").id;
25
                var ca = {ready: true, items: []};
26
                var dp = code.parseCode(root.find(".dt-project"));
27
                var dh = code.parseCode(root.find(".dt-honor"));
28
                var dj = code.parseCode(root.find(".dt-job"));
29
                var de = code.parseCode(root.find(".dt-edu"));
30
                var form = fb.build(root.find(".newForm"), {
31
                    industryList: ca,
32
                    subjectList: ca,
33
                    researchAreaList: ca
34
                });
35
                var oValue;
36
                var oJudge;
37
                var trim = function (str) { //删除左右两端的空格			  
38
                    return str.replace(/(^\s*)|(\s*$)/g, "");
39
                };
40
                var saveBtn = root.find(".opt-save"),
41
                    save = function () {
42
                        form.val({cuserId: id, professorState: 2, authentication: 1});
43
                        form.val({
44
                            industry: oString(form.val().industryList),
45
                            subject: oString(form.val().subjectList),
46
                            researchArea: form.val().researchAreaList,
47
                            subjectList: "", industryList: "", researchAreaList: ""
48
                        });
49
                        if (form.val().orgType == null) {
50
                            form.val({orgType: 1});
51
                        }
52
                        if (form.val().title) {
53
                            var title = trim(form.val().title);
54
                            if (title.length > 20) {
55
                                util.alert("职称不得超过20个字");
56
                                return;
57
                            }
58
                        }
59
                        if (form.val().office) {
60
                            var office = trim(form.val().office);
61
                            if (office.length > 20) {
62
                                util.alert("职位不得超过20个字");
63
                                return;
64
                            }
65
                        }
66
                        if (form.val().orgName) {
67
                            var orgName = trim(form.val().orgName);
68
                            if (orgName.length > 50) {
69
                                util.alert("所在机构不得超过50个字");
70
                                return;
71
                            }
72
                        }
73
                        if (form.val().department) {
74
                            var department = trim(form.val().department);
75
                            if (department.length > 20) {
76
                                util.alert("所在部门不得超过20个字");
77
                                return;
78
                            }
79
                        }
80
                        if (form.val().descp) {
81
                            var descp = trim(form.val().descp);
82
                            if (descp.length > 500) {
83
                                util.alert("个人简介不得超过500个字");
84
                            }
85
                        }
86
                        if (form.val().mobile) {
87
                            var mobile = trim(form.val().mobile);
88
                            var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
89
                            if (!hunPhone.test(mobile)) {
90
                                util.alert("联系电话格式有误,请检查后重新填写");
91
                                return;
92
                            }
93
                        }
94
                        if (form.val().email) {
95
                            var email = trim(form.val().email);
96
                            var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
97
                            if (!gunf.test(email)) {
98
                                util.alert("联系邮箱格式有误,请检查后重新填写");
99
                                return;
100
                            }
101
                        }
102
                        if (form.val().name) {
103
                            var name = trim(form.val().name);
104
                            if (name.length > 10) {
105
                                util.alert("姓名最长为10个字");
106
                                return;
107
                            }
108
                        }
109
                        if (form.val().name == null) {
110
                            util.alert("请输入专家姓名");
111
                        } else if (form.val().mobile || form.val().email) {
112
                            form.doPut("../ajax/userinfo/update", function () {
113
                                spa.closeModal();
114
                                if (data.hand) {
115
                                    data.hand();
116
                                }
117
                            }, function (data) {
118
                                util.alert(data.msg);
119
                            });
120
                        } else {
121
                            util.alert("手机或邮箱至少输入一项");
122
                        }
123
                    };
124
                var part = function (one, list) {
125
                    oValue = one;
126
                    oJudge = list || [];
127
                    var repeat,
128
                        b;
129
                    if (!oValue) {
130
                        util.alert('提示', '请先填写内容');
131
                        return;
132
                    }
133
                    if (oValue.length > 10) {
134
                        util.alert('提示', '添加内容不能超过10个字');
135
                        return;
136
                    } else {
137
                        var oValueList = oValue.split(","),
138
                            length = oValueList.length;
139
                        for (var j = 0; j < length; j++) {
140
                            for (var n = j + 1; n < oValueList.length + 1;) {
141
                                if (oValueList[j] == oValueList[n]) {
142
                                    oValueList.remove(n);
143
                                    repeat = false;
144
                                } else {
145
                                    n++;
146
                                }
147
                            }
148
                        }
149
                        for (var j = 0; j < oValueList.length;) {
150
                            for (var i = 0; i < oJudge.length; i++) {
151
                                if (oValueList[j] == oJudge[i]) {
152
                                    oValueList.remove(j);
153
                                    repeat = false;
154
                                    b = true;
155
                                }
156
                            }
157
                            if (b) {
158
                                b = false
159
                            } else j++;
160
                        }
161
                        if (repeat == false) {
162
                            util.alert('提示', '添加内容不能重复');
163
                        }
164
                        for (var m = 0; m < oValueList.length; m++) {
165
                            ca.items.push({code: oValueList[m], caption: oValueList[m]});
166
                            oJudge.push(oValueList[m]);
167
                        }
168
                    }
169
                };
170
171
                var part2 = function (one, list) {
172
                    oValue = one;
173
                    oJudge = list || [];
174
                    var repeat,
175
                        b;
176
                    if (!oValue) {
177
                        util.alert('提示', '请先填写内容');
178
                        return;
179
                    }
180
                    if (oValue.length > 20) {
181
                        util.alert('提示', '添加内容不能超过20个字');
182
                        return;
183
                    } else {
184
                        var oValueList = oValue.split(","),
185
                            length = oValueList.length;
186
                        for (var j = 0; j < length; j++) {
187
                            for (var n = j + 1; n < oValueList.length + 1;) {
188
                                if (oValueList[j] == oValueList[n]) {
189
                                    oValueList.remove(n);
190
                                    repeat = false;
191
                                } else {
192
                                    n++;
193
                                }
194
                            }
195
                        }
196
                        for (var j = 0; j < oValueList.length;) {
197
                            for (var i = 0; i < oJudge.length; i++) {
198
                                if (oValueList[j] == oJudge[i]) {
199
                                    oValueList.remove(j);
200
                                    repeat = false;
201
                                    b = true;
202
                                }
203
                            }
204
                            if (b) {
205
                                b = false
206
                            } else j++;
207
                        }
208
                        if (repeat == false) {
209
                            util.alert('提示', '添加内容不能重复');
210
                        }
211
                        for (var m = 0; m < oValueList.length; m++) {
212
                            ca.items.push({code: oValueList[m], caption: oValueList[m]});
213
214
                            oJudge.push(oValueList[m]);
215
                        }
216
                    }
217
                };
218
219
                var split = function (data) {
220
                    var index = data.split(",");
221
                    var arr = [];
222
                    for (var m = 0; m < index.length; m++) {
223
                        ca.items.push({code: index[m], caption: index[m]});
224
                        arr.push(index[m]);
225
                    }
226
                    return arr;
227
                };
228
229
                var split2 = function (data) {
230
                    var arr = [];
231
                    for (var m = 0; m < data.length; m++) {
232
                        ca.items.push({code: data[m], caption: data[m]});
233
                        arr.push(data[m]);
234
                    }
235
                    return arr;
236
                };
237
238
                if (data.data.industry) {
239
                    form.val({industryList: split(data.data.industry)});
240
                }
241
                if (data.data.subject) {
242
                    form.val({subjectList: split(data.data.subject)});
243
                }
244
                if (data.data.researchArea) {
245
                    form.val({researchAreaList: split2(data.data.researchArea)});
246
                }
247
248
249
                Array.prototype.remove = function (obj) {
250
                    for (var i = 0; i < this.length; i++) {
251
                        var temp = this[i];
252
                        if (!isNaN(obj)) {
253
                            temp = i;
254
                        }
255
                        if (temp == obj) {
256
                            for (var j = i; j < this.length; j++) {
257
                                this[j] = this[j + 1];
258
                            }
259
                            this.length = this.length - 1;
260
                        }
261
                    }
262
                };
263
                function oString(data) {
264
                    var arry = new Array();
265
                    if (data) {
266
                        for (var i = 0; i < data.length; i++) {
267
                            arry.push(data[i]);
268
                        }
269
                    }
270
                    return arry.join(",");
271
                }
272
273
                root.find(".opt-industry").on("click", function () {
274
                    part(form.val().newIndustry, form.val().industryList);
275
                    form.val({newIndustry: "", industryList: oJudge});
276
                });
277
                root.find(".opt-subject").on("click", function () {
278
                    part(form.val().newSubject, form.val().subjectList);
279
                    form.val({newSubject: "", subjectList: oJudge});
280
                });
281
                root.find(".opt-ra").on("click", function () {
282
                    part2(form.val().newResearchArea, form.val().researchAreaList);
283
                    form.val({newResearchArea: "", researchAreaList: oJudge});
284
                });
285
                root.find(".modal-ctrl .icon-times").on("click", function () {
286
                    spa.closeModal();
287
                });
288
                root.find(".opt-project-new").on("click", function () {
289
                    spa.showModal("sys_userinfo_project_new", {
290
                        data: data.data.projects, hand: function () {
291
                            dp.val(data.data.projects);
292
                        }
293
                    });
294
                });
295
                root.on("click", ".opt-project-edit", function () {
296
                    var pNo = $(this).parent().attr("pNo");
297
                    spa.showModal("sys_userinfo_project_edit", {
298
                        data: data.data.projects[pNo], hand: function () {
299
                            dp.val(data.data.projects);
300
                        }
301
                    })
302
                });
303
                root.on("click", ".opt-project-del", function () {
304
                    var pNo = $(this).parent().attr("pNo");
305
                    if (pNo) {
306
                        util.boxMsg({
307
                            title: "确认删除",
308
                            content: "确认删除该项目经历?",
309
                            btns: [{
310
                                caption: "删除",
311
                                hand: function () {
312
                                    data.data.projects.remove(pNo);
313
                                    data.data.projects = data.data.projects || [];
314
                                    for (var i = 0; i < data.data.projects.length; ++i) {
315
                                        data.data.projects[i].no = i;
316
                                    }
317
                                    dp.val(data.data.projects);
318
                                    console.log(data.data.projects);
319
                                }
320
                            },
321
                                {caption: "取消"}
322
                            ]
323
                        });
324
                    } else {
325
                        util.alert("该项目经历不存在");
326
                    }
327
                });
328
                root.find(".opt-honor-new").on("click", function () {
329
                    spa.showModal("sys_userinfo_honor_new", {
330
                        data: data.data.honors, hand: function () {
331
                            dh.val(data.data.honors);
332
                        }
333
                    })
334
                });
335
                root.on("click", ".opt-honor-edit", function () {
336
                    var hNo = $(this).parent().attr("hNo");
337
                    spa.showModal("sys_userinfo_honor_edit", {
338
                        data: data.data.honors[hNo], hand: function () {
339
                            dh.val(data.data.honors);
340
                        }
341
                    })
342
                });
343
                root.on("click", ".opt-honor-del", function () {
344
                    var hNo = $(this).parent().attr("hNo");
345
                    if (hNo) {
346
                        util.boxMsg({
347
                            title: "确认删除",
348
                            content: "确认删除该荣誉奖项?",
349
                            btns: [{
350
                                caption: "删除",
351
                                hand: function () {
352
                                    data.data.honors.remove(hNo);
353
                                    data.data.honors = data.data.honors || [];
354
                                    for (var i = 0; i < data.data.honors.length; ++i) {
355
                                        data.data.honors[i].no = i;
356
                                    }
357
                                    dh.val(data.data.honors);
358
                                    console.log(data.data.honors);
359
                                }
360
                            },
361
                                {caption: "取消"}
362
                            ]
363
                        });
364
                    } else {
365
                        util.alert("该荣誉奖项不存在");
366
                    }
367
                });
368
                root.find(".opt-job-new").on("click", function () {
369
                    spa.showModal("sys_userinfo_job_new", {
370
                        data: data.data.jobs, hand: function () {
371
                            dj.val(data.data.jobs);
372
                        }
373
                    });
374
                });
375
                root.on("click", ".opt-job-edit", function () {
376
                    var jNo = $(this).parent().attr("jNo");
377
                    spa.showModal("sys_userinfo_job_edit", {
378
                        data: data.data.jobs[jNo], hand: function () {
379
                            dj.val(data.data.jobs);
380
                        }
381
                    })
382
                });
383
                root.on("click", ".opt-job-del", function () {
384
                    var jNo = $(this).parent().attr("jNo");
385
                    if (jNo) {
386
                        util.boxMsg({
387
                            title: "确认删除",
388
                            content: "确认删除该工作经历?",
389
                            btns: [{
390
                                caption: "删除",
391
                                hand: function () {
392
                                    data.data.jobs.remove(jNo);
393
                                    data.data.jobs = data.data.jobs || [];
394
                                    for (var i = 0; i < data.data.jobs.length; ++i) {
395
                                        data.data.jobs[i].no = i;
396
                                    }
397
                                    dj.val(data.data.jobs);
398
                                    console.log(data.data.jobs);
399
                                }
400
                            },
401
                                {caption: "取消"}
402
                            ]
403
                        });
404
                    } else {
405
                        util.alert("该工作经历不存在");
406
                    }
407
                });
408
                root.find(".opt-edu-new").on("click", function () {
409
                    spa.showModal("sys_userinfo_edu_new", {
410
                        data: data.data.edus, hand: function () {
411
                            de.val(data.data.edus);
412
                        }
413
                    });
414
                });
415
                root.on("click", ".opt-edu-edit", function () {
416
                    var eNo = $(this).parent().attr("eNo");
417
                    spa.showModal("sys_userinfo_edu_edit", {
418
                        data: data.data.edus[eNo], hand: function () {
419
                            de.val(data.data.edus);
420
                        }
421
                    })
422
                });
423
                root.on("click", ".opt-edu-del", function () {
424
                    var eNo = $(this).parent().attr("eNo");
425
                    if (eNo) {
426
                        util.boxMsg({
427
                            title: "确认删除",
428
                            content: "确认删除该工作经历?",
429
                            btns: [{
430
                                caption: "删除",
431
                                hand: function () {
432
                                    data.data.edus.remove(eNo);
433
                                    data.data.edus = data.data.edus || [];
434
                                    for (var i = 0; i < data.data.edus.length; ++i) {
435
                                        data.data.edus[i].no = i;
436
                                    }
437
                                    de.val(data.data.edus);
438
                                    console.log(data.data.edus);
439
                                }
440
                            },
441
                                {caption: "取消"}
442
                            ]
443
                        });
444
                    } else {
445
                        util.alert("该工作经历不存在");
446
                    }
447
                });
448
                $.fn.citySelect();
449
                $(document).on("click", "#City li a", function () {
450
                    var aVal = $(this).text();
451
                    $(this).parent().parent().parent().find('.mr_show').text(aVal);
452
                    $(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
453
                    if ($("#ocity").text() == "请选择城市") {
454
                        $("#ocity").removeClass("mr_select");
455
                    } else {
456
                        $("#ocity").addClass("mr_select");
457
                    }
458
                    if ($("#oprovince").text() != "请选择省份") {
459
                        form.val({province: $("#oprovince").text()});
460
                    }
461
                    if ($("#ocity").text() != "请选择城市") {
462
                        form.val({address: $("#ocity").text()});
463
                    }
464
465
                });
466
                saveBtn.on("click", function () {
467
                    save();
468
                });
469
470
                data.data.projects = data.data.projects || [];
471
                for (var i = 0; i < data.data.projects.length; ++i) {
472
                    data.data.projects[i].no = i;
473
                }
474
                dp.val(data.data.projects);
475
476
                data.data.honors = data.data.honors || [];
477
                for (var i = 0; i < data.data.honors.length; ++i) {
478
                    data.data.honors[i].no = i;
479
                }
480
                dh.val(data.data.honors);
481
482
                data.data.jobs = data.data.jobs || [];
483
                for (var i = 0; i < data.data.jobs.length; ++i) {
484
                    data.data.jobs[i].no = i;
485
                }
486
                dj.val(data.data.jobs);
487
488
                data.data.edus = data.data.edus || [];
489
                for (var i = 0; i < data.data.edus.length; ++i) {
490
                    data.data.edus[i].no = i;
491
                }
492
                de.val(data.data.edus);
493
494
                if (!form.val().pMobile){
495
                    form.val({pMobile:data.data.mobile})
496
                }
497
                if (!form.val().pEmail) {
498
                    form.val({pEmail:data.data.email})
499
                }
500
501
                form.val(data.data);
502
            }
503
        }
504
    });
505
});

+ 53 - 0
js/model/sys/userInfo/honorEdit.js

@ -0,0 +1,53 @@
1
/**
2
 * Created by TT on 2017/7/11.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_honor");
10
                var form = fb.build(root.find(".newForm"));
11
                var saveBtn = root.find(".opt-save"),
12
                    save = function () {
13
                        if (form.val().honorName) {
14
                            var honorName = trim(form.val().honorName);
15
                            if (honorName.length > 50) {
16
                                util.alert("奖项名称不得超过50个字");
17
                                return;
18
                            }
19
                            data.data.honorName = honorName;
20
                        } else {
21
                            util.alert("请填写奖项名称");
22
                            return;
23
                        }
24
                        if (form.val().honorDescp) {
25
                            var honorDescp = trim(form.val().honorDescp);
26
                            if (honorDescp.length > 200) {
27
                                util.alert("项目描述不得超过200个字");
28
                                return;
29
                            }
30
                            data.data.honorDescp = honorDescp;
31
                        } else {
32
                            data.data.honorDescp = "";
33
                        }
34
                        if (form.val().honorYear) {
35
                            data.data.honorYear = form.val().honorYear.substring(0, 4);
36
                        } else {
37
                            data.data.honorYear = "";
38
                        }
39
                        data.hand();
40
                        spa.closeModal();
41
                    };
42
                root.find(".modal-ctrl .icon-times").on("click", function () {
43
                    spa.closeModal();
44
                });
45
                saveBtn.on("click", save);
46
                form.val(data.data);
47
                function trim(str) { //删除左右两端的空格			  
48
                    return str.replace(/(^\s*)|(\s*$)/g, "");
49
                }
50
            }
51
        }
52
    });
53
});

+ 49 - 0
js/model/sys/userInfo/honorNew.js

@ -0,0 +1,49 @@
1
/**
2
 * Created by TT on 2017/7/11.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_honor");
10
                var form = fb.build(root.find(".newForm"));
11
                var saveBtn = root.find(".opt-save"),
12
                    save = function () {
13
                        if (form.val().honorName) {
14
                            var honorName = trim(form.val().honorName);
15
                            if (honorName.length > 50) {
16
                                util.alert("奖项名称不得超过50个字");
17
                                return;
18
                            }
19
                        } else {
20
                            util.alert("请填写奖项名称");
21
                            return;
22
                        }
23
                        if (form.val().honorDescp) {
24
                            var honorDescp = trim(form.val().honorDescp);
25
                            if (honorDescp.length > 200) {
26
                                util.alert("项目描述不得超过200个字");
27
                                return;
28
                            }
29
                        }
30
                        if (form.val().honorYear) {
31
                            form.val({honorYear: form.val().honorYear.substring(0, 4)});
32
                        }
33
                        var item = form.val();
34
                        item.no = data.data.length;
35
                        data.data.push(item);
36
                        data.hand();
37
                        spa.closeModal();
38
                    };
39
                root.find(".modal-ctrl .icon-times").on("click", function () {
40
                    spa.closeModal();
41
                });
42
                saveBtn.on("click", save);
43
                function trim(str) { //删除左右两端的空格			  
44
                    return str.replace(/(^\s*)|(\s*$)/g, "");
45
                }
46
            }
47
        }
48
    });
49
});

+ 178 - 0
js/model/sys/userInfo/index.js

@ -0,0 +1,178 @@
1
/**
2
 * Created by TT on 2017/7/7.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "pagedatagrid", "util"], function (spa, pdgf, util) {
7
        return {
8
            main: function () {
9
                var root = spa.findInMain(".sys_userinfo_index");
10
                var pdg = pdgf.build(root);
11
//				validate.form(pdg.form, { name: { required: "not null", len: { val: 5, msg: "我的中国心" } } });
12
                root.find(".opt-query").on("click", function () {
13
                    pdg.load();
14
                });
15
                root.find(".opt-new").on("click", function () {
16
                    spa.showModal("sys_userinfo_new", function () {
17
                        pdg.load()
18
                    });
19
                });
20
                root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () {
21
                    var $this = $(this);
22
                    $this.toggleClass("checked");
23
                    if ($this.hasClass("checked")) {
24
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
25
                    } else {
26
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
27
                    }
28
                });
29
                root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () {
30
                    var $this = $(this);
31
                    $this.toggleClass("checked");
32
                });
33
                root.find(".opt-edit").on("click", function () {
34
                    var $org = root.find("td.opt-check>i.checked");
35
                    if ($org.length) {
36
                        if ($org.length > 1) {
37
                            util.alert("只能选择一个用户");
38
                        } else {
39
                            util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) {
40
                                if (data) {
41
                                    if (data.state == "1" || data.state == "4") {
42
                                        spa.showModal("sys_userinfo_edit", {
43
                                            data: data, hand: function () {
44
                                                pdg.load()
45
                                            }
46
                                        })
47
                                    } else {
48
                                        util.alert("待审核和审核通过的不可修改。");
49
                                    }
50
                                } else {
51
                                    util.alert("用户不存在了", function () {
52
                                        pdg.load();
53
                                    });
54
                                }
55
                            }, {});
56
                        }
57
                    } else {
58
                        util.alert("请选择一个用户");
59
                    }
60
                });
61
                root.find(".opt-del").on("click", function () {
62
                    var $org = root.find("td.opt-check>i.checked");
63
                    if ($org.length) {
64
                        if ($org.length > 1) {
65
                            util.alert("只能选择一个用户");
66
                        } else {
67
                            util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) {
68
                                if (data) {
69
                                    if (data.state == "1" || data.state == "4") {
70
                                        util.boxMsg({
71
                                            title: "确认删除",
72
                                            content: "您是否要删除选中的用户信息,信息删除后不可恢复。",
73
                                            btns: [{
74
                                                caption: "删除",
75
                                                hand: function () {
76
                                                    util.del("../ajax/userinfo/del/" + $org.attr("userId"), function (code) {
77
                                                        if (code != 1) {
78
                                                            if (code == 2) {
79
                                                                util.alert("无法删除,请检查状态");
80
                                                            }
81
                                                            if (code == 3) {
82
                                                                util.alert("找不到该账户,请检查");
83
                                                            }
84
                                                        }
85
                                                        pdg.load()
86
                                                    }, {});
87
                                                }
88
                                            },
89
                                                {caption: "取消"}
90
                                            ]
91
                                        });
92
                                    } else {
93
                                        util.alert("待审核和审核通过的不可删除。");
94
                                    }
95
                                } else {
96
                                    util.alert("用户不存在了", function () {
97
                                        pdg.load();
98
                                    });
99
                                }
100
                            }, {});
101
                        }
102
                    } else {
103
                        util.alert("请选择一个用户");
104
                    }
105
                });
106
                root.find(".opt-details").on("click", function () {
107
                    var $org = root.find("td.opt-check>i.checked");
108
                    if ($org.length) {
109
                        if ($org.length > 1) {
110
                            util.alert("只能选择一个用户");
111
                        } else {
112
                            util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) {
113
                                if (data) {
114
                                    if (data.state == "1" || data.state == "4") {
115
                                        spa.showModal("sys_userinfo_details", {
116
                                            data: data, hand: function () {
117
                                                pdg.load()
118
                                            }
119
                                        })
120
                                    } else {
121
                                        util.alert("待审核和审核通过的不可修改。");
122
                                    }
123
                                } else {
124
                                    util.alert("用户不存在了", function () {
125
                                        pdg.load();
126
                                    });
127
                                }
128
                            }, {});
129
                        }
130
                    } else {
131
                        util.alert("请选择一个用户");
132
                    }
133
                });
134
                root.find(".opt-check").on("click", function () {
135
                    var $check = root.find("td.opt-check>i.checked");
136
                    if ($check.length) {
137
                        if ($check.length > 1) {
138
                            util.alert("只能选择一个用户")
139
                        } else {
140
                            util.get("../ajax/userinfo/id/" + $check.attr("userId"), null, function (data) {
141
                                if (data) {
142
                                    if (data.state == "1" || data.state == "4") {
143
                                        util.boxMsg({
144
                                            title: "提交审核",
145
                                            content: "请确认提交审核,提交审核后不可修改!",
146
                                            btns: [{
147
                                                caption: "确认提交", hand: function () {
148
                                                    util.post("../ajax/userinfo/updateState", {id: $check.attr("userId")}, function () {
149
                                                        pdg.load()
150
                                                    }, {});
151
                                                }
152
                                            }, {caption: "取消"}
153
                                            ]
154
                                        });
155
                                    } else {
156
                                        util.alert("只有未提交、审核失败的可以点击");
157
                                    }
158
                                } else {
159
                                    util.alert("用户不存在了", function () {
160
                                        pdg.load();
161
                                    });
162
                                }
163
                            });
164
                        }
165
                    } else {
166
                        util.alert("请选择一名专家");
167
                    }
168
                });
169
                pdg.code.listen($.dict.doTransfer);
170
                pdg.load();
171
172
            },
173
            mainDestory: function () {
174
175
            },
176
        };
177
    });
178
});

+ 86 - 0
js/model/sys/userInfo/jobEdit.js

@ -0,0 +1,86 @@
1
/**
2
 * Created by TT on 2017/7/11.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_job");
10
                var form = fb.build(root.find(".newForm"));
11
                var date = new Date(),
12
                    month = date.getMonth() + 1,
13
                    myDate = "" + date.getFullYear() + (month > 9 ? month : ("0" + month));
14
                var saveBtn = root.find(".opt-save"),
15
                    save = function () {
16
                        if (form.val().jobCompany) {
17
                            var jobCompany = trim(form.val().jobCompany);
18
                            if (jobCompany.length > 50) {
19
                                util.alert("机构名称不得超过50个字");
20
                                return;
21
                            }
22
                            data.data.jobCompany = jobCompany;
23
                        } else {
24
                            util.alert("请填写机构名称");
25
                            return;
26
                        }
27
                        if (form.val().jobTitle) {
28
                            var jobTitle = trim(form.val().jobTitle);
29
                            if (jobTitle.length > 50) {
30
                                util.alert("职位不得超过50个字");
31
                                return;
32
                            }
33
                            data.data.jobTitle = jobTitle;
34
                        } else {
35
                            util.alert("请填写职位");
36
                            return;
37
                        }
38
                        if (form.val().jobDepartment) {
39
                            var jobDepartment = trim(form.val().jobDepartment);
40
                            if (jobDepartment.length > 50) {
41
                                util.alert("部门名称不得超过50个字");
42
                                return;
43
                            }
44
                            data.data.jobDepartment = jobDepartment;
45
                        } else {
46
                            data.data.jobDepartment = "";
47
                        }
48
                        if (!form.val().jobStart && form.val().jobStop) {
49
                            util.alert("没有选择开始时间");
50
                            return;
51
                        }
52
                        if (form.val().jobStart && !form.val().jobStop) {
53
                            util.alert("没有选择结束时间,则结束时间为“至今”");
54
                            data.data.jobStart = form.val().jobStart.substring(0, 6);
55
                            data.data.jobStop = "至今";
56
                            form.val({jobStop: "至今"});
57
                            return;
58
                        }
59
                        if (form.val().jobStart && form.val().jobStop) {
60
                                // if (form.val().jobStart.substring(0, 6) <= form.val().jobStop.substring(0, 6) && form.val().jobStart.substring(0, 6) <= myDate) {
61
                                    data.data.jobStart = form.val().jobStart.substring(0, 6);
62
                                    data.data.jobStop = form.val().jobStop.substring(0, 6);
63
                                // } else {
64
                                //     util.alert("日期输入不正确,开始时间不能晚于结束时间");
65
                                //     return;
66
                                // }
67
                        }
68
                        if (!form.val().jobStart && !form.val().jobStop) {
69
                            data.data.jobStart = "";
70
                            data.data.jobStop = "";
71
                        }
72
                        data.hand();
73
                        spa.closeModal();
74
                    };
75
                root.find(".modal-ctrl .icon-times").on("click", function () {
76
                    spa.closeModal();
77
                });
78
                saveBtn.on("click", save);
79
                form.val(data.data);
80
                function trim(str) { //删除左右两端的空格			  
81
                    return str.replace(/(^\s*)|(\s*$)/g, "");
82
                }
83
            }
84
        }
85
    });
86
});

+ 82 - 0
js/model/sys/userInfo/jobNew.js

@ -0,0 +1,82 @@
1
/**
2
 * Created by TT on 2017/7/11.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_job");
10
                var form = fb.build(root.find(".newForm"));
11
                var date = new Date(),
12
                    month = date.getMonth() + 1,
13
                    myDate = "" + date.getFullYear() + (month > 9 ? month : ("0" + month));
14
                var saveBtn = root.find(".opt-save"),
15
                    save = function () {
16
                        if (form.val().jobCompany) {
17
                            var jobCompany = trim(form.val().jobCompany);
18
                            if (jobCompany.length > 50) {
19
                                util.alert("机构名称不得超过50个字");
20
                                return;
21
                            }
22
                        } else {
23
                            util.alert("请填写机构名称");
24
                            return;
25
                        }
26
                        if (form.val().jobTitle) {
27
                            var jobTitle = trim(form.val().jobTitle);
28
                            if (jobTitle.length > 50) {
29
                                util.alert("职位不得超过50个字");
30
                                return;
31
                            }
32
                        } else {
33
                            util.alert("请填写职位");
34
                            return;
35
                        }
36
                        if (form.val().jobDepartment) {
37
                            var jobDepartment = trim(form.val().jobDepartment);
38
                            if (jobDepartment.length > 50) {
39
                                util.alert("部门名称不得超过50个字");
40
                                return;
41
                            }
42
                        }
43
                        if (!form.val().jobStart && form.val().jobStop) {
44
                            util.alert("没有选择开始时间");
45
                            return;
46
                        }
47
                        if (form.val().jobStart && !form.val().jobStop) {
48
                            util.alert("没有选择结束时间,则结束时间为“至今”");
49
                            form.val({
50
                                jobStart: form.val().jobStart.substring(0, 6),
51
                                jobStop: "至今"
52
                            });
53
                            return;
54
                        }
55
                        if (form.val().jobStart && form.val().jobStop) {
56
                            // if (form.val().jobStart.substring(0, 6) <= form.val().jobStop.substring(0, 6) && form.val().jobStart.substring(0, 6) <= myDate) {
57
                                form.val({
58
                                    jobStart: form.val().jobStart.substring(0, 6),
59
                                    jobStop: form.val().jobStop.substring(0, 6)
60
                                });
61
                            // } else {
62
                            //     util.alert("日期输入不正确,开始时间不能晚于结束时间");
63
                            //     return;
64
                            // }
65
                        }
66
                        var item = form.val();
67
                        item.no = data.data.length;
68
                        data.data.push(item);
69
                        data.hand();
70
                        spa.closeModal();
71
                    };
72
                root.find(".modal-ctrl .icon-times").on("click", function () {
73
                    spa.closeModal();
74
                });
75
                saveBtn.on("click", save);
76
                function trim(str) { //删除左右两端的空格			  
77
                    return str.replace(/(^\s*)|(\s*$)/g, "");
78
                }
79
            }
80
        }
81
    });
82
});

+ 72 - 0
js/model/sys/userInfo/new.js

@ -0,0 +1,72 @@
1
/**
2
 * Created by TT on 2017/7/7.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_new");
10
                var form = fb.build(root.find(".newForm"));
11
                var trim = function (str) { //删除左右两端的空格			  
12
                    return str.replace(/(^\s*)|(\s*$)/g, "");
13
                };
14
                var saveBtn = root.find(".opt-save"),
15
                    save = function () {
16
                        if (form.val().mobile) {
17
                            var mobile = trim(form.val().mobile);
18
                            var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
19
                            if (!hunPhone.test(mobile)) {
20
                                util.alert("注册电话格式有误,请检查后重新填写");
21
                                return;
22
                            }
23
                        }
24
                        if (form.val().email) {
25
                            var email = trim(form.val().email);
26
                            var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
27
                            if (!gunf.test(email)) {
28
                                util.alert("注册邮箱格式有误,请检查后重新填写");
29
                                return;
30
                            }
31
                        }
32
                        if (form.val().name) {
33
                            var name = trim(form.val().name);
34
                            if (name.length > 10) {
35
                                util.alert("姓名最长为10个字");
36
                                return;
37
                            }
38
                        }else {
39
                            util.alert("请填写用户名称");
40
                            return;
41
                        }
42
                        if (form.val().mobile || form.val().email) {
43
                            util.get("../ajax/userinfo/entryCheck", {
44
                                mobile: form.val().mobile,
45
                                email: form.val().email
46
                            },function (success) {
47
                                if (success){
48
                                    form.val({pMobile: form.val().mobile});
49
                                    form.val({pEmail: form.val().email});
50
                                    form.doPut("../ajax/userinfo/insert", function () {
51
                                        spa.closeModal();
52
                                        if (data) {
53
                                            data();
54
                                        }
55
                                    }, {});
56
                                }else {
57
                                    util.alert("该账号已存在");
58
                                }
59
                            });
60
                        } else {
61
                            util.alert("手机或邮箱至少输入一项");
62
                        }
63
                    };
64
65
                root.find(".modal-ctrl .icon-times").on("click", function () {
66
                    spa.closeModal();
67
                });
68
                saveBtn.on("click", save);
69
            }
70
        }
71
    });
72
});

+ 75 - 0
js/model/sys/userInfo/projectEdit.js

@ -0,0 +1,75 @@
1
/**
2
 * Created by TT on 2017/7/10.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_project");
10
                var form = fb.build(root.find(".newForm"));
11
                var date = new Date(),
12
                    month = date.getMonth() + 1,
13
                    myDate = "" + date.getFullYear() + (month > 9 ? month : ("0" + month));
14
                var saveBtn = root.find(".opt-save"),
15
                    save = function () {
16
                        if (form.val().projectName) {
17
                            var projectName = trim(form.val().projectName);
18
                            if (projectName.length > 50) {
19
                                util.alert("项目名称不得超过50个字");
20
                                return;
21
                            }
22
                            data.data.projectName = projectName;
23
                        } else {
24
                            util.alert("请填写项目名称");
25
                            return;
26
                        }
27
                        if (form.val().projectDescp) {
28
                            var projectDescp = trim(form.val().projectDescp);
29
                            if (projectDescp.length > 200) {
30
                                util.alert("项目描述不得超过200个字");
31
                                return;
32
                            }
33
                            data.data.projectDescp = projectDescp;
34
                        } else {
35
                            data.data.projectDescp = ""
36
                        }
37
                        if (!form.val().projectStart && form.val().projectStop) {
38
                            util.alert("没有选择开始时间");
39
                            return;
40
                        }
41
                        if (form.val().projectStart && !form.val().projectStop) {
42
                            util.alert("没有选择结束时间,则结束时间为“至今”");
43
                            data.data.projectStart = form.val().projectStart.substring(0, 6);
44
                            data.data.projectStop = "至今";
45
                            form.val({projectStop: "至今"});
46
                            return;
47
                        }
48
                        if (form.val().projectStart && form.val().projectStop) {
49
                            // if (form.val().projectStart.substring(0, 6) <= form.val().projectStop.substring(0, 6) && form.val().projectStart.substring(0, 6) <= myDate) {
50
                                data.data.projectStart = form.val().projectStart.substring(0, 6);
51
                                data.data.projectStop = form.val().projectStop.substring(0, 6);
52
                            // } else {
53
                            //     util.alert("日期输入不正确,开始时间不能晚于结束时间");
54
                            //     return;
55
                            // }
56
                        }
57
                        if (!form.val().projectStart && !form.val().projectStop) {
58
                            data.data.projectStart = "";
59
                            data.data.projectStop = "";
60
                        }
61
                        data.hand();
62
                        spa.closeModal();
63
                    };
64
                root.find(".modal-ctrl .icon-times").on("click", function () {
65
                    spa.closeModal();
66
                });
67
                saveBtn.on("click", save);
68
                form.val(data.data);
69
                function trim(str) { //删除左右两端的空格			  
70
                    return str.replace(/(^\s*)|(\s*$)/g, "");
71
                }
72
            }
73
        }
74
    });
75
});

+ 72 - 0
js/model/sys/userInfo/projectNew.js

@ -0,0 +1,72 @@
1
/**
2
 * Created by TT on 2017/7/10.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_project");
10
                var form = fb.build(root.find(".newForm"));
11
                var date = new Date(),
12
                    month = date.getMonth() + 1,
13
                    myDate = "" + date.getFullYear() + (month > 9 ? month : ("0" + month));
14
                var saveBtn = root.find(".opt-save"),
15
                    save = function () {
16
                        if (form.val().projectName) {
17
                            var projectName = trim(form.val().projectName);
18
                            if (projectName.length > 50) {
19
                                util.alert("项目名称不得超过50个字");
20
                                return;
21
                            }
22
                        } else {
23
                            util.alert("请填写项目名称");
24
                            return;
25
                        }
26
                        if (form.val().projectDescp) {
27
                            var projectDescp = trim(form.val().projectDescp);
28
                            if (projectDescp.length > 200) {
29
                                util.alert("项目描述不得超过200个字");
30
                                return;
31
                            }
32
                        }
33
                        if (!form.val().projectStart && form.val().projectStop) {
34
                            util.alert("没有选择开始时间");
35
                            return;
36
                        }
37
                        if (form.val().projectStart && !form.val().projectStop) {
38
                            util.alert("没有选择结束时间,则结束时间为“至今”");
39
                            form.val({
40
                                projectStart: form.val().projectStart.substring(0, 6),
41
                                projectStop: "至今"
42
                            });
43
                            return;
44
                        }
45
                        if (form.val().projectStart && form.val().projectStop) {
46
                            // if (form.val().projectStart.substring(0, 6) <= form.val().projectStop.substring(0, 6) && form.val().projectStart.substring(0, 6) <= myDate) {
47
                                form.val({
48
                                    projectStart: form.val().projectStart.substring(0, 6),
49
                                    projectStop: form.val().projectStop.substring(0, 6)
50
                                });
51
                            // } else {
52
                            //     util.alert("日期输入不正确,开始时间不能晚于结束时间");
53
                            //     return;
54
                            // }
55
                        }
56
                        var item = form.val();
57
                        item.no = data.data.length;
58
                        data.data.push(item);
59
                        data.hand();
60
                        spa.closeModal();
61
                    };
62
                root.find(".modal-ctrl .icon-times").on("click", function () {
63
                    spa.closeModal();
64
                });
65
                saveBtn.on("click", save);
66
                function trim(str) { //删除左右两端的空格			  
67
                    return str.replace(/(^\s*)|(\s*$)/g, "");
68
                }
69
            }
70
        }
71
    });
72
});

+ 74 - 0
js/model/sys/userInfo/review.js

@ -0,0 +1,74 @@
1
/**
2
 * Created by TT on 2017/7/12.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_review");
10
                var form = fb.build(root.find(".newForm"));
11
                var id = util.data("loginUser").id;
12
                var reviewerName = util.data("loginUser").name;
13
                var date = new Date(),
14
                    month = date.getMonth() + 1,
15
                    day = date.getDate();
16
                var myDate = "" + date.getFullYear() + (month > 9 ? month : ("0" + month)) + (day > 9 ? day : ("0" + day));
17
                var saveBtn = root.find(".opt-save"),
18
                    save = function () {
19
                        form.val({
20
                            reviewer: id,
21
                            reviewTime: myDate,
22
                            reviewerName: reviewerName
23
                        });
24
                        if (form.val().sortFirst){
25
                            var sortFirst = form.val().sortFirst;
26
                            var reg = new RegExp("^(\\d|[1-9]\\d|100)$");
27
                            if (!reg.test(sortFirst)){
28
                                util.alert("权重值必须是0-100的正整数");
29
                                return;
30
                            }
31
                        }else {
32
                            form.val({sortFirst: 0});
33
                        }
34
                        if (form.val().state == 3) {
35
                            util.get("../ajax/userinfo/reviewCheck", {
36
                                mobile: form.val().mobile,
37
                                email: form.val().email
38
                            }, function (success) {
39
                                if (success) {
40
                                    form.doPost("../ajax/userinfo/import", closeThis, function (code) {
41
                                        if (code==1) {
42
                                            util.alert("审核成功,并已导入正式数据库");
43
                                        } else if (code == 2){
44
                                            util.alert("导入失败,只有这次审核通过的可以导入");
45
                                        }else if(code == 3){
46
                                            util.alert("导入失败,信息不存在");
47
                                        }
48
                                    }, {});
49
                                } else {
50
                                    util.alert("该账号已存在");
51
                                }
52
                            });
53
                        } else {
54
                            form.val({authentication: "", authStatus: "", authStatusExpert: "", sortFirst: ""});
55
                            form.doPut("../ajax/userinfo/update", closeThis, {});
56
                        }
57
                    };
58
                root.find(".modal-ctrl .icon-times").on("click", function () {
59
                    spa.closeModal();
60
                });
61
                var handler = data.hand;
62
                var closeThis = function () {
63
                    spa.closeModal();
64
                    if (handler) {
65
                        handler();
66
                    }
67
                };
68
                saveBtn.on("click", save);
69
                form.val(data.data);
70
                form.val({state: 3, authentication: 0, authStatus: 3, authStatusExpert: 3});
71
            }
72
        }
73
    });
74
});

+ 52 - 0
js/static.js

@ -0,0 +1,52 @@
1
/**
2
 * Created by TT on 2017/7/7.
3
 */
4
!(function () {
5
    $.use(["dict"], function (dict) {
6
        dict.set("user_info_state", [{code: "1", caption: "未提交", enabled: true}, {
7
            code: "2", caption: "待审核", enabled: true
8
        }, {
9
            code: "3", caption: "审核通过", enabled: true
10
        }, {
11
            code: "4", caption: "审核失败", enabled: true}]);
12
        dict.set("user_degree", [{code: "博士", caption: "博士", enabled: true}, {
13
            code: "硕士", caption: "硕士", enabled: true
14
        }, {
15
            code: "学士", caption: "学士", enabled: true
16
        }, {
17
            code: "大专", caption: "大专", enabled: true
18
        }, {
19
            code: "其他", caption: "其他", enabled: true}]);
20
        dict.set("authentication", [{code: "0", caption: "普通用户", enabled: true}, {
21
            code: "1", caption: "科研工作者", enabled: true
22
        }, {
23
            code: "2", caption: "企业高管", enabled: true
24
        }, {
25
            code: "3", caption: "在校生", enabled: true
26
        }, {
27
            code: "4", caption: "技术人员", enabled: true
28
        }, {
29
            code: "5", caption: "HR/猎头", enabled: true
30
        }, {
31
            code: "6", caption: "销售人员", enabled: true
32
        }, {
33
            code: "7", caption: "投资方", enabled: true
34
        }, {
35
            code: "8", caption: "咨询顾问", enabled: true}]);
36
        dict.set("user_info_state_review", [{
37
            code: "3", caption: "审核通过", enabled: true
38
        }, {
39
            code: "4", caption: "审核失败", enabled: true}]);
40
        dict.set("user_info_state_check", [{
41
            code: "2", caption: "待审核", enabled: true
42
        }, {
43
            code: "3", caption: "审核通过", enabled: true
44
        }, {
45
            code: "4", caption: "审核失败", enabled: true}]);
46
        dict.set("auth_status", [{
47
            code: "0", caption: "未认证", enabled: true
48
        }, {
49
            code: "3", caption: "已认证", enabled: true}]);
50
    });
51
52
})();