zhengjinyi před 3 roky
rodič
revize
213be95a91

+ 231 - 223
components/cm-module/orderDetails/orderInformation.vue

@@ -1,17 +1,17 @@
 <template name="information">
 	<view class="information-template">
-		 <!-- 订单信息 -->
-		 <view class="information-content">
+		<!-- 订单信息 -->
+		<view class="information-content">
 			<view class="information-view title">
 				<view class="view-num">
 					<view class="bage-text">
-						订单编号:<label class="label">{{orderData.orderNo ? orderData.orderNo : '' }}</label>
+						订单编号:<label class="label">{{ orderData.orderNo ? orderData.orderNo : '' }}</label>
 					</view>
 				</view>
 			</view>
 			<view class="information-view same">
 				<view class="view-num">
-					订单总额:<label class="label">¥{{ orderData.payTotalFee ? (orderData.payTotalFee | NumFormat) : '0.00' }}</label>
+					订单总额:<label class="label">¥{{ orderData.payTotalFee | NumFormat }}</label>
 				</view>
 			</view>
 			<view class="information-view">
@@ -22,7 +22,7 @@
 			</view>
 			<view class="information-view same">
 				<view class="view-num">
-					待付金额:<text class="red">¥{{ orderData.pendingPayments ? (orderData.pendingPayments | NumFormat) : '0.00' }}</text>
+					待付金额:<text class="red">¥{{ orderData.pendingPayments | NumFormat }}</text>
 				</view>
 				<view class="view-man"></view>
 			</view>
@@ -35,7 +35,7 @@
 				</view>
 				<view class="information-view same">
 					<view class="view-num">
-						余额抵扣:<label class="label">¥{{ orderData.balancePayFee ? (orderData.balancePayFee | NumFormat) : '0.00' }}</label>
+						余额抵扣:<label class="label">¥{{ orderData.balancePayFee | NumFormat }}</label>
 					</view>
 				</view>
 				<view class="information-view ">
@@ -46,272 +46,280 @@
 						运费:<label class="label">到付</label>
 					</view>
 					<view class="view-num" v-if="orderData.postageFlag == 1">
-						运费:<label class="label">¥{{ orderData.postage | NumFormat}}</label>
+						运费:<label class="label">¥{{ orderData.postage | NumFormat }}</label>
 					</view>
 				</view>
-				<view class="information-view same" v-if="orderData.userBeans>0">
-					<view class="view-man" >
+				<view class="information-view same" v-if="orderData.userBeans > 0">
+					<view class="view-man">
 						采美豆抵用运费:<label class="label">{{ orderData.userBeans }}</label>
 					</view>
 				</view>
-				<view class="information-view" v-if=" orderData.discountFee && orderData.discountFee>0">
+				<view class="information-view" v-if="orderData.discountFee && orderData.discountFee > 0">
 					<view class="view-num">
-						经理折扣:<label class="label">¥{{ orderData.discountFee ? (orderData.discountFee | NumFormat) : '0.00' }}</label>
+						经理折扣:<label class="label">¥{{ orderData.discountFee | NumFormat }}</label>
 					</view>
 				</view>
-				<view class="information-view same" v-if="orderData.promotionFullReduction && orderData.promotionFullReduction>0">
-					<view class="view-man" >
-						促销满减:<label class="label">¥{{ orderData.promotionFullReduction | NumFormat}}</label>
+				<view
+					class="information-view same"
+					v-if="orderData.promotionFullReduction && orderData.promotionFullReduction > 0"
+				>
+					<view class="view-man">
+						促销满减:<label class="label">¥{{ orderData.promotionFullReduction | NumFormat }}</label>
 					</view>
 				</view>
-				<view class="information-view" v-if="orderData.couponAmount && orderData.couponAmount>0">
+				<view class="information-view" v-if="orderData.couponAmount && orderData.couponAmount > 0">
 					<view class="view-man">
-						优惠券:<label class="label">¥{{ orderData.couponAmount | NumFormat}}</label>
+						优惠券:<label class="label">¥{{ orderData.couponAmount | NumFormat }}</label>
 					</view>
 				</view>
