|
|
@@ -96,12 +96,12 @@
|
|
96
|
96
|
var bl = false;
|
|
97
|
97
|
$(document).ready(function () {
|
|
98
|
98
|
|
|
99
|
|
- //var rl = $('#RoleCode', top.document).val();
|
|
100
|
|
- //if (rl == "GLY") {
|
|
101
|
|
- // bl = true;
|
|
102
|
|
- // $(".zxarea").show();
|
|
103
|
|
- //}
|
|
104
|
|
- bl = true;
|
|
|
99
|
+ var rl = $('#RoleCode', top.document).val();
|
|
|
100
|
+ var gcode = $('#GroupCode', top.document).val();
|
|
|
101
|
+ if (rl == "GLY") {
|
|
|
102
|
+ bl = true;
|
|
|
103
|
+ //$(".zxarea").show();
|
|
|
104
|
+ }
|
|
105
|
105
|
$(".zxarea").show();
|
|
106
|
106
|
|
|
107
|
107
|
$.getJSON(huayi.config.callcenter_url + 'Class/GetClassList', {
|
|
|
@@ -113,32 +113,38 @@
|
|
113
|
113
|
+ "' outtime='" + n.F_OutTime + "'>" + n.F_Name + "[" + n.F_InTime + "-" + n.F_OutTime + "]" + "</div>";
|
|
114
|
114
|
$("#external-events").append(html);
|
|
115
|
115
|
})
|
|
116
|
|
- $("#external-events div.external-event").each(function () {
|
|
117
|
|
- var d = { title: $.trim($(this).text()), classcode: $(this).attr("code"), intime: $(this).attr("intime"), outtime: $(this).attr("outtime") };
|
|
118
|
|
- $(this).data("eventObject", d);
|
|
119
|
|
- $(this).draggable({ zIndex: 999, revert: true, revertDuration: 0})
|
|
120
|
|
- });
|
|
|
116
|
+ if (bl) {
|
|
|
117
|
+ $("#external-events div.external-event").each(function () {
|
|
|
118
|
+ var d = { title: $.trim($(this).text()), classcode: $(this).attr("code"), intime: $(this).attr("intime"), outtime: $(this).attr("outtime") };
|
|
|
119
|
+ $(this).data("eventObject", d);
|
|
|
120
|
+ $(this).draggable({ zIndex: 999, revert: true, revertDuration: 0 })
|
|
|
121
|
+ });
|
|
|
122
|
+ }
|
|
121
|
123
|
}
|
|
122
|
124
|
});
|
|
123
|
125
|
//获取班组列表
|
|
124
|
|
- if (bl) {
|
|
125
|
|
- $.getJSON(huayi.config.callcenter_url + 'Group/GetGroupList', { "token": $.cookie("token") }, function (result) {
|
|
126
|
|
- if (result.state.toLowerCase() == "success") {
|
|
127
|
|
- $(result.data).each(function (i, n) {
|
|
128
|
|
- var html = "<div class='group drag' code='" + n.F_GroupCode + "'>";
|
|
129
|
|
- html += "<div class='seatuser ' code='" + n.F_GroupCode + "'>" + n.F_GroupName + "</div>";
|
|
130
|
|
- $(n.Users).each(function (j, m) {
|
|
131
|
|
- html += "<span class='lable' code='" + m.F_UserCode + "'>" + m.F_UserName + "</span>";
|
|
132
|
|
- })
|
|
133
|
|
- html += '<div class="clearfix"></div></div>';
|
|
134
|
|
- $("#bzlist").append(html);
|
|
135
|
|
- })
|
|
136
|
|
- $(".seatuser").click(function (i, n) {
|
|
137
|
|
- $(".seatuser").removeClass("active");
|
|
138
|
|
- $(this).addClass("active");
|
|
139
|
|
- bind();
|
|
140
|
|
- })
|
|
141
|
126
|
|
|
|
127
|
+ $.getJSON(huayi.config.callcenter_url + 'Group/GetGroupList', { "token": $.cookie("token") }, function (result) {
|
|
|
128
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
129
|
+ var num = 0;
|
|
|
130
|
+ $(result.data).each(function (i, n) {
|
|
|
131
|
+ var html = "<div class='group drag' code='" + n.F_GroupCode + "'>";
|
|
|
132
|
+ html += "<div class='seatuser ' code='" + n.F_GroupCode + "'>" + n.F_GroupName + "</div>";
|
|
|
133
|
+ $(n.Users).each(function (j, m) {
|
|
|
134
|
+ html += "<span class='lable' code='" + m.F_UserCode + "'>" + m.F_UserName + "</span>";
|
|
|
135
|
+ })
|
|
|
136
|
+ html += '<div class="clearfix"></div></div>';
|
|
|
137
|
+ $("#bzlist").append(html);
|
|
|
138
|
+ if (gcode == n.F_GroupCode) {
|
|
|
139
|
+ num = i+1;
|
|
|
140
|
+ }
|
|
|
141
|
+ })
|
|
|
142
|
+ $(".seatuser").click(function (i, n) {
|
|
|
143
|
+ $(".seatuser").removeClass("active");
|
|
|
144
|
+ $(this).addClass("active");
|
|
|
145
|
+ bind();
|
|
|
146
|
+ })
|
|
|
147
|
+ if (bl) {
|
|
142
|
148
|
$(".group span.lable").each(function () {
|
|
143
|
149
|
var d = { code: $(this).attr("code"), name: $(this).text() };
|
|
144
|
150
|
$(this).data("eventObject", d);
|
|
|
@@ -166,17 +172,19 @@
|
|
166
|
172
|
}
|
|
167
|
173
|
}
|
|
168
|
174
|
})
|
|
169
|
|
- $($(".seatuser")[0]).trigger("click");
|
|
170
|
175
|
}
|
|
171
|
|
- });
|
|
172
|
|
- $.getJSON(huayi.config.callcenter_url + 'GroupClass/GetNoGroupSeatList', { "token": $.cookie("token") }, function (result) {
|
|
173
|
|
- if (result.state.toLowerCase() == "success") {
|
|
174
|
|
- if (result.data.length > 0) {
|
|
175
|
|
- $(".wfz").show();
|
|
176
|
|
- $(result.data).each(function (i, n) {
|
|
177
|
|
- var html = "<span class='lable' style='display: inline;' code='" + n.F_UserCode + "'>" + n.F_UserName + "</span>";
|
|
178
|
|
- $("#zxlist").append(html);
|
|
179
|
|
- })
|
|
|
176
|
+ $($(".seatuser")[num]).trigger("click");
|
|
|
177
|
+ }
|
|
|
178
|
+ });
|
|
|
179
|
+ $.getJSON(huayi.config.callcenter_url + 'GroupClass/GetNoGroupSeatList', { "token": $.cookie("token") }, function (result) {
|
|
|
180
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
181
|
+ if (result.data.length > 0) {
|
|
|
182
|
+ $(".wfz").show();
|
|
|
183
|
+ $(result.data).each(function (i, n) {
|
|
|
184
|
+ var html = "<span class='lable' style='display: inline;' code='" + n.F_UserCode + "'>" + n.F_UserName + "</span>";
|
|
|
185
|
+ $("#zxlist").append(html);
|
|
|
186
|
+ })
|
|
|
187
|
+ if (bl) {
|
|
180
|
188
|
$("#zxlist span.lable").each(function () {
|
|
181
|
189
|
var d = { code: $(this).attr("code"), name: $(this).text() };
|
|
182
|
190
|
$(this).data("eventObject", d);
|
|
|
@@ -186,12 +194,10 @@
|
|
186
|
194
|
});
|
|
187
|
195
|
}
|
|
188
|
196
|
}
|
|
189
|
|
- });
|
|
190
|
|
- }
|
|
191
|
|
- else {
|
|
192
|
|
- bind();
|
|
193
|
|
- }
|
|
194
|
|
- })
|
|
|
197
|
+ }
|
|
|
198
|
+ });
|
|
|
199
|
+
|
|
|
200
|
+ });
|
|
195
|
201
|
function bind() {
|
|
196
|
202
|
$('#calendar').html("");
|
|
197
|
203
|
$('#calendar').fullCalendar({
|