user->attachPermission(Permission::where('name', 'read-admin-panel')->firstOrFail()); $repository = Mockery::mock(DingProcessDetailMirrorRepository::class); $repository->shouldReceive('paginate')->once() ->with(Mockery::type('array'), 1, 100) ->andReturn([ 'data' => [ (object) [ 'business_id' => '202601011200000000001', 'line_no' => 1, 'originator_department' => '销售中心', 'originator_name' => '张三', 'status' => '已完成', 'payment_state' => '已付款', 'current_approver_name' => '王五', 'current_task_started_at' => \Modules\EcommerceFinance\Support\OaProcessTime::now() ->subMinutes(90) ->startOfMinute() ->format('Y-m-d H:i:s'), 'document_type' => '公摊日常报销', 'purpose' => '办公用品采购', 'account_code' => '5602.04', 'account_name' => '管理费用_办公费', 'amount' => 100.00, 'bank_account_code' => '1002.01.001', 'bank_account_name' => '华夏银行-测试', 'bank_amount' => 100.00, 'payment_difference' => 0.00, 'payment_method' => '银行卡', 'paid_at' => '2026-01-02 00:00', ], ], 'total' => 1, 'summary' => [ 'rows' => 1, 'approvals' => 1, 'amount_total' => 100.0, 'bank_amount_total' => 100.0, ], 'status' => 'succeeded', 'last_synced_at' => '2026-10-26 15:00:00', 'sync_stale' => true, 'sync_stale_after_minutes' => 15, 'scope' => 'personal_permission', ]); $repository->shouldReceive('filterOptions')->once()->andReturn([ 'document_types' => ['公摊日常报销'], 'statuses' => ['已完成'], 'payment_states' => [ '待付款', '已付款', '不涉及付款', ], 'current_approvers' => ['王五', '赵六'], ]); $this->app->instance(DingProcessDetailMirrorRepository::class, $repository); $processSection = collect(\App\Utilities\BusinessNavigation::all()) ->firstWhere('slug', 'process-data'); $this->assertContains( 'oa-process', array_column($processSection['pages'] ?? [], 'slug'), ); $this->loginAs()->get(route('business.pages.show', [ 'section' => 'process-data', 'page' => 'oa-process', 'per_page' => 100, 'payment_state' => '待付款', 'current_approver_name' => '王五', 'waiting_bucket' => '1_2d', ]))->assertOk() ->assertSee('流程数据') ->assertSee('OA流程') ->assertSee('审批编号') ->assertSee('发起人') ->assertSee('单据类型') ->assertSee('打款时间') ->assertSee('name="paid_start"', false) ->assertSee('name="paid_end"', false) ->assertSee('name="current_approver_name"', false) ->assertSee('data-process-approver-combobox', false) ->assertSee('data-process-approver-option', false) ->assertSee('role="combobox"', false) ->assertSee('placeholder="输入姓名或展开选择"', false) ->assertSee('data-value="赵六"', false) ->assertSee('name="waiting_bucket"', false) ->assertSee('value="1_2d" selected', false) ->assertSee('2天以上', false) ->assertDontSee('name="include_paid"', false) ->assertDontSee('包含已付款审批') ->assertSee('付款状态可直接选择“待付款”或“已付款”') ->assertDontSee('name="entry_start"', false) ->assertDontSee('name="entry_end"', false) ->assertSee('placeholder="开始日期"', false) ->assertSee('placeholder="结算日期"', false) ->assertSee('aria-label="选择打款开始日期"', false) ->assertSee('aria-label="选择打款结算日期"', false) ->assertSee('CaiWuDatePicker.setup', false) ->assertSee('class="process-details-filter-grid"', false) ->assertSee('class="process-details-note-disclosure"', false) ->assertSee('name="payment_state"', false) ->assertSee('审批状态') ->assertSee('付款状态') ->assertSee('