|
@@ -129,31 +129,75 @@ var orderPage = new Vue({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ showModelTypePop: function(){
|
|
|
+ CAIMEI.Popup({
|
|
|
+ content: '<div class="payAlert">' +
|
|
|
+ '<p>您已通过线下转账的方式支付了订单部分款项,剩余款项依然需要使用线下转账方式,给您带来的不便敬请谅解</p>' +
|
|
|
+ '<p>待付金额:<em>¥'+toFloat(this.orderInfo.pendingPayments)+'</em></p>' +
|
|
|
+ '<ul><li>开户行:中信银行(深圳泰然支行)</li>' +
|
|
|
+ '<li>银行卡号:6217 6803 0362 0897</li>' +
|
|
|
+ '<li>户名:周仁声</li>' +
|
|
|
+ '<li>订单标识<em>'+this.orderIdentificationId+'</em></li></ul>' +
|
|
|
+ '<p><i>请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</i></p>' +
|
|
|
+ '</div>',
|
|
|
+ confitmBtnText: '确定',
|
|
|
+ cancelBtnText: '关闭'
|
|
|
+ },function(){
|
|
|
+ // 确定
|
|
|
+ this.hidePaymentConfirm();
|
|
|
+ },function(){
|
|
|
+ // 关闭
|
|
|
+ });
|
|
|
+ },
|
|
|
hanldPayOrderFn:function(){//支付订单
|
|
|
var _self = this;
|
|
|
- OrderApi.OrderPaymentValidation({orderId:_self.orderId},function(response){
|
|
|
- if(response.code == 0){
|
|
|
- var dataCode = response.data.code;
|
|
|
- _self.payModelData = response.data;
|
|
|
+ OrderApi.OrderPaymentValidation({orderId:_self.orderId},function(r){
|
|
|
+ if(r.code*1 === 0){
|
|
|
+ var dataCode = r.data.code;
|
|
|
+ _self.payModelData = r.data;
|
|
|
switch(dataCode){
|
|
|
case 1:
|
|
|
_self.modelType = 1;
|
|
|
+ CAIMEI.Popup({
|
|
|
+ content: '<div class="payAlert">您有采美余额<em>¥'+toFloat(r.data.ableUserMoney)+'</em>暂未使用,是否需要抵扣订单? 抵扣后您只需再支付<em>¥'+toFloat(r.data.pendingPayments)+'</em></div>',
|
|
|
+ confitmBtnText: '抵扣,继续付款',
|
|
|
+ cancelBtnText: '不抵扣,继续付款'
|
|
|
+ },function(){
|
|
|
+ // 抵扣,继续付款
|
|
|
+ _self.hanldCancelConfirm(1)
|
|
|
+ },function(){
|
|
|
+ // 不抵扣,继续付款
|
|
|
+ _self.hanldCancelConfirm()
|
|
|
+ });
|
|
|
break;
|
|
|
case 2:
|
|
|
_self.modelType = 2;
|
|
|
+ CAIMEI.Popup({
|
|
|
+ content: '<div class="payAlert">您有采美余额<em>¥'+toFloat(r.data.ableUserMoney)+'</em>暂未使用,是否需要抵扣订单? 抵扣后订单支付完成</div>',
|
|
|
+ confitmBtnText: '抵扣,继续付款',
|
|
|
+ cancelBtnText: '不抵扣,继续付款'
|
|
|
+ },function(){
|
|
|
+ // 抵扣,继续付款
|
|
|
+ _self.hanldCancelConfirm(1);
|
|
|
+ },function(){
|
|
|
+ // 不抵扣,继续付款
|
|
|
+ //_self.hanldCancelConfirm();
|
|
|
+ _self.showModelTypePop();
|
|
|
+ });
|
|
|
break;
|
|
|
case -1:
|
|
|
CAIMEI.Alert('订单已申请全部退款,无需再付款!', '确定', false);
|
|
|
break;
|
|
|
default:
|
|
|
- if(response.data.onlinePayFlag == '1'){
|
|
|
+ if(r.data.onlinePayFlag == '1'){
|
|
|
_self.modelType = 3;
|
|
|
+ _self.showModelTypePop();
|
|
|
}else{
|
|
|
window.location.href = '/pay/caimei-paycash.html?type=payfirm&orderID='+_self.orderId;
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
- CAIMEI.Alert(response.msg, '确定', false);
|
|
|
+ CAIMEI.Alert(r.msg, '确定', false);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -166,6 +210,7 @@ var orderPage = new Vue({
|
|
|
} else {
|
|
|
if (_self.orderInfo.onlinePayFlag === '1') {
|
|
|
_self.modelType = 3;
|
|
|
+ _self.showModelTypePop();
|
|
|
} else {
|
|
|
window.location.href = '/pay/caimei-paycash.html?type=payfirm&orderID='+_self.orderId;
|
|
|
}
|
|
@@ -179,6 +224,7 @@ var orderPage = new Vue({
|
|
|
var _self = this;
|
|
|
if(_self.orderInfo.onlinePayFlag == '1'){
|
|
|
_self.modelType = 3;
|
|
|
+ _self.showModelTypePop();
|
|
|
}else{
|
|
|
window.location.href = '/pay/caimei-paycash.html?type=payfirm&orderID='+_self.orderId;
|
|
|
}
|