feat(供应商对账): 优化厂家端对账页面 (#1318)
厂家端对账页面改为三步骤流程,补齐账期和截止时间、筛选查询、导出、确认异议及响应式黑金视觉。 Co-authored-by: 苏木 <594326199@qq.com> Co-committed-by: 苏木 <594326199@qq.com>
This commit is contained in:
parent
b0693163a6
commit
837e01b164
@ -389,6 +389,10 @@ class SupplierReconciliationPageData
|
||||
$page = max((int) request()->query('rows_page', 1), 1);
|
||||
$statementRows = $this->statements->rows($supplier, $companyId);
|
||||
$returnData = $this->returnPanelData($supplier, $companyId, request()->query());
|
||||
$now = \Illuminate\Support\Carbon::now();
|
||||
$accountingMonth = $now->copy()->subMonthNoOverflow()->startOfMonth();
|
||||
$uploadDeadline = $now->copy()->startOfMonth()->addDays(4)->setTime(23, 59, 59);
|
||||
$returnDeadline = $now->copy()->startOfMonth()->addDays(12)->setTime(18, 0);
|
||||
|
||||
return [
|
||||
'statementRows' => array_slice($statementRows, ($page - 1) * self::PER_PAGE, self::PER_PAGE),
|
||||
@ -398,6 +402,11 @@ class SupplierReconciliationPageData
|
||||
'returnWarehouses' => $returnData['returnWarehouses'],
|
||||
'rowsPage' => $page,
|
||||
'perPage' => self::PER_PAGE,
|
||||
'accountingMonthKey' => $accountingMonth->format('Y-m'),
|
||||
'accountingMonthLabel' => $accountingMonth->format('Y年n月'),
|
||||
'uploadDeadlineLabel' => $uploadDeadline->format('n月j日') . ' 24:00',
|
||||
'returnDeadlineLabel' => $returnDeadline->format('n月j日') . ' 18:00',
|
||||
'returnDeadlinePassed' => $now->greaterThan($returnDeadline),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@ use App\Models\Auth\User;
|
||||
use App\Models\Common\Contact;
|
||||
use App\Services\Auth\SupplierPortalAccess;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@ -1525,7 +1526,12 @@ class SupplierReconciliationTest extends FeatureTestCase
|
||||
->assertOk()
|
||||
->assertSeeText('供应商对账')
|
||||
->assertSeeText('晨丰 · 厂家对账')
|
||||
->assertSeeText('退货明细(全部退货数据)')
|
||||
->assertSeeText('上传并校验')
|
||||
->assertSeeText('退货扣减确认')
|
||||
->assertSeeText('查看本厂家全部退货数据')
|
||||
->assertSeeText('导出当前筛选')
|
||||
->assertDontSeeText('本期处理进度')
|
||||
->assertDontSeeText('钉钉最终提醒话术')
|
||||
->assertSeeText('PORTAL-01')
|
||||
->assertDontSeeText('PORTAL-20')
|
||||
->assertDontSeeText('OTHER-SUPPLIER-RETURN')
|
||||
@ -1535,6 +1541,9 @@ class SupplierReconciliationTest extends FeatureTestCase
|
||||
->assertSee('sp-return-scroll', false)
|
||||
->assertSee('id="portal-return-date-from"', false)
|
||||
->assertSee('data-return-date-range="last-month"', false)
|
||||
->assertSee('name="return_keyword"', false)
|
||||
->assertSee('name="return_warehouse"', false)
|
||||
->assertSee('name="return_status"', false)
|
||||
->assertDontSeeText('预估单价');
|
||||
|
||||
$this->loginAs($vendor)->get($portalUrl . '?return_page=2')
|
||||
@ -1544,6 +1553,29 @@ class SupplierReconciliationTest extends FeatureTestCase
|
||||
->assertDontSeeText('OTHER-SUPPLIER-RETURN');
|
||||
}
|
||||
|
||||
public function test_vendor_portal_shows_previous_month_period_and_confirmation_deadlines(): void
|
||||
{
|
||||
Carbon::setTestNow(Carbon::parse('2026-11-10 10:00:00', 'Asia/Shanghai'));
|
||||
|
||||
try {
|
||||
$vendor = $this->createVendorPortalUser('晨丰');
|
||||
|
||||
$this->loginAs($vendor)
|
||||
->get(route('portal.supplier-reconciliation.index', [
|
||||
'company_id' => $this->company->id,
|
||||
]))
|
||||
->assertOk()
|
||||
->assertSeeText('本次账期')
|
||||
->assertSeeText('2026年10月')
|
||||
->assertSeeText('11月5日 24:00')
|
||||
->assertSeeText('11月13日 18:00')
|
||||
->assertSeeText('逾期未确认且未提出异议的记录,视为默认无异议')
|
||||
->assertSeeText('系统只发送到期提醒,不代替厂家点击确认');
|
||||
} finally {
|
||||
Carbon::setTestNow();
|
||||
}
|
||||
}
|
||||
|
||||
public function test_non_vendor_portal_account_cannot_open_supplier_return_page(): void
|
||||
{
|
||||
$this->withExceptionHandling();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user