Bläddra i källkod

commit -m 订单

zhengjinyi 4 år sedan
förälder
incheckning
71de499917

+ 10 - 5
components/cm-module/creatOrder/goodsList.vue

@@ -13,11 +13,11 @@
 							<text class="tips" v-if="pros.productType == 2">赠品</text>
 						</view>
 						<view class="pros-product">
-							<view class="producttitle">{{pros.productName}}</view>
-							<view class="productspec">规格:{{pros.unit}}</view>
+							<view class="producttitle">{{ pros.productName }}</view>
+							<view class="productspec">规格:{{ pros.unit }}</view>
 							<view class="productprice">
-								<view class="price"><text>¥{{ (pros.productType == 2 ? 0 : pros.retailPrice) | NumFormat}}</text></view>
-								<view class="count"><text class="small">x</text>{{pros.productCount}}</view>
+								<view class="price"><text>¥{{ (pros.productType == 2 ? 0 : pros.retailPrice) | NumFormat }}</text></view>
+								<view class="count"><text class="small">x</text>{{ pros.productCount }}</view>
 							</view>
 							<view class="floor-item-act" v-if="pros.promotion!=null">
 								<view v-if="PromotionsFormat(pros.promotion)" class="floor-tags">
@@ -43,7 +43,12 @@
 						</view>
 				</view>
 				<view class="goods-pros-b">
-					<view class="sum">合计:<text class="money">¥{{ ( item.shopTotalPrice ) | NumFormat }}</text></view>
+					<view class="sum-none" v-if="(item.fullReduction)>0">
+						<text class="money-sign">¥</text>
+						<text class="money">{{ ( item.shopTotalPrice +item.fullReduction ) | NumFormat }}</text>
+						<text class="money-reduced">减<text>¥{{ item.fullReduction | NumFormat}}</text></text>
+					</view>
+					<view class="sum">合计:<text class="money">¥{{ item.shopTotalPrice | NumFormat }}</text></view>
 				</view>
 			</view>
 		</view>	

+ 8 - 17
pages/user/cart/cart.vue

@@ -84,14 +84,13 @@
 									</view>
 									<text class="img-tip">失效</text>
 									<view class="pros-img">
-										<image :src="failure.image ? failure.image:''" alt="" />
+										<image :src="failure.mainImage ? failure.mainImage:''" alt="" />
 									</view>
 									<view class="pros-product">
-										<view class="producttitle">{{failure.name}}</view>
+										<view class="producttitle">{{failure.productName}}</view>
 										<view class="productspec">规格:{{failure.unit ? failure.unit : ''}}</view>
-										<view class="productstate">{{failureStateText(failure.status)}}</view>
+										<view class="productstate">商品已下架</view>
 									</view>
-									<view class="pros-marks" v-if="failure.isFailureLayer"></view>
 								</view>
 							</view>
 						</view>	
@@ -261,9 +260,9 @@
 					} else {
 						this.goodsList = [];
 					}
