|
@@ -33,6 +33,7 @@ Page({
|
|
|
_yunfei:0,
|
|
_yunfei:0,
|
|
|
payFlag:false,
|
|
payFlag:false,
|
|
|
useBalance:false,
|
|
useBalance:false,
|
|
|
|
|
+ useCash:true,
|
|
|
afterdec:0,//使用提货券扣除后的总额
|
|
afterdec:0,//使用提货券扣除后的总额
|
|
|
remark:'',
|
|
remark:'',
|
|
|
|
|
|
|
@@ -46,7 +47,10 @@ Page({
|
|
|
use_silver:0,
|
|
use_silver:0,
|
|
|
pay_cash:0,//佣金抵扣
|
|
pay_cash:0,//佣金抵扣
|
|
|
freight_limit:9900,
|
|
freight_limit:9900,
|
|
|
- unquan_silver:0//不能使用提货券抵扣的银豆
|
|
|
|
|
|
|
+ unquan_silver:0,//不能使用提货券抵扣的银豆
|
|
|
|
|
+
|
|
|
|
|
+ //20240314使用新接口获取相关扣除
|
|
|
|
|
+ payQueryData:{}
|
|
|
},
|
|
},
|
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
|
this.data.orderId = options.orderId;
|
|
this.data.orderId = options.orderId;
|
|
@@ -204,6 +208,8 @@ Page({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ that.getPayQuery();
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
__request.$get(url, params, success)
|
|
__request.$get(url, params, success)
|
|
@@ -376,6 +382,7 @@ Page({
|
|
|
}
|
|
}
|
|
|
console.log('minus_cash',minus_cash);
|
|
console.log('minus_cash',minus_cash);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
that.setData({
|
|
that.setData({
|
|
|
balanceInfo: val.data,
|
|
balanceInfo: val.data,
|
|
|
cache: false,
|
|
cache: false,
|
|
@@ -390,9 +397,12 @@ Page({
|
|
|
discountBl: val.data.discount_bl,
|
|
discountBl: val.data.discount_bl,
|
|
|
sourceAfterdec: source_afterdec,
|
|
sourceAfterdec: source_afterdec,
|
|
|
pay_cash: minus_cash,
|
|
pay_cash: minus_cash,
|
|
|
- freight_limit:val.data.freight_limit
|
|
|
|
|
|
|
+ freight_limit:val.data.freight_limit,
|
|
|
// disAmount:dis_amount
|
|
// disAmount:dis_amount
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ console.log('useBalance',that.data.useBalance);
|
|
|
|
|
+ console.log('coupon_price',that.data.coupon_price);
|
|
|
}
|
|
}
|
|
|
__request.$get(url, params, success)
|
|
__request.$get(url, params, success)
|
|
|
},
|
|
},
|
|
@@ -418,6 +428,14 @@ Page({
|
|
|
that.setData({
|
|
that.setData({
|
|
|
useBalance:e.detail.value
|
|
useBalance:e.detail.value
|
|
|
})
|
|
})
|
|
|
|
|
+ that.getPayQuery();
|
|
|
|
|
+ },
|
|
|
|
|
+ switchcashChange:function(e){
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ useCash:e.detail.value
|
|
|
|
|
+ })
|
|
|
|
|
+ that.getPayQuery();
|
|
|
},
|
|
},
|
|
|
getUserInfo: function () {
|
|
getUserInfo: function () {
|
|
|
var that = this
|
|
var that = this
|
|
@@ -605,7 +623,8 @@ Page({
|
|
|
address_id: that.data.address.id,
|
|
address_id: that.data.address.id,
|
|
|
s: 'xcx',
|
|
s: 'xcx',
|
|
|
use_coupon:that.data.useBalance,
|
|
use_coupon:that.data.useBalance,
|
|
|
- remark:that.data.remark
|
|
|
|
|
|
|
+ remark:that.data.remark,
|
|
|
|
|
+ use_balance:that.data.useCash
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
params = {
|
|
params = {
|
|
@@ -615,6 +634,7 @@ Page({
|
|
|
pay_way: that.data.curPayway,
|
|
pay_way: that.data.curPayway,
|
|
|
s: 'xcx',
|
|
s: 'xcx',
|
|
|
use_coupon:that.data.useBalance,
|
|
use_coupon:that.data.useBalance,
|
|
|
|
|
+ use_balance:that.data.useCash,
|
|
|
remark:that.data.remark,
|
|
remark:that.data.remark,
|
|
|
pick_dept:that.data.pickid,
|
|
pick_dept:that.data.pickid,
|
|
|
pick_addr_id:that.data.pick_address.id
|
|
pick_addr_id:that.data.pick_address.id
|
|
@@ -717,7 +737,8 @@ Page({
|
|
|
yunfei : e.target.dataset.value == 0 ? this.data._yunfei : 0
|
|
yunfei : e.target.dataset.value == 0 ? this.data._yunfei : 0
|
|
|
})
|
|
})
|
|
|
wx.setStorageSync('receivetype', e.target.dataset.value) //存入
|
|
wx.setStorageSync('receivetype', e.target.dataset.value) //存入
|
|
|
- this.getBalanceInfo()
|
|
|
|
|
|
|
+ this.getBalanceInfo();
|
|
|
|
|
+ this.getPayQuery();
|
|
|
}else{
|
|
}else{
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
title: '当前提货方式已确定',
|
|
title: '当前提货方式已确定',
|
|
@@ -793,5 +814,22 @@ Page({
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
__request.$get(url, params, success)
|
|
__request.$get(url, params, success)
|
|
|
|
|
+ },
|
|
|
|
|
+ //获取扣减相关
|
|
|
|
|
+ getPayQuery() {
|
|
|
|
|
+ var that = this
|
|
|
|
|
+ var url = 'v1/pay/query'
|
|
|
|
|
+ var params = {
|
|
|
|
|
+ 'order_id':that.data.orderId,
|
|
|
|
|
+ 'use_coupon':true, //是否使用提货券
|
|
|
|
|
+ 'use_balance':that.data.useCash, //是否使用佣金
|
|
|
|
|
+ 'pick_way':that.data.receivetype, //自提方式
|
|
|
|
|
+ }
|
|
|
|
|
+ var success = function (res) {
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ payQueryData:res.data
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ __request.$post(url, params, success)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|