|
@@ -46,18 +46,18 @@ function receiptDocuments(data, domId) {
|
|
|
<td width="50px">单价</td>
|
|
|
<td width="100px">金额</td>
|
|
|
</tr>`;
|
|
|
- let totalBoxNum = 0, totalWeight = 0, totalPrice = 0;
|
|
|
+ let myTotalBoxNum = 0, totalWeight = 0, totalPrice = 0;
|
|
|
for (let i = 0; i < productCodeListVOList.length; i++) {
|
|
|
let item = productCodeListVOList[i];
|
|
|
- if (item.boxNum) {
|
|
|
- totalBoxNum += Number(item.boxNum);
|
|
|
+ if (item.totalBoxNum) {
|
|
|
+ myTotalBoxNum += Number(item.totalBoxNum);
|
|
|
}
|
|
|
- if (item.weight) {
|
|
|
- totalWeight += Number(item.weight);
|
|
|
+ if (item.totalSuttle) {
|
|
|
+ totalWeight += Number(item.totalSuttle);
|
|
|
}
|
|
|
let price = 0
|
|
|
- if (item.weight && item.unitPrice) {
|
|
|
- price = Number(item.weight) * Number(item.unitPrice);
|
|
|
+ if (item.totalSuttle && item.productUnitPrice) {
|
|
|
+ price = Number(item.totalSuttle) * Number(item.productUnitPrice);
|
|
|
totalPrice += price
|
|
|
}
|
|
|
price = price.toFixed(2);
|
|
@@ -68,9 +68,9 @@ function receiptDocuments(data, domId) {
|
|
|
<td>${item.levels}</td>
|
|
|
<td>${item.productColor}</td>
|
|
|
<td>${item.lotNum}</td>
|
|
|
- <td>${item.boxNum}</td>
|
|
|
- <td>${item.weight}</td>
|
|
|
- <td>${item.unitPrice}</td>
|
|
|
+ <td>${item.totalBoxNum}</td>
|
|
|
+ <td>${item.totalSuttle}</td>
|
|
|
+ <td>${item.productUnitPrice}</td>
|
|
|
<td>${price}</td>
|
|
|
</tr>`
|
|
|
}
|
|
@@ -78,7 +78,7 @@ function receiptDocuments(data, domId) {
|
|
|
totalPrice = totalPrice.toFixed(2);
|
|
|
printContent += `<tr align="center">
|
|
|
<td colspan="5">合计</td>
|
|
|
- <td>${totalBoxNum}</td>
|
|
|
+ <td>${myTotalBoxNum}</td>
|
|
|
<td>${totalWeight}</td>
|
|
|
<td></td>
|
|
|
<td>${totalPrice}</td>
|