-					if( data.invalid && data.invalid.length > 0){
+					if( data.products && data.products.length > 0){
 						let newFailureList = [],isFailureLayer;
-						data.invalid.forEach((failure,index) => {
+						data.products.forEach((failure,index) => {
 							if(failure.status == 1 || failure.status == 2) {
 								isFailureLayer = true
 							}else{
@@ -690,7 +689,7 @@
 			deletefailureList(){
 				this.failureList.forEach(failure=>{ this.delGoodsList += failure.productId+',' })
 				this.modal = true;
-				this.contentModalText = '确定删除选中的商品吗?';	
+				this.contentModalText = '确定清除所有失效商品吗?';	
 				this.deleteType = 2
 			},
 			handleClick(e) {//用户操作订单
@@ -727,16 +726,8 @@
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 			},
 			failureToProduct(failure){
-				if(failure.status == 1){
-					this.$util.msg('商品已丢失,不能查看',2000)
-					return
-				}else if(failure.status == 2){
-					this.$util.msg('商品已停售,不能查看',2000)
-					return
-				}else{
-					this.isModallayer = true;
-					this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
-				}
+				this.isModallayer = true;
+				this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
 			},
 			failureStateText(state){
 				let stateText = '',

+ 8 - 7
pages/user/order/create-order.vue

@@ -27,12 +27,12 @@
 					<text>共{{allCount}}件商品</text>
 				</view>
 				<view class="footer-price">
-					<view class="sum-none" v-if="reducedPrice>0">
+					<view class="sum-none" v-if="totalFullReduction>0">
 						<text class="money-sign">¥</text>
 						<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
+						<text class="money-reduced">减<text>¥{{ totalFullReduction | NumFormat}}</text></text>
 					</view>
-					<view class="sum" :class="reducedPrice == 0 ? 'none' : ''">总价:<text class="price">¥{{payAllPrice | NumFormat}}</text></view>
+					<view class="sum" :class="totalFullReduction == 0 ? 'none' : ''">总价:<text class="price">¥{{payAllPrice | NumFormat}}</text></view>
 				</view>
 			</view>
 			<view class="footer-submit" @click.stop="orderSubmitMit">
@@ -70,7 +70,7 @@
 				submitState:'',  		  //提交状态
 				allCount:1,				  //订单提交总数量
 				totalOriginalPrice:0,	  //订单总原价(划线部分)
-				reducedPrice:0,			  //满减金额
+				totalFullReduction:0,			  //满减金额
 				payAllPrice:0.00,		  //订单提交总金额
 				allPrice:0.00,			  //订单总金额
 				addressId:'',			  //地址ID
@@ -113,8 +113,8 @@
 						let productIds = []
 						this.isRequest = true
 						this.goodsData = data.shopList
-						this.reducedPrice = data.reducedPrice
-						this.totalOriginalPrice = data.reducedPrice + data.totalAmount
+						this.totalFullReduction = data.totalFullReduction
+						this.totalOriginalPrice = data.totalFullReduction + data.totalPrice
 						this.allPrice = this.payAllPrice = data.totalPrice
 					})
 					.catch(error =>{
@@ -379,7 +379,7 @@
 		.footer-count{
 			float: left;
 			padding-left: 24rpx;
-			width:190rpx;
+			width:170rpx;
 			box-sizing: border-box;
 			font-size: $font-size-26;
 		}
@@ -389,6 +389,7 @@
 			color: $text-color;
 			padding: 10rpx 20rpx 10rpx 0;
 			box-sizing: border-box;
+			width: 385rpx;
 			.sum-none{
 				width: 100%;
 				height: 45rpx;

+ 4 - 4
pages/user/order/order-details.vue

@@ -219,11 +219,11 @@
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break;
 					case 'pay':
-						// if(data.order.onlinePayFlag == '0'){
+						if(data.order.onlinePayFlag == '0'){
 						this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`)
-						// }else{
-							// this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
-						// }
+						}else{
+							this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
+						}
 						break;
 				}
 			},

+ 5 - 5
pages/user/order/order-historylist.vue

@@ -328,11 +328,11 @@
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break;
 					case 'pay':
-						// if(data.order.onlinePayFlag == '0'){
-						this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`)
-						// }else{
-							// this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
-						// }
+						if(data.order.onlinePayFlag == '0'){
+							this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`)
+						}else{
+							this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
+						}
 						break;
 				}
 			},

+ 4 - 4
pages/user/order/order-list.vue

@@ -348,11 +348,11 @@
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break;
 					case 'pay':
-						// if(data.order.onlinePayFlag == '0'){
+						if(data.order.onlinePayFlag == '0'){
 							this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`)
-						// }else{
-							// this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
-						// }
+						}else{
+							this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
+						}
 						break;
 				}
 			},

+ 11 - 6
pages/user/order/order-payment.vue

@@ -67,7 +67,7 @@
 					</view>
 					<view class="pay-check">
 						<view class="pay-checked">
-							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 0}"   @click="tabClick(0)" >
+							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 0 }"   @click="tabClick(0)" v-if="isUnbindWxPay">
 								<view class="item-l">
 									<view class="item-icon"><text class="iconfont icon-weixinzhifu"></text></view>
 									<view class="item-texts"><text>微信支付</text></view>
@@ -185,6 +185,7 @@
 				pageType:'',
 				payType:'',
 				isHttpUrlShowTip:false,
+				isUnbindWxPay:true
 			}
 		},
 		onLoad(option) {
@@ -264,12 +265,16 @@
 					this.receiptStatus =  data.receiptStatus
 					this.onlinePayFlag = data.onlinePayFlag		
 					this.initAbleUserMoney(this.payableAmount)
+					if(this.payableAmount > 5000){
+						this.tabCurrentIndex = 1
+						this.isUnbindWxPay = false
+					}
 					//判断线上线下显示
-					// if(this.optionType == 'onlinePay'){
-					// 	this.invoiceStatus = true
-					// }else{
-					this.invoiceStatus = true
-					// }
+					if(this.optionType == 'onlinePay'){
+						this.invoiceStatus = true
+					}else{
+						this.invoiceStatus = data.invoiceStatus
+					}
 					if(data.receiptAmount > 0){
 						this.payStatusText = '使用微信和网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
 						this.isReceiptStatus = false

+ 5 - 5
pages/user/order/search-order.vue

@@ -328,11 +328,11 @@
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break;
 					case 'pay':
-						// if(data.order.onlinePayFlag == '0'){
-						this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`)
-						// }else{
-							// this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
-						// }
+						if(data.order.onlinePayFlag == '0'){
+							this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`)
+						}else{
+							this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderId=${data.orderId}`)
+						}
 						break;