|
@@ -463,21 +463,26 @@ export default {
|
|
|
},
|
|
|
async rebateUsedChange(){
|
|
|
console.log(this.data)
|
|
|
- if(this.data.status != '新建') return 1
|
|
|
- let amount = this.data.order_rebate_userate * this.data.defaultamount; //最大可用金额
|
|
|
- let rebatebalance = this.data.rebatebalance; //返利金账户余额
|
|
|
+ if (this.data.status!='新建') return 1
|
|
|
+ let amount = Math.round((this.data.order_rebate_userate * this.data.defaultamount)*100)/100;//最大可用金额
|
|
|
+ let rebatebalance = this.data.rebatebalance;//返利金账户余额
|
|
|
const res = await this.$api.requested({
|
|
|
- "id": 20230218225002,
|
|
|
- "content": {
|
|
|
- "sa_orderid": this.data.sa_orderid, //订单金额
|
|
|
- "isused": this.checked, //是否使用
|
|
|
- "rebateamount": rebatebalance > amount ? amount : rebatebalance //返利金使用金额
|
|
|
+ "id": 20230218225002,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid":this.data.sa_orderid,//订单金额
|
|
|
+ "isused":this.checked,//是否使用
|
|
|
+ "rebateamount":rebatebalance > amount ? amount : rebatebalance//返利金使用金额
|
|
|
}
|
|
|
})
|
|
|
console.log(res)
|
|
|
+ if (res.code == 0){
|
|
|
+ this.tool.showMessage(res,()=>{})
|
|
|
+ }
|
|
|
this.$emit('onSuccess')
|
|
|
this.data.rebate_used = res.msg !== '成功' ? this.data.rebate_used == 0?1:0:this.data.rebate_used
|
|
|
res.msg === '成功' ?this.data.rebateamount = res.data:''
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
onShow () {
|
|
|
this.initPage()
|
|
@@ -584,7 +589,7 @@ export default {
|
|
|
let that = this
|
|
|
/* 修改返利金 */
|
|
|
let rebateamount = e;
|
|
|
- let amount = this.data.order_rebate_userate * this.data.defaultamount;//最大可用金额
|
|
|
+ let amount = Math.round((this.data.order_rebate_userate * this.data.defaultamount)*100)/100;//最大可用金额
|
|
|
const res = await this.$api.requested({
|
|
|
"id":20230218225002,
|
|
|
"content":{
|