fix(协议签署): 优化任务列表和筛选布局 (#1463)
This commit is contained in:
parent
f0df43e2f2
commit
b4767adb86
@ -202,10 +202,6 @@
|
||||
color: var(--agreement-danger, #B80000);
|
||||
}
|
||||
|
||||
.agreement-status-cell {
|
||||
min-width: 13rem;
|
||||
}
|
||||
|
||||
.agreement-error-summary {
|
||||
display: block;
|
||||
max-width: 24rem;
|
||||
@ -225,17 +221,55 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#agreement-panel-tasks {
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
.agreement-filter-bar {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(14rem, 1.4fr) repeat(2, minmax(9rem, 0.65fr)) auto;
|
||||
grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(0, 1fr)) auto;
|
||||
align-items: end;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
padding: 0.875rem 1rem;
|
||||
border-bottom: 1px solid var(--agreement-border);
|
||||
}
|
||||
|
||||
.agreement-filter-bar--archived {
|
||||
grid-template-columns: minmax(14rem, 1.4fr) repeat(3, minmax(8rem, 0.65fr)) auto auto;
|
||||
grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr)) auto;
|
||||
}
|
||||
|
||||
.agreement-filter-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.agreement-filter-actions .agreement-button {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.agreement-column-settings:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@container (max-width: 62rem) {
|
||||
.agreement-filter-bar,
|
||||
.agreement-filter-bar--archived {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.agreement-filter-actions {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
|
||||
@container (max-width: 32rem) {
|
||||
.agreement-filter-bar,
|
||||
.agreement-filter-bar--archived {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.agreement-scope-bar {
|
||||
@ -530,6 +564,99 @@
|
||||
background: #FCFAF5;
|
||||
}
|
||||
|
||||
#agreement-panel-tasks .agreement-table-wrap {
|
||||
max-height: clamp(14rem, calc(100dvh - 25rem), 40rem);
|
||||
overflow: auto;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] {
|
||||
min-width: 72rem;
|
||||
table-layout: fixed;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] th,
|
||||
[data-agreement-task-table] td {
|
||||
padding: 0.625rem 0.875rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 4;
|
||||
background: #F8F3E7;
|
||||
color: var(--agreement-ink);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] .agreement-task-id { width: 13%; }
|
||||
[data-agreement-task-table] .agreement-task-partner-type { width: 6.25rem; }
|
||||
[data-agreement-task-table] .agreement-task-document { width: 7rem; }
|
||||
[data-agreement-task-table] .agreement-status-cell { width: 20%; }
|
||||
[data-agreement-task-table] .agreement-task-owner { width: 11%; }
|
||||
[data-agreement-task-table] .agreement-task-updated { width: 9rem; }
|
||||
[data-agreement-task-table] .agreement-table-actions {
|
||||
width: 11.75rem;
|
||||
padding-inline: 0.625rem;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] td.agreement-task-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] td.agreement-task-updated,
|
||||
.agreement-archive-meta--time {
|
||||
white-space: nowrap;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] td.agreement-table-actions {
|
||||
background: var(--agreement-surface);
|
||||
}
|
||||
|
||||
[data-agreement-task-table] tbody tr:hover td.agreement-table-actions {
|
||||
background: #FCFAF5;
|
||||
}
|
||||
|
||||
.agreement-task-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.3125rem;
|
||||
}
|
||||
|
||||
.agreement-task-actions form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.agreement-task-actions .agreement-icon-button,
|
||||
.agreement-task-actions .agreement-button--compact {
|
||||
height: 30px;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.agreement-task-actions .agreement-icon-button {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.agreement-task-actions .agreement-button--compact {
|
||||
min-width: 0;
|
||||
gap: 0.25rem;
|
||||
padding: 0 0.4rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.agreement-task-actions .material-icons-outlined {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
[data-agreement-task-table] .agreement-archive-meta {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.agreement-empty-row td {
|
||||
padding: 3rem 1rem;
|
||||
border-bottom: 0;
|
||||
@ -1272,10 +1399,6 @@
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.agreement-filter-bar {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.agreement-request-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
@ -1311,7 +1434,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.agreement-filter-bar,
|
||||
.agreement-form-grid,
|
||||
.agreement-checkbox-grid,
|
||||
.agreement-archive-options {
|
||||
@ -1376,7 +1498,7 @@
|
||||
<p class="agreement-help" role="status" data-signing-permission-hint>当前账号仅可查看协议签署,尚未获签署操作授权,请联系管理员。</p>
|
||||
@endunless
|
||||
|
||||
<section class="agreement-panel" id="agreement-panel-tasks" role="tabpanel" aria-labelledby="agreement-tab-tasks" data-agreement-panel="tasks">
|
||||
<section class="agreement-panel" id="agreement-panel-tasks" role="tabpanel" aria-labelledby="agreement-tab-tasks" data-agreement-panel="tasks" data-finance-table-surface>
|
||||
@php($scopeQuery = request()->except(['agreement_scope', 'agreement_status', 'agreement_task_page', 'agreement_quote_page']))
|
||||
<nav class="agreement-scope-bar" aria-label="任务归档视图">
|
||||
@foreach (['active' => ['inbox', '待处理'], 'all' => ['view_list', '全部任务'], 'archived' => ['inventory_2', '已归档']] as $scope => $scopeLabel)
|
||||
@ -1440,28 +1562,31 @@
|
||||
<option value="quote-confirmation" @selected($agreementType === 'quote-confirmation')>报价确认单</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="agreement-button agreement-button--primary" type="submit">
|
||||
<span class="material-icons-outlined" aria-hidden="true">search</span>
|
||||
查询
|
||||
</button>
|
||||
<button class="agreement-button" type="button" data-task-reset>
|
||||
<span class="material-icons-outlined" aria-hidden="true">restart_alt</span>
|
||||
重置
|
||||
</button>
|
||||
<div class="agreement-filter-actions">
|
||||
<button class="agreement-button agreement-button--primary" type="submit">
|
||||
<span class="material-icons-outlined" aria-hidden="true">search</span>
|
||||
查询
|
||||
</button>
|
||||
<button class="agreement-button" type="button" data-task-reset>
|
||||
<span class="material-icons-outlined" aria-hidden="true">restart_alt</span>
|
||||
重置
|
||||
</button>
|
||||
<div class="agreement-column-settings" data-finance-controls></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="agreement-table-wrap">
|
||||
<table class="agreement-table">
|
||||
<table class="agreement-table" data-agreement-task-table>
|
||||
<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" class="agreement-task-id">任务编号</th>
|
||||
<th scope="col" class="agreement-task-partner-type">合作方类型</th>
|
||||
<th scope="col" class="agreement-task-name">合作方名称</th>
|
||||
<th scope="col" class="agreement-task-document">业务类型</th>
|
||||
<th scope="col" class="agreement-status-cell">签署状态</th>
|
||||
<th scope="col" class="agreement-task-owner">发起人</th>
|
||||
<th scope="col" class="agreement-task-updated">更新时间</th>
|
||||
<th scope="col" class="agreement-table-actions" data-finance-fixed="end">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -1469,14 +1594,14 @@
|
||||
@php($quoteVersion = $quoteSignature->version)
|
||||
@php($quoteError = $quoteSignature->lastErrorSummary())
|
||||
<tr data-quote-task-row>
|
||||
<td>{{ $quoteVersion?->version_code ?? ('报价版本 #' . $quoteSignature->quote_version_id) }}</td>
|
||||
<td class="agreement-task-id">{{ $quoteVersion?->version_code ?? ('报价版本 #' . $quoteSignature->quote_version_id) }}</td>
|
||||
<td>快递公司</td>
|
||||
<td>{{ $quoteVersion?->carrier_name ?? $quoteSignature->organization_name }}</td>
|
||||
<td class="agreement-task-name">{{ $quoteVersion?->carrier_name ?? $quoteSignature->organization_name }}</td>
|
||||
<td>报价确认单</td>
|
||||
<td class="agreement-status-cell">
|
||||
<span class="agreement-status agreement-status--{{ in_array($quoteSignature->status, ['archived', 'completed'], true) ? 'success' : (in_array($quoteSignature->status, ['failed', 'rejected', 'expired', 'revoked'], true) ? 'danger' : 'warning') }}">{{ $quoteSignature->statusLabel() }}</span>
|
||||
@if ($quoteSignature->status === 'archived')
|
||||
<span class="agreement-archive-meta"><strong>归档时间</strong>{{ optional($quoteSignature->archived_at)->format('Y-m-d H:i') ?: '时间未知' }}</span>
|
||||
<span class="agreement-archive-meta agreement-archive-meta--time"><strong>归档时间</strong>{{ optional($quoteSignature->archived_at)->format('Y-m-d H:i') ?: '时间未知' }}</span>
|
||||
<span class="agreement-archive-meta"><strong>归档说明</strong>{{ $quoteSignature->archive_reason ?: '签署完成后自动归档' }}</span>
|
||||
@endif
|
||||
@if ($quoteError)
|
||||
@ -1484,9 +1609,10 @@
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $agreementCompanyName }}</td>
|
||||
<td>{{ optional($quoteSignature->updated_at)->format('Y-m-d H:i') }}</td>
|
||||
<td class="agreement-task-updated">{{ optional($quoteSignature->updated_at)->format('Y-m-d H:i') }}</td>
|
||||
<td class="agreement-table-actions">
|
||||
@if ($agreementCanOperate)
|
||||
<div class="agreement-task-actions">
|
||||
@if ($quoteSignature->esign_sign_flow_id && ! in_array($quoteSignature->status, ['archived', 'rejected', 'expired', 'revoked'], true))
|
||||
<form method="POST" action="{{ route('business.courier-agreement-signatures.quotes.synchronize', $quoteSignature) }}">
|
||||
@csrf
|
||||
@ -1520,6 +1646,7 @@
|
||||
<button class="agreement-button agreement-button--compact agreement-button--danger" type="button" data-delete-task-open title="删除签署任务"><span class="material-icons-outlined" aria-hidden="true">delete_outline</span>删除</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<span class="agreement-help">仅可查看</span>
|
||||
@endif
|
||||
@ -1530,14 +1657,14 @@
|
||||
@php($taskError = $task->lastErrorSummary())
|
||||
@php($taskFailed = $task->status === 'failed' || ($task->status === 'unknown' && $task->hasDefinitiveFailure()))
|
||||
<tr data-agreement-task-row>
|
||||
<td>{{ $task->business_no }}</td>
|
||||
<td class="agreement-task-id">{{ $task->business_no }}</td>
|
||||
<td>{{ $task->partnerTypeLabel() }}</td>
|
||||
<td>{{ $task->courier_name }}</td>
|
||||
<td class="agreement-task-name">{{ $task->courier_name }}</td>
|
||||
<td>{{ $task->documentLabel() }}</td>
|
||||
<td class="agreement-status-cell">
|
||||
<span class="agreement-status agreement-status--{{ in_array($task->status, ['archived', 'completed'], true) ? 'success' : ($taskFailed || in_array($task->status, ['rejected', 'expired', 'revoked'], true) ? 'danger' : 'warning') }}">{{ $task->statusLabel() }}</span>
|
||||
@if ($task->status === 'archived')
|
||||
<span class="agreement-archive-meta"><strong>归档时间</strong>{{ optional($task->archived_at)->format('Y-m-d H:i') ?: '时间未知' }}</span>
|
||||
<span class="agreement-archive-meta agreement-archive-meta--time"><strong>归档时间</strong>{{ optional($task->archived_at)->format('Y-m-d H:i') ?: '时间未知' }}</span>
|
||||
<span class="agreement-archive-meta"><strong>归档说明</strong>{{ $task->archiveReason() ?: '未记录说明' }}</span>
|
||||
@endif
|
||||
@if ($taskError)
|
||||
@ -1545,9 +1672,10 @@
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $task->initiatorName() }}</td>
|
||||
<td>{{ optional($task->updated_at)->format('Y-m-d H:i') }}</td>
|
||||
<td class="agreement-task-updated">{{ optional($task->updated_at)->format('Y-m-d H:i') }}</td>
|
||||
<td class="agreement-table-actions">
|
||||
@if ($agreementCanOperate)
|
||||
<div class="agreement-task-actions">
|
||||
@if ($task->esign_sign_flow_id && ! in_array($task->status, ['archived', 'rejected', 'expired', 'revoked'], true))
|
||||
<form method="POST" action="{{ route('business.courier-agreement-signatures.synchronize', $task) }}">
|
||||
@csrf
|
||||
@ -1586,6 +1714,7 @@
|
||||
<button class="agreement-button agreement-button--compact agreement-button--danger" type="button" data-delete-task-open title="删除签署任务"><span class="material-icons-outlined" aria-hidden="true">delete_outline</span>删除</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<span class="agreement-help">仅可查看</span>
|
||||
@endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user