Browse Source

协销订单仅对机构可见度控制、返佣订单限制条件

zhengjinyi 3 years ago
parent
commit
a6dce47253

+ 3 - 3
components/cm-module/creatOrder/sellerClubVisible.vue

@@ -43,15 +43,15 @@ export default {
 			isIphoneX: this.$store.state.isIphoneX,
 			popupShow: false,
 			orderVisibleText: '可见',
-			orderVisibleValue: '1',
+			orderVisibleValue: 1,
 			items: [
 				{
-					value: '1',
+					value: 1,
 					name: '可见',
 					checked: 'true'
 				},
 				{
-					value: '2',
+					value: 2,
 					name: '不可见'
 				}
 			],

+ 1 - 0
components/cm-module/creatOrder/sellerCoupon.vue

@@ -198,6 +198,7 @@
 			.text{
 				font-size: $font-size-28;
 				color: $text-color;
+				font-weight: bold;
 			}
 			.text-coupon{
 				display: inline-block;

+ 4 - 1
pages/seller/order/create-order.vue

@@ -203,6 +203,7 @@
 					clubId:0,			// 机构Id
 					orderInfo:[],		// 订单商品数据
 					orderInvoice:{type:0},	// 订单发票信息
+					orderSeen:1,		// 订单对机构可见度 1可见  2不可见
 					payInfo:{			// 订单金额数据
 						orderShouldPayFee: 0,	// 订单最终支付金额
 						balancePayFlag: 0,		// 勾选余额的状态(1使用,0不使用)
@@ -398,6 +399,7 @@
 			},
 			handleClubVisibleData(data){// 订单对机构是否可见
 				console.log('对机构是否可见',data)
+				this.confirmParam.orderSeen = data
 			},
 			checkedBalabce(){//勾选使用余额
 				if(this.rebatecheck){
@@ -547,8 +549,9 @@
 				}else{
 					this.confirmParam.payInfo.rebateFlag=0
 					this.confirmParam.clubCouponId = this.couponList[0].clubCouponId 
-					this.totalDiscountAmount = this.reducedPrice + this.couponAmount
+					this.totalDiscountAmount = this.reducedPrice + this.couponAmount 
 					this.$refs.coupon.coupon.couponAmount = this.couponAmount = this.couponList[0].couponAmount
+					this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
 					this.$refs.freight.infoData(this.handleFreightData)
 					
 				}

+ 2 - 2
pages/user/account/account-bean.vue

@@ -141,8 +141,8 @@
 						12:'登录奖励',
                         13:'查看商品资料',
                         14:'购买超级会员',
-                        15:'系统退回',
-                        16:'系统扣除',
+                        15:'系统扣除',
+                        16:'系统退回',
 					}
 				Object.keys(stateTextObject).forEach(function(key){
 					if(key == state){

+ 31 - 34
pages/user/order/create-order.vue

@@ -231,7 +231,6 @@
 					}
 				],
 				showModal: false,
-				showModalType:1,
 				showModalstauts:0
 			}
 		},
@@ -245,35 +244,29 @@
 		},	
 		methods: {
 			async initStorage(option){
-				console.log(option)
 				const data = JSON.parse(option.data)
 				const userInfo = await this.$api.getStorage()
-				console.log('infodata',data)
+				console.log('data',data)
 				this.productParam.userId = 
 				this.cartParam.userId = 
 				this.supportParm.userId = 
 				this.postageParam.userId = userInfo.userId ? userInfo.userId : 0
 				this.confirmParam.clubId = userInfo.clubId ? userInfo.clubId : 0
 				switch(option.type){
-					case '1':
-						console.log('商品详情立即购买')
+					case '1':// 商品详情立即购买
 						this.confirmParam.cartType = 2
 						this.productParam.productCount = data.data.productCount
 						this.productParam.productId = data.data.productIds
-						// this.productIds = this.postageParam.productIds = data.data.productIds
 						this.productIds = data.data.productIds
 						this.GetProductCreateOrderInfo()
-						break;
-					case '2':
-						console.log('购物车结算')
+						break
+					case '2':// 购物车结算
 						this.confirmParam.cartType = 1
 						this.confirmType = 2
-						// this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
 						this.productIds = this.cartParam.productIds = data.data.productIds
 						this.CartCreateOrderInfo()
-						break;
-					case '3':
-						console.log('组合商品立即购买')
+						break
+					case '3':// 组合商品立即购买
 						this.confirmParam.cartType = 1
 						this.confirmType = 2
 						this.supportParm.productInfo = JSON.stringify(data.data) 
@@ -546,6 +539,7 @@
 				if(this.orderShouldPayFee <1000){
 					this.showModal = true
 					this.contentModalText = '采购金额过小,将扣除500采美豆,建议您前往采美旗下“呵呵商城”小程序购买小额商品。'    //操作文字提示语句
+					this.showModalstauts = 1
 					this.modalButton= [
 						{
 							text: '前往呵呵商城',
@@ -561,24 +555,6 @@
 							plain: false
 						}
 					]
-				}else if(this.orderShouldPayFee <1000 && this.freightData.userBeans <0){
-					this.showModal = true
-					this.contentModalText = '您已有采美豆不足,不能提交订单。建议您前往采美旗下“呵呵商城”小程序购买小额商品。'   //操作文字提示语句
-					this.modalButton=[
-						{
-							text: '了解',
-							type: 'gray',
-							plain: true //是否空心
-						},
-						{
-							text: '前往呵呵商城',
-							customStyle: {
-								color: '#fff',
-								bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-							},
-							plain: false
-						}
-					]
 				}else{
 					this.handleClickOrderSubmitMit()
 				}
@@ -639,7 +615,28 @@
 					this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
 					this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
 					this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
-					this.$util.msg(error.msg,3000)
+					if(error.code == -3){
+						this.showModal = true
+						this.contentModalText = error.msg  //操作文字提示语句
+						this.showModalstauts = 3
+						this.modalButton=[
+							{
+								text: '了解',
+								type: 'gray',
+								plain: true //是否空心
+							},
+							{
+								text: '前往呵呵商城',
+								customStyle: {
+									color: '#fff',
+									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
+								},
+								plain: false
+							}
+						]
+					}else{
+						this.$util.msg(error.msg,3000)
+					}
 				})
 			},
 			handFreightAlertShow(){//显示邮费弹窗
@@ -655,7 +652,7 @@
 			},
 			handleClick(e){// 采购量过小提示弹窗
 				if (e.index == 1) {
-					if( this.orderShouldPayFee <1000 ){
+					if( this.showModalstauts == 1){
 						this.showModal = false
 						this.handleClickOrderSubmitMit()
 					}else{
@@ -663,7 +660,7 @@
 						this.handleClickHeHeMiniApplet()
 					}
 				}else{
-					if( this.orderShouldPayFee <1000 ){
+					if( this.showModalstauts == 1 ){
 						this.showModal = false
 						this.handleClickHeHeMiniApplet()
 					}else{

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

@@ -192,10 +192,7 @@ export default {
 			this.state = option.state
 		}
 		this.getHeaderTopHeight()
-		this.$api.getStorage().then(resolve => {
-			this.userId = resolve.userId ? resolve.userId : 0
-			this.initOrderDetaileData()
-		})
+		this.initOrderDetaileData()
 	},
 	filters: {
 		TextFormat(status) {
@@ -231,7 +228,9 @@ export default {
 		openclauseConten(id) {
 			this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
 		},
-		initOrderDetaileData() {
+		async initOrderDetaileData() {
+			const userInfo = await this.$api.getStorage()
+			this.userId = userInfo.userId ? userInfo.userId : 0
 			//初始化页面数据@参数:订单ID
 			this.OrderService.QueryOrderDetails({ orderId: this.orderId, userId: this.userId })
 				.then(response => {

+ 1 - 16
pages/user/order/order-sharelogin.vue

@@ -72,27 +72,12 @@
 					}else if(response.code == 1){// 同为会所运营人员查看订单详情
 						this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderId=${this.params.orderId}`)
 					}else if(response.code == 2){// 协销查看分享订单
-						this.$api.navigateTo(`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}`)
+						this.$api.navigateTo(`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}&userId=${this.params.userId}`)
 					}else if(response.code == 3){// 游客第二次查看订单详情
 						this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${this.params.userId}`)
 					}else{// 错误信息返回
 						this.$util.modal('提示',response.msg,'确定','',false,() =>{})
 					}
-					// if(response.code === 2){
-					// 	this.$api.navigateTo(`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}`)
-					// }else if(response.code === 0) {
-					// 	console.log(response.data)
-					// 	if(response.data == true){//同为会所运营人员查看订单详情
-					// 		this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderId=${this.params.orderId}`)
-					// 	}else{//游客第二次查看订单详情
-					// 		this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${this.params.userId}`)
-					// 	}
-					// }else if(response.code === -2){
-					// 	this.$util.modal('提示',response.msg,'确定','',false,() =>{})
-					// }else{
-					// 	console.log(response.msg)
-					// 	this.getOrderCommodityData()
-					// }
 				})
 			},
 			getOrderCommodityData(){//查询订单商品信息s