lilei 4 months ago
parent
commit
5fa8da0e4d

+ 2 - 2
App.vue

@@ -1,8 +1,8 @@
 <script>
 	export default {
 		globalData: {
-			// baseUrl: 'http://192.168.2.10:9110/saas/clz/', // 本地
-			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
+			baseUrl: 'http://192.168.2.10:9110/saas/clz/', // 本地
+			// baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},
 		onLaunch: function() {

+ 6 - 4
pagesB/procureOrder/creatOrder.vue

@@ -31,10 +31,10 @@
 					<view class="empty-bar" v-if="total==0 && status!='loading'" @click="goBack">
 						<view>{{empty.tip}}</view>
 					</view>
-					<!-- 商品总计 -->
+					<!-- 商品总计,优惠金额、代金券,抵扣至少有一个时显示 -->
 					<view class="product-price">
 						<view>
-							<view class="product-price-item">
+							<view class="product-price-item" v-if="totalDiscount||totalCoupon||subsidyAmount">
 								<text>总金额</text>
 								<text class="price">¥{{Number(totalAmount).toFixed(2)}}</text>
 							</view>
@@ -244,7 +244,8 @@
 						 	price:item.orginPrice,
 							promoSn: item.promoSn,
 							promoProductSn: item.shopProductSubsidy&&item.shopProductSubsidy.productSubsidySn,
-							resultValue: item.shopProductSubsidy&&item.shopProductSubsidy.subsidyAmount
+							resultValue: item.shopProductSubsidy&&item.shopProductSubsidy.subsidyAmount,
+							useSubsidyFlag: this.hasKdk? '1' : '0'
 						 })
 						 cartSn.push({
 							 cartSn: item.cartSn,
@@ -254,7 +255,7 @@
 				})
 				
 				// 校验并提示信息
-				purchaseCheck({detailList:detailList}).then(res => {
+				purchaseCheck({detailList:detailList,useSubsidyFlag: this.hasKdk? '1' : '0'}).then(res => {
 					if(res.status == 200){
 						const promoChangeFlag = res.data.promoChangeFlag
 						// 活动变更
@@ -322,6 +323,7 @@
 				this.loading = true
 				purchaseSave({
 					detailList: detailList,
+					useSubsidyFlag: this.hasKdk? '1' : '0',
 					payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'PAY_WECHAT_ONLINE' : ''
 				}).then(res => {
 					this.loading = false

+ 1 - 1
pagesB/procureOrder/orderDetail.vue

@@ -94,7 +94,7 @@
 				</view>
 			</view>
 			<view class="info" v-if="info">
-				<view class="infoList">
+				<view class="infoList" v-if="info.totalSubsidyAmount||info.totalSpecialGiveAmount||info.totalTicketGiveAmount">
 					<text>总金额</text>
 					<view class="cText">¥<text>{{Number(info.totalAmount).toFixed(2)}}</text></view>
 				</view>

+ 4 - 2
pagesB/shopiing/productDetail.vue

@@ -618,14 +618,15 @@
 				})
 				const _this = this
 				purchaseCheck({
+					   useSubsidyFlag: this.hasKdk? '1' : '0',
 					   detailList: [{
 							productSn:this.detail.productSn,
 							productCode:this.detail.productCode,
 							qty: this.qty,
 							price:this.detail.price,
 							promoSn: this.detail.promoSn,
-							promoProductSn: this.detail.shopProductSubsidy.productSubsidySn,
-							resultValue: this.detail.shopProductSubsidy.subsidyAmount
+							promoProductSn: this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.productSubsidySn,
+							resultValue: this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount
 						}]}).then(res => {
 							uni.hideLoading()
 							if(res.status == 200){
@@ -692,6 +693,7 @@
 				})
 				purchaseSave({
 					detailList: detailList,
+					useSubsidyFlag: this.hasKdk? '1' : '0',
 					payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'PAY_WECHAT_ONLINE' : ''
 				}).then(res => {
 					if(res.status == 200){