Browse Source

Merge branch 'developerB' of git.caimei365.com:caimei-repository/caimei-applets-caimei into developerB

zhengjinyi 4 years ago
parent
commit
7bc60fab2d

+ 1 - 9
components/cm-module/orderDetails/sellerDetaileButton.vue

@@ -2,7 +2,7 @@
 	<view class="button-template" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 		<!-- 底部按钮 -->
 		<view class="button-content">
-			<view class="btn btn-cancel"  @click.stop="btnagainConfirm('again',order,serviceProviderId)">再来一单</view>
+			<view class="btn btn-cancel"  @click.stop="btnConfirm('again',order)">再来一单</view>
 			<view class="btn btn-cancel" v-if="btnState.isCancel"  @click.stop="btnConfirm('cancel',order)">取消订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isDelete"  @click.stop="btnConfirm('delete',order)">删除订单</view>
 			<view class="btn btn-cancel" @click.stop="onShareCode">
@@ -129,14 +129,6 @@
 					}
 				this.$emit('buttonConfirm',data)
 			},
-			btnagainConfirm(type,id,serviceid){
-				let data = {
-					type:type,
-					orderId:id,
-					serviceProviderId:serviceid,
-				}
-				this.$emit('buttonConfirm',data)
-			},
 		}
 	}
 </script>

+ 1 - 9
components/cm-module/orderDetails/sellerOrderButton.vue

@@ -4,7 +4,7 @@
 		<view class="button-content"> 
 			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',orderID)">取消订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',orderID)">删除订单</view>
-			<view class="btn btn-cancel"  @click.stop="btnagainConfirm('again',orderID,serviceProviderId)">再来一单</view>
+			<view class="btn btn-cancel"  @click.stop="btnConfirm('again',orderID)">再来一单</view>
 			<view class="btn btn-cancel"  @click.stop="onShareCode(orderID,userID)">分享订单</view>	
 			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',orderID)">确认订单</view>
 		</view>
@@ -99,14 +99,6 @@
 					}
 				this.$emit('buttonConfirm',data)
 			},
-			btnagainConfirm(type,id,serviceid){
-				let data = {
-					type:type,
-					orderId:id,
-					serviceProviderId:serviceid,
-				}
-				this.$emit('buttonConfirm',data)
-			}
 		}
 	}
 </script>

+ 7 - 3
seller/pages/order/order-details.vue

@@ -122,6 +122,7 @@
 					title: '订单详情', // 导航栏 中间的标题
 				},
 				clauseData:{},
+				againUserId:0,//用户id
 			}
 		},
 		onLoad(option){
@@ -136,6 +137,9 @@
 			}else{
 				this.listType = option.listType
 			}
+			this.$api.getStorage().then((resolve) =>{
+				this.againUserId = resolve.userID
+			})
 			this.getHeaderTopHeight()
 			this.initOrderDetaileData()
 		},
@@ -222,13 +226,13 @@
 						this.getOrderPaymentValidation(data)
 						break;
 					case 'again':
-						this.handOrderAgain(data.orderId,data.serviceProviderId);
+						this.handOrderAgain(data.orderId);
 						break		
 				}
 			},
-			handOrderAgain(id,serviceid){
+			handOrderAgain(id){
 				this.aganOrderID = id;
-				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,serviceProviderId:serviceid,confirmFlag:0}).then(res =>{
+				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,userId:this.againUserId,confirmFlag:0}).then(res =>{
 					if(res.code==0){
 						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds,userID:res.data.userId})
 						this.$api.navigateTo('/seller/pages/cart/cart');

+ 7 - 3
seller/pages/order/order-list.vue

@@ -206,6 +206,7 @@
 				failList:[],//失效商品
 				promptitle:'',
 				aganOrderID:0,//再来一单商品id
+				userID:0
 				
 			}
 		},
@@ -221,6 +222,9 @@
 					self.winHeight = calc-self.CustomBar-82;
 				}
 			});
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+			})
 		},
 		filters:{
 			NumFormat(value) {//处理金额
@@ -388,13 +392,13 @@
 						this.handOrderConfirm(data.orderId);
 						break
 					case 'again':
-						this.handOrderAgain(data.orderId,data.serviceProviderId);
+						this.handOrderAgain(data.orderId);
 						break	
 				}
 			},
-			handOrderAgain(id,serviceid){
+			handOrderAgain(id){
 				this.aganOrderID = id;
-				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,serviceProviderId:serviceid,confirmFlag:0}).then(res =>{
+				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,userId:this.userID,confirmFlag:0}).then(res =>{
 					if(res.code==0){
 						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds,userID:res.data.userId})
 						this.$api.navigateTo('/seller/pages/cart/cart');