Sfoglia il codice sorgente

专家录入和专家录入审核功能

XMTT 7 anni fa
parent
commit
a5f210317f

+ 3 - 0
css/model/sys/demand.css

@ -8,6 +8,9 @@
8 8
.sys_demand_index .table-opt .name{
9 9
    cursor:pointer;
10 10
}
11
.sys_demand_index td.table-opt.col-1.random {
12
    padding: 1px;
13
}
11 14
.sys_demand_edit{
12 15
    width:800px;
13 16
}

+ 104 - 0
css/model/sys/professor.css

@ -0,0 +1,104 @@
1
@charset "utf-8";
2
.sys_professor_index .tpl-btns .row,.sys_professor_check .tpl-btns .row {
3
    padding-left: 10px;
4
}
5
6
.sys_professor_index th.opt-check,.sys_professor_check th.opt-check {
7
    width: 35px;
8
}
9
10
.sys_professor_index td.table-opt.edit,.sys_professor_check td.table-opt.edit {
11
    padding: 1px;
12
    text-align: center;
13
}
14
15
.sys_professor_index .table-opt .name,.sys_professor_check .table-opt .name{
16
    cursor:pointer;
17
}
18
19
.sys_professor_index .state0{
20
    display: none;
21
}
22
23
.sys_professor_new{
24
    width: 800px;
25
    height: 600px;
26
    padding: 0 20px 10px;
27
}
28
29
.sys_professor_new .citybox .frmtype, .sys_professor_edit .citybox .frmtype {
30
    border: 1px solid #B5B5B5;
31
}
32
33
.sys_professor_new .citybox span, .sys_professor_edit .citybox span {
34
    position: relative;
35
    width: 96%;
36
    display: inline-block;
37
    padding: 0 0 0 6px;
38
    cursor: pointer;
39
    margin: 0;
40
    background: #fff;
41
}
42
43
.sys_professor_new .citybox span .mr_show.mr_select,.sys_professor_edit .citybox span .mr_show.mr_select {
44
    color: #333;
45
}
46
47
.sys_professor_new .citybox span .mr_show, .sys_professor_edit .citybox span .mr_show {
48
    font-style: normal;
49
    color: #AAAAAA;
50
    width: 100%;
51
    display: inline-block;
52
    height: 32px;
53
    line-height: 32px;
54
    position: relative;
55
}
56
57
.sys_professor_new .citybox span .mr_show .mr_select, .sys_professor_edit .citybox span .mr_show .mr_select {
58
    color: #333;
59
}
60
61
.sys_professor_new .citybox span .mr_sj, .sys_professor_edit .citybox span .mr_sj {
62
    position: absolute;
63
    right: 10px;
64
    top: 15px;
65
    display: inline-block;
66
    height: 0;
67
    width: 0;
68
    border: 6px solid #fff;
69
    border-color: #28b8fa transparent transparent;
70
}
71
72
.sys_professor_new .citybox span ul, .sys_professor_edit .citybox span ul {
73
    width: 98%;
74
    border-radius: 0 0 5px 5px;
75
    position: absolute;
76
    border: 1px solid #E8E8E8;
77
    background: #fff;
78
    left: -1px;
79
    top: 38px;
80
    margin-bottom: 10px;
81
    display: none;
82
    z-index: 10;
83
    max-height: 280px;
84
    overflow: auto;
85
}
86
87
.sys_professor_new .citybox span ul li, .sys_professor_edit .citybox span ul li {
88
    width: 100%;
89
    float: left;
90
    overflow: hidden;
91
    border-top: 1px solid #E8E8E8;
92
}
93
94
.sys_professor_new .citybox span ul li:first-child, .sys_professor_edit .citybox span ul li:first-child {
95
    border-top: 0;
96
}
97
98
.sys_professor_new .citybox span ul li a, .sys_professor_edit .citybox span ul li a {
99
    display: block;
100
    height: 30px;
101
    line-height: 30px;
102
    padding: 0 8px;
103
    color: #494949;
104
}

