新版界面(React + TypeScript + Vite + Ant Design):登录页与开单页
共用计算经构建插件直接导入 public/ 下的 UMD 源文件;请求客户端沿用旧界面的重试、 同一操作号自动确认、恢复原操作与账号切换约定;附 vitest 单元与组件测试。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bdffbcab85
commit
ec5889075f
39 files changed
+8772
No files matched your search
@@ -0,0 +1,426 @@
|
||||
:root {
|
||||
--gold: #9a6a2f;
|
||||
--ink: #2b2620;
|
||||
--muted: #7a7064;
|
||||
--paper: #faf7f2;
|
||||
--line: #e8e0d4;
|
||||
--internal: #f4f1fb;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
.small {
|
||||
font-size: 13px;
|
||||
}
|
||||
.muted {
|
||||
color: var(--muted);
|
||||
}
|
||||
.danger-text {
|
||||
color: #c0392b;
|
||||
}
|
||||
.page-loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 120px 16px;
|
||||
}
|
||||
|
||||
/* 顶栏 */
|
||||
.topbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 20px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.topbar-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
.topbar-brand strong {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.topbar-brand small {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
.topbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.brand-mark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
flex: none;
|
||||
border-radius: 10px;
|
||||
background: var(--gold);
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
.brand-mark.large {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
font-size: 26px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.identity {
|
||||
font-weight: 600;
|
||||
}
|
||||
.old-ui-link {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.request-status {
|
||||
margin: 8px 20px 0;
|
||||
}
|
||||
|
||||
/* 主体 */
|
||||
.main {
|
||||
max-width: 1180px;
|
||||
margin: 0 auto;
|
||||
padding: 16px 20px 80px;
|
||||
}
|
||||
.page-heading {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.page-heading h2 {
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
.eyebrow {
|
||||
color: var(--gold);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.08em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.create-page > .ant-alert,
|
||||
.entry-tools {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.form-fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
.panel {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.panel.internal,
|
||||
.internal {
|
||||
background: var(--internal);
|
||||
}
|
||||
.panel-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.section-note {
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
|
||||
/* 网格:桌面四列,平板两列,手机一列 */
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: 12px 16px;
|
||||
align-items: start;
|
||||
}
|
||||
.grid.four {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
.grid.three {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
.grid.two {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
.field-label {
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.field-hint {
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.field .ant-radio-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.readonly-input {
|
||||
background: #f5f2ec;
|
||||
}
|
||||
|
||||
/* 商品行 */
|
||||
.line-item {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
padding: 14px;
|
||||
margin-bottom: 14px;
|
||||
background: #fff;
|
||||
}
|
||||
.line-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sale-inputs,
|
||||
.sale-result {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.sale-charges {
|
||||
margin-top: 12px;
|
||||
padding: 10px;
|
||||
border: 1px dashed var(--line);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.charge-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
|
||||
gap: 8px 12px;
|
||||
align-items: end;
|
||||
padding: 8px 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
.calculation {
|
||||
margin: 26px 0 0;
|
||||
color: var(--gold);
|
||||
}
|
||||
.internal {
|
||||
margin-top: 14px;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.internal-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.material-source,
|
||||
.purchase-cost-grid {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.purchase-formula,
|
||||
.material-pool-note {
|
||||
margin: 6px 0 0;
|
||||
}
|
||||
.cost-summary {
|
||||
margin: 10px 0 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 费用 */
|
||||
.order-cost-presets {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
margin: 12px 0;
|
||||
background: #fff;
|
||||
}
|
||||
.order-cost-presets legend {
|
||||
padding: 0 6px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.order-cost-options {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
.order-cost-option {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.fee-grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.fee-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1.4fr 1fr 1fr auto;
|
||||
gap: 8px 12px;
|
||||
align-items: end;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.fee-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
.credit-card-preview {
|
||||
margin-top: 12px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #d9c9ef;
|
||||
}
|
||||
.credit-card-heading {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.fees-total {
|
||||
margin-top: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 合计与提交 */
|
||||
.order-note-tags {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.order-note-tag-options {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.create-submit-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-top: 16px;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
.summary-amount {
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
color: var(--gold);
|
||||
}
|
||||
.order-error {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.form-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.issued-summary {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 32px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.issued-value {
|
||||
font-size: 26px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.issued-value.small {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* 登录 */
|
||||
.login-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 48px 16px;
|
||||
}
|
||||
.login-card {
|
||||
width: 100%;
|
||||
max-width: 440px;
|
||||
}
|
||||
.login-error {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.login-foot {
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.grid.four {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.fee-row {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.charge-row {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@media (max-width: 560px) {
|
||||
.main {
|
||||
padding: 10px 10px 70px;
|
||||
}
|
||||
.topbar {
|
||||
padding: 8px 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.topbar-brand small,
|
||||
.mode-tag {
|
||||
display: none;
|
||||
}
|
||||
.grid.four,
|
||||
.grid.three,
|
||||
.grid.two,
|
||||
.fee-row,
|
||||
.charge-row {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
.page-heading {
|
||||
flex-direction: column;
|
||||
}
|
||||
.calculation {
|
||||
margin-top: 0;
|
||||
}
|
||||
.line-item {
|
||||
padding: 10px;
|
||||
}
|
||||
.create-submit-bar {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
margin: 16px -24px -24px;
|
||||
padding: 10px 14px;
|
||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
|
||||
z-index: 5;
|
||||
}
|
||||
.summary-amount {
|
||||
font-size: 24px;
|
||||
}
|
||||
.ant-card .ant-card-body {
|
||||
padding: 14px;
|
||||
}
|
||||
.ant-card .ant-card-head {
|
||||
padding: 0 14px;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user