|
|
@ -230,14 +230,15 @@ |
|
|
|
materialRmbSum: 0, |
|
|
|
purchaseOrderChildList: [] |
|
|
|
}; |
|
|
|
|
|
|
|
// 遍历每个物料容器 |
|
|
|
$('.table-materialCode').each(function(index, tableElement) { |
|
|
|
console.log(tableElement); |
|
|
|
var tableId = tableIdList[index]; // 从table ID中提取tableId |
|
|
|
var materialTable = "bootstrap-table_" + tableId; |
|
|
|
var data = $('#' + materialTable).bootstrapTable('getData'); |
|
|
|
var materialData = { |
|
|
|
materialCode: , // 确保能正确获取物料编码 |
|
|
|
materialNum: 0, |
|
|
|
materialCode:'' , // 假设'materialCode'是你要获取的字段名}) , // 确保能正确获取物料编码 |
|
|
|
materialNum:10, |
|
|
|
materialNoRmbSum: 0, |
|
|
|
materialRmbSum: 0, |
|
|
|
purchaseQuoteChildList: [] |
|
|
@ -246,8 +247,8 @@ |
|
|
|
var materialNoRmbTotal = $('#' + 'materialNoRmbSum_' + tableId).val(); |
|
|
|
var materialRmbTotal = $('#' + 'materialRmbSum_' + tableId).val(); |
|
|
|
materialData.materialNum = parseInt(materialActualNum); |
|
|
|
materialData.materialNoRmbSum = materialNoRmbTotal; |
|
|
|
materialData.materialRmbSum = materialRmbTotal; |
|
|
|
materialData.materialNoRmbSum = parseFloat(materialNoRmbTotal); |
|
|
|
materialData.materialRmbSum = parseFloat(materialRmbTotal); |
|
|
|
// 遍历该物料下的供应商信息 |
|
|
|
$('#' + 'material-' + tableId).find('.supplier-card').each(function(supplierIndex, supplierCard) { |
|
|
|
var supplierQuote = { |
|
|
@ -261,8 +262,8 @@ |
|
|
|
materialData.purchaseQuoteChildList.push(supplierQuote); |
|
|
|
purchaseOrder.supplierNum += 1; // 累加供应商数量 |
|
|
|
}); |
|
|
|
purchaseOrder.materialNoRmbSum += $("#" + 'material-'+ tableId ).find("supplierTotal_" + tableId).find("input[name='materialNoRmbSum']"); |
|
|
|
purchaseOrder.materialRmbSum += $("#" + 'material-'+ tableId ).find("supplierTotal_" + tableId).find("input[name='materialNoRmbSum']"); // 累加含税总价 |
|
|
|
purchaseOrder.materialNoRmbSum += parseFloat(materialNoRmbTotal) ; |
|
|
|
purchaseOrder.materialRmbSum += parseFloat(materialRmbTotal); // 累加含税总价 |
|
|
|
purchaseOrder.purchaseOrderChildList.push(materialData); |
|
|
|
}); |
|
|
|
|
|
|
|