|
@@ -18,9 +18,13 @@
|
|
|
@handleChoiceaInvoice="handleChoiceaInvoiceData">
|
|
|
</seller-invoice>
|
|
|
<!-- 优惠券选择弹窗 -->
|
|
|
- <sellerCoupon ref="coupon" v-if="isRequest"></sellerCoupon>
|
|
|
+ <sellerCoupon ref="coupon"
|
|
|
+ v-if="isCouponShow"
|
|
|
+ :couponList="couponList"
|
|
|
+ @handleChoiceaCoupon="handleChoiceaCouponData">
|
|
|
+ </sellerCoupon>
|
|
|
<!-- 兑换优惠券弹窗 -->
|
|
|
- <exchangeCoupon v-if="isExchangePopup"></exchangeCoupon>
|
|
|
+ <sellerExchangeCoupon v-if="isExchangePopup"></sellerExchangeCoupon>
|
|
|
<!-- 运费 -->
|
|
|
<seller-freight ref="freight"
|
|
|
v-if="isFreight && isDepositFlg"
|
|
@@ -69,18 +73,51 @@
|
|
|
<text>共{{allCount}}件商品</text>
|
|
|
</view>
|
|
|
<view class="footer-price">
|
|
|
- <view class="sum-none" v-if="reducedPrice > 0">
|
|
|
- <text class="money-sign">¥</text>
|
|
|
- <text class="money">{{ totalOriginalPrice | NumFormat }}</text>
|
|
|
- <text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
|
|
|
+ <view class="sum" :class="totalDiscountAmount == 0 ? 'none' : ''">
|
|
|
+ 总价:<text class="price">¥{{payAllPrice | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="sum-none" v-if="totalDiscountAmount > 0">
|
|
|
+ <text class="money-reduced">共减<text>¥{{ totalDiscountAmount | NumFormat}}</text></text>
|
|
|
</view>
|
|
|
- <view class="sum" :class="reducedPrice == 0 ? 'none' : ''">总价:<text class="price">¥{{payAllPrice | NumFormat}}</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="footer-submit" @click.stop="orderSubmitMit">
|
|
|
<view class="btn">提交订单</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">{{ ExchangeCouponData.couponType | TypeFormat }}</text></view>
|
|
|
+ <view class="list-cell-le">
|
|
|
+ <view class="coupon-maxMoney">
|
|
|
+ <text class="small">¥</text>
|
|
|
+ {{ ExchangeCouponData.couponAmount }}
|
|
|
+ </view>
|
|
|
+ <view class="coupon-minMoney">
|
|
|
+ <text class="txt">满{{ ExchangeCouponData.touchPrice }}可用</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="list-cell-ri">
|
|
|
+ <view class="list-cell-top">
|
|
|
+ <text v-if="ExchangeCouponData.couponType == 0">
|
|
|
+ {{ ExchangeCouponData.productType && ExchangeCouponData.productType == 1 ? '全商城商品通用' : '仅可购买指定商品' }}
|
|
|
+ </text>
|
|
|
+ <text v-if="ExchangeCouponData.couponType == 1">
|
|
|
+ {{ ExchangeCouponData.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
|
|
|
+ </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.endDate }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="coupon-btn" @click.stop="handleClickCancel">立即收下</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -91,7 +128,7 @@
|
|
|
import sellerFreight from '@/components/cm-module/creatOrder/sellerFreight'
|
|
|
import freightAlert from '@/components/cm-module/modelAlert/freightAlert.vue'
|
|
|
import sellerCoupon from '@/components/cm-module/creatOrder/sellerCoupon'
|
|
|
- import exchangeCoupon from '@/components/cm-module/creatOrder/exchangeCoupon'
|
|
|
+ import sellerExchangeCoupon from '@/components/cm-module/creatOrder/sellerExchangeCoupon'
|
|
|
import sellerRegulations from '@/components/cm-module/creatOrder/sellerRegulations.vue'
|
|
|
import modalLayer from "@/components/modal-layer"
|
|
|
export default {
|
|
@@ -101,7 +138,7 @@
|
|
|
sellerInvoice,
|
|
|
sellerFreight,
|
|
|
sellerCoupon,
|
|
|
- exchangeCoupon,
|
|
|
+ sellerExchangeCoupon,
|
|
|
freightAlert,
|
|
|
modalLayer,
|
|
|
sellerRegulations
|
|
@@ -111,35 +148,38 @@
|
|
|
modallayer:false,
|
|
|
orderID:0,
|
|
|
clubID:'',
|
|
|
- productIds:'', //获取上一级页面商品信息
|
|
|
- productCount:'', //获取上一级页面商品数量
|
|
|
- classifyIDS:'', //获取上一级页面商品分类
|
|
|
- serviceProviderId:'', //协销ID
|
|
|
- cartType:3, //购买类型(1购物车提交,2直接购买提交,3协销下单)
|
|
|
- submitState:'', //提交状态
|
|
|
- balanceDeductionFlag:2, //勾选余额的状态(1使用,2不使用)
|
|
|
- allCount:1, //订单提交总数量
|
|
|
- totalOriginalPrice:0, //订单总原价(划线部分)
|
|
|
- reducedPrice:0, //满减金额
|
|
|
- payAllPrice:0.00, //订单提交总金额
|
|
|
- allPrice:0.00, //订单总金额
|
|
|
- surplusMoney:0.00, //显示勾选后的剩余抵扣
|
|
|
- userMoney:0.00, //显示可使用余额
|
|
|
- deductMoney:0.00, //显示已使用的余额
|
|
|
- addressID:'', //地址ID
|
|
|
- townID:'', //区ID
|
|
|
- isRequest:false, //是否加载完成渲染子组件
|
|
|
- isFreight:false, //是否加载完成渲染子组件
|
|
|
- isAddress:false, //是否加载完成地址
|
|
|
+ productIds:'', // 获取上一级页面商品信息
|
|
|
+ productCount:'', // 获取上一级页面商品数量
|
|
|
+ classifyIDS:'', // 获取上一级页面商品分类
|
|
|
+ serviceProviderId:'', // 协销ID
|
|
|
+ cartType:3, // 购买类型(1购物车提交,2直接购买提交,3协销下单)
|
|
|
+ submitState:'', // 提交状态
|
|
|
+ balanceDeductionFlag:2, // 勾选余额的状态(1使用,2不使用)
|
|
|
+ allCount:1, // 订单提交总数量
|
|
|
+ totalOriginalPrice:0, // 订单总原价(划线部分)
|
|
|
+ reducedPrice:0, // 满减金额
|
|
|
+ couponAmount:0, // 优惠券金额
|
|
|
+ totalDiscountAmount:0, // 共减金额
|
|
|
+ payAllPrice:0.00, // 订单提交总金额
|
|
|
+ allPrice:0.00, // 订单总金额
|
|
|
+ surplusMoney:0.00, // 显示勾选后的剩余抵扣
|
|
|
+ userMoney:0.00, // 显示可使用余额
|
|
|
+ deductMoney:0.00, // 显示已使用的余额
|
|
|
+ addressID:'', // 地址ID
|
|
|
+ townID:'', // 区ID
|
|
|
+ isRequest:false, // 是否加载完成渲染子组件
|
|
|
+ isFreight:false, // 是否加载完成渲染子组件
|
|
|
+ isAddress:false, // 是否加载完成地址
|
|
|
isExchangePopup:false, // 控制兑换优惠券弹窗
|
|
|
- isfreightTip:false, //控制邮费弹窗
|
|
|
- ischecked:false, //是否勾选余额
|
|
|
- addressData:{}, //初始化地址信息
|
|
|
- goodsData:[], //初始化商品信息
|
|
|
- invoiceData:{type:0}, //初始化发票信息
|
|
|
- freightData:{}, //邮费数据
|
|
|
- orderInfo:[], //提交的商品信息
|
|
|
- payInfo:{}, //订单信息
|
|
|
+ isfreightTip:false, // 控制邮费弹窗
|
|
|
+ ischecked:false, // 是否勾选余额
|
|
|
+ addressData:{}, // 初始化地址信息
|
|
|
+ goodsData:[], // 初始化商品信息
|
|
|
+ couponList:[], // 初始化优惠券信息
|
|
|
+ invoiceData:{type:0}, // 初始化发票信息
|
|
|
+ freightData:{}, // 邮费数据
|
|
|
+ orderInfo:[], // 提交的商品信息
|
|
|
+ payInfo:{}, // 订单信息
|
|
|
rechargeGoods:false,
|
|
|
isDepositFlg:true,
|
|
|
depositIds : [6060,6061,6062,6063,6064,6065,6066,6067,6068,6069],//定金&充值余额商品ID
|
|
@@ -150,7 +190,10 @@
|
|
|
rebateFlag:0,
|
|
|
rebatecheck:false,
|
|
|
productsList:[],
|
|
|
- secondflag:true
|
|
|
+ isCouponShow:false, // 是否显示可选优惠券
|
|
|
+ secondflag:true,
|
|
|
+ isCouponModel:false, // 兑换优惠券成功提示
|
|
|
+ ExchangeCouponData:{} // 兑换优惠券信息
|
|
|
}
|
|
|
},
|
|
|
onLoad(option){//商品数据
|
|
@@ -202,19 +245,28 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- getInitCrearOrder(option){//协销购物车跳转确认订单初始化信息
|
|
|
+ getInitCrearOrder(){//协销购物车跳转确认订单初始化信息
|
|
|
this.$api.getStorage().then((resolve) =>{
|
|
|
this.serviceProviderId = resolve.serviceProviderId
|
|
|
- let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,count:this.productCount,productIds:this.productIds}
|
|
|
- this.SellerService.SellerSettlement(params).then(response =>{
|
|
|
+ this.SellerService.SellerSettlement(
|
|
|
+ {
|
|
|
+ clubId:this.clubId,
|
|
|
+ serviceProviderId:this.serviceProviderId,
|
|
|
+ count:this.productCount,
|
|
|
+ productIds:this.productIds,
|
|
|
+ }
|
|
|
+ ).then(response =>{
|
|
|
let data = response.data
|
|
|
- let productIds = []
|
|
|
this.isRequest = true
|
|
|
this.goodsData = data.shopList
|
|
|
this.userMoney = data.userMoney
|
|
|
this.reducedPrice = data.reducedPrice
|
|
|
this.totalOriginalPrice = data.reducedPrice + data.totalAmount
|
|
|
this.rechargeGoods = data.rechargeGoods
|
|
|
+ this.couponList = data.couponList
|
|
|
+ if(this.couponList.length>0){
|
|
|
+ this.isCouponShow = true
|
|
|
+ }
|
|
|
this.allPrice = this.payAllPrice = data.totalAmount
|
|
|
this.regulationsData = data.clauseList
|
|
|
this.goodsData.forEach(item =>{
|
|
@@ -285,6 +337,13 @@
|
|
|
claData(id){
|
|
|
this.clauseId = id;
|
|
|
},
|
|
|
+ handleChoiceaCouponData(data){// 勾选使用优惠券
|
|
|
+ console.log('优惠券信息',data)
|
|
|
+ this.couponAmount = data.couponAmount
|
|
|
+ this.totalDiscountAmount = this.reducedPrice + this.couponAmount;
|
|
|
+ this.clubCouponId = data.clubCouponId
|
|
|
+ this.attributePallPrice()
|
|
|
+ },
|
|
|
checkedBalabce(){//勾选使用余额
|
|
|
if(this.userMoney > 0){
|
|
|
this.ischecked = !this.ischecked
|
|
@@ -317,12 +376,12 @@
|
|
|
this.deductMoney = this.allPrice //勾选后使用抵余额
|
|
|
this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice - this.userMoney //勾选后的总价
|
|
|
+ this.payAllPrice = this.allPrice - this.userMoney - this.couponAmount //勾选后的总价
|
|
|
this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
}
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice;
|
|
|
+ this.payAllPrice = this.allPrice - this.couponAmount;
|
|
|
this.deductMoney = 0.00;
|
|
|
this.surplusMoney = this.userMoney;
|
|
|
}
|
|
@@ -335,12 +394,12 @@
|
|
|
this.deductMoney = this.allPrice+parseInt(freight) //勾选后使用抵余额
|
|
|
this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney //勾选后的总价
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney - this.couponAmount //勾选后的总价
|
|
|
this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
}
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice+parseInt(freight)
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(freight) - this.couponAmount
|
|
|
this.deductMoney = 0.00
|
|
|
this.surplusMoney = this.userMoney
|
|
|
}
|
|
@@ -374,6 +433,7 @@
|
|
|
}
|
|
|
console.log(this.payInfo)
|
|
|
let params = {
|
|
|
+ clubCouponId:this.clubCouponId,
|
|
|
orderSource:6, //提交来源
|
|
|
clubUserId:this.clubUserId, //机构UserID
|
|
|
cartType:this.cartType, //从购物车提交
|
|
@@ -406,6 +466,10 @@
|
|
|
handFreightAlertShow(){//显示邮费弹窗
|
|
|
this.isfreightTip = true;
|
|
|
},
|
|
|
+ handleClickCancel(){// 关闭优惠券弹窗
|
|
|
+ this.isCouponModel = false;
|
|
|
+ this.getInitCrearOrder();
|
|
|
+ },
|
|
|
hideFreight(){//关闭邮费弹窗
|
|
|
this.isfreightTip = false;
|
|
|
},
|
|
@@ -648,5 +712,128 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ .coupon-content-model{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(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;
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ 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;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 230rpx 40rpx 0 40rpx;
|
|
|
+ .coupon-list{
|
|
|
+ width: 100%;
|
|
|
+ height: 147rpx;
|
|
|
+ margin-bottom: 32rpx;
|
|
|
+ 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;
|
|
|
+ text-align: center;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ .list-cell-le{
|
|
|
+ width: 154rpx;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 30rpx 0;
|
|
|
+ float: left;
|
|
|
+ .coupon-maxMoney{
|
|
|
+ width: 100%;
|
|
|
+ height: 54rpx;
|
|
|
+ line-height: 54rpx;
|
|
|
+ font-size: 42rpx;
|
|
|
+ color: #f94b4b;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ .small{
|
|
|
+ font-size: $font-size-20;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .coupon-minMoney{
|
|
|
+ width: 100%;
|
|
|
+ height: 28rpx;
|
|
|
+ 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;
|
|
|
+ float: left;
|
|
|
+ .list-cell-top{
|
|
|
+ width: 100%;
|
|
|
+ height: 64rpx;
|
|
|
+ line-height: 64rpx;
|
|
|
+ font-size: $font-size-26;
|
|
|
+ color: #333333;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|