|
|
@ -664,6 +664,15 @@ |
|
|
|
function doSubmit(index, layero,uniqueId){ |
|
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
|
|
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|
|
|
//判断是否重复 |
|
|
|
var rows = $("#bootstrap-sub-table-order").bootstrapTable('getData').length; |
|
|
|
for(var i=0;i<rows;i++){ |
|
|
|
var data = $("#bootstrap-sub-table-order").bootstrapTable('getData')[i]; |
|
|
|
if(data.materialCode==rowData.materialNo){ |
|
|
|
$.modal.alertError("不能选择已添加过的相同料号"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
$("#bootstrap-sub-table-order").bootstrapTable('insertRow', { |
|
|
|
index:1, |
|
|
|
row: { |
|
|
@ -726,7 +735,8 @@ |
|
|
|
$("#bootstrap-sub-table-order").bootstrapTable('remove', { |
|
|
|
field: 'materialCode', |
|
|
|
values: materialCode |
|
|
|
}) |
|
|
|
}); |
|
|
|
getTotalAmount(); |
|
|
|
} |
|
|
|
|
|
|
|
function getTotalAmount(){ |
|
|
|