pp管道的金额计算更改:单价*总重
This commit is contained in:
@@ -828,7 +828,8 @@ public class PurchaseOrderService extends BaseOrderService<PurchaseOrder, Long>
|
||||
purchaseOrderItem.setLongDescription(materialOrderItem.getLongDescription());
|
||||
purchaseOrderItem.setUnit(materialOrderItem.getUnit());
|
||||
purchaseOrderItem.setCodeType(materialOrderItem.getCodeType());
|
||||
|
||||
purchaseOrderItem.setBigProductType(materialOrderItem.getBigProductType());
|
||||
purchaseOrderItem.setSmallProductType(materialOrderItem.getSmallProductType());
|
||||
purchaseOrderItem.setProductId(materialOrderItem.getProductId());
|
||||
purchaseOrderItem.setPrice(materialOrderItem.getPrice());
|
||||
purchaseOrderItem.setCount(materialOrderItem.getCount());
|
||||
@@ -977,7 +978,11 @@ public class PurchaseOrderService extends BaseOrderService<PurchaseOrder, Long>
|
||||
purchaseOrderItem.setPurchaseOrder(purchaseOrder);
|
||||
purchaseOrderItem.setInd(ind);
|
||||
purchaseOrderItemService.save(purchaseOrderItem);
|
||||
totalAmount = totalAmount.add(purchaseOrderItem.getPrice().multiply(purchaseOrderItem.getCount()));
|
||||
if(Objects.equals(purchaseOrderItem.getBigProductType(), "PP")) {//pp管道系列采用总重*单价计算
|
||||
totalAmount = totalAmount.add(purchaseOrderItem.getPrice().multiply(purchaseOrderItem.getTotalWeight()));
|
||||
}else{
|
||||
totalAmount = totalAmount.add(purchaseOrderItem.getPrice().multiply(purchaseOrderItem.getCount()));
|
||||
}
|
||||
totalCount = totalCount.add(purchaseOrderItem.getCount());
|
||||
ind++;
|
||||
|
||||
|
||||
@@ -305,8 +305,7 @@
|
||||
<td><input data-input="materialOrderSn" th:value="${poiMoMap[item.id]?.sn}" type="text" readonly></td>
|
||||
<td><input data-input="materialOrderName" th:value="${poiMoMap[item.id]?.name}" type="text" readonly></td>
|
||||
<td><input data-input="gWeight" th:value="${item.gWeight}" type="number" readonly></td>
|
||||
<td><input data-input="totalWeight" type="number"
|
||||
th:value="${item.totalWeight}" readonly></td>
|
||||
<td><input data-input="totalWeight" type="number" th:value="${item.totalWeight}" readonly></td>
|
||||
<td><input data-input="count" th:value="${item.count}" type="number" readonly></td>
|
||||
<td><input data-input="deliveryCount" type="number" readonly th:value="${item.deliveryCount}" ></td>
|
||||
<td><input data-input="deliveryRate" type="number" readonly th:value="${item.deliveryCount/item.count*100}" ></td>
|
||||
@@ -314,7 +313,12 @@
|
||||
<td><input th:value="${item.inboundCount}" type="number" readonly></td>
|
||||
</th:block>
|
||||
<td show-data-column="price"><input data-input="price" th:value="${item.price}" type="number" readonly></td>
|
||||
<th:block th:if="${item.bigProductType != 'PP'}">
|
||||
<td show-data-column="subtotal" class="subtotal" th:text="${(item.price * item.count).setScale(2, 4)}"></td>
|
||||
</th:block>
|
||||
<th:block th:if="${item.bigProductType == 'PP'}">
|
||||
<td show-data-column="subtotal" class="subtotal" th:text="${(item.price * item.totalWeight).setScale(2, 4)}"></td>
|
||||
</th:block>
|
||||
<td><input data-input="unit" th:value="${item.unit}" type="text" readonly></td>
|
||||
<!-- <td><input data-input="versionNum" th:value="${item.versionNum}" type="text"></td>-->
|
||||
<!-- <td><input data-input="bigProductType" th:value="${item.bigProductType}" type="text" readonly>-->
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
home/index.html
|
||||
style.css
|
||||
Reference in New Issue
Block a user