shish 2 лет назад
Родитель
Сommit
2113f4f5ca
3 измененных файлов с 14 добавлено и 11 удалено
  1. 1 1
      ghsApp/src/pagesPurchase/add.vue
  2. 11 6
      ghsApp/src/pagesPurchase/details.vue
  3. 2 4
      ghsApp/src/pagesPurchase/info.vue

+ 1 - 1
ghsApp/src/pagesPurchase/add.vue

@@ -69,7 +69,7 @@
 					</view>
 					</view>
 					
 					
 					<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" mode="widthFix" 
 					<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" mode="widthFix" 
-					style="width:58upx;height:58upx;position:absolute;top:35upx;left:30upx;" ></image>
+					style="width:60upx;height:60upx;position:absolute;top:32upx;left:30upx;" ></image>
 					
 					
 				</view>
 				</view>
 			</template>
 			</template>

+ 11 - 6
ghsApp/src/pagesPurchase/details.vue

@@ -31,8 +31,8 @@
 								<text class="iconfont icongouwuche"></text>返回修改
 								<text class="iconfont icongouwuche"></text>返回修改
 							</view>
 							</view>
 							<view class="describe-view">
 							<view class="describe-view">
-								共&nbsp;<text style="font-size:30upx;font-weight:bold;" v-if="Number(totalItemNum.big)>0">{{totalItemNum.big?parseFloat(totalItemNum.big):0}}扎</text>
-								<text style="font-size:30upx;font-weight:bold;" v-if="Number(totalItemNum.small)>0">{{totalItemNum.small?parseFloat(totalItemNum.small):0}}支</text>
+								共&nbsp;<text style="font-weight:bold;" v-if="Number(totalItemNum.big)>0">{{totalItemNum.big?parseFloat(totalItemNum.big):0}}扎</text>
+								<text style="font-weight:bold;" v-if="Number(totalItemNum.small)>0">{{totalItemNum.small?parseFloat(totalItemNum.small):0}}支</text>
 								,{{ selectList.length }}种,合计 ¥{{ selectAllPrice }}
 								,{{ selectList.length }}种,合计 ¥{{ selectAllPrice }}
 							</view>
 							</view>
 						</view>
 						</view>
@@ -305,14 +305,20 @@ export default {
 			if (this.selectList) {
 			if (this.selectList) {
 				console.log(this.selectList,'selectList')
 				console.log(this.selectList,'selectList')
 				for (const item of this.selectList) {
 				for (const item of this.selectList) {
-					price += Number(item.userPrice)*Number(item.bigCount);
+					if(Number(item.bigCount)>0){
+						price += Number(item.userPrice)*Number(item.bigCount);
+					}else{
+						price += Number(item.userPrice)*Number(item.smallCount);
+					}
 				}
 				}
 			}
 			}
 			let finalPrice = price.toFixed(2);
 			let finalPrice = price.toFixed(2);
 			finalPrice = parseFloat(finalPrice)
 			finalPrice = parseFloat(finalPrice)
 			this.modifyPrice = finalPrice
 			this.modifyPrice = finalPrice
 			this.totalPrice = finalPrice
 			this.totalPrice = finalPrice
-			return price.toFixed(2);
+			let newPrice = price.toFixed(2);
+			newPrice = parseFloat(newPrice)
+			return newPrice
 		},
 		},
 		calcTotalWeight(){
 		calcTotalWeight(){
 			let realityWeight = 0;
 			let realityWeight = 0;
@@ -585,10 +591,9 @@ export default {
 				}
 				}
 				.describe-view {
 				.describe-view {
 					display: flex;
 					display: flex;
-
 					align-items: center;
 					align-items: center;
 					color: #333;
 					color: #333;
-					font-size: 24upx;
+					font-size:27upx;
 					.price {
 					.price {
 						font-weight: bold;
 						font-weight: bold;
 						font-size: 36upx;
 						font-size: 36upx;

+ 2 - 4
ghsApp/src/pagesPurchase/info.vue

@@ -113,7 +113,7 @@
 					<view class="summary-bar">
 					<view class="summary-bar">
 						<view class="operate-view" ></view>
 						<view class="operate-view" ></view>
 						<view class="describe-view">
 						<view class="describe-view">
-							共<text v-if="Number(detailInfo.bigNum)>0">{{ detailInfo.bigNum }}扎</text><text v-if="Number(detailInfo.smallNum)>0">{{detailInfo.smallNum}}支</text>,
+							共<text>{{ detailInfo.itemNum ? detailInfo.itemNum : 0 }}扎</text>,
 							合计 ¥<text class="price">{{ detailInfo.price ? parseFloat(detailInfo.price) : 0 }}</text>
 							合计 ¥<text class="price">{{ detailInfo.price ? parseFloat(detailInfo.price) : 0 }}</text>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -579,13 +579,11 @@ export default {
 			}
 			}
 			.describe-view {
 			.describe-view {
 				display: flex;
 				display: flex;
-
 				align-items: center;
 				align-items: center;
 				color: #333;
 				color: #333;
-				font-size: 24upx;
+				font-size: 26upx;
 				.price {
 				.price {
 					font-weight: bold;
 					font-weight: bold;
-					font-size: 36upx;
 				}
 				}
 			}
 			}
 		}
 		}