|
@@ -662,16 +662,13 @@ var shoppingConfirm = new Vue({
|
|
if( _self.hanldShouldPayFee<1000){
|
|
if( _self.hanldShouldPayFee<1000){
|
|
_self.isModelAlert = true;
|
|
_self.isModelAlert = true;
|
|
_self.isModelAlertText = '采购金额过小,将扣除500采美豆。建议您使用微信扫描 以下二维码,进入采美旗下“呵呵商城”小程序购买小额 商品。';
|
|
_self.isModelAlertText = '采购金额过小,将扣除500采美豆。建议您使用微信扫描 以下二维码,进入采美旗下“呵呵商城”小程序购买小额 商品。';
|
|
- }else if(_self.hanldShouldPayFee<1000 && _self.userBeans<0){
|
|
|
|
- _self.isModelAlert = true;
|
|
|
|
- _self.isShowConfirm = false;
|
|
|
|
- _self.isModelAlertText = '采美豆不足,不能提交订单。您可使用微信扫描以下二维码,进入采美旗下“呵呵商城”小程序购买小额商品。';
|
|
|
|
}else{
|
|
}else{
|
|
_self.handleClickOrderSubmitMit()
|
|
_self.handleClickOrderSubmitMit()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleClickOrderSubmitMit:function () {// 提交订单
|
|
handleClickOrderSubmitMit:function () {// 提交订单
|
|
var _self = this;
|
|
var _self = this;
|
|
|
|
+ _self.isModelAlert = false;
|
|
if(_self.submitLoading){return false;}
|
|
if(_self.submitLoading){return false;}
|
|
if(!_self.confirmParam.addressId){
|
|
if(!_self.confirmParam.addressId){
|
|
CAIMEI.dialog('请先添加收货地址~');
|
|
CAIMEI.dialog('请先添加收货地址~');
|
|
@@ -760,6 +757,14 @@ var shoppingConfirm = new Vue({
|
|
CAIMEI.Storage.setItem('confirmOrderInfo',JSON.stringify({data:order}));
|
|
CAIMEI.Storage.setItem('confirmOrderInfo',JSON.stringify({data:order}));
|
|
window.location.href = '/pay/caimei-paycash.html?type=confirm&orderId='+data.orderId;
|
|
window.location.href = '/pay/caimei-paycash.html?type=confirm&orderId='+data.orderId;
|
|
}
|
|
}
|
|
|
|
+ }else if(res.code === -3){
|
|
|
|
+ _self.isModelAlert = true;
|
|
|
|
+ _self.isShowConfirm = false;
|
|
|
|
+ _self.submitLoading = false;
|
|
|
|
+ _self.isModelAlertText = res.msg;
|
|
|
|
+ _self.confirmParam.payInfo = JSON.parse(_self.confirmParam.payInfo);
|
|
|
|
+ _self.confirmParam.orderInfo = JSON.parse(_self.confirmParam.orderInfo);
|
|
|
|
+ _self.confirmParam.orderInvoice = JSON.parse(_self.confirmParam.orderInvoice);
|
|
}else{
|
|
}else{
|
|
CAIMEI.Alert(res.msg,'确定',true, function(){
|
|
CAIMEI.Alert(res.msg,'确定',true, function(){
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
@@ -774,6 +779,7 @@ var shoppingConfirm = new Vue({
|
|
},
|
|
},
|
|
handleCloseModel:function () {
|
|
handleCloseModel:function () {
|
|
this.isModelAlert = false;
|
|
this.isModelAlert = false;
|
|
|
|
+ this.isShowConfirm= true;
|
|
},
|
|
},
|
|
getProductIds: function(list){// 获取订单商品id列表
|
|
getProductIds: function(list){// 获取订单商品id列表
|
|
var productIds = [];
|
|
var productIds = [];
|
|
@@ -789,7 +795,6 @@ var shoppingConfirm = new Vue({
|
|
created: function () {
|
|
created: function () {
|
|
var _self = this;
|
|
var _self = this;
|
|
var urlType = getUrlParam("type") ? getUrlParam("type")*1 : "";
|
|
var urlType = getUrlParam("type") ? getUrlParam("type")*1 : "";
|
|
- console.log('urlType',urlType)
|
|
|
|
if(globalUserData){
|
|
if(globalUserData){
|
|
_self.userId = _self.productParam.userId = _self.cartParam.userId = _self.postageParam.userId = _self.supportParm.userId = globalUserData.userId;
|
|
_self.userId = _self.productParam.userId = _self.cartParam.userId = _self.postageParam.userId = _self.supportParm.userId = globalUserData.userId;
|
|
_self.confirmParam.clubId = globalUserData.clubId
|
|
_self.confirmParam.clubId = globalUserData.clubId
|
|
@@ -798,20 +803,18 @@ var shoppingConfirm = new Vue({
|
|
// type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
|
|
// type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
|
|
if(urlType === 1) {//购物车提交
|
|
if(urlType === 1) {//购物车提交
|
|
_self.confirmParam.cartType = 1;
|
|
_self.confirmParam.cartType = 1;
|
|
- // _self.cartParam.productIds = _self.postageParam.productIds = _self.productIds = window.localStorage.getItem("shoppingProductIds");
|
|
|
|
_self.cartParam.productIds = _self.productIds = window.localStorage.getItem("shoppingProductIds");
|
|
_self.cartParam.productIds = _self.productIds = window.localStorage.getItem("shoppingProductIds");
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
_self.getCartCreateOrderInfo();
|
|
_self.getCartCreateOrderInfo();
|
|
}else if(urlType === 2){//立即购买
|
|
}else if(urlType === 2){//立即购买
|
|
_self.confirmParam.cartType = 2;
|
|
_self.confirmParam.cartType = 2;
|
|
- // _self.productParam.productId = _self.postageParam.productIds = _self.productIds = getUrlParam("productId");
|
|
|
|
_self.productParam.productId = _self.productIds = getUrlParam("productId");
|
|
_self.productParam.productId = _self.productIds = getUrlParam("productId");
|
|
_self.productParam.productCount = getUrlParam("count");
|
|
_self.productParam.productCount = getUrlParam("count");
|
|
if(_self.productParam.productId && _self.productParam.productCount) {
|
|
if(_self.productParam.productId && _self.productParam.productCount) {
|
|
_self.getProductCreateOrderInfo();
|
|
_self.getProductCreateOrderInfo();
|
|
}
|
|
}
|
|
}else if(urlType === 3){// 组合商品立即购买
|
|
}else if(urlType === 3){// 组合商品立即购买
|
|
- _self.supportParm.productInfo = window.localStorage.getItem("KEY_SUPPORE");
|
|
|
|
|
|
+ _self.supportParm.productInfo = CAIMEI.Storage.getItem("KEY_SUPPORE");
|
|
_self.OrderClubProductSupporting()
|
|
_self.OrderClubProductSupporting()
|
|
console.log('_self.supportParm.productInfo',_self.supportParm.productInfo)
|
|
console.log('_self.supportParm.productInfo',_self.supportParm.productInfo)
|
|
}
|
|
}
|