...
|
...
|
@@ -25,12 +25,15 @@ $('#saveAddInfo').on('click', function() { |
|
|
|
|
|
GOLABDATA.on("LYaddInfo", function() {
|
|
|
return e.submit('', function(option) {
|
|
|
$.each(option.data, function(key, value) {
|
|
|
if (value) {
|
|
|
option.data[key] = value.split('|').join(',');
|
|
|
}
|
|
|
});
|
|
|
option.data.productSkn = $('#productSkn').val();
|
|
|
option.data.style = option.data.style.split('|').join(',');
|
|
|
option.data.pattern = option.data.pattern.split('|').join(',');
|
|
|
option.data.makeCrafts = option.data.makeCrafts.split('|').join(',');
|
|
|
option.data.wearSense = sense();
|
|
|
|
|
|
|
|
|
function sense() {
|
|
|
var arr = [];
|
|
|
$('#wearSenseWrap').find('select').each(function() {
|
...
|
...
|
@@ -58,20 +61,33 @@ $.ajax({ |
|
|
dataType: 'json',
|
|
|
success: function(res) {
|
|
|
var data = res.data;
|
|
|
data.style = basicInfo.style ? basicInfo.style.replace(/,/g, "|") : '';
|
|
|
data.pattern = basicInfo.pattern ? basicInfo.pattern.replace(/,/g, "|") : '';
|
|
|
data.brandModel = productExtBo.brandModel ? productExtBo.brandModel : '';
|
|
|
data.brandModelText = productExtBo.brandModelText ? productExtBo.brandModelText : '';
|
|
|
data.brandSeriesText = productExtBo.brandSeriesText ? productExtBo.brandSeriesText : '';
|
|
|
data.brandSeries = productExtBo.brandSeries ? productExtBo.brandSeries : '';
|
|
|
data.makeCrafts = productExtBo.makeCrafts ? productExtBo.makeCrafts.replace(/,/g, "|") : '';
|
|
|
data.salesPhrase = productExtBo.salesPhrase ? productExtBo.salesPhrase : '';
|
|
|
data.isHostsell = productExtBo.isHostsell ? productExtBo.isHostsell : '';
|
|
|
|
|
|
$.each(data.productComfort.data, function(index, item) {
|
|
|
item.value = comfort ? comfort[index].value : '';
|
|
|
data.style = basicInfo.style;
|
|
|
data.pattern = basicInfo.pattern;
|
|
|
data.brandModel = productExtBo.brandModel;
|
|
|
data.brandModelText = productExtBo.brandModelText;
|
|
|
data.brandSeriesText = productExtBo.brandSeriesText;
|
|
|
data.brandSeries = productExtBo.brandSeries;
|
|
|
data.makeCrafts = productExtBo.makeCrafts;
|
|
|
data.salesPhrase = productExtBo.salesPhrase;
|
|
|
data.isHostsell = productExtBo.isHostsell;
|
|
|
|
|
|
$.each(data, function(key, value) {
|
|
|
if (typeof value == 'string') {
|
|
|
data[key] = value.replace(/,/g, "|");
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (comfort) {
|
|
|
$.each(comfort, function(index, item) {
|
|
|
if (item.value) {
|
|
|
data.productComfort.data[index].value = item.value;
|
|
|
}
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$('#addinfo-wrap').html(common.util.__template2($('#addInfoTemp').html(), data));
|
|
|
|
...
|
...
|
|