第6项:统一业务控件、主题与移动布局,保留原生输入和焦点契约
This commit is contained in:
1 parent
ff8b05973a
commit
cb705d296e
74 files changed
+3548
-2442
No files matched your search
@@ -6,6 +6,7 @@ type CostRow = ReturnType<typeof import('../../../../../public/calculations.js')
|
||||
import type { OrderContext, SharedViews } from '../viewTypes';
|
||||
import { Children, Fragment } from 'react';
|
||||
import { Calc as LedgerCalc } from '../../../shared';
|
||||
import { LedgerDataTable, LedgerTable } from '../../../components/BusinessControls';
|
||||
export function orderDetail(
|
||||
{ currentOrder, state, detailForm, error, navigation }: OrderContext,
|
||||
{
|
||||
@@ -84,30 +85,19 @@ export function orderDetail(
|
||||
].sort((a, b) => a.date.localeCompare(b.date));
|
||||
return rows.length ? (
|
||||
<div className="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>业务</th>
|
||||
<th>金额</th>
|
||||
<th>账户/经办人</th>
|
||||
<th>说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{Children.toArray(
|
||||
rows.map(r => (
|
||||
<tr>
|
||||
<td>{r.date}</td>
|
||||
<td>{r.type}</td>
|
||||
<td>¥{yuan(r.amount)}</td>
|
||||
<td>{r.who}</td>
|
||||
<td>{r.note}</td>
|
||||
</tr>
|
||||
)),
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
<LedgerDataTable
|
||||
columns={[
|
||||
{ title: '日期' },
|
||||
{ title: '业务' },
|
||||
{ title: '金额' },
|
||||
{ title: '账户/经办人' },
|
||||
{ title: '说明' },
|
||||
]}
|
||||
rows={rows.map((r, rowIndex) => ({
|
||||
key: rowIndex,
|
||||
cells: [r.date, r.type, <>¥{yuan(r.amount)}</>, r.who, r.note],
|
||||
}))}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<p className="muted">还没有收退款、费用或交款记录。</p>
|
||||
@@ -224,7 +214,7 @@ export function orderDetail(
|
||||
const names = Object.fromEntries(teamMemberKeys().map(member => [member, teamMemberName(member)]));
|
||||
return (
|
||||
<div className="table-wrap">
|
||||
<table className="detail-cost-table" aria-label={label}>
|
||||
<LedgerTable className="detail-cost-table" aria-label={label}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>成本项目</th>
|
||||
@@ -284,7 +274,7 @@ export function orderDetail(
|
||||
}),
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</LedgerTable>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user