|
|
@@ -38,10 +38,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
|
- <view class="operate-view" ></view>
|
|
|
- <view class="describe-view">
|
|
|
- 合计 ¥<text class="price">{{ itemPrice }}</text>
|
|
|
- </view>
|
|
|
+ <view class="operate-view">合计 ¥{{ itemPrice }},成本 ¥{{ itemCost }},利润 ¥{{ parseFloat((Number(itemPrice)-Number(itemCost)).toFixed(2)) }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -107,6 +104,7 @@ export default {
|
|
|
return {
|
|
|
detailInfo: {},
|
|
|
itemPrice:0,
|
|
|
+ itemCost:0,
|
|
|
settlePrice:0,
|
|
|
sendCost:0,
|
|
|
packCost:0,
|
|
|
@@ -131,6 +129,7 @@ export default {
|
|
|
allPrice() {
|
|
|
let price = 0
|
|
|
this.itemPrice = 0
|
|
|
+ this.itemCost = 0
|
|
|
this.totalWeight = 0
|
|
|
if (this.detailInfo && this.detailInfo.product) {
|
|
|
for (const item of this.detailInfo.product) {
|
|
|
@@ -139,9 +138,15 @@ export default {
|
|
|
currentPrice = currentPrice.toFixed(2)
|
|
|
this.itemPrice = Number(this.itemPrice) + Number(currentPrice)
|
|
|
this.itemPrice.toFixed(2)
|
|
|
+
|
|
|
+ let currentCost = Number(item.xhNum)*Number(item.cost)
|
|
|
+ currentCost = currentCost.toFixed(2)
|
|
|
+ this.itemCost = Number(this.itemCost)+Number(currentCost)
|
|
|
+ this.itemCost.toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.itemCost = parseFloat(this.itemCost.toFixed(2))
|
|
|
this.itemPrice = parseFloat(this.itemPrice.toFixed(2))
|
|
|
price = Number(this.itemPrice)
|
|
|
if(Number(this.sendCost)>0){
|
|
|
@@ -415,16 +420,15 @@ export default {
|
|
|
padding: 0 20upx;
|
|
|
height: 90upx;
|
|
|
display: flex;
|
|
|
-
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
border-top: 1upx solid #eeeeee;
|
|
|
.operate-view {
|
|
|
- display: flex;
|
|
|
-
|
|
|
- align-items: center;
|
|
|
- color: #3385ff;
|
|
|
- font-size: 26upx;
|
|
|
+ width:100%;
|
|
|
+ text-align: right;
|
|
|
+ color: black;
|
|
|
+ font-size:28upx;
|
|
|
+ font-weight:bold;
|
|
|
.iconfont {
|
|
|
margin-right: 20upx;
|
|
|
font-size: 40upx;
|