3 Commits 2676a86705 ... 57fca2c3ea

Author SHA1 Message Date
  XMTT 57fca2c3ea auth_type 7 years ago
  XMTT a6c9a0c45d 专家权重设置 7 years ago
  XMTT d3a2b2e39b authtype =1 7 years ago

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

@ -20,6 +20,10 @@
20 20
    display: none;
21 21
}
22 22
23
.sys_professor_weight{
24
    width: 600px;
25
}
26
23 27
.sys_professor_new{
24 28
    width: 800px;
25 29
    height: 600px;

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

@ -57,6 +57,9 @@
57 57
            <div class="btn opt-check">
58 58
            <i class="icon-check"></i>审核
59 59
            </div>
60
            <div class="btn opt-weight">
61
            <i class="icon-pushpin"></i>权重
62
            </div>
60 63
        </div>
61 64
    </div>
62 65
    <div class="container dt-tpl">
@ -75,6 +78,7 @@
75 78
                <th>时间</th>
76 79
                <th>录入员</th>
77 80
                <th>审核状态</th>
81
                <th>权重</th>
78 82
            </tr>
79 83
            </thead>
80 84
            <tbody>
@ -95,6 +99,7 @@
95 99
                <td>{{createTime-showDay}}</td>
96 100
                <td>{{enter}}</td>
97 101
                <td class="hand-dict" dict="professorState" code="{{professorState}}"></td>
102
                <td>{{sortFirst}}</td>
98 103
            </tr>
99 104
            </tbody>
100 105
            <tbody ch-dir="array.empty">

+ 23 - 0
html/model/sys/professor/weight.html

@ -0,0 +1,23 @@
1
<div class="sys_professor_weight 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="sortFirst"></div>
10
            </div>
11
        </div>
12
13
        <div class="row">
14
            <div class="col-10"></div>
15
            <div class="col-2">
16
                <div class="btn pull-right opt-save">
17
                    <i class="icon-check"></i> SAVE
18
                </div>
19
            </div>
20
        </div>
21
22
    </div>
23
</div>

+ 20 - 2
js/model/sys/professor/check.js

@ -49,9 +49,9 @@ spa_define(function(){
49 49
                            title: "审核确认",
50 50
                            content: "请确认审核结果!!!!",
51 51
                            btns: [{ caption: "审核通过", hand: function() {
52
                                util.post("../ajax/sys/professor/check",{ids:ret,professorState:0},function(){pdg.load()},{});
52
                                util.post("../ajax/sys/professor/check",{ids:ret,professorState:0,authType:1,authStatusExpert:3},function(){pdg.load()},{});
53 53
                            } },{ caption: "审核失败", hand: function() {
54
                                util.post("../ajax/sys/professor/check",{ids:ret,professorState:1},function(){pdg.load()},{});
54
                                util.post("../ajax/sys/professor/check",{ids:ret,professorState:1,authType:0,authStatusExpert:0},function(){pdg.load()},{});
55 55
                            } },
56 56
                                { caption: "取消" }
57 57
                            ]
@ -60,6 +60,24 @@ spa_define(function(){
60 60
                        util.alert("请选择一名专家");
61 61
                    }
62 62
                });
63
                root.find(".opt-weight").on("click", function() {
64
                    var $professor = root.find("td.opt-check>i.checked");
65
                    if($professor.length) {
66
                        if($professor.length > 1) {
67
                            util.alert("只能选择一个用户");
68
                        } else {
69
                            $.util.get("../ajax/sys/professor/id/"+$professor.attr("id"),null,function(rd){
70
                                if(rd){
71
                                    spa.showModal("sys_professor_weight", { data:rd, hand: function() { pdg.load() } })
72
                                }else{
73
                                    util.alertMsg("专家不存在", function(){pdg.load();});
74
                                }
75
                            },{});
76
                        }
77
                    } else {
78
                        util.alert("请选择一个用户");
79
                    }
80
                });
63 81
                root.on("click", ".opt-auth", function () {
64 82
                    var id = $(this).parent().attr("pId");
65 83
                    window.open('http://www.ekexiu.com/information-console.html?professorId=' + id);

+ 43 - 0
js/model/sys/professor/weight.js

@ -0,0 +1,43 @@
1
/**
2
 * Created by TT on 2017/6/8.
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_weight");
10
                var form = fb.build(root.find(".newForm"));
11
                var sortFirst ;
12
                if (data.data.sortFirst!=0) {
13
                    sortFirst = data.data.sortFirst;
14
                }else if (data.data.activeTime){
15
                    sortFirst = 20;
16
                } else {
17
                    sortFirst = 0;
18
                }
19
20
                form.val({sortFirst: sortFirst,id:data.data.id});
21
22
                var saveBtn = root.find(".opt-save"),
23
                    save = function () {
24
                        if (form.val().sortFirst == null) {
25
                            util.alert("权重码不能为空")
26
                        }else
27
                        form.doPost("../ajax/sys/professor/sortFirst", function () {
28
                                spa.closeModal();
29
                                if (data.hand) {
30
                                    data.hand();
31
                                }
32
                            }, {});
33
                    };
34
35
                root.find(".modal-ctrl .icon-times").on("click", function () {
36
                    spa.closeModal();
37
                });
38
39
                saveBtn.on("click", save);
40
            }
41
        }
42
    });
43
});