下单退款相关更新
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)
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ class WebsocketUtil {
|
||||
this.reconnectTimeout = null; // 重连定时器
|
||||
this.heartbeatInterval = null; // 心跳定时器
|
||||
this.messageCallbacks = []; // 存储外部注册的消息回调函数的数组
|
||||
this.messageCallbacks = []; // 存储外部注册的消息回调函数的数组
|
||||
|
||||
// 初始化 WebSocket 连接
|
||||
this.initializeWebSocket();
|
||||
@@ -27,7 +28,6 @@ class WebsocketUtil {
|
||||
url: this.url,
|
||||
success: () => {
|
||||
console.log('WebSocket连接成功');
|
||||
|
||||
return this.socketTask;
|
||||
},
|
||||
fail: (error) => {
|
||||
|
||||
Reference in New Issue
Block a user