|
@@ -10,6 +10,7 @@ var shoppingConfirm = new Vue({
|
|
|
kindCount: 0,
|
|
|
totalCount: 0,
|
|
|
totalPrice: 0,
|
|
|
+ reducedPrice: 0,
|
|
|
address: {
|
|
|
id: '',
|
|
|
townId: '',
|
|
@@ -54,9 +55,9 @@ var shoppingConfirm = new Vue({
|
|
|
},
|
|
|
payInfo: {
|
|
|
clauseId: 0, //条款(暂时保留)
|
|
|
- orderShouldPayFee: 0,//提交的总价
|
|
|
+ orderShouldPayFee: 0.00,//提交的总价
|
|
|
balancePayFlag: 0, //余额抵扣的状态 0不使用,1使用
|
|
|
- freight: 0, //邮费
|
|
|
+ freight: 0.00, //邮费
|
|
|
freePostFlag:-1 // 0包邮 -1到付 1 有运费
|
|
|
},
|
|
|
invoice: {
|
|
@@ -100,6 +101,7 @@ var shoppingConfirm = new Vue({
|
|
|
if (r.code === 0 && r.data) {
|
|
|
_self.listData = r.data.list;
|
|
|
_self.totalPrice = r.data.totalPrice;
|
|
|
+ _self.reducedPrice = r.data.reducedPrice;
|
|
|
_self.totalCount = r.data.totalCount;
|
|
|
_self.kindCount = r.data.kindCount;
|
|
|
_self.balance.userMoney = r.data.userMoney;
|
|
@@ -416,7 +418,7 @@ var shoppingConfirm = new Vue({
|
|
|
clubUserId: this.userId, // 机构用户ID
|
|
|
addressId: this.address.id,// 地址ID
|
|
|
orderInfo: [], // 商品信息
|
|
|
- payInfo: this.payInfo, // 订单信息
|
|
|
+ payInfo: {}, // 订单信息
|
|
|
orderInvoice: {type: 0} // 默认不开发票
|
|
|
};
|
|
|
// 发票信息
|
|
@@ -456,8 +458,13 @@ var shoppingConfirm = new Vue({
|
|
|
productInfo: productInfo
|
|
|
}
|
|
|
});
|
|
|
- params.payInfo.freight = toFloat(this.payInfo.freight);
|
|
|
- params.payInfo.orderShouldPayFee = toFloat(this.payInfo.orderShouldPayFee);
|
|
|
+ params.payInfo = {
|
|
|
+ clauseId: 0,
|
|
|
+ orderShouldPayFee: toFloat(this.payInfo.orderShouldPayFee),
|
|
|
+ balancePayFlag: this.payInfo.balancePayFlag,
|
|
|
+ freight: toFloat(this.payInfo.freight),
|
|
|
+ freePostFlag: this.payInfo.freePostFlag
|
|
|
+ };
|
|
|
console.log(params);
|
|
|
this.submitLoading = true;
|
|
|
OrderApi.ConfirmOrder({'params':JSON.stringify(params)},function (r) {
|
|
@@ -477,9 +484,10 @@ var shoppingConfirm = new Vue({
|
|
|
CAIMEI.Storage.setItem('confirmOrderInfo',JSON.stringify({data:data}));
|
|
|
window.location.href = '/pay/caimei-paycash.html?type=confirm&orderID='+r.data.orderID;
|
|
|
}else{
|
|
|
- CAIMEI.Alert(r.msg,'确定',false);
|
|
|
+ CAIMEI.Alert(r.msg,'确定',true, function(){
|
|
|
+ _self.submitLoading = false;
|
|
|
+ });
|
|
|
}
|
|
|
- _self.submitLoading = false;
|
|
|
});
|
|
|
}
|
|
|
},
|