diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html index 2d724d2b..2ba6ea6e 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html @@ -627,38 +627,67 @@ }, }); } - function purchaseDoSubmit(index, layero,uniqueId){ + + + function purchaseDoSubmit(index, layero, uniqueId) { console.log(uniqueId); var iframeWin = window[layero.find('iframe')[0]['name']]; - var rowData = iframeWin.$('#bootstrap-purchaseMaterialSelect-table').bootstrapTable('getSelections')[0]; + var selectedRows = iframeWin.$('#bootstrap-purchaseMaterialSelect-table').bootstrapTable('getSelections'); - //判断是否重复 - var rows = $("#bootstrap-table-purchase").bootstrapTable('getData').length; - for(var i=0;i 0) { + // 插入第一行 + $("#bootstrap-table-purchase").bootstrapTable('insertRow', { index: 1, row: newRows[0] }); + + // 插入剩余行 + for (var k = 1; k < newRows.length; k++) { + $("#bootstrap-table-purchase").bootstrapTable('insertRow', { index: 1, row: newRows[k] }); } - }) + } + layer.close(index); } diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html index bcf75e12..8710fa9d 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html @@ -44,7 +44,6 @@ showRefresh: false, showToggle: false, clickToSelect: true, // 点击选中行 - singleSelect: true, // 单选 url: prefix + "/getPurchaseMaterialList", modalName: "物料信息", columns: [{