|
@@ -300,7 +300,7 @@ layui.define(['jquery', 'form', 'upload', 'layer', 'sortable'], function (export
|
|
|
specData.push(specItem);
|
|
|
});
|
|
|
that.options.specData = specData;
|
|
|
- console.log(that.options.specData);
|
|
|
+ $('#spec').val(JSON.stringify(that.options.specData));
|
|
|
if (data.elem.checked) {
|
|
|
|
|
|
}
|
|
@@ -505,7 +505,7 @@ layui.define(['jquery', 'form', 'upload', 'layer', 'sortable'], function (export
|
|
|
*/
|
|
|
renderSpecTable() {
|
|
|
var that = this,
|
|
|
- table = `<table class="layui-table" id="${this.options.specTableElemId}"><thead><tr><th>规格名</th><th>规格值</th></tr></thead><colgroup><col width="140"></colgroup><tbody>`;
|
|
|
+ table = `<input type="hidden" name="spec" id="spec" value=""/><table class="layui-table" id="${this.options.specTableElemId}"><thead><tr><th>规格名</th><th>规格值</th></tr></thead><colgroup><col width="140"></colgroup><tbody>`;
|
|
|
$.each(this.options.specData, function (index, item) {
|
|
|
table += that.options.sortable ? `<tr data-id="${item.id}">` : '<tr>';
|
|
|
table += `<td data-spec-id="${item.id}">${item.title}<i class="layui-icon layui-icon-delete layui-anim layui-anim-scale ${that.options.specDataDelete ? '' : 'layui-hide'}" data-spec-index="${index}"></i></td>`;
|