修正拍摄任务状态并优化素材提示显示

区分整单状态与关联任务状态,素材上传中的任务不再占用继续查看入口。列表仅展示上传中或失败提示,保留交付确认入口,并补充状态和卡片复用回归。同步 Build 号至 2020202。
This commit is contained in:
2026-11-05 14:58:50 +08:00
parent cd90c3648b
commit 9485eac483
14 changed files with 361 additions and 85 deletions
@@ -8,14 +8,15 @@ final class DroneDockMaterialsViewTests: XCTestCase {
private weak var previousKeyWindow: UIWindow?
private let number = "TEST-MATERIAL-ORDER"
/// 同一摘要复用时整单状态同时更新文案和颜色,不沿用相冲突的拍摄分类颜色。
func testOrderSummaryUsesUploadingAndCompletedOrderColorsWhenShootStatusConflicts() throws {
/// 素材上传不覆盖整单执行状态;同一摘要更新到完成时正确切换文案和颜色。
func testOrderSummaryKeepsExecutionSeparateFromUploadingMaterialStatus() throws {
let cell = DroneDockMaterialOrderCell(frame: CGRect(x: 0, y: 0, width: 350, height: 140))
for (status, shootStatus, title, color) in [(25, "completed", "素材上传中", DroneDockStyle.primary),
for (status, shootStatus, title, color) in [(20, "processing", "执行中", DroneDockStyle.warning),
(30, "pending", "已完成", DroneDockStyle.success)] {
let order = try JSONDecoder().decode(DroneDockHomeOrder.self,
from: JSONSerialization.data(withJSONObject: ["order_number": number, "order_status": status,
"shoot_status": shootStatus, "shoot_count": 5, "shot_count": 1, "remaining_count": 4]))
"shoot_status": shootStatus, "shoot_count": 5, "shot_count": 1, "remaining_count": 4,
"material_status": 2, "active_task_id": 21, "active_task_status": 25]))
cell.apply(order: order)
cell.layoutIfNeeded()
let badge = try XCTUnwrap(descendants(cell).compactMap { $0 as? DroneDockStatusLabel }.first)