支持订单归属修改与麦麦复核
This commit is contained in:
1 parent
ab9d3009ea
commit
b3b67c8003
17 files changed
+829
-32
No files matched your search
@@ -42,6 +42,7 @@ function orderCancellationCanDirect(order=currentOrder){
|
||||
function orderCancellationRecordStatus(request){return request.direct===true?'当天直接取消':orderCancellationStatus[request.status];}
|
||||
function orderCancellationActionHTML(order){
|
||||
const entry=currentOrderCancellation(order),data=entry?.data;
|
||||
if(typeof orderOwnershipPending==='function'?orderOwnershipPending(order):order.ownershipPending)return '';
|
||||
if(order.price_lock_id||!['draft','confirmed','delivered'].includes(order.status)||orderCancellationPending(order)||(typeof orderChangePending==='function'?orderChangePending(order):order.changePending)||!data?.eligible)return '';
|
||||
return button(orderCancellationCanDirect(order)?'取消订单':'申请取消','request-order-cancellation','danger',`data-id="${e(order.id)}"`);
|
||||
}
|
||||
@@ -72,6 +73,7 @@ function requireOrderCancellationDetail(){
|
||||
const order=currentOrder,entry=currentOrderCancellation(order);
|
||||
if(!order||!entry?.data||entry.error)throw new Error('请重新读取订单并核对取消申请。');
|
||||
if(order.price_lock_id)throw new Error('锁价单暂不支持取消。');
|
||||
if(typeof orderOwnershipPending==='function'?orderOwnershipPending(order):order.ownershipPending)throw new Error('归属申请待麦麦复核,请处理完成后再申请取消。');
|
||||
if(typeof orderChangePending==='function'?orderChangePending(order):order.changePending)throw new Error('修改申请待麦麦复核,请复核完成后再申请取消。');
|
||||
return {order,entry,data:entry.data};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user