代码更新
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
|
||||
|
||||
@@ -58,7 +58,7 @@ class WebsocketUtil {
|
||||
}
|
||||
this.heartbeatInterval = setInterval(() => {
|
||||
if (this.isOpen) {
|
||||
this.send('心跳检测','heartbeat');
|
||||
this.send(JSON.stringify({"type": "ping_interval"}));
|
||||
}
|
||||
}, this.time);
|
||||
}
|
||||
@@ -68,7 +68,6 @@ class WebsocketUtil {
|
||||
if (this.socketTask && this.isOpen) {
|
||||
this.socketTask.send({
|
||||
data: data,
|
||||
type: type||'heartbeat',
|
||||
success: (res) => {
|
||||
// console.log('消息发送成功', res);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user