zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
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
167
168
169
170
171
172
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/pms/pub/combobox/comboboxUtil.js" charset="utf-8"></script>
<script type="text/javascript">
        //$.loadComboboxData($("#shift1"),"SHIFT",false);
        $.loadComboboxData($("#team1"),"TEAM",false);
        $.loadComboboxData($("#team2"),"TEAM",false);
        $.loadComboboxData($("#team3"),"TEAM",false);
 
        var team1Data="";
        var team2Data="";
        var team3Data="";
        $("#team1").combobox({
            onLoadSuccess: function(data){
                if(data!=null&&data.length>0){
                    team1Data = data;
                    $("#team1").combobox("setValue",data[0].id);
                    $("#teamName").val(data[0].name);
                }
            },onChange: function (n, o) {
                //var intVal = parseInt(n);
                //alert(data[intVal].name);
                if(team1Data!=null&&team1Data.length>0){
                    $("#teamName").val(team1Data[(n-1)].name);
                }
            }
        });
        //teamTwoName
        $("#team2").combobox({
            onLoadSuccess: function(data){
                if(data!=null&&data.length>0){
                    team2Data = data;
                    $("#team2").combobox("setValue",data[1].id);
                    $("#teamTwoName").val(data[1].name);
                }
            },onChange: function (n, o) {
                if(team2Data!=null&&team2Data.length>0){
                    $("#teamTwoName").val(team2Data[(n-1)].name);
                }
            }
        });
        //teamThreeName
        $("#team3").combobox({
            onLoadSuccess: function(data){
                if(data!=null&&data.length>0){
                    team3Data = data;
                    if(data.length>1){
                        $("#team3").combobox("setValue",data[2].id);
                        $("#teamThreeName").val(data[2].name);
                    }
                }
            },onChange: function (n, o) {
                if(team3Data!=null&&team3Data.length>0){
                    $("#teamThreeName").val(team3Data[(n-1)].name);
                }
            }
        });
 
        $("#shiftnum").combobox({
            onLoadSuccess: function(data){
                $("#shift3").hide();
            },onChange: function (n, o) {
                console.info(n)
 
                if(n==1){
                    $("#shift2").hide();
                    $("#shift3").hide();
                } else if (n==2){
                    $("#shift3").hide();
                    $("#shift2").show();
                } else if (n==3){
                    $("#shift2").show();
                    $("#shift3").show();
                }
            }
        });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding:5px">
        <form id="form" method="post">
            <fieldset>
                <legend>请按周排班</legend>
                <table class="table" style="width: 100%;">
                    <tr>
                        <th>工单类型</th>
                        <td>
                            <select name="type"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:130">
                                <option value="1">卷包封装车间</option>                    
                                <%--<option value="2">成型机车间</option>        --%>
                            </select>
                        </td>
                        <th>班次数量</th>
                        <td>
                            <select name="shiftnum" id="shiftnum"
 
                                    data-options="panelHeight:'auto',editable:false,width:130">
                                <option value="1">1个班</option>
                                <option value="2" selected>2个班</option>
                                <option value="3">3个班</option>
                            </select>
 
                        </td>
                    </tr>
                    
                    <tr id="shift1">
                        <th>班次1</th>
                        <td>
                            <select name="shiftId"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:130">
                                <option value="1">早班</option>                        
                            </select>
                            <input type="hidden" name="shiftName" value="早班">
                        </td>
                        <th>班组1</th>
                        <td>
                            <input  id="team1" name="teamId" style="width:130px"/>
                            <input  type="hidden" name="teamName" id="teamName">
                        </td>
                    </tr>
                    <tr id="shift2">
                        <th>班次2</th>
                        <td>
                            <select name="shiftTwoId"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:130">
                                <option value="2">中班</option>
                                <input type="hidden" name="shiftTwoName" value="中班">                
                            </select>
                        </td>
                        <th>班组2</th>
                        <td>
                            <input  id="team2" name="teamTwoId" style="width:130px"/>
                            <input  type="hidden" name="teamTwoName" id="teamTwoName">
                        </td>
                    </tr>
                    <tr id="shift3">
                        <th>班次3</th>
                        <td>
                            <select name="shiftThreeId"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:130">
                                <option value="3">晚班</option>                        
                            </select>
                            <input type="hidden" name="shiftThreeName" value="晚班">
                        </td>
                        <th>班组3</th>
                        <td>
                            <input  id="team3" name="teamThreeId" style="width:130px"/>
                            <input  type="hidden" name="teamThreeName" id="teamThreeName">
                        </td>
                    </tr>
                    
                    
                    
                    <tr>
                        <th>排班开始时间</th>
                        <td>
                            <input name="stim" type="text" class="easyui-my97" datefmt="yyyy-MM-dd" style="width:130px"/>
                        </td>
                        <th>排班结束时间</th>
                        <td>
                            <input name="etim" type="text" class="easyui-my97" datefmt="yyyy-MM-dd" style="width:130px"/>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </form>
    </div>
</div>