下单退款相关更新
This commit is contained in:
@@ -20,6 +20,7 @@ export function canTuiKuan(orderInfo, item) {
|
||||
if( item ){
|
||||
return (orderInfo.status == 'done' || orderInfo.status == 'part_refund')
|
||||
&& item.status != 'return' && item.status != 'refund' && item.status != 'refunding'
|
||||
&& (item.returnAmount < item.num*item.unitPrice)
|
||||
} else {
|
||||
let goodsList = []
|
||||
let data = false;
|
||||
@@ -27,7 +28,7 @@ export function canTuiKuan(orderInfo, item) {
|
||||
goodsList = [...goodsList,...value]
|
||||
))
|
||||
goodsList.some((v,i)=>{
|
||||
if( (orderInfo.status == 'done' || orderInfo.status == 'part_refund') && v.status != 'return' && v.status != 'refund' && v.status != 'refunding' ){
|
||||
if( orderInfo.refundAmount < orderInfo.payAmount || (orderInfo.status == 'done' || orderInfo.status == 'part_refund' ) && v.status != 'return' && v.status != 'refund' && v.status != 'refunding' && (v.returnNum+v.refundNum < v.num) ){
|
||||
data = true
|
||||
return data
|
||||
}
|
||||
@@ -50,4 +51,15 @@ export function numSum(arr) {
|
||||
return a + b * 100
|
||||
}, 0)
|
||||
return (sum / 100).toFixed(2)
|
||||
}
|
||||
export function mathFloorPrice(price,item) {
|
||||
if( item ){
|
||||
if( item.productType == 'weight' || item.type == 'weight'){
|
||||
return (Math.floor(price * 100)/100).toFixed(2)
|
||||
} else {
|
||||
return parseFloat(price).toFixed(2)
|
||||
}
|
||||
} else {
|
||||
return parseFloat(price).toFixed(2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user