Browse Source

commit -m 订单模块接口联调

zhengjinyi 3 years ago
parent
commit
9c26986760

+ 3 - 1
components/cm-module/cart-components/index.vue

@@ -63,7 +63,9 @@
 														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
 													</text>
 												</view>
-												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
+												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">
+													{{pros.promotions.name}}
+												</view>	
 											</view>
 											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
 												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	

+ 1 - 1
components/cm-module/creatOrder/sellerInvoice.vue

@@ -153,7 +153,7 @@
 			},
 			updateInvoiceFn(){//保存发票信息
 				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					let params =Object.assign(this.invoiceData,'',{userId:resolve.userID})
+					let params =Object.assign(this.invoiceData,'',{userId:resolve.userId})
 					this.OrderService.UpdateInvoice(params).then(response =>{})
 				})
 			},

+ 3 - 3
components/cm-module/modelAlert/sellerShareAlert.vue

@@ -24,7 +24,7 @@
 	export default{
 		name:'sharealert',
 		props:{
-			orderID:{
+			orderId:{
 				type:Number
 			}
 		},
@@ -34,11 +34,11 @@
 			}
 		},
 		created() {
-			this.getShareCode(this.orderID)
+			this.getShareCode(this.orderId)
 		},
 		methods:{
 			getShareCode(res){
-				this.OrderService.QueryOrderShareCode({orderID:res}).then(response =>{
+				this.OrderService.QueryOrderShareCode({orderId:res}).then(response =>{
 					this.shareCode = response.data
 					this.$parent.shareCode = this.shareCode;
 				}).catch(error =>{

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

@@ -129,7 +129,7 @@
 			btnConfirm(type,order){
 				let data = {
 						type:type,
-						orderId:order.orderID,
+						orderId:order.orderId,
 						order:order
 					}
 				this.$emit('buttonConfirm',data)

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

@@ -2,12 +2,12 @@
 	<view class="button-template">
 		<!-- 底部按钮 -->
 		<view class="button-content"> 
-			<view class="btn btn-cancel" v-if="secondHandOrderFlag!=1 && !rechargeGoods"  @click.stop="btnConfirm('again',orderID)">再来一单</view>
-			<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="onShareCode(orderID,userID)">分享订单</view>	
+			<view class="btn btn-cancel" v-if="secondHandOrderFlag!=1 && !rechargeGoods"  @click.stop="btnConfirm('again',orderId)">再来一单</view>
+			<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="onShareCode(orderId,userId)">分享订单</view>	
 			<view class="btn btn-query" v-if="btnState.isQuery && order.secondHandOrderFlag!=1" @click.stop="btnConfirm('query',order)">查看物流</view>
-			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',orderID)">确认订单</view>
+			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',orderId)">确认订单</view>
 		</view>
 	</view>
 </template>
@@ -19,10 +19,10 @@
 			status: {
 				type:Number
 			},
-			orderID: {
+			orderId: {
 				type:Number
 			},
-			userID:{
+			userId:{
 				type:Number
 			},
 			rechargeGoods:{
@@ -100,10 +100,10 @@
 				this.$parent.btnClubUserID = uID
 				this.$emit('shareConfirm')
 			},
-			btnConfirm(type,id){
+			btnConfirm(type,orderId){
 				let data = {
 						type:type,
-						orderId:id,
+						orderId:orderId,
 					}
 				this.$emit('buttonConfirm',data)
 			},

+ 143 - 125
pages/seller/cart/cart.vue

@@ -13,7 +13,7 @@
 							<view class="shoptitle">
 								<!--选择商店的全部商品 :disabled="isNnder"-->
 								<view class="checkbox-box" @click.stop="checkShop(item)">
-									<view class="checkbox iconfont" :class="[item.checked ?'icon-yixuanze':'icon-weixuanze']"></view>
+									<view class="checkbox iconfont" :class="[item.isChecked ?'icon-yixuanze':'icon-weixuanze']"></view>
 								</view>
 								<view v-if="item.promotions" class="floor-item-act">
 									<view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>	
@@ -21,17 +21,17 @@
 								<view class="text">{{item.name}}</view> 
 							</view>
 							<view class="productlist">
-								<view 	class="goods-pros" v-for="(pros,idx) in item.productsList" :key="idx">
+								<view 	class="goods-pros" v-for="(pros,idx) in item.cartList" :key="idx">
 									<view class="goods-pros-t">
 										<!--选择商品-->
 										<view class="checkbox-box" @click.stop="ischeck(item,pros,idx)">
-											<view class="checkbox iconfont" :class="[pros.productsChecked ?'icon-yixuanze':'icon-weixuanze']"></view>
+											<view class="checkbox iconfont" :class="[pros.isChecked ?'icon-yixuanze':'icon-weixuanze']"></view>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productID)">
-											<image :src="pros.mainImage ? pros.mainImage :''" alt="" />
+										<view class="pros-img" @click.stop="navToListPage(pros.productId)">
+											<image :src="pros.image ? pros.image :''" alt="" />
 										</view>
 										<view class="pros-product">
-											<view class="producttitle" @click.stop="navToListPage(pros.productID)"	>
+											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>
 												{{pros.name}}
 											</view>
 											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
@@ -42,13 +42,14 @@
 												<!--使用过滤器对总价改变-->
 												<view class="price" :class="PromotionsFormat(pros.promotions) ? 'disabled' : ''">
 													<text>¥</text>
-													{{ (PromotionsFormat(pros.promotions) ? pros.price1 : pros.retailPrice)  | NumFormat }}
+													{{ (PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price)  | NumFormat }}
 												</view>
 												<view class="count" :class="[isshowDelbtn ? 'none':'show']">
+													<text class="count-tips" v-if="pros.number<pros.min">起订量:{{pros.min}}</text>
 													<text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
 													<view class="number-box">
 														<view  class="iconfont icon-jianhao"  @click="changeCountSub(item,pros)"></view>
-														<input class="btn-input" type="number" maxlength='6' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
+														<input class="btn-input" type="number" maxlength='6' v-model="pros.number" @blur="changeNnmber($event,item,pros)">
 														<view  class="iconfont icon-jiahao"   @click="changeCountAdd(item,pros)"></view>
 													</view>
 												</view>
@@ -60,7 +61,9 @@
 														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
 													</text>
 												</view>
-												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
+												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">
+													{{pros.promotions.name}}
+												</view>	
 											</view>
 											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
 												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	
@@ -90,7 +93,7 @@
 										<!--选择商品-->
 										<view class="checkbox-box" @click.stop="ischeckFailure(failure)" v-if="isshowDelbtn">
 											<button class="checkbox iconfont" 
-													:class="[ failure.productsChecked ? 'icon-yixuanze':'icon-weixuanze']">
+													:class="[ failure.isChecked ? 'icon-yixuanze':'icon-weixuanze']">
 											</button>
 										</view>
 										 <text class="img-tip">失效</text>
@@ -162,7 +165,14 @@
 	import activiPopup from "@/components/cm-module/productDetails/cm-activipopu"
 	import modalLayer from "@/components/modal-layer"
 	import { mapState,mapMutations } from 'vuex';
-	
+	const defaultListQuery = {
+			clubId:0, 	// 机构Id
+			serviceProviderId:0, //协销Id
+			againBuyProductIds:'',// 再次购买商品ids
+			pageNum:1,		// 页码
+			pageSize:10,	// 条数
+
+		};
 	export default{
 		components:{
 			tuiSkeleton,
@@ -173,12 +183,10 @@
 		},
 		data(){
 			return{
-				clubId:'',	//机构ID
-				userID:'',
 				kindCount:0,
-				serviceProviderId:'',//协销ID
 				isStock:'',
 				popupShow:false,
+				listQuery: Object.assign({}, defaultListQuery), // 购物车立即结算确认订单参数
 				handlerPros:{},//监听单挑促销商品
 				promotionsList:[],//促销活动列表
 				failureList:[],	//失效商品列表
@@ -201,13 +209,10 @@
 				loadding: false,
 				pullUpOn: true,
 				pullFlag: true,
-				pageSize: 10,
-				pageNum: 1,
 				submitIds:[],
 				depositIds : [6060,6061,6062,6063,6064],//定金商品ID
 				rechargeIds : [6065,6066,6067,6068,6069],//充值余额商品ID
 				isIphoneX:this.$store.state.isIphoneX,
-				againBuyProductIds:''
 			}
 		},
 		onLoad(){
@@ -231,8 +236,9 @@
 				this.isCheckAll=false//是否全选
 				this.submitIds = []
 				this.$api.getStorage().then((resolve) => {
-					this.serviceProviderId = resolve.serviceProviderId;
+					this.listQuery.serviceProviderId = resolve.serviceProviderId ? resolve.serviceProviderId : 0
 					this.initGetCartGoodsList();
+					this.getClubProductNum()
 				})	
 			},
 			initLogin(){
@@ -298,29 +304,28 @@
 				}, 500)
 			},
 			initGetCartGoodsList(){//初始化购物车 index:1
-				let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize,againBuyProductIds:this.againBuyProductIds}
-				 this.SellerService.GetSellerShoppingInfo(params).then(response =>{
+				 this.SellerService.GetSellerShoppingInfo(this.listQuery).then(response =>{
 					this.skeletonShow = false
-					this.$store.commit('updateAllNum',response.data.cartQuantity)
-					this.promotionsList = response.data.promotionsList;
-					this.kindCount = response.data.productCount;
-					const resultsData = response.data.pageDate;	
-					if(resultsData.results.length > 0||response.data.invalidProductList.length>0){
+					let data = response.data
+					let dataPage = data.pageDate
+					this.promotionsList = data.promotionsList;
+					
+					if(dataPage.list.length > 0||data.invalidProductList.length>0){
 						this.isEmpty =false
 					}else{
 						this.isEmpty =true
 					}
-					if(resultsData.results&&resultsData.results.length > 0){
-						this.hasNextPage = resultsData.hasNextPage;
-						this.goodsList = resultsData.results;
+					if(dataPage.list && dataPage.list.length > 0){
+						this.hasNextPage = dataPage.hasNextPage;
+						this.goodsList = dataPage.list;
 						this.goodsList.forEach((item,index) => {
-							let productsListLength = item.productsList.length,invalidLength = 0;
-							item.productsList.forEach(pros => {
-								pros.shopID = item.shopID;
+							let cartListLength = item.cartList.length,invalidLength = 0;
+							item.cartList.forEach(pros => {
+								pros.shopId = item.shopId;
 								pros.isStep = false
 								if(pros.step === 2){
-									if(pros.productCount % pros.minBuyNumber != 0){
-										pros.productCount = pros.minBuyNumber
+									if(pros.number % pros.min != 0){
+										pros.number = pros.min
 										this.totalShopPeice()
 										this.updateShoppogNum(pros)
 									}
@@ -364,21 +369,20 @@
 				})
 			},		
 			getOnReachBottomData(){//上拉加载
-				this.pageNum+=1
-				let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
-				this.SellerService.GetSellerShoppingInfo(params).then(response =>{
+				this.listQuery.pageNum+=1
+				this.SellerService.GetSellerShoppingInfo(this.listQuery).then(response =>{
 					let resultsData = response.data.pageDate
 					this.promotionsList = response.data.promotionsList;
 					this.hasNextPage = resultsData.hasNextPage;
 					this.goodsList = this.goodsList.concat(resultsData.results)
 					this.goodsList.forEach((item,index) => {
-						let productsListLength = item.productsList.length,invalidLength = 0;
-						item.productsList.forEach(pros => {
-							pros.shopID = item.shopID;
+						let productsListLength = item.cartList.length,invalidLength = 0;
+						item.cartList.forEach(pros => {
+							pros.shopId = item.shopId;
 							pros.isStep = false
 							if(pros.step === 2){
-								if(pros.productCount % pros.minBuyNumber != 0){
-									pros.productCount = pros.minBuyNumber
+								if(pros.number % pros.min != 0){
+									pros.number = pros.min
 									this.totalShopPeice()
 									this.updateShoppogNum(pros)
 								}
@@ -400,14 +404,24 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
+			getClubProductNum(){// 获取协销下机构购物车数量
+				this.SellerService.GetSellerProductNum(
+					{
+						clubId:this.listQuery.clubId,
+						serviceProviderId:this.listQuery.serviceProviderId,
+					}
+				).then(response =>{
+					this.kindCount = response.data
+				})
+			},
 			ischeck(item,pro){//为未选中的时候改变为true,反之为true
-				pro.productsChecked = !pro.productsChecked;
-				if(pro.productsChecked) {
-					if(!this.submitIds.includes(pro.productID*1)){
-						this.submitIds.push(pro.productID);
+				pro.isChecked = !pro.isChecked;
+				if(pro.isChecked) {
+					if(!this.submitIds.includes(pro.productId*1)){
+						this.submitIds.push(pro.productId);
 					}
 				} else {
-					var lent = this.submitIds.indexOf(pro.productID*1);
+					var lent = this.submitIds.indexOf(pro.productId*1);
 					if(lent >=0 ){
 						this.submitIds.splice(lent, 1);
 					}
@@ -416,50 +430,50 @@
 				this.updateCheckAllBtn();
 			},
 			updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
-				let productsList = item.productsList,
+				let productsList = item.cartList,
 					productsCheckedLength = 0,
 					disabledLength = 0;
 				if(this.isshowDelbtn) {
 					productsList.forEach(pros => {
-						if(pros.productsChecked) {
+						if(pros.isChecked) {
 							productsCheckedLength++;
 						}
 					})
 				} else {
 					productsList.forEach(pros => {
-						if(pros.productsChecked) {
+						if(pros.isChecked) {
 							productsCheckedLength++;
 						}
 					})
 				}
-				item.checked = productsCheckedLength === productsList.length - disabledLength;
+				item.isChecked = productsCheckedLength === productsList.length - disabledLength;
 			},
 			updateCheckAllBtn() {// 全选勾选判断
 				let goodsCheckedLength = 0,
 					disabledListLength = 0,
 					goodsList = this.goodsList;
 				goodsList.forEach(item => {
-					if(item.checked) {
+					if(item.isChecked) {
 						goodsCheckedLength++;
 					}
 				})
 				this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength;
 			},
 			checkShop(item){//与单选商品类似
-				item.checked = !item.checked;
+				item.isChecked = !item.isChecked;
 				this.setProductChecked(item);
 				this.updateCheckAllBtn();
 			},
 			setProductChecked(item) {
-				item.productsList.forEach(pros=>{
-					if(item.checked) {
-						pros.productsChecked = true;
-						if(!this.submitIds.includes(pros.productID*1)){
-							this.submitIds.push(pros.productID);
+				item.cartList.forEach(pros=>{
+					if(item.isChecked) {
+						pros.isChecked = true;
+						if(!this.submitIds.includes(pros.productId*1)){
+							this.submitIds.push(pros.productId);
 						}
 					} else {
-						pros.productsChecked = false;
-						var lent = this.submitIds.indexOf(pros.productID*1);
+						pros.isChecked = false;
+						var lent = this.submitIds.indexOf(pros.productId*1);
 						if(lent >=0 ){
 							this.submitIds.splice(lent, 1);
 						}
@@ -470,12 +484,12 @@
 				if(this.isshowDelbtn) {
 					// 当管理删除按钮出现时,失效的商品可被选择
 					this.goodsList.forEach((item)=>{
-						item.checked = this.isCheckAll;
+						item.isChecked = this.isCheckAll;
 						this.setProductChecked(item);
 					})
 				} else {
 					this.goodsList.forEach((item)=>{
-						item.checked = this.isCheckAll;
+						item.isChecked = this.isCheckAll;
 						this.setProductChecked(item);
 					})
 				}
@@ -492,9 +506,9 @@
 					if(item.promotions && item.promotions.mode == 2){
 						let prosPrice=0;
 						let totalOriginalPrice = 0;//商铺合计原价
-						item.productsList.forEach(pros=>{
-							prosPrice += pros.retailPrice*pros.productCount
-							totalOriginalPrice += pros.retailPrice*pros.productCount
+						item.cartList.forEach(pros=>{
+							prosPrice += pros.price*pros.number
+							totalOriginalPrice += pros.price*pros.number
 						})
 						if(prosPrice >= item.promotions.touchPrice){
 							item.totalPrice = prosPrice - item.promotions.reducedPrice  
@@ -508,9 +522,9 @@
 						let _totalPrice = 0;
 						let _reducedPrice = 0;
 						let _totalOriginalPrice =0;
-						item.productsList.forEach(pros=>{
-							let _price = pros.retailPrice*pros.productCount
-							_totalOriginalPrice += pros.retailPrice*pros.productCount;
+						item.cartList.forEach(pros=>{
+							let _price = pros.price*pros.number
+							_totalOriginalPrice += pros.price*pros.number;
 							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
 								if(_price >= pros.promotions.touchPrice){
 									_price = _price - pros.promotions.reducedPrice
@@ -519,7 +533,7 @@
 								_totalPrice += _price
 							}else{
 								_reducedPrice = 0;
-								_totalPrice += pros.retailPrice*pros.productCount;
+								_totalPrice += pros.price*pros.number;
 							}
 						})
 						item.reducedPrice = _reducedPrice
@@ -538,13 +552,13 @@
 					item.totalprice = 0;
 					item.reducedprice = 0;
 					item.originalprice = 0;
-					item.productsList.forEach(pros=>{	
-						if(pros.productsChecked){								
-							supplierPrice += pros.retailPrice*pros.productCount;
+					item.cartList.forEach(pros=>{	
+						if(pros.isChecked){								
+							supplierPrice += pros.price*pros.number;
 							// 单品满减
 							if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
 								// 单品满减-重新计算供应商总价/满减金额
-								if(pros.retailPrice*pros.productCount >= pros.promotions.touchPrice){
+								if(pros.price*pros.number >= pros.promotions.touchPrice){
 									supplierPrice -= pros.promotions.reducedPrice;
 									supplierReducedPrice += pros.promotions.reducedPrice;
 								}
@@ -572,8 +586,8 @@
 					if(promotions.mode*1===2 && promotions.type*1===2){
 						let total = 0;
 						 promotions.products.forEach(pros=>{
-							if (this.submitIds.includes(pros.productID*1)){
-								total += pros.productCount * pros.retailPrice;
+							if (this.submitIds.includes(pros.productId*1)){
+								total += pros.number * pros.price;
 							}
 						});
 						if(total>=promotions.touchPrice){
@@ -596,10 +610,10 @@
 				let validList =[];
 				let productsList =[];
 			    this.goodsList.forEach(item=>{
-					productsList = item.productsList
+					productsList = item.cartList
 					productsList.forEach(pros=>{
-						if(pros.productsChecked){
-							prosAllCount+=parseInt(pros.productCount);
+						if(pros.isChecked){
+							prosAllCount+=parseInt(pros.number);
 							this.allCount = prosAllCount
 						}
 					})
@@ -608,11 +622,11 @@
 			changeCountAdd(item,pros){//商品数量加加
 				if(pros.step === 2){
 					pros.isStep = false
-					pros.productCount += pros.minBuyNumber
+					pros.number += pros.min
 					this.processActivityPrice(pros)
 					this.isStock = false
 				}else{
-					pros.productCount++
+					pros.number++
 					this.processActivityPrice(pros)
 					this.isStock = false
 				}
@@ -620,16 +634,16 @@
 				this.totalShopPeice();
 			},
 			changeCountSub(item,pros){//商品数量减减
-				if(pros.productCount<=pros.minBuyNumber){
-					pros.productCount= pros.minBuyNumber
-					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
+				if(pros.number<=pros.min){
+					pros.number= pros.min
+					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
 					return
 				}else{
 					if(pros.step === 2){
 						pros.isStep = false
-						pros.productCount -= pros.minBuyNumber
+						pros.number -= pros.min
 					}else{
-						pros.productCount--
+						pros.number--
 					}
 					this.processActivityPrice(pros)
 				}
@@ -639,36 +653,41 @@
 			changeNnmber(e,item,pros){//输入商品数量更新
 				let _value = e.detail.value;
 				if(!this.$api.isNumber(_value)){
-					pros.productCount = pros.minBuyNumber
-				}else if(_value < pros.minBuyNumber){	
-					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
-					pros.productCount = pros.minBuyNumber
-				}else if(_value % pros.minBuyNumber != 0){
+					pros.number = pros.min
+				}else if(_value < pros.min){	
+					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
+					pros.number = pros.min
+				}else if(_value % pros.min != 0){
 					pros.isStep = true
-					pros.productCount = pros.minBuyNumber
+					pros.number = pros.min
 				}else{
 					pros.isStep = false
-					pros.productCount = e.detail.value
+					pros.number = e.detail.value
 					this.processActivityPrice(pros)
 				}
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},
 			processActivityPrice(pros){//单独处理活动价格和阶梯价格
-				let ladderPriceList = pros.ladderPriceList;
-				if(pros.ladderPriceFlag == '1'){
+				let ladderPriceList = pros.ladderPrices;
+				if(pros.ladderFlag == 0 || pros.actStatus == 1){
+					pros.price = pros.price
+				}else{
 					ladderPriceList.forEach((item,index)=>{
-						if(pros.productCount>=item.buyNum){
-							pros.retailPrice = item.buyPrice
+						if(pros.number>=item.buyNum){
+							pros.price = item.buyPrice
 						}
-					});
-				}else{
-					pros.retailPrice = pros.retailPrice
+					})
 				}
 			},
 			updateShoppogNum(pros){//加减购物车商品更新到后台
-				let params ={id:pros.sellerCartId,productID:pros.productID,num:pros.productCount}
-				this.SellerService.SellerAddProductNum(params).then(response =>{
+				this.SellerService.SellerAddProductNum(
+					{
+						id:pros.id,
+						productCount:pros.number,
+						serviceProviderId:this.listQuery.serviceProviderId,
+					}
+				).then(response =>{
 					this.isshowDelbtn = false;
 					this.initGetCartGoodsList();
 				}).catch(error =>{
@@ -678,12 +697,12 @@
 			toConfirmation(){//跳转确认订单页面
 				let setGoodsList=[];
 				let productIdList = [];
-				let productID = '';
+				let productIds = '';
 				this.goodsList.forEach(res=>{
-					let products = res.productsList
+					let products = res.cartList
 					products.forEach(pros=>{
-						if(pros.productsChecked){
-						    setGoodsList.push(pros.productID)
+						if(pros.isChecked){
+						    setGoodsList.push(pros.productId)
 						}
 					})
 				})
@@ -696,9 +715,9 @@
 					 * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
 					 */
 					this.goodsList.forEach(el=>{
-						el.productsList.forEach(pros=>{
-							if(pros.productsChecked){
-							   productIdList.push(pros.productID)
+						el.cartList.forEach(pros=>{
+							if(pros.isChecked){
+							   productIdList.push(pros.productId)
 							}
 						})
 					})
@@ -709,29 +728,23 @@
 					if(productIdList.length == 1 && isHasDepositlds.length === 1 && isHasRechargeIds.length === 0){
 						console.log('定金商品')
 						productIdList.forEach(item =>{
-							productID += item +','
+							productIds += item +','
 						})
 					}else if(productIdList.length == 1 && isHasRechargeIds.length === 1 && isHasDepositlds.length === 0){
 						console.log('充值余额商品')
 						productIdList.forEach(item =>{
-							productID += item +','
+							productIds += item +','
 						})
 					}else if(!isGoods && isHasRechargeIds.length === 0 && isHasDepositlds.length === 0){
 						console.log('正常商品')
  						productIdList.forEach(item =>{
-							productID += item +','
+							productIds += item +','
 						})
 					}else{
 						this.$util.modal('提示','缴纳订金商品或余额充值商品请单独下单!','确定','',false,() =>{})
 						return
 					}
-					let cartPramsData={
-							clubId:this.clubId,
-							allPrice:this.allPrice,
-							allCount:this.allCount,
-							productID:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:''
-						}
+					let cartPramsData={ productIds:productIds.substring(0,productIds.lastIndexOf(',')) }
 					this.$api.navigateTo(`/pages/seller/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 				}
 			},
@@ -754,16 +767,16 @@
 			deleteList(){//删除购物车商品	
 				this.delGoodsList=[];
 				this.goodsList.forEach(delitem=>{
-					let products = delitem.productsList
+					let products = delitem.cartList
 					products.forEach(pros=>{
-						if(pros.productsChecked){
-						    this.delGoodsList += pros.sellerCartId+','
+						if(pros.isChecked){
+						    this.delGoodsList += pros.id+','
 						}
 					})
 				})
 				this.failureList.forEach(failure=>{
-					if(failure.productsChecked){
-						this.delGoodsList += failure.sellerCartId+','
+					if(failure.isChecked){
+						this.delGoodsList += failure.id+','
 					}
 				})
 				if(this.delGoodsList.length == 0){
@@ -771,7 +784,12 @@
 					return
 				}else{				
 					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
-						this.SellerService.DeleteSellerCart({sellerCartIds:this.delGoodsList}).then(response =>{
+						this.SellerService.DeleteSellerCart(
+							{
+								cartIds:this.delGoodsList,
+								serviceProviderId:this.listQuery.serviceProviderId
+							}
+						).then(response =>{
 							this.$util.msg('删除成功',2000);
 							setTimeout(()=>{
 								this.isshowDelbtn = false;
@@ -826,8 +844,8 @@
 		onShow(){
 			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
 				console.log(resolve)
-				this.clubId = resolve.clubID
-				this.againBuyProductIds = resolve.againBuyProductIds
+				this.listQuery.clubId = resolve.clubID ? resolve.clubID : 0
+				this.listQuery.againBuyProductIds = resolve.againBuyProductIds ? resolve.againBuyProductIds : ''
 				this.initData()
 			})
 		}

+ 26 - 18
pages/seller/cart/immediately.vue

@@ -94,7 +94,7 @@
 		},
 		data(){
 			return{
-				clubID:'',	//机构ID
+				clubId:'',	//机构ID
 				serviceProviderId:'',//协销ID
 				serverUrl: '',
 				emptyText: '',
@@ -130,8 +130,13 @@
 			},
 		},	
 		methods:{
-			getClubProductNum(){
-				this.SellerService.GetSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
+			getClubProductNum(){// 获取协销下机构购物车数量
+				this.SellerService.GetSellerProductNum(
+					{
+						clubId:this.clubId,
+						serviceProviderId:this.serviceProviderId,
+					}
+				).then(response =>{
 					this.$refs.productList.cartQuantity = response.data
 				})
 			},
@@ -246,22 +251,23 @@
 			},
 			getzuheCart(){//组合商品加入购物车
 				let productInfo=[];
-				let setGoodsList ={};
-				let productId = '';
-				let productNum ='';
 				this.handleData.combinationProductList.forEach(item =>{
 					if(item.initProductNum >0){
-						setGoodsList.productId = item.productId
-						setGoodsList.productNum =item.initProductNum
-						productInfo.push(JSON.parse(JSON.stringify(setGoodsList)))
+						let handObj = {
+								id : item.productId,
+								count : item.initProductNum
+							}
+						productInfo.push(handObj)
 					}
 				})
-				let params ={
-						clubId:this.clubID,
+				this.SellerService.ShoppingCartBatchAddCart(
+					{
+						clubId:this.clubId,
 						serviceProviderId:this.serviceProviderId,
-						productInfo:productInfo
+						productInfo:JSON.stringify(productInfo),
+						type:2
 					}
-				this.SellerService.ShoppingCartBatchAddCart({'params':JSON.stringify(params)}).then(response => {
+				).then(response => {
 					this.specClasszuhe = 'hide';
 					this.$util.msg('加入购物车成功',1500,true,'success');
 					this.getClubProductNum();
@@ -280,13 +286,15 @@
 				})
 			},
 			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
-				let params ={
+				this.SellerService.ShoppingCartAddCart(
+					{
 						productId:this.handleData.productId,
-						clubId:this.clubID,
+						clubId:this.clubId,
 						serviceProviderId:this.serviceProviderId,
-						num:this.number
+						productCount:this.number,
+						type:1
 					}
-				this.SellerService.ShoppingCartAddCart(params).then(response => {
+				).then(response => {
 					this.specClass = 'hide';
 					this.$util.msg('加入购物车成功',1500,true,'success')
 					this.getClubProductNum();
@@ -304,7 +312,7 @@
 		},
 		onShow() {
 			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-				this.clubID = resolve.clubID
+				this.clubId = resolve.clubID ? resolve.clubID : 0
 			})
 			this.$api.getStorage().then((resolve) =>{
 				this.serviceProviderId = resolve.serviceProviderId

+ 141 - 123
pages/seller/order/create-order.vue

@@ -54,15 +54,16 @@
 				</view>
 			</view>
 			<view class="balabce-b" :class="{'balabce-b--hide':!ischecked}">	
-				<view class="balabce-b-text animation" :style="{'transform':ischecked?'translateY(0)':'translateY(-50%)','-webkit-transform':ischecked?'translateY(0)':'translateY(-50%)'}">
+				<view class="balabce-b-text animation" 
+					  :style="{'transform':ischecked?'translateY(0)':'translateY(-50%)','-webkit-transform':ischecked?'translateY(0)':'translateY(-50%)'}">
 					<text>当前使用:¥{{deductMoney | NumFormat}},剩余:¥{{ surplusMoney | NumFormat }}</text>
 				</view>
 			</view>
 		</view>
 		<!-- 售后条例 -->
 		<seller-regulations  ref="regulations"
-							 v-if="isRequest && isDepositFlg&&seconDepositFlg" 
-							:regulaDatas="regulationsData" 
+							 v-if="isRequest && isDepositFlg && seconDepositFlg" 
+							:regulaDatas="clauseList" 
 							@handleData="claData">
 		</seller-regulations>
 		<regula-alert v-if="isregulaTip" ref="csPhone"></regula-alert>
@@ -74,7 +75,7 @@
 				</view>
 				<view class="footer-price">
 					<view class="sum" :class="totalDiscountAmount == 0 ? 'none' : ''">
-						总价:<text class="price">¥{{payAllPrice | NumFormat}}</text>
+						总价:<text class="price">¥{{orderShouldPayFee | NumFormat}}</text>
 					</view>
 					<view class="sum-none" v-if="totalDiscountAmount > 0">
 						<text class="money-reduced">共减<text>¥{{ totalDiscountAmount  | NumFormat}}</text></text>
@@ -131,6 +132,42 @@
 	import sellerExchangeCoupon from '@/components/cm-module/creatOrder/sellerExchangeCoupon'
 	import sellerRegulations from '@/components/cm-module/creatOrder/sellerRegulations.vue'
 	import modalLayer from "@/components/modal-layer"
+	
+	const defaultProductParam = {
+			productCount:0, 	// 商品数量
+			productId:0,		// 商品Id
+			serviceProviderId:0,// 协销Id
+			clubId:0			// 机构Id
+		};
+	const defaultCartParam = {
+			productIds:0,		// 商品Id(逗号隔开)
+			serviceProviderId:0,// 协销Id
+			clubId:0			// 机构Id
+		};
+	const defaultPostageParam = {
+			productIds:0,		// 商品Id(逗号隔开)
+			userId:0,			// 用户Id
+			townId:0			// 地区Id
+		};
+	const defaultConfirmParam = {
+			cartType:1, 		// 购买类型:(1自主下单, 3协销下单)
+			orderSource:6,		// 订单来源 1WWW 6小程序[采美,星范]
+			addressId:0,		// 收货地址Id
+			clubCouponId:0,		// 关联优惠券Id
+			clubId:0,			// 机构Id
+			orderInfo:[],		// 订单商品数据
+			orderInvoice:{type:0},	// 订单发票信息
+			payInfo:{			// 订单金额数据
+				orderShouldPayFee: 0,	// 订单最终支付金额
+				balancePayFlag: 0,		// 勾选余额的状态(1使用,0不使用)
+				clauseId:0,				// 条款Id
+				postage: 0,				// 运费金额
+				postageFlag: 0,			// 运费类型
+				userBeans: 0,			// 抵扣采美豆数量
+				rebateFlag:0			// 是否返佣订单
+			},
+			unionId:uni.getStorageSync('unionId'),// 用户unionId
+		};
 	export default {
 		components:{
 			choiceAddress,
@@ -146,20 +183,20 @@
 		data() {
 			return {
 				modallayer:false,
-				orderID:0,
-				clubID:'',
-				productIds:'',			  // 获取上一级页面商品信息
-				productCount:'',		  // 获取上一级页面商品数量
-				classifyIDS:'',			  // 获取上一级页面商品分类
-				serviceProviderId:'',	  // 协销ID
-				cartType:3,			  	  // 购买类型(1购物车提交,2直接购买提交,3协销下单)
+				isIphoneX:this.$store.state.isIphoneX,
+				cartParam: Object.assign({}, defaultCartParam), 		// 购物车立即结算确认订单参数
+				productParam: Object.assign({}, defaultProductParam), 	// 二手商品立即购买确认订单参数
+				postageParam: Object.assign({}, defaultPostageParam),	// 邮费计算参数
+				confirmParam: Object.assign({}, defaultConfirmParam), 	// 提交订单参数
+				productIds:'',			  //商品ID,
+				confirmType:1,			  
 				submitState:'',  		  // 提交状态
 				balanceDeductionFlag:2,   // 勾选余额的状态(1使用,2不使用)
 				allCount:1,				  // 订单提交总数量
 				reducedPrice:0,			  // 满减金额
 				couponAmount:0,	  		  // 优惠券金额
 				totalDiscountAmount:0,	  // 共减金额
-				payAllPrice:0.00,		  // 订单提交总金额
+				orderShouldPayFee:0.00,		  // 订单提交总金额
 				allPrice:0.00,			  // 订单总金额
 				surplusMoney:0.00,		  // 显示勾选后的剩余抵扣
 				userMoney:0.00,			  // 显示可使用余额
@@ -182,13 +219,11 @@
 				rechargeGoods:false,
 				isDepositFlg:true,
 				depositIds : [6060,6061,6062,6063,6064,6065,6066,6067,6068,6069],//定金&充值余额商品ID
-				isIphoneX:this.$store.state.isIphoneX,
-				regulationsData:[],
+				clauseList:[],
 				clauseId:0,
 				seconDepositFlg:true,
 				rebateFlag:0,
 				rebatecheck:false,
-				productsList:[],
 				isCouponShow:false,		  // 是否显示可选优惠券
 				secondflag:true,
 				isCouponModel:false,	  // 兑换优惠券成功提示
@@ -196,22 +231,7 @@
 			}
 		},
 		onLoad(option){//商品数据
-			let data = JSON.parse(option.data);
-			this.allPrice = data.data.allPrice;
-			this.allCount = data.data.allCount;
-			this.payAllPrice = this.allPrice;
-			this.clubId = data.data.clubId
-			this.productCount = data.data.productCount
-			this.productIds = data.data.productID
-			if(option.type =='prodcut'){
-				this.getInitProdcutCrearOrder();
-			}else{
-				this.getInitCrearOrder();
-			}
-			
-			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-				this.clubUserId = resolve.userID
-			})
+			this.initStorage(option)
 		},
 		filters:{
 			NumFormat(value) {//处理金额
@@ -219,90 +239,79 @@
 			},
 		},
 		methods: {
-			RebateChang(){
-				this.rebatecheck = !this.rebatecheck;
-				if(this.rebatecheck){
-					this.rebateFlag=1;
-				}else{
-					this.rebateFlag=0;
-				}
-				console.log(this.rebateFlag)
-			},
-			getInitProdcutCrearOrder(option){//二手下单初始化查询
-				this.$api.getStorage().then((resolve) =>{
-					this.seconDepositFlg = false;
-					this.serviceProviderId = resolve.serviceProviderId
-					let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,productCount:this.productCount,productId:this.productIds}
-					this.SellerService.GetSettlementBySencondProduct(params).then(response =>{
-						let resData = response.data
-						this.isRequest = true
-						this.goodsData = resData.shopList
-						this.userMoney = resData.userMoney
-						this.secondflag = false
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
-					})
-				})
+			async initStorage(option){
+					const data = JSON.parse(option.data)
+					const clubInfo = await this.$api.getComStorage('orderUserInfo')
+					const userInfo = await this.$api.getStorage()
+					this.productParam.clubId = this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubID ? clubInfo.clubID : 0
+					this.postageParam.userId = clubInfo.userID ? clubInfo.userID : 0
+					this.productParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+					this.cartParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+					this.confirmParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+					if(option.type =='prodcut'){
+						this.confirmType = 1
+						this.productParam.productCount = data.data.productCount
+						this.productParam.productId = data.data.productIds
+						this.productIds = this.postageParam.productIds = data.data.productIds
+						this.getInitProdcutCrearOrder();
+					}else{
+						this.confirmType = 2
+						this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
+						this.getInitCrearOrder();
+					}
 			},
 			getInitCrearOrder(){//协销购物车跳转确认订单初始化信息
-				this.$api.getStorage().then((resolve) =>{
-					this.serviceProviderId = resolve.serviceProviderId
-					this.SellerService.SellerSettlement(
-						{
-							clubId:this.clubId,
-							serviceProviderId:this.serviceProviderId,
-							count:this.productCount,
-							productIds:this.productIds,
-						}
-					).then(response =>{
-						let data = response.data
-						this.isRequest = true
-						this.goodsData = data.shopList
-						this.userMoney = data.userMoney
-						this.couponList = data.couponList
-						this.reducedPrice = data.reducedPrice
-						this.allPrice = data.totalAmount
-						this.isCouponShow = true
-						if(this.couponList.length>0){
-							this.couponAmount = data.couponList[0].couponAmount
-							this.clubCouponId = data.couponList[0].clubCouponId 
-							this.payAllPrice = this.allPrice - this.couponAmount
-						}
-						this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-						this.rechargeGoods = data.rechargeGoods
-						this.regulationsData = data.clauseList
-						this.goodsData.forEach(item =>{
-							this.productsList = item.productsList
-							item.productsList.forEach(pros =>{
-								if(this.depositIds.indexOf(pros.productID)>=0){
-									this.isDepositFlg = false
-								}
-							})
+				this.SellerService.SellerSettlement(this.cartParam).then(response =>{
+					let data = response.data
+					this.isRequest = true
+					this.goodsData = data.list
+					this.userMoney = data.userMoney
+					this.couponList = data.couponList
+					this.reducedPrice = data.reducedPrice
+					this.allPrice = data.totalAmount
+					this.isCouponShow = true
+					if(this.couponList.length>0){
+						this.couponAmount = data.couponList[0].couponAmount
+						this.confirmParam.clubCouponId = data.couponList[0].clubCouponId 
+					}
+					this.orderShouldPayFee = this.allPrice - this.couponAmount
+					this.totalDiscountAmount = this.reducedPrice + this.couponAmount
+					this.rechargeGoods = data.includeRecharge
+					this.clauseList = data.clauseList
+					this.goodsData.forEach(item =>{
+						item.cartList.forEach(pros =>{
+							if(this.depositIds.indexOf(pros.productId)>=0){
+								this.isDepositFlg = false
+							}
 						})
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
 					})
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			getInitProdcutCrearOrder(){//二手下单初始化查询
+				this.seconDepositFlg = false;
+				this.SellerService.GetSettlementBySencondProduct(this.productParam).then(response =>{
+					let resData = response.data
+					this.isRequest = true
+					this.goodsData = resData.shopList
+					this.userMoney = resData.userMoney
+					this.secondflag = false
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			getFreightData(){//获取邮费信息
-				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					let params ={
-							userId:resolve.userID,
-							productIds:this.productIds,
-							totalPrice:this.allPrice,
-							townId:this.addressData.townID
-						}
-					this.OrderService.GetOrderPostage(params).then(response =>{
-						this.isFreight = true
-						this.freightData = response.data
-						if(response.data.freePostFlag== 1){
-							this.payAllPrice = this.allPrice + response.data.freight
-							this.attributePallPrice()
-						}else{
-							this.payAllPrice = this.allPrice
-							this.attributePallPrice()
-						}
-					})
+				this.OrderService.GetOrderPostage(this.postageParam).then(response =>{
+					this.isFreight = true
+					this.freightData = response.data
+					if(response.data.freePostFlag== 1){
+						this.orderShouldPayFee = this.allPrice + response.data.freight
+						this.attributePallPrice()
+					}else{
+						this.orderShouldPayFee = this.allPrice
+						this.attributePallPrice()
+					}
 				})
 			},
 			getAddressData(){//获取地址信息
@@ -330,11 +339,11 @@
 			handleChoiceaFreightData(data){//获取运费信息
 				if(data.freePostFlag == '1'){
 					this.freightData = data
-					this.payAllPrice = this.allPrice + parseInt(data.freight)
+					this.orderShouldPayFee = this.allPrice + parseInt(data.freight)
 					this.attributePallPrice()
 				}else{
 					this.freightData = data
-					this.payAllPrice = this.allPrice
+					this.orderShouldPayFee = this.allPrice
 					this.attributePallPrice()
 				}
 			},
@@ -357,12 +366,12 @@
 					}else{
 						this.balanceDeductionFlag = 2
 						if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
-							this.payAllPrice = this.allPrice + parseInt(this.freightData.freight) - this.couponAmount
+							this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.freight) - this.couponAmount
 						}else{
-							this.payAllPrice = this.allPrice - this.couponAmount
+							this.orderShouldPayFee = this.allPrice - this.couponAmount
 						}
 					}
-					console.log('最终订单支付金额',this.payAllPrice)
+					console.log('最终订单支付金额',this.orderShouldPayFee)
 					console.log('优惠券金额',this.couponAmount)
 				}else{
 					return
@@ -379,40 +388,40 @@
 				if(this.ischecked){
 					let totalAmount = this.allPrice - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
 					if(this.userMoney > totalAmount){
-						this.payAllPrice = 0.00
+						this.orderShouldPayFee = 0.00
 						this.deductMoney = this.allPrice - this.couponAmount		// 勾选后使用抵余额
 						this.surplusMoney = this.userMoney - this.deductMoney	    // 勾选后的剩余抵扣
 					}else{
-						this.payAllPrice = this.allPrice - this.userMoney -	this.couponAmount //勾选后的总价
+						this.orderShouldPayFee = this.allPrice - this.userMoney -	this.couponAmount //勾选后的总价
 						this.deductMoney = this.userMoney				            // 勾选后使用抵余额
 						this.surplusMoney = this.userMoney - this.deductMoney	    // 勾选后的剩余抵扣
 					}
 				}else{
-					this.payAllPrice = this.allPrice  - this.couponAmount;
+					this.orderShouldPayFee = this.allPrice  - this.couponAmount;
 					this.deductMoney = 0.00
 					this.surplusMoney = this.userMoney
 				}
-				console.log('最终订单支付金额',this.payAllPrice)
+				console.log('最终订单支付金额',this.orderShouldPayFee)
 				console.log('优惠券金额',this.couponAmount)
 			},
 			attributeHashfreight(freight){//计算需要邮费的支付价格
 				let totalAmount = this.allPrice + parseInt(freight) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
 				if(this.ischecked){
 					if(this.userMoney > totalAmount ){							//余额大于支付金额
-						this.payAllPrice = 0.00
+						this.orderShouldPayFee = 0.00
 						this.deductMoney = this.allPrice + parseInt(freight) - this.couponAmount			//勾选后使用抵余额
 						this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
 					}else{
-						this.payAllPrice = this.allPrice + parseInt(freight) - this.userMoney  - this.couponAmount       	//勾选后的总价
+						this.orderShouldPayFee = this.allPrice + parseInt(freight) - this.userMoney  - this.couponAmount       	//勾选后的总价
 						this.deductMoney = this.userMoney				            //勾选后使用抵余额
 						this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
 					}
 				}else{
-					this.payAllPrice = this.allPrice + parseInt(freight) - this.couponAmount
+					this.orderShouldPayFee = this.allPrice + parseInt(freight) - this.couponAmount
 					this.deductMoney = 0.00
 					this.surplusMoney = this.userMoney
 				}
-				console.log('最终订单支付金额',this.payAllPrice)
+				console.log('最终订单支付金额',this.orderShouldPayFee)
 				console.log('优惠券金额',this.couponAmount)
 			},
 			orderSubmitMit(){//提交订单
@@ -423,7 +432,7 @@
 				// 处理商品信息及留言
 				this.orderInfo = this.goodsData.map(el => {
 					let productInfo = [];
-					el.productsList.forEach(item => {
+					el.cartList.forEach(item => {
 						productInfo.push({
 							productId:item.productID,
 							productNum:item.productCount,
@@ -435,7 +444,7 @@
 				})
 				//订单信息
 				this.payInfo = {
-						orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
+						orderShouldPayFee:this.orderShouldPayFee.toFixed(2),//提交的总价
 						balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
 						freight:parseInt(this.freightData.freight).toFixed(2),//邮费
 						freePostFlag:parseInt(this.freightData.freePostFlag),//运费形式
@@ -474,6 +483,15 @@
 					})
 				})
 			},
+			RebateChang(){//  返佣订单勾选
+				this.rebatecheck = !this.rebatecheck;
+				if(this.rebatecheck){
+					this.rebateFlag=1;
+				}else{
+					this.rebateFlag=0;
+				}
+				console.log(this.rebateFlag)
+			},
 			handFreightAlertShow(){//显示邮费弹窗
 				this.isfreightTip = true;
 			},

+ 160 - 41
pages/seller/order/order-details.vue

@@ -46,12 +46,28 @@
 					:modelType='modelType' 
 					@paymentConfirm ='hanldPaymentConfirm'/>
 		<!-- 分享弹窗 -->			
-		<share-alert  :orderID="orderID" 
+		<share-alert  :orderId="orderId" 
 					  v-if="isShareModal"  
 					  @shareConfirm ='onShareAppMessage'>
 		</share-alert>		
 		<!-- 促销活动弹窗 -->
 		<activi-popup :Promotion="handlerPros" :popupShow="popupShow"></activi-popup>
+		<!-- 再来一单 -->
+		<view class="aganBj" v-show="showAgan">
+			<view class="alertAgan">
+				<text class="title">{{ promptitle }}</text>
+				<view class="goods">
+					<view class="list" v-for="(item,index) in failList"  :key="index">
+						<image class="image-left" :src="item.image"></image>
+						<view class="name-right">{{item.name}}</view>
+					</view>
+				</view>
+				<view class="BtnAll">
+					<view class="closebtn btn" @click="closeBtn">取消</view>
+					<view class="cancel btn" @click="cancelBtn">确定</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -86,9 +102,13 @@
 		},
 		data() {
 			return {
+				nvabarData: {							 //顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标   1表示显示    0表示不显示
+					title: '订单详情', // 导航栏 中间的标题
+				},
 				state:0,
-				userID:'',
-				orderID:'',
+				userId:'',
+				orderId:'',
 				clubUserId:0,
 				serviceProviderId:'',		//协销ID
 				shareCode:'',				//分享码
@@ -119,18 +139,17 @@
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				popupShow:false,
 				handlerPros:{},
-				nvabarData: {							 //顶部自定义导航
-					showCapsule: 1, // 是否显示左上角图标   1表示显示    0表示不显示
-					title: '订单详情', // 导航栏 中间的标题
-				},
 				clauseData:{},
-				againUserId:0,//用户id
+				showAgan:false,
+				failList:[],	// 再来一单可购买商品
+				promptitle:'',
+				aganOrderId:0	// 再来一单商品id
 			}
 		},
 		onLoad(option){
 			console.log(option)
 			this.shareType = option.type;
-			this.orderID = option.orderID
+			this.orderId = option.orderId
 			this.clubUserId = option.userId
 			if(this.shareType ==='share'){
 				this.listType = 0
@@ -140,9 +159,6 @@
 			}else{
 				this.listType = option.listType
 			}
-			this.$api.getStorage().then((resolve) =>{
-				this.againUserId = resolve.userId ? resolve.userId : 0
-			})
 			this.getHeaderTopHeight()
 			this.initOrderDetaileData()
 		},
@@ -184,24 +200,29 @@
 				this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
 			},
 			initOrderDetaileData(){//初始化页面数据@参数:订单ID
-				this.OrderService.QueryOrderDetails({ orderID : this.orderID ,userId : this.clubUserId}).then(response =>{
-					let resData = response.data;
+				this.OrderService.QueryOrderDetails(
+					{ 
+						orderId : this.orderId ,
+						userId : this.clubUserId,
+					}
+				).then(response =>{
+					let data = response.data;
 					this.isRequest = true
-					this.userID = resData.order.userID
-					this.shareCode = resData.shareCode
-					this.addressData = resData.userInfo
-					this.information = resData.order
-					this.rechargeGoods = resData.order.rechargeGoods
-					this.btnStatus = resData.order.status
-					this.payStatus = resData.order.payStatus
-					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.ableUserMoney = resData.ableUserMoney
-					this.clauseData = resData.clause
+					this.userId = data.order.userId
+					this.shareCode = data.shareCode
+					this.addressData = data.userInfo
+					this.information = data.order
+					this.rechargeGoods = data.order.rechargeGoods
+					this.btnStatus = data.order.status
+					this.payStatus = data.order.payStatus
+					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.ableUserMoney = data.ableUserMoney
+					this.clauseData = data.clause
 					if(this.clauseData && this.clauseData.name.length>10){
 						this.clauseData.name = this.clauseData.name.substr(0,10)+'...'
 					}
@@ -218,7 +239,7 @@
 				switch(data.type){
 					case 'query':
 						this.isModalLayer = true;
-						this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+data.orderId)
+						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break
 					case 'delete':
 						this.handOrderDetele();
@@ -237,9 +258,15 @@
 						break		
 				}
 			},
-			handOrderAgain(id){
-				this.aganOrderID = id;
-				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,userId:this.againUserId,confirmFlag:0}).then(res =>{
+			handOrderAgain(orderId){
+				this.aganOrderId = orderId;
+				this.SellerService.SellerCreateOrderAgain(
+					{
+						confirmFlag:0,	
+						orderId:this.aganOrderId,
+						serviceProviderId:this.serviceProviderId
+					}
+				).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('/pages/seller/cart/cart');
@@ -254,11 +281,28 @@
 					}else{
 						this.$util.msg(error.msg,2000)
 					}
-					})
+				})
+			},
+			closeBtn(){//
+				this.showAgan = false;
+			},
+			cancelBtn(){// 再来一单弹窗
+				this.SellerService.SellerCreateOrderAgain(
+					{
+						serviceProviderId:this.serviceProviderId,
+						orderId:this.aganOrderId,
+						confirmFlag:1,
+					}
+				).then(res =>{
+					if(res.code==0){
+						this.$api.navigateTo('/pages/seller/cart/cart');
+						this.showAgan = false;
+					}
+				})
 			},
 			handOrderConfirm(data){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
-					this.OrderService.AffirmOrder({orderID:this.orderID}).then(response =>{
+					this.OrderService.AffirmOrder({orderId:this.orderId}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						this.initOrderDetaileData()
 					}).catch(error =>{
@@ -269,7 +313,7 @@
 			hanldPaymentConfirm(data){//监听余额抵扣按钮
 				switch(data.type){
 					case 3:
-						this.OrderService.OrderBalanceDeduction({orderId:this.orderID}).then(response =>{
+						this.OrderService.OrderBalanceDeduction({orderId:this.orderId}).then(response =>{
 							this.$util.msg('余额抵扣成功',2000)
 							this.initOrderDetaileData()
 						}).catch(error =>{
@@ -292,10 +336,9 @@
 					this.$util.msg(error.msg,2000)
 				})	
 			},
-			
 			handOrderDetele(){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
-					this.OrderService.DeleteOrder({orderID:this.orderID}).then(response =>{
+					this.OrderService.DeleteOrder({orderId:this.orderId}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
 							if(this.shareType ==='share'){
@@ -311,7 +354,7 @@
 			},
 			handCenceConfirm(){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
-					this.OrderService.CancelOrder({orderID:this.orderID}).then(response =>{
+					this.OrderService.CancelOrder({orderId:this.orderId}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						this.initOrderDetaileData()
 					}).catch(error =>{
@@ -330,7 +373,7 @@
 			    }
 				return {
 					title: '您有新的订单,请点击查看~',
-					path: `/pages/user/order/order-sharelogin?orderID=${this.orderID}&userID=${this.userID}&serviceProviderId=${this.serviceProviderId}`,
+					path: `/pages/user/order/order-sharelogin?orderId=${this.orderId}&userId=${this.userId}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},
@@ -366,7 +409,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderId
+				this.serviceProviderId = resolve.serviceProviderId ? resolve.serviceProviderId : 0
 			})
 		}
 	}
@@ -517,4 +560,80 @@
 			margin-left: 20rpx;
 		}
 	}
+	.aganBj {
+	    position: fixed;
+	    left: 0;
+	    top: 0;
+	    bottom: 0;
+	    width: 100%;
+	    height: 100%;
+	    background-color: rgba(0, 0, 0, .5);
+	    z-index: 999999;
+		.alertAgan {
+		    position: absolute;
+		    top: 50%;
+		    left: 50%;
+		    transform: translate(-50%, -50%);
+		    width:580rpx;
+		    background-color: #fff;
+		    border-radius: 16rpx;
+			.title{
+				font-size: 30rpx;
+				color: #333333;
+				line-height: 42rpx;
+				padding: 30rpx;
+				display: block;
+			}
+			.goods{
+				padding: 0 30rpx;
+				.list{
+					padding: 10px 0;
+					border-bottom: 1rpx solid #e1e1e1;
+					margin: 10rpx 0;
+					.image-left{
+						width: 86rpx;
+						height: 86rpx;
+						border: 2rpx solid #e1e1e1;
+						border-radius: 6rpx;
+						display: inline-block;
+						vertical-align: middle;
+					}
+					.name-right{
+						display: inline-block;
+						width: 416rpx;
+						margin-left: 15rpx;
+						font-size: 26rpx;
+						color: #666666;
+						vertical-align: middle;
+						word-break: break-all;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						display: -webkit-inline-box;
+						-webkit-line-clamp: 2;
+						-webkit-box-orient: vertical;
+					}
+				}
+			}
+			.BtnAll{
+				margin-top: 30rpx;
+				.btn{
+				 	display: inline-block;
+					width: 290rpx;
+					height: 90rpx;
+					line-height: 90rpx;
+					text-align: center;
+					&.closebtn{
+						border-radius: 0px 0px 0px 10px;
+						color:#999999 ;
+						background: #efefef;
+					}
+					&.cancel{
+						border-radius: 0px 0px 8px 0px;
+						background: $btn-confirm;
+						color: #fff;
+					}
+				}
+			}
+		}
+	}
 </style>

+ 119 - 77
pages/seller/order/order-list.vue

@@ -34,14 +34,30 @@
 									<view class="order-title-name">{{order.clubName ? order.clubName : ''}}</view>
 									<view class="order-title-t">
 										<view class="Rebate " v-if="order.rebateFlag==1">返佣</view>
-										<text class="bage-buss tui-skeleton-fillet" v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4">协销</text>
-										<text class="bage-auto tui-skeleton-fillet" v-if="order.orderSubmitType == 0 || order.orderSubmitType == 1 || order.orderSubmitType == 2">自主</text>
-										<text class="bage-text tui-skeleton-fillet">订单编号:{{order.orderNo}}({{order.orderID}})</text>
-										<image class="bage-icon" src="https://static.caimei365.com/app/img/icon/icon-type@3x.png" mode="widthFix" v-if="order.secondHandOrderFlag == 1"></image>
+										<text class="bage-buss tui-skeleton-fillet" 
+											  v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4">
+											  协销
+										</text>
+										<text class="bage-auto tui-skeleton-fillet" 
+											  v-if="order.orderSubmitType == 0 || order.orderSubmitType == 1 || order.orderSubmitType == 2">
+											  自主
+										</text>
+										<text class="bage-text tui-skeleton-fillet">
+											订单编号:{{order.orderNo}}({{order.orderId}})
+										</text>
+										<image class="bage-icon" 
+											   src="https://static.caimei365.com/app/img/icon/icon-type@3x.png" 
+											   mode="widthFix" 
+											   v-if="order.secondHandOrderFlag == 1">
+										</image>
 									</view>
 									<view class="order-title-b">
-										<view class="order-title-btxt tui-skeleton-fillet">下单时间:{{order.orderTime}}</view>
-										<view class="order-title-tip tui-skeleton-fillet">{{StateExpFormat(order.status)}}</view>
+										<view class="order-title-btxt tui-skeleton-fillet">
+											下单时间:{{order.orderTime}}
+										</view>
+										<view class="order-title-tip tui-skeleton-fillet">
+											{{StateExpFormat(order.status)}}
+										</view>
 									</view>
 								</view>
 								<block v-for="(shop,index) in order.shopOrderList" :key="index">
@@ -54,12 +70,14 @@
 									<view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
 										<view class="goods-pros-t">
 											<view class="pros-img tui-skeleton-fillet">
-												<image :src="pros.productImage" alt="" />
+												<image :src="pros.image" alt="" />
 												<text class="tips" v-if="pros.productType ==2 || pros.productType ==1">赠品</text>
 											</view>
 											<view class="pros-product clearfix">
 												<view class="producttitle tui-skeleton-fillet">{{pros.name}}</view>
-												<view class="productspec tui-skeleton-fillet" v-if="pros.productCategory!=2" >规格:{{pros.productUnit ? pros.productUnit : ''}}</view>
+												<view class="productspec tui-skeleton-fillet" v-if="pros.productCategory!=2" >
+													规格:{{pros.productUnit ? pros.productUnit : ''}}
+												</view>
 												<view class="productprice">
 													<view class="price tui-skeleton-fillet">
 														<text>¥{{pros.price | NumFormat}}</text>
@@ -75,7 +93,9 @@
 															:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
 														</text>
 													</view>
-													<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">{{pros.productPromotion.name}}</view>	
+													<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">
+														{{pros.productPromotion.name}}
+													</view>	
 												</view>
 											</view>	
 										</view>
@@ -85,16 +105,21 @@
 									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{ order.discountFee | NumFormat }}</view>
 									<view class="order-footer-bot">
 										<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-										<view class="money tui-skeleton-fillet" v-if="order.status==31||order.status==32||order.status==33">已支付:<label style="color:#f94b4b ;">¥{{ order.receiptAmount | NumFormat }}</label></view>
-										<view class="money tui-skeleton-fillet" v-else>待付总额:<label style="color:#f94b4b ;">¥{{ order.pendingPayments | NumFormat }}</label></view>
+										<view class="money tui-skeleton-fillet" 
+											  v-if="order.status==31||order.status==32||order.status==33">
+											  已支付:<label style="color:#f94b4b ;">¥{{ order.receiptAmount | NumFormat }}</label>
+										</view>
+										<view class="money tui-skeleton-fillet" v-else>待付总额:<label style="color:#f94b4b ;">
+											¥{{ order.pendingPayments | NumFormat }}</label>
+										</view>
 									</view>
 								</view>
 								<!-- 底部button -->
 								<order-button ref="orderButton" 
 											  :status="order.status" 
-											  :orderID="order.orderID" 
+											  :orderId="order.orderId" 
 											  :rechargeGoods = "order.rechargeGoods"
-											  :userID = "order.userID"
+											  :userId = "order.userId"
 											  :secondHandOrderFlag = "order.secondHandOrderFlag"
 											  @buttonConfirm="handButtonConfirm">
 								</order-button>
@@ -110,17 +135,17 @@
 		</swiper>
 		<!-- 分享弹窗 -->
 		<share-alert   v-if="isShareModal"
-					   :orderID="btnoRderID" 
+					   :orderId="btnoRderID" 
 					   @shareConfirm ='onShareAppMessage'>
 		</share-alert>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='isModalLayer'></modal-layer>
 		<view class="aganBj" v-show="showAgan">
 			<view class="alertAgan">
-				<text class="title">{{promptitle}}</text>
+				<text class="title">{{ promptitle }}</text>
 				<view class="goods">
 					<view class="list" v-for="(item,index) in failList"  :key="index">
-						<image class="image-left" :src="item.mainImage"></image>
+						<image class="image-left" :src="item.image"></image>
 						<view class="name-right">{{item.name}}</view>
 					</view>
 				</view>
@@ -203,10 +228,10 @@
 				navbarHeight:'',
 				nomoreText: '上拉显示更多',
 				showAgan:false,
-				failList:[],//失效商品
+				failList:[],  // 再来一单可购买商品
 				promptitle:'',
-				aganOrderID:0,//再来一单商品id
-				userID:0
+				aganOrderId:0,// 再来一单商品id
+				userId:0
 				
 			}
 		},
@@ -223,7 +248,7 @@
 				}
 			});
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userId ? resolve.userId : 0
+				this.userId = resolve.userId ? resolve.userId : 0
 			})
 		},
 		filters:{
@@ -232,17 +257,6 @@
 			},
 		},
 		methods: {
-			closeBtn(){//
-				this.showAgan = false;
-			},
-			cancelBtn(){
-				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,confirmFlag:1}).then(res =>{
-					if(res.code==0){
-						this.$api.navigateTo('/pages/seller/cart/cart');
-						this.showAgan = false;
-					}
-				})
-			},
 			// 滚动切换标签样式
 			onChange (e) {
 				let index = e.target.current || e.detail.current;
@@ -301,35 +315,39 @@
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
 						this.serviceProviderId = resolve.serviceProviderId
-						let params = {
+						this.SellerService.GetSellerOrderList(
+							{
 								listType:index,
 								orderSubmitType:this.screenTab,
 								serviceProviderId:this.serviceProviderId,
 								pageNum:1,
 								pageSize:this.pageSize,
-							};
-						this.SellerService.GetSellerOrderList(params).then(response =>{
-							let orderList = response.data.results.filter(item=>{
-								//添加不同状态下订单的表现形式
-								item = Object.assign(item, this.StateExpFormat(item.listType));
-								return item;
-							});
-							orderItem.orderList =[];
-							orderList.forEach(item=>{
-								orderItem.orderList.push(item);
-							})
-							//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-							this.$set(orderItem, 'loaded', true);
-							this.hasNextPage = response.data.hasNextPage;
-							if(this.hasNextPage){
-								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
-							}else{
-								if(orderItem.orderList.length < 2){
-									this.pullUpOn = true
-								}else{
+							}
+						).then(response =>{
+							let data = response.data
+							if(data.list && data.list.length>0){
+								let orderList = data.list.filter(item=>{
+									//添加不同状态下订单的表现形式
+									item = Object.assign(item, this.StateExpFormat(item.listType));
+									return item;
+								});
+								orderItem.orderList =[];
+								orderList.forEach(item=>{
+									orderItem.orderList.push(item);
+								})
+								//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+								this.$set(orderItem, 'loaded', true);
+								this.hasNextPage = data.hasNextPage;
+								if(this.hasNextPage){
 									this.pullUpOn = false
-									this.nomoreText = '已至底部'
+									this.nomoreText = '上拉显示更多'
+								}else{
+									if(orderItem.orderList.length < 2){
+										this.pullUpOn = true
+									}else{
+										this.pullUpOn = false
+										this.nomoreText = '已至底部'
+									}
 								}
 							}
 						}).catch(error =>{
@@ -339,18 +357,19 @@
 				}, 600);	
 			}, 
 			getOnReachBottomData(index){//上拉加载
-				let params = {
+				this.SellerService.GetSellerOrderList(
+					{
 						listType:index,
 						orderSubmitType:this.screenTab,
 						serviceProviderId:this.serviceProviderId,
 						pageNum:this.pageNum+=1,
 						pageSize:this.pageSize,
-					};
-				this.SellerService.GetSellerOrderList(params).then(response =>{
+					}
+				).then(response =>{
 					let orderItem = this.orderTabBar[index];
-					let resData = response.data.results
-					this.hasNextPage = response.data.hasNextPage;
-					orderItem.orderList = orderItem.orderList.concat(resData)
+					let data = response.data
+					this.hasNextPage =data.hasNextPage;
+					orderItem.orderList = orderItem.orderList.concat(data.list)
 					this.pullFlag = false;// 防上拉暴滑
 					setTimeout(()=>{this.pullFlag = true;},500)
 					if(this.hasNextPage){
@@ -374,7 +393,7 @@
 			},
 			detail(order) {//订单详情跳转
 				this.isModalLayer = true;	
-				this.$api.navigateTo(`/pages/seller/order/order-details?listType=${this.currentTab}&orderID=${order.orderID}&userId=${order.userID}`)
+				this.$api.navigateTo(`/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${order.userId}`)
 			},
 			handButtonConfirm(data) {//获取点击
 				this.handShowAlert(data)
@@ -384,7 +403,7 @@
 				switch(data.type){
 					case 'query':
 						this.isModalLayer = true;
-						this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+data.orderId)
+						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break
 					case 'delete':
 						this.handOrderDetele(data.orderId);
@@ -400,28 +419,51 @@
 						break	
 				}
 			},
-			handOrderAgain(id){
-				this.aganOrderID = id;
-				this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,userId:this.userID,confirmFlag:0}).then(res =>{
+			handOrderAgain(orderId){
+				this.aganOrderId = orderId;
+				this.SellerService.SellerCreateOrderAgain(
+					{
+						confirmFlag:0,	
+						orderId:this.aganOrderId,
+						serviceProviderId:this.serviceProviderId
+					}
+				).then(res =>{
 					if(res.code==0){
-						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds,userID:res.data.userId})
+						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds})
 						this.$api.navigateTo('/pages/seller/cart/cart');
 					}
 				}).catch(error =>{
 					if(error.code== -3){
-						this.showAgan = true;
-						this.promptitle = error.msg;
-						this.failList = error.data;
+						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)
 					}
-					})
+				})
+			},
+			closeBtn(){//
+				this.showAgan = false;
+			},
+			cancelBtn(){// 再来一单弹窗
+				this.SellerService.SellerCreateOrderAgain(
+					{
+						serviceProviderId:this.serviceProviderId,
+						orderId:this.aganOrderId,
+						confirmFlag:1,
+					}
+				).then(res =>{
+					if(res.code==0){
+						this.$api.navigateTo('/pages/seller/cart/cart');
+						this.showAgan = false;
+					}
+				})
 			},
-			handOrderConfirm (id){//确认订单
+			handOrderConfirm (orderId){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
-					this.OrderService.AffirmOrder({orderID:id}).then(response =>{
+					this.OrderService.AffirmOrder({orderId:orderId}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
@@ -431,9 +473,9 @@
 					})
 				})
 			},
-			handOrderDetele(id){//删除订单
+			handOrderDetele(orderId){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
-					this.OrderService.DeleteOrder({orderID:id}).then(response =>{
+					this.OrderService.DeleteOrder({orderId:orderId}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
@@ -443,9 +485,9 @@
 					})
 				})
 			},
-			handCenceConfirm(id){//取消订单
+			handCenceConfirm(orderId){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
-					this.OrderService.CancelOrder({orderID:id}).then(response =>{
+					this.OrderService.CancelOrder({orderId:orderId}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
@@ -465,7 +507,7 @@
 			    }
 				return {
 					title: '您有新的订单,请点击查看~',
-					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
+					path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&orderId=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

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

@@ -214,7 +214,7 @@
 					this.productParam.productCount = data.data.productCount
 					this.productParam.productId = data.data.productIds
 					this.productIds = this.postageParam.productIds = data.data.productIds
-					this.getProductCreateOrderInfo()
+					this.GetProductCreateOrderInfo()
 				}else{
 					this.confirmType = 2
 					this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
@@ -228,7 +228,7 @@
 			},
 		},	
 		methods: {
-			getProductCreateOrderInfo(){// 商品立即购买确认订单数据初始化
+			GetProductCreateOrderInfo(){// 商品立即购买确认订单数据初始化
 				this.OrderService.ProductCreateOrderInfo(this.productParam).then(response =>{
 					let data = response.data
 					this.isRequest = true
@@ -538,11 +538,10 @@
 			handleClickCancel(){// 关闭优惠券弹窗
 				this.isCouponModel = false;
 				if(this.confirmType == 1){
-					
+					this.GetProductCreateOrderInfo()
 				}else{
-					
+					this.CartCreateOrderInfo();
 				}
-				this.getInitCrearOrder();
 			},
 			hideFreight(){//关闭邮费弹窗
 				this.isfreightTip = false

+ 76 - 23
services/sellse.service.js

@@ -102,9 +102,10 @@ export default class SellerService {
 	 */
 	GetSellerOrderList (data = {}) {
 		return this.AjaxService.get({ 
-			url:'/seller/order/list', 
+			url:'/order/seller/list', 
 			data, 
 			isLoading: true ,
+			isHost:true
 		})
 	}
 	/**
@@ -115,9 +116,33 @@ export default class SellerService {
 	 */
 	GetSellerClubOrderList (data = {}) {
 		return this.AjaxService.get({ 
-			url:'/seller/clubOrder', 
+			url:'/order/seller/list/club', 
 			data, 
 			isLoading: true ,
+			isHost:true
+		})
+	}
+	/**
+	 *@协销-关键词搜索订单
+	 *@param  userId:商品ID(数字类型,必传)
+	 *@param pageNum:机构会所ID(同之前)
+	 *@param pageSize:协销ID(同之前)
+	 */
+	getSellerOrderList (data={}){
+		return this.AjaxService.get({ 
+			url:'/order/seller/search', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
+	}
+	// 协销订单列表/再来一单
+	SellerCreateOrderAgain (data = {}) {
+		return this.AjaxService.post({ 
+			url:'/order/seller/cart/again', 
+			data, 
+			isLoading: true ,
+			isHost:true
 		})
 	}
 	/**
@@ -142,8 +167,14 @@ export default class SellerService {
 	 *@param productCount:二手购买数量 
 	 */
 	GetSettlementBySencondProduct (data = {}) {
-		return this.AjaxService.post({ url:'/seller/settlementBySencondProduct', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/order/seller/second/settlement', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
+	
 	/**
 	 *@协销-二手商品推荐
 	 *@param productId:商品ID(数字类型,必传)
@@ -151,15 +182,6 @@ export default class SellerService {
 	ProductRecommend (data={}){//相关推荐
 		return this.AjaxService.get({ url:'/product/getSecondHandProductRecommend', data, isLoading: true })
 	}
-	/**
-	 *@协销-关键词搜索订单
-	 *@param  userId:商品ID(数字类型,必传)
-	 *@param pageNum:机构会所ID(同之前)
-	 *@param pageSize:协销ID(同之前)
-	 */
-	getSellerOrderList (data={}){
-		return this.AjaxService.get({ url:'/seller/searchOrder', data, isLoading: true })
-	}
 	/*协销下单购物车->api*/
 	/**
 	 *@单一商品加入购物车
@@ -167,7 +189,12 @@ export default class SellerService {
 	 *@param serviceProviderId 协销ID
 	 */
 	ShoppingCartAddCart (data = {}) {
-		return this.AjaxService.post({ url:'/seller/addCart', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/order/seller/cart/add', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@组合商品加入购物车
@@ -175,7 +202,12 @@ export default class SellerService {
 	 *@param serviceProviderId 协销ID
 	 */
 	ShoppingCartBatchAddCart (data = {}) {
-		return this.AjaxService.post({ url:'/seller/batchAddCart', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/order/seller/cart/add', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销帮机构下单获取购物车数量
@@ -183,7 +215,12 @@ export default class SellerService {
 	 *@param serviceProviderId 协销ID
 	 */
 	GetSellerProductNum (data = {}) {
-		return this.AjaxService.get({ url:'/seller/productNum', data, isLoading: false })
+		return this.AjaxService.get({ 
+			url:'/order/seller/cart/count', 
+			data, 
+			isLoading: false ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销帮机构下单购物车商品加减数量
@@ -191,14 +228,24 @@ export default class SellerService {
 	 *@param serviceProviderId 	协销ID
 	 */
 	SellerAddProductNum (data = {}) {
-		return this.AjaxService.post({ url:'/seller/addProductNum', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/order/seller/cart/update', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销帮机构下单购物车删除商品
 	 *@param sellerCartIds 购物车ID
 	 */
 	DeleteSellerCart (data = {}) {
-		return this.AjaxService.post({ url:'/seller/deleteSellerCart', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/order/seller/cart/delete', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销帮机构下单获取购物车列表
@@ -206,7 +253,12 @@ export default class SellerService {
 	 *@param serviceProviderId 协销ID
 	 */
 	GetSellerShoppingInfo (data = {}) {
-		return this.AjaxService.get({ url:'/seller/shoppingInfo', data, isLoading: false })
+		return this.AjaxService.get({ 
+			url:'/order/seller/cart/list', 
+			data, 
+			isLoading: false ,
+			isHost:true
+		})
 	}
 	/*协销下单订单->api*/
 	/**
@@ -216,7 +268,12 @@ export default class SellerService {
 	 *@param productIds 商品ID
 	 */
 	SellerSettlement (data = {}) {
-		return this.AjaxService.post({ url:'/seller/settlement', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/order/seller/cart/settlement', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销下定金商品订单初始化
@@ -254,10 +311,6 @@ export default class SellerService {
 	SellerCreateOrderSubmit (data = {}) {
 		return this.AjaxService.post({ url:'/seller/order/submit', data, isLoading: true })
 	}
-	// 协销订单列表/再来一单
-	SellerCreateOrderAgain (data = {}) {
-		return this.AjaxService.post({ url:'/seller/order/again', data, isLoading: true })
-	}
 	// 协销购物车清空失效列表
 	SellerCartdelete (data = {}) {
 		return this.AjaxService.post({ url:'/seller/deleteSellerCart', data, isLoading: true })