...
|
...
|
@@ -2,95 +2,95 @@ var $ = require('jquery'), |
|
|
common = require('../../common/common');
|
|
|
|
|
|
if (window.NETSALEDATA) {
|
|
|
{ //商品参数
|
|
|
var baseProduct = window.NETSALEDATA.baseProductInfo.baseProduct;
|
|
|
var specialAttrBo = {
|
|
|
productSkn: baseProduct.productSkn,
|
|
|
washTipsList: [],
|
|
|
materialList: []
|
|
|
};
|
|
|
if (window.NETSALEDATA.specialAttrBo) {
|
|
|
specialAttrBo = window.NETSALEDATA.specialAttrBo;
|
|
|
}
|
|
|
var washTipsList = specialAttrBo.washTipsList || [];
|
|
|
var materialList = specialAttrBo.materialList || [];
|
|
|
|
|
|
var e = new common.edit("#taoyu1");
|
|
|
|
|
|
//材质初始化
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/queryAllBySortId4Select',
|
|
|
data: {
|
|
|
param: baseProduct.maxSortId
|
|
|
}
|
|
|
}, function(res) {
|
|
|
$("#material-group").html(common.util.__template2($("#material-params").html(), res || {}));
|
|
|
var materials = [];
|
|
|
for (var i = 0; i < materialList.length; i++) {
|
|
|
materials[i] = materialList[i].id;
|
|
|
}
|
|
|
$("#material").val(materials.join("|"));
|
|
|
e.init();
|
|
|
}, true);
|
|
|
//{ //商品参数
|
|
|
/*var baseProduct = window.NETSALEDATA.baseProductInfo.baseProduct;
|
|
|
var specialAttrBo = {
|
|
|
productSkn: baseProduct.productSkn,
|
|
|
washTipsList: [],
|
|
|
materialList: []
|
|
|
};
|
|
|
if (window.NETSALEDATA.specialAttrBo) {
|
|
|
specialAttrBo = window.NETSALEDATA.specialAttrBo;
|
|
|
}
|
|
|
var washTipsList = specialAttrBo.washTipsList || [];
|
|
|
var materialList = specialAttrBo.materialList || [];
|
|
|
|
|
|
//洗涤提示初始化
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/getAll4Select',
|
|
|
data: {}
|
|
|
}, function(res) {
|
|
|
$("#washTip-group").html(common.util.__template2($("#washTip-params").html(), res || {}));
|
|
|
var washTips = [];
|
|
|
for (var i = 0; i < washTipsList.length; i++) {
|
|
|
washTips[i] = washTipsList[i].sortId;
|
|
|
}
|
|
|
$("#washTips").val(washTips.join("|"));
|
|
|
e.init();
|
|
|
}, true);
|
|
|
var e = new common.edit("#taoyu1");
|
|
|
|
|
|
//材质初始化
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/queryAllBySortId4Select',
|
|
|
data: {
|
|
|
param: baseProduct.maxSortId
|
|
|
}
|
|
|
}, function(res) {
|
|
|
$("#material-group").html(common.util.__template2($("#material-params").html(), res || {}));
|
|
|
var materials = [];
|
|
|
for (var i = 0; i < materialList.length; i++) {
|
|
|
materials[i] = materialList[i].id;
|
|
|
}
|
|
|
$("#material").val(materials.join("|"));
|
|
|
e.init();
|
|
|
}, true);
|
|
|
|
|
|
//洗涤提示初始化
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/getAll4Select',
|
|
|
data: {}
|
|
|
}, function(res) {
|
|
|
$("#washTip-group").html(common.util.__template2($("#washTip-params").html(), res || {}));
|
|
|
var washTips = [];
|
|
|
for (var i = 0; i < washTipsList.length; i++) {
|
|
|
washTips[i] = washTipsList[i].sortId;
|
|
|
}
|
|
|
$("#washTips").val(washTips.join("|"));
|
|
|
e.init();
|
|
|
}, true);
|
|
|
|
|
|
$(document).on('change', '.material', function() {
|
|
|
var items = $("#material").val().split("|");
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
|
materialList[i] = {
|
|
|
"id": parseInt(items[i])
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$(document).on('change', '.washTips', function() {
|
|
|
var items = $("#washTips").val().split("|");
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
|
washTipsList[i] = {
|
|
|
"sortId": parseInt(items[i])
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
$(document).on('change', '.material', function() {
|
|
|
var items = $("#material").val().split("|");
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
|
materialList[i] = {
|
|
|
"id": parseInt(items[i])
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$(document).on('click', "#propertySave", function() {
|
|
|
$(document).on('change', '.washTips', function() {
|
|
|
var items = $("#washTips").val().split("|");
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
|
washTipsList[i] = {
|
|
|
"sortId": parseInt(items[i])
|
|
|
};
|
|
|
}
|
|
|
});*/
|
|
|
|
|
|
var washTips = $("#washTips").val() || "";
|
|
|
var productMaterial = $("#material").val() || "";
|
|
|
/*$(document).on('click', "#propertySave", function() {
|
|
|
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/saveProductParam',
|
|
|
data: {
|
|
|
productSkn: specialAttrBo.productSkn,
|
|
|
washTips: washTips.replace(/\|/g, ","),
|
|
|
productMaterial: productMaterial.replace(/\|/g, ",")
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
});
|
|
|
var washTips = $("#washTips").val() || "";
|
|
|
var productMaterial = $("#material").val() || "";
|
|
|
|
|
|
window.GOLABDATA.on('TYcaizhi', function() {
|
|
|
var washTips = $("#washTips").val() || "";
|
|
|
var productMaterial = $("#material").val() || "";
|
|
|
return {
|
|
|
"washTips": washTips.replace(/\|/g, ","),
|
|
|
"productMaterial": productMaterial.replace(/\|/g, ",")
|
|
|
};
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/saveProductParam',
|
|
|
data: {
|
|
|
productSkn: specialAttrBo.productSkn,
|
|
|
washTips: washTips.replace(/\|/g, ","),
|
|
|
productMaterial: productMaterial.replace(/\|/g, ",")
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
return false;
|
|
|
});*/
|
|
|
|
|
|
/*window.GOLABDATA.on('TYcaizhi', function() {
|
|
|
var washTips = $("#washTips").val() || "";
|
|
|
var productMaterial = $("#material").val() || "";
|
|
|
return {
|
|
|
"washTips": washTips.replace(/\|/g, ","),
|
|
|
"productMaterial": productMaterial.replace(/\|/g, ",")
|
|
|
};
|
|
|
});*/
|
|
|
//}
|
|
|
|
|
|
|
|
|
{ //搜索关键词
|
...
|
...
|
|