소스 검색

确认订单

zhengjinyi 4 년 전
부모
커밋
fc0b6948dc

+ 1 - 3
common/config/addressdata.js

@@ -2,9 +2,7 @@
  *请求获取省市区
  *已提供给地区选择picker组件使用
  */
-import {
-	queryAddressInformation
-} from '@/services/public.js'
+import { queryAddressInformation } from '@/services/public.js'
 const provinceData = []
 const cityData = []
 const areaData = []

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 2
common/css/iconfont.scss


+ 4 - 4
components/cm-module/creatOrder/sellerAddress.vue → components/cm-module/creatOrder/address.vue

@@ -62,11 +62,11 @@
 			initData(res) {
 				if(Object.keys(res).length == 0){
 					this.isEmpty = true
-					this.addressSrc = '/seller/pages/address/addressManage'
+					this.addressSrc = '/pages/user/address/addressManage'
 				}else{
 					this.isEmpty = false
 					this.$parent.isFreight = false
-					this.addressSrc = '/seller/pages/address/address?type=select'
+					this.addressSrc = '/pages/user/address/address?type=select'
 				}
 			}
 		}
@@ -82,7 +82,7 @@
 		image{
 			float: left;
 			width: 100%;
-			height: 16rpx;
+			height: 6rpx;
 		}
 	}
 	.address-section {
@@ -176,7 +176,7 @@
 			.nexpage{
 				text-align: right;
 				font-size: $font-size-30;
-				color: $color-system;
+				color: #666666;
 				position: absolute;
 				right: 0;
 				top: 45rpx;

+ 19 - 51
components/cm-module/creatOrder/goodsList.vue

@@ -4,35 +4,29 @@
 		<view class="goods-list">
 			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
 				<view class="shoptitle">
-					<view v-if="item.promotions" class="floor-item-act">
-						<view class="floor-tags">{{item.promotions.name}}</view>	
-					</view>
 					<view class="title-text">{{item.name}}</view> 
 				</view>
-				<view class="productlist" v-for="(pros,idx) in item.cartList" :key="idx">
+				<view class="productlist" v-for="(pros,idx) in item.productList" :key="idx">
 					<view class="goods-pros-t">
 						<view class="pros-img">
-							<image :src="pros.image" alt="" />
-							<text class="tips" v-if="pros.productType ==2 || pros.productType ==1">赠品</text>
+							<image :src="pros.mainImage" alt="" />
+							<text class="tips" v-if="pros.productType == 2">赠品</text>
 						</view>
 						<view class="pros-product">
-							<view class="producttitle">{{pros.name}}</view>
-							<view class="productspec"  v-if="pros.productCategory!=2">规格:{{pros.unit}}</view>
-							<view class="productspec" v-if="pros.productCode!=''&&pros.productCode!=null">
-								<view >商品编码:{{pros.productCode}}</view>
-							</view>
+							<view class="producttitle">{{pros.productName}}</view>
+							<view class="productspec">规格:{{pros.unit}}</view>
 							<view class="productprice">
 								<view class="price"><text>¥{{pros.price | NumFormat}}</text></view>
-								<view class="count"><text class="small">x</text>{{pros.number}}</view>
+								<view class="count"><text class="small">x</text>{{pros.productCount}}</view>
 							</view>
-							<view class="floor-item-act" v-if="pros.promotions!=null">
-								<view v-if="PromotionsFormat(pros.promotions)" class="floor-tags">
-									{{pros.promotions.name}}
-									<text v-if ="pros.promotions!=null">
-										:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
+							<view class="floor-item-act" v-if="pros.promotion!=null">
+								<view v-if="PromotionsFormat(pros.promotion)" class="floor-tags">
+									{{pros.promotion.name}}
+									<text v-if ="pros.promotion!=null">
+										:¥{{ pros.promotion == null ? '0.00' : pros.promotion.touchPrice | NumFormat}}
 									</text>
 								</view>
-								<view v-else-if="pros.promotions.type !=3" class="floor-tags">{{pros.promotions.name}}</view>	
+								<view v-else-if="pros.promotion.type !=3" class="floor-tags">{{pros.promotion.name}}</view>	
 							</view>
 						</view>	
 					</view>
@@ -49,12 +43,7 @@
 						</view>
 				</view>
 				<view class="goods-pros-b">
-					<view class="sum-none" v-if="(item.originalPrice - item.totalPrice)>0">
-						<text class="money-sign">¥</text>
-						<text class="money">{{ item.originalPrice | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ (item.originalPrice - item.totalPrice) | NumFormat}}</text></text>
-					</view>
-					<view class="sum">合计:<text class="money">¥{{ item.totalPrice | NumFormat }}</text></view>
+					<view class="sum">合计:<text class="money">¥{{ ( item.shopTotalPrice ) | NumFormat }}</text></view>
 				</view>
 			</view>
 		</view>	
@@ -149,27 +138,6 @@
 					line-height: 56rpx;
 					font-weight: bold;
 				}
-				.floor-item-act{
-					height: 56rpx;
-					text-align: center;
-					box-sizing: border-box;
-					float: left;
-					padding: 12rpx 0;
-					margin-right: 12rpx;
-					.floor-tags{
-						height: 28rpx;
-						border-radius: 6rpx;
-						background-color: #FFFFFF;
-						line-height: 28rpx;
-						color: $color-system;
-						text-align: center;
-						display: inline-block;
-						padding:0 16rpx;
-						font-size: $font-size-20;
-						border: 1px solid #E15616;
-						float: left;
-					}
-				}
 			}
 			.productlist{
 				width: 100%;
@@ -229,8 +197,8 @@
 				}
 				.productspec{
 					height: 40rpx;
-					line-height: 40rpx;
 					color: #999999;
+					line-height: 40rpx;
 					text-overflow:ellipsis;
 					display: -webkit-box;
 					word-break: break-all;
@@ -240,6 +208,7 @@
 				}
 				.productprice{
 					height: 54rpx;
+					line-height: 54rpx;
 					width: 100%;
 					float: left;
 					.price{
@@ -270,12 +239,12 @@
 						border-radius: 6rpx;
 						background-color: #FFFFFF;
 						line-height: 28rpx;
-						color: $color-system;
+						color: #ff2a2a;
 						text-align: center;
 						display: inline-block;
 						padding:0 16rpx;
 						font-size: $font-size-20;
-						border: 1px solid #E15616;
+						border: 1px solid #ff2a2a;
 						float: left;
 					}
 				}