-				<view class="information-view same" v-if="(orderData.presentCount + orderData.promotionalGiftsCount)>0">
+				<view class="information-view same" v-if="orderData.presentCount + orderData.promotionalGiftsCount > 0">
 					<view class="view-man">
-						赠品总数:<label class="label">{{ orderData.presentCount + orderData.promotionalGiftsCount}}</label>
+						赠品总数:<label class="label">{{
+							orderData.presentCount + orderData.promotionalGiftsCount
+						}}</label>
 					</view>
 				</view>
 				<view class="information-view">
 					<view class="view-man">
-						应付总额:<label class="red">¥{{ orderData.payableAmount ? (orderData.payableAmount | NumFormat) : '0.00' }}</label>
+						应付总额:<label class="red">¥{{ orderData.payableAmount | NumFormat }}</label>
 					</view>
 				</view>
 				<view class="information-view same">
 					<view class="view-num">
-						已支付:<label class="red">¥{{ orderData.receiptAmount ? (orderData.receiptAmount | NumFormat) : '0.00' }}</label>
+						已支付:<label class="red">¥{{ orderData.receiptAmount | NumFormat }}</label>
 					</view>
-					<view class="view-man"></text></view>
+					<view class="view-man"></view>
 				</view>
 			</template>
-		 </view>
-		 <view class="openinfo" v-if="infoflag">
-		 	<view class="btnInfo" @click="openShow">
+		</view>
+		<view class="openinfo" v-if="infoflag">
+			<view class="btnInfo" @click="openShow">
 				查看更多<label class="iconfont icon-xiangxiajiantou"></label>
 			</view>
-		 </view>
+		</view>
 	</view>
 </template>
 
 <script>
