sale.js
1.53 KB
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
QSale = {
oldDayId:1,
oldWeekId:1,
init:function()
{
this.dayPage('','');
this.weekPage('','');
},
dayPage:function(page, obj)
{
QGlobal.Page.QSend_Url = '/winner/datelist';
QGlobal.Page.QItem = 'dayItem';
QGlobal.Page.getList('winner_type=1&' + page, obj);
},
weekPage:function(page,obj)
{
QGlobal.Page.QSend_Url = '/winner/datelist';
QGlobal.Page.QItem = 'weekItem';
QGlobal.Page.getList('winner_type=2&' + page, obj);
},
showWinnerList:function(id,winner_date, winner_type)
{
if(typeof winner_date == 'undefined' || winner_date == '')
{
return false;
}
$.get('/winner/winnerlist', {'winner_date':winner_date, 'winner_type':winner_type}, function(html){
if(html != ''){
if(winner_type == 1)
{
$('#dayList').html(html);
$('#day_' + QSale.oldDayId).attr('class', '');
$('#day_' + id).attr('class', 'act');
QSale.oldDayId = id;
}else{
$('#weekList').html(html);
$('#week_' + QSale.oldWeekId).attr('class','');
$('#week_' + id).attr('class', 'act');
QSale.oldWeekId = id;
}
}
});
},
showsub_b:function (id)
{
for (i = 0;i<=10;i++)
{
document.getElementById("tab_b"+i).className = "";
document.getElementById("sub_b"+i).style.display = "none";
}
document.getElementById("tab_b"+id).className = "act";
document.getElementById("sub_b"+id).style.display = "";
},
showsub : function (id)
{
for (i = 0;i<4;i++)
{
document.getElementById("sub_b"+i).style.display = "none";
}
document.getElementById("sub_b"+id).style.display = "";
}
};