|
@@ -18,7 +18,7 @@ var ENUM = { |
|
@@ -18,7 +18,7 @@ var ENUM = { |
18
|
}
|
18
|
}
|
19
|
};
|
19
|
};
|
20
|
|
20
|
|
21
|
-var currentSelItem;
|
21
|
+var currentSelItem, currentTab;
|
22
|
|
22
|
|
23
|
/*下拉选择*/
|
23
|
/*下拉选择*/
|
24
|
common.dropDown({
|
24
|
common.dropDown({
|
|
@@ -40,28 +40,8 @@ var t = new common.tab({ |
|
@@ -40,28 +40,8 @@ var t = new common.tab({ |
40
|
el: "#basicTab",
|
40
|
el: "#basicTab",
|
41
|
click: function () {
|
41
|
click: function () {
|
42
|
var columnname = $(this).find('a').attr('columnname');
|
42
|
var columnname = $(this).find('a').attr('columnname');
|
43
|
- if (columnname == 'all') {
|
|
|
44
|
- g.options.columns[2].hidden = false;
|
|
|
45
|
- g.options.columns[3].hidden = true;
|
|
|
46
|
- g.options.columns[4].hidden = true;
|
|
|
47
|
- g.options.columns[5].hidden = true;
|
|
|
48
|
- g.options.columns[6].hidden = false;
|
|
|
49
|
- g.options.columns[7].hidden = true;
|
|
|
50
|
- } else if (columnname == 100) {
|
|
|
51
|
- g.options.columns[2].hidden = true;
|
|
|
52
|
- g.options.columns[3].hidden = false;
|
|
|
53
|
- g.options.columns[4].hidden = false;
|
|
|
54
|
- g.options.columns[5].hidden = true;
|
|
|
55
|
- g.options.columns[6].hidden = true;
|
|
|
56
|
- g.options.columns[7].hidden = false;
|
|
|
57
|
- } else {
|
|
|
58
|
- g.options.columns[2].hidden = true;
|
|
|
59
|
- g.options.columns[3].hidden = false;
|
|
|
60
|
- g.options.columns[4].hidden = false;
|
|
|
61
|
- g.options.columns[5].hidden = false;
|
|
|
62
|
- g.options.columns[6].hidden = true;
|
|
|
63
|
- g.options.columns[7].hidden = true;
|
|
|
64
|
- }
|
43
|
+ currentTab = columnname;
|
|
|
44
|
+ layoutGridCloum(columnname);
|
65
|
g.init('/payDelivery/queryPayDeliveryList');
|
45
|
g.init('/payDelivery/queryPayDeliveryList');
|
66
|
},
|
46
|
},
|
67
|
columns: [{
|
47
|
columns: [{
|
|
@@ -86,7 +66,7 @@ var g = new common.grid({ |
|
@@ -86,7 +66,7 @@ var g = new common.grid({ |
86
|
brandId: common.util.__input("brandId"),
|
66
|
brandId: common.util.__input("brandId"),
|
87
|
isPayDelivery: common.util.__input("isPayDelivery"),
|
67
|
isPayDelivery: common.util.__input("isPayDelivery"),
|
88
|
productSkn: common.util.__input("productSkn"),
|
68
|
productSkn: common.util.__input("productSkn"),
|
89
|
- status: (t.active && t.active != 'all') ? t.active : 400
|
69
|
+ status: (currentTab && currentTab != 'all') ? currentTab : 400
|
90
|
};
|
70
|
};
|
91
|
},
|
71
|
},
|
92
|
columns: [{
|
72
|
columns: [{
|
|
@@ -158,6 +138,31 @@ var g = new common.grid({ |
|
@@ -158,6 +138,31 @@ var g = new common.grid({ |
158
|
});
|
138
|
});
|
159
|
g.init('/payDelivery/queryPayDeliveryList');
|
139
|
g.init('/payDelivery/queryPayDeliveryList');
|
160
|
|
140
|
|
|
|
141
|
+function layoutGridCloum(tabname) {
|
|
|
142
|
+ if (tabname == 'all') {
|
|
|
143
|
+ g.options.columns[2].hidden = false;
|
|
|
144
|
+ g.options.columns[3].hidden = true;
|
|
|
145
|
+ g.options.columns[4].hidden = true;
|
|
|
146
|
+ g.options.columns[5].hidden = true;
|
|
|
147
|
+ g.options.columns[6].hidden = false;
|
|
|
148
|
+ g.options.columns[7].hidden = true;
|
|
|
149
|
+ } else if (tabname == 100) {
|
|
|
150
|
+ g.options.columns[2].hidden = true;
|
|
|
151
|
+ g.options.columns[3].hidden = false;
|
|
|
152
|
+ g.options.columns[4].hidden = false;
|
|
|
153
|
+ g.options.columns[5].hidden = true;
|
|
|
154
|
+ g.options.columns[6].hidden = true;
|
|
|
155
|
+ g.options.columns[7].hidden = false;
|
|
|
156
|
+ } else {
|
|
|
157
|
+ g.options.columns[2].hidden = true;
|
|
|
158
|
+ g.options.columns[3].hidden = false;
|
|
|
159
|
+ g.options.columns[4].hidden = false;
|
|
|
160
|
+ g.options.columns[5].hidden = false;
|
|
|
161
|
+ g.options.columns[6].hidden = true;
|
|
|
162
|
+ g.options.columns[7].hidden = true;
|
|
|
163
|
+ }
|
|
|
164
|
+}
|
|
|
165
|
+
|
161
|
// tab初始化
|
166
|
// tab初始化
|
162
|
var loadTab = function () {
|
167
|
var loadTab = function () {
|
163
|
t.active = undefined;
|
168
|
t.active = undefined;
|
|
@@ -172,17 +177,33 @@ var loadTab = function () { |
|
@@ -172,17 +177,33 @@ var loadTab = function () { |
172
|
}, 800);
|
177
|
}, 800);
|
173
|
};
|
178
|
};
|
174
|
|
179
|
|
|
|
180
|
+var reloadTab = function () {
|
|
|
181
|
+ t.active = undefined;
|
|
|
182
|
+ setTimeout(function () {
|
|
|
183
|
+ common.util.__ajax({
|
|
|
184
|
+ url: "/payDelivery/queryCountProductPayDelivery",
|
|
|
185
|
+ data: g.options.parms()
|
|
|
186
|
+ }, function (res) {
|
|
|
187
|
+ var __dt = $.extend({}, ENUM.tips, res.data);
|
|
|
188
|
+ t.load(__dt);
|
|
|
189
|
+ }, true);
|
|
|
190
|
+ }, 800);
|
|
|
191
|
+};
|
|
|
192
|
+
|
175
|
loadTab();
|
193
|
loadTab();
|
176
|
// 筛选
|
194
|
// 筛选
|
177
|
$(document).on('click', "#filter-btn", function () {
|
195
|
$(document).on('click', "#filter-btn", function () {
|
178
|
- loadTab();
|
|
|
179
|
- g.options.columns[2].hidden = false;
|
|
|
180
|
- g.options.columns[3].hidden = true;
|
|
|
181
|
- g.options.columns[4].hidden = true;
|
|
|
182
|
- g.options.columns[5].hidden = true;
|
|
|
183
|
- g.options.columns[6].hidden = false;
|
|
|
184
|
- g.options.columns[7].hidden = true;
|
196
|
+ //loadTab();
|
|
|
197
|
+ reloadTab();
|
|
|
198
|
+ //g.options.columns[2].hidden = false;
|
|
|
199
|
+ //g.options.columns[3].hidden = true;
|
|
|
200
|
+ //g.options.columns[4].hidden = true;
|
|
|
201
|
+ //g.options.columns[5].hidden = true;
|
|
|
202
|
+ //g.options.columns[6].hidden = false;
|
|
|
203
|
+ //g.options.columns[7].hidden = true;
|
|
|
204
|
+ layoutGridCloum(currentTab);
|
185
|
g.reload();
|
205
|
g.reload();
|
|
|
206
|
+ //g.init('/payDelivery/queryPayDeliveryList');
|
186
|
});
|
207
|
});
|
187
|
|
208
|
|
188
|
$(document).on('click', ".edit-class-btn", function () {
|
209
|
$(document).on('click', ".edit-class-btn", function () {
|