@@ -300,15 +269,14 @@
 					-webkit-align-items: center;
 					align-items: center;
 					position: relative;
-					width: 580rpx;
+					width: 576rpx;
 					height: 36rpx;
 					padding: 20rpx;
-					background: #F7F7F7;
+					background: #F9F9F9;
 					border-radius: 10rpx;
 					input{
 						width: 100%;
 						height: 100%;
-						background: #F7F7F7;
 						font-size: $font-size-26;
 						line-height: 36rpx;
 						color: #333333;

+ 2 - 2
components/cm-module/creatOrder/sellerFreight.vue

@@ -19,7 +19,7 @@
 					<view class="freight-radio">
 						<radio-group class="row-group" @change="radioChange">
 							<label class="row-input" v-for="(item, index) in freightList" :key="item.value">
-								<radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616"/>
+								<radio class="row-radio" :value="item.value" :checked="index === current" color="#191919"/>
 								<view class="row-text">{{item.name}}</view>
 							</label>
 						</radio-group>
@@ -188,7 +188,7 @@
 		height: auto;
 		background: #FFFFFF;
 		float: left;
-		margin-top: 24rpx;
+		margin: 24rpx 0 34rpx 0;
 		.invoice-freight{
 			width: 702rpx;
 			padding: 0 24rpx;

+ 0 - 367
components/cm-module/creatOrder/sellerGoodsList.vue

@@ -1,367 +0,0 @@
-<template name="goods">
-	<view class="goods-template">
-		 <!-- 商品列表 -->
-		<view class="goods-list">
-			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
-				<view class="shoptitle">
-					<view v-if="item.promotions" class="floor-item-act">
-						<view class="floor-tags">{{item.promotions.name}}</view>	
-					</view>
-					<view class="title-text">{{item.name}}</view> 
-				</view>
-				<view class="productlist" v-for="(pros,idx) in item.productsList" :key="idx">
-					<view class="goods-pros-t">
-						<view class="pros-img">
-							<image :src="pros.mainImage" alt="" />
-							<text class="tips" v-if="pros.giftType == 2 || pros.giftType == 1">赠品</text>
-						</view>
-						<view class="pros-product">
-							<view class="producttitle">{{pros.name}}</view>
-							<view class="productspec"  v-if="pros.productCategory!=2">规格:{{pros.unit}}</view>
-							<view class="productspec" v-if="pros.productCode!=''&&pros.productCode!=null">
-								<view >商品编码:{{pros.productCode}}</view>
-							</view>
-							<view class="productprice">
-								<view class="price"><text>¥{{pros.retailPrice | NumFormat}}</text></view>
-								<view class="count"><text class="small">x</text>{{pros.productCount}}</view>
-							</view>
-							<view class="floor-item-act" v-if="pros.promotions!=null">
-								<view v-if="PromotionsFormat(pros.promotions)" class="floor-tags">
-									{{pros.promotions.name}}
-									<text v-if ="pros.promotions!=null">
-										:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
-									</text>
-								</view>
-								<view v-else-if="pros.promotions.type !=3" class="floor-tags">{{pros.promotions.name}}</view>	
-							</view>
-						</view>	
-					</view>
-				</view>	
-				<view class="goods-pros-m">
-					<view class="m-text">留言:</view>
-					<view class="m-input">
-						<input type="text" 
-						   v-model="remark[index]" 
-						   @change="changeHandle(index)"
-						   placeholder-class="placeholder"  
-						   maxlength="50" 
-						   placeholder="选填,最多不超过50个汉字"/>
-						</view>
-				</view>
-				<view class="goods-pros-b">
-					<view class="sum-none" v-if="item.reducedPrice>0">
-						<text class="money-sign">¥</text>
-						<text class="money">{{ item.totalPrice | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
-					</view>
-					<view class="sum">合计:<text class="money">¥{{ ( item.totalPrice -item.reducedPrice ) | NumFormat }}</text></view>
-				</view>
-			</view>
-		</view>	
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"goods",
-		props:{
-			goodsData:{
-				type:Array
-			}
-		},
-		data() {
-			return{
-				remark:[]
-			}
-		},
-		created(){
-			
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
-			},
-		},	
-		watch: {
-			goodsData: {
-				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-					this.goodsData = el
-				},
-				deep: true
-			}
-		},
-		computed: {
-
-		},
-		methods:{
-			PromotionsFormat(promo){//促销活动类型数据处理
-				if(promo!=null){
-					if(promo.type == 1 && promo.mode == 1){
-						return true
-					}else{
-						return false
-					}
-				}
-				return false
-			},
-			changeHandle (index) {//输入框的值被改变后
-				this.goodsData[index].note = this.remark[index]
-				this.$emit('handleGoodList',this.goodsData)
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	.goods-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.goods-list{
-			width: 100%;
-			height: auto;	
-			background:#F7F7F7;
-			.goods-item{
-				width: 702rpx;
-				padding: 0 24rpx;
-				background: #FFFFFF;
-				margin-bottom: 24rpx;
-				&:last-child{
-					margin-bottom: 0;
-				}
-			}
-			.shoptitle{
-				display: flex;
-				align-items: center;
-				height: 80rpx;
-				line-height: 80rpx;
-				.title-text{
-					width: 400rpx;
-					overflow: hidden;
-					text-overflow:ellipsis;
-					white-space: nowrap;
-					float: left;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: left;
-					line-height: 56rpx;
-					font-weight: bold;
-				}
-				.floor-item-act{
-					height: 56rpx;
-					text-align: center;
-					box-sizing: border-box;
-					float: left;
-					padding: 12rpx 0;
-					margin-right: 12rpx;
-					.floor-tags{
-						height: 28rpx;
-						border-radius: 6rpx;
-						background-color: #FFFFFF;
-						line-height: 28rpx;
-						color: $color-system;
-						text-align: center;
-						display: inline-block;
-						padding:0 16rpx;
-						font-size: $font-size-20;
-						border: 1px solid #E15616;
-						float: left;
-					}
-				}
-			}
-			.productlist{
-				width: 100%;
-				height: auto;
-			}	
-			.goods-pros-t{
-				display: flex;
-				align-items: center;
-				width: 100%;
-				height: auto;
-				padding:12rpx 0;
-				.pros-img{
-					width: 210rpx;
-					height: 100%;
-					border-radius: 10rpx;
-					margin:0 26rpx 0 0;
-					position: relative;
-					.tips{
-						display: inline-block;
-						width: 80rpx;
-						height: 40rpx;
-						background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
-						line-height: 40rpx;
-						text-align: center;
-						font-size: $font-size-24;
-						color: #FFFFFF;
-						border-radius:10rpx 0 10rpx 0 ;
-						position: absolute;
-						top:0;
-						left: 0;
-					}
-					image{
-						width: 210rpx;
-						height: 210rpx;
-						border-radius: 10rpx;
-						border:1px solid #f3f3f3;
-					}
-				}
-			}
-			.pros-product{
-				width: 468rpx;
-				height: 100%;
-				line-height: 40rpx;
-				font-size: $font-size-26;	
-				position: relative;
-				.producttitle{
-					width: 100%;
-					display: inline-block;
-					height: auto;							
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
-					margin-bottom: 8rpx;
-				}
-				.productspec{
-					height: 40rpx;
-					color: #999999;
-					line-height: 40rpx;
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
-				}
-				.productprice{
-					height: 54rpx;
-					line-height: 54rpx;
-					width: 100%;
-					float: left;
-					.price{
-						line-height: 54rpx;
-						font-size: $font-size-28;
-						width: 48%;
-						color: #FF2A2A;
-						float: left;
-					}
-					.count{
-						height: 100%;
-						float: right;
-						position: relative;
-						.small{
-							color: #666666;
-						}
-					}
-				}
-				.floor-item-act{
-					width: 100%;
-					height: 56rpx;
-					text-align: center;
-					box-sizing: border-box;
-					float: left;
-					padding:0 0 10rpx 0;
-					.floor-tags{
-						height: 28rpx;
-						border-radius: 6rpx;
-						background-color: #FFFFFF;
-						line-height: 28rpx;
-						color: $color-system;
-						text-align: center;
-						display: inline-block;
-						padding:0 16rpx;
-						font-size: $font-size-20;
-						border: 1px solid #E15616;
-						float: left;
-					}
-				}
-			}
-			.goods-pros-m{
-				height: 76rpx;
-				line-height: 76rpx;
-				font-size: $font-size-26;
-				color: $text-color;
-				margin-top: 12rpx;
-				.m-text{
-					width: 62rpx;
-					float: left;
-					padding-right: 20rpx;
-					font-weight:bold;
-				}
-				.m-input{
-					display: -webkit-box;
-					display: -webkit-flex;
-					display: flex;
-					-webkit-box-align: center;
-					-webkit-align-items: center;
-					align-items: center;
-					position: relative;
-					width: 576rpx;
-					height: 36rpx;
-					padding: 20rpx;
-					background: #fff;
-					border-radius: 10rpx;
-					border: 2rpx solid #b2b2b2;
-					input{
-						width: 100%;
-						height: 100%;
-						// background: #F7F7F7;
-						font-size: $font-size-26;
-						line-height: 36rpx;
-						color: #333333;
-						min-height: 36rpx;
-					}
-				}
-			}
-			.goods-pros-b{
-				width:100%;
-				height: auto;
-				padding: 10rpx 0;
-				.sum-none{
-					width: 100%;
-					height: 48rpx;
-					line-height: 48rpx;
-					color: $text-color;
-					float: left;
-					text-align: right;
-					.money{
-						font-size: $font-size-26;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-sign{
-						font-size: $font-size-26;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-reduced{
-						margin-left: 10rpx;
-						font-size: $font-size-26;
-						color: $color-system;
-						.iconfont{
-							font-size: $font-size-34;
-						}
-					}
-				}
-				.sum{
-					width: 100%;
-					height: 48rpx;
-					font-size: $font-size-28;
-					line-height: 48rpx;
-					color: $text-color;
-					display: flex;
-					justify-content: flex-end;
-					.money{
-						color: #FF2A2A;
-						font-size: $font-size-28;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 6 - 5
components/cm-module/creatOrder/sellerInvoice.vue

@@ -21,7 +21,7 @@
 					<view class="invoice-radio">
 						<radio-group class="row-group" @change="radioChange">
 							<label class="row-input" v-for="(item, index) in invoiceTypeList" :key="item.value">
-								<radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616"/>
+								<radio class="row-radio" :value="item.value" :checked="index === current" color="#191919"/>
 								<view class="row-text">{{item.name}}</view>
 							</label>
 						</radio-group>
@@ -141,8 +141,8 @@
 		},
 		methods:{
 			getUseFindInvoice(){//获取发票信息
-				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					this.OrderService.GetFindInvoice({userId:resolve.userID}).then(response =>{
+				this.$api.getComStorage('clubInfo').then((resolve) =>{
+					this.OrderService.GetFindInvoice({userId:resolve.userId}).then(response =>{
 						if(response.data == null){
 							this.invoiceData = Object.assign(this.invoiceData,'',{type:0})
 						}else{
@@ -152,8 +152,8 @@
 				})
 			},
 			updateInvoiceFn(){//保存发票信息
-				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					let params =Object.assign(this.invoiceData,'',{userId:resolve.userID})
+				this.$api.getComStorage('clubInfo').then((resolve) =>{
+					let params =Object.assign(this.invoiceData,'',{userId:resolve.userId})
 					this.OrderService.UpdateInvoice(params).then(response =>{})
 				})
 			},
@@ -257,6 +257,7 @@
 						break;
 					}
 				}
+				console.log('2222222222')
 				switch(this.invoiceType){
 					case '2':
 						this.getUseFindInvoice()

+ 4 - 4
components/cm-module/productDetails/cm-activipopu.vue

@@ -33,11 +33,11 @@
 						<text class="txt">¥{{product.promotion.touchPrice}}</text>赠送商品
 					</view>
 					<view class="box-product" v-show="product.promotion.mode==3">
-						<view class="box-product-main"  v-for="(item, index) in product.promotion.giftList" :key="index">
-							<view class="image"><image :src="item.image" mode="widthFix"></image></view>
+						<view class="box-product-main"  v-for="(item, index) in product.promotion.productGifts" :key="index">
+							<view class="image"><image :src="item.mainImage" mode="widthFix"></image></view>
 							<view class="info">
-								<view class="name">{{ item.name }}</view>
-								<view class="num">X{{ item.number }}</view>
+								<view class="name">{{ item.productName }}</view>
+								<view class="num">X{{ item.productCount }}</view>
 							</view>
 						</view>
 					</view>

+ 4 - 4
components/mpvue-citypicker/mpvueCityPicker.vue

@@ -37,9 +37,9 @@
 			};
 		},
 		created() {
-			console.log('provinceData',provinceData)
-			console.log('cityData',cityData)
-			console.log('areaData',areaData)
+			// console.log('provinceData',provinceData)
+			// console.log('cityData',cityData)
+			// console.log('areaData',areaData)
 			// this.init()
 		},
 		props: {
@@ -55,7 +55,7 @@
 		},
 		watch: {
 			pickerValueDefault() {
-				this.init();
+				// this.init();
 			}
 		},
 		methods: {

+ 24 - 23
pages/user/cart/cart.vue

@@ -32,7 +32,7 @@
 												<!--使用过滤器对总价改变-->
 												<view class="price" :class="PromotionsFormat(pros.promotion) ? 'disabled' : ''">
 													<text>¥</text>
-													{{ (PromotionsFormat(pros.promotion) ? pros.originalPrice : pros.price)  | NumFormat }}
+													{{ (PromotionsFormat(pros.promotion) ? pros.retailPrice : pros.retailPrice)  | NumFormat }}
 												</view>
 												<view class="count">
 													<view class="number-box">
@@ -386,28 +386,28 @@
 				let reducedPrice = 0;//商铺合计满减价
 				this.goodsList.map((item,index)=>{
 					//计算店铺满减后店铺合计
-					if(item.promotion && item.promotion.mode == 2){
-						let prosPrice=0;
-						let totalOriginalPrice = 0;//商铺合计原价
-						item.productList.forEach(pros=>{
-							prosPrice += pros.price*pros.productCount
-							totalOriginalPrice += pros.originalPrice*pros.productCount
-						})
-						if(prosPrice >= item.promotion.touchPrice){
-							item.totalPrice = prosPrice - item.promotion.reducedPrice  
-							item.reducedPrice = item.promotion.reducedPrice
-							item.totalOriginalPrice = totalOriginalPrice
-						}else{
-							item.reducedPrice = 0  //统计合计价格
-							item.totalPrice = prosPrice
-						}
-					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
+					// if(item.promotion && item.promotion.mode == 2){
+					// 	let prosPrice=0;
+					// 	let totalOriginalPrice = 0;//商铺合计原价
+					// 	item.productList.forEach(pros=>{
+					// 		prosPrice += pros.price*pros.productCount
+					// 		totalOriginalPrice += pros.originalPrice*pros.productCount
+					// 	})
+					// 	if(prosPrice >= item.promotion.touchPrice){
+					// 		item.totalPrice = prosPrice - item.promotion.reducedPrice  
+					// 		item.reducedPrice = item.promotion.reducedPrice
+					// 		item.totalOriginalPrice = totalOriginalPrice
+					// 	}else{
+					// 		item.reducedPrice = 0  //统计合计价格
+					// 		item.totalPrice = prosPrice
+					// 	}
+					// }else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
 						let _totalPrice = 0;
 						let _reducedPrice = 0;
 						let _totalOriginalPrice =0;
 						item.productList.forEach(pros=>{
-							let _price = pros.price*pros.productCount
-							_totalOriginalPrice += pros.price*pros.productCount;
+							let _price = pros.retailPrice*pros.productCount
+							_totalOriginalPrice += pros.retailPrice*pros.productCount;
 							if(pros.promotion && pros.promotion.type != 2 && pros.promotion.mode == 2){
 								if(_price >= pros.promotion.touchPrice){
 									_price = _price - pros.promotion.reducedPrice
@@ -416,13 +416,13 @@
 								_totalPrice +=  _price
 							}else{
 								_reducedPrice = 0;
-								_totalPrice += pros.price*pros.productCount;
+								_totalPrice += pros.retailPrice*pros.productCount;
 							}
 						})
 						item.reducedPrice = _reducedPrice
 						item.totalOriginalPrice = _totalOriginalPrice
 						item.totalPrice = _totalPrice
-					}
+					// }
 				})
 			},
 			totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
@@ -437,11 +437,11 @@
 					item.originalprice = 0;
 					item.productList.forEach(pros=>{	
 						if(pros.productsChecked){								
-							supplierPrice += pros.price*pros.productCount;
+							supplierPrice += pros.retailPrice*pros.productCount;
 							// 单品满减
 							if(pros.promotion && pros.promotion.type*1===1 && pros.promotion.mode*1===2){
 								// 单品满减-重新计算供应商总价/满减金额
-								if(pros.price*pros.productCount >= pros.promotion.touchPrice){
+								if(pros.retailPrice*pros.productCount >= pros.promotion.touchPrice){
 									supplierPrice -= pros.promotion.reducedPrice;
 									supplierReducedPrice += pros.promotion.reducedPrice;
 								}
@@ -604,6 +604,7 @@
 						})
 					})
 					let cartPramsData={
+							userId:this.userId,
 							allPrice:this.allPrice,
 							allCount:this.allCount,
 							productID:productID.substring(0,productID.lastIndexOf(',')),

+ 71 - 133
pages/user/order/create-order.vue

@@ -5,16 +5,16 @@
 		<!-- 地址选择 -->
 		<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
 		<!-- 商品 -->
-		<seller-goodsList ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></seller-goodsList>
+		<goodsList ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></goodsList>
 		<!-- 发票信息 -->
 		<seller-invoice ref="invoice" 
-						v-if="isRequest && isDepositFlg" 
+						v-if="isRequest" 
 						:invoiceDatas="invoiceData" 
 						@handleChoiceaInvoice="handleChoiceaInvoiceData">
 		</seller-invoice>
 		<!-- 运费 -->
 		<seller-freight ref="freight" 
-						v-if="isFreight && isDepositFlg" 
+						v-if="isFreight" 
 						:freightDatas="freightData" 
 						@handleChoiceaFreight="handleChoiceaFreightData" 
 						@showFreightAlert="handFreightAlertShow">
@@ -27,11 +27,6 @@
 					<text>共{{allCount}}件商品</text>
 				</view>
 				<view class="footer-price">
-					<view class="sum-none" v-if="reducedPrice > 0">
-						<text class="money-sign">¥</text>
-						<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
-					</view>
 					<view class="sum" :class="reducedPrice == 0 ? 'none' : ''">总价:<text class="price">¥{{payAllPrice | NumFormat}}</text></view>
 				</view>
 			</view>
@@ -43,8 +38,8 @@
 </template>
 
 <script>
-	import choiceAddress from '@/components/cm-module/creatOrder/sellerAddress'  
-	import sellerGoodsList from '@/components/cm-module/creatOrder/sellerGoodsList'
+	import choiceAddress from '@/components/cm-module/creatOrder/address'  
+	import goodsList from '@/components/cm-module/creatOrder/goodsList'
 	import sellerInvoice from '@/components/cm-module/creatOrder/sellerInvoice'
 	import sellerFreight from '@/components/cm-module/creatOrder/sellerFreight'
 	import freightAlert from '@/components/cm-module/modelAlert/freightAlert.vue'
@@ -52,7 +47,7 @@
 	export default {
 		components:{
 			choiceAddress,
-			sellerGoodsList,
+			goodsList,
 			sellerInvoice,
 			sellerFreight,
 			freightAlert,
@@ -62,20 +57,19 @@
 			return {
 				modallayer:false,
 				orderID:0,
-				clubID:'',
+				userId:'',
 				productIds:'',			  //获取上一级页面商品信息
 				productCount:'',		  //获取上一级页面商品数量
 				classifyIDS:'',			  //获取上一级页面商品分类
 				serviceProviderId:'',	  //协销ID
-				cartType:3,			  	  //购买类型(1购物车提交,2直接购买提交,3协销下单)
 				submitState:'',  		  //提交状态
 				allCount:1,				  //订单提交总数量
 				totalOriginalPrice:0,	  //订单总原价(划线部分)
 				reducedPrice:0,			  //满减金额
 				payAllPrice:0.00,		  //订单提交总金额
 				allPrice:0.00,			  //订单总金额
-				addressID:'',			  //地址ID
-				townID:'',				  //区ID
+				addressId:'',			  //地址ID
+				townId:'',				  //区ID
 				isRequest:false,		  //是否加载完成渲染子组件
 				isFreight:false,		  //是否加载完成渲染子组件
 				isAddress:false,		  //是否加载完成地址
@@ -95,20 +89,10 @@
 		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.payAllPrice = this.totalPrice;
+			this.userId = data.data.userId
 			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.getInitCrearOrder();
 		},
 		filters:{
 			NumFormat(value) {//处理金额
@@ -116,70 +100,52 @@
 			},
 		},
 		methods: {
-			getInitProdcutCrearOrder(option){//二手下单初始化查询
-				this.$api.getStorage().then((resolve) =>{
-					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
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
-					})
-				})
-			},
-			getInitCrearOrder(option){//协销购物车跳转确认订单初始化信息
-				this.$api.getStorage().then((resolve) =>{
-					this.serviceProviderId = resolve.serviceProviderID
-					let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,count:this.productCount,productIds:this.productIds}
-					this.SellerService.SellerSettlement(params).then(response =>{
+			getInitCrearOrder(option){//确认订单初始化信息 
+				let params ={userId:this.userId,productIds:this.productIds}
+				this.OrderService.QueryOrderConfirm(params)
+					.then(response =>{
 						let data = response.data
 						let productIds = []
 						this.isRequest = true
 						this.goodsData = data.shopList
-						this.userMoney = data.userMoney
 						this.reducedPrice = data.reducedPrice
 						this.totalOriginalPrice = data.reducedPrice + data.totalAmount
-						this.allPrice = this.payAllPrice = data.totalAmount
-					}).catch(error =>{
+						this.allPrice = this.payAllPrice = data.totalPrice
+					})
+					.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
-						}else{
-							this.payAllPrice = this.allPrice
-						}
-					})
+				let params ={
+						userId:this.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
+					}else{
+						this.payAllPrice = this.allPrice
+					}
 				})
 			},
 			getAddressData(){//获取地址信息
-				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					this.UserService.QueryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
-						this.isAddress = true
-						this.addressData = {}
-						if(response.data.results != ''){
-							this.addressID = response.data.results[0].addressID;
-							this.townID = response.data.results[0].townID;
-							this.addressData = response.data.results[0];
-							this.getFreightData()
-						}else{
-							this.addressData = this.addressData;
-						}
-					})
+				this.UserService.QueryAddressList({pageNum:1,pageSize:1,userId:this.userId})
+				.then(response =>{
+					this.isAddress = true
+					this.addressData = {}
+					if(response.data.list != ''){
+						this.addressId = response.data.list[0].addressId;
+						this.townId = response.data.list[0].townId;
+						this.addressData = response.data.list[0];
+						this.getFreightData()
+					}else{
+						this.addressData = this.addressData;
+					}
 				})
 			},
 			handChangeInputGoodsList(data){//对应供应商的留言信息
@@ -230,18 +196,18 @@
 				}
 			},
 			orderSubmitMit(){//提交订单
-				if(this.addressID == ''){
+				if(this.addressId == ''){
 					this.$util.msg('请先添加收货地址~',2000)
 					return
 				}
 				// 处理商品信息及留言
 				this.orderInfo = this.goodsData.map(el => {
 					let productInfo = [];
-					el.productsList.forEach(item => {
+					el.productList.forEach(item => {
 						productInfo.push({
 							productId:item.productID,
 							productNum:item.productCount,
-							productType:item.giftType ? Number(item.giftType) : 0,
+							productType:item.productType ? Number(item.productType) : 0,
 							presentNum:0,
 						})
 					})				
@@ -252,60 +218,33 @@
 						orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
 						balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
 						freight:parseInt(this.freightData.freight).toFixed(2),//邮费
-						freePostFlag:parseInt(this.freightData.freePostFlag),//运费形式
-						clauseId:this.clauseId,//售后条款
-						rebateFlag:this.rebateFlag,//返佣
+						freePostFlag:parseInt(this.freightData.freePostFlag)//运费形式
 					}
 					console.log(this.payInfo)
 				let params = {
-						orderSource:6,				  //提交来源
-						clubUserId:this.clubUserId,   //机构UserID
-						cartType:this.cartType,		  //从购物车提交
-						serviceProviderId:this.serviceProviderId,//帮下单协销ID
-						addressId:this.addressID,	  //地址ID
+						clubUserId:this.userId,
+						addressId:this.addressId,	  //地址ID
 						orderInfo:this.orderInfo,	  //商品信息
 						payInfo:this.payInfo,		  //订单信息
 						orderInvoice:this.invoiceData //发票信息
 					}
 				this.modalLayer = true;	
-				if(this.rebateFlag == 1){
-					this.$util.modal('','确定该订单为返佣订单吗?点击确定按钮继续提交订单','确定','取消',true,() =>{
-						this.SellerService.SellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
-							const data = response.data;
-							if(data.code === '1'){
-								this.$util.msg('支付成功',2000,true,'success')
-								setTimeout(() =>{
-									this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
-								},2000)
-							}else{
-								this.$util.msg('订单提交成功',2000,true,'success')
-								setTimeout(()=>{
-									this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
-								},2000)
-							}
-						}).catch(error =>{
-							this.$util.msg(error.msg,2000);
-						})
-					})
-					return
-				}else{
-					this.SellerService.SellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
-						const data = response.data;
-						if(data.code === '1'){
-							this.$util.msg('支付成功',2000,true,'success')
-							setTimeout(() =>{
-								this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
-							},2000)
-						}else{
-							this.$util.msg('订单提交成功',2000,true,'success')
-							setTimeout(()=>{
-								this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
-							},2000)
-						}
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000);
-					})
-				}
+				this.OrderService.CreatedOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
+					const data = response.data;
+					if(data.code === '1'){
+						this.$util.msg('支付成功',2000,true,'success')
+						setTimeout(() =>{
+							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderId=${data.orderId}`)
+						},2000)
+					}else{
+						this.$util.msg('订单提交成功',2000,true,'success')
+						setTimeout(()=>{
+							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderId=${data.orderId}`)
+						},2000)
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
 			},
 			handFreightAlertShow(){//显示邮费弹窗
 				this.isfreightTip = true;
@@ -315,13 +254,13 @@
 			},
 		},
 		onShow() {
-			// this.addressID = ''		
+			// this.addressId = ''		
 			let pages = getCurrentPages();
 			let currPage = pages[pages.length-1];
 			if(currPage.data.select =='select'){
 				this.isAddress = true
 				let SelectData = uni.getStorageSync('selectAddress');
-				this.addressID = SelectData.addressID;
+				this.addressId = SelectData.addressId;
 				this.addressData = SelectData
 				this.getFreightData()
 			}else{
@@ -464,7 +403,6 @@
 			font-size: $font-size-26;
 		}
 		.footer-price{
-			width:370rpx;
 			float: right;
 			text-align: right;
 			color: $text-color;
@@ -513,7 +451,7 @@
 			display:flex;
 			align-items:center;
 			justify-content: center;
-			width: 180rpx;
+			width: 200rpx;
 			height: 100%;
 			box-sizing: border-box;
 			padding: 15rpx 5rpx;
@@ -521,7 +459,7 @@
 				width: 100%;
 				height: 100%;
 				color: #FFFFFF;
-				background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+				background:#ff2a2a;
 				font-size: $font-size-26;
 				text-align: center;
 				line-height: 80rpx;

+ 30 - 6
services/order.service.js

@@ -6,9 +6,21 @@ export default class OrderService {
 		Object.assign(this, { AjaxService })
 		this.name = 'OrderService'
 	}
-	/* 查询订单列表 */
-	QueryOrderList (data = {}) {
-		return this.AjaxService.get({ url:'/order/list', data, isLoading: true })
+	/* 订单结算初始化 */
+	QueryOrderConfirm (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/order/confirm', 
+			data, 
+			isLoading: true ,
+		})
+	}
+	/* 提交订单 */
+	QueryOrderSubmit (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/order/submit', 
+			data, 
+			isLoading: true ,
+		})
 	}
 	/* 查询订单详情 */
 	QueryOrderDetails (data = {}) {
@@ -89,21 +101,33 @@ export default class OrderService {
 	 *@param townID		地址区ID
 	 */
 	GetOrderPostage (data = {}) {
-		return this.AjaxService.get({ url:'/order/postage', data, isLoading: false })
+		return this.AjaxService.get({ 
+			url:'/order/postage', 
+			data, 
+			isLoading: false ,
+		})
 	}
 	/**
 	 *@确认订单-获取发票信息
 	 *@param userId		用户ID
 	 */
 	GetFindInvoice (data = {}) {
-		return this.AjaxService.get({ url:'/personalCenter/findInvoice', data, isLoading: false })
+		return this.AjaxService.get({ 
+			url:'/other/findInvoice', 
+			data, 
+			isLoading: false ,
+		})
 	}
 	/**
 	 *@确认订单-保存发票信息
 	 *@param userId		用户ID
 	 */
 	UpdateInvoice (data = {}) {
-		return this.AjaxService.post({ url:'/personalCenter/invoice', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/other/invoice', 
+			data, 
+			isLoading: true ,
+		})
 	}
 	/* 提交订单 orderId 订单ID */
 	CreatedOrderSubmit (data = {}) {

+ 0 - 1
services/public.js

@@ -1,4 +1,3 @@
-ZZ
 /**
  *@des 公共接口
  *@author zhengjinyi

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.