优化(履约工作台): 绑定失败且账号已释放时支持重新选号并绑定
This commit is contained in:
@@ -457,6 +457,15 @@ function canRefreshBindingQr(task: PlatformFulfillmentTask) {
|
|||||||
return !['role_ready', 'bound', 'completed', 'cancelled'].includes(task.executionStatus);
|
return !['role_ready', 'bound', 'completed', 'cancelled'].includes(task.executionStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canReallocateAndBind(task: PlatformFulfillmentTask) {
|
||||||
|
return Boolean(
|
||||||
|
!task.account &&
|
||||||
|
task.customerProfile &&
|
||||||
|
task.executionStatus === 'manual_required' &&
|
||||||
|
['binding_failed', 'lease_expired'].includes(task.issueCode),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function canManualConfirmBinding(task: PlatformFulfillmentTask) {
|
function canManualConfirmBinding(task: PlatformFulfillmentTask) {
|
||||||
if (!task.account) return false;
|
if (!task.account) return false;
|
||||||
return !['bound', 'completed', 'cancelled'].includes(task.executionStatus);
|
return !['bound', 'completed', 'cancelled'].includes(task.executionStatus);
|
||||||
@@ -1515,6 +1524,18 @@ export default function PlatformFulfillmentPage() {
|
|||||||
刷新二维码
|
刷新二维码
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
|
{canReallocateAndBind(task) ? (
|
||||||
|
<Button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
icon={<UserSwitchOutlined />}
|
||||||
|
loading={allocatingTaskId === task.id}
|
||||||
|
disabled={allocatingTaskId !== null && allocatingTaskId !== task.id}
|
||||||
|
onClick={() => void requestAllocation(task)}
|
||||||
|
>
|
||||||
|
重新选号并绑定
|
||||||
|
</Button>
|
||||||
|
) : null}
|
||||||
{task.executionStatus === 'role_ready' ? (
|
{task.executionStatus === 'role_ready' ? (
|
||||||
<Button size="small" type="primary" icon={<CheckCircleOutlined />} onClick={() => void runTaskAction(() => platformFulfillmentApi.confirmBinding(task.id))}>
|
<Button size="small" type="primary" icon={<CheckCircleOutlined />} onClick={() => void runTaskAction(() => platformFulfillmentApi.confirmBinding(task.id))}>
|
||||||
代客户确认
|
代客户确认
|
||||||
@@ -1591,6 +1612,16 @@ export default function PlatformFulfillmentPage() {
|
|||||||
刷新二维码
|
刷新二维码
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
|
{selected && canReallocateAndBind(selected) ? (
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={<UserSwitchOutlined />}
|
||||||
|
loading={allocatingTaskId === selected.id}
|
||||||
|
onClick={() => void requestAllocation(selected)}
|
||||||
|
>
|
||||||
|
重新选号并绑定
|
||||||
|
</Button>
|
||||||
|
) : null}
|
||||||
{selected &&
|
{selected &&
|
||||||
selected.executionStatus !== 'role_ready' &&
|
selected.executionStatus !== 'role_ready' &&
|
||||||
selected.executionStatus !== 'bound' &&
|
selected.executionStatus !== 'bound' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user