...
|
...
|
@@ -18,7 +18,7 @@ var ENUM = { |
|
|
}
|
|
|
};
|
|
|
|
|
|
var currentSelItem;
|
|
|
var currentSelItem, currentTab;
|
|
|
|
|
|
/*下拉选择*/
|
|
|
common.dropDown({
|
...
|
...
|
@@ -40,28 +40,8 @@ var t = new common.tab({ |
|
|
el: "#basicTab",
|
|
|
click: function () {
|
|
|
var columnname = $(this).find('a').attr('columnname');
|
|
|
if (columnname == 'all') {
|
|
|
g.options.columns[2].hidden = false;
|
|
|
g.options.columns[3].hidden = true;
|
|
|
g.options.columns[4].hidden = true;
|
|
|
g.options.columns[5].hidden = true;
|
|
|
g.options.columns[6].hidden = false;
|
|
|
g.options.columns[7].hidden = true;
|
|
|
} else if (columnname == 100) {
|
|
|
g.options.columns[2].hidden = true;
|
|
|
g.options.columns[3].hidden = false;
|
|
|
g.options.columns[4].hidden = false;
|
|
|
g.options.columns[5].hidden = true;
|
|
|
g.options.columns[6].hidden = true;
|
|
|
g.options.columns[7].hidden = false;
|
|
|
} else {
|
|
|
g.options.columns[2].hidden = true;
|
|
|
g.options.columns[3].hidden = false;
|
|
|
g.options.columns[4].hidden = false;
|
|
|
g.options.columns[5].hidden = false;
|
|
|
g.options.columns[6].hidden = true;
|
|
|
g.options.columns[7].hidden = true;
|
|
|
}
|
|
|
currentTab = columnname;
|
|
|
layoutGridCloum(columnname);
|
|
|
g.init('/payDelivery/queryPayDeliveryList');
|
|
|
},
|
|
|
columns: [{
|
...
|
...
|
@@ -86,7 +66,7 @@ var g = new common.grid({ |
|
|
brandId: common.util.__input("brandId"),
|
|
|
isPayDelivery: common.util.__input("isPayDelivery"),
|
|
|
productSkn: common.util.__input("productSkn"),
|
|
|
status: (t.active && t.active != 'all') ? t.active : 400
|
|
|
status: (currentTab && currentTab != 'all') ? currentTab : 400
|
|
|
};
|
|
|
},
|
|
|
columns: [{
|
...
|
...
|
@@ -158,6 +138,31 @@ var g = new common.grid({ |
|
|
});
|
|
|
g.init('/payDelivery/queryPayDeliveryList');
|
|
|
|
|
|
function layoutGridCloum(tabname) {
|
|
|
if (tabname == 'all') {
|
|
|
g.options.columns[2].hidden = false;
|
|
|
g.options.columns[3].hidden = true;
|
|
|
g.options.columns[4].hidden = true;
|
|
|
g.options.columns[5].hidden = true;
|
|
|
g.options.columns[6].hidden = false;
|
|
|
g.options.columns[7].hidden = true;
|
|
|
} else if (tabname == 100) {
|
|
|
g.options.columns[2].hidden = true;
|
|
|
g.options.columns[3].hidden = false;
|
|
|
g.options.columns[4].hidden = false;
|
|
|
g.options.columns[5].hidden = true;
|
|
|
g.options.columns[6].hidden = true;
|
|
|
g.options.columns[7].hidden = false;
|
|
|
} else {
|
|
|
g.options.columns[2].hidden = true;
|
|
|
g.options.columns[3].hidden = false;
|
|
|
g.options.columns[4].hidden = false;
|
|
|
g.options.columns[5].hidden = false;
|
|
|
g.options.columns[6].hidden = true;
|
|
|
g.options.columns[7].hidden = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// tab初始化
|
|
|
var loadTab = function () {
|
|
|
t.active = undefined;
|
...
|
...
|
@@ -172,17 +177,33 @@ var loadTab = function () { |
|
|
}, 800);
|
|
|
};
|
|
|
|
|
|
var reloadTab = function () {
|
|
|
t.active = undefined;
|
|
|
setTimeout(function () {
|
|
|
common.util.__ajax({
|
|
|
url: "/payDelivery/queryCountProductPayDelivery",
|
|
|
data: g.options.parms()
|
|
|
}, function (res) {
|
|
|
var __dt = $.extend({}, ENUM.tips, res.data);
|
|
|
t.load(__dt);
|
|
|
}, true);
|
|
|
}, 800);
|
|
|
};
|
|
|
|
|
|
loadTab();
|
|
|
// 筛选
|
|
|
$(document).on('click', "#filter-btn", function () {
|
|
|
loadTab();
|
|
|
g.options.columns[2].hidden = false;
|
|
|
g.options.columns[3].hidden = true;
|
|
|
g.options.columns[4].hidden = true;
|
|
|
g.options.columns[5].hidden = true;
|
|
|
g.options.columns[6].hidden = false;
|
|
|
g.options.columns[7].hidden = true;
|
|
|
//loadTab();
|
|
|
reloadTab();
|
|
|
//g.options.columns[2].hidden = false;
|
|
|
//g.options.columns[3].hidden = true;
|
|
|
//g.options.columns[4].hidden = true;
|
|
|
//g.options.columns[5].hidden = true;
|
|
|
//g.options.columns[6].hidden = false;
|
|
|
//g.options.columns[7].hidden = true;
|
|
|
layoutGridCloum(currentTab);
|
|
|
g.reload();
|
|
|
//g.init('/payDelivery/queryPayDeliveryList');
|
|
|
});
|
|
|
|
|
|
$(document).on('click', ".edit-class-btn", function () {
|
...
|
...
|
|