shish 1 год назад
Родитель
Сommit
f406ad2a0a
2 измененных файлов с 18 добавлено и 14 удалено
  1. 4 4
      ghsApp/src/admin/billing/affirm.vue
  2. 14 10
      ghsApp/src/pagesOrder/arrival.vue

+ 4 - 4
ghsApp/src/admin/billing/affirm.vue

@@ -48,12 +48,12 @@
             </view>
             <view class="summary-bar">
               <view class="operate-view" v-if="isScanEnv" @click="removeFromSave(option.customId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
-              <view class="operate-view" v-else @click="gobackEvent" style="font-size:33upx;font-weight:bold;"><text class="iconfont icongouwuche" style="margin-right:5upx;"></text>返回修改</view>
+              <view class="operate-view" v-else @click="gobackEvent" style="font-size:32upx;font-weight:bold;"><text class="iconfont icongouwuche" style="margin-right:5upx;"></text>返回修改</view>
               <view class="describe-view">
-                共<text>{{ selectList.length }}种</text>,
+                <text>{{ selectList.length }}种</text>,
                 <text v-if="Number(totalItemNum.big)>0">{{totalItemNum.big?parseFloat(totalItemNum.big):0}}扎</text>
-                <text v-if="Number(totalItemNum.small)>0">{{totalItemNum.small?parseFloat(totalItemNum.small):0}}支</text>,{{ allCount.weight }}公斤<text>,¥{{ allPrice }}</text>
-                <text v-if="Number(allCount.cost)>0 && (Number(allPrice)-Number(allCount.cost))>0">,利润 ¥{{ parseFloat((Number(allPrice)-Number(allCount.cost)).toFixed(2)) }}</text>
+                <text v-if="Number(totalItemNum.small)>0">{{totalItemNum.small?parseFloat(totalItemNum.small):0}}支</text>,{{ allCount.weight }}公斤<text>,¥{{ allPrice }}</text>
+                <text>,利润¥{{ parseFloat((Number(allPrice)-Number(allCount.cost)).toFixed(2)) }}</text>
               </view>
             </view>
             <view class="summary-bar">

+ 14 - 10
ghsApp/src/pagesOrder/arrival.vue

@@ -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;