Administrator %!s(int64=4) %!d(string=hai) anos
pai
achega
2ff6550ab0

+ 1 - 1
components/cm-module/orderDetails/orderListButton.vue

@@ -4,8 +4,8 @@
 		<view class="button-content">
 			<view class="btn btn-payment" v-if="order.affirmPaymentFlag=='00'" @click.stop="btnConfirm('payment',order)">确认打款<text>供应商</text></view>
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
-			<view class="btn btn-share"  @click.stop="onShareCode(order.orderID)">分享订单</view>
 			<view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view>
+			<view class="btn btn-share"  @click.stop="onShareCode(order.orderID)">分享订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>
 			<view class="btn btn-delete" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',order)">删除订单</view>
 			<view class="btn btn-query" v-if="btnState.isQuery" @click.stop="btnConfirm('query',order)">查看物流</view>

+ 27 - 0
seller/pages/order/order-historylist.vue

@@ -84,6 +84,7 @@
 											  :status="order.status" 
 											  :orderID="order.orderID" 
 											  :userID = "order.userID"
+											  :secondHandOrderFlag = "order.secondHandOrderFlag"
 											  @buttonConfirm="handButtonConfirm">
 								</order-button>
 							</view>
@@ -169,6 +170,7 @@
 				pullFlag: true,
 				navbarHeight:'',
 				nomoreText: '上拉显示更多',
+				userID:0
 			}
 		},
 		onLoad(option) {
@@ -182,6 +184,9 @@
 					self.winHeight = calc-82;
 				}
 			});
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+			})
 		},
 		filters:{
 			NumFormat(value) {//处理金额
@@ -325,8 +330,30 @@
 					case 'confirm':
 						this.handOrderConfirm(data.orderId);
 						break
+					case 'again':
+						this.handOrderAgain(data.orderId);
+						break		
 				}
 			},
+			handOrderAgain(id){
+				this.aganOrderID = id;
+				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');
+					}
+				}).catch(error =>{
+					if(error.code== -3){
+						this.showAgan = true;
+						this.promptitle = error.msg;
+						this.failList = error.data;
+					}else if(error.code== -2){
+						this.$util.modal('',error.msg,'确定','',false,() =>{})
+					}else{
+						this.$util.msg(error.msg,2000)
+					}
+					})
+			},
 			handOrderConfirm (id){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
 					this.OrderService.AffirmOrder({orderID:id}).then(response =>{