Ver código fonte

commit -m 提交订单

zhengjinyi 2 anos atrás
pai
commit
0c72503e6a
2 arquivos alterados com 1016 adições e 1014 exclusões
  1. 31 38
      pages/seller/order/create-order.vue
  2. 985 976
      pages/user/order/create-order.vue

+ 31 - 38
pages/seller/order/create-order.vue

@@ -211,6 +211,7 @@
 				},	
 				confirmParam: {// 提交订单参数
 					cartType:3, 		// 购买类型:(1自主下单, 3协销下单)
+					orderMiniType:0,    // 订单提交状态 0初始提交 1 继续提交
 					orderSource:6,		// 订单来源 1WWW 6小程序[采美,星范]
 					addressId:0,		// 收货地址Id
 					clubCouponId:0,		// 关联优惠券Id
@@ -517,46 +518,14 @@
 					})
 					return {splitCode:el.splitCode,shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
 				})
-				console.log('confirmParam1',this.confirmParam)
 				this.confirmParam.payInfo.postage = parseInt(this.handleFreightData.postage).toFixed(2)
 				this.confirmParam.payInfo.postageFlag = parseInt(this.handleFreightData.postageFlag)
 				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('confirmParam',this.confirmParam)
 				this.isSubLoading = true	
-				this.hanldeOrderVerify(this.confirmParam)
-			},
-			hanldeOrderVerify(params){// 校验购买资质的验证
-				console.log('params',params)
-				this.OrderService.createdOrderCerify(params).then(response =>{
-					if(response.data.code === -1){
-						this.modal = true
-						this.showModalstauts = 2
-						this.isSubLoading = false
-						this.contentModalText = '订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。'  //操作文字提示语句
-						this.modalButton=[
-							{
-								text: '取消',
-								type: 'gray',
-								plain: true //是否空心
-							},
-							{
-								text: '继续提交',
-								customStyle: {
-									color: '#fff',
-									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-								},
-								plain: false
-							}
-						]
-					}else{
-						this.hanldeOrderSubmit(params)
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
+				this.hanldeOrderSubmit(this.confirmParam)
 			},
 			hanldeOrderSubmit(params){// 提交订单
 				this.SellerService.SellerCreateOrderSubmit(params).then(response =>{
@@ -576,12 +545,34 @@
 					}
 				}).catch(error =>{
 					this.isSubLoading = false
-					this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
-					this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
-					this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
-					this.$util.msg(error.msg,2000)
+					this.handleError(error)
 				})
 			},
+			handleError(data){// 提交订单异常处理
+				this.formatConfirmParam()
+				const buttonMap = {
+						1:{
+							contentModalText :  '订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。',
+							modalButton :  [
+								{ text: '取消',  type: 'gray', plain: true },
+								{ text: '继续提交', customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },plain: false }
+							]
+						}
+				}
+				if(data.code === -6){// 非医美机构下三类商品订单
+					this.modal = true
+					this.showModalstauts = 2
+					this.contentModalText = buttonMap[1].contentModalText
+					this.modalButton= buttonMap[1].modalButton
+				}else{
+					this.$util.msg(error.msg,3000)
+				}
+			},
+			formatConfirmParam(){// 还原提交订单参数格式
+				this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
+				this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
+				this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
+			},
 			handleRebateFlag(){// 普通订单返佣
 				let self = this
 				uni.showActionSheet({
@@ -631,11 +622,13 @@
 				//确认提交
 				if (e.index == 1) {
 					if(this.showModalstauts == 2){
-						this.hanldeOrderSubmit(this.confirmParam)
+						this.confirmParam.orderMiniType = 2
+						this.SellerCreateOrderSubmit()
 					}else{
 						this.SellerCreateOrderSubmit()
 					}
 				}
+				this.confirmParam.orderMiniType = 0
 				this.modal = false
 			},
 			handleSecondFlag(){// 二手订单勾选返佣

+ 985 - 976
pages/user/order/create-order.vue

@@ -1,30 +1,40 @@
 <template>
-	<view class="container order clearfix" :style="{paddingBottom :isIphoneX ? '170rpx' : '134rpx'}">
+	<view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '170rpx' : '134rpx' }">
 		<!-- 地址选择 -->
 		<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
 		<!-- 商品 -->
-		<goods-list ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></goods-list>
+		<goods-list
+			ref="goods"
+			v-if="isRequest"
+			:goodsData="goodsData"
+			@handleGoodList="handChangeInputGoodsList"
+		></goods-list>
 		<!-- 发票信息 -->
-		<invoice-tent ref="invoice"
-					  v-if="isRequest"
-					  :invoiceDatas="invoiceData"
-					  @handleChoiceaInvoice="handleChoiceaInvoiceData">
+		<invoice-tent
+			ref="invoice"
+			v-if="isRequest"
+			:invoiceDatas="invoiceData"
+			@handleChoiceaInvoice="handleChoiceaInvoiceData"
+		>
 		</invoice-tent>
 		<!-- 优惠券选择弹窗 -->
-		<coupon ref="coupon" 
-				v-if="isCouponShow"
-				:couponList="couponList" 
-				@handleChoiceaCoupon="handleChoiceaCouponData">
+		<coupon
+			ref="coupon"
+			v-if="isCouponShow"
+			:couponList="couponList"
+			@handleChoiceaCoupon="handleChoiceaCouponData"
+		>
 		</coupon>
 		<!-- 兑换优惠券弹窗 -->
 		<exchangeCoupon v-if="isExchangePopup"></exchangeCoupon>
 		<!-- 运费 -->
-		<freight ref="freight"
-				 v-if="isFreight"
-				 :freightData="freightData"
-				 @confirmFreight="hanldFreightFn"
-				 @confirmFreightBeans = "hanldFreightBeans"
-				 >
+		<freight
+			ref="freight"
+			v-if="isFreight"
+			:freightData="freightData"
+			@confirmFreight="hanldFreightFn"
+			@confirmFreightBeans="hanldFreightBeans"
+		>
 		</freight>
 		<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
 		<!-- 余额抵扣 -->
@@ -33,58 +43,70 @@
 				<view class="balabce-t-le">余额抵扣</view>
 				<view class="balabce-t-ri">
 					<view class="money">
-						<text>可用余额:</text>
-						<text>¥{{userMoney | NumFormat}}</text>
+						<text>可用余额:</text> <text>¥{{ userMoney | NumFormat }}</text>
 					</view>
 					<view class="checkbox-box">
-						<button class="checkbox iconfont"
-								hover-class="btn-hover"
-								v-if="userMoney!=0"
-								@click.stop="checkedBalabce"
-								:class="[ischecked ?'icon-yixuanze':'icon-weixuanze']"
-						> 
-						</button>
+						<button
+							class="checkbox iconfont"
+							hover-class="btn-hover"
+							v-if="userMoney != 0"
+							@click.stop="checkedBalabce"
+							:class="[ischecked ? 'icon-yixuanze' : 'icon-weixuanze']"
+						></button>
 					</view>
 				</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%)'}">
-					<text>当前使用:¥{{deductMoney | NumFormat}},剩余:¥{{surplusMoney | NumFormat}}</text>
+			<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%)'
+					}"
+				>
+					<text>当前使用:¥{{ deductMoney | NumFormat }},剩余:¥{{ surplusMoney | NumFormat }}</text>
 				</view>
 			</view>
 		</view>
-		<!-- 底部 --> 
-		<view class="footer-wrapper" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
-            <cm-return-instructions v-if="returnGoodsStutas" :content="helpContent" @change="onAgreementChange"></cm-return-instructions>
-            <view class="footer">
-                <view class="footer-le">
-                	<view class="footer-count">
-                		<text>共{{ totalCount }}件商品</text>
-                	</view>
-                	<view class="footer-price">
-                		<view class="sum" :class="totalDiscountAmount == 0 ? 'none' : ''">
-                			总价:<text class="price">¥{{ orderShouldPayFee | NumFormat }}</text>
-                		</view>
-                		<view class="sum-none" v-if="totalDiscountAmount > 0">
-                			<text class="money-reduced">共减<text>¥{{ totalDiscountAmount  | NumFormat}}</text></text>
-                		</view>
-                	</view>
-                </view>
-                <view class="footer-submit" @click.stop="orderSubmitMit">
-                	<view class="btn" :class="isSubLoading ? 'disabled' : ''" >提交订单</view>
-                </view>
-            </view>
+		<!-- 底部 -->
+		<view class="footer-wrapper" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
+			<cm-return-instructions
+				v-if="returnGoodsStutas"
+				:content="helpContent"
+				@change="onAgreementChange"
+			></cm-return-instructions>
+			<view class="footer">
+				<view class="footer-le">
+					<view class="footer-count">
+						<text>共{{ totalCount }}件商品</text>
+					</view>
+					<view class="footer-price">
+						<view class="sum" :class="totalDiscountAmount == 0 ? 'none' : ''">
+							总价:<text class="price">¥{{ orderShouldPayFee | NumFormat }}</text>
+						</view>
+						<view class="sum-none" v-if="totalDiscountAmount > 0">
+							<text class="money-reduced"
+								>共减<text>¥{{ totalDiscountAmount | NumFormat }}</text></text
+							>
+						</view>
+					</view>
+				</view>
+				<view class="footer-submit" @click.stop="orderSubmitMit">
+					<view class="btn" :class="isSubLoading ? 'disabled' : ''">提交订单</view>
+				</view>
+			</view>
 		</view>
 		<!-- 优惠券 -->
 		<view class="coupon-content-model" v-if="isCouponModel">
 			<view class="coupon-alert-content">
 				<view class="coupon">
 					<view class="coupon-list">
