Merge remote-tracking branch 'origin/main' into fix/yueyang-process-details-data-visible
This commit is contained in:
commit
889cec1779
@ -106,27 +106,6 @@ class SystemizationTodos extends Controller
|
||||
});
|
||||
$items = $items->sortBy('hierarchy_order')->values();
|
||||
$positionGroups = $this->positionGroups($sequenceMap);
|
||||
if ($filters['type_sequence'] > 0) {
|
||||
$items = $items
|
||||
->filter(static fn (SystemizationTodo $todo): bool =>
|
||||
(int) $todo->type_sequence === $filters['type_sequence']
|
||||
)
|
||||
->values();
|
||||
}
|
||||
if ($filters['content_sequence'] > 0) {
|
||||
$items = $items
|
||||
->filter(static fn (SystemizationTodo $todo): bool =>
|
||||
(int) $todo->content_sequence === $filters['content_sequence']
|
||||
)
|
||||
->values();
|
||||
}
|
||||
if ($filters['item_sequence'] > 0) {
|
||||
$items = $items
|
||||
->filter(static fn (SystemizationTodo $todo): bool =>
|
||||
(int) $todo->item_sequence === $filters['item_sequence']
|
||||
)
|
||||
->values();
|
||||
}
|
||||
|
||||
$base = SystemizationTodo::query();
|
||||
$categories = SystemizationTodo::query()
|
||||
@ -428,7 +407,11 @@ class SystemizationTodos extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
private function contentSiblings(?string $category, ?string $section): Collection
|
||||
private function contentSiblings(
|
||||
?string $category,
|
||||
?string $section,
|
||||
?int $excludeId = null,
|
||||
): Collection
|
||||
{
|
||||
$categoryKey = $this->hierarchyGroupKey($this->hierarchyLabel($category));
|
||||
$sectionKey = $this->hierarchyGroupKey($this->hierarchyLabel($section));
|
||||
@ -439,12 +422,54 @@ class SystemizationTodos extends Controller
|
||||
->lockForUpdate()
|
||||
->get()
|
||||
->filter(fn (SystemizationTodo $todo): bool =>
|
||||
$this->hierarchyGroupKey($this->hierarchyLabel($todo->category)) === $categoryKey
|
||||
(int) $todo->id !== (int) $excludeId
|
||||
&& $this->hierarchyGroupKey($this->hierarchyLabel($todo->category)) === $categoryKey
|
||||
&& $this->hierarchyGroupKey($this->hierarchyLabel($todo->section)) === $sectionKey
|
||||
)
|
||||
->values();
|
||||
}
|
||||
|
||||
private function positionForUpdate(
|
||||
SystemizationTodo $todo,
|
||||
int $targetPosition,
|
||||
array &$data,
|
||||
): void {
|
||||
$currentCategoryKey = $this->hierarchyGroupKey($this->hierarchyLabel($todo->category));
|
||||
$currentSectionKey = $this->hierarchyGroupKey($this->hierarchyLabel($todo->section));
|
||||
$targetCategoryKey = $this->hierarchyGroupKey($this->hierarchyLabel($data['category'] ?? null));
|
||||
$targetSectionKey = $this->hierarchyGroupKey($this->hierarchyLabel($data['section'] ?? null));
|
||||
$sameGroup = $currentCategoryKey === $targetCategoryKey
|
||||
&& $currentSectionKey === $targetSectionKey;
|
||||
|
||||
if ($sameGroup) {
|
||||
$currentSiblings = $this->contentSiblings($todo->category, $todo->section);
|
||||
$currentIndex = $currentSiblings->search(
|
||||
static fn (SystemizationTodo $item): bool => (int) $item->id === (int) $todo->id
|
||||
);
|
||||
if ($currentIndex !== false && $targetPosition === ((int) $currentIndex + 1)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$siblings = $this->contentSiblings(
|
||||
$data['category'] ?? null,
|
||||
$data['section'] ?? null,
|
||||
(int) $todo->id,
|
||||
);
|
||||
if ($siblings->isEmpty()) {
|
||||
$insertOrder = (int) SystemizationTodo::query()->max('sort_order') + 1;
|
||||
} elseif ($targetPosition <= $siblings->count()) {
|
||||
$insertOrder = (int) $siblings[$targetPosition - 1]->sort_order;
|
||||
} else {
|
||||
$insertOrder = (int) $siblings->max('sort_order') + 1;
|
||||
}
|
||||
|
||||
SystemizationTodo::query()
|
||||
->where('sort_order', '>=', $insertOrder)
|
||||
->increment('sort_order');
|
||||
$data['sort_order'] = $insertOrder;
|
||||
}
|
||||
|
||||
private function groupTodoIds(SystemizationTodo $todo, bool $includeSection): array
|
||||
{
|
||||
$categoryKey = $this->hierarchyGroupKey($this->hierarchyLabel($todo->category));
|
||||
@ -480,6 +505,7 @@ class SystemizationTodos extends Controller
|
||||
public function update(Request $request, SystemizationTodo $todo): RedirectResponse
|
||||
{
|
||||
$data = $this->validated($request);
|
||||
$targetPosition = max(0, (int) ($data['position'] ?? 0));
|
||||
unset($data['position']);
|
||||
$data['updated_by'] = user_id();
|
||||
$this->normalizeCompletionDates($data);
|
||||
@ -500,7 +526,16 @@ class SystemizationTodos extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$todo->update($data);
|
||||
DB::transaction(function () use ($todo, $data, $targetPosition): void {
|
||||
$lockedTodo = SystemizationTodo::query()
|
||||
->lockForUpdate()
|
||||
->findOrFail($todo->id);
|
||||
if ($targetPosition > 0) {
|
||||
$this->positionForUpdate($lockedTodo, $targetPosition, $data);
|
||||
}
|
||||
$lockedTodo->update($data);
|
||||
$todo->setRawAttributes($lockedTodo->getAttributes(), true);
|
||||
});
|
||||
$this->storeAttachments($request, $todo);
|
||||
|
||||
return $this->backToPage('待办事项已更新并定位。', 'success', $todo);
|
||||
@ -572,9 +607,6 @@ class SystemizationTodos extends Controller
|
||||
'assignees' => $this->peopleFilter('assignee'),
|
||||
'start_date' => $this->normalizeDateFilter(request('start_date')),
|
||||
'due_date' => $this->normalizeDateFilter(request('due_date')),
|
||||
'type_sequence' => max(0, (int) request('type_sequence', 0)),
|
||||
'content_sequence' => max(0, (int) request('content_sequence', 0)),
|
||||
'item_sequence' => max(0, (int) request('item_sequence', 0)),
|
||||
'keyword' => trim((string) request('keyword', '')),
|
||||
];
|
||||
}
|
||||
|
||||
@ -225,8 +225,8 @@ CRON_TZ=Asia/Shanghai
|
||||
# 供应商管理每天北京时间 08:15 完整校准档案、合同、联系人与打款资料。
|
||||
15 8 * * * root /usr/bin/flock -w 3600 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan business-mirror:sync-supplier-management --quiet >/dev/null 2>&1
|
||||
*/2 * * * * root /usr/bin/flock -n /run/caiwu-esign-polling.lock /usr/bin/docker exec -u www-data caiwu_app php artisan esign:poll-signatures --quiet >/dev/null 2>&1
|
||||
# 财务台账:每天 02:30 同步 AI 库动账、上一晚店铺余额和平台提现,并重算流水。
|
||||
30 2 * * * root /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /bin/sh -c '/usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-rpt --days=7 --merge --quiet && /usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-shop-data --days=7 --quiet' >/dev/null 2>&1
|
||||
# 财务台账:每天 02:30 同步 AI 库动账并重算流水;店铺台账默认不自动回填。
|
||||
30 2 * * * root /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-rpt --days=7 --merge --quiet >/dev/null 2>&1
|
||||
# 科目映射保存后保留自动重跑队列,每分钟在受限容器内串行消费。
|
||||
* * * * * root /usr/bin/flock -n /run/caiwu-account-mapping-resync.lock /bin/sh /opt/caiwuxitong/run-finance-batch.sh store-receipt:auto-resync --quiet >/dev/null 2>&1
|
||||
* * * * * root /usr/bin/flock -n /run/caiwu-account-bills-export.lock /bin/sh /opt/caiwuxitong/run-finance-batch.sh account-bills:exports:run --quiet >/dev/null 2>&1
|
||||
|
||||
@ -229,8 +229,8 @@ CRON_TZ=Asia/Shanghai
|
||||
# 供应商管理每天北京时间 08:15 完整校准档案、合同、联系人与打款资料。
|
||||
15 8 * * * root /usr/bin/flock -w 3600 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan business-mirror:sync-supplier-management --quiet >/dev/null 2>&1
|
||||
*/2 * * * * root /usr/bin/flock -n /run/caiwu-esign-polling.lock /usr/bin/docker exec -u www-data caiwu_app php artisan esign:poll-signatures --quiet >/dev/null 2>&1
|
||||
# 财务台账:每天 02:30 同步 AI 库动账、上一晚店铺余额和平台提现,并重算流水。
|
||||
30 2 * * * root /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /bin/sh -c '/usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-rpt --days=7 --merge --quiet && /usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-shop-data --days=7 --quiet' >/dev/null 2>&1
|
||||
# 财务台账:每天 02:30 同步 AI 库动账并重算流水;店铺台账默认不自动回填。
|
||||
30 2 * * * root /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-rpt --days=7 --merge --quiet >/dev/null 2>&1
|
||||
# 科目映射保存后保留自动重跑队列,每分钟在受限容器内串行消费。
|
||||
* * * * * root /usr/bin/flock -n /run/caiwu-account-mapping-resync.lock /bin/sh /opt/caiwuxitong/run-finance-batch.sh store-receipt:auto-resync --quiet >/dev/null 2>&1
|
||||
* * * * * root /usr/bin/flock -n /run/caiwu-account-bills-export.lock /bin/sh /opt/caiwuxitong/run-finance-batch.sh account-bills:exports:run --quiet >/dev/null 2>&1
|
||||
|
||||
@ -66,7 +66,7 @@ docker compose -f docker-compose.local.yml exec -u www-data app \
|
||||
- 账户总表支持导出空白 Excel 录入模板,包含页面列、状态和账户类型选项及填写说明
|
||||
- 账户总表编辑模式支持直接新增公司和首个账户:公司不存在时同步写入公司台账,可维护注册地、企业类型、税务类型、公司状态、基本户信息和备注;账户简称必须唯一,可同时登记期初日期与期初余额
|
||||
- 写权限:账户映射、账户状态和账户类型修改仅系统管理员及配置的财务台账管理员角色;其他账号只读
|
||||
- 调度:`finance-ledger:sync-rpt --days=7 --merge` 每天 02:30(Asia/Shanghai)
|
||||
- 调度:`finance-ledger:sync-rpt --days=7 --merge` 每天 02:30(Asia/Shanghai);店铺台账默认不自动回填
|
||||
|
||||
账户状态独立保存在 `fin_account_statuses`,账户类型人工维护值独立保存在
|
||||
`fin_account_type_overrides`,重新导入账户基础数据均不会覆盖;页面修改使用
|
||||
@ -128,6 +128,13 @@ docker exec -u www-data caiwu_app php artisan finance-ledger:verify
|
||||
30 2 * * * root /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-rpt --days=7 --merge --quiet >/dev/null 2>&1
|
||||
```
|
||||
|
||||
店铺台账默认保持现有数据,不随每日动账同步自动回填。需要按上游重新拉取时,
|
||||
先确认已部署包含 `sync-shop-data --rebuild` 的主线镜像,再手动执行:
|
||||
|
||||
```bash
|
||||
sh /opt/caiwuxitong/run-finance-batch.sh finance-ledger:sync-shop-data --rebuild
|
||||
```
|
||||
|
||||
5. 在「系统设置 → 权限」把「财务台账」页面分配给财务角色;账户映射修改允许超级管理员和「财务台账管理员」角色(可用 `FINANCE_LEDGER_MAPPING_EDITOR_ROLES` 覆盖)。
|
||||
|
||||
生产环境不设置 `FINANCE_LEDGER_WINDOW_END` 时会同步到当天;本地为了复现 12,037 笔规格数据,在 `runtime/.env` 固定为 `2026-10-18`。
|
||||
|
||||
@ -470,18 +470,6 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="installation-fee-dialog__scroll">
|
||||
<table class="installation-fee-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">店铺名称</th>
|
||||
<th scope="col">安装公司</th>
|
||||
<th scope="col">收款渠道</th>
|
||||
<th scope="col" class="is-number">结算明细金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-installation-fee-rows></tbody>
|
||||
</table>
|
||||
<div class="installation-fee-empty" data-installation-fee-empty>请选择客服审核日期后查看明细</div>
|
||||
<section class="installation-fee-platform-summary" aria-label="安装费平台汇总">
|
||||
<h3>平台汇总</h3>
|
||||
<table>
|
||||
@ -494,6 +482,18 @@
|
||||
<tbody data-installation-fee-platform-rows></tbody>
|
||||
</table>
|
||||
</section>
|
||||
<table class="installation-fee-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">店铺名称</th>
|
||||
<th scope="col">安装公司</th>
|
||||
<th scope="col">收款渠道</th>
|
||||
<th scope="col" class="is-number">结算明细金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-installation-fee-rows></tbody>
|
||||
</table>
|
||||
<div class="installation-fee-empty" data-installation-fee-empty>请选择客服审核日期后查看明细</div>
|
||||
</div>
|
||||
<div class="installation-fee-dialog__foot">
|
||||
<span data-installation-fee-count>共 0 条明细汇总</span>
|
||||
|
||||
@ -215,9 +215,6 @@
|
||||
<option value="{{ $category }}" @selected($todoFilters['category'] === $category)>{{ $category }}</option>
|
||||
@endforeach
|
||||
</select></label>
|
||||
<label>类型序号<input type="number" name="type_sequence" min="1" step="1" value="{{ $todoFilters['type_sequence'] ?: '' }}" placeholder="如:1"></label>
|
||||
<label>内容序号<input type="number" name="content_sequence" min="1" step="1" value="{{ $todoFilters['content_sequence'] ?: '' }}" placeholder="如:2"></label>
|
||||
<label>待办序号<input type="number" name="item_sequence" min="1" step="1" value="{{ $todoFilters['item_sequence'] ?: '' }}" placeholder="如:3"></label>
|
||||
@php
|
||||
$selectedOwners = $todoOwners->filter(
|
||||
static fn (string $owner): bool => in_array($owner, $todoFilters['owners'], true)
|
||||
@ -345,7 +342,7 @@
|
||||
<table class="sys-todo-table" aria-label="财务系统化待办清单">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">类型</th><th scope="col">内容</th><th scope="col">待办序号</th><th scope="col">待办事项</th><th scope="col">总负责人</th><th scope="col">责任人</th>
|
||||
<th scope="col">类型</th><th scope="col">内容</th><th scope="col">待办事项序号</th><th scope="col">待办事项</th><th scope="col">总负责人</th><th scope="col">责任人</th>
|
||||
<th scope="col">开始时间</th><th scope="col">完成时间</th><th scope="col">状态</th><th scope="col">完成情况</th><th scope="col">完成截图</th><th scope="col">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -363,6 +360,7 @@
|
||||
};
|
||||
$todoPayload = [
|
||||
'id' => $item->id,
|
||||
'position' => (int) $item->item_sequence,
|
||||
'category' => $item->category ?? '',
|
||||
'section' => $sectionLabels[$loop->index] ?? '',
|
||||
'title' => $titleLabels[$loop->index] ?? '',
|
||||
@ -489,7 +487,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<label class="sys-todo-field sys-todo-field--4">内容<textarea name="section" maxlength="255" rows="2" data-sys-todo-auto-grow></textarea></label>
|
||||
<label class="sys-todo-field sys-todo-field--2 sys-todo-position-field" data-sys-todo-position-field>新增位置
|
||||
<label class="sys-todo-field sys-todo-field--2 sys-todo-position-field" data-sys-todo-position-field>待办事项序号
|
||||
<select name="position" data-sys-todo-position></select>
|
||||
</label>
|
||||
<label class="sys-todo-field sys-todo-field--3">状态<select name="status" required>@foreach ($todoStatuses as $status)<option value="{{ $status }}">{{ $status }}</option>@endforeach</select></label>
|
||||
@ -675,28 +673,28 @@
|
||||
|
||||
function populatePositionOptions() {
|
||||
positionSelect.replaceChildren();
|
||||
positionSelect.disabled = !!currentTodoId;
|
||||
if (currentTodoId) {
|
||||
positionField.hidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
positionField.hidden = false;
|
||||
positionSelect.disabled = false;
|
||||
var group = currentPositionGroup();
|
||||
var count = group ? Number(group.count || 0) : 0;
|
||||
for (var index = 1; index <= count; index++) {
|
||||
var positionCount = currentTodoId ? Math.max(count, 1) : count;
|
||||
for (var index = 1; index <= positionCount; index++) {
|
||||
var before = document.createElement('option');
|
||||
before.value = String(index);
|
||||
before.textContent = '第 ' + index + ' 条前插入(原第 ' + index + ' 条及之后顺延)';
|
||||
before.textContent = currentTodoId
|
||||
? '第 ' + index + ' 条'
|
||||
: '第 ' + index + ' 条前插入(原第 ' + index + ' 条及之后顺延)';
|
||||
positionSelect.appendChild(before);
|
||||
}
|
||||
var end = document.createElement('option');
|
||||
end.value = String(count + 1);
|
||||
end.textContent = count > 0
|
||||
? '添加到末尾(第 ' + (count + 1) + ' 条)'
|
||||
: '新增为第 1 条';
|
||||
positionSelect.appendChild(end);
|
||||
positionSelect.value = String(count + 1);
|
||||
if (!currentTodoId) {
|
||||
var end = document.createElement('option');
|
||||
end.value = String(count + 1);
|
||||
end.textContent = count > 0
|
||||
? '添加到末尾(第 ' + (count + 1) + ' 条)'
|
||||
: '新增为第 1 条';
|
||||
positionSelect.appendChild(end);
|
||||
positionSelect.value = String(count + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function syncScrollRail() {
|
||||
@ -866,7 +864,6 @@
|
||||
form.action = currentTodoId ? routes.update.replace('__TODO__', currentTodoId) : routes.store;
|
||||
title.textContent = currentTodoId ? '编辑待办' : '新增待办';
|
||||
deleteButton.hidden = !currentTodoId;
|
||||
positionField.hidden = !!currentTodoId;
|
||||
if (payload) {
|
||||
setCategoryValue(payload.category);
|
||||
setValue('section', payload.section);
|
||||
@ -887,6 +884,13 @@
|
||||
setValue('status', '待办');
|
||||
}
|
||||
populatePositionOptions();
|
||||
if (currentTodoId) {
|
||||
var requestedPosition = Number((payload && payload.position) || 1);
|
||||
positionSelect.value = String(Math.min(
|
||||
Math.max(requestedPosition, 1),
|
||||
Math.max(positionSelect.options.length, 1)
|
||||
));
|
||||
}
|
||||
|
||||
existing.replaceChildren();
|
||||
((payload && payload.attachments) || []).forEach(function (attachment) {
|
||||
|
||||
@ -234,7 +234,7 @@ class ManagementCrudTest extends FeatureTestCase
|
||||
]);
|
||||
$this->app->instance(InstallationDetailMirrorRepository::class, $mirror);
|
||||
|
||||
$this->loginAs()
|
||||
$response = $this->loginAs()
|
||||
->get(route('business.pages.show', [
|
||||
'section' => 'financial-operations',
|
||||
'page' => 'installation-details',
|
||||
@ -313,6 +313,13 @@ class ManagementCrudTest extends FeatureTestCase
|
||||
->assertSeeText('测试安装公司')
|
||||
->assertSeeText('120.50')
|
||||
->assertSeeText('共 1 条');
|
||||
|
||||
$html = $response->getContent();
|
||||
$platformSummaryPosition = strpos($html, 'class="installation-fee-platform-summary"');
|
||||
$detailTablePosition = strpos($html, '<th scope="col">店铺名称</th>');
|
||||
$this->assertNotFalse($platformSummaryPosition);
|
||||
$this->assertNotFalse($detailTablePosition);
|
||||
$this->assertLessThan($detailTablePosition, $platformSummaryPosition);
|
||||
}
|
||||
|
||||
public function testInstallationDetailsExportUsesFiltersAndMirrorRows(): void
|
||||
|
||||
@ -28,9 +28,7 @@ class SystemizationTodosTest extends FeatureTestCase
|
||||
->assertSeeText('从 Excel 同步待办')
|
||||
->assertSeeText('总负责人')
|
||||
->assertSeeText('责任人')
|
||||
->assertSeeText('类型序号')
|
||||
->assertSeeText('内容序号')
|
||||
->assertSeeText('待办序号')
|
||||
->assertSeeText('待办事项序号')
|
||||
->assertSeeText('已逾期')
|
||||
->assertSeeText('开始时间')
|
||||
->assertSeeText('完成时间')
|
||||
@ -43,6 +41,10 @@ class SystemizationTodosTest extends FeatureTestCase
|
||||
->assertSee('data-sys-todo-category-select', false)
|
||||
->assertSee('data-sys-todo-new-category-input', false)
|
||||
->assertSee('data-sys-todo-position', false)
|
||||
->assertSeeText('待办事项序号')
|
||||
->assertDontSee('name="type_sequence"', false)
|
||||
->assertDontSee('name="content_sequence"', false)
|
||||
->assertDontSee('name="item_sequence"', false)
|
||||
->assertSee('data-sys-todo-group-edit', false)
|
||||
->assertSee('id="sysTodoGroupDialog"', false)
|
||||
->assertDontSee('sys-todo-table__clamp', false)
|
||||
@ -184,6 +186,34 @@ class SystemizationTodosTest extends FeatureTestCase
|
||||
$items[6]->fresh()->sort_order,
|
||||
$items[7]->fresh()->sort_order,
|
||||
);
|
||||
|
||||
$this->patch(route('business.systemization-todos.update', ['todo' => $items[7]->id]), [
|
||||
'category' => '收入',
|
||||
'section' => '平台收入核对',
|
||||
'position' => 2,
|
||||
'title' => '原待办 7',
|
||||
'owner' => '晨曦',
|
||||
'assignee' => '栎阳',
|
||||
'status' => SystemizationTodo::STATUS_PENDING,
|
||||
])->assertRedirect();
|
||||
|
||||
$reordered = $this->get(route('business.pages.show', [
|
||||
'section' => 'other',
|
||||
'page' => 'systemization-todos',
|
||||
]))->assertOk()->viewData('content')['items']
|
||||
->where('category', '收入')
|
||||
->where('section', '平台收入核对')
|
||||
->values();
|
||||
$this->assertSame([
|
||||
'原待办 1',
|
||||
'原待办 7',
|
||||
'原待办 2',
|
||||
'原待办 3',
|
||||
'原待办 4',
|
||||
'原待办 5',
|
||||
'原待办 6',
|
||||
'新增待办 7',
|
||||
], $reordered->pluck('title')->all());
|
||||
}
|
||||
|
||||
public function test_type_and_content_cells_can_be_edited_for_the_whole_group(): void
|
||||
@ -278,7 +308,7 @@ class SystemizationTodosTest extends FeatureTestCase
|
||||
$pageResponse
|
||||
->assertOk()
|
||||
->assertSee('rowspan="2"', false)
|
||||
->assertSee('<th scope="col">内容</th><th scope="col">待办序号</th><th scope="col">待办事项</th>', false)
|
||||
->assertSee('<th scope="col">内容</th><th scope="col">待办事项序号</th><th scope="col">待办事项</th>', false)
|
||||
->assertSee('sys-todo-table__type', false)
|
||||
->assertSee('title="类型序号">1</span>', false)
|
||||
->assertSee('title="内容序号">1</span>', false)
|
||||
@ -320,22 +350,6 @@ class SystemizationTodosTest extends FeatureTestCase
|
||||
->all(),
|
||||
);
|
||||
|
||||
$sequenceResponse = $this->get(route('business.pages.show', [
|
||||
'section' => 'other',
|
||||
'page' => 'systemization-todos',
|
||||
'category' => '收入',
|
||||
'item_sequence' => 2,
|
||||
]))->assertOk();
|
||||
$sequenceContent = $sequenceResponse->viewData('content');
|
||||
$this->assertSame(['2、收入事项 B'], $sequenceContent['items']->pluck('title')->all());
|
||||
|
||||
$typeSequenceContent = $this->get(route('business.pages.show', [
|
||||
'section' => 'other',
|
||||
'page' => 'systemization-todos',
|
||||
'type_sequence' => 2,
|
||||
]))->assertOk()->viewData('content');
|
||||
$this->assertSame(['3、成本事项'], $typeSequenceContent['items']->pluck('title')->all());
|
||||
|
||||
$highlightedTodo = $pageItems->firstWhere('title', '2、收入事项 B');
|
||||
$this->get(route('business.pages.show', [
|
||||
'section' => 'other',
|
||||
@ -430,16 +444,6 @@ class SystemizationTodosTest extends FeatureTestCase
|
||||
->values()
|
||||
->all(),
|
||||
);
|
||||
$contentResponse = $this->get(route('business.pages.show', [
|
||||
'section' => 'other',
|
||||
'page' => 'systemization-todos',
|
||||
'type_sequence' => 1,
|
||||
'content_sequence' => 2,
|
||||
]))->assertOk();
|
||||
$this->assertSame(
|
||||
[$secondContent->id],
|
||||
$contentResponse->viewData('content')['items']->pluck('id')->all(),
|
||||
);
|
||||
$this->assertSame(
|
||||
[$completed->id, $inProgress->id],
|
||||
$items
|
||||
|
||||
@ -125,6 +125,17 @@ class BusinessMirrorScheduleTest extends TestCase
|
||||
$this->assertStringContainsString('esign:poll-signatures --quiet', $contents, $script);
|
||||
$this->assertStringContainsString('/run/caiwu-esign-polling.lock', $contents, $script);
|
||||
$this->assertSame(1, substr_count($contents, 'esign:poll-signatures --quiet'), $script);
|
||||
$this->assertStringNotContainsString('finance-ledger:sync-shop-data', $contents, $script);
|
||||
$this->assertStringContainsString(
|
||||
'# 财务台账:每天 02:30 同步 AI 库动账并重算流水;店铺台账默认不自动回填。',
|
||||
$contents,
|
||||
$script,
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'30 2 * * * root /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan finance-ledger:sync-rpt --days=7 --merge --quiet >/dev/null 2>&1',
|
||||
$contents,
|
||||
$script,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user