严智鑫
2025-08-18 3b65a5dc04be7cdac460c84ebaa38bf009405128
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<%@ page language="java" pageEncoding="UTF-8"%>
<!-- 更换班组信息 -->
<div class="modal fade" id="div_banzu" tabindex="-1" role="dialog"
    aria-labelledby="myModalLabel" aria-hidden="true">
    <form class="form-horizontal" role="form">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">&times;</button>
                    <h3 class="modal-title" id="UNum_AlertTitle">更换班组</h3>
                </div>
                <div class="modal-body" style="text-align: left;">
 
                    <div class="form-group">
 
                        <!-- <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">当前班组 </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <span class="input-group-addon s-style" id='lckNO'>NG</span>
                                </div> -->
                        <br /> <br /> <br />
                        <h4>
                            <label class="col-lg-4 control-label no-padding-right"
                                style="font-weight: bolder;">选择班组 </label>
                        </h4>
                        <div class="col-lg-6 input-group">
                            <select id="s_banzu" class="span_tasktext form-control"
                                style="font-size: 18px">
                            </select>
                        </div>
                        <br /> <br /> <br />
                    </div>
 
                    <div class="form-group">
 
                        <p style="text-align: center; font-size: 20px; color: red"
                            id="bz-warring-info"></p>
                    </div>
 
 
                </div>
                <div class="modal-footer">
 
                    <button type="button" class="btn btn-primary btn-lg"
                        data-dismiss="modal">取消</button>
 
                    <button type="button" class="btn btn-danger btn-lg" id="DEL_button"
                        onclick="OK_Submit('班组')">确认</button>
                </div>
            </div>
        </div>
    </form>
</div>
 
<!-- 更换班组 -->
<script>
var p_url = "/gmms2/mesview/data/_public_manage";
    function getCurrentBanZu() {
        $.ajax({
            type : "post",
            data : {
                caozuo : "查询",
                leixing : "当前班组",
                gongyi : gongyi,
                line : group
            },
            dataType : "json",
            url : p_url,
            success : function(data) {
                current_bz = data[0][0];
                $("#s_current_banzu").text(data[0][0]);
            },
            error : function(data) {
 
            }
        });
 
        $.ajax({
                    type : "post",
                    data : {
                        caozuo : "查询",
                        leixing : "班组列表",
                        gongyi : gongyi,
                        line : group
                    },
                    dataType : "json",
                    url : p_url,
                    success : function(data) {
 
                        d = data;
                        var html = " <option selected=\"selected\"  value='0'>选择班组</option>";
                        $("#s_banzu").empty();
                        for (var i = 0; i < d.length; i++) {
                            html += " <option  value="+d[i][0]+">" + d[i][0]
                                    + "</option>";
                        }
                        document.getElementById("s_banzu").innerHTML += html;
 
                        //AddBPShow(2,isshow);
 
                    },
                    error : function(data) {
 
                    }
                });
    }
 
    function onChangeBanZu() {
        $("#div_banzu").modal('toggle');
        //$("#s_banzu").selectedIndex= 0;
    }
 
    function OK_Submit(type) {
 
        switch (type) {
        case "班组":
            setBanZu();
            break;
        case "次破":
            setCiPo();
            break;
        default:
            ;
        }
    }
 
    function setBanZu() {
 
        var bz = $("#s_banzu").val();
        if (bz == 0) {
            $("#bz-warring-info").text("请选择正确的班组");
            return;
        }
        $.ajax({
            type : "post",
            data : {
                caozuo : "修改",
                leixing : "变更班组",
                line : group,
                gongyi : gongyi,
                info : bz
 
            },
            url : p_url,
            dataType : 'text',
            success : function(data) {
                if (data == 1) {
                    current_bz = bz;
                    $("#s_current_banzu").text(bz);
                    $("#div_banzu").modal('toggle');
                    return;
                } else {
                    $("#bz-warring-info").text("班组变更失败,请检查原因:" + data);
                }
            },
            error : function(data) {
                $("#bz-warring-info").text("班组变更异常,请检查原因:" + data);
            }
        })
 
    }
    getCurrentBanZu();
</script>