From 9100991cb1976f3fc77999e032bb7bdb3dbe0466 Mon Sep 17 00:00:00 2001 From: yml Date: Thu, 26 Nov 2026 23:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83(0.4.5):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=87=8D=E9=80=89=E5=8F=B7=E5=8F=B0=E8=B4=A6=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=B9=B6=E7=A7=BB=E9=99=A4=E5=BC=BA=E5=88=B6=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pyproject.toml | 2 +- tests/test_platform_fulfillment.py | 200 ++++++++---------- uv.lock | 2 +- web/backend/routers/platform_fulfillment.py | 32 --- web/backend/schemas.py | 5 - web/backend/services/douyu_collab_sync.py | 26 ++- .../services/platform_fulfillment/binding.py | 130 +----------- .../services/platform_fulfillment/service.py | 2 - web/frontend/src/api/platformFulfillment.ts | 5 - .../src/pages/PlatformFulfillmentPage.tsx | 130 +----------- 11 files changed, 118 insertions(+), 418 deletions(-) diff --git a/README.md b/README.md index 35b976b..8f7fb67 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 直播账号运营后台 -斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.3)。 +斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.5)。 ## 能做什么 diff --git a/pyproject.toml b/pyproject.toml index 0dfdb03..086a125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "live-hub-py" -version = "0.4.3" +version = "0.4.5" description = "直播账号运营 Web 后台" readme = "README.md" requires-python = ">=3.12,<3.13" diff --git a/tests/test_platform_fulfillment.py b/tests/test_platform_fulfillment.py index 32e2ca6..c3f3caf 100644 --- a/tests/test_platform_fulfillment.py +++ b/tests/test_platform_fulfillment.py @@ -751,6 +751,93 @@ class TestFulfillmentCollabSync(_Base): lease = self.session.query(AccountLease).one() assert lease.purpose == "douyu_collab" + def test_platform_sync_replaces_account_and_role_after_reallocation(self): + """履约单释放后重选账号,台账必须清掉首单角色并投影新账号。""" + task = self._task_with_account() + old_account = self.session.get(Account, task.account_id) + old_bind = DouyuTask( + batch_id="collab-old-account-bind", + account_id=old_account.id, + task_type="get_bind_qr", + handbook_scope="elite", + status="success", + result={ + "role_name": "旧角色", + "bind_confirmed": True, + "area_name": "微信", + "plat_name": "苹果(iOS)", + }, + created_by=self.admin_id, + ) + self.session.add(old_bind) + self.session.flush() + task.bind_task_id = old_bind.id + task.binding_status = "bound" + task.execution_status = "bound" + self.session.commit() + + order, _ = collab.sync_platform_fulfillment_order( + self.session, + self.admin, + task, + ) + assert order.account_id == old_account.id + assert order.bind_game_role == "旧角色" + + replacement = self.account("collab-replacement-account") + replacement.role_bind_status = "bound" + replacement.game_name = "新角色" + replacement.game_channel = "手Q · 安卓(android)" + task.account_id = replacement.id + task.bind_task_id = None + task.binding_status = "not_started" + task.execution_status = "allocated" + self.session.commit() + + reallocated, _ = collab.sync_platform_fulfillment_order( + self.session, + self.admin, + task, + ) + + assert reallocated.account_id == replacement.id + assert reallocated.account_username == replacement.username + assert reallocated.bind_game_role == "" + assert reallocated.bind_game_channel == "" + assert reallocated.bind_snapshot_at is None + + new_bind = DouyuTask( + batch_id="collab-new-account-bind", + account_id=replacement.id, + task_type="get_bind_qr", + handbook_scope="elite", + status="success", + result={ + "role_name": "新角色", + "bind_confirmed": True, + "area_name": "手Q", + "plat_name": "安卓(android)", + }, + created_by=self.admin_id, + ) + self.session.add(new_bind) + self.session.flush() + task.bind_task_id = new_bind.id + task.binding_status = "bound" + task.execution_status = "bound" + self.session.commit() + + rebound, _ = collab.sync_platform_fulfillment_order( + self.session, + self.admin, + task, + ) + + assert rebound.account_id == replacement.id + assert rebound.bind_game_role == "新角色" + assert rebound.bind_game_channel == "手Q / 安卓(android)" + assert rebound.bind_snapshot_at is not None + def test_manual_sync_does_not_clear_account_added_in_collab(self): task = self.task() order, _ = collab.sync_platform_fulfillment_order( @@ -3418,75 +3505,6 @@ class TestBindingAndCompletion(_Base): assert evidence["actionCurrent"]["roleName"] == "兔稚儿" assert evidence["decisionReason"] == "no_role" - def test_manual_confirm_binding_marks_bound_without_scan(self): - task = self._allocated() - account = self.session.get(Account, task.account_id) - account.game_name = "兔稚儿" - account.role_bind_status = "bound" - qr_task = DouyuTask( - batch_id="manual-confirm-qr", - account_id=task.account_id, - account_assigned_to=self.admin_id, - task_type="get_bind_qr", - handbook_scope="elite", - status="running", - platform_task_id=task.id, - result={"bind_phase": "waiting_scan", "bind_polling": True}, - created_by=self.admin_id, - ) - self.session.add(qr_task) - self.session.flush() - task.bind_task_id = qr_task.id - task.binding_status = "qr_pending" - task.execution_status = "waiting_bind" - self.session.commit() - - detail = service.manual_confirm_binding_sync( - self.session, - task_id=task.id, - current=self.admin, - role_name="兔稚儿", - note="客户已在精英宝典完成绑定", - ) - - self.session.refresh(task) - self.session.refresh(qr_task) - assert detail["task"]["bindingStatus"] == "bound" - assert detail["task"]["executionStatus"] == "bound" - assert task.binding_status == "bound" - assert task.execution_status == "bound" - assert qr_task.status == "success" - assert "人工确认绑定" in qr_task.message - assert detail["task"]["bindTask"]["roleName"] == "兔稚儿" - assert detail["task"]["bindTask"]["bindConfirmed"] is True - assert qr_task.result["manual_confirmed"] is True - assert qr_task.result["manual_confirmed_role"] == "兔稚儿" - assert qr_task.result["role_name"] == "兔稚儿" - assert qr_task.result["bind_ready_for_confirm"] is False - event = ( - self.session.query(PlatformFulfillmentEvent) - .filter_by(task_id=task.id, event_type="binding_manually_confirmed") - .one() - ) - assert event.detail_json["roleName"] == "兔稚儿" - assert event.detail_json["note"] == "客户已在精英宝典完成绑定" - assert event.detail_json["operatorId"] == self.admin_id - - # 幂等:重复确认不再重复写事件。 - service.manual_confirm_binding_sync( - self.session, - task_id=task.id, - current=self.admin, - role_name="兔稚儿", - note="重复确认", - ) - assert ( - self.session.query(PlatformFulfillmentEvent) - .filter_by(task_id=task.id, event_type="binding_manually_confirmed") - .count() - == 1 - ) - def test_operator_confirm_uses_scanned_role_without_form(self): task = self._allocated() account = self.session.get(Account, task.account_id) @@ -3657,50 +3675,6 @@ class TestBindingAndCompletion(_Base): assert exc_info.value.status_code == 409 assert "主页截图" in str(exc_info.value.detail) - def test_manual_confirm_rejects_role_not_currently_bound(self): - task = self._allocated() - account = self.session.get(Account, task.account_id) - account.game_name = "小乖悄" - account.role_bind_status = "bound" - qr_task = DouyuTask( - batch_id="manual-mismatch-qr", - account_id=task.account_id, - account_assigned_to=self.admin_id, - task_type="get_bind_qr", - handbook_scope="elite", - status="success", - platform_task_id=task.id, - result={"bind_phase": "waiting_scan", "role_name": "等清晰"}, - created_by=self.admin_id, - ) - self.session.add(qr_task) - self.session.flush() - task.bind_task_id = qr_task.id - task.binding_status = "qr_pending" - task.execution_status = "waiting_bind" - self.session.commit() - - with pytest.raises(HTTPException) as exc_info: - service.manual_confirm_binding_sync( - self.session, - task_id=task.id, - current=self.admin, - role_name="等清晰", - note="客户说角色是等清晰", - ) - - self.session.refresh(task) - assert exc_info.value.status_code == 409 - assert "不一致" in str(exc_info.value.detail) - assert task.binding_status == "qr_pending" - assert task.execution_status == "waiting_bind" - assert ( - self.session.query(PlatformFulfillmentEvent) - .filter_by(task_id=task.id, event_type="binding_manually_confirmed") - .count() - == 0 - ) - def test_cjm_only_transient_role_waits_for_action_alias_sync(self): task = self._allocated() qr_task = DouyuTask( diff --git a/uv.lock b/uv.lock index 1915c53..00c8161 100644 --- a/uv.lock +++ b/uv.lock @@ -381,7 +381,7 @@ wheels = [ [[package]] name = "live-hub-py" -version = "0.4.3" +version = "0.4.5" source = { editable = "." } dependencies = [ { name = "alembic" }, diff --git a/web/backend/routers/platform_fulfillment.py b/web/backend/routers/platform_fulfillment.py index 39fc939..2280165 100644 --- a/web/backend/routers/platform_fulfillment.py +++ b/web/backend/routers/platform_fulfillment.py @@ -14,7 +14,6 @@ from ..schemas import ( PlatformFulfillmentCollabSyncRequest, PlatformFulfillmentCompleteRequest, PlatformFulfillmentCustomerProfileUpdate, - PlatformFulfillmentManualBindingRequest, PlatformFulfillmentMappingUpsert, PlatformFulfillmentMappingWrite, PlatformFulfillmentReasonRequest, @@ -494,37 +493,6 @@ def operator_confirm_binding( return result -@router.post("/tasks/{task_id}/bind/manual-confirm") -def manual_confirm_binding( - task_id: int, - req: PlatformFulfillmentManualBindingRequest, - db: Session = Depends(get_db), - current: User = Depends(require_permission("platform_fulfillment:use")), -) -> dict[str, Any]: - """运营人工确认绑定:用于客户已在别处绑定、或账号当前角色已确认的场景。""" - service.ensure_customer_profile_for_binding(db, task_id=task_id) - result = service.manual_confirm_binding_sync( - db, - task_id=task_id, - current=current, - role_name=req.role_name, - note=req.note, - ) - record_audit( - db, - current, - action="platform_fulfillment:binding:manual_confirm", - target=f"platform_fulfillment_task:{task_id}", - detail={ - "roleName": req.role_name, - "note": req.note, - "bindingStatus": result.get("task", {}).get("bindingStatus"), - }, - ) - db.commit() - return result - - @router.patch("/tasks/{task_id}/customer-profile") def update_customer_profile( task_id: int, diff --git a/web/backend/schemas.py b/web/backend/schemas.py index fe04520..5eb8fa7 100644 --- a/web/backend/schemas.py +++ b/web/backend/schemas.py @@ -1778,11 +1778,6 @@ class PlatformFulfillmentCompleteRequest(BaseModel): note: str = Field(default="", max_length=1000) -class PlatformFulfillmentManualBindingRequest(BaseModel): - role_name: str = Field(default="", max_length=128) - note: str = Field(default="", max_length=500) - - class PlatformFulfillmentCustomerProfileUpdate(BaseModel): customer_role_name: str = Field(..., min_length=1, max_length=128) customer_platform: str = Field(..., pattern="^(wechat|qq)$") diff --git a/web/backend/services/douyu_collab_sync.py b/web/backend/services/douyu_collab_sync.py index a2f78c6..4cbea01 100644 --- a/web/backend/services/douyu_collab_sync.py +++ b/web/backend/services/douyu_collab_sync.py @@ -223,6 +223,10 @@ def sync_platform_fulfillment_order( ) order = order_by_no created = False + was_platform_projection = ( + order is not None + and order.source_type == SOURCE_TYPE_PLATFORM_FULFILLMENT + ) now = _now() account = ( @@ -232,6 +236,11 @@ def sync_platform_fulfillment_order( ) gift_name, commodity_id, required_points = _platform_fulfillment_gift(db, task) home_images = _platform_fulfillment_home_images(task) + account_changed = bool( + account is not None + and order is not None + and int(order.account_id or 0) != int(account.id) + ) if order is None: order = DouyuExternalOrder( @@ -266,17 +275,30 @@ def sync_platform_fulfillment_order( if home_images: order.home_images = home_images if account is not None and ( - created or (order.account_id is None and not order.account_username) + created + or was_platform_projection + or (order.account_id is None and not order.account_username) ): order.account_id = int(account.id) order.account_username = _text(account.username, max_length=128) order.account_uid = _text(account.uid, max_length=32) order.account_nickname = _text(account.nickname, max_length=128) + if was_platform_projection and ( + account_changed + or not task.bind_task_id + or task.binding_status != "bound" + ): + # 履约单重选号或重新进入绑定流程后,预售台账是平台账号的投影, + # 不能继续展示首单/上一轮角色。 + order.bind_game_account = "" + order.bind_game_role = "" + order.bind_game_channel = "" + order.bind_snapshot_at = None _apply_platform_fulfillment_binding( db, order, task, - overwrite=created, + overwrite=created or was_platform_projection, ) _apply_platform_fulfillment_status(order, task, created=created) order.version = int(order.version or 0) + 1 diff --git a/web/backend/services/platform_fulfillment/binding.py b/web/backend/services/platform_fulfillment/binding.py index d488584..f4ddcbb 100644 --- a/web/backend/services/platform_fulfillment/binding.py +++ b/web/backend/services/platform_fulfillment/binding.py @@ -914,7 +914,7 @@ def operator_confirm_binding_sync( """普通人工代确认:客户已扫码但没点确认,运营代为提交正常 actBind。 不填写角色/备注,不直接标 bound;复用客户确认的同一套确认任务。 - 当前没有可确认的扫码角色时,要求客户扫码或走“强制确认”。 + 当前没有可确认的扫码角色时,要求客户重新扫码。 """ task = _load_task_for_update(db, task_id) if _frozen(task): @@ -926,137 +926,11 @@ def operator_confirm_binding_sync( if task.binding_status != "role_ready": raise HTTPException( status_code=409, - detail=( - "当前没有可代确认的扫码角色。请让客户先扫码;" - "只有账号已绑定到该角色、但缺少本次扫码证据时,才使用强制确认。" - ), + detail="当前没有可代确认的扫码角色,请让客户先扫码。", ) return confirm_binding_sync(db, task_id=task.id, current=current) -def manual_confirm_binding_sync( - db: Session, - *, - task_id: int, - current: User, - role_name: str = "", - note: str = "", -) -> dict[str, Any]: - """运营人工确认绑定:不依赖本次扫码/actBind,直接落订单绑定事实。 - - 用于客户已在别处完成绑定、或账号当前角色就是客户角色,但履约工作台没有 - 本次扫码证据的场景。必须由运营确认角色并记录操作人/备注;不做自动复用。 - """ - task = _load_task_for_update(db, task_id) - if _frozen(task): - # 已 bound / completed / cancelled:幂等返回,不重复写事件。 - return get_task_detail(db, task.id) - if not task.account_id or not task.lease_id: - raise HTTPException(status_code=409, detail="请先分配账号") - lease = db.query(AccountLease).filter(AccountLease.id == task.lease_id).first() - if lease is None or lease.status != "active": - raise HTTPException(status_code=409, detail="账号租约已失效,请重新分配") - account = db.get(Account, int(task.account_id)) - if account is None: - raise HTTPException(status_code=409, detail="账号不存在") - confirmed_role = str(role_name or account.game_name or "").strip() - if not confirmed_role: - raise HTTPException( - status_code=409, - detail="账号没有可确认的角色,请先查询角色或填写确认角色", - ) - account_role = str(account.game_name or "").strip() - if str(account.role_bind_status or "") != "bound" or not account_role: - raise HTTPException( - status_code=409, - detail="账号当前没有已生效角色,不能人工确认;请先刷新/查询角色", - ) - if account_role != confirmed_role: - raise HTTPException( - status_code=409, - detail=( - f"账号当前角色是「{account_role}」,确认角色是「{confirmed_role}」," - "不一致,不能人工确认。人工确认只能用于账号已经绑定到该角色的场景;" - "换绑请先完成 actBind 或使用正确账号。" - ), - ) - note = str(note or "").strip()[:500] - if len(note) < 2: - raise HTTPException(status_code=409, detail="请填写人工确认依据/备注") - previous_binding = str(task.binding_status or "") - previous_execution = str(task.execution_status or "") - - bind_task = ( - db.query(DouyuTask).filter(DouyuTask.id == int(task.bind_task_id)).first() - if task.bind_task_id - else None - ) - if bind_task is not None: - result = dict(bind_task.result or {}) - previous_pending_role = str( - result.get("pending_role_name") or result.get("role_name") or "" - ).strip() - account_channel = str(account.game_channel or "").strip() - area_name, _, plat_name = account_channel.partition(" · ") - result.update( - { - "manual_confirmed": True, - "manual_confirmed_role": confirmed_role, - "manual_confirmed_by": int(current.id), - "manual_confirm_note": note, - "previous_pending_role_name": previous_pending_role[:128], - "bind_phase": "manual_confirmed", - "bind_polling": False, - "bind_ready_for_confirm": False, - "bind_confirmed": True, - "pending_role_name": "", - "role_name": confirmed_role, - "current_role_name": confirmed_role, - "area_name": area_name, - "plat_name": plat_name, - "is_bound_act": True, - "is_bound_role": True, - } - ) - bind_task.status = "success" - bind_task.queue_lane = "" - bind_task.next_run_at = None - bind_task.run_deadline_at = None - bind_task.message = f"人工确认绑定: {confirmed_role}"[:512] - bind_task.finished_at = _now() - bind_task.result = result - - task.binding_status = "bound" - task.execution_status = "bound" - task.issue_code = "" - task.last_error = "" - task.operator_id = int(current.id) - task.updated_at = _now() - _append_event( - db, - task.id, - "binding_manually_confirmed", - actor_type="user", - actor_id=str(current.id), - detail={ - "roleName": confirmed_role[:128], - "accountId": int(task.account_id), - "accountName": (account.nickname or account.username), - "operatorId": int(current.id), - "note": note, - "sourceTaskId": int(bind_task.id) if bind_task is not None else None, - "sourceTaskStatus": str(bind_task.status or "") if bind_task else "", - "previousBindingStatus": previous_binding, - "previousExecutionStatus": previous_execution, - "baselineRole": str(account.game_name or "").strip(), - }, - ) - _apply_task_lease_policy(db, task, lease=lease) - _emit_order_site_binding_state(db, task.id) - db.commit() - return get_task_detail(db, task.id) - - def _apply_binding_task( db: Session, task: PlatformFulfillmentTask, diff --git a/web/backend/services/platform_fulfillment/service.py b/web/backend/services/platform_fulfillment/service.py index cfef764..31b9bc6 100644 --- a/web/backend/services/platform_fulfillment/service.py +++ b/web/backend/services/platform_fulfillment/service.py @@ -30,7 +30,6 @@ from .binding import ( # noqa: F401 confirm_binding, confirm_binding_sync, ensure_customer_profile_for_binding, - manual_confirm_binding_sync, operator_confirm_binding_sync, reconcile_binding_observations, reconcile_binding_state_outbox, @@ -160,7 +159,6 @@ __all__ = [ "get_task_detail", "list_mappings", "list_tasks", - "manual_confirm_binding_sync", "mapping_impact", "mark_manual_required", "operator_confirm_binding_sync", diff --git a/web/frontend/src/api/platformFulfillment.ts b/web/frontend/src/api/platformFulfillment.ts index 88f523a..9eb7fb9 100644 --- a/web/frontend/src/api/platformFulfillment.ts +++ b/web/frontend/src/api/platformFulfillment.ts @@ -142,11 +142,6 @@ export const platformFulfillmentApi = { api.post( `/platform-fulfillment/tasks/${taskId}/bind/operator-confirm`, ), - manualConfirmBinding: (taskId: number, roleName: string, note: string) => - api.post( - `/platform-fulfillment/tasks/${taskId}/bind/manual-confirm`, - { role_name: roleName, note }, - ), verifyBinding: (taskId: number) => api.post( `/platform-fulfillment/tasks/${taskId}/bind/verify`, diff --git a/web/frontend/src/pages/PlatformFulfillmentPage.tsx b/web/frontend/src/pages/PlatformFulfillmentPage.tsx index ffe423a..efe3ca0 100644 --- a/web/frontend/src/pages/PlatformFulfillmentPage.tsx +++ b/web/frontend/src/pages/PlatformFulfillmentPage.tsx @@ -500,7 +500,7 @@ function canReallocateAndBind(task: PlatformFulfillmentTask) { ); } -function canManualConfirmBinding(task: PlatformFulfillmentTask) { +function canOperatorConfirmBinding(task: PlatformFulfillmentTask) { if (!task.account) return false; return !['bound', 'completed', 'cancelled'].includes(task.executionStatus); } @@ -535,10 +535,6 @@ export default function PlatformFulfillmentPage() { const [manualReleaseTarget, setManualReleaseTarget] = useState(null); const [manualReleaseReason, setManualReleaseReason] = useState(''); const [manualReleasing, setManualReleasing] = useState(false); - const [manualBindTarget, setManualBindTarget] = useState(null); - const [manualBindRole, setManualBindRole] = useState(''); - const [manualBindNote, setManualBindNote] = useState(''); - const [manualBinding, setManualBinding] = useState(false); const [profileEditTarget, setProfileEditTarget] = useState(null); const [profileEditRole, setProfileEditRole] = useState(''); const [profileEditPlatform, setProfileEditPlatform] = useState<'wechat' | 'qq'>('wechat'); @@ -546,13 +542,6 @@ export default function PlatformFulfillmentPage() { const [profileEditReopen, setProfileEditReopen] = useState(true); const [profileEditSaving, setProfileEditSaving] = useState(false); const [verifyingBinding, setVerifyingBinding] = useState(false); - const manualBindCurrentRole = - manualBindTarget?.bindingEvidence?.accountCurrentRole || ''; - const manualBindMismatch = Boolean( - manualBindCurrentRole && - manualBindRole.trim() && - manualBindRole.trim() !== manualBindCurrentRole, - ); const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [selectedId, setSelectedId] = useState(null); const [detail, setDetail] = useState(null); @@ -955,49 +944,6 @@ export default function PlatformFulfillmentPage() { } }; - const openManualBinding = (task: PlatformFulfillmentTask) => { - setManualBindTarget(task); - setManualBindRole(task.bindingEvidence?.accountCurrentRole || ''); - setManualBindNote(''); - }; - - const confirmManualBinding = async () => { - if (!manualBindTarget) return; - const role = manualBindRole.trim(); - const note = manualBindNote.trim(); - if (!role) { - message.warning('请填写客户确认的游戏角色'); - return; - } - if (manualBindCurrentRole && role !== manualBindCurrentRole) { - message.error(`账号当前角色是「${manualBindCurrentRole}」,不能人工确认「${role}」`); - return; - } - if (note.length < 2) { - message.warning('请填写人工确认依据/备注'); - return; - } - setManualBinding(true); - try { - const result = await platformFulfillmentApi.manualConfirmBinding( - manualBindTarget.id, - role, - note, - ); - setDetail(result); - setSelectedId(result.task.id); - setManualBindTarget(null); - setManualBindRole(''); - setManualBindNote(''); - await loadTasks(); - message.success('已人工确认绑定'); - } catch (error) { - message.error(getErrorMessage(error)); - } finally { - setManualBinding(false); - } - }; - const submitOperatorConfirm = async (task: PlatformFulfillmentTask) => { try { const result = await platformFulfillmentApi.operatorConfirmBinding(task.id); @@ -1681,16 +1627,11 @@ export default function PlatformFulfillmentPage() { 代客户确认 ) : null} - {canManualConfirmBinding(task) && task.executionStatus !== 'role_ready' && task.bindTask?.roleName ? ( + {canOperatorConfirmBinding(task) && task.executionStatus !== 'role_ready' && task.bindTask?.roleName ? ( ) : null} - {can('platform_fulfillment:use') && canManualConfirmBinding(task) ? ( - - ) : null} {canResetBinding(task) ? ( - ) : null} {selected && selected.account && selected.bindingStatus === 'bound' && @@ -2690,68 +2626,6 @@ export default function PlatformFulfillmentPage() { - void confirmManualBinding()} - onCancel={() => { - setManualBindTarget(null); - setManualBindRole(''); - setManualBindNote(''); - }} - > - - - {manualBindMismatch ? ( - - ) : null} - - 账号当前角色:{manualBindTarget?.bindingEvidence?.accountCurrentRole || '未知'} - {manualBindTarget?.bindingEvidence?.scannedRole - ? `;本次扫码角色:${manualBindTarget.bindingEvidence.scannedRole}` - : ';本次未扫码'} - -
- 确认角色 - setManualBindRole(event.target.value)} - style={{ marginTop: 8 }} - /> -
-
- 确认依据 / 备注 - setManualBindNote(event.target.value)} - style={{ marginTop: 8 }} - /> -
-
-
-