|
@@ -1,33 +1,36 @@
|
|
<template>
|
|
<template>
|
|
<view class="container order clearfix" :style="{paddingBottom :isIphoneX ? '170rpx' : '134rpx'}">
|
|
<view class="container order clearfix" :style="{paddingBottom :isIphoneX ? '170rpx' : '134rpx'}">
|
|
|
|
+ <!-- 透明模态层 -->
|
|
|
|
+ <modal-layer v-if='modallayer'></modal-layer>
|
|
<!-- 地址选择 -->
|
|
<!-- 地址选择 -->
|
|
<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
|
|
<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
|
|
<!-- 商品 -->
|
|
<!-- 商品 -->
|
|
- <goods-list ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></goods-list>
|
|
|
|
|
|
+ <seller-goodsList ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></seller-goodsList>
|
|
<!-- 发票信息 -->
|
|
<!-- 发票信息 -->
|
|
- <invoice-tent ref="invoice"
|
|
|
|
- v-if="isRequest"
|
|
|
|
- :invoiceDatas="invoiceData"
|
|
|
|
- @handleChoiceaInvoice="handleChoiceaInvoiceData">
|
|
|
|
- </invoice-tent>
|
|
|
|
|
|
+ <seller-invoice ref="invoice"
|
|
|
|
+ v-if="isRequest && isDepositFlg"
|
|
|
|
+ :invoiceDatas="invoiceData"
|
|
|
|
+ @handleChoiceaInvoice="handleChoiceaInvoiceData">
|
|
|
|
+ </seller-invoice>
|
|
<!-- 运费 -->
|
|
<!-- 运费 -->
|
|
- <freight ref="freight"
|
|
|
|
- v-if="isFreight"
|
|
|
|
- :freightData="freightData"
|
|
|
|
- @confirmFreight="hanldFreightFn">
|
|
|
|
- </freight>
|
|
|
|
|
|
+ <seller-freight ref="freight"
|
|
|
|
+ v-if="isFreight && isDepositFlg"
|
|
|
|
+ :freightDatas="freightData"
|
|
|
|
+ @handleChoiceaFreight="handleChoiceaFreightData"
|
|
|
|
+ @showFreightAlert="handFreightAlertShow">
|
|
|
|
+ </seller-freight>
|
|
<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
|
|
<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
|
|
<!-- 余额抵扣 -->
|
|
<!-- 余额抵扣 -->
|
|
- <view class="invoice-balance" v-show="!rechargeGoods">
|
|
|
|
|
|
+ <view class="invoice-balance" v-if="!rechargeGoods">
|
|
<view class="balabce-t">
|
|
<view class="balabce-t">
|
|
<view class="balabce-t-le">余额抵扣</view>
|
|
<view class="balabce-t-le">余额抵扣</view>
|
|
<view class="balabce-t-ri">
|
|
<view class="balabce-t-ri">
|
|
<view class="money">
|
|
<view class="money">
|
|
<text>可用余额:</text>
|
|
<text>可用余额:</text>
|
|
- <text>¥{{userMoney | NumFormat}}</text>
|
|
|
|
|
|
+ <text>¥{{ userMoney | NumFormat }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="checkbox-box">
|
|
<view class="checkbox-box">
|
|
- <button class="checkbox iconfont"
|
|
|
|
|
|
+ <button class="checkbox iconfont"
|
|
hover-class="btn-hover"
|
|
hover-class="btn-hover"
|
|
v-if="userMoney!=0"
|
|
v-if="userMoney!=0"
|
|
@click.stop="checkedBalabce"
|
|
@click.stop="checkedBalabce"
|
|
@@ -37,12 +40,24 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="balabce-b" :class="{'balabce-b--hide':!ischecked}">
|
|
|
|
|
|
+ <view class="balabce-b" :class="{'balabce-b--hide':!ischecked}">
|
|
<view class="balabce-b-text animation" :style="{'transform':ischecked?'translateY(0)':'translateY(-50%)','-webkit-transform':ischecked?'translateY(0)':'translateY(-50%)'}">
|
|
<view class="balabce-b-text animation" :style="{'transform':ischecked?'translateY(0)':'translateY(-50%)','-webkit-transform':ischecked?'translateY(0)':'translateY(-50%)'}">
|
|
- <text>当前使用:¥{{deductMoney | NumFormat}},剩余:¥{{surplusMoney | NumFormat}}</text>
|
|
|
|
|
|
+ <text>当前使用:¥{{deductMoney | NumFormat}},剩余:¥{{ surplusMoney | NumFormat }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 售后条例 -->
|
|
|
|
+ <seller-regulations ref="regulations"
|
|
|
|
+ v-if="isRequest && isDepositFlg&&seconDepositFlg"
|
|
|
|
+ :regulaDatas="regulationsData"
|
|
|
|
+ @handleData="claData">
|
|
|
|
+ </seller-regulations>
|
|
|
|
+ <regula-alert v-if="isregulaTip" ref="csPhone"></regula-alert>
|
|
|
|
+ <!-- 返佣订单 -->
|
|
|
|
+ <view class="Rebate" @click="RebateChang" v-if="goodsData.length==1 && secondflag && isDepositFlg">
|
|
|
|
+ <text class="rebate-title">返佣订单</text>
|
|
|
|
+ <text class="iconfont" :class="rebatecheck?'icon-yixuanze':'icon-weixuanze'" ></text>
|
|
|
|
+ </view>
|
|
<!-- 底部 -->
|
|
<!-- 底部 -->
|
|
<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
|
|
<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
|
|
<view class="footer-le">
|
|
<view class="footer-le">
|
|
@@ -50,7 +65,7 @@
|
|
<text>共{{allCount}}件商品</text>
|
|
<text>共{{allCount}}件商品</text>
|
|
</view>
|
|
</view>
|
|
<view class="footer-price">
|
|
<view class="footer-price">
|
|
- <view class="sum-none" v-if="reducedPrice>0">
|
|
|
|
|
|
+ <view class="sum-none" v-if="reducedPrice > 0">
|
|
<text class="money-sign">¥</text>
|
|
<text class="money-sign">¥</text>
|
|
<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
|
|
<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
|
|
<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
|
|
<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
|
|
@@ -59,36 +74,40 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="footer-submit" @click.stop="orderSubmitMit">
|
|
<view class="footer-submit" @click.stop="orderSubmitMit">
|
|
- <view class="btn" :class="isSubLoading ? 'disabled' : ''" >提交订单</view>
|
|
|
|
|
|
+ <view class="btn">提交订单</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import choiceAddress from '@/components/cm-module/creatOrder/choiceAddress'
|
|
|
|
- import goodsList from '@/components/cm-module/creatOrder/goodsList'
|
|
|
|
- import invoiceTent from '@/components/cm-module/creatOrder/invoiceTent'
|
|
|
|
- import freight from '@/components/cm-module/creatOrder/freight'
|
|
|
|
- import freightAlert from '@/components/cm-module/modelAlert/freightAlert'
|
|
|
|
-
|
|
|
|
|
|
+ import choiceAddress from '@/components/cm-module/creatOrder/sellerAddress'
|
|
|
|
+ import sellerGoodsList from '@/components/cm-module/creatOrder/sellerGoodsList'
|
|
|
|
+ import sellerInvoice from '@/components/cm-module/creatOrder/sellerInvoice'
|
|
|
|
+ import sellerFreight from '@/components/cm-module/creatOrder/sellerFreight'
|
|
|
|
+ import freightAlert from '@/components/cm-module/modelAlert/freightAlert.vue'
|
|
|
|
+ import sellerRegulations from '@/components/cm-module/creatOrder/sellerRegulations.vue'
|
|
|
|
+ import modalLayer from "@/components/modal-layer"
|
|
export default {
|
|
export default {
|
|
components:{
|
|
components:{
|
|
choiceAddress,
|
|
choiceAddress,
|
|
- goodsList,
|
|
|
|
- invoiceTent,
|
|
|
|
- freight,
|
|
|
|
- freightAlert
|
|
|
|
|
|
+ sellerGoodsList,
|
|
|
|
+ sellerInvoice,
|
|
|
|
+ sellerFreight,
|
|
|
|
+ freightAlert,
|
|
|
|
+ modalLayer,
|
|
|
|
+ sellerRegulations
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- isSubLoading:false,
|
|
|
|
|
|
+ modallayer:false,
|
|
orderID:0,
|
|
orderID:0,
|
|
|
|
+ clubID:'',
|
|
productIds:'', //获取上一级页面商品信息
|
|
productIds:'', //获取上一级页面商品信息
|
|
productCount:'', //获取上一级页面商品数量
|
|
productCount:'', //获取上一级页面商品数量
|
|
classifyIDS:'', //获取上一级页面商品分类
|
|
classifyIDS:'', //获取上一级页面商品分类
|
|
- userID:'', //用户ID
|
|
|
|
- cartType:'', //购买类型(1购物车提交,2直接购买提交)
|
|
|
|
|
|
+ serviceProviderId:'', //协销ID
|
|
|
|
+ cartType:3, //购买类型(1购物车提交,2直接购买提交,3协销下单)
|
|
submitState:'', //提交状态
|
|
submitState:'', //提交状态
|
|
balanceDeductionFlag:2, //勾选余额的状态(1使用,2不使用)
|
|
balanceDeductionFlag:2, //勾选余额的状态(1使用,2不使用)
|
|
allCount:1, //订单提交总数量
|
|
allCount:1, //订单提交总数量
|
|
@@ -106,78 +125,124 @@
|
|
isAddress:false, //是否加载完成地址
|
|
isAddress:false, //是否加载完成地址
|
|
isfreightTip:false, //控制邮费弹窗
|
|
isfreightTip:false, //控制邮费弹窗
|
|
ischecked:false, //是否勾选余额
|
|
ischecked:false, //是否勾选余额
|
|
- hanldFreePostFlag:'', //邮费状态
|
|
|
|
- hanldFreight:'', //邮费
|
|
|
|
addressData:{}, //初始化地址信息
|
|
addressData:{}, //初始化地址信息
|
|
goodsData:[], //初始化商品信息
|
|
goodsData:[], //初始化商品信息
|
|
invoiceData:{type:0}, //初始化发票信息
|
|
invoiceData:{type:0}, //初始化发票信息
|
|
freightData:{}, //邮费数据
|
|
freightData:{}, //邮费数据
|
|
orderInfo:[], //提交的商品信息
|
|
orderInfo:[], //提交的商品信息
|
|
payInfo:{}, //订单信息
|
|
payInfo:{}, //订单信息
|
|
- rechargeGoods:null, //判断订单里有定金商品或者充值商品时,余额抵扣部分不显示
|
|
|
|
- isIphoneX:this.$store.state.isIphoneX
|
|
|
|
|
|
+ rechargeGoods:false,
|
|
|
|
+ isDepositFlg:true,
|
|
|
|
+ depositIds : [6060,6061,6062,6063,6064,6065,6066,6067,6068,6069],//定金&充值余额商品ID
|
|
|
|
+ isIphoneX:this.$store.state.isIphoneX,
|
|
|
|
+ regulationsData:[],
|
|
|
|
+ clauseId:0,
|
|
|
|
+ seconDepositFlg:true,
|
|
|
|
+ rebateFlag:0,
|
|
|
|
+ rebatecheck:false,
|
|
|
|
+ productsList:[],
|
|
|
|
+ secondflag:true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option){//商品数据
|
|
onLoad(option){//商品数据
|
|
let data = JSON.parse(option.data);
|
|
let data = JSON.parse(option.data);
|
|
|
|
+ this.allPrice = data.data.allPrice;
|
|
|
|
+ this.allCount = data.data.allCount;
|
|
|
|
+ this.payAllPrice = this.allPrice;
|
|
|
|
+ this.clubId = data.data.clubId
|
|
|
|
+ this.productCount = data.data.productCount
|
|
|
|
+ this.productIds = data.data.productID
|
|
if(option.type =='prodcut'){
|
|
if(option.type =='prodcut'){
|
|
- this.cartType = 2
|
|
|
|
- this.productCount = data.data.productCount
|
|
|
|
- this.productIds = data.data.productID
|
|
|
|
|
|
+ this.getInitProdcutCrearOrder();
|
|
}else{
|
|
}else{
|
|
- this.cartType = 1
|
|
|
|
- this.productCount = data.data.productCount
|
|
|
|
- this.productIds = data.data.productID
|
|
|
|
|
|
+ this.getInitCrearOrder();
|
|
}
|
|
}
|
|
- this.$api.getStorage().then((resolve) =>{
|
|
|
|
- this.userID = resolve.userID
|
|
|
|
- this.getInitCrearOrder(option);
|
|
|
|
|
|
+
|
|
|
|
+ this.$api.getComStorage('orderUserInfo').then((resolve) =>{
|
|
|
|
+ this.clubUserId = resolve.userID
|
|
})
|
|
})
|
|
},
|
|
},
|
|
filters:{
|
|
filters:{
|
|
NumFormat(value) {//处理金额
|
|
NumFormat(value) {//处理金额
|
|
return Number(value).toFixed(2);
|
|
return Number(value).toFixed(2);
|
|
},
|
|
},
|
|
- },
|
|
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
- getInitCrearOrder(option){//获取订单商品信息
|
|
|
|
- let params ={userId:this.userID,count:this.productCount,productIds:this.productIds}
|
|
|
|
- this.OrderService.CreateOrderInfo(params).then(response =>{
|
|
|
|
- let resData = response.data
|
|
|
|
- this.isRequest = true
|
|
|
|
- this.goodsData = resData.list
|
|
|
|
- this.userMoney = resData.userMoney
|
|
|
|
- this.reducedPrice = resData.reducedPrice
|
|
|
|
- this.allPrice = this.payAllPrice = resData.totalPrice
|
|
|
|
- this.totalOriginalPrice = resData.totalOriginalPrice
|
|
|
|
- this.rechargeGoods = resData.rechargeGoods
|
|
|
|
- }).catch(error =>{
|
|
|
|
- this.$util.msg(error.msg,2000)
|
|
|
|
|
|
+ RebateChang(){
|
|
|
|
+ this.rebatecheck = !this.rebatecheck;
|
|
|
|
+ if(this.rebatecheck){
|
|
|
|
+ this.rebateFlag=1;
|
|
|
|
+ }else{
|
|
|
|
+ this.rebateFlag=0;
|
|
|
|
+ }
|
|
|
|
+ console.log(this.rebateFlag)
|
|
|
|
+ },
|
|
|
|
+ getInitProdcutCrearOrder(option){//二手下单初始化查询
|
|
|
|
+ this.$api.getStorage().then((resolve) =>{
|
|
|
|
+ this.seconDepositFlg = false;
|
|
|
|
+ this.serviceProviderId = resolve.serviceProviderID
|
|
|
|
+ let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,productCount:this.productCount,productId:this.productIds}
|
|
|
|
+ this.SellerService.GetSettlementBySencondProduct(params).then(response =>{
|
|
|
|
+ let resData = response.data
|
|
|
|
+ this.isRequest = true
|
|
|
|
+ this.goodsData = resData.shopList
|
|
|
|
+ this.userMoney = resData.userMoney
|
|
|
|
+ this.secondflag = false
|
|
|
|
+ }).catch(error =>{
|
|
|
|
+ this.$util.msg(error.msg,2000)
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getInitCrearOrder(option){//协销购物车跳转确认订单初始化信息
|
|
|
|
+ this.$api.getStorage().then((resolve) =>{
|
|
|
|
+ this.serviceProviderId = resolve.serviceProviderID
|
|
|
|
+ let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,count:this.productCount,productIds:this.productIds}
|
|
|
|
+ this.SellerService.SellerSettlement(params).then(response =>{
|
|
|
|
+ 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.allPrice = this.payAllPrice = data.totalAmount
|
|
|
|
+ this.regulationsData = data.clauseList
|
|
|
|
+ this.goodsData.forEach(item =>{
|
|
|
|
+ this.productsList = item.productsList
|
|
|
|
+ item.productsList.forEach(pros =>{
|
|
|
|
+ if(this.depositIds.indexOf(pros.productID)>=0){
|
|
|
|
+ this.isDepositFlg = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ console.log(this.isDepositFlg)
|
|
|
|
+ }).catch(error =>{
|
|
|
|
+ this.$util.msg(error.msg,2000)
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getFreightData(){//获取邮费信息
|
|
getFreightData(){//获取邮费信息
|
|
- let params ={
|
|
|
|
- userId:this.userID,
|
|
|
|
- productIds:this.productIds,
|
|
|
|
- totalPrice:this.allPrice,
|
|
|
|
- townId:this.addressData.townID
|
|
|
|
- }
|
|
|
|
- this.OrderService.GetOrderPostage(params).then(response =>{
|
|
|
|
- this.isFreight = true
|
|
|
|
- this.freightData = response.data
|
|
|
|
- this.hanldFreePostFlag = response.data.freePostFlag
|
|
|
|
- this.hanldFreight = response.data.freight
|
|
|
|
- if(this.hanldFreePostFlag == 1){
|
|
|
|
- this.payAllPrice = this.allPrice + response.data.freight
|
|
|
|
- this.attributePallPrice()
|
|
|
|
- }else{
|
|
|
|
- this.payAllPrice = this.allPrice
|
|
|
|
- this.attributePallPrice()
|
|
|
|
- }
|
|
|
|
|
|
+ this.$api.getComStorage('orderUserInfo').then((resolve) =>{
|
|
|
|
+ let params ={
|
|
|
|
+ userId:resolve.userID,
|
|
|
|
+ productIds:this.productIds,
|
|
|
|
+ totalPrice:this.allPrice,
|
|
|
|
+ townId:this.addressData.townID
|
|
|
|
+ }
|
|
|
|
+ this.OrderService.GetOrderPostage(params).then(response =>{
|
|
|
|
+ this.isFreight = true
|
|
|
|
+ this.freightData = response.data
|
|
|
|
+ if(response.data.freePostFlag== 1){
|
|
|
|
+ this.payAllPrice = this.allPrice+response.data.freight
|
|
|
|
+ }else{
|
|
|
|
+ this.payAllPrice = this.allPrice
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getAddressData(){//获取地址信息
|
|
getAddressData(){//获取地址信息
|
|
- this.$api.getStorage().then((resolve) => {
|
|
|
|
|
|
+ this.$api.getComStorage('orderUserInfo').then((resolve) =>{
|
|
this.UserService.QueryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
|
|
this.UserService.QueryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
|
|
this.isAddress = true
|
|
this.isAddress = true
|
|
this.addressData = {}
|
|
this.addressData = {}
|
|
@@ -198,22 +263,20 @@
|
|
handleChoiceaInvoiceData(data){//获取发票信息
|
|
handleChoiceaInvoiceData(data){//获取发票信息
|
|
this.invoiceData = data
|
|
this.invoiceData = data
|
|
},
|
|
},
|
|
- hanldFreightFn(data){//显示邮费弹窗
|
|
|
|
- switch(data){
|
|
|
|
- case 1:
|
|
|
|
- this.hanldFreight = this.freightData.freight
|
|
|
|
- this.hanldFreePostFlag = data
|
|
|
|
- this.payAllPrice =this.allPrice + this.hanldFreight
|
|
|
|
- this.attributePallPrice()
|
|
|
|
- break
|
|
|
|
- case -1:
|
|
|
|
- this.hanldFreight = 0
|
|
|
|
- this.hanldFreePostFlag = data
|
|
|
|
- this.payAllPrice = this.allPrice
|
|
|
|
- this.attributePallPrice()
|
|
|
|
- break
|
|
|
|
|
|
+ handleChoiceaFreightData(data){//获取运费信息
|
|
|
|
+ if(data.freePostFlag == '1'){
|
|
|
|
+ this.freightData = data
|
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(data.freight)
|
|
|
|
+ this.attributePallPrice()
|
|
|
|
+ }else{
|
|
|
|
+ this.freightData = data
|
|
|
|
+ this.payAllPrice = this.allPrice
|
|
|
|
+ this.attributePallPrice()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ claData(id){
|
|
|
|
+ this.clauseId = id;
|
|
|
|
+ },
|
|
checkedBalabce(){//勾选使用余额
|
|
checkedBalabce(){//勾选使用余额
|
|
if(this.userMoney > 0){
|
|
if(this.userMoney > 0){
|
|
this.ischecked = !this.ischecked
|
|
this.ischecked = !this.ischecked
|
|
@@ -221,19 +284,19 @@
|
|
this.balanceDeductionFlag =1
|
|
this.balanceDeductionFlag =1
|
|
this.attributePallPrice()
|
|
this.attributePallPrice()
|
|
}else{
|
|
}else{
|
|
- if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
|
|
|
|
|
|
+ this.balanceDeductionFlag = 2
|
|
|
|
+ if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
|
|
this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
|
|
}else{
|
|
}else{
|
|
this.payAllPrice = this.allPrice
|
|
this.payAllPrice = this.allPrice
|
|
}
|
|
}
|
|
- this.balanceDeductionFlag = 2
|
|
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ },
|
|
attributePallPrice(){//计算价格
|
|
attributePallPrice(){//计算价格
|
|
- if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
|
|
|
|
|
|
+ if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
this.attributeHashfreight(this.freightData.freight)
|
|
this.attributeHashfreight(this.freightData.freight)
|
|
}else{
|
|
}else{
|
|
this.attributeNofreight()
|
|
this.attributeNofreight()
|
|
@@ -275,65 +338,82 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
orderSubmitMit(){//提交订单
|
|
orderSubmitMit(){//提交订单
|
|
- if(this.isSubLoading){ return; }
|
|
|
|
if(this.addressID == ''){
|
|
if(this.addressID == ''){
|
|
this.$util.msg('请先添加收货地址~',2000)
|
|
this.$util.msg('请先添加收货地址~',2000)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ // 处理商品信息及留言
|
|
this.orderInfo = this.goodsData.map(el => {
|
|
this.orderInfo = this.goodsData.map(el => {
|
|
let productInfo = [];
|
|
let productInfo = [];
|
|
- el.cartList.forEach(item => {
|
|
|
|
|
|
+ el.productsList.forEach(item => {
|
|
productInfo.push({
|
|
productInfo.push({
|
|
- productId:item.productId,
|
|
|
|
- productNum:item.number,
|
|
|
|
|
|
+ productId:item.productID,
|
|
|
|
+ productNum:item.productCount,
|
|
|
|
+ productType:item.giftType ? Number(item.giftType) : 0,
|
|
presentNum:0,
|
|
presentNum:0,
|
|
- productType:item.productType
|
|
|
|
})
|
|
})
|
|
- })
|
|
|
|
- return {shopId:el.id,note:el.note?el.note:'',productInfo:productInfo}
|
|
|
|
|
|
+ })
|
|
|
|
+ return {shopId:el.shopID,note:el.note?el.note:'',productInfo:productInfo}
|
|
})
|
|
})
|
|
//订单信息
|
|
//订单信息
|
|
this.payInfo = {
|
|
this.payInfo = {
|
|
- clauseId:0,//条款(暂时保留)
|
|
|
|
orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
|
|
orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
|
|
balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
|
|
balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
|
|
- freight:parseInt(this.hanldFreight).toFixed(2),//邮费
|
|
|
|
- freePostFlag:parseInt(this.hanldFreePostFlag)//运费形式
|
|
|
|
|
|
+ freight:parseInt(this.freightData.freight).toFixed(2),//邮费
|
|
|
|
+ freePostFlag:parseInt(this.freightData.freePostFlag),//运费形式
|
|
|
|
+ clauseId:this.clauseId,//售后条款
|
|
|
|
+ rebateFlag:this.rebateFlag,//返佣
|
|
}
|
|
}
|
|
- let param = {
|
|
|
|
- orderSource:6,
|
|
|
|
- clubUserId:this.userID,
|
|
|
|
- cartType:this.cartType,
|
|
|
|
- addressId:this.addressID,
|
|
|
|
- orderInfo:this.orderInfo,
|
|
|
|
- payInfo:this.payInfo, //订单信息
|
|
|
|
- orderInvoice:this.invoiceData
|
|
|
|
- }
|
|
|
|
- // console.log(param)
|
|
|
|
- this.isSubLoading = true;
|
|
|
|
- this.OrderService.CreatedOrderSubmit({'params':JSON.stringify(param)}).then(response =>{
|
|
|
|
- const data = response.data;
|
|
|
|
- if(data.code === '1'){
|
|
|
|
- this.submitState ='success'
|
|
|
|
- this.isSubLoading = false;
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- this.isSubLoading = false;
|
|
|
|
- },2000)
|
|
|
|
- let data = {orderID:response.data.orderID}
|
|
|
|
- this.$api.navigateTo(`/pages/user/order/success?data=${JSON.stringify({data:data})}`)
|
|
|
|
- }else{
|
|
|
|
- this.submitState ='confirm'
|
|
|
|
- this.$util.msg('订单提交成功',3000,true,'success')
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- this.isSubLoading = false;
|
|
|
|
- },2000)
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- this.$api.redirectTo(`/pages/user/order/order-payment?type=${this.submitState}&orderID=${response.data.orderID}`)
|
|
|
|
- },3000)
|
|
|
|
|
|
+ console.log(this.payInfo)
|
|
|
|
+ let params = {
|
|
|
|
+ orderSource:6, //提交来源
|
|
|
|
+ clubUserId:this.clubUserId, //机构UserID
|
|
|
|
+ cartType:this.cartType, //从购物车提交
|
|
|
|
+ serviceProviderId:this.serviceProviderId,//帮下单协销ID
|
|
|
|
+ addressId:this.addressID, //地址ID
|
|
|
|
+ orderInfo:this.orderInfo, //商品信息
|
|
|
|
+ payInfo:this.payInfo, //订单信息
|
|
|
|
+ orderInvoice:this.invoiceData //发票信息
|
|
}
|
|
}
|
|
- }).catch(error =>{
|
|
|
|
- this.$util.msg(error.msg,3000);
|
|
|
|
- })
|
|
|
|
|
|
+ this.modalLayer = true;
|
|
|
|
+ if(this.rebateFlag == 1){
|
|
|
|
+ this.$util.modal('','确定该订单为返佣订单吗?点击确定按钮继续提交订单','确定','取消',true,() =>{
|
|
|
|
+ this.SellerService.SellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
|
|
|
|
+ const data = response.data;
|
|
|
|
+ if(data.code === '1'){
|
|
|
|
+ this.$util.msg('支付成功',2000,true,'success')
|
|
|
|
+ setTimeout(() =>{
|
|
|
|
+ this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
|
|
|
|
+ },2000)
|
|
|
|
+ }else{
|
|
|
|
+ this.$util.msg('订单提交成功',2000,true,'success')
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
|
|
|
|
+ },2000)
|
|
|
|
+ }
|
|
|
|
+ }).catch(error =>{
|
|
|
|
+ this.$util.msg(error.msg,2000);
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }else{
|
|
|
|
+ this.SellerService.SellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
|
|
|
|
+ const data = response.data;
|
|
|
|
+ if(data.code === '1'){
|
|
|
|
+ this.$util.msg('支付成功',2000,true,'success')
|
|
|
|
+ setTimeout(() =>{
|
|
|
|
+ this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
|
|
|
|
+ },2000)
|
|
|
|
+ }else{
|
|
|
|
+ this.$util.msg('订单提交成功',2000,true,'success')
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
|
|
|
|
+ },2000)
|
|
|
|
+ }
|
|
|
|
+ }).catch(error =>{
|
|
|
|
+ this.$util.msg(error.msg,2000);
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
handFreightAlertShow(){//显示邮费弹窗
|
|
handFreightAlertShow(){//显示邮费弹窗
|
|
this.isfreightTip = true;
|
|
this.isfreightTip = true;
|
|
@@ -343,7 +423,7 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- // this.addressID = ''
|
|
|
|
|
|
+ // this.addressID = ''
|
|
let pages = getCurrentPages();
|
|
let pages = getCurrentPages();
|
|
let currPage = pages[pages.length-1];
|
|
let currPage = pages[pages.length-1];
|
|
if(currPage.data.select =='select'){
|
|
if(currPage.data.select =='select'){
|
|
@@ -373,9 +453,6 @@
|
|
transition-duration: 0.3s;
|
|
transition-duration: 0.3s;
|
|
transition-timing-function: ease;
|
|
transition-timing-function: ease;
|
|
}
|
|
}
|
|
- .order{
|
|
|
|
- padding-bottom: 134rpx;
|
|
|
|
- }
|
|
|
|
.invoice-freight{
|
|
.invoice-freight{
|
|
width: 702rpx;
|
|
width: 702rpx;
|
|
padding: 0 24rpx;
|
|
padding: 0 24rpx;
|
|
@@ -443,12 +520,13 @@
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-tap-highlight-color: transparent;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
color: $color-system;
|
|
color: $color-system;
|
|
|
|
+ padding: 5rpx;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.balabce-b{
|
|
.balabce-b{
|
|
- width: 100%;
|
|
|
|
|
|
+ width: 100%;
|
|
float: left;
|
|
float: left;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
.balabce-b-text{
|
|
.balabce-b-text{
|
|
@@ -463,7 +541,7 @@
|
|
padding: 0 0;
|
|
padding: 0 0;
|
|
height: 0px;
|
|
height: 0px;
|
|
line-height: 0px;
|
|
line-height: 0px;
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.footer{
|
|
.footer{
|
|
@@ -489,8 +567,9 @@
|
|
.footer-count{
|
|
.footer-count{
|
|
float: left;
|
|
float: left;
|
|
padding-left: 24rpx;
|
|
padding-left: 24rpx;
|
|
- width:180rpx;
|
|
|
|
|
|
+ width:190rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
+ font-size: $font-size-26;
|
|
}
|
|
}
|
|
.footer-price{
|
|
.footer-price{
|
|
width:370rpx;
|
|
width:370rpx;
|
|
@@ -555,12 +634,32 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|
|
border-radius: 40rpx;
|
|
border-radius: 40rpx;
|
|
- &.disabled{
|
|
|
|
- background: #e4e8eb;
|
|
|
|
- color: #999999;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .Rebate{
|
|
|
|
+ width: 702rpx;
|
|
|
|
+ height: auto;
|
|
|
|
+ padding: 0 24rpx;
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
+ float: left;
|
|
|
|
+ margin-bottom: 24rpx;
|
|
|
|
+ margin-bottom: 24rpx;
|
|
|
|
+ line-height: 86rpx;
|
|
|
|
+ .rebate-title{
|
|
|
|
+ float: left;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #333333;
|
|
|
|
+ font-size: $font-size-28;
|
|
|
|
+ }
|
|
|
|
+ .iconfont{
|
|
|
|
+ float: right;
|
|
|
|
+ color: #b2b2b2;
|
|
|
|
+ font-size: 40rpx;
|
|
|
|
+ &.icon-yixuanze{
|
|
|
|
+ color: $color-system;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
</style>
|
|
</style>
|