|
@@ -191,6 +191,7 @@
|
|
|
],
|
|
|
contentModalText: '', //操作文字提示语句
|
|
|
modal: false,
|
|
|
+ showModalstauts:1,
|
|
|
isIphoneX:this.$store.state.isIphoneX,
|
|
|
cartParam: {// 购物车立即结算确认订单参数
|
|
|
skuIds:0, // 商品Id(逗号隔开)
|
|
@@ -501,17 +502,9 @@
|
|
|
this.modal = true
|
|
|
this.contentModalText = '请仔细确认订单是否为返佣订单后再提交订单'
|
|
|
},
|
|
|
- handleClick(e){
|
|
|
- //确认提交
|
|
|
- if (e.index == 1) {
|
|
|
- this.SellerCreateOrderSubmit()
|
|
|
- }
|
|
|
- this.modal = false
|
|
|
- },
|
|
|
SellerCreateOrderSubmit(){
|
|
|
//提交订单
|
|
|
if(this.isSubLoading){ return }
|
|
|
-
|
|
|
this.confirmParam.orderInfo = this.goodsData.map(el => {
|
|
|
let productInfo = []
|
|
|
el.cartList.forEach(pros => {
|
|
@@ -524,15 +517,49 @@
|
|
|
})
|
|
|
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(this.confirmParam)
|
|
|
+ console.log('confirmParam',this.confirmParam)
|
|
|
this.isSubLoading = true
|
|
|
- this.SellerService.SellerCreateOrderSubmit(this.confirmParam).then(response =>{
|
|
|
+ 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)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ hanldeOrderSubmit(params){// 提交订单
|
|
|
+ this.SellerService.SellerCreateOrderSubmit(params).then(response =>{
|
|
|
const data = response.data
|
|
|
if(data.code === 1){
|
|
|
this.$util.msg('支付成功',2000,true,'success')
|
|
@@ -600,6 +627,17 @@
|
|
|
this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
|
|
|
}
|
|
|
},
|
|
|
+ handleClick(e){
|
|
|
+ //确认提交
|
|
|
+ if (e.index == 1) {
|
|
|
+ if(this.showModalstauts == 2){
|
|
|
+ this.hanldeOrderSubmit(this.confirmParam)
|
|
|
+ }else{
|
|
|
+ this.SellerCreateOrderSubmit()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.modal = false
|
|
|
+ },
|
|
|
handleSecondFlag(){// 二手订单勾选返佣
|
|
|
this.rebatecheck = !this.rebatecheck
|
|
|
if(this.rebatecheck){
|