Ver Fonte

Merge branch 'developer' of http://git.caimei365.com/caimei-repository/caimei-applets-caimei into developerX

xiebaomin há 1 ano atrás
pai
commit
c7b3b2b2d3

+ 6 - 5
components/cm-module/cart-components/index.vue

@@ -321,11 +321,11 @@
 			:popupShow="popupShow2"
 			:skuProduct="handlePros"
 			@skuBtnConfirm="handleBtnConfirm"
-		></cm-unit-popup>
+		/>
 		<!-- 促销活动弹窗 -->
-		<activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
+		<activi-popup :product="handlerPros" :popupShow="popupShow" />
 		<!-- 透明模态层 -->
-		<modal-layer v-if="modallayer"></modal-layer>
+		<modal-layer v-if="modallayer" />
 		<!-- 优惠券 -->
 		<tui-bottom-popup :radius="true" :show="popupShow0" @close="hidePopup(0)">
 			<view class="tui-popup-box clearfix">
@@ -460,7 +460,7 @@
 					<view class="tui-popup-coupon">
 						<view class="tui-popup-h1">
 							<view class="tui-popup-text left">商品总额</view>
-							<view class="tui-popup-text right bold">¥{{ totalAmount | NumFormat }}</view>
+							<view class="tui-popup-text right bold">¥{{ totalOriginalPrice | NumFormat }}</view>
 						</view>
 						<view class="tui-popup-h1" v-if="reducedPrice > 0">
 							<view class="tui-popup-text left">促销满减</view>
@@ -481,7 +481,7 @@
 						<view class="tui-popup-h1">
 							<view class="tui-popup-text left bold">总价</view>
 							<view class="tui-popup-text right bold"
-								>¥{{ (totalAmount - totalDiscountAmount) | NumFormat }}</view
+								>¥{{ (totalOriginalPrice - totalDiscountAmount) | NumFormat }}</view
 							>
 						</view>
 					</view>
