提交 e418dff9 编写于 作者: D devil_gong

商品规格操作优化

上级 9f805d6c
......@@ -585,18 +585,26 @@ $(function()
var spec = [];
$('.spec-quick table tbody tr').each(function(k, v)
{
spec[k] = {
"title": $(this).find('td.am-text-middle input').val(),
"value": []
}
$(this).find('td.spec-quick-td-value .value-item').each(function(ks,vs)
var title = $(this).find('td.am-text-middle input').val() || null;
if(title != null)
{
var value = $(this).find('input').val() || null;
if(value != null)
var temp_data = [];
$(this).find('td.spec-quick-td-value .value-item').each(function(ks,vs)
{
var value = $(this).find('input').val() || null;
if(value != null)
{
temp_data.push(value);
}
});
if(temp_data.length > 0)
{
spec[k]['value'][ks] = $(this).find('input').val();
spec.push({
"title": title,
"value": temp_data
});
}
});
}
});
// 是否存在规格
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册