|
@@ -3408,4 +3408,26 @@ function sku(e)
|
|
|
skuData : [],
|
|
|
skuDataUrl: e.attr('data-sku'),
|
|
|
});
|
|
|
+}
|
|
|
+
|
|
|
+var append_total = 10;
|
|
|
+function append(self, id)
|
|
|
+{
|
|
|
+ var e = self.parent().parent().parent().find('.table_copy');
|
|
|
+ var html = e.html();
|
|
|
+ var parent = e.parent();
|
|
|
+ var total = parent.find('tr').length-1;
|
|
|
+ append_total++;
|
|
|
+ total += append_total;
|
|
|
+ html = html.replaceAll('_-1_', '_' + total + '_');
|
|
|
+ html = html.replaceAll('up_', 'update_');
|
|
|
+ id = 'append_' + id + '_' + total;
|
|
|
+ parent.append('<tr id="'+id+'">' + html + '</tr>');
|
|
|
+ form.render();
|
|
|
+ $('#' + id + " select").each(function()
|
|
|
+ {
|
|
|
+ if ($(this).attr('xm-select')) {
|
|
|
+ layui.formSelects.render($(this).attr('xm-select'));
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|