Przeglądaj źródła

工作日管理展示修改

liuzhen 5 lat temu
rodzic
commit
40a1a88a6a

+ 8 - 7
WebUI/CallCenterWeb.UI/SystemManager/workOffDays.html

@@ -185,17 +185,15 @@
185 185
 
186 186
 						},
187 187
 						dayClick: function(date, allDay, jsEvent, view) {
188
-							console.log($(this).attr("data-date"));
189
-							$(this).children().children().find('.redFont').text();
190
-							console.log($(this).children().children().find('.redFont').text())
191
-							$(this).children().children().find('.redFont').addClass('active')
192
-							var Time = $(this).attr("data-date");
193
-							console.log(Time);
188
+							var that=this;
189
+							$(that).children().children().find('.redFont').text();
190
+							var Time = $(that).attr("data-date");
194 191
 							var type = 1;
195
-							if($(this).children().children().find('.redFont').text() != "休") {
192
+							if($(that).children().children().find('.redFont').text() != "休") {
196 193
 								layer.confirm('确定休息日吗?', {
197 194
 									btn: ['是', '否'] //按钮
198 195
 								}, function() {
196
+									$(that).children().children().find('.redFont').addClass('active')
199 197
 									$.ajax({
200 198
 										type: "post",
201 199
 										url: huayi.config.callcenter_url + "Workcalendar/setOfforOn",
@@ -211,6 +209,7 @@
211 209
 											if(data.state.toLowerCase() == "success") {
212 210
 												layer.msg("修改成功");
213 211
 												$('.active').text('休').css('background-color', 'red');
212
+												$(that).children().children().find('.redFont').removeClass('active')
214 213
 //												blur();
215 214
 											}
216 215
 										}
@@ -220,6 +219,7 @@
220 219
 								layer.confirm('确定设为工作日吗?', {
221 220
 								btn: ['是', '否'] //按钮
222 221
 							}, function() {
222
+								$(that).children().children().find('.redFont').addClass('active')
223 223
 								$.ajax({
224 224
 									type: "post",
225 225
 									url: huayi.config.callcenter_url + "Workcalendar/setOfforOn",
@@ -235,6 +235,7 @@
235 235
 										if(data.state.toLowerCase() == "success") {
236 236
 											layer.msg("修改成功");
237 237
 											$('.active').text('班').css('background-color', '#FFAB3D');
238
+											$(that).children().children().find('.redFont').removeClass('active')
238 239
 //											blur();
239 240
 										}
240 241
 									}