refactor(payment): 调整到期快捷筛选至账单台账页面独立展示

- 将快捷筛选标签及相关逻辑从搜索子组件提升至账单台账页面
- 标签置于搜索卡片下方、表格上方独立一行,满足用户需求
- 删除子组件中相关标签DOM及快捷筛选功能代码
- 统一选中态样式,采用 Element Plus 默认蓝底深字风格

fix(transportCapacity): 统一船舶管理弹窗表单控件宽度

- 删除异常的宽度强制规则,避免控件宽度不一致
- 采用固定宽度250px加最大宽度100%方案,实现多控件视觉宽度一致
- 清理无用label-width属性,解决label撑开布局异常问题
- 优化表单项label对齐与必填星号样式,确保多行label视觉协调

refactor(transportCapacity): 优化船舶证书分组布局及标签简化

- 证书有效期自标签统一更改为“有效期自”
- 证书上传区域由集中底部移至对应证书分组末尾,保持信息关联
- 清理无用样式,保留必需上传项间距样式,提升界面整洁度

fix(business): 修复项目申请表单级联选择器宽度问题

- 业务部门和承办部门el-cascader控件未设置宽度,导致收缩
- 补充级联选择器宽度规则,保证与其他控件宽度统一
- 支持热更新,无需重启开发环境
This commit is contained in:
2026-09-02 14:36:42 +08:00
parent 87ec01c8dd
commit a8986690bb
5 changed files with 200 additions and 146 deletions
+26 -1
View File
@@ -9,7 +9,10 @@
- `src/views/transportCapacity/driver.vue``.driver-page__expiry-tags` - `src/views/transportCapacity/driver.vue``.driver-page__expiry-tags`
- `src/views/transportCapacity/ship.vue``.transport-ship-page__expiry-tags` - `src/views/transportCapacity/ship.vue``.transport-ship-page__expiry-tags`
- 各页变量名保留原样(contract-manage 用 contractExpiryScope/changeExpiryScope/contractExpiryStats;运力页用 query.expireStatus/handleExpireChange/expiryStat)。 - 各页变量名保留原样(contract-manage 用 contractExpiryScope/changeExpiryScope/contractExpiryStats;运力页用 query.expireStatus/handleExpireChange/expiryStat)。
- 已补改`src/views/payment/components/bill-ledger-search.vue` —— 独立自定义搜索子组件`bill-ledger-search__actions` 由「标签+按钮同一行(右对齐)」改为 `flex-direction:column; gap:12px`:标签独立一行(左对齐,去掉 justify-content:flex-end),按钮另起一行右对齐。标签变量 shortcutOptions/query.expiryShortcut 不变。用户确认需统一,故改之 - 已补改并修正:`payment/bill-ledger` 页。用户要求"放在卡片下面"(搜索白卡之外、表格之上独立一行),非卡片内分行。最终方案:把到期快捷筛选整组(标签 DOM + `shortcutOptions` 计算属性 + `handleShortcutChange`)从子组件 `bill-ledger-search.vue` 提升到页面 `bill-ledger.vue`,置于 `<bill-ledger-search>``<bill-ledger-table>` 之间(卡片下、表格上)
- `bill-ledger-search.vue`:删除标签 DOM、`.bill-ledger-search__actions`/`.bill-ledger-search__actions-tags` CSS、`counts` prop、`shortcutOptions`/`handleShortcutChange`;按钮行 `.bill-ledger-search__actions-buttons` 恢复单行右对齐(`margin-bottom:8px`)。
- `bill-ledger.vue`:模板插入 `<div class="bill-ledger-page__expiry-tags">`(绑定 `query.expiryShortcut`@change`handleShortcutChange``handleSearch`);脚本加 `shortcutOptions` computed(用 `counts`+ `handleShortcutChange` method;新增 `<style scoped>` 写入 `.bill-ledger-page__expiry-tags`flex 行、`margin:8px 0`)。`emptyQuery()` 已含 `expiryShortcut:'all'`,无回归。
- 选中态样式统一:去掉 `.bill-ledger-page__expiry-tags :deep(.el-check-tag.is-checked)``background-color:#409eff` + `color:#fff` 蓝底白字覆盖,改用 Element Plus 默认浅蓝底深蓝字,与合同页一致。
## transportCapacity/ship 新增弹窗 input 宽度统一 ## transportCapacity/ship 新增弹窗 input 宽度统一
- 问题:新增/修改弹窗内输入控件宽度不一致(文本框明显窄于下拉框、日期框)。 - 问题:新增/修改弹窗内输入控件宽度不一致(文本框明显窄于下拉框、日期框)。
@@ -18,3 +21,25 @@
1. 删除 `.el-input__wrapper{width:150px!important}` 异常规则。 1. 删除 `.el-input__wrapper{width:150px!important}` 异常规则。
2. 增强 `.ship-form` 内输入控件的 100% 宽度覆盖,补齐 `.el-select__wrapper` / `.el-cascader` / `.el-input__wrapper`,使文本框/下拉/日期/数字框均 100% 填满所在栅格列。 2. 增强 `.ship-form` 内输入控件的 100% 宽度覆盖,补齐 `.el-select__wrapper` / `.el-cascader` / `.el-input__wrapper`,使文本框/下拉/日期/数字框均 100% 填满所在栅格列。
- 说明:弹窗仍保留不同栅格列宽(span6/8/12/16)的密集布局,同行字段已等宽;若需跨行全部 input 绝对像素等宽(统一栅格列宽),需进一步重排。 - 说明:弹窗仍保留不同栅格列宽(span6/8/12/16)的密集布局,同行字段已等宽;若需跨行全部 input 绝对像素等宽(统一栅格列宽),需进一步重排。
- 二次排查(用户反馈仍不一致):把 `.ship-form` 内控件 100% 覆盖从通用 `:deep(.el-input)` 改为更具体的 `:deep(.el-form-item__content > .el-input)` 并加 `!important`,同步覆盖 `.el-input__wrapper`/`.el-select__wrapper`,确保不会被 Element Plus 变量或更具体选择器压回默认/较窄宽度。请用户刷新浏览器验证。
- 三次修复(用户反馈第一行 span=6+6+12 三个字段宽度仍不齐):放弃「width: 100% 撑满 col」方案,改用「对齐 vehicle/customer-archive 的 `.archive-form` 风格」——label 固定 `calc(6em + 24px)` + 控件统一 `250px + max-width: 100%`。根因:`el-cascader` 默认 `display: inline-block`,即使 width: 100% 也不易撑满 col-content(与 input 视觉差 ~150px vs ~280px);span=6+6+12 下两列 form-item__content 实际不等宽(label-width=100 被长 label 撑开)。新方案固定 250px 后三字段视觉一致,参照客商档案。
- 同时清理模板中冗余 `label-width="88px"`(会被新 CSS 强制覆盖失效)。
## transportCapacity/ship 证书信息分组:附件下放到对应分组末尾 + label 缩短
- 需求:1. 「船舶国籍证书」「内河船舶最低安全配员证书」分组里 label 「证书有效期自」偏长,改短为「有效期自」(与下面统一)。2. 底部集中的 `.cert-upload-grid` 上传区调整到各证书分组末尾,让附件与字段同组。
- 修改:
- `src/views/transportCapacity/ship.vue` 模板 line 392/4312 处 `label="证书有效期自"``label="有效期自"`
- 模板结构重组:删除底部 `<el-row class="cert-upload-grid">...</el-row>`(原 line 472-548),把 6 个 `<image-upload-field>` 分别插入对应 `cert-block` 末尾(每个用 `class="ship-upload-item"`,独立 `<el-row :gutter="18"><el-col :span="8">`):
- 船舶所有权证书分组 → `ownershipCertImage`
- 内河船舶安全与环保证书分组 → `safetyCertImage`
- 船舶国籍证书分组 → `nationalityCertImage`
- 内河船舶最低安全配员证书分组 → `safeManningCertImage`
- 光船租赁登记证明书分组 → `leaseContractImage`label="光船租赁登记证书"
- 船舶营业运输证书分组 → `businessTransportCertImage`label="船舶营业运输证"
- 样式清理:删除无用的 `.cert-upload-grid { padding-top:8px }` / `.cert-upload-spacer { height:1px }`;保留 `.cert-block` / `.cert-block__title` / `.ship-upload-item``margin-bottom:14px`)。
- 验证:用户刷新浏览器看新布局。
## business/project-apply.vue 表单「业务部门/承办部门」级联选择器宽度统一
- 问题:项目新增/编辑表单(含独立表单页 `/business/project-apply/form`)中,业务部门、承办部门两个 `el-cascader` 的按钮宽度与同行的 select/input 不一致。
- 根因:scoped 样式里强制 100% 宽度的控件列表(`el-input` / `el-select` / `el-tree-select` / `el-date-editor`)漏了 `el-cascader`,导致级联选择器按内容宽度收缩,未填满栅格列。
- 修复:`src/views/business/project-apply.vue` 末尾 scoped 样式 `.project-apply-form` 的 100% 宽度规则补上 `:deep(.el-cascader)`。Vite HMR 已自动生效,无需重启 dev。
+1
View File
@@ -2234,6 +2234,7 @@ export default {
:deep(.el-input), :deep(.el-input),
:deep(.el-select), :deep(.el-select),
:deep(.el-tree-select), :deep(.el-tree-select),
:deep(.el-cascader),
:deep(.el-date-editor) { :deep(.el-date-editor) {
width: 100%; width: 100%;
} }
+40 -1
View File
@@ -2,11 +2,20 @@
<basic-container class="bill-ledger-page"> <basic-container class="bill-ledger-page">
<bill-ledger-search <bill-ledger-search
:query="query" :query="query"
:counts="counts"
:loading="loading" :loading="loading"
@search="handleSearch" @search="handleSearch"
@reset="resetSearch" @reset="resetSearch"
/> />
<div class="bill-ledger-page__expiry-tags">
<el-check-tag
v-for="item in shortcutOptions"
:key="item.value"
:checked="query.expiryShortcut === item.value"
@change="handleShortcutChange(item.value)"
>
{{ item.label }}
</el-check-tag>
</div>
<bill-ledger-table <bill-ledger-table
:rows="rows" :rows="rows"
:loading="loading" :loading="loading"
@@ -124,7 +133,21 @@ export default {
mounted() { mounted() {
this.loadData(); this.loadData();
}, },
computed: {
shortcutOptions() {
return [
{ label: `全部(${this.counts.all || 0}`, value: 'all' },
{ label: `30天内到期(${this.counts.within30 || 0}`, value: 'within30' },
{ label: `90天内到期(${this.counts.within90 || 0}`, value: 'within90' },
{ label: `90天以上(${this.counts.over90 || 0}`, value: 'over90' },
];
},
},
methods: { methods: {
handleShortcutChange(value) {
this.query.expiryShortcut = value;
this.handleSearch();
},
unwrapData(response) { unwrapData(response) {
const body = response?.data || response || {}; const body = response?.data || response || {};
return body?.data || body; return body?.data || body;
@@ -233,3 +256,19 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="scss">
.bill-ledger-page__expiry-tags {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
margin-top: 16px;
margin-bottom: 6px;
:deep(.el-check-tag) {
margin: 0;
white-space: nowrap;
}
}
</style>
@@ -71,7 +71,6 @@ export default {
name: 'BillLedgerSearch', name: 'BillLedgerSearch',
props: { props: {
query: { type: Object, required: true }, query: { type: Object, required: true },
counts: { type: Object, default: () => ({}) },
loading: { type: Boolean, default: false }, loading: { type: Boolean, default: false },
}, },
emits: ['search', 'reset'], emits: ['search', 'reset'],
@@ -86,22 +85,6 @@ export default {
maturityStatusOptions, maturityStatusOptions,
}; };
}, },
computed: {
shortcutOptions() {
return [
{ label: `全部(${this.counts.all || 0}`, value: 'all' },
{ label: `30天内到期(${this.counts.within30 || 0}`, value: 'within30' },
{ label: `90天内到期(${this.counts.within90 || 0}`, value: 'within90' },
{ label: `90天以上(${this.counts.over90 || 0}`, value: 'over90' },
];
},
},
methods: {
handleShortcutChange(value) {
this.query.expiryShortcut = value;
this.$emit('search');
},
},
}; };
</script> </script>
@@ -124,32 +107,12 @@ export default {
.bill-ledger-search :deep(.el-date-editor) { .bill-ledger-search :deep(.el-date-editor) {
width: 100%; width: 100%;
} }
.bill-ledger-search__actions {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 8px;
}
.bill-ledger-search__actions-buttons { .bill-ledger-search__actions-buttons {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
gap: 8px; gap: 8px;
} margin-bottom: 8px;
.bill-ledger-search__actions-tags {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
.bill-ledger-search__actions-tags :deep(.el-check-tag) {
margin: 0;
white-space: nowrap;
}
.bill-ledger-search__actions-tags :deep(.el-check-tag.is-checked),
.bill-ledger-search__actions-tags :deep(.el-check-tag.is-checked:hover) {
background-color: #409eff;
color: #fff;
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.bill-ledger-search__grid { .bill-ledger-search__grid {
+120 -94
View File
@@ -161,11 +161,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="安放龙骨日期/建造完工日期" prop="keelLayingDate">
label="安放龙骨日期/建造完工日期"
prop="keelLayingDate"
label-width="88px"
>
<div class="date-range-inline"> <div class="date-range-inline">
<el-date-picker <el-date-picker
v-model="shipForm.keelLayingDate" v-model="shipForm.keelLayingDate"
@@ -316,6 +312,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="18">
<el-col :span="8">
<image-upload-field
label="船舶所有权证书"
prop="ownershipCertImage"
:value="shipForm.ownershipCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
class="ship-upload-item"
@success="url => handleShipCertificateUploadSuccess('ownershipCertImage', url)"
/>
</el-col>
</el-row>
</div> </div>
<div class="cert-block"> <div class="cert-block">
@@ -357,13 +368,28 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="18">
<el-col :span="8">
<image-upload-field
label="内河船舶安全与环保证书"
prop="safetyCertImage"
:value="shipForm.safetyCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
class="ship-upload-item"
@success="url => handleShipCertificateUploadSuccess('safetyCertImage', url)"
/>
</el-col>
</el-row>
</div> </div>
<div class="cert-block"> <div class="cert-block">
<div class="cert-block__title">船舶国籍证书</div> <div class="cert-block__title">船舶国籍证书</div>
<el-row :gutter="18"> <el-row :gutter="18">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="证书有效期自" prop="nationalityCertStartDate"> <el-form-item label="有效期自" prop="nationalityCertStartDate">
<div class="date-range-inline"> <div class="date-range-inline">
<el-date-picker <el-date-picker
v-model="shipForm.nationalityCertStartDate" v-model="shipForm.nationalityCertStartDate"
@@ -381,13 +407,28 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="18">
<el-col :span="8">
<image-upload-field
label="船舶国籍证书"
prop="nationalityCertImage"
:value="shipForm.nationalityCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
class="ship-upload-item"
@success="url => handleShipCertificateUploadSuccess('nationalityCertImage', url)"
/>
</el-col>
</el-row>
</div> </div>
<div class="cert-block"> <div class="cert-block">
<div class="cert-block__title">内河船舶最低安全配员证书</div> <div class="cert-block__title">内河船舶最低安全配员证书</div>
<el-row :gutter="18"> <el-row :gutter="18">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="证书有效期自" prop="safeManningCertStartDate"> <el-form-item label="有效期自" prop="safeManningCertStartDate">
<div class="date-range-inline"> <div class="date-range-inline">
<el-date-picker <el-date-picker
v-model="shipForm.safeManningCertStartDate" v-model="shipForm.safeManningCertStartDate"
@@ -405,6 +446,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="18">
<el-col :span="8">
<image-upload-field
label="内河船舶最低安全配员证书"
prop="safeManningCertImage"
:value="shipForm.safeManningCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
class="ship-upload-item"
@success="url => handleShipCertificateUploadSuccess('safeManningCertImage', url)"
/>
</el-col>
</el-row>
</div> </div>
<div class="cert-block"> <div class="cert-block">
@@ -435,6 +491,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="18">
<el-col :span="8">
<image-upload-field
label="光船租赁登记证书"
prop="leaseContractImage"
:value="shipForm.leaseContractImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
class="ship-upload-item"
@success="url => handleShipCertificateUploadSuccess('leaseContractImage', url)"
/>
</el-col>
</el-row>
</div> </div>
<div class="cert-block"> <div class="cert-block">
@@ -471,72 +542,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> <el-row :gutter="18">
<el-row class="cert-upload-grid" :gutter="18">
<el-col :span="8">
<image-upload-field
label="船舶所有权证书"
prop="ownershipCertImage"
:value="shipForm.ownershipCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
@success="url => handleShipCertificateUploadSuccess('ownershipCertImage', url)"
/>
</el-col>
<el-col :span="8">
<image-upload-field
label="内河船舶安全与环保证书"
prop="safetyCertImage"
:value="shipForm.safetyCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
@success="url => handleShipCertificateUploadSuccess('safetyCertImage', url)"
/>
</el-col>
<el-col :span="8">
<image-upload-field
label="船舶国籍证书"
prop="nationalityCertImage"
:value="shipForm.nationalityCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
@success="url => handleShipCertificateUploadSuccess('nationalityCertImage', url)"
/>
</el-col>
<el-col :span="8">
<image-upload-field
label="内河船舶最低安全配员证书"
prop="safeManningCertImage"
:value="shipForm.safeManningCertImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
@success="url => handleShipCertificateUploadSuccess('safeManningCertImage', url)"
/>
</el-col>
<el-col :span="8">
<div class="cert-upload-spacer"></div>
</el-col>
<el-col :span="8">
<image-upload-field
label="光船租赁登记证书"
prop="leaseContractImage"
:value="shipForm.leaseContractImage"
:readonly="readonly"
:headers="uploadHeaders"
large
class-prefix="ship"
@success="url => handleShipCertificateUploadSuccess('leaseContractImage', url)"
/>
</el-col>
<el-col :span="8"> <el-col :span="8">
<image-upload-field <image-upload-field
label="船舶营业运输证" label="船舶营业运输证"
@@ -546,10 +552,12 @@
:headers="uploadHeaders" :headers="uploadHeaders"
large large
class-prefix="ship" class-prefix="ship"
class="ship-upload-item"
@success="url => handleShipCertificateUploadSuccess('businessTransportCertImage', url)" @success="url => handleShipCertificateUploadSuccess('businessTransportCertImage', url)"
/> />
</el-col> </el-col>
</el-row> </el-row>
</div>
</section-card> </section-card>
</el-form> </el-form>
<template #footer> <template #footer>
@@ -1215,21 +1223,47 @@ export default {
} }
.ship-form { .ship-form {
:deep(.el-date-editor.el-input), // 对齐 vehicle/customer-archive 的 .archive-form 风格:
:deep(.el-date-editor.el-input__wrapper), // label 固定 calc(6em + 24px) 容纳 6 汉字 + 长 label 自动折行;
:deep(.el-select), // 控件统一 250px + max-width: 100%,保证 cascader / input / select / date-picker 等混排时宽度一致。
:deep(.el-select__wrapper), // 修复前:第一行 span=6+6+12 布局下 el-cascader (默认 inline-block) 与 el-input 实际宽度差很大,
:deep(.el-cascader), // 加上 label-width="100" 在长 label 上被撑开,导致 3 个控件视觉宽度比不一致。
:deep(.el-input),
:deep(.el-input__wrapper), :deep(.el-form-item__label) {
:deep(.el-input-number) { flex: 0 0 calc(6em + 24px) !important;
width: 100%; width: calc(6em + 24px) !important;
height: auto;
white-space: normal !important;
word-break: break-all;
overflow-wrap: anywhere;
line-height: 18px;
} }
// label 固定宽度:可容纳 6 个汉字,超出自动换行 // label 与控件垂直居中(避免长 label 折行时视觉错位)
:deep(.el-form-item__label) { :deep(.el-form-item) {
white-space: normal; align-items: center;
line-height: 20px; }
// 必填星号 * 与首行文字垂直居中(多行 label 时 :before 与文字行盒高度不一致的修复)
:deep(.el-form-item.is-required .el-form-item__label) {
align-items: flex-start;
}
:deep(.el-form-item.is-required .el-form-item__label::before) {
display: inline-block;
height: 18px;
line-height: 18px;
margin-right: 4px;
}
// 所有控件统一 250pxcol 宽不足时由 max-width: 100% 兜底收缩)
:deep(.el-form-item__content > .el-input),
:deep(.el-form-item__content > .el-input-number),
:deep(.el-form-item__content > .el-select),
:deep(.el-form-item__content > .el-cascader),
:deep(.el-form-item__content > .el-date-editor) {
width: 250px;
max-width: 100%;
} }
} }
@@ -1276,14 +1310,6 @@ export default {
line-height: 20px; line-height: 20px;
} }
.cert-upload-grid {
padding-top: 8px;
}
.cert-upload-spacer {
height: 1px;
}
.ship-upload-item { .ship-upload-item {
margin-bottom: 14px; margin-bottom: 14px;
} }