diff --git a/.workbuddy/memory/2026-08-21.md b/.workbuddy/memory/2026-08-21.md index 3d66ae0..27eec74 100644 --- a/.workbuddy/memory/2026-08-21.md +++ b/.workbuddy/memory/2026-08-21.md @@ -1,5 +1,21 @@ # 2026-08-21 +## temporary-credit-limit 详情弹窗上下居中(align-center) +- 需求:`/business/temporary-credit-limit` 详情弹窗(detailBox,走 business-crud-page 自定义详情)上下居中。 +- 机制:Element Plus el-dialog 的 `align-center` prop —— use-dialog 源码确认:align-center 时 `.el-overlay-dialog` 设 `display:flex`,`.el-dialog.is-align-center { margin:auto }`,实现垂直+水平居中;此时 top prop 设置的 `--el-dialog-margin-top` 被更高特异性的 `margin:auto` 覆盖,不生效。 +- 改动(3 处,开关式不影响其他页): + 1. `src/views/business/components/business-crud-page.vue` 详情 el-dialog(2504 行)加 `:align-center="detailAlignCenter"`。 + 2. 同文件新增 computed `detailAlignCenter()`:`this.config.detailAlignCenter === true`(默认 false,contract/waybill 等共用详情弹窗不受影响)。 + 3. `src/option/business/temporary-credit-limit.js` config 加 `detailAlignCenter: true`。 +- 安全性:全局 `.el-dialog__body { max-height: calc(100vh - 200px); overflow-y:auto }`(element-ui.scss 182 行)保证内容超高时在 body 内滚动,dialog 总高 < 视口,flex 居中不会顶部裁切。 +- 注意:element-plus 实际版本是 2.14.2(package.json 声明 ^2.10.1,锁到 2.14.2)。el-dialog 的 class 经 $attrs 透传最终落在 `div.el-dialog` 根元素(ElDialogContent 未设 inheritAttrs:false);因此 scoped 里 `&__detail-dialog.is-transport-plan-detail { :deep(.el-dialog){...} }` 的 max-width/margin 规则实际选不到自身(仅 header/body 后代规则生效)——历史遗留,未处理。 +- 验证:`node --check` 通过;Vite 2889 编译两个改动文件均 HTTP 200。 + +## temporary-credit-limit 弹窗宽度 1400px → 96% +- 需求:`/business/temporary-credit-limit` 新增/编辑弹窗加宽到 96%。 +- 改动(单文件 `src/option/business/temporary-credit-limit.js`):`dialogWidth: 1400` → `dialogWidth: '96%'`。 +- 先例:waybill-manage / transport-plan 均为 `dialogWidth: '96%'`,shipping-template 为 `'92%'`。business-crud-page 对 dialogWidth 无特殊处理(仅独立表单页强制 100%),百分比直接透传 avue-crud;element-ui.scss 的 `.temporary-credit-limit-dialog` 只覆 label 宽度、不覆盖 el-dialog 宽度,无冲突。 + ## process-config 弹窗卡片间隔(对齐 project-apply 风格) - 需求:process-config 新增/编辑弹窗内三张 ``(基本信息 / 现行过程节点 / 节点设置)要像 project-apply 表单页一样独立成卡、卡间露出灰底(12px)。 - 根因:全站规则 `.el-dialog .avue-form { background:#fff; padding:8px 16px 4px }`(element-ui.scss ~246 行)把 Avue 弹窗表单整体包成一张白卡,section-card 白卡叠在其上看不出间隔。 @@ -58,3 +74,119 @@ - **loading-manage/form**:该路由直接映射到 `loading-manage.vue`(非 business-crud-page)。新增 computed `formPageTitle()`(`query.name || '新增/编辑配载管理'`),并在独立表单页的 `` 内、body 之前加 `
{{ formPageTitle }}
`。 - **master-order?mode=editor**:`master-order.vue` 渲染 `master-order-editor.vue`。将 `` 包进 ` - - - - - - + +
+ + + + + + + + + + + + + + + + + +
+ 默认 + + 天后完成运输 +
+
+
+ + + + + +
+
+
+ + +
+
+
+ +
{{ node.name }}
+
+
{{ text }}
+
+
+
+ +
+ + + + + + + + + + + + + + +
+ +
+ item.key === 'sign'); const returnNode = this.nodeRows.find(item => item.key === 'return'); @@ -914,14 +909,45 @@ export default { } ); }, - submitRow(row, done, loading, status = this.submitStatus) { - this.submitStatus = 1; - this.syncNodeFields(); - const submitRow = this.normalizeRow({ ...row, status }); - if (!this.validateRow(submitRow)) { - this.stopSubmitLoading(loading); + openConfig(row, readonly = false) { + this.dialogReadonly = readonly; + if (!row || !row.id) { + this.form = { + configName: '', + projectIds: '', + projectNames: '', + defaultFinishDays: '', + remark: '', + status: 0, + }; + this.selectedProjectId = ''; + this.resetNodeRows(); + this.configBox = true; return; } + api.getDetail(row.id).then(res => { + this.form = res.data.data || {}; + this.selectedProjectId = this.form.projectIds ? String(this.form.projectIds) : ''; + this.ensureSelectedProjectOption(); + this.parseNodeConfig(this.form); + this.configBox = true; + }); + }, + handleDialogClosed() { + this.submitting = false; + this.dialogReadonly = false; + }, + submitConfig(mode) { + if (this.submitting) return; + this.syncNodeFields(); + const submitRow = this.normalizeRow({ + ...this.form, + status: mode === 'draft' ? 2 : 1, + }); + if (!this.validateRow(submitRow)) { + return; + } + this.submitting = true; this.checkEnabledProjectBeforeSubmit(submitRow) .then(exists => { if (exists) { @@ -932,9 +958,9 @@ export default { .then(() => this.confirmDuplicateVoucher()) .then(() => api.submit(submitRow)) .then(() => { + this.configBox = false; this.onLoad(this.page); this.$message({ type: 'success', message: '操作成功!' }); - done(); }) .catch(error => { if ( @@ -944,21 +970,11 @@ export default { ) { window.console.log(error); } - this.stopSubmitLoading(loading); + }) + .finally(() => { + this.submitting = false; }); }, - rowSave(row, done, loading) { - this.submitRow(row, done, loading); - }, - rowUpdate(row, index, done, loading) { - this.submitRow(row, done, loading); - }, - handleProcessConfigSave(mode) { - this.submitStatus = mode === 'draft' ? 2 : 1; - if (this.$refs.crud && typeof this.$refs.crud.rowSave === 'function') { - this.$refs.crud.rowSave(); - } - }, rowDel(row) { this.$confirm('确定将选择数据删除?', { confirmButtonText: '确定', @@ -1001,35 +1017,6 @@ export default { } this.selectionClear(); }, - beforeOpen(done, type) { - this.dialogReadonly = type === 'view'; - this.submitStatus = 1; - if (type === 'add') { - this.form = { - configName: '', - projectIds: '', - projectNames: '', - defaultFinishDays: '', - remark: '', - status: 0, - }; - this.selectedProjectId = ''; - this.resetNodeRows(); - done(); - return; - } - if (['edit', 'view'].includes(type)) { - api.getDetail(this.form.id).then(res => { - this.form = res.data.data || {}; - this.selectedProjectId = this.form.projectIds ? String(this.form.projectIds) : ''; - this.ensureSelectedProjectOption(); - this.parseNodeConfig(this.form); - done(); - }); - return; - } - done(); - }, searchReset() { this.query = {}; this.applyDefaultDeptSearch(); @@ -1164,6 +1151,13 @@ export default { word-break: break-all; } + :deep(.avue-crud__header) { + margin-top: 12px; + background: transparent; + } +} + +.process-config-form { &__finish-days { display: flex; align-items: center; @@ -1174,10 +1168,6 @@ export default { } } - &__custom-form { - width: 100%; - } - &__timeline { position: relative; display: flex; @@ -1285,11 +1275,6 @@ export default { text-align: right; } - :deep(.avue-crud__header) { - margin-top: 12px; - background: transparent; - } - :deep(.el-table) { --el-table-border-color: #eff1f7; } diff --git a/src/views/business/project-apply.vue b/src/views/business/project-apply.vue index 001484f..246e5bb 100644 --- a/src/views/business/project-apply.vue +++ b/src/views/business/project-apply.vue @@ -106,7 +106,7 @@ :model="form" :rules="formRules" label-position="right" - label-width="auto" + label-width="150" class="project-apply-form" :disabled="dialogReadonly" > @@ -1964,7 +1964,7 @@ export default { &__grid { display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; row-gap: 0; margin-bottom: 12px; @@ -1972,6 +1972,13 @@ export default { border-radius: 0 0 6px 6px; padding: 14px 16px 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); + + // label 固定宽度:可容纳 6 个汉字,超出自动换行(覆盖全局 min-width:160px 与 auto 行内宽度) + :deep(.el-form-item__label) { + width: 108px !important; + min-width: 0 !important; + white-space: normal; + } } &__picker-icon { diff --git a/src/views/business/voucher-manage.vue b/src/views/business/voucher-manage.vue index 353c10c..aa11d2e 100644 --- a/src/views/business/voucher-manage.vue +++ b/src/views/business/voucher-manage.vue @@ -364,7 +364,7 @@ :before-close="beforeProgressDialogClose" @opened="loadProgress" > - +
- + +
+
+
+ 新增 + 付款申请 + 同步金蝶 + 打印结算单 + 导出 +
+
+ + + +
+
+ + + + + + + + + + +
+ +
+
+ + + + + diff --git a/src/views/settlement/components/settlement-adjustment-editor.vue b/src/views/settlement/components/settlement-adjustment-editor.vue index 2d84f81..b68feae 100644 --- a/src/views/settlement/components/settlement-adjustment-editor.vue +++ b/src/views/settlement/components/settlement-adjustment-editor.vue @@ -10,7 +10,7 @@ label-width="auto" > - - + +
+
+
+ 新增 + 导出 +
+
+ + + +
+
+ + + + + + + + + + +
+ +
+
+ + + + + diff --git a/src/views/settlement/settlement-adjustment.vue b/src/views/settlement/settlement-adjustment.vue index 25bbce3..0ca5353 100644 --- a/src/views/settlement/settlement-adjustment.vue +++ b/src/views/settlement/settlement-adjustment.vue @@ -343,7 +343,6 @@ export default { justify-content: space-between; align-items: center; min-height: 56px; - padding: 12px; } &__toolbar-right { display: flex; diff --git a/src/views/settlement/transport-reconciliation.vue b/src/views/settlement/transport-reconciliation.vue index c9d5ab0..8a92ca9 100644 --- a/src/views/settlement/transport-reconciliation.vue +++ b/src/views/settlement/transport-reconciliation.vue @@ -31,91 +31,43 @@
-
-
- 新增 - 导出 -
-
- - - -
-
- - + + + + + + - - - - - - - - - - -
- -
({ reconciliationNo: '', @@ -151,7 +104,7 @@ const emptyQuery = () => ({ export default { name: 'TransportReconciliation', - components: { TransportReconciliationEditor }, + components: { TransportReconciliationEditor, TransportReconciliationTablePanel }, data() { return { ArrowDown, @@ -210,10 +163,21 @@ export default { this.page.current = 1; this.loadTable(); }, - handleSizeChange() { - this.page.current = 1; + handlePageChange({ current, size }) { + this.page.current = current; + this.page.size = size; this.loadTable(); }, + handleAction({ type, row }) { + const map = { + view: this.openView, + edit: this.openEdit, + delete: this.handleDelete, + complete: this.handleComplete, + }; + const fn = map[type]; + if (fn) fn(row); + }, openCreate() { this.editor = { visible: true, id: null, readonly: false }; }, @@ -307,35 +271,12 @@ export default { .reconciliation-page__table-panel { margin-top: 8px; } -.reconciliation-page__toolbar { - display: flex; - justify-content: space-between; - align-items: center; - min-height: 56px; - //padding: 12px; -} -.reconciliation-page__toolbar-right { - display: flex; - align-items: center; - gap: 8px; -} .reconciliation-page__settlement-tabs { margin-bottom: 0; } .reconciliation-page__settlement-tabs :deep(.el-tabs__header) { margin: 0; } -.reconciliation-page__links { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 8px; -} -.reconciliation-page__pagination { - display: flex; - justify-content: flex-end; - padding: 12px; -} .reconciliation-page :deep(.el-table) { --el-table-border-color: #eff1f7; background: #fff; diff --git a/src/views/transportCapacity/driver.vue b/src/views/transportCapacity/driver.vue index 637e874..84f2add 100644 --- a/src/views/transportCapacity/driver.vue +++ b/src/views/transportCapacity/driver.vue @@ -1601,5 +1601,7 @@ export default { color: #d40000; font-weight: 600; } - +.el-form-item { + margin-bottom: 14px !important; +} diff --git a/src/views/transportCapacity/ship.vue b/src/views/transportCapacity/ship.vue index 5db5bb6..5d5f2d9 100644 --- a/src/views/transportCapacity/ship.vue +++ b/src/views/transportCapacity/ship.vue @@ -137,13 +137,13 @@ :model="shipForm" :rules="formRules" label-position="right" - label-width="auto" + label-width="100" :disabled="readonly" class="ship-form archive-form" > - + - + - +
- + - + - + - + - + - + - +