diff --git a/public/assets/fusion.css b/public/assets/fusion.css index b826a6f..a3ab018 100644 --- a/public/assets/fusion.css +++ b/public/assets/fusion.css @@ -547,7 +547,12 @@ html[data-boot-theme="night"] .v-fusion { /* 表单页:步骤条 + 右侧摘要 + 底部操作区 */ .v-fusion .steps { display: flex; align-items: center; gap: 0; margin-bottom: 22px; } -.v-fusion .step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; } +.v-fusion .step { + display: flex; align-items: center; gap: 8px; + font-size: 12.5px; color: var(--text-3); white-space: nowrap; + background: transparent; padding: 0; height: auto; font-weight: 500; +} +.v-fusion .step:disabled { cursor: default; opacity: 1; } .v-fusion .step .no { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; @@ -586,6 +591,8 @@ html[data-boot-theme="night"] .v-fusion { border-top: 1px solid var(--hairline); } .v-fusion .form-foot .spacer { flex: 1; } +.v-fusion .form-foot [hidden], .v-fusion .step-pane[hidden], .v-fusion .wizard-files[hidden] { display: none !important; } +.v-fusion .step-pane { min-height: 280px; } /* 登录页(HEL-325 定稿候选):左侧品牌信息区 + 右侧登录操作区,全视口左右分栏。 结构参考白栖知给出的左右布局样图;配色/材质/字体全部沿用融合 Token: @@ -984,13 +991,13 @@ html[data-boot-theme="night"] .v-fusion { .v-fusion .content input:focus, .v-fusion .content select:focus, .v-fusion .content textarea:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--focus-glow); } -.v-fusion .content button:not(.nav-item):not(.icon-btn):not(.btn):not(.seg button):not(.theme-toggle button):not(.stat):not(.qd-item):not(.dir-row):not(.hold-btn):not(.switch):not(.drawer-close):not(.caps-copy) { +.v-fusion .content button:not(.nav-item):not(.icon-btn):not(.btn):not(.seg button):not(.theme-toggle button):not(.stat):not(.qd-item):not(.dir-row):not(.hold-btn):not(.switch):not(.drawer-close):not(.caps-copy):not(.step) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 15px; border-radius: 9px; font-size: 13px; font-weight: 600; background: var(--fill); color: var(--text); transition: transform 160ms var(--ease-out), background-color 150ms ease; } -.v-fusion .content button:not(.nav-item):not(.icon-btn):not(.btn):not(.seg button):not(.theme-toggle button):not(.stat):not(.qd-item):not(.dir-row):not(.hold-btn):active { transform: scale(0.97); } +.v-fusion .content button:not(.nav-item):not(.icon-btn):not(.btn):not(.seg button):not(.theme-toggle button):not(.stat):not(.qd-item):not(.dir-row):not(.hold-btn):not(.step):active { transform: scale(0.97); } .v-fusion .card, .v-fusion .editor-card, .v-fusion .fin-panel, .v-fusion .fin-tool-page { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 20px 22px; diff --git a/public/index.php b/public/index.php index 831339a..56b2f7c 100755 --- a/public/index.php +++ b/public/index.php @@ -2227,20 +2227,23 @@ if ($action === 'archive_form') {

-
字段、联动与校验与原系统一致,仅按步骤分组呈现
+
分步录入 · 字段、联动与校验与原系统一致(上一步/下一步只切换呈现,最后一步一次提交)
-
-
1归档定位
-
2主体与额度
-
3计息规则
-
4还款计划
-
5收尾
+
+ + + + +
-
-
+ +
+
+
+
第 1 步 · 归档定位
@@ -2258,6 +2261,7 @@ if ($action === 'archive_form') {
+

保存后按类型与主体自动命名并归档

@@ -2271,6 +2275,9 @@ if ($action === 'archive_form') {
+
+
+
第 2 步 · 主体与额度
@@ -2322,6 +2329,9 @@ if ($action === 'archive_form') {
+
+
+
第 3 步 · 计息规则
@@ -2346,25 +2356,19 @@ if ($action === 'archive_form') { $overdueSelectable = $endDateVal !== '' && $endDateVal < date('Y-m-d'); $earlySettleSelectable = $endDateVal !== '' && $endDateVal > date('Y-m-d'); ?> -
+
+

到期日前不可选逾期

-
- - -
@@ -2375,9 +2379,17 @@ if ($action === 'archive_form') {
-
- - +
+
+
第 4 步 · 还款计划
+
+
+ + +
@@ -2406,6 +2418,13 @@ if ($action === 'archive_form') {

说明:到期日前可选“提前还款”;到期日后可选“按期还款/延期/逾期”。逾期未归还计划本金按上浮利率计息,剩余额度按已还款计划与手动归还本金自动计算。

+ +
+
第 5 步 · 收尾与附件
+
+ + +

贷款延期与归还

@@ -2449,15 +2468,28 @@ if ($action === 'archive_form') {

点击“创建”后会自动上传并在编辑页文件管理列表中显示。

+
+ + +
取消 - + + +
- 0): ?> -
+

文件管理(编辑页)

@@ -2503,6 +2535,95 @@ if ($action === 'archive_form') { sel.addEventListener('change',setPlanVisibility); } setPlanVisibility(); + + var wizard=document.getElementById('archive-wizard'); + var wizardStep=1; + var wizardTotal=5; + var stepBtns=document.querySelectorAll('.steps [data-step]'); + var stepPanes=document.querySelectorAll('[data-step-pane]'); + var prevBtn=document.querySelector('[data-step-prev]'); + var nextBtn=document.querySelector('[data-step-next]'); + var submitBtn=document.querySelector('[data-step-submit]'); + function fmtMoney(v){ + var n=parseFloat(v); + if(isNaN(n)) return '—'; + return n.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,','); + } + function updateSummary(){ + var nameEl=document.getElementById('archive_name_auto'); + var creditEl=document.getElementById('credit_limit_input'); + var remainEl=document.getElementById('remaining_limit_display'); + var modeEl=document.getElementById('interest_mode_select'); + var dayEl=document.getElementById('settlement_day'); + var dirEl=document.getElementById('archive_directory_id'); + var sumName=document.getElementById('sum-name'); + var sumCredit=document.getElementById('sum-credit'); + var sumRemain=document.getElementById('sum-remain'); + var sumSettle=document.getElementById('sum-settle'); + var sumPath=document.getElementById('sum-path'); + if(sumName) sumName.textContent=(nameEl&&nameEl.value)?nameEl.value:'—'; + if(sumCredit) sumCredit.textContent=fmtMoney(creditEl?creditEl.value:''); + var remainTxt=remainEl&&remainEl.value?remainEl.value:''; + if(sumRemain) sumRemain.textContent=remainTxt||fmtMoney(creditEl?creditEl.value:''); + if(sumSettle){ + var mode=modeEl?modeEl.value:''; + var label=mode==='quarterly'?'按季计息':(mode==='bullet'?'到期一次性付清':(mode==='monthly'?'按月计息':'—')); + if(mode==='bullet'){ sumSettle.textContent=label; } + else if(mode){ sumSettle.textContent=label+' · '+(dayEl&&dayEl.value?dayEl.value+'日':''); } + else { sumSettle.textContent='—'; } + } + if(sumPath&&dirEl){ + var opt=dirEl.options[dirEl.selectedIndex]; + sumPath.innerHTML=(dirEl.value&&opt)?opt.textContent.replace(/\s+/g,' ').replace(/\//g,' / '):'自动归档'; + } + } + function showWizardStep(n){ + wizardStep=Math.max(1,Math.min(wizardTotal,n)); + stepPanes.forEach(function(p){ + var pn=parseInt(p.getAttribute('data-step-pane'),10); + if(pn===wizardStep) p.removeAttribute('hidden'); + else p.setAttribute('hidden',''); + }); + stepBtns.forEach(function(b){ + var sn=parseInt(b.getAttribute('data-step'),10); + var no=b.querySelector('.no'); + b.removeAttribute('data-current'); + b.removeAttribute('data-done'); + if(sn===wizardStep){ + b.setAttribute('data-current',''); + if(no) no.textContent=String(sn); + }else if(sn=wizardTotal) nextBtn.setAttribute('hidden',''); + else nextBtn.removeAttribute('hidden'); + } + if(submitBtn){ + if(wizardStep>=wizardTotal) submitBtn.removeAttribute('hidden'); + else submitBtn.setAttribute('hidden',''); + } + var shell=document.querySelector('.content-shell'); + if(shell) shell.scrollTop=0; + updateSummary(); + } + if(wizard){ + showWizardStep(1); + if(prevBtn) prevBtn.addEventListener('click',function(){ showWizardStep(wizardStep-1); }); + if(nextBtn) nextBtn.addEventListener('click',function(){ showWizardStep(wizardStep+1); }); + stepBtns.forEach(function(b){ + b.addEventListener('click',function(){ + showWizardStep(parseInt(b.getAttribute('data-step'),10)); + }); + }); + wizard.addEventListener('input',updateSummary); + wizard.addEventListener('change',updateSummary); + } var archiveKind=document.getElementById('archive_kind'); var loanInstLabel=document.getElementById('loan_institution_label'); var dirHint=document.getElementById('archive_auto_dir_hint'); @@ -2612,6 +2733,7 @@ if ($action === 'archive_form') { if(guarantorInput){guarantorInput.addEventListener('input',syncAutoArchiveName);} if(creditInput){creditInput.addEventListener('input',syncAutoArchiveName);} syncAutoArchiveName(); + updateSummary(); function syncInstitutionsJson(){ if(!institutionSelect||!institutionsJson){return;}