From af4a9b6d60a30eb8d873891af6437d49fba42843 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com>
Date: Fri, 6 Nov 2026 11:07:38 +0800
Subject: [PATCH 1/6] =?UTF-8?q?fix:=20=E5=BA=94=E6=94=B6=E5=BA=94=E4=BB=98?=
=?UTF-8?q?=E6=98=8E=E7=BB=86=E4=B8=8E=E4=BB=98=E6=AC=BE=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=90=88=E5=90=8C=E5=90=8D=E7=A7=B0=E4=BB=85=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E4=B8=8D=E5=86=8D=E6=8B=BC=E6=8E=A5?=
=?UTF-8?q?=E5=90=88=E5=90=8C=E7=BC=96=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/payment/payment-application-form.vue | 4 +---
src/views/settlement/receivable-payable-detail.vue | 5 ++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/views/payment/payment-application-form.vue b/src/views/payment/payment-application-form.vue
index f93c25f..482272d 100644
--- a/src/views/payment/payment-application-form.vue
+++ b/src/views/payment/payment-application-form.vue
@@ -97,7 +97,7 @@
@@ -732,7 +732,6 @@ import {
getList as getCustomerArchiveList,
} from '@/api/vehicle/customer-archive';
import { readSettlementTransfer, removeSettlementTransfer } from '@/utils/settlement-transfer';
-import { formatContractOptionLabel } from '@/utils/contract';
import { downloadFileByUrl } from '@/utils/util';
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
import {
@@ -1140,7 +1139,6 @@ export default {
this.initialize();
},
methods: {
- formatContractOptionLabel,
hasPermission(code) {
return this.permission?.[code] !== false;
},
diff --git a/src/views/settlement/receivable-payable-detail.vue b/src/views/settlement/receivable-payable-detail.vue
index f24f56d..f40e2a4 100644
--- a/src/views/settlement/receivable-payable-detail.vue
+++ b/src/views/settlement/receivable-payable-detail.vue
@@ -1063,7 +1063,6 @@ import { getContractOptions as getSettlementContractOptions } from '@/api/settle
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
import { exportBlob } from '@/api/common';
import { getDictionary } from '@/api/system/dictbiz';
-import { formatContractOptionLabel } from '@/utils/contract';
import { isTierUnitPrice, isUnitPriceAdjustable } from '@/utils/settlement-adjust-rule';
import { downloadXls } from '@/utils/util';
import { createSettlementTransfer } from '@/utils/settlement-transfer';
@@ -1228,14 +1227,14 @@ export default {
const contract = this.contractOptions.find(
item => String(item.id) === String(this.generateQuery.contractId)
);
- return formatContractOptionLabel(contract);
+ return contract?.contractName || '';
},
updateContractName() {
const contractId = this.updateFeeForm.contractId;
const contract = [...this.updateContractOptions, ...this.contractOptions].find(
item => String(item.id) === String(contractId)
);
- return formatContractOptionLabel(contract);
+ return contract?.contractName || '';
},
updateBillingPlanName() {
const billingPlanId = this.updateFeeForm.billingPlanId;
--
2.52.0
From db55c3ef005b28a0241d1e471c71695d626bf43c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com>
Date: Fri, 6 Nov 2026 11:15:29 +0800
Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E6=94=B6?=
=?UTF-8?q?=E5=BA=94=E4=BB=98=E8=B0=83=E6=95=B4=E8=B4=B9=E7=94=A8=E9=9D=A2?=
=?UTF-8?q?=E6=9D=BF=E8=A1=A8=E6=A0=BC=E8=A1=8C=E8=A2=AB=E8=A3=81=E5=88=87?=
=?UTF-8?q?=EF=BC=8C=E8=B4=B9=E7=94=A8=E8=A1=8C=E5=A4=9A=E6=97=B6=E8=A1=A8?=
=?UTF-8?q?=E4=BD=93=E5=86=85=E9=83=A8=E6=BB=9A=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/settlement/receivable-payable-detail.vue | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/views/settlement/receivable-payable-detail.vue b/src/views/settlement/receivable-payable-detail.vue
index f40e2a4..485476e 100644
--- a/src/views/settlement/receivable-payable-detail.vue
+++ b/src/views/settlement/receivable-payable-detail.vue
@@ -1144,8 +1144,6 @@ export default {
rule: null,
},
adjustDialog: { visible: false, loading: false, submitting: false, row: null },
- // 表头 + 最多 3 行费用 + 横向滚动条,超出后表体上下滚动
- adjustTableMaxHeight: 40 + 49 * 3 + 16,
adjustRows: [],
adjustDynamicFeeColumns: [],
adjustTextProps: ['specification', 'model', 'billingFactor', 'billingType'],
@@ -1223,6 +1221,11 @@ export default {
};
},
computed: {
+ adjustTableMaxHeight() {
+ // 面板满高 min(60vh,560) 减去头部(49)、底部(58)、内边距(32);费用行多时表体内部滚动,表头固定
+ if (!this.adjustDialog.visible) return 40 + 49 * 3 + 16;
+ return Math.round(Math.min(window.innerHeight * 0.6, 560)) - 138;
+ },
generateContractName() {
const contract = this.contractOptions.find(
item => String(item.id) === String(this.generateQuery.contractId)
--
2.52.0
From b879fd3011ccfa82f88abb51eb3881602c805d5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com>
Date: Fri, 6 Nov 2026 11:26:24 +0800
Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=E5=8D=95=E6=8D=AE=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E9=9D=A2=E6=9D=BF=E8=B4=B9=E7=94=A8=E6=98=8E=E7=BB=86=E4=B8=8E?=
=?UTF-8?q?=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=E8=A1=A8=E4=BD=93=E5=86=85?=
=?UTF-8?q?=E9=83=A8=E6=BB=9A=E5=8A=A8=EF=BC=8C=E8=A1=A8=E5=A4=B4=E5=9B=BA?=
=?UTF-8?q?=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/settlement/receivable-payable-detail.vue | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/views/settlement/receivable-payable-detail.vue b/src/views/settlement/receivable-payable-detail.vue
index 485476e..3da9145 100644
--- a/src/views/settlement/receivable-payable-detail.vue
+++ b/src/views/settlement/receivable-payable-detail.vue
@@ -136,7 +136,7 @@
-
+
-
+
String(item.id) === String(this.generateQuery.contractId)
--
2.52.0
From f767296e4dc9b892a7a5e785c441a115049d189a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com>
Date: Fri, 6 Nov 2026 12:22:46 +0800
Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=E5=BA=94=E6=94=B6=E5=BA=94?=
=?UTF-8?q?=E4=BB=98=E6=98=8E=E7=BB=86=E6=96=B0=E5=A2=9E=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=8F=B7=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/option/settlement/receivable-payable-detail.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/option/settlement/receivable-payable-detail.js b/src/option/settlement/receivable-payable-detail.js
index bdf976d..f18e9bb 100644
--- a/src/option/settlement/receivable-payable-detail.js
+++ b/src/option/settlement/receivable-payable-detail.js
@@ -23,6 +23,7 @@ export const searchFields = [
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
{ label: '正式结算单号', prop: 'formalSettlementNo', type: 'input' },
{ label: '批次号', prop: 'batchNo', type: 'input' },
+ { label: '运单号', prop: 'waybillNo', type: 'input' },
{ label: '车号', prop: 'vehicleNo', type: 'input' },
];
--
2.52.0
From 7def9869ffb4fcf5c57d6ef843b2ce8f54fe8ffc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com>
Date: Fri, 6 Nov 2026 12:22:47 +0800
Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=AD=A3=E5=BC=8F?=
=?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E7=BB=93=E7=AE=97=E6=98=8E=E7=BB=86?=
=?UTF-8?q?=E8=BF=90=E8=BE=93=E6=80=BB=E9=87=8F=E6=9C=AA=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E8=AE=A1=E9=87=8F=E5=8D=95=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/formal-settlement-editor.vue | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/views/settlement/components/formal-settlement-editor.vue b/src/views/settlement/components/formal-settlement-editor.vue
index bf279bb..bc9fe4e 100644
--- a/src/views/settlement/components/formal-settlement-editor.vue
+++ b/src/views/settlement/components/formal-settlement-editor.vue
@@ -306,7 +306,7 @@
{{ formatMoney(row[item.column.prop]) }}
- {{ formatDetailTransportQuantity(row[item.column.prop]) }}
+ {{ formatDetailTransportQuantity(row) }}
{{ formatDetailMileage(row[item.column.prop]) }}
@@ -3172,13 +3172,13 @@ export default {
formatMoney(value) {
return `${Number(value || 0).toFixed(2)} RMB`;
},
- formatQuantity(value) {
- if (value === undefined || value === null || value === '') return '-';
+ formatDetailTransportQuantity(row) {
+ const value = row.transportQuantity;
+ if (this.readonly && Number(value) === -1) return '-';
const quantity = Number(value);
- return Number.isFinite(quantity) ? quantity.toFixed(2) : '-';
- },
- formatDetailTransportQuantity(value) {
- return this.readonly && Number(value) === -1 ? '-' : this.formatQuantity(value);
+ if (!Number.isFinite(quantity)) return '-';
+ // 与预结算编辑器 formatQuantity 保持一致,拼接计量单位
+ return `${quantity.toFixed(2)}${row.quantityUnit ? ` ${row.quantityUnit}` : ''}`;
},
formatDetailMileage(value) {
return this.readonly && Number(value) === -1 ? '-' : this.displayValue(value);
--
2.52.0
From 53aa1f66ef5a83edf531e900aeed5283f01f1cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com>
Date: Fri, 6 Nov 2026 14:06:01 +0800
Subject: [PATCH 6/6] =?UTF-8?q?fix:=20=E9=99=84=E4=BB=B6=E5=90=8C=E6=AD=A5?=
=?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0=EF=BC=8C=E8=B0=83=E6=95=B4=E9=99=84=E4=BB=B6=E7=B1=BB?=
=?UTF-8?q?=E5=9E=8B=E4=B8=8D=E5=86=8D=E9=87=8D=E6=8E=92=EF=BC=8C=E5=9B=9E?=
=?UTF-8?q?=E6=98=BE=E4=BF=9D=E6=8C=81=E5=8E=9F=E4=BD=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../payment/payment-application-form.vue | 63 ++++++++++---------
.../components/formal-settlement-editor.vue | 23 -------
.../components/pre-settlement-editor.vue | 23 -------
3 files changed, 35 insertions(+), 74 deletions(-)
diff --git a/src/views/payment/payment-application-form.vue b/src/views/payment/payment-application-form.vue
index 482272d..90bb5f0 100644
--- a/src/views/payment/payment-application-form.vue
+++ b/src/views/payment/payment-application-form.vue
@@ -415,7 +415,8 @@
>{{
formatAttachmentSize(row)
@@ -2084,10 +2085,10 @@ export default {
mergeAutomaticAttachments(
files,
materials,
- sourceName,
defaultMaterial = null,
sourceKey = '',
- keepUnmatched = false
+ keepUnmatched = false,
+ insertIndex = -1
) {
const existingUrls = new Set(
(this.form.attachments || []).map(file => this.attachmentFileUrl(file)).filter(Boolean)
@@ -2111,35 +2112,39 @@ export default {
url,
link: file.link || url,
attachmentType: material ? MATERIAL_TYPE_MAP[material.key] : 'other',
- description: file.description || `自动取自${sourceName}`,
+ description: file.description || '',
sourceImported: true,
sourceKey: sourceKey || undefined,
};
});
- if (imported.length) this.form.attachments = [...this.form.attachments, ...imported];
+ if (imported.length) {
+ // 回填到被替换附件的原起始位置,避免回显/切换时把用户新传附件顶到前面
+ const attachments = [...this.form.attachments];
+ const insertAt =
+ insertIndex >= 0 ? Math.min(insertIndex, attachments.length) : attachments.length;
+ attachments.splice(insertAt, 0, ...imported);
+ this.form.attachments = attachments;
+ }
return imported;
},
- /** 移除指定来源的自动关联附件(切换结算单/合同时整批替换) */
- removeAutomaticAttachments(sourceKey, sourceName = '') {
+ /** 移除指定来源的自动关联附件(切换结算单/合同时整批替换),返回首个被移除的位置 */
+ removeAutomaticAttachments(sourceKey) {
const previousUrls = new Set(
sourceKey === 'settlement' ? this.linkedSettlementAttachmentUrls || [] : []
);
- this.form.attachments = (this.form.attachments || []).filter(file => {
+ let firstRemovedIndex = -1;
+ this.form.attachments = (this.form.attachments || []).filter((file, index) => {
const url = this.attachmentFileUrl(file);
- if (sourceKey && file.sourceKey === sourceKey) return false;
- if (
- sourceName &&
- file.sourceImported &&
- String(file.description || '').includes(`自动取自${sourceName}`)
- ) {
- return false;
- }
- if (previousUrls.size && url && previousUrls.has(url)) return false;
- return true;
+ const keep =
+ !(sourceKey && file.sourceKey === sourceKey) &&
+ !(previousUrls.size && url && previousUrls.has(url));
+ if (!keep && firstRemovedIndex === -1) firstRemovedIndex = index;
+ return keep;
});
if (sourceKey === 'settlement') {
this.linkedSettlementAttachmentUrls = [];
}
+ return firstRemovedIndex;
},
/** 按当前结算单附件整批同步:先清旧关联,再写入新结算单上传的附件 */
syncSettlementAttachments(settlementRows = []) {
@@ -2154,14 +2159,14 @@ export default {
.map(file => this.attachmentFileUrl(file))
.filter(url => url && nextUrlSet.has(url));
}
- this.removeAutomaticAttachments('settlement', '结算单');
+ const removedAt = this.removeAutomaticAttachments('settlement');
const imported = this.mergeAutomaticAttachments(
settlementFiles,
settlementMaterials,
- '结算单',
null,
'settlement',
- true
+ true,
+ removedAt
);
this.linkedSettlementAttachmentUrls = imported
.map(file => this.attachmentFileUrl(file))
@@ -2212,7 +2217,7 @@ export default {
this.syncSettlementAttachments(settlementRows);
if (!this.form.contractId) {
this.firstContractPayment = false;
- this.removeAutomaticAttachments('contract', '合同');
+ this.removeAutomaticAttachments('contract');
return;
}
const contractResponse = await getContractDetail(this.form.contractId);
@@ -2224,13 +2229,14 @@ export default {
this.contractSignatureFileAvailable = contractFiles.some(file =>
Boolean(this.attachmentFileUrl(file))
);
- this.removeAutomaticAttachments('contract', '合同');
+ const contractRemovedAt = this.removeAutomaticAttachments('contract');
this.mergeAutomaticAttachments(
contractFiles,
[ATTACHMENT_MATERIALS.contract],
- '合同',
ATTACHMENT_MATERIALS.contract,
- 'contract'
+ 'contract',
+ false,
+ contractRemovedAt
);
return;
}
@@ -2244,14 +2250,15 @@ export default {
String(item.id || '') !== String(this.form.id || '') &&
item.approvalStatus !== 'voided'
);
- this.removeAutomaticAttachments('contract', '合同');
+ const contractRemovedAt = this.removeAutomaticAttachments('contract');
if (this.firstContractPayment) {
this.mergeAutomaticAttachments(
this.parse(contract.contractFileJson),
[ATTACHMENT_MATERIALS.contract],
- '合同',
ATTACHMENT_MATERIALS.contract,
- 'contract'
+ 'contract',
+ false,
+ contractRemovedAt
);
}
} catch (error) {
diff --git a/src/views/settlement/components/formal-settlement-editor.vue b/src/views/settlement/components/formal-settlement-editor.vue
index bc9fe4e..ecf348d 100644
--- a/src/views/settlement/components/formal-settlement-editor.vue
+++ b/src/views/settlement/components/formal-settlement-editor.vue
@@ -362,7 +362,6 @@
v-model="row.type"
filterable
placeholder="请选择类型"
- @change="sortAttachments"
>
- String(item.value || '').trim() === normalizedType ||
- String(item.label || '').trim() === normalizedType
- );
- return index === -1 ? Number.MAX_SAFE_INTEGER : index;
- },
- sortAttachments() {
- this.attachments = (this.attachments || [])
- .map((file, index) => ({ file, index }))
- .sort((a, b) => {
- const orderDifference =
- this.getAttachmentTypeOrder(a.file.type) - this.getAttachmentTypeOrder(b.file.type);
- return orderDifference || a.index - b.index;
- })
- .map(item => item.file);
- },
getMissingAttachmentTypes(files = this.attachments) {
const uploadedTypes = new Set(
(files || [])
@@ -3307,7 +3285,6 @@ export default {
size: this.formatAttachmentSize(file.size),
url: file.url || file.link || '',
});
- this.sortAttachments();
},
handleAttachmentSelectionChange(rows) {
this.selectedAttachmentRows = rows || [];
diff --git a/src/views/settlement/components/pre-settlement-editor.vue b/src/views/settlement/components/pre-settlement-editor.vue
index f45102d..5a368a2 100644
--- a/src/views/settlement/components/pre-settlement-editor.vue
+++ b/src/views/settlement/components/pre-settlement-editor.vue
@@ -371,7 +371,6 @@
v-model="row.type"
filterable
placeholder="请选择"
- @change="sortAttachments"
>
!isApprovalSettlementChange(row.changeContent)
);
this.attachments = this.parseAttachments(detail.attachmentsJson);
- this.sortAttachments();
this.selectedAttachmentRows = [];
if (detail.contractId) {
await this.ensureContractPartyOptions(detail.contractId, {
@@ -3099,7 +3097,6 @@ export default {
uploadTime: existing?.uploadTime || file.uploadTime || uploadTime,
};
});
- this.sortAttachments();
this.selectedAttachmentRows = [];
},
async loadAttachmentTypeOptions() {
@@ -3115,7 +3112,6 @@ export default {
} catch (error) {
this.attachmentTypeOptions = [];
}
- this.sortAttachments();
},
resolveAttachmentType(fileName) {
const normalizedName = String(fileName || '').toLocaleLowerCase();
@@ -3143,25 +3139,6 @@ export default {
typeText === '其它附件'
);
},
- getAttachmentTypeOrder(type) {
- const normalizedType = String(type || '').trim();
- const index = this.attachmentTypeOptions.findIndex(
- item =>
- String(item.value || '').trim() === normalizedType ||
- String(item.label || '').trim() === normalizedType
- );
- return index === -1 ? Number.MAX_SAFE_INTEGER : index;
- },
- sortAttachments() {
- this.attachments = (this.attachments || [])
- .map((file, index) => ({ file, index }))
- .sort((a, b) => {
- const orderDifference =
- this.getAttachmentTypeOrder(a.file.type) - this.getAttachmentTypeOrder(b.file.type);
- return orderDifference || a.index - b.index;
- })
- .map(item => item.file);
- },
attachmentTypeName(type) {
const option = this.attachmentTypeOptions.find(
item => String(item.value) === String(type) || String(item.label) === String(type)
--
2.52.0