feat: 立即发货、延迟发货、查看订单按钮展示调整
This commit is contained in:
@@ -92,21 +92,21 @@
|
||||
},
|
||||
});
|
||||
|
||||
// 延迟发货按钮:仅允许【待发货(10/伪50)、部分发货(15)】状态展示
|
||||
// 伪状态 50 = 原生 status=10 + 有 status===1(延迟中)的商品,属于待发货分支
|
||||
const showDelay = computed(() => {
|
||||
// 待收货(status=50)不展示延迟发货按钮——货已经发出,不需要延迟/立即发货操作
|
||||
const s = Number(props.status);
|
||||
if (s === 50) return false;
|
||||
if (![10, 15].includes(s)) return false;
|
||||
if (s === 10 || s === 15) return true;
|
||||
if (s === 20) return false; // 待收货:不展示
|
||||
if (![10, 15, 50].includes(s)) return false;
|
||||
return Boolean(props.canDelayItems);
|
||||
});
|
||||
|
||||
// 立即发货按钮:仅允许【待发货(10/伪50)、部分发货(15)】状态,
|
||||
// 且必须 delayRecords 里存在 status===1(延迟中)的商品(hasDelayedItems===true)
|
||||
const showNow = computed(() => {
|
||||
// 待收货(status=50)不展示立即发货按钮
|
||||
const s = Number(props.status);
|
||||
if (s === 50) return false;
|
||||
if (![10, 15].includes(s)) return false;
|
||||
// 只有存在延迟中(status===1)的商品时才展示立即发货按钮
|
||||
if (s === 20) return false; // 待收货:不展示
|
||||
if (![10, 15, 50].includes(s)) return false;
|
||||
if (!Boolean(props.hasDelayedItems)) return false;
|
||||
return Boolean(props.canShipItems);
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<AiOrderActionBar
|
||||
:status="currentStatus"
|
||||
:disableDelayShipment="isPickUpOrder || !isAiStoreOrder"
|
||||
:showView="true"
|
||||
:showView="false"
|
||||
:hasDelayedItems="hasDelayedItems"
|
||||
:canDelayItems="canDelayItems"
|
||||
:canShipItems="canShipItems"
|
||||
|
||||
Reference in New Issue
Block a user