...
|
...
|
@@ -131,25 +131,30 @@ if (window.NETSALEDATA) { |
|
|
}
|
|
|
|
|
|
for (var i = 0; i < searchSortList.length; i++) {
|
|
|
if (searchSortList[i].modelId == 1)
|
|
|
if (searchSortList[i].modelId == 1 && searchSortList[i].projectId == 1 ){
|
|
|
$("#sort0").val(searchSortList[i].intValue);
|
|
|
else if (searchSortList[i].modelId == 2)
|
|
|
$("#sort1").val(searchSortList[i].intValue);
|
|
|
else if (searchSortList[i].modelId == 3)
|
|
|
$("#sort2").val(searchSortList[i].intValue);
|
|
|
}
|
|
|
if (searchSortList[i].modelId == 1 && searchSortList[i].projectId == 5 ){
|
|
|
$("#sort3").val(searchSortList[i].intValue);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var item = [];
|
|
|
for (var i = 0; i < 3; i++) {
|
|
|
item[i] = {
|
|
|
productSkn: window.NETSALEDATA.baseProductInfo.baseProduct.productSkn,
|
|
|
modelId: i + 1,
|
|
|
projectId: 1,
|
|
|
intValue: parseInt($("#sort" + i).val())
|
|
|
};
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < 3; i++) {
|
|
|
var item_brand = {
|
|
|
productSkn: window.NETSALEDATA.baseProductInfo.baseProduct.productSkn,
|
|
|
modelId: 1,
|
|
|
projectId: 1,
|
|
|
intValue: parseInt($("#sort0").val())
|
|
|
};
|
|
|
item.push(item_brand);
|
|
|
var item_shops = {
|
|
|
productSkn: window.NETSALEDATA.baseProductInfo.baseProduct.productSkn,
|
|
|
modelId: 5,
|
|
|
projectId: 1,
|
|
|
intValue: parseInt($("#sort3").val())
|
|
|
};
|
|
|
item.push(item_shops);
|
|
|
for (var i = 0; i < item.length; i++) {
|
|
|
for (var j = 0; j < searchSortList.length; j++) {
|
|
|
if (searchSortList[j].modelId == item[i].modelId) {
|
|
|
item[i].id = searchSortList[j].id;
|
...
|
...
|
@@ -159,13 +164,12 @@ if (window.NETSALEDATA) { |
|
|
}
|
|
|
|
|
|
searchSortList = item;
|
|
|
var sortList = [];
|
|
|
sortList.push(searchSortList[0])
|
|
|
|
|
|
$('#sort-save').on('click', function () {
|
|
|
common.util.__ajax({
|
|
|
url: '/product/saveSearchSort',
|
|
|
data: {
|
|
|
searchSortList: JSON.stringify(sortList)
|
|
|
searchSortList: JSON.stringify(searchSortList)
|
|
|
}
|
|
|
});
|
|
|
return false;
|
...
|
...
|
@@ -175,21 +179,14 @@ if (window.NETSALEDATA) { |
|
|
searchSortList[0].intValue = parseInt($("#sort0").val());
|
|
|
});
|
|
|
|
|
|
$("#sort1").on('change', function () {
|
|
|
searchSortList[1].intValue = parseInt($("#sort1").val());
|
|
|
});
|
|
|
|
|
|
$("#sort2").on('change', function () {
|
|
|
searchSortList[2].intValue = parseInt($("#sort2").val());
|
|
|
$("#sort3").on('change', function () {
|
|
|
searchSortList[1].intValue = parseInt($("#sort3").val());
|
|
|
});
|
|
|
|
|
|
$("#sort0").keyup(function () {
|
|
|
$(this).val($(this).val().replace(/\D/g, ""));
|
|
|
});
|
|
|
$("#sort1").keyup(function () {
|
|
|
$(this).val($(this).val().replace(/\D/g, ""));
|
|
|
});
|
|
|
$("#sort2").keyup(function () {
|
|
|
$("#sort3").keyup(function () {
|
|
|
$(this).val($(this).val().replace(/\D/g, ""));
|
|
|
});
|
|
|
|
...
|
...
|
|