From aee661772b582a3d1993c72e340ffd21950c75a7 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Mon, 19 Oct 2026 12:06:51 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=AE=8C=E5=96=84=E4=BB=98?= =?UTF-8?q?=E6=AC=BE=E7=94=B3=E8=AF=B7=E5=A4=9A=E7=BB=93=E7=AE=97=E8=A1=8C?= =?UTF-8?q?=E3=80=81=E7=BB=93=E7=AE=97=E5=AF=BC=E5=85=A5=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=B8=8E=E8=AE=A1=E8=B4=B9=E8=A7=84=E5=88=99=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/option/settlement/preSettlementTable.js | 2 + src/utils/settlement-adjust-rule.js | 30 ++ .../payment/payment-application-form.vue | 244 +++++++++++-- .../components/formal-settlement-editor.vue | 32 +- .../components/pre-settlement-editor.vue | 190 +++++++--- .../components/settlement-import-page.vue | 328 +++++++++++++++--- .../settlement/receivable-payable-detail.vue | 188 ++++++---- src/views/settlement/settlement-import.vue | 87 +++-- 8 files changed, 884 insertions(+), 217 deletions(-) create mode 100644 src/utils/settlement-adjust-rule.js diff --git a/src/option/settlement/preSettlementTable.js b/src/option/settlement/preSettlementTable.js index 26c06ed..e3c6e55 100644 --- a/src/option/settlement/preSettlementTable.js +++ b/src/option/settlement/preSettlementTable.js @@ -52,6 +52,7 @@ export const settlementDetailColumns = [ { label: '运输总量', prop: 'transportQuantityText', minWidth: 120 }, { label: '里程(KM)', prop: 'mileage', minWidth: 120 }, { label: '批次号', prop: 'batchNo', minWidth: 130 }, + { label: '计费方式', prop: 'billingType', minWidth: 130 }, { label: '运输单价', prop: 'unitPrice', minWidth: 120, money: true }, { label: '运费', prop: 'freightAmount', minWidth: 120, money: true }, { label: '原金额', prop: 'originalAmount', minWidth: 120, money: true }, @@ -94,5 +95,6 @@ export const candidateDetailColumns = [ { label: '货物名称', prop: 'cargoName', minWidth: 140 }, { label: '货物类型', prop: 'cargoType', minWidth: 130 }, { label: '批次号', prop: 'batchNo', minWidth: 120 }, + { label: '计费方式', prop: 'billingType', minWidth: 130 }, { label: '结算金额', prop: 'totalAmount', minWidth: 130, money: true }, ]; diff --git a/src/utils/settlement-adjust-rule.js b/src/utils/settlement-adjust-rule.js new file mode 100644 index 0000000..066cda3 --- /dev/null +++ b/src/utils/settlement-adjust-rule.js @@ -0,0 +1,30 @@ +export function isFreightFeeName(name) { + const text = String(name || ''); + return text.includes('运费') || text.includes('运输费'); +} + +/** 运输单价对应的运费计费类型。 */ +export function freightBillingType(row = {}) { + const rule = row.billingRule || {}; + const rules = Array.isArray(rule.rules) ? rule.rules : []; + const freightRule = rules.find( + item => isFreightFeeName(item?.feeItem) || isFreightFeeName(item?.feeType) + ); + return freightRule?.billingType || row.billingType || rule.billingType || ''; +} + +export function isTierUnitPrice(row) { + return freightBillingType(row) === '阶梯单价'; +} + +export function isIntervalBilling(row) { + const type = freightBillingType(row); + return type === '区间单价' || (type.includes('区间') && type.includes('一口价')); +} + +/** 阶梯单价、区间单价、区间一口价的运输单价不开放手工调整。 */ +export function isUnitPriceAdjustable(row) { + const type = freightBillingType(row); + if (!type) return true; + return !isTierUnitPrice(row) && !isIntervalBilling(row); +} diff --git a/src/views/payment/payment-application-form.vue b/src/views/payment/payment-application-form.vue index 9c69366..637a2df 100644 --- a/src/views/payment/payment-application-form.vue +++ b/src/views/payment/payment-application-form.vue @@ -121,7 +121,7 @@ >
- + - - + +