Browse Source

库存变化

shish 4 years ago
parent
commit
2625c37ed5

+ 1 - 0
ghsApp/src/pagesOrder/arrival.vue

@@ -180,6 +180,7 @@ export default {
 						let num = item.bigNum ? Number(item.bigNum) : 0
 						let price = item.currentCost ? Number(item.currentCost) : 0
 						let productId = item.productId || 0
+						let unitType = 
 						product = [...product,{productId,price,num}]
 				}
 			}

+ 14 - 29
ghsApp/src/pagesOrder/detail.vue

@@ -128,9 +128,9 @@
 									</text>
 								</view>
 								<view class="info-line">
-									<text class="item-type" v-if="detailInfo.book == 1">预订 {{ parseFloat(s.xhPreNum) }}{{s.xhUnitName}}*¥{{parseFloat(s.xhPreUnitPrice)}} ¥{{parseFloat(s.xhPrice)}}</text>
+									<text class="item-type" v-if="detailInfo.book == 1">预订 {{ parseFloat(s.xhPreNum) }}{{s.xhUnitName}}*¥{{parseFloat(s.xhPreUnitPrice)}}</text>
 									<text class="item-type" v-else></text>
-									<text class="item-count" v-if="detailInfo.stockChange == 1">¥{{s.userPrice>0?parseFloat(s.userPrice):parseFloat(s.price) }}</text>
+									<text class="item-count" v-if="detailInfo.stockChange == 1">¥{{parseFloat(s.xhPrice)}}</text>
 									<text class="item-count" v-else></text>
 								</view>
 							</view>
@@ -142,7 +142,7 @@
 							共{{ detailInfo.productStat.kind}}种,共
 							<text v-if="detailInfo.productStat.bigNum > 0">{{ detailInfo.productStat.bigNum }}扎</text>
 							<text v-if="detailInfo.productStat.smallNun > 0">{{detailInfo.productStat.smallNun}}支</text>
-							,合计 ¥<text class="price">{{ parseFloat(userPrice.toFixed(2)) }}</text>
+							,合计 ¥<text class="price">{{ totalItemPrice }}</text>
 						</view>
 					</view>
 				</view>
@@ -191,12 +191,11 @@
 					</div>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">每公斤服务费</div>
-					<div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</div>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">总服务费</div>
-					<div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</div>
+					<div class="tui-title">服务费</div>
+					<div class="detail-price_box" style="font-size: 28upx;">
+						<text style="color:#CCCCCC;margin-right:15upx;">{{ Number(detailInfo.miniKilo) > Number(detailInfo.weight) ? parseFloat(detailInfo.miniKilo) : parseFloat(detailInfo.weight) }}*¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</text>
+						<text>¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</text>
+					</div>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">商品金额</div>
@@ -266,7 +265,7 @@ export default {
 			selectJobType: "order_change",
 			autoLoad: false,
 			stepActive: 0,
-			userPrice: 0,
+			totalItemPrice: 0,
 			form: {
 				name: ""
 			},
@@ -363,19 +362,6 @@ export default {
 				}
 			});
 		},
-		totalPriceFun(){
-			let list = this.detailInfo.product;
-			let product = 0;
-			list.forEach(ele=>{
-				console.log(ele)
-				if(ele.userPrice>0){
-					product += ele.userPrice;
-				}else{
-					product += ele.price;
-				}
-			})
-			return product.toFixed(2)
-		},
 		freeShipModalClick() {
 			freeShipping({ id: this.detailInfo.id }).then(res => {
 				this.init();
@@ -535,14 +521,13 @@ export default {
 				this.settlePrice = Number(this.detailInfo.bookPrice) - Number(this.detailInfo.orderPrice)
 				this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
 
-				this.userPrice = 0
+				this.totalItemPrice = 0
 				this.detailInfo.product.forEach(ele=>{
-					if(ele.userPrice>0){
-						this.userPrice += Number(ele.userPrice);
-					}else{
-						this.userPrice += Number(ele.price);
-					}
+						this.totalItemPrice += Number(ele.xhPrice)
 				})
+				this.totalItemPrice.toFixed(2)
+				this.totalItemPrice = parseFloat(this.totalItemPrice)
+
 				const { product } = this.detailInfo;
 
 				if (product) {

+ 1 - 1
ghsApp/src/pagesOrder/refund.vue

@@ -23,7 +23,7 @@
 				<view class="flex list-val" style="font-size:26upx;font-weight:bold;">
 					<input type="number" placeholder="退货数" v-model="res.refundCount" placeholder-style="color:#CCCCCC" />
 					<text style="margin-left:10upx;">{{res.xhUnitName}}</text>
-					<text style="color:green;margin-left:20upx;">{{Number(res.xhNum)-Number(res.refundNum)}}{{res.xhUnitName}}</text>
+					<text style="color:green;margin-left:20upx;">可退{{Number(res.xhNum)-Number(res.refundNum)}}{{res.xhUnitName}}</text>
 				</view>
 			</view>
 			</view>

+ 1 - 1
ghsApp/src/pagesOrder/refundList.vue

@@ -11,7 +11,7 @@
               <text>操作:{{item.shopAdminName}}</text>
               <text>类型:{{item.book == 1 ? '预订单多付退款' :'普通'}}</text>
 
-              <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'处理中':item.status==1?'已完成':'处理中' }}</text>    
+              <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>    
 
           </view>
           <view class="flex val">{{item.refundPrice}} <view class="iconfont iconxiangyou"></view> </view>

+ 6 - 7
hdApp/src/pagesPurchase/purDetails.vue

@@ -118,7 +118,7 @@
                 </view>
                 <view class="info-line">
                   <text class="item-type" v-if="detailInfo.book == 1">
-                    <text>预订 {{parseFloat(s.preItemNum)}}{{s.xhUnitName}}*¥{{parseFloat(s.xhPreUnitPrice)}} ¥{{parseFloat(s.xhPrePrice)}}</text>
+                    <text>预订 {{parseFloat(s.preItemNum)}}{{s.xhUnitName}}*¥{{parseFloat(s.xhPreUnitPrice)}}</text>
                     </text>
                   <text class="item-type" v-else><text></text></text>
                   <text class="item-count" v-if="detailInfo.stockChange == 1">¥{{ parseFloat(s.totalPrice)||0 }}</text>
@@ -178,12 +178,11 @@
              </div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">每公斤服务费</div>
-            <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</div>
-          </tui-list-cell>
-          <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">总服务费</div>
-            <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</div>
+            <div class="tui-title">服务费</div>
+            <div class="detail-price_box" style="font-size: 28upx;">
+              <text style="color:#CCCCCC;margin-right:15upx;">{{Number(detailInfo.miniKilo) > Number(detailInfo.weight) ? parseFloat(detailInfo.miniKilo) : parseFloat(detailInfo.weight)}}*¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</text>
+              <text>¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</text>
+            </div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title">商品金额</div>

+ 1 - 1
hdApp/src/pagesPurchase/refundList.vue

@@ -11,7 +11,7 @@
               <text>操作:{{item.shopAdminName}}</text>
               <text>类型:{{item.book == 1 ? '预订单多付退款' :'普通'}}</text>
 
-              <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'处理中':item.status==1?'已完成':'处理中' }}</text>    
+              <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>    
 
           </view>
           <view class="flex val">{{item.refundPrice}} <view class="iconfont iconxiangyou"></view> </view>