+ 0 - 1
html/index.html

@ -6,7 +6,6 @@
6 6
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
7 7
		<title></title>
8 8
		<link href="../css/common.css" rel="stylesheet" type="text/css" />
9
		<link href="../css/webuploader.css" rel="stylesheet" type="text/css" />
10 9
		<link href="../ajax/dyn/auth.css" rel="stylesheet" type="text/css" />
11 10
		<style>
12 11
			.page-head {

+ 1 - 1
html/model/sys/demand/index.html

@ -69,7 +69,7 @@
69 69
                <td>{{createTime-showDay}}</td>
70 70
                <td class="hand-dict" dict="demandType" code="{{demandType}}"></td>
71 71
                <td>{{demandStatus-status2}}</td>
72
                <td class="table-opt col-1" demandId="{{demandId}}" demandStatus="{{demandStatus}}"><div class="btn opt-auth">
72
                <td class="table-opt col-1 random" demandId="{{demandId}}" demandStatus="{{demandStatus}}"><div class="btn opt-auth">
73 73
                    <i class="icon-random"></i>
74 74
                    {{demandStatus-status}}
75 75
                </div></td>

+ 5 - 5
html/model/sys/org/edit.html

@ -39,12 +39,12 @@
39 39
                    <div class=" col-6 citybox province">
40 40
														<span class="frmtype frmtypeW" id="Province">
41 41
				                                        	<em class="mr_sj"></em>
42
				                                            <i class="mr_show" id="oprovince">请选择企业总部所在省或直辖市</i>
42
				                                            <i class="mr_show" id="oprovince">请选择省份</i>
43 43
				                                            <ul>
44
				                                                <li><a href="javascript:void(0)" alt="请选择企业总部所在省或直辖市">请选择企业总部所在省或直辖市</a></li>
44
				                                                <li><a href="javascript:void(0)" alt="请选择省份">请选择省份</a></li>
45 45
				                                            </ul>
46 46
				                                            <input type="hidden" name="cho_Province"
47
                                                                   value="请选择企业总部所在省或直辖市">
47
                                                                   value="请选择省份">
48 48
				                                        </span>
49 49
                    </div>
50 50
                    <div class="col-6 citybox city">
@ -52,9 +52,9 @@
52 52
				                                       		<em class="mr_sj"></em>
53 53
				                                            <i class="mr_show" id="ocity"></i>
54 54
				                                            <ul>
55
				                                                <li><a href="javascript:void(0)" alt="请选择企业总部所在城市">请选择企业总部所在城市</a></li>
55
				                                                <li><a href="javascript:void(0)" alt="请选择城市">请选择城市</a></li>
56 56
				                                            </ul>
57
				                                            <input type="hidden" name="cho_City" value="请选择企业总部所在城市 ">
57
				                                            <input type="hidden" name="cho_City" value="请选择城市 ">
58 58
				                                        </span>
59 59
                    </div>
60 60
            </div>

+ 3 - 3
html/model/sys/org/index.html

@ -1,4 +1,4 @@
1
<div class="sys_org_index" loadUri="../ajax/sys/org/pq" pageSize="5" pageNo="1" pageIndex="pi">
1
<div class="sys_org_index" loadUri="../ajax/sys/org/pq" pageSize="10" pageNo="1" pageIndex="pi">
2 2
	<div class="modal-ctrl">
3 3
		<i class="icon icon-times"></i>
4 4
	</div>
@ -55,7 +55,7 @@
55 55
			<thead>
56 56
				<tr>
57 57
					<th class="opt-check" ><i class="icon icon-st-check"></i> </th>
58
					<th>PageIndex</th>
58
					<th>序号</th>
59 59
					<th>名称</th>
60 60
					<th>城市</th>
61 61
					<th>所属行业</th>
@ -81,7 +81,7 @@
81 81
			</tbody>
82 82
			<tbody ch-dir="array.empty">
83 83
				<tr>
84
					<td class="empty-desc" colspan="6">表格暂无数据</td>
84
					<td class="empty-desc" colspan="9">表格暂无数据</td>
85 85
				</tr>
86 86
			</tbody>
87 87
		</table>

+ 5 - 5
html/model/sys/org/new.html

@ -40,12 +40,12 @@
40 40
                    <div class=" col-6 citybox">
41 41
														<span class="frmtype frmtypeW" id="Province">
42 42
				                                        	<em class="mr_sj"></em>
43
				                                            <i class="mr_show" id="oprovince">请选择企业总部所在省或直辖市</i>
43
				                                            <i class="mr_show" id="oprovince">请选择省份</i>
44 44
				                                            <ul>
45
				                                                <li><a href="javascript:void(0)" alt="请选择企业总部所在省或直辖市">请选择企业总部所在省或直辖市</a></li>
45
				                                                <li><a href="javascript:void(0)" alt="请选择省份">请选择省份</a></li>
46 46
				                                            </ul>
47 47
				                                            <input type="hidden" name="cho_Province"
48
                                                                   value="请选择企业总部所在省或直辖市">
48
                                                                   value="请选择省份">
49 49
				                                        </span>
50 50
                    </div>
51 51
                    <div class="col-6 citybox">
@ -53,9 +53,9 @@
53 53
				                                       		<em class="mr_sj"></em>
54 54
				                                            <i class="mr_show" id="ocity"></i>
55 55
				                                            <ul>
56
				                                                <li><a href="javascript:void(0)" alt="请选择企业总部所在城市">请选择企业总部所在城市</a></li>
56
				                                                <li><a href="javascript:void(0)" alt="请选择城市">请选择城市</a></li>
57 57
				                                            </ul>
58
				                                            <input type="hidden" name="cho_City" value="请选择企业总部所在城市 ">
58
				                                            <input type="hidden" name="cho_City" value="请选择城市 ">
59 59
				                                        </span>
60 60
                    </div>
61 61
                </form>

+ 108 - 0
html/model/sys/professor/check.html

@ -0,0 +1,108 @@
1
<div class="sys_professor_check" loadUri="../ajax/sys/professor/pq" pageSize="10" pageNo="1" pageIndex="pi">
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-1 item-caption">机构</div>
8
            <div class="col-2">
9
                <div class="form-item text" defVal="" name="orgName"></div>
10
            </div>
11
            <div class="col-1 item-caption ">专家</div>
12
            <div class="col-2">
13
                <div class="form-item text" defVal="" name="name"></div>
14
            </div>
15
            <!--<div class="col-1 item-caption ">录入员</div>-->
16
            <!--<div class="col-2">-->
17
                <!--<div class="form-item dyn-select queried" name="name"></div>-->
18
            <!--</div>-->
19
            <div class="col-1 item-caption">录入员</div>
20
            <div class="col-2">
21
                <div class="form-item dyn-select queried" uri="../ajax/sys/user/userName" name="enter"></div>
22
            </div>
23
            <div class="col-1 item-caption">审核状态</div>
24
            <div class="col-2">
25
                <div class="form-item select" dictCode="professorState" defVal="" name="professorState"></div>
26
            </div>
27
        </div>
28
        <div class="row">
29
            <div class="col-1 item-caption ">创建日期</div>
30
            <div class="col-5">
31
                <div class="form-item date" defVal="" name="bt"></div>
32
            </div>
33
            <div class="col-1 item-caption center">至</div>
34
            <div class="col-5">
35
                <div class="form-item date" defVal="" name="et"></div>
36
            </div>
37
        </div>
38
        <div class="row">
39
            <div class="col-10">
40
41
            </div>
42
            <div class="col-2">
43
                <div class="btn opt-query pull-right">
44
                    <i class="icon-search"></i> 查询
45
                </div>
46
            </div>
47
48
        </div>
49
    </div>
50
51
    <div class="container page-split"></div>
52
    <div class="container tpl-btns">
53
        <div class="row">
54
            <!--<div class="btn opt-new">-->
55
                <!--<i class="icon-plus"></i> 增加-->
56
            <!--</div>-->
57
            <div class="btn opt-check">
58
            <i class="icon-check"></i>审核
59
            </div>
60
        </div>
61
    </div>
62
    <div class="container dt-tpl">
63
        <table class="table table-bordered">
64
            <thead>
65
            <tr>
66
                <th class="opt-check" ><i class="icon icon-st-check"></i> </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
                <th>时间</th>
76
                <th>录入员</th>
77
                <th>审核状态</th>
78
            </tr>
79
            </thead>
80
            <tbody>
81
            <tr ch-dir="list">
82
                <td class="opt-check" ><i class="icon icon-st-check" id="{{id}}"></i></td>
83
                <td>{{pi}}</td>
84
                <td class="table-opt edit" pId="{{id}}"><div class="btn opt-auth state{{professorState}}">
85
                    <i class="icon-edit"></i>
86
                    编辑
87
                </div></td>
88
                <!--<td>{{name}}</td>-->
89
                <td class="table-opt" professorId="{{id}}"><a class="name">{{name}}</a></td>
90
                <td>{{title}}</td>
91
                <td>{{province}}</td>
92
                <td>{{orgName}}</td>
93
                <td>{{phone}}</td>
94
                <td>{{email}}</td>
95
                <td>{{createTime-showDay}}</td>
96
                <td>{{enter}}</td>
97
                <td class="hand-dict" dict="professorState" code="{{professorState}}"></td>
98
            </tr>
99
            </tbody>
100
            <tbody ch-dir="array.empty">
101
            <tr>
102
                <td class="empty-desc" colspan="12">表格暂无数据</td>
103
            </tr>
104
            </tbody>
105
        </table>
106
    </div>
107
    <ul class="dt-pager"></ul>
108
</div>

+ 99 - 0
html/model/sys/professor/index.html

@ -0,0 +1,99 @@
1
<div class="sys_professor_index" loadUri="../ajax/sys/professor/pqperson" pageSize="10" pageNo="1" pageIndex="pi">
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-1 item-caption">机构</div>
8
			<div class="col-5">
9
				<div class="form-item text" defVal="" name="orgName"></div>
10
			</div>
11
			<div class="col-1 item-caption ">专家</div>
12
			<div class="col-2">
13
				<div class="form-item text" defVal="" name="name"></div>
14
			</div>
15
			<div class="col-1 item-caption">审核状态</div>
16
			<div class="col-2">
17
				<div class="form-item select" dictCode="professorState" defVal="" name="professorState"></div>
18
			</div>
19
		</div>
20
		<div class="row">
21
			<div class="col-1 item-caption ">创建日期</div>
22
			<div class="col-5">
23
				<div class="form-item date" defVal="" name="bt"></div>
24
			</div>
25
			<div class="col-1 item-caption center">至</div>
26
			<div class="col-5">
27
				<div class="form-item date" defVal="" name="et"></div>
28
			</div>
29
		</div>
30
		<div class="row">
31
			<div class="col-10">
32
33
			</div>
34
			<div class="col-2">
35
				<div class="btn opt-query pull-right">
36
					<i class="icon-search"></i> 查询
37
				</div>
38
			</div>
39
40
		</div>
41
	</div>
42
43
	<div class="container page-split"></div>
44
	<div class="container tpl-btns">
45
		<div class="row">
46
			<div class="btn opt-new">
47
				<i class="icon-plus"></i> 增加
48
			</div>
49
			<!--<div class="btn opt-edit">-->
50
				<!--<i class="icon-edit"></i>编缉-->
51
			<!--</div>-->
52
		</div>
53
	</div>
54
	<div class="container dt-tpl">
55
		<table class="table table-bordered">
56
			<thead>
57
				<tr>
58
					<!--<th class="opt-check" ><i class="icon icon-st-check"></i> </th>-->
59
					<th>序号</th>
60
					<th>编辑</th>
61
					<th>专家</th>
62
					<th>职称</th>
63
					<th>城市</th>
64
					<th>机构</th>
65
					<th>手机</th>
66
					<th>邮箱</th>
67
					<th>时间</th>
68
					<th>录入员</th>
69
					<th>审核状态</th>
70
				</tr>
71
			</thead>
72
			<tbody>
73
				<tr ch-dir="list">
74
					<!--<td class="opt-check" ><i class="icon icon-st-check" id="{{id}}"></i></td>-->
75
					<td>{{pi}}</td>
76
					<td class="table-opt edit" pId="{{id}}"><div class="btn opt-auth state{{professorState}}">
77
						<i class="icon-edit"></i>
78
						编辑
79
					</div></td>
80
					<td class="table-opt" professorId="{{id}}"><a class="name">{{name}}</a></td>
81
					<td>{{title}}</td>
82
					<td>{{province}}</td>
83
					<td>{{orgName}}</td>
84
					<td>{{phone}}</td>
85
					<td>{{email}}</td>
86
					<td>{{createTime-showDay}}</td>
87
					<td>{{enter}}</td>
88
					<td class="hand-dict" dict="professorState" code="{{professorState}}"></td>
89
				</tr>
90
			</tbody>
91
			<tbody ch-dir="array.empty">
92
				<tr>
93
					<td class="empty-desc" colspan="11">表格暂无数据</td>
94
				</tr>
95
			</tbody>
96
		</table>
97
	</div>
98
	<ul class="dt-pager"></ul>
99
</div>

+ 88 - 0
html/model/sys/professor/new.html

@ -0,0 +1,88 @@
1
<div class="sys_professor_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="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="title"></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="office"></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 text" defVal="" name="orgName"></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 text" defVal="" name="department"></div>
34
            </div>
35
        </div>
36
        <div class="row">
37
            <div class="col-2 item-caption">所在城市</div>
38
            <div class="col-8">
39
                <form action="" name="form1">
40
                    <div class=" col-6 citybox">
41
														<span class="frmtype frmtypeW" id="Province">
42
				                                        	<em class="mr_sj"></em>
43
				                                            <i class="mr_show" id="oprovince">请选择省份</i>
44
				                                            <ul>
45
				                                                <li><a href="javascript:void(0)" alt="请选择省份">请选择省份</a></li>
46
				                                            </ul>
47
				                                            <input type="hidden" name="cho_Province"
48
                                                                   value="请选择省份">
49
				                                        </span>
50
                    </div>
51
                    <div class="col-6 citybox">
52
														<span class="frmtype frmtypeW" id="City">
53
				                                       		<em class="mr_sj"></em>
54
				                                            <i class="mr_show" id="ocity"></i>
55
				                                            <ul>
56
				                                                <li><a href="javascript:void(0)" alt="请选择城市">请选择城市</a></li>
57
				                                            </ul>
58
				                                            <input type="hidden" name="cho_City" value="请选择城市 ">
59
				                                        </span>
60
                    </div>
61
                </form>
62
            </div>
63
        </div>
64
        <div class="row">
65
            <div class="col-2 item-caption">联系电话</div>
66
            <div class="col-4">
67
                <div class="form-item text" defVal="" name="phone"></div>
68
            </div>
69
        </div>
70
        <div class="row">
71
            <div class="col-2 item-caption">联系邮箱</div>
72
            <div class="col-4">
73
                <div class="form-item text" defVal=""  name="email"></div>
74
            </div>
75
        </div>
76
        <div class="row">
77
            <div class="col-10"></div>
78
            <div class="col-4 pull-right">
79
                <div class="btn opt-goto">
80
                    <i class="icon-link"></i> 保存并继续录入
81
                </div>
82
                <div class="btn pull-right opt-save">
83
                    <i class="icon-check"></i> 保存
84
                </div>
85
            </div>
86
        </div>
87
    </div>
88
</div>

+ 2 - 2
js/city.min.js

@ -6,7 +6,7 @@ $(function() {
6 6
		prev = $('input[name=cho_Province]', form1),
7 7
		city = $('input[name=cho_City]', form1),
8 8
		area = $('input[name=cho_Area]', form1),
9
		vale = ['请选择企业总部所在省或直辖市', '请选择企业总部所在城市', '请选择地区'];
9
		vale = ['请选择省份', '请选择城市', '请选择地区'];
10 10
	form1.submit(function() {
11 11
		if(prev.val() == vale[0]) {
12 12
			alert(vale[0]);
@ -41,7 +41,7 @@ function(a) {
41 41
		}
42 42
		var d, e = {
43 43
				setId: ["#Province", "#City", "#Area"],
44
				stval: ["请选择企业总部所在省或直辖市", "请选择企业总部所在城市", "请选择地区"],
44
				stval: ["请选择省份", "请选择城市", "请选择地区"],
45 45
				czemt: "i",
46 46
				inpvt: 'input[name^="cho"]',
47 47
				intva: !0

+ 1 - 1
js/dyn-select.js

@ -108,7 +108,7 @@ $.use(["jQuery", "form", "doc", "util", "dropdown", "dict"], function($, form, d
108 108
			var dv = $e.attr(def) || "",
109 109
				dynUri = $e.attr("uri") || "";
110 110
			rv = dv;
111
			$.extend(dynCache, options[n] || {});
111
            $.extend(dynCache, options ? options[n] || {} : {});
112 112
			if(dynUri) {
113 113
				dynCache.uri = dynUri;
114 114
			}

+ 2 - 2
js/model/sys/org/edit.js

@ -34,7 +34,7 @@ spa_define(function () {
34 34
                            util.alert("请输入企业名称");
35 35
                        } else if (form.val().forShort == null) {
36 36
                            util.alert("请输入企业简称")
37
                        } else if (form.val().city == null || form.val().city === "请选择企业总部所在城市") {
37
                        } else if (form.val().city == null || form.val().city === "请选择城市") {
38 38
                            util.alert("请选择企业所在城市")
39 39
                        }
40 40
                        else form.doPost("../ajax/sys/org/update", function () {
@ -217,7 +217,7 @@ spa_define(function () {
217 217
                    var aVal = $(this).text();
218 218
                    $(this).parent().parent().parent().find('.mr_show').text(aVal);
219 219
                    $(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
220
                    if ($("#ocity").text() == "请选择企业总部所在城市") {
220
                    if ($("#ocity").text() == "请选择城市") {
221 221
                        $("#ocity").removeClass("mr_select");
222 222
                    } else {
223 223
                        $("#ocity").addClass("mr_select");

+ 5 - 3
js/model/sys/org/new.js

@ -35,7 +35,7 @@ spa_define(function () {
35 35
                            util.alert("请输入邮箱账户")
36 36
                        } else if (form.val().forShort == null) {
37 37
                            util.alert("请输入企业简称")
38
                        } else if (form.val().city == null || form.val().city === "请选择企业总部所在城市") {
38
                        } else if (form.val().city == null || form.val().city === "请选择城市") {
39 39
                            util.alert("请选择企业所在城市")
40 40
                        }
41 41
                        else form.doPost("../ajax/sys/org/create", function () {
@ -43,7 +43,9 @@ spa_define(function () {
43 43
                                if (data) {
44 44
                                    data();
45 45
                                }
46
                            }, {});
46
                            },function (data) {
47
                                util.alert(data.msg);
48
                            });
47 49
                    };
48 50
                root.find(".modal-ctrl .icon-times").on("click", function () {
49 51
                    spa.closeModal();
@ -193,7 +195,7 @@ spa_define(function () {
193 195
                    var aVal = $(this).text();
194 196
                    $(this).parent().parent().parent().find('.mr_show').text(aVal);
195 197
                    $(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
196
                    if ($("#ocity").text() == "请选择企业总部所在城市") {
198
                    if ($("#ocity").text() == "请选择城市") {
197 199
                        $("#ocity").removeClass("mr_select");
198 200
                    } else {
199 201
                        $("#ocity").addClass("mr_select");

+ 76 - 0
js/model/sys/professor/check.js

@ -0,0 +1,76 @@
1
/**
2
 * Created by TT on 2017/5/31.
3
 */
4
;
5
spa_define(function(){
6
    return $.use(["spa","pagedatagrid","util","form"],function(spa,pdgf,util,form){
7
        return{
8
            main: function() {
9
                var root = spa.findInMain(".sys_professor_check");
10
                var pdg = pdgf.build(root);
11
12
                root.find(".opt-query").on("click", function() {
13
                    pdg.load();
14
                });
15
16
                pdg.code.shell("showDay", function(env) {
17
                    if(env.cd && env.cd[this.k]) {
18
                        var day = env.cd[this.k];
19
                        return day.substring(0, 4) + "年" + day.substring(4, 6) + "月" + day.substring(6, 8) + "日";
20
                    }
21
                    return "";
22
                });
23
                pdg.code.listen($.dict.doTransfer);
24
                pdg.load();
25
                // root.find(".opt-new").on("click", function() {
26
                //     spa.showModal("sys_professor_new", function() { pdg.load() });
27
                // });
28
                root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function() {
29
                    var $this = $(this);
30
                    $this.toggleClass("checked");
31
                    if($this.hasClass("checked")) {
32
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
33
                    } else {
34
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
35
                    }
36
                });
37
                root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function() {
38
                    var $this = $(this);
39
                    $this.toggleClass("checked");
40
                });
41
                root.find(".opt-check").on("click", function() {
42
                    var $check = root.find("td.opt-check>i.checked");
43
                    if($check.length) {
44
                        var ret =[];
45
                        $check.each(function(){
46
                            ret.push($(this).attr("id"));
47
                        });
48
                        util.boxMsg({
49
                            title: "审核确认",
50
                            content: "请确认审核结果!!!!",
51
                            btns: [{ caption: "审核通过", hand: function() {
52
                                util.post("../ajax/sys/professor/check",{ids:ret,professorState:0},function(){pdg.load()},{});
53
                            } },{ caption: "审核失败", hand: function() {
54
                                util.post("../ajax/sys/professor/check",{ids:ret,professorState:1},function(){pdg.load()},{});
55
                            } },
56
                                { caption: "取消" }
57
                            ]
58
                        });
59
                    } else {
60
                        util.alert("请选择一名专家");
61
                    }
62
                });
63
                root.on("click", ".opt-auth", function () {
64
                    var id = $(this).parent().attr("pId");
65
                    window.open('http://www.ekexiu.com/information-console.html?professorId=' + id);
66
                });
67
                root.on("click",".table-opt a.name", function () {
68
                    var professorId = $(this).parent().attr("professorId");
69
                    window.open('http://www.ekexiu.com/information-brow.html?professorId=' + professorId);
70
                });
71
            },mainDestory: function() {
72
73
            },
74
        };
75
    });
76
});

+ 61 - 0
js/model/sys/professor/index.js

@ -0,0 +1,61 @@
1
;
2
spa_define(function(){
3
	return $.use(["spa","pagedatagrid","util"],function(spa,pdgf,util){
4
		return{
5
			main: function() {
6
				var root = spa.findInMain(".sys_professor_index");
7
				var pdg = pdgf.build(root);
8
				pdg.code.shell("showDay", function(env) {
9
					if(env.cd && env.cd[this.k]) {
10
						var day = env.cd[this.k];
11
						return day.substring(0, 4) + "年" + day.substring(4, 6) + "月" + day.substring(6, 8) + "日";
12
					}
13
					return "";
14
				});
15
				pdg.code.listen($.dict.doTransfer);
16
				root.find(".opt-query").on("click", function() {
17
					pdg.load();
18
				});
19
				pdg.load();
20
				root.find(".opt-new").on("click", function() {
21
					spa.showModal("sys_professor_new", function() { pdg.load() });
22
				});
23
				root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function() {
24
					var $this = $(this);
25
					$this.toggleClass("checked");
26
					if($this.hasClass("checked")) {
27
						root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
28
					} else {
29
						root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
30
					}
31
				});
32
				root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function() {
33
					var $this = $(this);
34
					$this.toggleClass("checked");
35
				});
36
				root.find(".opt-edit").on("click", function() {
37
					var $org = root.find("td.opt-check>i.checked");
38
					if($org.length) {
39
						if($org.length > 1) {
40
							util.alertMsg("只能选择一个机构");
41
						} else {
42
                            window.open('http://www.ekexiu.com/information-console.html?professorId=' + $org.attr("id"));
43
						}
44
					} else {
45
						util.alert("请选择一个机构");
46
					}
47
				});
48
                root.on("click", ".opt-auth", function () {
49
                    var id = $(this).parent().attr("pId");
50
                    window.open('http://www.ekexiu.com/information-console.html?professorId=' + id);
51
                });
52
                root.on("click",".table-opt a.name", function () {
53
                    var professorId = $(this).parent().attr("professorId");
54
                    window.open('http://www.ekexiu.com/information-brow.html?professorId=' + professorId);
55
                });
56
			},mainDestory: function() {
57
58
			},
59
		};
60
	});
61
});

+ 66 - 0
js/model/sys/professor/new.js

@ -0,0 +1,66 @@
1
/**
2
 * Created by TT on 2017/5/18.
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_professor_new");
10
                var form = fb.build(root.find(".newForm"));
11
                var id = util.data("loginUser").id;
12
                var saveBtn = root.find(".opt-save"),
13
                    gotoBtn = root.find(".opt-goto"),
14
                    save = function (boolean) {
15
                        form.val({cuserId: id, professorState: 2, authentication: 1});
16
                        if (form.val().orgType == null) {
17
                            form.val({orgType: 1});
18
                        }
19
                        if (form.val().name == null) {
20
                            util.alert("请输入专家姓名");
21
                        } else if (form.val().orgName == null) {
22
                            util.alert("请输入所在机构名称")
23
                        } else
24
                            form.doPost("../ajax/sys/professor", function (id) {
25
                                spa.closeModal();
26
                                if (data) {
27
                                    data();
28
                                }
29
                                if (boolean) {
30
                                    window.open('http://www.ekexiu.com/information-console.html?professorId=' + id);
31
                                }
32
                            }, function (data) {
33
                                util.alert(data.msg);
34
                            });
35
                    };
36
                root.find(".modal-ctrl .icon-times").on("click", function () {
37
                    spa.closeModal();
38
                });
39
                $.fn.citySelect();
40
                $(document).on("click", "#City li a", function () {
41
                    var aVal = $(this).text();
42
                    $(this).parent().parent().parent().find('.mr_show').text(aVal);
43
                    $(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
44
                    if ($("#ocity").text() == "请选择城市") {
45
                        $("#ocity").removeClass("mr_select");
46
                    } else {
47
                        $("#ocity").addClass("mr_select");
48
                    }
49
                    if ($("#oprovince").text() != "请选择省份") {
50
                        form.val({province: $("#oprovince").text()});
51
                    }
52
                    if ($("#ocity").text() != "请选择城市") {
53
                        from.val({address: $("#ocity").text()});
54
                    }
55
56
                });
57
                saveBtn.on("click", function () {
58
                    save();
59
                });
60
                gotoBtn.on("click", function () {
61
                    save(true);
62
                });
63
            }
64
        }
65
    });
66
});