-	const thorui = require("@/components/clipboard/clipboard.thorui.js")
-	export default{
-		name:"information",
-		props:{
-			information:{
-				type:Object
-			}
-		},
-		data() {
-			return{
-				orderData:'',
-				openShowflag:false,
-				infoflag:true
-			}
-		},
-		created(){
-			this.initData(this.information)
+const thorui = require('@/components/clipboard/clipboard.thorui.js')
+export default {
+	name: 'information',
+	props: {
+		information: {
+			type: Object
+		}
+	},
+	data() {
+		return {
+			orderData: '',
+			openShowflag: false,
+			infoflag: true
+		}
+	},
+	created() {
+		this.initData(this.information)
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			if (!value) return '0.00'
+			let number = parseFloat(Number(value))
+			return number
 		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
-			},
-			TextFormat(status) {//处理金额
-				let HtmlText,
-					typeTextObject={
-						0:'待确认',
-						4:'交易完成',
-						5:'订单完成',
-						6:'已关闭',
-						7:'交易全退',
-						77:'交易全退',
-						11:'待付款待发货',
-						12:'待付款部分发货',
-						13:'待付款已发货',
-						21:'部分付款待发货',
-						22:'部分付款部分发货',
-						23:'部分付款已发货',
-						31:'已付款待发货',
-						32:'已付款部分发货',
-						33:'已付款已发货',
-						111:'待付款待发货',
-					};
-				
-				Object.keys(typeTextObject).forEach(key => {
-					if(key == status){
-						HtmlText = typeTextObject[key]
-					}
-				})
-				return HtmlText
-			},
-		},	
-		computed: {
+		TextFormat(status) {
+			//处理金额
+			let HtmlText,
+				typeTextObject = {
+					0: '待确认',
+					4: '交易完成',
+					5: '订单完成',
+					6: '已关闭',
+					7: '交易全退',
+					77: '交易全退',
+					11: '待付款待发货',
+					12: '待付款部分发货',
+					13: '待付款已发货',
+					21: '部分付款待发货',
+					22: '部分付款部分发货',
+					23: '部分付款已发货',
+					31: '已付款待发货',
+					32: '已付款部分发货',
+					33: '已付款已发货',
+					111: '待付款待发货'
+				}
 
+			Object.keys(typeTextObject).forEach(key => {
+				if (key == status) {
+					HtmlText = typeTextObject[key]
+				}
+			})
+			return HtmlText
+		}
+	},
+	computed: {},
+	watch: {
+		information: {
+			handler: function(val) {
+				this.initData(val)
+			},
+			deep: true //对象内部的属性监听,也叫深度监听
+		}
+	},
+	methods: {
+		openShow() {
+			this.openShowflag = true
+			this.infoflag = false
 		},
-		watch:{
-			information:{
-				handler:function(val){
-					this.initData(val)
-				},
-				deep:true//对象内部的属性监听,也叫深度监听
-			}
+		initData(res) {
+			this.orderData = res
+			console.log('this.orderData', this.orderData)
 		},
-		methods:{
-			openShow(){
-				this.openShowflag = true;
-				this.infoflag = false;
-			},
-			initData(res) {
-				this.orderData = res;
-			},
-			clipboard(data) {
-				thorui.getClipboardData(data, (res) => {
-					if (res) {
-						this.$util.msg("复制成功",2000,true,'success');
-					} else {
-						this.$util.msg("复制失败",2000,true,'none');
-					}
-				})
-			}
+		clipboard(data) {
+			thorui.getClipboardData(data, res => {
+				if (res) {
+					this.$util.msg('复制成功', 2000, true, 'success')
+				} else {
+					this.$util.msg('复制失败', 2000, true, 'none')
+				}
+			})
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.information-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.information-content{
-			width: 702rpx;
-			padding: 15rpx  24rpx 20rpx 24rpx;
-			.information-view{
-				height: 50rpx;
-				line-height: 50rpx;
-				font-size: $font-size-24;
-				margin: 4rpx 0;
-				// display: flex;
-				width: 55%;
-				display: inline-block;
-				&.same{
-					width: 45%;
-					text-align: right;
-				}
-				// &.title{
-				// 	height: 68rpx;
-				// 	line-height: 68rpx;
-				// 	margin-bottom: 5rpx;
-				// }
-				view{
-					// flex: 1;
-					color: $text-color;
-					color: #999999;
-					.label{
-						color: #666666;
-					}
-				}
-				.view-num.title{
-					height: 68rpx;
-					line-height: 68rpx;
-					position: relative;
-					.bage-icon{
-						width: 50rpx;
-						height: 50rpx;
-						display: block;
-						position: absolute;
-						right: 0;
-						top: 9rpx;
-					}
-					.bage-buss{
-						display: inline-block;
-						width: 72rpx;
-						height: 30rpx;
-						background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-						border-radius: 4rpx;
-						line-height: 30rpx;
-						font-size: $font-size-24;
-						text-align: center;
-						color: #FFFFFF;
-						margin-top: 10rpx;
-					}
-					.bage-auto{
-						display: inline-block;
-						width: 72rpx;
-						height: 30rpx;
-						background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-						border-radius: 4rpx;
-						line-height: 30rpx;
-						font-size: $font-size-24;
-						text-align: center;
-						color: #FFFFFF;
-						margin-top: 10rpx;
-					}
-					.bage-text{
-						display: inline-block;
-						font-size: $font-size-28;
-						line-height: 68rpx;
-						text-align: left;
-						color: $color-system;
-						// margin-left: 10rpx;
-					}
-				}
-				.view-num.ord{
-					color: $color-system;
-					text-align: left;
-					flex:3;
-					font-weight: bold;
-				}
-				.view-num.time{
-					color: #999999;
-					flex: 6;
-				}
-				// .bold{
-				// 	font-weight: bold;
-				// }
-				.red{
-					color: #FF2A2A;
+.information-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.information-content {
+		width: 702rpx;
+		padding: 15rpx 24rpx 20rpx 24rpx;
+		.information-view {
+			height: 50rpx;
+			line-height: 50rpx;
+			font-size: $font-size-24;
+			margin: 4rpx 0;
+			// display: flex;
+			width: 55%;
+			display: inline-block;
+			&.same {
+				width: 45%;
+				text-align: right;
+			}
+			// &.title{
+			// 	height: 68rpx;
+			// 	line-height: 68rpx;
+			// 	margin-bottom: 5rpx;
+			// }
+			view {
+				// flex: 1;
+				color: $text-color;
+				color: #999999;
+				.label {
+					color: #666666;
 				}
-				.view-type{
-					float: right;
-					text-align: right;
-					color: #FF2A2A;
-					flex:4;
+			}
+			.view-num.title {
+				height: 68rpx;
+				line-height: 68rpx;
+				position: relative;
+				.bage-icon {
+					width: 50rpx;
+					height: 50rpx;
+					display: block;
+					position: absolute;
+					right: 0;
+					top: 9rpx;
 				}
-				.clipboard{
-					width: 84rpx;
-					height: 36rpx;
-					background: linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
+				.bage-buss {
+					display: inline-block;
+					width: 72rpx;
+					height: 30rpx;
+					background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
+					border-radius: 4rpx;
+					line-height: 30rpx;
+					font-size: $font-size-24;
 					text-align: center;
+					color: #ffffff;
+					margin-top: 10rpx;
+				}
+				.bage-auto {
+					display: inline-block;
+					width: 72rpx;
+					height: 30rpx;
+					background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+					border-radius: 4rpx;
+					line-height: 30rpx;
 					font-size: $font-size-24;
-					color: #FFFFFF;
-					border-radius: 6rpx;
-					line-height: 36rpx;
+					text-align: center;
+					color: #ffffff;
+					margin-top: 10rpx;
+				}
+				.bage-text {
 					display: inline-block;
-					margin-left: 42rpx;
+					font-size: $font-size-28;
+					line-height: 68rpx;
+					text-align: left;
+					color: $color-system;
+					// margin-left: 10rpx;
 				}
 			}
+			.view-num.ord {
+				color: $color-system;
+				text-align: left;
+				flex: 3;
+				font-weight: bold;
+			}
+			.view-num.time {
+				color: #999999;
+				flex: 6;
+			}
+			// .bold{
+			// 	font-weight: bold;
+			// }
+			.red {
+				color: #ff2a2a;
+			}
+			.view-type {
+				float: right;
+				text-align: right;
+				color: #ff2a2a;
+				flex: 4;
+			}
+			.clipboard {
+				width: 84rpx;
+				height: 36rpx;
+				background: linear-gradient(34deg, rgba(255, 41, 41, 1) 0%, rgba(255, 109, 27, 1) 100%);
+				text-align: center;
+				font-size: $font-size-24;
+				color: #ffffff;
+				border-radius: 6rpx;
+				line-height: 36rpx;
+				display: inline-block;
+				margin-left: 42rpx;
+			}
 		}
 	}
-	.openinfo{
-		.btnInfo{
-			width: 140rpx;
-			height: 40rpx;
-			border: 2rpx solid #e1e1e1;
-			border-radius: 6rpx;
-			padding: 5rpx;
-			text-align: center;
-			color: #b2b2b2;
-			margin: 20rpx auto;
-			font-size:  $font-size-24;
-			.iconfont{
-				position: relative;
-				top: 5rpx;
-				right: -3rpx;
-			}
+}
+.openinfo {
+	.btnInfo {
+		width: 140rpx;
+		height: 40rpx;
+		border: 2rpx solid #e1e1e1;
+		border-radius: 6rpx;
+		padding: 5rpx;
+		text-align: center;
+		color: #b2b2b2;
+		margin: 20rpx auto;
+		font-size: $font-size-24;
+		.iconfont {
+			position: relative;
+			top: 5rpx;
+			right: -3rpx;
 		}
 	}
+}
 </style>

+ 17 - 14
pages/supplier/order/order-details.vue

@@ -162,32 +162,35 @@
 		},
 		onLoad(option){
 			console.log(option.shopOrderId)
-			this.shopOrderId = option.shopOrderId;
+			this.shopOrderId = option.shopOrderId
 			this.initShopOrderDetails()
 		},
 		filters:{
 			sendOutStatusType(value) {
 				if (value === null) {
-				  return '未发货';
+				  return '未发货'
 				} else if(value === 1) {
-				  return '待发货';
+				  return '待发货'
 				} else if(value === 2) {
-				  return '部分发货';
+				  return '部分发货'
 				} else{
-				  return '已发货';
+				  return '已发货'
 				}
 			},
 			payStatusType(value) {
 				if (value === 1) {
-				  return '待结算';
+				  return '待结算'
 				} else if (value === 2) {
-				  return '部分结算';
+				  return '部分结算'
 				} else {
-				  return '已结算';
+				  return '已结算'
 				}
 			},
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				//处理金额
+				if (!value) return '0.00'
+				let number = parseFloat(Number(value))
+				return number
 			},
 		},	
 		methods: {
@@ -198,7 +201,7 @@
 					this.payShopRecord = response.data.payShopRecord
 					this.isRequest = true
 				}).catch(err =>{
-					this.$util.msg(err.msg,2000);
+					this.$util.msg(err.msg,2000)
 				})
 			},
 			handButtonConfirm(data){//监听点击时间的按钮类型并执行...
@@ -215,17 +218,17 @@
 				}
 			},
 			setStatusText(status){
-				let textColor='';
+				let textColor=''
 				switch(status){
 					case 1:
 						textColor = '#FF2A2A'
-						break;
+						break
 					case 2:
 						textColor = '#E15616'
-						break;
+						break
 					case 3:
 						textColor = '#38CB3D'
-						break;
+						break
 				}
 				return textColor
 			},

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

@@ -65,7 +65,7 @@
 	import orderButton from '@/components/cm-module/orderDetails/orderButton'			 //底部按钮
 	import shareAlert from '@/components/cm-module/modelAlert/shareAlert.vue'			 //分享弹窗
 	import orderModel from '@/components/cm-module/modelAlert/order-alert'			 //付款弹窗
-	import activiPopup from "@/components/cm-module/orderDetails/activipopu"		//促销活动弹窗
+	import activiPopup from '@/components/cm-module/orderDetails/activipopu'		//促销活动弹窗
 	import activityBean from '@/components/cm-module/activity/activityBean.vue'
 	
 	
@@ -133,7 +133,7 @@
 		},
 		onLoad(option){
 			console.log(option)
-			this.shareType = option.type;
+			this.shareType = option.type
 			this.orderId = option.orderId
 			if(this.shareType ==='share'){
 				this.state = 0
@@ -170,7 +170,7 @@
 						32:'已付款部分发货',
 						33:'已付款已发货',
 						111:'待付款待发货',
-					};
+					}
 				Object.keys(typeTextObject).forEach(key => {
 					if(key == status){
 						HtmlText = typeTextObject[key]
@@ -185,7 +185,7 @@
 			},
 			initOrderDetaileData(){//初始化页面数据@参数:订单ID
 				this.OrderService.QueryOrderDetails({ orderId : this.orderId, userId : this.userId}).then(response =>{
-					let data = response.data;
+					let data = response.data
 					this.isRequest = true
 					this.orderInfo = data.order
 					this.shareCode = data.shareCode
@@ -220,10 +220,10 @@
 			handShowAlert(data){//判断点击的按钮类型并执行...
 				switch(data.type){
 					case 'delete':
-						this.handOrderDetele();
+						this.handOrderDetele()
 						break
 					case 'cancel':
-						this.handCenceConfirm();
+						this.handCenceConfirm()
 						break
 					case 'query':
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+this.orderId)
@@ -238,7 +238,7 @@
 						this.handOrderConfirmation()
 						break
 					case 'payment':
-						this.hanldConfirmFn(data.orderId);
+						this.hanldConfirmFn(data.orderId)
 						break	
 				}
 			},
@@ -248,16 +248,16 @@
 					this.payModelData = response.data
 					switch(dataCode){
 						case 1:
-							this.isPayModel = true;
+							this.isPayModel = true
 							this.modelType = 1
-							break;
+							break
 						case 2:
-							this.isPayModel = true;
+							this.isPayModel = true
 							this.modelType = 2
-							break;
+							break
 						case -1:
 							this.$util.modal('','订单已申请全部退款,无需再付款!','确定','',false,() =>{})
-							break;
+							break
 						default:
 							if(response.data.onlinePayFlag == '1'){
 								this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${response.data.pendingPayments}&orderId=${data.orderId}`)
@@ -296,7 +296,7 @@
 			hanldConfirmFn (orderId){//确认打款供应商
 				this.$util.modal('提示','确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好?','确定','取消',true,() =>{
 					this.OrderService.confirmpayment({orderId:orderId,userId:this.userId}).then(response =>{
-						this.$util.msg('确认成功',2000,true,'success');
+						this.$util.msg('确认成功',2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -319,7 +319,7 @@
 			handOrderConfirmation (){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
 					this.OrderService.AffirmOrder({orderId:this.orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.initOrderDetaileData()
 						},2000)
@@ -331,7 +331,7 @@
 			handOrderDetele(){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
 					this.OrderService.DeleteOrder({orderId:this.orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							if(this.shareType ==='share'){
 								this.$api.switchTabTo('/pages/tabBar/home/index')
@@ -347,7 +347,7 @@
 			handCenceConfirm(){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
 					this.OrderService.CancelOrder({orderId:this.orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						this.initOrderDetaileData()
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -385,11 +385,11 @@
 				this.navbarHeight= headerPosi.bottom + btnPosi.bottom// 原胶囊bottom + 现胶囊bottom
 			},
 			setHeaderBtnPosi(){// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
 				return headerBtnPosi
 			},
 			setSysteminfo(){
-				let systeminfo;
+				let systeminfo
 				uni.getSystemInfo({ // 获取设备信息
 					success: (res) => {
 						systeminfo = res

+ 14 - 14
pages/user/order/order-sharedetails.vue

@@ -2,10 +2,10 @@
 	<view class="container details clearfix">
 		<!-- 地址选择 -->
 		<order-address ref="orderAddress" v-if="isRequest" :addressData="addressData" ></order-address>
-		<!-- 订单信息 -->
-		<order-information ref="information" v-if="isRequest" :information="information"></order-information>
 		<!-- 商品 -->
 		<goods-list ref='goods' v-if="isRequest" :shopOrderData="shopOrderData" @popupClick="hanldePopupFn"></goods-list>
+		<!-- 订单信息 -->
+		<order-information ref="information" v-if="isRequest" :information="information"></order-information>
 		<!-- 发票信息 -->
 		<invoice-tent ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice"></invoice-tent>
 		<!-- 转账记录 -->
@@ -31,7 +31,7 @@
 	import transfeRecord from '@/components/cm-module/orderDetails/transfeRecord'		 //转账信息
 	import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'		 //支付记录
 	import refundRecord from '@/components/cm-module/orderDetails/refundRecord'		 //退款记录
-	import activiPopup from "@/components/cm-module/orderDetails/activipopu"		//促销活动弹窗
+	import activiPopup from '@/components/cm-module/orderDetails/activipopu'		//促销活动弹窗
 	
 	export default {
 		components:{
@@ -79,17 +79,17 @@
 		methods: {
 			initOrderDetaileData(){//初始化页面数据@参数:订单ID
 				this.OrderService.QueryOrderDetails({ orderId : this.orderId,userId : this.userId }).then(response =>{
-					let resData = response.data;
+					let data = response.data
+					this.status = data.order.status
+					this.addressData = data.userInfo
+					this.information = data.order
+					this.shopOrderData = data.shopOrderList
+					this.orderInvoice = data.orderInvoice
+					this.returnedPurchaseList = data.returnedPurchaseList
+					this.discernReceiptList = data.discernReceiptList
+					this.receiptAmount = data.order.receiptAmount
+					this.returnedPurchaseFee = data.order.returnedPurchaseFee
 					this.isRequest = true
-					this.status = resData.order.status
-					this.addressData = resData.userInfo
-					this.information = resData.order
-					this.shopOrderData = resData.shopOrderList
-					this.orderInvoice = resData.orderInvoice
-					this.returnedPurchaseList = resData.returnedPurchaseList
-					this.discernReceiptList = resData.discernReceiptList
-					this.receiptAmount = resData.order.receiptAmount
-					this.returnedPurchaseFee = resData.order.returnedPurchaseFee
 					this.mapStateArr.forEach(el => {
 						el.val.forEach(value => {
 							if(this.status === value){
@@ -98,7 +98,7 @@
 						})
 					})
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			hanldePopupFn(data){//监听活动内容

+ 7 - 9
pages/user/order/order-sharelogin.vue

@@ -44,11 +44,9 @@
 					code:'',
 					iv:'',
 					encryptedData:'',
-					shareCode:'',
 					orderId:0,			//订单ID
 					userId:0,			//机构用户ID	
 					serviceProviderId:0,//协销ID	
-					
 				}
 			}
 		},
@@ -67,18 +65,18 @@
 				this.params.code = await authorize.getCode('weixin')
 				this.params.iv = getUserInfo.iv
 				this.params.encryptedData = getUserInfo.encryptedData
-				this.OrderService.OrderShareCode(this.params).then(response =>{
-					if(response.code == 1){// 同为会所运营人员查看订单详情
+				this.OrderService.OrderShareCodeIdentity(this.params).then(response =>{
+					if(response.code == 0){// 初始化订单商品数据
+						console.log(response.msg)
+						this.getOrderCommodityData()
+					}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}`)
-					}else if(response.code == 0){// 游客第二次查看订单详情
+					}else if(response.code == 3){// 游客第二次查看订单详情
 						this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${this.params.userId}`)
-					}else if(response.code == -1){// 校验错误信息
+					}else{// 错误信息返回
 						this.$util.modal('提示',response.msg,'确定','',false,() =>{})
-					}else{// 未填分享码
-						console.log(response.msg)
-						this.getOrderCommodityData()
 					}
 					// if(response.code === 2){
 					// 	this.$api.navigateTo(`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}`)

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

@@ -41,25 +41,25 @@
 		},
 		methods:{
 			async initGetCode(){
-				const getUserInfo = await authorize.getUserInfo('weixin');
+				const getUserInfo = await authorize.getUserInfo('weixin')
 				this.params.iv = getUserInfo.iv
 				this.params.encryptedData = getUserInfo.encryptedData
 				this.params.code = await authorize.getCode('weixin')
 			},
 			goLogin() {
 				if(this.params.shareCode == ''){
-					this.$util.msg('请联系分享人获取分享码',2000); 
+					this.$util.msg('请联系分享人获取分享码',2000) 
 					return
 				}
 				if(!this.$api.isNumber(this.params.shareCode)){
-					this.$util.msg('分享码格式不正确',2000);
+					this.$util.msg('分享码格式不正确',2000)
 					return
 				}
 				this.OrderService.OrderShareCode(this.params).then(response =>{
 					if (response.code === 0) {//游客第一次查看订单详情
 						this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${this.params.userId}`)
 					}else{
-						this.$util.msg(response.msg,2000);
+						this.$util.msg(response.msg,2000)
 					}
 				})
 			},

+ 216 - 203
services/order.service.js

@@ -2,248 +2,261 @@
  * 这是与购物有关的业务逻辑的服务
  */
 export default class OrderService {
-	constructor(AjaxService) {
-		Object.assign(this, { AjaxService })
-		this.name = 'OrderService'
-	}
-	/* 查询订单列表 */
-	QueryOrderList (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/list', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 查询订单详情 */
-	QueryOrderDetails (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/detail', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 操作取消订单 */
-	CancelOrder (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/cancel', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 操作删除订单 */
-	DeleteOrder (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/delete', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 确认订单操作 */
-	AffirmOrder (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/confirm', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 确认收货操作 */
-	ConfirmReceipt (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/receive', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 订单物流信息 */
-	QueryLogistics (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/logistics', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    constructor(AjaxService) {
+        Object.assign(this, { AjaxService })
+        this.name = 'OrderService'
+    }
+    /* 查询订单列表 */
+    QueryOrderList (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/list', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 查询订单详情 */
+    QueryOrderDetails (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/detail', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 操作取消订单 */
+    CancelOrder (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club/cancel', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 操作删除订单 */
+    DeleteOrder (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club/delete', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 确认订单操作 */
+    AffirmOrder (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club/confirm', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 确认收货操作 */
+    ConfirmReceipt (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club/receive', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 订单物流信息 */
+    QueryLogistics (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/logistics', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *获取订单分享码
 	 * @param orderID
 	 */
-	QueryOrderShareCode (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/share/code', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    QueryOrderShareCode (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/share/code', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *校验订单分享码
 	 * @param orderID
 	 */
-	OrderShareCode (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/share/code/check', 
-			data, 
-			isLoading: true,
-			isStatus: true ,
-			isHost:true
-		})
-	}
-	/**
+    OrderShareCode (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/share/code/check', 
+            data, 
+            isLoading: true,
+            isStatus: true ,
+            isHost:true
+        })
+    }
+    /**
+	 *订单分享权限初始化
+	 * @param orderID
+	 */
+    OrderShareCodeIdentity (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/share/code/identity', 
+            data, 
+            isLoading: true,
+            isStatus: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *机构搜索订单
 	 *@param searchWord 关键词
 	 *@param userId		用户ID
 	 *@param pageNum	页码
 	 *@param pageSize	条数
 	 */
-	SearchOrderInfo (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/search', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    SearchOrderInfo (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/search', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *搜索订单历史记录
 	 * @param orderID
 	 */
-	SearchOrderHistory (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/search/history', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    SearchOrderHistory (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/search/history', 
+            data, 
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 *清楚订单历史记录
 	 * @param orderID
 	 */
-	ClearOrderHistory (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/search/history/delete', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    ClearOrderHistory (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/search/history/delete', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *@机构-商品立即购买确认订单初始化数据
 	 *@param userId 用户ID
 	 *@param productCount	商品数量
 	 *@param productId 商品ID
 	 *@param source 来源
 	 */
-	ProductCreateOrderInfo (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/product/settlement', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    ProductCreateOrderInfo (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/product/settlement', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *@机构-购物车去结算确认订单初始化数据
 	 *@param userId 用户ID
 	 *@param source	来源
 	 *@param productIds 商品IDs
 	 */
-	CartCreateOrderInfo (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/cart/settlement', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    CartCreateOrderInfo (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/cart/settlement', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 *@确认订单-获取邮费信息
 	 *@param productIds 商品ID【”,”分割】
 	 *@param totalPrice	商品总额
 	 *@param userId		用户ID
 	 *@param townID		地址区ID
 	 */
-	GetOrderPostage (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/postage', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    GetOrderPostage (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/postage', 
+            data, 
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 *@确认订单-获取发票信息
 	 *@param userId		用户ID
 	 */
-	GetFindInvoice (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/invoice', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    GetFindInvoice (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/invoice', 
+            data, 
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 *@确认订单-保存发票信息
 	 *@param userId		用户ID
 	 */
-	UpdateInvoice (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/invoice/update', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 提交订单 orderId 订单ID */
-	CreatedOrderSubmit (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/submit/generate', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/* 订单支付,效验付款规则 orderId 订单ID */
-	OrderPaymentValidation (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/pay/check', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/* 余额抵扣 orderId 订单ID */
-	OrderBalanceDeduction (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/pay/balance/deduction', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/* 分享订单初始化查询 orderId 订单ID */
-	OrderCommodityData (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/share/product', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/*二手订单 打款供应商 */
-	confirmpayment (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/second/payment/confirm', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
+    UpdateInvoice (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club/invoice/update', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 提交订单 orderId 订单ID */
+    CreatedOrderSubmit (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/submit/generate', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /* 订单支付,效验付款规则 orderId 订单ID */
+    OrderPaymentValidation (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/pay/check', 
+            data, 
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /* 余额抵扣 orderId 订单ID */
+    OrderBalanceDeduction (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/pay/balance/deduction', 
+            data, 
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /* 分享订单初始化查询 orderId 订单ID */
+    OrderCommodityData (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/share/product', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /*二手订单 打款供应商 */
+    confirmpayment (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club/second/payment/confirm', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
 }