@@ -1051,6 +1051,7 @@ export default {
 				reducedPrice += item.reducedprice
 				originalPrice += item.originalprice
 				this.totalAmount = totalAmount
+				
 			})
 			// 总促销计算
 			this.promotionsList.forEach(promotions => {

+ 1 - 3
components/cm-module/homeIndex/quickOperation.vue

@@ -69,9 +69,7 @@ export default {
         }
     },
     watch: {},
-    mounted() {
-        console.log('this.footList', this.footList)
-    },
+    mounted() {},
     methods: {
         // 链接跳转
         NavToDetailPage(pros) {

+ 1 - 1
pages/seller/cart/cart.vue

@@ -1210,7 +1210,7 @@ page {
 				height: 28rpx;
 				border-radius: 6rpx;
 				background-color: #ffffff;
-				line-height: 28rpx;
+				line-height: 26rpx;
 				color: $color-system;
 				text-align: center;
 				display: inline-block;

+ 25 - 33
pages/seller/order/components/cm-freight-popup.vue

@@ -6,19 +6,13 @@
 				<view class="freight-left">运费:</view>
 				<view class="freight-right" @click.stop="handlePupShow">
 					<template v-if="handlePostageFlag === 0">
-						<view class="freight-text" v-if="handleSupplier.isColdChina"
-							>¥{{ handleSupplier.coldChain | NumFormat }}</view
-						>
-						<view class="freight-text" v-else>包邮</view>
+						<view class="freight-text">包邮</view>
 					</template>
 					<view class="freight-text" v-if="handlePostageFlag === 1"
 						>¥{{ handleTotalPostage | NumFormat }}</view
 					>
 					<template v-if="handlePostageFlag === 2">
-						<view class="freight-text" v-if="handleSupplier.isColdChina"
-							>¥{{ handleSupplier.coldChain | NumFormat }}</view
-						>
-						<view class="freight-text" v-else>到付</view>
+						<view class="freight-text">到付</view>
 					</template>
 					<view class="select"><text class="iconfont icon-xiayibu"></text></view>
 				</view>
@@ -40,7 +34,7 @@
 							</label>
 						</label>
 					</radio-group>
-					<template v-if="handlePostageFlag === 0">
+					<!-- <template v-if="handlePostageFlag === 0">
 						<view class="freight-form">
 							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
 								<view class="label">冷链运输费</view>
@@ -65,7 +59,7 @@
 								<view class="texts red" v-else>包邮</view>
 							</view>
 						</view>
-					</template>
+					</template> -->
 					<template v-if="handlePostageFlag === 1">
 						<view class="freight-form">
 							<view class="freight-form-item">
@@ -78,7 +72,7 @@
 									maxlength="20"
 								/>
 							</view>
-							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
+							<!-- 	<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
 								<view class="label">冷链运输费</view>
 								<view class="texts">
 									<text>¥{{ handleSupplier.coldChain | NumFormat }}</text>
@@ -97,10 +91,10 @@
 							<view class="freight-form-item">
 								<view class="label">总运费 </view>
 								<view class="texts red">¥{{ handleTotalPostage | NumFormat }} </view>
-							</view>
+							</view> -->
 						</view>
 					</template>
-					<template v-if="handlePostageFlag === 2">
+					<!-- <template v-if="handlePostageFlag === 2">
 						<view class="freight-form">
 							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
 								<view class="label">冷链运输费</view>
@@ -125,7 +119,7 @@
 								<view class="texts red" v-else>到付</view>
 							</view>
 						</view>
-					</template>
+					</template> -->
 					<view class="freight-btn" @click="handleComfirm"> 确定 </view>
 				</view>
 			</tui-bottom-popup>
@@ -148,7 +142,7 @@ export default {
 		return {
 			popupShow: false,
 			isColdChina: false,
-			handleColdChain:0,// 记录冷链费
+			handleColdChain: 0, // 记录冷链费
 			handlePostage: 0, // 记录原始运费
 			handlePostageVal: 0, // 记录修改的运费
 			handlePostageFlag: 0, //  记录运费类型
@@ -185,16 +179,12 @@ export default {
 	computed: {
 		// 计算总运费
 		handleTotalPostage() {
-			if (this.handleSupplier.isColdChina) {
-				return (this.handleSupplier.postage * 100 + this.handleSupplier.coldChain * 100) / 100
-			} else {
-				return this.handleSupplier.postage
-			}
+			return this.handleSupplier.postage			
 		}
 	},
 	watch: {
 		supplier: {
-			handler: function(el) {
+			handler(el) {
 				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
 				this.supplier = el
 			},
@@ -208,14 +198,15 @@ export default {
 			this.isColdChina = data.isColdChina
 			this.handleColdChain = data.coldChain
 			this.handleTotalPrice = data.totalPrice
-			this.handlePostage = this.handlePostageVal = data.postage
+			this.handlePostage = data.postage
+			this.handlePostageVal = data.postage + data.coldChain
 			this.handlePostageFlag = data.handlePostageFlag
-			console.log('handlePostageFlag', this.handlePostageFlag)
 			switch (this.handlePostageFlag) {
 				case 0:
 					this.radioItems[0].checked = true
 					break
 				case 1:
+					this.handleSupplier.postage = this.handleSupplier.postage + this.handleSupplier.coldChain
 					this.radioItems[1].checked = true
 					break
 				case 2:
@@ -249,29 +240,30 @@ export default {
 		radioChange($event) {
 			this.handlePostageFlag = this.handleSupplier.handlePostageFlag = $event.detail.value * 1
 			if (this.handlePostageFlag === 1) {
-				this.handleSupplier.postage = this.handlePostage
+				// 不包邮
+				this.handleSupplier.postage = this.handlePostageVal
 			} else {
 				this.handleSupplier.postage = this.handlePostage
 			}
 		},
 		// 确定运费
 		handleComfirm() {
-			if (this.handlePostageFlag === 0) {
-				let handleTotalPrice = this.isColdChina ? this.handleTotalPrice : Number(this.repiceNumSub(this.handleTotalPrice, this.handleColdChain))
-				this.handleSupplier.totalPrice = Number(this.repiceNumSub(handleTotalPrice, this.handleSupplier.postage))
-				this.$emit('changePostage', this.handleSupplier, this.index)
-			} else if (this.handlePostageFlag === 1) {
+			// 不包邮
+			if (this.handlePostageFlag === 1) {
 				if (this.handlePostageVal == 0 || !this.handlePostageVal) {
 					this.$util.msg('请填写运费', 2000)
 					return
 				}
-				this.handleSupplier.totalPrice = Number(
-					(this.handleTotalPrice * 100 - this.handlePostage * 100 + this.handlePostageVal * 100) / 100
-				)
+				let handleTotalPrice = Number(this.repiceNumSub(this.handleTotalPrice, (this.handleColdChain + this.handlePostage)))
+				if(this.handlePostageVal!== (this.handleColdChain + this.handlePostage)){
+					this.handleSupplier.isColdChina = false
+				}
 				this.handleSupplier.postage = this.handlePostageVal
+				this.handleSupplier.totalPrice = Number((handleTotalPrice * 100 + this.handlePostageVal * 100) / 100)
 				this.$emit('changePostage', this.handleSupplier, this.index)
+			// 包邮&到付	
 			} else {
-				let handleTotalPrice = this.isColdChina ? this.handleTotalPrice : Number(this.repiceNumSub(this.handleTotalPrice, this.handleColdChain))
+				let handleTotalPrice = this.isColdChina ? Number(this.repiceNumSub(this.handleTotalPrice, this.handleColdChain)) : this.handleTotalPrice
 				this.handleSupplier.totalPrice = Number(this.repiceNumSub(handleTotalPrice, this.handleSupplier.postage))
 				this.$emit('changePostage', this.handleSupplier, this.index)
 			}

+ 2 - 2
pages/seller/order/components/cm-goods-temp.vue

@@ -76,11 +76,11 @@
 					@changeColdChina="hanldChangeColdChina"
 				/>
 				<view class="goods-pros-b">
-					<view class="sum-none" v-if="supplier.originalPrice - supplier.totalPrice > 0">
+					<view class="sum-none" v-if="supplier.reducedPrice > 0">
 						<text class="money-sign">¥</text>
 						<text class="money">{{ supplier.originalPrice | NumFormat }}</text>
 						<text class="money-reduced"
-							>减<text>¥{{ (supplier.originalPrice - supplier.totalPrice) | NumFormat }}</text></text
+							>减<text>¥{{ supplier.reducedPrice | NumFormat }}</text></text
 						>
 					</view>
 					<view class="sum" v-if="secondflag"

+ 11 - 3
pages/seller/order/components/details/cm-goods-temp.vue

@@ -115,9 +115,17 @@
 						<view class="price-view-le">运费:</view>
 						<view class="price-view-ri">{{ orderInfo.postageInfo }}</view>
 					</view>
-					<view class="pros-price-view" v-if="orderInfo.eachDiscount > 0"
-						>> <view class="price-view-le">优惠:</view>
-						<view class="price-view-ri">¥{{ orderInfo.eachDiscount | NumFormat }}</view>
+					<view class="pros-price-view" v-if="orderInfo.couponAmount > 0">
+						<view class="price-view-le">优惠:</view>
+						<view class="price-view-ri">¥{{ orderInfo.couponAmount | NumFormat }}</view>
+					</view>
+					<view class="pros-price-view" v-if="orderInfo.promotionFullReduction > 0">
+						<view class="price-view-le">促销满减:</view>
+						<view class="price-view-ri">¥{{ orderInfo.promotionFullReduction | NumFormat }}</view>
+					</view>
+					<view class="pros-price-view" v-if="orderInfo.presentNum > 0">
+						<view class="price-view-le">赠品数:</view>
+						<view class="price-view-ri">¥{{ orderInfo.presentNum }}</view>
 					</view>
 					<view class="pros-price-view">
 						<view class="price-view-le">订单总额:</view>

+ 2 - 27
pages/seller/order/components/details/cm-order-temp.vue

@@ -9,19 +9,12 @@
 					</view>
 				</view>
 			</view>
-			<view class="information-view same" v-if="orderData.presentNum > 0">
-				<view class="view-man">
-					赠品总数:<label class="label">{{
-						orderData.presentNum
-					}}</label>
-				</view>
-			</view>
 			<view class="information-view">
 				<view class="view-num time">
 					下单时间:<label class="label">{{ orderData.orderTime ? orderData.orderTime : '' }}</label>
 				</view>
 			</view>
-<!-- 			<view class="information-view same" v-if="orderData.svipFullReduction > 0">
+<!-- 		<view class="information-view same" v-if="orderData.svipFullReduction > 0">
 				<view class="view-man">
 					超级会员优惠:<label class="label">¥{{ orderData.svipFullReduction | NumFormat }}</label>
 				</view>
@@ -30,25 +23,7 @@
 				<view class="view-man">
 					采美豆抵用运费:<label class="label">{{ orderData.userBeans }}</label>
 				</view>
-			</view>
-			<view class="information-view same" v-if="orderData.discountFee && orderData.discountFee > 0">
-				<view class="view-num">
-					经理折扣:<label class="label">¥{{ orderData.discountFee | NumFormat }}</label>
-				</view>
-			</view>
-			<view
-				class="information-view"
-				v-if="orderData.promotionFullReduction && orderData.promotionFullReduction > 0"
-			>
-				<view class="view-man">
-					促销满减:<label class="label">¥{{ orderData.promotionFullReduction | NumFormat }}</label>
-				</view>
-			</view>
-			<view class="information-view same">
-				<view class="view-man">
-					优惠券:<label class="label">¥{{ orderData.couponAmount | NumFormat }}</label>
-				</view>
-			</view> -->
+			</view>-->
 		</view>
 	</view>
 </template>

+ 18 - 12
pages/seller/order/create-order.vue

@@ -306,8 +306,8 @@ export default {
 				if (data.list && data.list.length > 0) {
 					this.addressData = data.list[0]
 					this.confirmParam.addressId = this.addressData.addressId
-					this.cartParam.townId = this.addressData.townId
-					this.productParam.townId = this.addressData.townId
+					this.cartParam.cityId = this.addressData.cityId
+					this.productParam.cityId = this.addressData.cityId
 				}
 				if (type === 1) {
 					//立即都买提交
@@ -368,7 +368,17 @@ export default {
 			if (this.isSubLoading) {
 				return
 			}
-			this.confirmParam.orderInfo = this.goodsData.map(el => {
+			this.confirmParam.orderInfo = this.hanldeProcessing()
+			this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
+			this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
+			this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
+			this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
+			this.isSubLoading = true
+			this.hanldeOrderSubmit(this.confirmParam)
+		},
+		// 处理数据格式
+		hanldeProcessing() {
+			return this.goodsData.map(el => {
 				let productInfo = []
 				el.cartList.forEach(pros => {
 					productInfo.push({
@@ -382,18 +392,14 @@ export default {
 					splitCode: el.splitCode,
 					shopId: el.shopId,
 					note: el.note ? el.note : '',
-					postage: parseInt(el.postage).toFixed(2),
+					postage: el.isColdChina
+						? parseInt(el.postage + el.coldChain).toFixed(2)
+						: parseInt(el.postage).toFixed(2),
 					postageFlag: parseInt(el.handlePostageFlag),
 					isColdChina: el.isColdChina ? 1 : 0,
 					productInfo: productInfo
 				}
 			})
-			this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
-			this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
-			this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
-			this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
-			this.isSubLoading = true
-			this.hanldeOrderSubmit(this.confirmParam)
 		},
 		// 提交订单
 		async hanldeOrderSubmit(params) {
@@ -555,8 +561,8 @@ export default {
 		if (currPage.data.select == 'select') {
 			let address = uni.getStorageSync('selectAddress')
 			this.confirmParam.addressId = address.addressId
-			this.cartParam.townId = address.townId
-			this.productParam.townId = address.townId
+			this.cartParam.cityId = address.cityId
+			this.productParam.cityId = address.cityId
 			this.addressData = address
 			this.ischecked = false
 			this.isRequest = false

+ 2 - 2
pages/seller/order/mixins/conMixins.js

@@ -5,14 +5,14 @@ const conMixins = {
             handleComType:0,//跳转类型
             cartParam: {
                 // 购物车立即结算确认订单参数
-                townId:'',          //地址ID
+                cityId:'',          //地址ID
                 skuIds:'',
                 serviceProviderId: 0, // 协销Id
                 clubId: 0 // 机构Id
             },
             productParam: {
                 // 商品立即购买确认订单参数
-                townId:'',          //地址ID
+                cityId:'',          //地址ID
                 productCount: 0, // 商品数量
                 productId: 0, // 商品Id
                 serviceProviderId: 0, // 协销Id

+ 14 - 11
pages/tabBar/user/user.vue

@@ -340,17 +340,19 @@
                         </view>
                     </view>
                     <view class="list-cell-item">
-                        <view class="list-cell" hover-class="cell-hover" :hover-stay-time="50">
-                            <view class="cell-icon">
-                                <image
-                                    class="cell-icon-image"
-                                    src="https://static.caimei365.com/app/img/icon/icon_club_5@2x.png"
-                                    mode=""
-                                ></image>
-                            </view>
-                            <text class="cell-tit cont">联系我们</text>
-                            <text class="cell-more cont" @click="toPhone">{{ contactNumber }}</text>
-                        </view>
+						<!-- #ifdef MP-WEIXIN -->
+						<button class="list-cell" open-type="contact" @bindcontact="handleContact">
+							<view class="cell-icon">
+							    <image
+							        class="cell-icon-image"
+							        src="https://static.caimei365.com/app/img/icon/icon_club_5@2x.png"
+							        mode=""
+							    ></image>
+							</view>
+							<text class="cell-tit"> 官方客服 </text>
+							<text class="cell-more iconfont icon-xiangyou"></text>
+						</button>
+						<!-- #endif -->
                         <view
                             class="list-cell"
                             @click="this.$api.navigateTo('/pages/user/about/about')"
@@ -1168,6 +1170,7 @@ page {
         font-size: $font-size-28;
         color: #666666;
         margin-right: 10rpx;
+		text-align: left;
         &.cont {
             width: 300rpx;
         }

+ 24 - 19
pages/user/order/components/cm-freight-popup.vue

@@ -5,15 +5,17 @@
 			<template v-if="supplier.postageFlag === 0">
 				<view class="freight-main">
 					<view class="freight-left">运费:</view>
-					<view class="freight-right"> <view class="freight-text">包邮</view> </view>
+					<view class="freight-right"><view class="freight-text">包邮</view></view>
 				</view>
 			</template>
 			<template v-if="supplier.postageFlag === 1 && supplier.designatedFlag === 1">
 				<view class="freight-main">
 					<view class="freight-left">运费:</view>
-					<view class="freight-right" @click.stop="handlePupShow">
+					<view class="freight-right">
 						<view class="freight-text">¥{{ handleTotalPostage | NumFormat }}</view>
-						<view class="select"><text class="iconfont icon-xiayibu"></text></view>
+						<view class="select" v-if="supplier.coldChain > 0" @click="handlePupShow">
+							<text class="iconfont icon-xiayibu"></text>
+						</view>
 					</view>
 				</view>
 			</template>
@@ -23,17 +25,21 @@
 						(supplier.postageFlag === 1 && supplier.designatedFlag === 3)
 				"
 			>
-				<view class="freight-main">
+				<view class="freight-main"> 
 					<view class="freight-left">运费:</view>
-					<view class="freight-right" @click.stop="handlePupShow">
+					<view class="freight-right">
 						<template v-if="handlePostageFlag === 1">
 							<view class="freight-text">¥{{ handleTotalPostage | NumFormat }}</view>
 						</template>
 						<template v-if="handlePostageFlag === 2">
-							<view v-if="handleSupplier.isColdChina" class="freight-text" >¥{{ handleTotalPostage | NumFormat }}</view>
+							<view v-if="handleSupplier.isColdChina" class="freight-text"
+								>¥{{ handleTotalPostage | NumFormat }}</view
+							>
 							<view v-else class="freight-text">到付</view>
 						</template>
-						<view class="select"><text class="iconfont icon-xiayibu"></text></view>
+						<view class="select" v-if="supplier.coldChain > 0" @click="handlePupShow">
+							<text class="iconfont icon-xiayibu"></text>
+						</view>
 					</view>
 				</view>
 			</template>
@@ -46,7 +52,7 @@
 			<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup">
 				<view class="freight-title">运费设置</view>
 				<view class="freight-content">
-					<radio-group @change="radioChange" v-if="handleDesignatedFlag!=1">
+					<!-- <radio-group @change="radioChange" v-if="handleDesignatedFlag != 1">
 						<label v-for="(item, index) in radioItems" :key="index">
 							<radio
 								style="transform:scale(0.7)"
@@ -54,12 +60,12 @@
 								:id="item.value"
 								:value="item.value"
 								:checked="item.checked"
-							></radio>
+							/>
 							<label :for="item.value" class="label">
 								<text>{{ item.name }}</text>
 							</label>
 						</label>
-					</radio-group>
+					</radio-group> -->
 					<template v-if="handlePostageFlag === 1">
 						<view class="freight-form">
 							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
@@ -74,7 +80,7 @@
 									</text>
 								</view>
 							</view>
-							<view class="freight-form-item" v-if="handleDesignatedFlag!=1">
+							<view class="freight-form-item" v-if="handleDesignatedFlag != 1">
 								<view class="label">其他运费 </view>
 								<view class="texts red">¥{{ handleSupplier.postage | NumFormat }} </view>
 							</view>
@@ -132,19 +138,19 @@ export default {
 		return {
 			popupShow: false,
 			isColdChina: false,
-			handlePostage:0,
+			handlePostage: 0,
 			handlePostageFlag: 1,
-			handleDesignatedFlag:0,
+			handleDesignatedFlag: 0,
 			radioItems: [
 				{
 					name: '不包邮',
 					value: 1,
 					checked: true
-				},
-				{
-					name: '到付',
-					value: 2
 				}
+				// 	{
+				// 		name: '到付',
+				// 		value: 2
+				// 	}
 			],
 			handleSupplier: {}
 		}
@@ -206,7 +212,7 @@ export default {
 		radioChange($event) {
 			// const postage = this.isColdChina ? ( this.handleSupplier.postage + this.handleSupplier.coldChain ) : this.handleSupplier.postage
 			this.handlePostageFlag = this.handleSupplier.handlePostageFlag = $event.detail.value * 1
-			console.log('handlePostageFlag',this.handlePostageFlag)
+			console.log('handlePostageFlag', this.handlePostageFlag)
 			if (this.handlePostageFlag === 1) {
 				this.handleSupplier.postage = this.handlePostage
 				this.handleSupplier.totalPrice = Number(
@@ -218,7 +224,6 @@ export default {
 					this.repiceNumSub(this.handleSupplier.totalPrice, this.handleSupplier.postage)
 				)
 				this.handleSupplier.postage = 0
-				console.log('2222222222',this.handleSupplier.totalPrice)
 				this.$emit('changePostage', this.handleSupplier, this.index)
 			}
 		},

+ 2 - 2
pages/user/order/components/cm-goods-temp.vue

@@ -75,11 +75,11 @@
 					@changeColdChina="hanldChangeColdChina"
 				/>
 				<view class="goods-pros-b">
-					<view class="sum-none" v-if="supplier.originalPrice - supplier.totalPrice > 0">
+					<view class="sum-none" v-if="supplier.reducedPrice > 0">
 						<text class="money-sign">¥</text>
 						<text class="money">{{ supplier.originalPrice | NumFormat }}</text>
 						<text class="money-reduced"
-							>减<text>¥{{ (supplier.originalPrice - supplier.totalPrice) | NumFormat }}</text></text
+							>减<text>¥{{ supplier.reducedPrice  | NumFormat }}</text></text
 						>
 					</view>
 					<view class="sum"

+ 10 - 2
pages/user/order/components/details/cm-goods-temp.vue

@@ -115,9 +115,17 @@
 						<view class="price-view-le">运费:</view>
 						<view class="price-view-ri">{{ orderInfo.postageInfo }}</view>
 					</view>
-					<view class="pros-price-view" v-if="orderInfo.eachDiscount > 0">
+					<view class="pros-price-view" v-if="orderInfo.couponAmount > 0">
 						<view class="price-view-le">优惠:</view>
-						<view class="price-view-ri">¥{{ orderInfo.eachDiscount | NumFormat }}</view>
+						<view class="price-view-ri">¥{{ orderInfo.couponAmount | NumFormat }}</view>
+					</view>
+					<view class="pros-price-view" v-if="orderInfo.promotionFullReduction > 0">
+						<view class="price-view-le">促销满减:</view>
+						<view class="price-view-ri">¥{{ orderInfo.promotionFullReduction | NumFormat }}</view>
+					</view>
+					<view class="pros-price-view" v-if="orderInfo.presentNum > 0">
+						<view class="price-view-le">赠品数:</view>
+						<view class="price-view-ri">¥{{ orderInfo.presentNum }}</view>
 					</view>
 					<view class="pros-price-view">
 						<view class="price-view-le">订单总额:</view>

+ 2 - 27
pages/user/order/components/details/cm-order-temp.vue

@@ -9,19 +9,12 @@
 					</view>
 				</view>
 			</view>
-			<view class="information-view same" v-if="orderData.presentNum > 0">
-				<view class="view-man">
-					赠品总数:<label class="label">{{
-						orderData.presentNum
-					}}</label>
-				</view>
-			</view>
 			<view class="information-view">
 				<view class="view-num time">
 					下单时间:<label class="label">{{ orderData.orderTime ? orderData.orderTime : '' }}</label>
 				</view>
 			</view>
-<!-- 			<view class="information-view same" v-if="orderData.svipFullReduction > 0">
+ 		<!--<view class="information-view same" v-if="orderData.svipFullReduction > 0">
 				<view class="view-man">
 					超级会员优惠:<label class="label">¥{{ orderData.svipFullReduction | NumFormat }}</label>
 				</view>
@@ -30,25 +23,7 @@
 				<view class="view-man">
 					采美豆抵用运费:<label class="label">{{ orderData.userBeans }}</label>
 				</view>
-			</view>
-			<view class="information-view same" v-if="orderData.discountFee && orderData.discountFee > 0">
-				<view class="view-num">
-					经理折扣:<label class="label">¥{{ orderData.discountFee | NumFormat }}</label>
-				</view>
-			</view>
-			<view
-				class="information-view"
-				v-if="orderData.promotionFullReduction && orderData.promotionFullReduction > 0"
-			>
-				<view class="view-man">
-					促销满减:<label class="label">¥{{ orderData.promotionFullReduction | NumFormat }}</label>
-				</view>
-			</view>
-			<view class="information-view same">
-				<view class="view-man">
-					优惠券:<label class="label">¥{{ orderData.couponAmount | NumFormat }}</label>
-				</view>
-			</view> -->
+			</view>-->
 		</view>
 	</view>
 </template>

+ 21 - 15
pages/user/order/create-order.vue

@@ -260,9 +260,9 @@ export default {
 				if (data.list && data.list.length > 0) {
 					this.addressData = data.list[0]
 					this.confirmParam.addressId = this.addressData.addressId
-					this.cartParam.townId = this.addressData.townId
-					this.productParam.townId = this.addressData.townId
-					this.supportParm.townId = this.addressData.townId
+					this.cartParam.cityId = this.addressData.cityId
+					this.productParam.cityId = this.addressData.cityId
+					this.supportParm.cityId = this.addressData.cityId
 				}
 				if (type === 1) {
 					//立即都买提交
@@ -474,7 +474,18 @@ export default {
 				this.$util.msg('请先添加收货地址~', 2000)
 				return
 			}
-			this.confirmParam.orderInfo = this.goodsData.map(el => {
+			this.confirmParam.orderInfo = this.hanldeProcessing()
+			this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
+			this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
+			this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
+			this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
+			console.log(this.confirmParam)
+			this.isSubLoading = true
+			this.hanldeOrderSubmit(this.confirmParam)
+		},
+		// 处理数据格式
+		hanldeProcessing() {
+			return this.goodsData.map(el => {
 				let productInfo = []
 				el.cartList.forEach(pros => {
 					productInfo.push({
@@ -488,19 +499,14 @@ export default {
 					splitCode: el.splitCode,
 					shopId: el.shopId,
 					note: el.note ? el.note : '',
-					postage: parseInt(el.postage).toFixed(2),
+					postage: el.isColdChina
+						? parseInt(el.postage + el.coldChain).toFixed(2)
+						: parseInt(el.postage).toFixed(2),
 					postageFlag: parseInt(el.handlePostageFlag),
 					isColdChina: el.isColdChina ? 1 : 0,
 					productInfo: productInfo
 				}
 			})
-			this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
-			this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
-			this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
-			this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
-			console.log(this.confirmParam)
-			this.isSubLoading = true
-			this.hanldeOrderSubmit(this.confirmParam)
 		},
 		// 提交订单
 		async hanldeOrderSubmit(params) {
@@ -683,9 +689,9 @@ export default {
 		if (currPage.data.select == 'select') {
 			let address = uni.getStorageSync('selectAddress')
 			this.confirmParam.addressId = address.addressId
-			this.cartParam.townId = address.townId
-			this.productParam.townId = address.townId
-			this.supportParm.townId = address.townId
+			this.cartParam.cityId = address.cityId
+			this.productParam.cityId = address.cityId
+			this.supportParm.cityId = address.cityId
 			this.addressData = address
 			this.ischecked = false
 			this.isRequest = false

+ 5 - 5
pages/user/order/mixins/conMixins.js

@@ -5,14 +5,14 @@ const conMixins = {
             handleComType:0,//跳转类型
             cartParam: {
                 // 购物车立即结算确认订单参数
-                townId:'',          //地址ID
+                cityId:'',          //地址ID
                 skuIds: 0, // 商品Id(逗号隔开)
                 source: 2, // 来源:1WWW 2小程序
                 userId: 0 // 用户Id
             },
             productParam: {
                 // 商品立即购买确认订单参数
-                townId:'',          //地址ID
+                cityId:'',          //地址ID
                 productCount: 0, // 商品数量
                 productId: 0, // 商品Id
                 source: 2, // 来源:1WWW 2小程序
@@ -20,7 +20,7 @@ const conMixins = {
             },
             supportParm: {
                 // 组合商品立即购买确认订单参数
-                townId:'',          //地址ID
+                cityId:'',          //地址ID
                 productInfo: '',
                 source: 2, // 来源:1WWW 2小程序
                 userId: 0 // 用户Id
@@ -84,11 +84,11 @@ const conMixins = {
                 if (this.userMoney >= this.orderTotalPrice) {
                     this.orderShouldPayFee =0.0
                     this.deductMoney = this.orderTotalPrice// 当前使用金额等于订单金额
-                    console.log('最终订单支付金额00001', this.orderShouldPayFee)
+                    console.log('最终订单支付金额', this.orderShouldPayFee)
                 } else {
                     this.orderShouldPayFee = this.orderTotalPrice - this.userMoney // 订单最终支付金额等于订单金额-账户余额
                     this.deductMoney = this.userMoney // 当前使用金额等于总余额
-                    console.log('最终订单支付金额00002', this.orderShouldPayFee)
+                    console.log('最终订单支付金额', this.orderShouldPayFee)
                 }
                 console.log('余额抵扣最终订单支付金额', this.orderShouldPayFee)
             } else {

+ 27 - 5
pages/user/order/order-pay-list.vue

@@ -4,7 +4,10 @@
 			<view class="pay-list" v-for="(list, index) in list" :key="index">
 				<view class="pay-list-title">{{ list.shopName }}</view>
 				<view class="pay-list-goods" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
-					<view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
+					<view class="pay-list-image"> 
+						<image :src="pros.image" class="image" mode=""></image> 
+						<text class="tips" v-if="pros.giftType == 2 || pros.giftType == 1">赠品</text>
+					</view>
 					<view class="pay-list-info">
 						<view class="info-title">{{ pros.name }}</view>
 						<view class="info-view" v-if="pros.productUnit != ''">
@@ -22,6 +25,14 @@
 						<text class="text"> {{ list.postageInfo }}</text>
 					</view>
 				</view>
+				<view class="pay-list-msg" v-if="list.couponAmount > 0">
+					<view class="list-label">优惠:</view>
+					<view class="list-msg">¥{{ list.couponAmount | NumFormat }}</view>
+				</view>
+				<view class="pay-list-msg" v-if="list.promotionFullReduction > 0">
+					<view class="list-label">促销满减:</view>
+					<view class="list-msg">¥{{ list.promotionFullReduction | NumFormat }}</view>
+				</view>
 				<view class="pay-list-msg">
 					<view class="list-label">已付:</view>
 					<view class="list-msg">
@@ -31,10 +42,6 @@
 						</text>
 					</view>
 				</view>
-				<view class="pay-list-msg" v-if="list.eachDiscount > 0">
-					<view class="list-label">优惠:</view>
-					<view class="list-msg">¥{{ list.shopeachDiscountPostFee | NumFormat }}</view>
-				</view>
 				<view class="pay-list-msg">
 					<view class="list-label">待付:</view>
 					<view class="list-msg"><text class="text red"> ¥{{ list.obligation | NumFormat }}</text></view>
@@ -152,6 +159,21 @@ page {
 				border-radius: 8rpx;
 				float: left;
 				margin-right: 13rpx;
+				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: 100%;
 					height: 100%;