-						<view class="list-cell-tags"><text>{{ ExchangeCouponData.couponType | TypeFormat }}</text></view>
+						<view class="list-cell-tags"
+							><text>{{ ExchangeCouponData.couponType | TypeFormat }}</text></view
+						>
 						<view class="list-cell-le">
 							<view class="coupon-maxMoney">
-								<text class="small">¥</text>
-								{{ ExchangeCouponData.couponAmount }}
+								<text class="small">¥</text> {{ ExchangeCouponData.couponAmount }}
 							</view>
 							<view class="coupon-minMoney">
 								<text class="txt">满{{ ExchangeCouponData.touchPrice }}可用</text>
@@ -93,15 +115,29 @@
 						<view class="list-cell-ri">
 							<view class="list-cell-top">
 								<text v-if="ExchangeCouponData.couponType == 0">
-									{{ ExchangeCouponData.productType && ExchangeCouponData.productType == 1 ? '全商城商品通用' : '仅可购买指定商品'  }}
+									{{
+										ExchangeCouponData.productType && ExchangeCouponData.productType == 1
+											? '全商城商品通用'
+											: '仅可购买指定商品'
+									}}
 								</text>
 								<text v-if="ExchangeCouponData.couponType == 1">
-									{{ ExchangeCouponData.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
+									{{
+										ExchangeCouponData.categoryType == 1
+											? '仅限购买产品类商品'
+											: '仅限购买仪器类商品'
+									}}
 								</text>
-								<text v-if="ExchangeCouponData.couponType == 3">仅限购买店铺【{{ ExchangeCouponData.shopName }}】的商品</text>
-								<text v-if="ExchangeCouponData.couponType == 4 || ExchangeCouponData.couponType == 2">全商城商品通用</text>
+								<text v-if="ExchangeCouponData.couponType == 3"
+									>仅限购买店铺【{{ ExchangeCouponData.shopName }}】的商品</text
+								>
+								<text v-if="ExchangeCouponData.couponType == 4 || ExchangeCouponData.couponType == 2"
+									>全商城商品通用</text
+								>
 							</view>
-							<view class="list-cell-time">{{ ExchangeCouponData.startDate }} - {{ ExchangeCouponData.endDate }}</view>
+							<view class="list-cell-time"
+								>{{ ExchangeCouponData.startDate }} - {{ ExchangeCouponData.endDate }}</view
+							>
 						</view>
 					</view>
 					<view class="coupon-btn" @click.stop="handleClickCancel">立即收下</view>
@@ -110,1018 +146,991 @@
 		</view>
 		<!-- 提示弹窗 -->
 		<tui-modal
-		   :show="showModal"
-		   @click="handleClick"
-		   @cancel="hideMobel"
-		   :content="contentModalText"
-		   :button="modalButton"
-		   color="#333"
-		   :size="28"
-		   shape="circle"
-		   :maskClosable="false"
+			:show="showModal"
+			@click="handleClick"
+			@cancel="hideMobel"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="28"
+			shape="circle"
+			:maskClosable="false"
+		></tui-modal>
+
+		<tui-modal
+			:show="agreementModel"
+			title="提示"
+			content="请先阅读《特殊商品退货须知》并勾选后再提交订单~"
+			shape="circle"
+			color="#333"
+			:size="28"
+			:button="agreementModelButtons"
+			@click="agreementModel = false"
 		></tui-modal>
-        
-        <tui-modal 
-            :show="agreementModel" 
-            title="提示" 
-            content="请先阅读《特殊商品退货须知》并勾选后再提交订单~" 
-            shape="circle" 
-            color="#333" 
-            :size="28" 
-            :button="agreementModelButtons"  
-            @click="agreementModel = false"
-        ></tui-modal>
 	</view>
 </template>
 <script>
-	import { mapState, mapMutations } from 'vuex'
-	import choiceAddress from './components/choiceAddress'
-	import goodsList from './components/goodsList'
-	import invoiceTent from './components/invoiceTent'
-	import coupon from './components/coupon'
-	import exchangeCoupon from './components/exchangeCoupon'
-	import freight from './components/freight'
-    import cmReturnInstructions from './components/cm-return-instructions.vue'
-	import freightAlert from '@/components/cm-module/modelAlert/freightAlert'
-	export default {
-		components:{
-			choiceAddress,
-			goodsList,
-			invoiceTent,
-			coupon,
-			exchangeCoupon,
-			freight,
-			freightAlert,
-            cmReturnInstructions
-		},
-		data() {
-			return {
-				isIphoneX:this.$store.state.isIphoneX,
-				isSubLoading:false,
-				confirmType:1,
-				orderID:0,
-				cartParam: {// 购物车立即结算确认订单参数
-					skuIds:0,		// 商品Id(逗号隔开)
-					source:2,			// 来源:1WWW 2小程序
-					userId:0			// 用户Id
-				}, 		
-				productParam: {// 商品立即购买确认订单参数
-					productCount:0, 	// 商品数量
-					productId:0,		// 商品Id
-					source:2,			// 来源:1WWW 2小程序
-					userId:0			// 用户Id
-				}, 	
-				supportParm:{// 组合商品立即购买确认订单参数
-					productInfo:'',
-					source:2,			// 来源:1WWW 2小程序
-					userId:0			// 用户Id
-				},
-				postageParam: {// 邮费计算参数
-					skuIds:0,		// 商品Id(逗号隔开)
-					userId:0,			// 用户Id
-					townId:0			// 地区Id
-				},	
-				confirmParam: {
-					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
-				}, 	// 提交订单参数
-				productIds:'',			  // 获取上一级页面商品信息
-				submitState:'',  		  // 提交状态
-				totalCount:1,			  // 订单提交总数量
-				reducedPrice:0,			  // 满减金额
-				couponAmount:0,	  		  // 优惠券金额
-				totalDiscountAmount:0,	  // 共减金额
-				allPrice:0.00,			  // 订单总金额
-				orderShouldPayFee:0,	  // 订单最终支付金额
-				surplusMoney:0.00,		  // 显示勾选后的剩余抵扣
-				userMoney:0.00,			  // 显示可使用余额
-				deductMoney:0.00,		  // 显示已使用的余额
-				isRequest:false,		  // 是否加载完成渲染子组件
-				isFreight:false,		  // 是否加载完成渲染子组件
-				isAddress:false,		  // 是否加载完成地址
-				isExchangePopup:false, 	  // 控制兑换优惠券弹窗
-				isfreightTip:false,		  // 控制邮费弹窗
-				ischecked:false,	      // 是否勾选余额
-				hanldFreePostFlag:'',	  // 邮费状态
-				hanldFreight:'',		  // 邮费
-				addressData:{},			  // 初始化地址信息
-				goodsData:[],			  // 初始化商品信息
-				couponList:[],		  	  // 初始化优惠券信息
-				invoiceData:{type:0},	  // 初始化发票信息
-				freightData:{},			  // 邮费数据
-				orderInfo:[],			  // 提交的商品信息
-				rechargeGoods:null,		  // 判断订单里有定金商品或者充值商品时,余额抵扣部分不显示
-				freightBeansMoney:0,	  // 存储采美豆抵扣金额
-				isCouponShow:false,		  // 是否显示可选优惠券
-				isCheckedBeans:false,     // 是否抵扣采美豆
-				isCouponModel:false,	  // 兑换优惠券成功提示
-				ExchangeCouponData:{},	  // 兑换优惠券信息
-				contentModalText: '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。',     //操作文字提示语句
-				modalButton: [
-					{
-						text: '前往颜选美学',
-						type: 'gray',
-						plain: true //是否空心
-					},
-					{
-						text: '继续提交',
-						customStyle: {
-							color: '#fff',
-							bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-						},
-						plain: false
-					}
-				],
-				showModal: false,
-				showModalstauts:0,
-                returnGoodsStutas: false,
-                helpContent: '',
-                agreementActive: false,
-                agreementModel: false,
-                agreementModelButtons: [{
-                    text: '确定',
-                    customStyle: {
-                        color: '#fff',
-                        bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-                    },
-                    plain: false
-                }]
-			}
-		},
-		onLoad(option){//商品数据
-			this.initStorage(option)
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2)
+import { mapState, mapMutations } from 'vuex'
+import choiceAddress from './components/choiceAddress'
+import goodsList from './components/goodsList'
+import invoiceTent from './components/invoiceTent'
+import coupon from './components/coupon'
+import exchangeCoupon from './components/exchangeCoupon'
+import freight from './components/freight'
+   import cmReturnInstructions from './components/cm-return-instructions.vue'
+import freightAlert from '@/components/cm-module/modelAlert/freightAlert'
+export default {
+	components:{
+		choiceAddress,
+		goodsList,
+		invoiceTent,
+		coupon,
+		exchangeCoupon,
+		freight,
+		freightAlert,
+           cmReturnInstructions
+	},
+	data() {
+		return {
+			isIphoneX:this.$store.state.isIphoneX,
+			isSubLoading:false,
+			confirmType:1,
+			orderID:0,
+			cartParam: {// 购物车立即结算确认订单参数
+				skuIds:0,		// 商品Id(逗号隔开)
+				source:2,			// 来源:1WWW 2小程序
+				userId:0			// 用户Id
 			},
-		},	
-		methods: {
-            onAgreementChange(val){
-                this.agreementActive = val
-            },
-			async initStorage(option){
-				const data = JSON.parse(option.data)
-				const userInfo = await this.$api.getStorage()
-				console.log('data',data)
-				this.productParam.userId = 
-				this.cartParam.userId = 
-				this.supportParm.userId = 
-				this.postageParam.userId = userInfo.userId ? userInfo.userId : 0
-				this.confirmParam.clubId = userInfo.clubId ? userInfo.clubId : 0
-				switch(option.type){
-					case '1':// 商品详情立即购买
-						this.confirmParam.cartType = 2
-						this.productParam.productCount = data.data.productCount
-						this.productParam.productId = data.data.productIds
-						this.productParam.skuId = data.data.skuId
-						this.productIds = data.data.productIds
-						this.GetProductCreateOrderInfo()
-						break
-					case '2':// 购物车结算
-						this.confirmParam.cartType = 1
-						this.confirmType = 2
-						this.cartParam.skuIds = data.data.skuIds
-						this.CartCreateOrderInfo()
-						break
-					case '3':// 组合商品立即购买
-						this.confirmParam.cartType = 2
-						this.confirmType = 2
-						this.supportParm.productInfo = JSON.stringify(data.data) 
-						this.GetOrderClubProductSupporting()
-				}
+			productParam: {// 商品立即购买确认订单参数
+				productCount:0, 	// 商品数量
+				productId:0,		// 商品Id
+				source:2,			// 来源:1WWW 2小程序
+				userId:0			// 用户Id
 			},
-			GetProductCreateOrderInfo(){// 商品立即购买确认订单数据初始化
-				this.OrderService.ProductCreateOrderInfo(this.productParam).then(response =>{
-					this.setCreatDataInfo(response.data)
-				})
-				.catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
+			supportParm:{// 组合商品立即购买确认订单参数
+				productInfo:'',
+				source:2,			// 来源:1WWW 2小程序
+				userId:0			// 用户Id
 			},
-			GetOrderClubProductSupporting(){// 组合商品立即购买确认订单数据初始化
-				this.OrderService.OrderClubProductSupporting(this.supportParm).then(response =>{
-					this.setCreatDataInfo(response.data)
-				})
-				.catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			CartCreateOrderInfo(){// 购物车去结算确认订单数据初始化
-				this.OrderService.CartCreateOrderInfo(this.cartParam).then(response =>{
-					this.setCreatDataInfo(response.data)
-				})
-				.catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
+			postageParam: {// 邮费计算参数
+				skuIds:0,		// 商品Id(逗号隔开)
+				userId:0,			// 用户Id
+				townId:0			// 地区Id
 			},
-			setCreatDataInfo(data){// 公共初始化数据
-				this.isRequest = true
-				this.goodsData = data.list
-				this.couponList = data.couponList
-				this.userMoney = data.userMoney
-				this.reducedPrice = data.reducedPrice
-				this.totalCount = data.totalCount
-				this.allPrice = data.totalPrice
-				this.rechargeGoods = data.rechargeGoods
-				if(this.couponList.length>0){
-					this.isCouponShow = true
-					this.couponAmount = data.couponList[0].couponAmount
-					this.confirmParam.clubCouponId = data.couponList[0].clubCouponId 
+			confirmParam: {
+				cartType:1, 		// 购买类型:(1自主下单, 3协销下单)
+				orderMiniType:0,    // 订单提交状态 0初始提交 1 继续提交
+				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
+			}, 	// 提交订单参数
+			productIds:'',			  // 获取上一级页面商品信息
+			submitState:'',  		  // 提交状态
+			totalCount:1,			  // 订单提交总数量
+			reducedPrice:0,			  // 满减金额
+			couponAmount:0,	  		  // 优惠券金额
+			totalDiscountAmount:0,	  // 共减金额
+			allPrice:0.00,			  // 订单总金额
+			orderShouldPayFee:0,	  // 订单最终支付金额
+			surplusMoney:0.00,		  // 显示勾选后的剩余抵扣
+			userMoney:0.00,			  // 显示可使用余额
+			deductMoney:0.00,		  // 显示已使用的余额
+			isRequest:false,		  // 是否加载完成渲染子组件
+			isFreight:false,		  // 是否加载完成渲染子组件
+			isAddress:false,		  // 是否加载完成地址
+			isExchangePopup:false, 	  // 控制兑换优惠券弹窗
+			isfreightTip:false,		  // 控制邮费弹窗
+			ischecked:false,	      // 是否勾选余额
+			hanldFreePostFlag:'',	  // 邮费状态
+			hanldFreight:'',		  // 邮费
+			addressData:{},			  // 初始化地址信息
+			goodsData:[],			  // 初始化商品信息
+			couponList:[],		  	  // 初始化优惠券信息
+			invoiceData:{type:0},	  // 初始化发票信息
+			freightData:{},			  // 邮费数据
+			orderInfo:[],			  // 提交的商品信息
+			rechargeGoods:null,		  // 判断订单里有定金商品或者充值商品时,余额抵扣部分不显示
+			freightBeansMoney:0,	  // 存储采美豆抵扣金额
+			isCouponShow:false,		  // 是否显示可选优惠券
+			isCheckedBeans:false,     // 是否抵扣采美豆
+			isCouponModel:false,	  // 兑换优惠券成功提示
+			ExchangeCouponData:{},	  // 兑换优惠券信息
+			contentModalText: '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。',     //操作文字提示语句
+			modalButton: [
+				{
+					text: '前往颜选美学',
+					type: 'gray',
+					plain: true //是否空心
+				},
+				{
+					text: '继续提交',
+					customStyle: {
+						color: '#fff',
+						bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
+					},
+					plain: false
 				}
-				this.orderShouldPayFee = this.allPrice - this.couponAmount
-				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-				this.postageParam.skuIds = this.getProductIds(data.list)
-                // 特殊商品退货须知
-                this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
-                this.helpContent = data.helpContent
-				this.getAddressData()
-			},
-			// 获取订单SKUId列表
-			getProductIds(list){
-				const skuId = []
-				list.forEach(function(supplier){
-					supplier.cartList.forEach(function(product){
-						skuId.push(product.skuId)
-					})
-				})
-				// console.log(list);
-				return skuId.join(',')
-			},
-			
-			getFreightData(){// 获取邮费信息
-				this.isFreight = false
-				this.OrderService.GetOrderPostage(this.postageParam).then(response =>{
-					const data = response.data
-					this.isFreight = true
-					this.isCheckedBeans = false
-					this.freightData = data
-					this.hanldFreePostFlag = data.postageFlag
-					this.hanldFreight = data.postage
-					if(this.hanldFreePostFlag == 1){
-						if( this.freightData.userBeans > 0 ){
-							this.freightBeansMoney = this.hanldFreight
-						}else{
-							this.freightBeansMoney = 0
-						}
-						this.orderShouldPayFee = this.allPrice + data.postage
-						this.attributePallPrice()
-						this.hanldFreightBeans(this.isCheckedBeans)
-					}else{
-						if( this.freightData.userBeans > 0 ){
-							this.freightBeansMoney = 30
-						}else{
-							this.freightBeansMoney = 0
-						}
-						this.orderShouldPayFee = this.allPrice
-						this.attributePallPrice()
-						this.hanldFreightBeans(this.isCheckedBeans)
-					}
+			],
+			showModal: false,
+			showModalstauts:0,
+               returnGoodsStutas: false,
+               helpContent: '',
+               agreementActive: false,
+               agreementModel: false,
+               agreementModelButtons: [{
+                   text: '确定',
+                   customStyle: {
+                       color: '#fff',
+                       bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
+                   },
+                   plain: false
+               }]
+		}
+	},
+	onLoad(option){//商品数据
+		this.initStorage(option)
+	},
+	filters:{
+		NumFormat(value) {//处理金额
+			return Number(value).toFixed(2)
+		},
+	},
+	methods: {
+           onAgreementChange(val){
+               this.agreementActive = val
+           },
+		async initStorage(option){
+			const data = JSON.parse(option.data)
+			const userInfo = await this.$api.getStorage()
+			console.log('data',data)
+			this.productParam.userId =
+			this.cartParam.userId =
+			this.supportParm.userId =
+			this.postageParam.userId = userInfo.userId ? userInfo.userId : 0
+			this.confirmParam.clubId = userInfo.clubId ? userInfo.clubId : 0
+			switch(option.type){
+				case '1':// 商品详情立即购买
+					this.confirmParam.cartType = 2
+					this.productParam.productCount = data.data.productCount
+					this.productParam.productId = data.data.productIds
+					this.productParam.skuId = data.data.skuId
+					this.productIds = data.data.productIds
+					this.GetProductCreateOrderInfo()
+					break
+				case '2':// 购物车结算
+					this.confirmParam.cartType = 1
+					this.confirmType = 2
+					this.cartParam.skuIds = data.data.skuIds
+					this.CartCreateOrderInfo()
+					break
+				case '3':// 组合商品立即购买
+					this.confirmParam.cartType = 2
+					this.confirmType = 2
+					this.supportParm.productInfo = JSON.stringify(data.data)
+					this.GetOrderClubProductSupporting()
+			}
+		},
+		GetProductCreateOrderInfo(){// 商品立即购买确认订单数据初始化
+			this.OrderService.ProductCreateOrderInfo(this.productParam).then(response =>{
+				this.setCreatDataInfo(response.data)
+			})
+			.catch(error =>{
+				this.$util.msg(error.msg,2000)
+			})
+		},
+		GetOrderClubProductSupporting(){// 组合商品立即购买确认订单数据初始化
+			this.OrderService.OrderClubProductSupporting(this.supportParm).then(response =>{
+				this.setCreatDataInfo(response.data)
+			})
+			.catch(error =>{
+				this.$util.msg(error.msg,2000)
+			})
+		},
+		CartCreateOrderInfo(){// 购物车去结算确认订单数据初始化
+			this.OrderService.CartCreateOrderInfo(this.cartParam).then(response =>{
+				this.setCreatDataInfo(response.data)
+			})
+			.catch(error =>{
+				this.$util.msg(error.msg,2000)
+			})
+		},
+		setCreatDataInfo(data){// 公共初始化数据
+			this.isRequest = true
+			this.goodsData = data.list
+			this.couponList = data.couponList
+			this.userMoney = data.userMoney
+			this.reducedPrice = data.reducedPrice
+			this.totalCount = data.totalCount
+			this.allPrice = data.totalPrice
+			this.rechargeGoods = data.rechargeGoods
+			if(this.couponList.length>0){
+				this.isCouponShow = true
+				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.postageParam.skuIds = this.getProductIds(data.list)
+               // 特殊商品退货须知
+               this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
+               this.helpContent = data.helpContent
+			this.getAddressData()
+		},
+		// 获取订单SKUId列表
+		getProductIds(list){
+			const skuId = []
+			list.forEach(function(supplier){
+				supplier.cartList.forEach(function(product){
+					skuId.push(product.skuId)
 				})
-			},
-			async getAddressData(){//获取地址信息
-				const userInfo = await this.$api.getStorage()
-				this.UserService.QueryAddressList(
-					{
-						pageNum:1,
-						pageSize:1,
-						userId:userInfo.userId,
-					}
-				).then(response =>{
-					let data = response.data
-					this.isAddress = true
-					this.addressData = {}
-					if( data.list && data.list.length > 0 ){
-						this.confirmParam.addressId = data.list[0].addressId
-						this.postageParam.townId = data.list[0].townId
-						this.addressData = data.list[0]
-						this.getFreightData()
+			})
+			// console.log(list);
+			return skuId.join(',')
+		},
+
+		getFreightData(){// 获取邮费信息
+			this.isFreight = false
+			this.OrderService.GetOrderPostage(this.postageParam).then(response =>{
+				const data = response.data
+				this.isFreight = true
+				this.isCheckedBeans = false
+				this.freightData = data
+				this.hanldFreePostFlag = data.postageFlag
+				this.hanldFreight = data.postage
+				if(this.hanldFreePostFlag == 1){
+					if( this.freightData.userBeans > 0 ){
+						this.freightBeansMoney = this.hanldFreight
 					}else{
-						this.addressData = this.addressData
+						this.freightBeansMoney = 0
 					}
-				})
-			},
-			handChangeInputGoodsList(data){//对应供应商的留言信息
-				this.goodsData = data
-			},
-			handleChoiceaInvoiceData(data){//获取发票信息
-				this.confirmParam.orderInvoice = data
-			},
-			hanldFreightFn(data){//显示邮费弹窗
-				console.log('邮费信息',data)
-				switch(data.postageFlag){
-					case 1:
-						this.hanldFreight = this.freightData.postage
-						this.hanldFreePostFlag = data.postageFlag
-						this.freightBeansMoney = data.freightBeansMoney
-						this.orderShouldPayFee =this.allPrice + this.hanldFreight
-						this.attributePallPrice()
-						this.hanldFreightBeans(this.isCheckedBeans)
-						break
-					case -1:
-						this.hanldFreight = 0
-						this.hanldFreePostFlag = data.postageFlag
-						this.freightBeansMoney = data.freightBeansMoney
-						this.orderShouldPayFee = this.allPrice
-						this.attributePallPrice()
-						this.hanldFreightBeans(this.isCheckedBeans)
-						break
-				}
-			},
-			hanldFreightBeans(data){//是否勾选采美豆抵扣
-				this.isCheckedBeans = data
-				console.log(this.confirmParam.payInfo)
-				if(this.isCheckedBeans){
-					// 判断如果采美豆大于等于运费*100
+					this.orderShouldPayFee = this.allPrice + data.postage
+					this.attributePallPrice()
+					this.hanldFreightBeans(this.isCheckedBeans)
+				}else{
 					if( this.freightData.userBeans > 0 ){
-						this.confirmParam.payInfo.userBeans = this.freightBeansMoney*100
+						this.freightBeansMoney = 30
 					}else{
-						this.confirmParam.payInfo.userBeans = 0
+						this.freightBeansMoney = 0
 					}
-					// 计算抵扣后的总价
-					if(this.hanldFreePostFlag == 1){	
-						// 如果使用了余额 最终价格
-						if(this.ischecked){
-							let totalAmount = this.allPrice - this.couponAmount
-							if(this.userMoney >= totalAmount){
-								this.orderShouldPayFee = 0.00
-								this.deductMoney = this.allPrice - this.couponAmount		// 当前使用金额等于订单金额
-								this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余金额等于余额-当前使用金额
-							}else{
-								this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于订单金额-账户余额
-								this.deductMoney = this.userMoney				            // 当前使用金额等于总余额
-								this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余余额等于总余额-当前使用金额
-							}
-						}else{
-							this.orderShouldPayFee = this.allPrice + this.hanldFreight - this.freightBeansMoney - this.couponAmount
-						}
-						console.log('抵扣',this.orderShouldPayFee)
-					}
-				}else{// 采美豆不抵扣运费
+					this.orderShouldPayFee = this.allPrice
+					this.attributePallPrice()
+					this.hanldFreightBeans(this.isCheckedBeans)
+				}
+			})
+		},
+		async getAddressData(){//获取地址信息
+			const userInfo = await this.$api.getStorage()
+			this.UserService.QueryAddressList(
+				{
+					pageNum:1,
+					pageSize:1,
+					userId:userInfo.userId,
+				}
+			).then(response =>{
+				let data = response.data
+				this.isAddress = true
+				this.addressData = {}
+				if( data.list && data.list.length > 0 ){
+					this.confirmParam.addressId = data.list[0].addressId
+					this.postageParam.townId = data.list[0].townId
+					this.addressData = data.list[0]
+					this.getFreightData()
+				}else{
+					this.addressData = this.addressData
+				}
+			})
+		},
+		handChangeInputGoodsList(data){//对应供应商的留言信息
+			this.goodsData = data
+		},
+		handleChoiceaInvoiceData(data){//获取发票信息
+			this.confirmParam.orderInvoice = data
+		},
+		hanldFreightFn(data){//显示邮费弹窗
+			console.log('邮费信息',data)
+			switch(data.postageFlag){
+				case 1:
+					this.hanldFreight = this.freightData.postage
+					this.hanldFreePostFlag = data.postageFlag
+					this.freightBeansMoney = data.freightBeansMoney
+					this.orderShouldPayFee =this.allPrice + this.hanldFreight
+					this.attributePallPrice()
+					this.hanldFreightBeans(this.isCheckedBeans)
+					break
+				case -1:
+					this.hanldFreight = 0
+					this.hanldFreePostFlag = data.postageFlag
+					this.freightBeansMoney = data.freightBeansMoney
+					this.orderShouldPayFee = this.allPrice
+					this.attributePallPrice()
+					this.hanldFreightBeans(this.isCheckedBeans)
+					break
+			}
+		},
+		hanldFreightBeans(data){//是否勾选采美豆抵扣
+			this.isCheckedBeans = data
+			console.log(this.confirmParam.payInfo)
+			if(this.isCheckedBeans){
+				// 判断如果采美豆大于等于运费*100
+				if( this.freightData.userBeans > 0 ){
+					this.confirmParam.payInfo.userBeans = this.freightBeansMoney*100
+				}else{
 					this.confirmParam.payInfo.userBeans = 0
-					// 不抵扣时计算总价
-					if(this.hanldFreePostFlag == 1){
-						this.attributeHashfreight(this.hanldFreight)
-					}
 				}
-			},
-			handleChoiceaCouponData(data){// 勾选使用优惠券
-				console.log('优惠券信息',data)
-				this.couponAmount = data.couponAmount
-				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-				this.confirmParam.clubCouponId = data.clubCouponId
-				this.attributePallPrice()
-				this.hanldFreightBeans(this.isCheckedBeans)
-			},
-			checkedBalabce(){//勾选使用余额
-				if(this.userMoney > 0){
-					this.ischecked = !this.ischecked
+				// 计算抵扣后的总价
+				if(this.hanldFreePostFlag == 1){
+					// 如果使用了余额 最终价格
 					if(this.ischecked){
-						this.confirmParam.payInfo.balancePayFlag = 1
-						this.attributePallPrice()
-					}else{
-						this.confirmParam.payInfo.balancePayFlag = 0
-						if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){ //如果是有运费时
-							if(this.isCheckedBeans){
-								this.orderShouldPayFee =  this.allPrice - this.couponAmount
-							}else{
-								this.orderShouldPayFee = this.allPrice+parseInt(this.freightData.postage) - this.couponAmount
-							}
+						let totalAmount = this.allPrice - this.couponAmount
+						if(this.userMoney >= totalAmount){
+							this.orderShouldPayFee = 0.00
+							this.deductMoney = this.allPrice - this.couponAmount		// 当前使用金额等于订单金额
+							this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余金额等于余额-当前使用金额
 						}else{
-							this.orderShouldPayFee = this.allPrice - this.couponAmount
+							this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于订单金额-账户余额
+							this.deductMoney = this.userMoney				            // 当前使用金额等于总余额
+							this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余余额等于总余额-当前使用金额
 						}
+					}else{
+						this.orderShouldPayFee = this.allPrice + this.hanldFreight - this.freightBeansMoney - this.couponAmount
 					}
-					console.log('最终订单支付金额',this.orderShouldPayFee)
-					console.log('优惠券金额',this.couponAmount)
-				}else{
-					return
+					console.log('抵扣',this.orderShouldPayFee)
 				}
-			},
-			attributePallPrice(){// 计算价格
-				if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
-					this.attributeHashfreight(this.freightData.postage)
-				}else{
-					this.attributeNofreight()
+			}else{// 采美豆不抵扣运费
+				this.confirmParam.payInfo.userBeans = 0
+				// 不抵扣时计算总价
+				if(this.hanldFreePostFlag == 1){
+					this.attributeHashfreight(this.hanldFreight)
 				}
-			},
-			attributeNofreight(){// 计算没有邮费的支付价格
+			}
+		},
+		handleChoiceaCouponData(data){// 勾选使用优惠券
+			console.log('优惠券信息',data)
+			this.couponAmount = data.couponAmount
+			this.totalDiscountAmount = this.reducedPrice + this.couponAmount
+			this.confirmParam.clubCouponId = data.clubCouponId
+			this.attributePallPrice()
+			this.hanldFreightBeans(this.isCheckedBeans)
+		},
+		checkedBalabce(){//勾选使用余额
+			if(this.userMoney > 0){
+				this.ischecked = !this.ischecked
 				if(this.ischecked){
-					let totalAmount = this.allPrice - this.couponAmount
-					if(this.userMoney >= totalAmount){
-						this.orderShouldPayFee = 0.00
-						this.deductMoney = this.allPrice - this.couponAmount 		// 当前使用金额等于订单金额
-						this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余金额等于余额-当前使用金额
-					}else{
-						this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于订单金额-账户余额
-						this.deductMoney = this.userMoney				            // 当前使用金额等于总余额
-						this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余余额等于总余额-当前使用金额
-					}
+					this.confirmParam.payInfo.balancePayFlag = 1
+					this.attributePallPrice()
 				}else{
-					this.orderShouldPayFee = this.allPrice - this.couponAmount
-					this.deductMoney = 0.00 // 当前使用
-					this.surplusMoney = this.userMoney // 剩余余额
-				}
-				console.log('最终订单支付金额',this.orderShouldPayFee)
-				console.log('优惠券金额',this.couponAmount)
-			},
-			attributeHashfreight(postage){// 计算需要邮费的支付价格
-				console.log()
-				let totalAmount = this.allPrice + parseInt(postage) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
-				if(this.ischecked){
-					if(this.userMoney >= totalAmount){// 全部抵扣
-						this.orderShouldPayFee =0.00
-						if(this.isCheckedBeans){// 抵扣运费了
-							this.deductMoney =  this.allPrice - this.couponAmount			// 当前使用金额等于订单金额
-							this.surplusMoney = this.userMoney - this.deductMoney	    	// 剩余金额等于余额减去当前使用金额
-						}else{
-							this.deductMoney = this.allPrice + parseInt(postage)- this.couponAmount	// 当前使用金额等于订单金额+运费金额
-							this.surplusMoney = this.userMoney - this.deductMoney	    	// 剩余余额等于总余额-当前使用金额
-						}
-					}else{// 部分抵扣
-						if(this.isCheckedBeans){// 抵扣运费了
-							this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于总订单金额-账户余额-优惠券金额
-							this.deductMoney = this.userMoney				            		// 当前使用金额等于账户余额
-							this.surplusMoney = this.userMoney - this.deductMoney	    		// 剩余余额等于账户余额-当前使用金额
+					this.confirmParam.payInfo.balancePayFlag = 0
+					if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){ //如果是有运费时
+						if(this.isCheckedBeans){
+							this.orderShouldPayFee =  this.allPrice - this.couponAmount
 						}else{
-							this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.userMoney - this.couponAmount//订单支付金额等于订单金额+运费-账户余额-优惠券
-							this.deductMoney = this.userMoney				            		// 当前使用金额等于账户余额
-							this.surplusMoney = this.userMoney - this.deductMoney	    		// 剩余余额等于账户余额-当前使用金额
+							this.orderShouldPayFee = this.allPrice+parseInt(this.freightData.postage) - this.couponAmount
 						}
+					}else{
+						this.orderShouldPayFee = this.allPrice - this.couponAmount
 					}
-				}else{
-					this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.couponAmount
-					this.deductMoney = 0.00 // 当前使用金额
-					this.surplusMoney = this.userMoney // 剩余余额
 				}
 				console.log('最终订单支付金额',this.orderShouldPayFee)
 				console.log('优惠券金额',this.couponAmount)
-			},
-			orderSubmitMit(){// 提交订单按钮点击事件
-                if(this.returnGoodsStutas && !this.agreementActive){
-                    this.agreementModel = true
-                }else if(this.allPrice <1000){
-					this.showModal = true
-					this.contentModalText = '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。'    //操作文字提示语句
-					this.showModalstauts = 1
-					this.modalButton= [
-						{
-							text: '前往颜选美学',
-							type: 'gray',
-							plain: true //是否空心
-						},
-						{
-							text: '继续提交',
-							customStyle: {
-								color: '#fff',
-								bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-							},
-							plain: false
-						}
-					]
+			}else{
+				return
+			}
+		},
+		attributePallPrice(){// 计算价格
+			if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
+				this.attributeHashfreight(this.freightData.postage)
+			}else{
+				this.attributeNofreight()
+			}
+		},
+		attributeNofreight(){// 计算没有邮费的支付价格
+			if(this.ischecked){
+				let totalAmount = this.allPrice - this.couponAmount
+				if(this.userMoney >= totalAmount){
+					this.orderShouldPayFee = 0.00
+					this.deductMoney = this.allPrice - this.couponAmount 		// 当前使用金额等于订单金额
+					this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余金额等于余额-当前使用金额
 				}else{
-					this.handleClickOrderSubmitMit()
-				}
-			},
-			handleClickOrderSubmitMit(){// 提交订单
-				if(this.isSubLoading){ return }
-				if(this.confirmParam.addressId == ''){
-					this.$util.msg('请先添加收货地址~',2000)
-					return
+					this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于订单金额-账户余额
+					this.deductMoney = this.userMoney				            // 当前使用金额等于总余额
+					this.surplusMoney = this.userMoney - this.deductMoney	    // 剩余余额等于总余额-当前使用金额
 				}
-				this.confirmParam.orderInfo = this.goodsData.map(el => {
-					let productInfo = []
-					el.cartList.forEach(pros => {
-						productInfo.push({
-							skuId:pros.skuId,
-							productNum:pros.number,
-							presentNum:0,
-							productType:pros.giftType
-						})
-					})
-					return {splitCode:el.splitCode,shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
-				})
-				this.confirmParam.payInfo.postage = parseInt(this.hanldFreight).toFixed(2)
-				this.confirmParam.payInfo.postageFlag = parseInt(this.hanldFreePostFlag)
-				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.hanldeOrderVerify(this.confirmParam)
-			},
-			hanldeOrderVerify(params){// 校验购买资质的验证
-				this.OrderService.createdOrderCerify(params).then(response =>{
-					if(response.data.code === -1){
-						this.showModal = true
-						this.contentModalText = '订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。'  //操作文字提示语句
-						this.showModalstauts = 2
-						this.modalButton=[
-							{
-								text: '继续提交',
-								type: 'gray',
-								plain: true //是否空心
-							},
-							{
-								text: '去升级',
-								customStyle: {
-									color: '#fff',
-									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-								},
-								plain: false
-							}
-						]
-					}else{
-						this.hanldeOrderSubmit(params)
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			hanldeOrderSubmit(params){// 提交订单
-				this.OrderService.CreatedOrderSubmit(params).then(response =>{
-					let data = response.data
-					// 友盟埋点收集机构自主提交订单
-					if(process.env.NODE_ENV != 'development'){
-						this.$uma.trackEvent('Um_Event_ConfirmOrder', {
-							Um_Key_PageName: '机构提交订单',
-							Um_Key_SourcePage: '确认订单',
-							Um_Key_OrderID:`${data.orderId}`
-						})
-					}
-					if(data.code === 1){
-						this.submitState ='success'
-						setTimeout(()=>{
-							this.isSubLoading = false
-						},2000)
-						this.$api.redirectTo(`/pages/user/order/success?data=${JSON.stringify({data:{orderId:data.orderId}})}`)
+			}else{
+				this.orderShouldPayFee = this.allPrice - this.couponAmount
+				this.deductMoney = 0.00 // 当前使用
+				this.surplusMoney = this.userMoney // 剩余余额
+			}
+			console.log('最终订单支付金额',this.orderShouldPayFee)
+			console.log('优惠券金额',this.couponAmount)
+		},
+		attributeHashfreight(postage){// 计算需要邮费的支付价格
+			console.log()
+			let totalAmount = this.allPrice + parseInt(postage) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
+			if(this.ischecked){
+				if(this.userMoney >= totalAmount){// 全部抵扣
+					this.orderShouldPayFee =0.00
+					if(this.isCheckedBeans){// 抵扣运费了
+						this.deductMoney =  this.allPrice - this.couponAmount			// 当前使用金额等于订单金额
+						this.surplusMoney = this.userMoney - this.deductMoney	    	// 剩余金额等于余额减去当前使用金额
 					}else{
-						this.submitState ='confirm'
-						this.$util.msg('订单提交成功',2000,true,'success')
-						setTimeout(()=>{
-							this.isSubLoading = false
-							if(data.onlinePayFlag === 1){
-								this.$api.redirectTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-							}else{
-								this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-							}
-						},2000)
+						this.deductMoney = this.allPrice + parseInt(postage)- this.couponAmount	// 当前使用金额等于订单金额+运费金额
+						this.surplusMoney = this.userMoney - this.deductMoney	    	// 剩余余额等于总余额-当前使用金额
 					}
-				}).catch(error =>{
-					this.isSubLoading = false
-					this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
-					this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
-					this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
-					if(error.code == -3){// 已提交2个小于1000元的订单提示
-						this.showModal = true
-						this.contentModalText = '您已有2个采购金额过小的订单,本次不能再进行采购。建议您前往采美旗下“颜选美学”小程序购买小额商品。'  //操作文字提示语句
-						this.showModalstauts = 3
-						this.modalButton=[
-							{
-								text: '了解',
-								type: 'gray',
-								plain: true //是否空心
-							},
-							{
-								text: '前往颜选美学',
-								customStyle: {
-									color: '#fff',
-									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-								},
-								plain: false
-							}
-						]
-					}else if(error.code == -4){// 采美豆为负数
-						this.showModal = true
-						this.contentModalText = '采美豆不足,不能提交订单。建议您前往采美旗下“颜选美学”小程序购买小额商品。'  //操作文字提示语句
-						this.showModalstauts = 3
-						this.modalButton=[
-							{
-								text: '了解',
-								type: 'gray',
-								plain: true //是否空心
-							},
-							{
-								text: '前往颜选美学',
-								customStyle: {
-									color: '#fff',
-									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
-								},
-								plain: false
-							}
-						]
+				}else{// 部分抵扣
+					if(this.isCheckedBeans){// 抵扣运费了
+						this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于总订单金额-账户余额-优惠券金额
+						this.deductMoney = this.userMoney				            		// 当前使用金额等于账户余额
+						this.surplusMoney = this.userMoney - this.deductMoney	    		// 剩余余额等于账户余额-当前使用金额
 					}else{
-						this.$util.msg(error.msg,3000)
+						this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.userMoney - this.couponAmount//订单支付金额等于订单金额+运费-账户余额-优惠券
+						this.deductMoney = this.userMoney				            		// 当前使用金额等于账户余额
+						this.surplusMoney = this.userMoney - this.deductMoney	    		// 剩余余额等于账户余额-当前使用金额
 					}
+				}
+			}else{
+				this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.couponAmount
+				this.deductMoney = 0.00 // 当前使用金额
+				this.surplusMoney = this.userMoney // 剩余余额
+			}
+			console.log('最终订单支付金额',this.orderShouldPayFee)
+			console.log('优惠券金额',this.couponAmount)
+		},
+		orderSubmitMit(){// 提交订单按钮点击事件
+		   if(this.returnGoodsStutas && !this.agreementActive){
+                   this.agreementModel = true
+		   }else{
+				this.handleClickOrderSubmitMit()
+			}
+		},
+		handleClickOrderSubmitMit(){// 提交订单
+			if(this.isSubLoading){ return }
+			if(this.confirmParam.addressId == ''){
+				this.$util.msg('请先添加收货地址~',2000)
+				return
+			}
+			this.confirmParam.orderInfo = this.goodsData.map(el => {
+				let productInfo = []
+				el.cartList.forEach(pros => {
+					productInfo.push({
+						skuId:pros.skuId,
+						productNum:pros.number,
+						presentNum:0,
+						productType:pros.giftType
+					})
 				})
-			},
-			handFreightAlertShow(){//显示邮费弹窗
-				this.isfreightTip = true
-			},
-			handleClickCancel(){// 关闭优惠券弹窗
-				this.isCouponModel = false
-				if(this.confirmType == 1){
-					this.GetProductCreateOrderInfo()
-				}else{
-					this.CartCreateOrderInfo()
+				return {splitCode:el.splitCode,shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
+			})
+			this.confirmParam.payInfo.postage = parseInt(this.hanldFreight).toFixed(2)
+			this.confirmParam.payInfo.postageFlag = parseInt(this.hanldFreePostFlag)
+			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)
+		},
+		hanldeOrderSubmit(params){// 提交订单
+			this.OrderService.CreatedOrderSubmit(params).then(response =>{
+				let data = response.data
+				// 友盟埋点收集机构自主提交订单
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_ConfirmOrder', {
+						Um_Key_PageName: '机构提交订单',
+						Um_Key_SourcePage: '确认订单',
+						Um_Key_OrderID:`${data.orderId}`
+					})
 				}
-			},
-			handleClick(e){// 采购量过小提示弹窗
-				if (e.index === 1) {
-					if( this.showModalstauts === 1){
-						this.showModal = false
-						this.handleClickOrderSubmitMit()
-					}else if(this.showModalstauts === 2){
-						this.showModal = false
+				if(data.code === 1){
+					this.submitState ='success'
+					setTimeout(()=>{
 						this.isSubLoading = false
-						this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
-						this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
-						this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
-						this.$api.navigateTo('/pages/login/apply')
-					}else{
-						this.showModal = false
-						this.handleClickHeHeMiniApplet()
-					}
+					},2000)
+					this.$api.redirectTo(`/pages/user/order/success?data=${JSON.stringify({data:{orderId:data.orderId}})}`)
 				}else{
-					if( this.showModalstauts == 1 ){
-						this.showModal = false
-						this.handleClickHeHeMiniApplet()
-					}else if(this.showModalstauts === 2){
-						this.showModal = false
-						this.hanldeOrderSubmit(this.confirmParam)
-					}else{
-						this.showModal = false
-					}
+					this.submitState ='confirm'
+					this.$util.msg('订单提交成功',2000,true,'success')
+					setTimeout(()=>{
+						this.isSubLoading = false
+						if(data.onlinePayFlag === 1){
+							this.$api.redirectTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
+						}else{
+							this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+						}
+					},2000)
 				}
-			},
-			handleClickHeHeMiniApplet(){ // 跳转颜选美学小程序
-				uni.navigateToMiniProgram({
-					appId: 'wx2c3b0a7f343235b1',
-					path: '/pages/tabBar/index/index',
-					extraData: {
-						'data1': 'test'
+			}).catch(error =>{
+				this.isSubLoading = false
+				this.handleError(error)
+			})
+		},
+		handleError(data){// 提交订单异常处理
+			const buttonMap = {
+					1:{
+						contentModalText : '您已有2个采购金额过小的订单,本次不能再进行采购。建议您前往采美旗下“颜选美学”小程序购买小额商品。',
+						modalButton : [
+							{ text: '了解', type: 'gray', plain: true },
+							{ text: '前往颜选美学', customStyle: { color: '#fff',bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },plain: false}
+						]
+					},
+					2:{
+						contentModalText :  '采美豆不足,不能提交订单。建议您前往采美旗下“颜选美学”小程序购买小额商品。',
+						modalButton :  [
+							{ text: '了解', type: 'gray', plain: true },
+							{ text: '前往颜选美学', customStyle: { color: '#fff',bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },plain: false}
+						]
+					},
+					3:{
+						contentModalText :  '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。' ,
+						modalButton :  [
+							{ text: '前往颜选美学', type: 'gray', plain: true },
+							{ text: '继续提交', customStyle: { color: '#fff',bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },plain: false}
+						]
 					},
-					envVersion: 'develop',
-					success(res) {
-						// 打开成功
-						console.log(res)
+					4:{
+						contentModalText :  '订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。',
+						modalButton :  [
+							{ text: '继续提交',  type: 'gray', plain: true },
+							{ text: '去升级', customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },plain: false }
+						]
 					}
-				})
-			},
-			hideFreight(){//关闭邮费弹窗
-				this.isfreightTip = false
-			},
+			}
+			if(data.code === -3){// 已提交2个小于1000元的订单提示
+				this.showModal = true
+				this.showModalstauts = 3
+				this.contentModalText = buttonMap[1].contentModalText
+				this.modalButton= buttonMap[1].modalButton
+				this.formatConfirmParam()
+			}else if(data.code === -4){// 采美豆为负数
+				this.showModal = true
+				this.showModalstauts = 3
+				this.contentModalText = buttonMap[2].contentModalText
+				this.modalButton= buttonMap[2].modalButton
+				this.formatConfirmParam()
+			}else if(data.code === -5){// 订单总金额低于500
+				this.showModal = true
+				this.showModalstauts = 1
+				this.contentModalText = buttonMap[3].contentModalText
+				this.modalButton= buttonMap[3].modalButton
+				this.formatConfirmParam()
+			}else if(data.code === -6){// 非医美机构下三类商品订单
+				this.showModal = true
+				this.showModalstauts = 2
+				this.contentModalText = buttonMap[4].contentModalText
+				this.modalButton= buttonMap[4].modalButton
+				this.formatConfirmParam()
+			}else{
+				this.$util.msg(data.msg,3000)
+			}
 		},
-		onShow() {
-			let pages = getCurrentPages()
-			let currPage = pages[pages.length-1]
-			if(currPage.data.select =='select'){
-				this.isAddress = true
-				let SelectData = uni.getStorageSync('selectAddress')
-				this.confirmParam.addressId = SelectData.addressId
-				this.postageParam.townId = SelectData.townId 
-				this.addressData = SelectData
-				this.getFreightData()
+		formatConfirmParam(){// 还原提交订单参数格式
+			this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
+			this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
+			this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
+		},
+		handFreightAlertShow(){//显示邮费弹窗
+			this.isfreightTip = true
+		},
+		handleClickCancel(){// 关闭优惠券弹窗
+			this.isCouponModel = false
+			if(this.confirmType == 1){
+				this.GetProductCreateOrderInfo()
+			}else{
+				this.CartCreateOrderInfo()
+			}
+		},
+		handleClick(e){// 采购量过小提示弹窗
+			if (e.index === 1) {
+				if( this.showModalstauts === 1){
+					this.showModal = false
+					this.confirmParam.orderMiniType = 1
+					this.handleClickOrderSubmitMit()
+				}else if(this.showModalstauts === 2){
+					this.showModal = false
+					this.isSubLoading = false
+					this.$api.navigateTo('/pages/login/apply')
+				}else{
+					this.showModal = false
+					this.handleClickHeHeMiniApplet()
+				}
 			}else{
-				this.getAddressData()
+				if( this.showModalstauts == 1 ){
+					this.showModal = false
+					this.handleClickHeHeMiniApplet()
+				}else if(this.showModalstauts === 2){
+					this.showModal = false
+					this.confirmParam.orderMiniType = 2
+					this.handleClickOrderSubmitMit()
+				}else{
+					this.showModal = false
+				}
 			}
+		},
+		handleClickHeHeMiniApplet(){ // 跳转颜选美学小程序
+			uni.navigateToMiniProgram({
+				appId: 'wx2c3b0a7f343235b1',
+				path: '/pages/tabBar/index/index',
+				extraData: {
+					'data1': 'test'
+				},
+				envVersion: 'develop',
+				success(res) {
+					// 打开成功
+					console.log(res)
+				}
+			})
+		},
+		hideFreight(){//关闭邮费弹窗
+			this.isfreightTip = false
+		},
+	},
+	onShow() {
+		let pages = getCurrentPages()
+		let currPage = pages[pages.length-1]
+		if(currPage.data.select =='select'){
+			this.isAddress = true
+			let SelectData = uni.getStorageSync('selectAddress')
+			this.confirmParam.addressId = SelectData.addressId
+			this.postageParam.townId = SelectData.townId
+			this.addressData = SelectData
+			this.getFreightData()
+		}else{
+			this.getAddressData()
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	page {
-		height: auto;
-		background:#F7F7F7;
-	}
-	.btn-hover{
-		background: #FFFFFF;
-	}
-	.animation{
-		/* transition: transform 0.3s ease;*/
-		transition-property: transform;
-		transition-duration: 0.3s;
-		transition-timing-function: ease;
-	}
-	.order{
-		padding-bottom: 134rpx;
-	}
-	.invoice-freight{
-		width: 702rpx;
-		padding: 0 24rpx;
-		height: auto;
+page {
+	height: auto;
+	background: #f7f7f7;
+}
+.btn-hover {
+	background: #ffffff;
+}
+.animation {
+	/* transition: transform 0.3s ease;*/
+	transition-property: transform;
+	transition-duration: 0.3s;
+	transition-timing-function: ease;
+}
+.order {
+	padding-bottom: 134rpx;
+}
+.invoice-freight {
+	width: 702rpx;
+	padding: 0 24rpx;
+	height: auto;
+	font-size: $font-size-28;
+	color: $text-color;
+	background: #ffffff;
+	float: left;
+	font-weight: bold;
+}
+.invoice-balance {
+	width: 702rpx;
+	height: auto;
+	padding: 0 24rpx;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	margin-bottom: 24rpx;
+	.balabce-t {
+		width: 100%;
+		height: 86rpx;
+		line-height: 86rpx;
 		font-size: $font-size-28;
 		color: $text-color;
-		background: #FFFFFF;
 		float: left;
-		font-weight: bold;
-	}
-	.invoice-balance{
-		width: 702rpx;
-		height: auto;
-		padding:0 24rpx;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		margin-bottom: 24rpx;
-		.balabce-t{
-			width: 100%;
-			height: 86rpx;
-			line-height: 86rpx;
-			font-size: $font-size-28;
-			color: $text-color;
+		.balabce-t-le {
 			float: left;
-			.balabce-t-le{
+			font-weight: bold;
+		}
+		.balabce-t-ri {
+			float: right;
+			display: flex;
+			align-items: center;
+			.money {
+				display: flex;
 				float: left;
-				font-weight: bold;
 			}
-			.balabce-t-ri{
-				float: right;
+			.checkbox-box {
 				display: flex;
-				align-items: center;
-				.money{
-					display: flex;
-					float: left;
-				}
-				.checkbox-box{
-					display: flex;
-					width: 60rpx;
-					float: left;
-					height: 100%;
-					font-size: $font-size-24;
-					.checkbox{
-						width: 40rpx;
-						text-align: right;
-						box-sizing: border-box;
-						text-align: center;
-						text-decoration: none;
-						border-radius: 0;
-						-webkit-tap-highlight-color: transparent;
-						overflow: hidden;
-						color: $color-system;
-					}
+				width: 60rpx;
+				float: left;
+				height: 100%;
+				font-size: $font-size-24;
+				.checkbox {
+					width: 40rpx;
+					text-align: right;
+					box-sizing: border-box;
+					text-align: center;
+					text-decoration: none;
+					border-radius: 0;
+					-webkit-tap-highlight-color: transparent;
+					overflow: hidden;
+					color: $color-system;
 				}
 			}
 		}
-		.balabce-b{
+	}
+	.balabce-b {
+		width: 100%;
+		float: left;
+		overflow: hidden;
+		.balabce-b-text {
 			width: 100%;
-			float: left;
-			overflow: hidden;
-			.balabce-b-text{
-				width: 100%;
-				line-height: 58rpx;
-				font-size: $font-size-24;
-				color: #FF2A2A;
-				text-align: right;
-				float: right;
-			}
-			&.balabce-b--hide {
-				padding: 0 0;
-				height: 0px;
-				line-height: 0px;
-			}
+			line-height: 58rpx;
+			font-size: $font-size-24;
+			color: #ff2a2a;
+			text-align: right;
+			float: right;
+		}
+		&.balabce-b--hide {
+			padding: 0 0;
+			height: 0px;
+			line-height: 0px;
 		}
 	}
-	.footer-wrapper{
-		position: fixed;
-		left: 0;
-		bottom: 0;
-        background-color: #FFFFFF;
-        z-index: 990; 
-        .footer{
-            display: flex;
-            align-items: center;
-            width: 100%;
-            height: 110rpx;
-            line-height: 110rpx;
-            justify-content: space-between;
-            font-size: $font-size-28;
-            color: $text-color;
-        }
-		.footer-le{
-			width:570rpx;
-			height:100%;
+}
+.footer-wrapper {
+	position: fixed;
+	left: 0;
+	bottom: 0;
+	background-color: #ffffff;
+	z-index: 990;
+	.footer {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 110rpx;
+		line-height: 110rpx;
+		justify-content: space-between;
+		font-size: $font-size-28;
+		color: $text-color;
+	}
+	.footer-le {
+		width: 570rpx;
+		height: 100%;
+		float: left;
+	}
+	.footer-count {
+		float: left;
+		padding-left: 24rpx;
+		width: 180rpx;
+		box-sizing: border-box;
+	}
+	.footer-price {
+		width: 370rpx;
+		float: right;
+		text-align: right;
+		color: $text-color;
+		padding: 10rpx 20rpx 10rpx 0;
+		box-sizing: border-box;
+		.sum-none {
+			width: 100%;
+			height: 45rpx;
+			line-height: 45rpx;
+			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: #ff2a2a;
+			}
 		}
-		.footer-count{
+		.sum {
+			width: 100%;
+			height: 45rpx;
+			line-height: 45rpx;
 			float: left;
-			padding-left: 24rpx;
-			width:180rpx;
-			box-sizing: border-box;
-		}
-		.footer-price{
-			width:370rpx;
-			float: right;
-			text-align: right;
-			color: $text-color;
-			padding: 10rpx 20rpx 10rpx 0;
-			box-sizing: border-box;
-			.sum-none{
-				width: 100%;
-				height: 45rpx;
-				line-height: 45rpx;
-				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:#FF2A2A;
-				}
+			&.none {
+				height: 90rpx;
+				line-height: 90rpx;
 			}
-			.sum{
-				width: 100%;
-				height: 45rpx;
-				line-height: 45rpx;
-				float: left;
-				&.none{
-					height: 90rpx;
-					line-height: 90rpx;
-				}
-				.price{
-					font-size: $font-size-32;
-					color: #FF2A2A;
-				}
+			.price {
+				font-size: $font-size-32;
+				color: #ff2a2a;
 			}
-			
 		}
-		.footer-submit{
-			display:flex;
-			align-items:center;
-			justify-content: center;
-			width: 180rpx;
+	}
+	.footer-submit {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 180rpx;
+		height: 100%;
+		box-sizing: border-box;
+		padding: 15rpx 5rpx;
+		.btn {
+			width: 100%;
 			height: 100%;
-			box-sizing: border-box;
-			padding: 15rpx 5rpx;
-			.btn{
-				width: 100%;
-				height: 100%;
-				color: #FFFFFF;
-				background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
-				font-size: $font-size-26;
-				text-align: center;
-				line-height: 80rpx;
-				border-radius: 40rpx;
-				&.disabled{
-					background: #e4e8eb;
-					color: #999999;
-				}
+			color: #ffffff;
+			background: linear-gradient(135deg, rgba(242, 143, 49, 1) 0%, rgba(225, 86, 22, 1) 100%);
+			font-size: $font-size-26;
+			text-align: center;
+			line-height: 80rpx;
+			border-radius: 40rpx;
+			&.disabled {
+				background: #e4e8eb;
+				color: #999999;
 			}
 		}
 	}
-	.coupon-content-model{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
+}
+.coupon-content-model {
+	width: 100%;
+	height: 100%;
+	background: rgba(0, 0, 0, 0.5);
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 8888;
+	transition: all 0.4s;
+	.coupon-alert-content {
+		width: 600rpx;
+		height: 612rpx;
+		position: absolute;
 		top: 0;
 		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		.coupon-alert-content{
+		bottom: 0;
+		right: 0;
+		margin: auto;
+		box-sizing: border-box;
+		padding-top: 92rpx;
+		.coupon {
 			width: 600rpx;
-			height: 612rpx;
-			position: absolute;
-			top: 0;
-			left: 0;
-			bottom: 0;
-			right: 0;
-			margin: auto;
+			height: 522rpx;
+			background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
+			background-size: cover;
 			box-sizing: border-box;
-			padding-top: 92rpx;
-			.coupon{
-				width: 600rpx;
-				height: 522rpx;
-				background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
-				background-size: cover;
+			padding: 230rpx 40rpx 0 40rpx;
+			.coupon-list {
+				width: 100%;
+				height: 147rpx;
+				margin-bottom: 32rpx;
 				box-sizing: border-box;
-				padding: 230rpx 40rpx 0 40rpx;
-				.coupon-list{
-					width: 100%;
-					height: 147rpx;
-					margin-bottom: 32rpx;
+				background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
+				background-size: cover;
+				position: relative;
+				.list-cell-tags {
+					display: inline-block;
+					padding: 0 10rpx;
+					height: 32rpx;
+					line-height: 32rpx;
+					background-color: #f94b4b;
+					color: #ffffff;
+					font-size: 18rpx;
+					border-radius: 16rpx 0 16rpx 0;
+					text-align: center;
+					position: absolute;
+					top: 0;
+					left: 0;
+				}
+				.list-cell-le {
+					width: 154rpx;
+					height: 100%;
 					box-sizing: border-box;
-					background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
-					background-size: cover;
-					position: relative;
-					.list-cell-tags{
-						display: inline-block;
-						padding: 0 10rpx;
-						height: 32rpx;
-						line-height: 32rpx;
-						background-color: #f94b4b;
-						color: #FFFFFF;
-						font-size: 18rpx;
-						border-radius: 16rpx 0 16rpx 0;
+					padding: 30rpx 0;
+					float: left;
+					.coupon-maxMoney {
+						width: 100%;
+						height: 54rpx;
+						line-height: 54rpx;
+						font-size: 42rpx;
+						color: #f94b4b;
 						text-align: center;
-						position: absolute;
-						top: 0;
-						left: 0;
+						margin-top: 10rpx;
+						.small {
+							font-size: $font-size-20;
+						}
 					}
-					.list-cell-le{
-						width: 154rpx;
-						height: 100%;
-						box-sizing: border-box;
-						padding: 30rpx 0;
+					.coupon-minMoney {
+						width: 100%;
+						height: 28rpx;
 						float: left;
-						.coupon-maxMoney{
-							width: 100%;
-							height: 54rpx;
-							line-height: 54rpx;
-							font-size: 42rpx;
+						box-sizing: border-box;
+						padding-left: 24rpx;
+						.txt {
+							display: block;
+							height: 28rpx;
+							line-height: 28rpx;
+							font-size: 16rpx;
 							color: #f94b4b;
 							text-align: center;
-							margin-top: 10rpx;
-							.small{
-								font-size: $font-size-20;
-							}
-						}
-						.coupon-minMoney{
-							width: 100%;
-							height: 28rpx;
+							padding: 0 5rpx;
+							background-color: #fff1eb;
+							border-radius: 4rpx;
 							float: left;
-							box-sizing: border-box;
-							padding-left: 24rpx;
-							.txt{
-								display: block;
-								height: 28rpx;
-								line-height: 28rpx;
-								font-size: 16rpx;
-								color: #f94b4b;
-								text-align: center;
-								padding: 0 5rpx;
-								background-color: #fff1eb;
-								border-radius: 4rpx;
-								float: left;
-							}
 						}
 					}
-					.list-cell-ri{
-						width: 366rpx;
-						height: 100%;
-						box-sizing: border-box;
-						padding:30rpx 20rpx;
+				}
+				.list-cell-ri {
+					width: 366rpx;
+					height: 100%;
+					box-sizing: border-box;
+					padding: 30rpx 20rpx;
+					float: left;
+					.list-cell-top {
+						width: 100%;
+						height: 64rpx;
+						line-height: 64rpx;
+						font-size: $font-size-26;
+						color: #333333;
 						float: left;
-						.list-cell-top{
-							width: 100%;
-							height: 64rpx;
-							line-height: 64rpx;
-							font-size: $font-size-26;
-							color: #333333;
-							float: left;
-							text-overflow:ellipsis;
-							display: -webkit-box;
-							word-break: break-all;
-							-webkit-box-orient: vertical;
-							-webkit-line-clamp: 1;
-							overflow: hidden;
-						}
-						.list-cell-time{
-							width: 100%;
-							height: 28rpx;
-							line-height: 28rpx;
-							text-align: left;
-							font-size: $font-size-20;
-							color: #999999;
-						}
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						word-break: break-all;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 1;
+						overflow: hidden;
+					}
+					.list-cell-time {
+						width: 100%;
+						height: 28rpx;
+						line-height: 28rpx;
+						text-align: left;
+						font-size: $font-size-20;
+						color: #999999;
 					}
 				}
-				.coupon-btn{
-					width: 100%;
-					height: 78rpx;
-					background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
-					background-size: cover;
-					line-height: 78rpx;
-					text-align: center;
-					color: #FFFFFF;
-					font-size: $font-size-36;
-				}
+			}
+			.coupon-btn {
+				width: 100%;
+				height: 78rpx;
+				background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
+				background-size: cover;
+				line-height: 78rpx;
+				text-align: center;
+				color: #ffffff;
+				font-size: $font-size-36;
 			}
 		}
 	}
+}
 </style>