add:新增同一个工单同一人可以多次拼单:拼单后按钮固定显示「再拼一次」
This commit is contained in:
@@ -635,6 +635,8 @@ export default function WorkerHallPage() {
|
||||
const disabledReason = resolveGrabDisabledReason(order, worker, remainingSlots)
|
||||
const productName = resolveHallProductName(order) || '未命名商品'
|
||||
const sharingRemaining = resolveSharingRemaining(order)
|
||||
/** 已参与过就用固定文案「再拼一次」,拼几次都不再改按钮文字(需求)。 */
|
||||
const myShareSummary = resolveMyShareSummary(order)
|
||||
|
||||
return (
|
||||
<article key={order.workOrderId} className="worker-hall-mobile-card">
|
||||
@@ -717,12 +719,15 @@ export default function WorkerHallPage() {
|
||||
size="middle"
|
||||
className="worker-hall-sharing-button"
|
||||
disabled={Boolean(disabledReason)}
|
||||
title={
|
||||
myShareSummary.count > 0
|
||||
? `已参与 ${myShareSummary.count} 次 · 共 ${myShareSummary.quantity} 份`
|
||||
: undefined
|
||||
}
|
||||
onClick={() => openSharingModal(order)}
|
||||
>
|
||||
{resolveMyShareSummary(order).count > 0
|
||||
? `已参与 ${resolveMyShareSummary(order).count} 次 · 共 ${
|
||||
resolveMyShareSummary(order).quantity
|
||||
} 份 / 再拼`
|
||||
{myShareSummary.count > 0
|
||||
? '再拼一次'
|
||||
: `拼单 ${formatMoney(order.sharing.unitReward)}/份`}
|
||||
</Button>
|
||||
) : null}
|
||||
@@ -1073,6 +1078,8 @@ export default function WorkerHallPage() {
|
||||
const disabledReason = resolveGrabDisabledReason(order, worker, remainingSlots)
|
||||
const productName = resolveHallProductName(order) || '未命名商品'
|
||||
const sharingRemaining = resolveSharingRemaining(order)
|
||||
/** 已参与过就用固定文案「再拼一次」,拼几次都不再改按钮文字(需求)。 */
|
||||
const myShareSummary = resolveMyShareSummary(order)
|
||||
const depositAmount = resolveHallDepositAmount(order)
|
||||
const rewardAmount = resolveHallRewardAmount(order)
|
||||
|
||||
@@ -1169,12 +1176,15 @@ export default function WorkerHallPage() {
|
||||
size="large"
|
||||
className="worker-hall-sharing-button"
|
||||
disabled={Boolean(disabledReason)}
|
||||
title={
|
||||
myShareSummary.count > 0
|
||||
? `已参与 ${myShareSummary.count} 次 · 共 ${myShareSummary.quantity} 份`
|
||||
: undefined
|
||||
}
|
||||
onClick={() => openSharingModal(order)}
|
||||
>
|
||||
{resolveMyShareSummary(order).count > 0
|
||||
? `已参与 ${resolveMyShareSummary(order).count} 次 · 共 ${
|
||||
resolveMyShareSummary(order).quantity
|
||||
} 份 / 再拼`
|
||||
{myShareSummary.count > 0
|
||||
? '再拼一次'
|
||||
: `拼单 ${formatMoney(order.sharing.unitReward)}/份`}
|
||||
</Button>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user