代码更新
This commit is contained in:
@@ -17,15 +17,34 @@ export function canTuicai(orderInfo, item) {
|
||||
return orderInfo.status == 'unpaid' && orderInfo.useType != 'dine-in-before' && item.status != 'return'
|
||||
}
|
||||
export function canTuiKuan(orderInfo, item) {
|
||||
return orderInfo.status == 'done' && item.status != 'return' && item.status != 'refund' && item.status !=
|
||||
'refunding'
|
||||
if( item ){
|
||||
return orderInfo.status == 'done' && item.status != 'return' && item.status != 'refund' && item.status != 'refunding'
|
||||
} else {
|
||||
let goodsList = []
|
||||
let data = false;
|
||||
Object.entries(orderInfo.detailMap).map(([key, value]) => (
|
||||
goodsList = [...goodsList,...value]
|
||||
))
|
||||
console.log("orderInfo===",orderInfo)
|
||||
console.log("goodsList===",goodsList)
|
||||
goodsList.some((v,i)=>{
|
||||
console.log(v)
|
||||
if( orderInfo.status == 'done' && v.status != 'return' && v.status != 'refund' && v.status != 'refunding' ){
|
||||
data = true
|
||||
console.log(data)
|
||||
return data
|
||||
}
|
||||
})
|
||||
console.log(data)
|
||||
return data
|
||||
}
|
||||
|
||||
}
|
||||
export function isTuiCai(item) {
|
||||
return item.status == 'return'
|
||||
return item.status == 'return' || item.status == 'part_refund'
|
||||
}
|
||||
export function isTui(item) {
|
||||
console.log(item)
|
||||
return item.status == 'return' || item.status == 'refund' || item.status == 'refunding' || item.status == 'part_refund'
|
||||
return item.status == 'return' || item.status == 'refund' || item.status == 'refunding'
|
||||
}
|
||||
export function isGift(item) {
|
||||
return !isTui(item) && item.isGift == 1
|
||||
|
||||
Reference in New Issue
Block a user