Authored by liuyue

网销tab卡记忆

... ... @@ -107,10 +107,6 @@ grid.prototype = {
}
});
/*$.each(urlParam, function(i, value) {
param[i] = value;
});*/
if (!p.page && !urlParam.page) p.page = 1;
if (!p.size && !urlParam.size) p.size = 10;
... ... @@ -124,11 +120,13 @@ grid.prototype = {
param.size = urlParam.size;
}
if (urlParam.productStatusStr) {
if (!param.productStatusStr) {
param.productStatusStr = urlParam.productStatusStr;
}
console.log(urlParam);
if (param.productStatusStr == 'all') {
param.productStatusStr = '';
}
var urlHash = '';
$.each(param, function(key, value) {
... ...
... ... @@ -18,6 +18,18 @@ tab.prototype = {
var g = this,
p = this.options;
$(this.tab).html("");
var pattern = /tab=.*?(?=&&)/gi,
tab = null,
index = null;
if (location.hash != '') {
tab = pattern.exec(location.hash)[0];
index = tab.split('=')[1];
}
g.index = index;
this.render(data);
this.bind(p.click);
return this;
... ... @@ -25,13 +37,13 @@ tab.prototype = {
bind: function(callback) {
var g = this,
p = this.options;
$(p.el).off("click", "li");
$(p.el).on("click", "li", function() {
$(this).addClass('active').siblings().removeClass('active');
g.active = $(this).find("a").attr("columnname");
g.key = $(this).find("a").attr("key");
g.value = $(this).find("a").attr("value");
location.hash = location.hash + 'tab=' + $(this).index();
callback && callback.call(this);
});
},
... ... @@ -44,9 +56,11 @@ tab.prototype = {
var li = $("<li></li>");
var a = $("<a href='javascript:void(0);'></a>");
if (column.name == 'all') {
if (g.index && i == g.index) {
li = $('<li class="active"></li>');
} else if (!g.index && column.name == 'all') {
li = $('<li class="active"></li>');
};
}
if (column.name) a.attr({
columnname: column.name
});
... ...
... ... @@ -61,7 +61,6 @@ var editPostion = '';
var t = new common.tab({
el: "#basicTab",
hash: "productStatusStr",
click: function() {
g.options.columns[11].hidden = true;
g.options.columns[8].hidden = true;
... ... @@ -95,7 +94,7 @@ var t = new common.tab({
display: "上架后信息缺失({4})"
}, {
name: "all",
value: '',
value: 'all',
display: "全部商品({all})"
}]
}).init(ENUM.tab);
... ... @@ -107,7 +106,6 @@ var loadtab = function() {
common.util.__ajax({
url: '/goods/product/queryTabProductNum',
data: g.options.parms()
}, function(res) {
var __dt = $.extend({}, ENUM.tab, res.data);
t.init(__dt);
... ... @@ -137,7 +135,8 @@ var g = new common.grid({
isOutLets: common.util.__input("isOutLets"),
productStatus: common.util.__input("productStatus"),
size: common.util.__input("size"),
productStatusStr: t.value
productStatusStr: t.value,
tab: $('#basicTab').find('.active').index()
};
},
columns: [{
... ...
... ... @@ -54,11 +54,16 @@ function convert(basicInfo, obj) {
if (convertObj[key]) {
basicInfo[key] = convertObj[key][value];
}
//basicInfo.expectArrivalTime =
});
return basicInfo;
}
var basicInfoData = convert(basicInfo, convertObj);
console.log(basicInfoData.expectArrivalTime);
console.log(common.util.__dateFormat(new Date(basicInfoData.expectArrivalTime), "yyyy-MM-dd hh:mm:ss"));
//基本信息
basicInfoData.renderType = $('.contentpanel').data('type');
... ...
... ... @@ -102,7 +102,7 @@ input[type=date], input[type=time], input[type=datetime-local], input[type=month
position: fixed;
right: 20px;
top: 20%;
z-index: 1000;
z-index: 999;
ul {
padding: 0;
... ...
... ... @@ -12,12 +12,12 @@ var config = {
'development': {
redis: null,
apiKey: 'sd4H1ecAqlp',
//http://192.168.102.214:8088/platform
//http: //192.168.102.214:8088/platform
// domain: 'http://172.16.6.240:8088/platform',
// domain:'http://172.16.6.240:8088/platform',
// domain: 'http://172.16.6.252:9080',//陈超
domain:'http://172.16.6.227:8088/platform',//玛丽
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.227:8088/platform',//玛丽
domain: 'http://192.168.102.202:8088/platform',
loggers: {
api: {
level: 'verbose',
... ...
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.227:8088/platform'; //马力
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.227:8088/platform'; //马力
//exports.domain = 'http://172.16.6.236:8080/platform'; //钱军
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
//exports.domain = 'http://172.16.6.197:8080/yohobuy-platform-web'; //耿超
... ...