XMTT лет назад: 7
Родитель
Сommit
b10546735c

+ 10 - 4
html/model/sys/demand/index.html

@ -48,30 +48,36 @@
48 48
        <table class="table table-bordered">
49 49
            <thead>
50 50
            <tr>
51
                <th>操作</th>
51
                <th>查看</th>
52 52
                <th>序号</th>
53 53
                <th>主题</th>
54 54
                <th>需求目的</th>
55 55
                <th>发布者</th>
56 56
                <th>发布时间</th>
57 57
                <th>需求类型</th>
58
                <th>需求状态</th>
59
                <th>操作</th>
58 60
            </tr>
59 61
            </thead>
60 62
            <tbody>
61 63
            <tr ch-dir="list">
62
                <td class="table-opt" demandId="{{demandId}}"><i class="icon icon-edit"></i></td>
64
                <td class="table-opt" demandId="{{demandId}}"><i class="icon icon-eye-open"></i></td>
63 65
                <td>{{pi}}</td>
64 66
                <td>{{demandTitle}}</td>
65 67
                <td class="hand-dict" dict="demandAim" code="{{demandAim}}"></td>
66 68
                <td>{{professorName}}</td>
67 69
                <td>{{createTime-showDay}}</td>
68 70
                <td class="hand-dict" dict="demandType" code="{{demandType}}"></td>
69
71
                <td>{{demandStatus-status2}}</td>
72
                <td class="table-opt col-1" demandId="{{demandId}}" demandStatus="{{demandStatus}}"><div class="btn opt-auth">
73
                    <i class="icon-random"></i>
74
                    {{demandStatus-status}}
75
                </div></td>
70 76
            </tr>
71 77
            </tbody>
72 78
            <tbody ch-dir="array.empty">
73 79
            <tr>
74
                <td class="empty-desc" colspan="7">表格暂无数据</td>
80
                <td class="empty-desc" colspan="9">表格暂无数据</td>
75 81
            </tr>
76 82
            </tbody>
77 83
        </table>

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

@ -35,7 +35,7 @@
35 35
					<td>{{orgName}}</td>
36 36
					<td class="hand-dict" dict="solveStatus" code="{{solveStatus}}" ></td>
37 37
					<td class="table-opt" authApplyId="{{authApplyId}}"><div class="btn opt-auth">
38
						<i class="icon-plus"></i>
38
						<i class="icon-checked"></i>
39 39
						审核
40 40
					</div></td>
41 41
				</tr>

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

@ -33,7 +33,7 @@
33 33
					<td>{{name}}</td>
34 34
					<td class="hand-dict" dict="solveStatus" code="{{solveStatus}}" ></td>
35 35
					<td class="table-opt" authApplyId="{{authApplyId}}"><div class="btn opt-auth">
36
						<i class="icon-plus"></i>
36
						<i class="icon-checked"></i>
37 37
						审核
38 38
					</div></td>
39 39
				</tr>

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

@ -35,7 +35,7 @@
35 35
					<td>{{orgName}}</td>
36 36
					<td class="hand-dict" dict="solveStatus" code="{{solveStatus}}" ></td>
37 37
					<td class="table-opt" authApplyId="{{authApplyId}}"><div class="btn opt-auth">
38
						<i class="icon-plus"></i>
38
						<i class="icon-checked"></i>
39 39
						审核
40 40
					</div></td>
41 41
				</tr>

+ 60 - 11
js/model/sys/demand/index.js

@ -2,42 +2,91 @@
2 2
 * Created by TT on 2017/5/8.
3 3
 */
4 4
;
5
spa_define(function(){
6
    return $.use(["spa","pagedatagrid","util"],function(spa,pdgf,util){
7
        return{
8
            main: function() {
5
spa_define(function () {
6
    return $.use(["spa", "pagedatagrid", "util"], function (spa, pdgf, util) {
7
        return {
8
            main: function () {
9 9
                var root = spa.findInMain(".sys_demand_index");
10 10
                var pdg = pdgf.build(root);
11
                pdg.code.shell("showDay", function(env) {
12
                    if(env.cd && env.cd[this.k]) {
11
                pdg.code.shell("showDay", function (env) {
12
                    if (env.cd && env.cd[this.k]) {
13 13
                        var day = env.cd[this.k];
14 14
                        return day.substring(0, 4) + "-" + day.substring(4, 6) + "-" + day.substring(6, 8);
15 15
                    }
16 16
                    return "";
17 17
                });
18
                pdg.code.shell("status", function (env) {
19
                    var v = env.cd[this.k];
20
                    return v === "1" ? "关闭需求" : (v === "0" ? "打开需求" : "");
21
                });
22
                pdg.code.shell("status2", function (env) {
23
                    var v = env.cd[this.k];
24
                    return v === "1" ? "发布中" : (v === "0" ? "已关闭" : "");
25
                });
18 26
                pdg.code.listen($.dict.doTransfer);
19
                root.find(".opt-query").on("click", function() {
27
                root.find(".opt-query").on("click", function () {
20 28
                    pdg.load();
21 29
                });
22 30
                pdg.load();
23
                root.on("click", ".icon-edit", function() {
31
                root.on("click", ".icon-eye-open", function () {
24 32
                    var $this = $(this);
25 33
                    var demandId = $this.parent().attr("demandId");
26
                    util.get("../ajax/demand/id/" + demandId, null, function(rd) {
34
                    util.get("../ajax/demand/id/" + demandId, null, function (rd) {
27 35
                        if (rd) {
28 36
                            spa.showModal("sys_demand_edit", {
29 37
                                data: rd,
30
                                hand: function() {
38
                                hand: function () {
31 39
                                    pdg.load()
32 40
                                }
33 41
                            })
34 42
                        } else {
35
                            util.alert("客户选择有误", function() {
43
                            util.alert("客户选择有误", function () {
36 44
                                pdg.load();
37 45
                            });
38 46
                        }
39 47
                    }, {});
40 48
                });
49
                root.on("click", ".opt-auth", function () {
50
                    var demandId = $(this).parent().attr("demandId");
51
                    var demandStatus = $(this).parent().attr("demandStatus");
52
                    if (demandId) {
53
                        if (demandStatus == "1") {
54
                            util.boxMsg({
55
                                title: "确认关闭",
56
                                content: "您是否要关闭选中的需求!!!!!!!!!!!!!!!!!!",
57
                                btns: [{
58
                                    caption: "关闭", hand: function () {
59
                                        util.post("../ajax/demand/close", {
60
                                            demandId: demandId,
61
                                            demandStatus: demandStatus
62
                                        }, function () {
63
                                            pdg.load();
64
                                        });
65
                                    }
66
                                },
67
                                    {caption: "取消"}
68
                                ]
69
                            });
70
                        }if (demandStatus == "0"){
71
                            util.boxMsg({
72
                                title: "确认打开",
73
                                content: "您是否要打开选中的需求",
74
                                btns: [{
75
                                    caption: "打开", hand: function () {
76
                                        util.post("../ajax/demand/close", {
77
                                            demandId: demandId,
78
                                            demandStatus: demandStatus
79
                                        }, function () {
80
                                            pdg.load();
81
                                        });
82
                                    }
83
                                },
84
                                    {caption: "取消"}
85
                                ]
86
                            });
87
                        }
88
                    }
89
                });
41 90
            }
42 91
        };
43 92
    });