From 4d4065b9e98ebbab3690298be6ebf6dc66019de2 Mon Sep 17 00:00:00 2001 From: wuweihua <88888888> Date: Tue, 27 Oct 2026 15:24:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A1=E8=B4=B9=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=8A=B6=E6=80=81=EF=BC=8C=E6=96=B0=E5=A2=9E=E9=94=80?= =?UTF-8?q?=E5=94=AE=E4=BB=B7=E5=92=8C=E4=BA=A7=E5=93=81=E4=BB=B7=E6=9C=AA?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E7=9A=84=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BB=A5=E6=94=AF=E6=8C=81=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/price/BillingController.java | 5 +- .../main/resources/i18n/messages.properties | 9 ++- .../ar/service/impl/ArBillServiceImpl.java | 9 ++- .../com/bms/price/domain/PrcOrderBill.java | 2 +- .../price/domain/vo/TmsPriceQuoteResult.java | 2 +- .../price/enums/BillBillingFailStatus.java | 30 +++++++-- .../com/bms/price/enums/BillTaskFailCode.java | 33 ++++++++-- .../impl/TmsPriceQuoteServiceImpl.java | 56 ++++++++++------ .../support/OrderBillExportSupport.java | 9 ++- bms-front/src/components/BasicTable/index.vue | 64 ++++++++++++++++--- bms-front/src/views/price/billing/bill.vue | 11 ++-- .../components/BatchAddIncomeFeeDialog.vue | 9 ++- .../price/billing/components/BillDetail.vue | 9 ++- bms-front/src/views/price/orderBill/index.vue | 9 ++- 14 files changed, 189 insertions(+), 68 deletions(-) diff --git a/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/BillingController.java b/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/BillingController.java index 3f71b6a3..4e980bf6 100644 --- a/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/BillingController.java +++ b/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/BillingController.java @@ -195,7 +195,10 @@ public class BillingController extends BaseController private static List limitBillingListFailStatus(List requested) { - List allowed = Arrays.asList(Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3)); + // Soft-fail list: success + sales 1/2/3 + product-catalog 23/24/25 + List allowed = Arrays.asList( + Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3), + Integer.valueOf(23), Integer.valueOf(24), Integer.valueOf(25)); if (requested == null || requested.isEmpty()) { return new ArrayList(allowed); diff --git a/bms-back/bms-admin/src/main/resources/i18n/messages.properties b/bms-back/bms-admin/src/main/resources/i18n/messages.properties index e22d368d..71e2cfb9 100644 --- a/bms-back/bms-admin/src/main/resources/i18n/messages.properties +++ b/bms-back/bms-admin/src/main/resources/i18n/messages.properties @@ -216,9 +216,12 @@ price.set.detail.duplicate.fixed=产品{0} 国家{1} 重量段{2} {3}(共{4} price.set.detail.duplicate.discount=产品{0}(共{1}条) price.set.detail.duplicate.hasZone=有分区({0}) price.set.detail.duplicate.noZone=无分区 -price.bill.billingFail.product=计费失败:未匹配产品 -price.bill.billingFail.country=计费失败:未匹配国家 -price.bill.billingFail.weight=计费失败:未匹配重量段 +price.bill.billingFail.product=计费失败:销售价未匹配产品 +price.bill.billingFail.country=计费失败:销售价未匹配国家 +price.bill.billingFail.weight=计费失败:销售价未匹配重量段 +price.bill.billingFail.catalogProduct=计费失败:产品价未匹配产品 +price.bill.billingFail.catalogCountry=计费失败:产品价未匹配国家 +price.bill.billingFail.catalogWeight=计费失败:产品价未匹配重量段 price.bill.export.filterRequired=请先设置列表查询条件后再导出 price.bill.export.taskNotExists=导出任务不存在或已过期 price.bill.export.tooMany=匹配订单超过上限 {0} 条,请缩小筛选范围 diff --git a/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java index fcde0ec2..96f43f56 100644 --- a/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java +++ b/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java @@ -1715,9 +1715,12 @@ public class ArBillServiceImpl implements IArBillService { } return switch (status) { case SUCCESS -> ""; - case PRODUCT -> "未匹配产品"; - case COUNTRY -> "未匹配国家"; - case WEIGHT -> "未匹配重量段"; + case PRODUCT -> "销售价未匹配产品"; + case COUNTRY -> "销售价未匹配国家"; + case WEIGHT -> "销售价未匹配重量段"; + case CATALOG_PRODUCT -> "产品价未匹配产品"; + case CATALOG_COUNTRY -> "产品价未匹配国家"; + case CATALOG_WEIGHT -> "产品价未匹配重量段"; case NO_CUSTOMER_PACKAGE -> "未绑定套餐"; case NO_ACTIVE_PACKAGE_VERSION -> "无生效套餐版本"; case ALREADY_IN_AR_BILL -> "已生成应收账单"; diff --git a/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java b/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java index e0ce1c8d..943c8c7e 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java @@ -122,7 +122,7 @@ public class PrcOrderBill extends BaseEntity private String creditArrearsStatus; /** NONE / REFUNDED */ private String refundStatus; - /** 计费失败状态:0成功/1未匹配产品/2未匹配国家/3未匹配重量段;软失败时金额为0且不落费用明细 */ + /** Billing fail: 0 ok; 1/2/3 sales miss; 23/24/25 catalog miss; soft-fail amount=0, no fee rows */ private Integer billingFailStatus; /** 失败原因 */ private String errorMessage; diff --git a/bms-back/bms-system/src/main/java/com/bms/price/domain/vo/TmsPriceQuoteResult.java b/bms-back/bms-system/src/main/java/com/bms/price/domain/vo/TmsPriceQuoteResult.java index dfae1566..d7c16610 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/domain/vo/TmsPriceQuoteResult.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/domain/vo/TmsPriceQuoteResult.java @@ -103,7 +103,7 @@ public class TmsPriceQuoteResult implements Serializable private String creditArrearsStatus; /** NONE / REFUNDED */ private String refundStatus; - /** 计费失败状态:0成功/1未匹配产品/2未匹配国家/3未匹配重量段(仅上游同步计费软失败) */ + /** Billing fail: 0 ok; 1/2/3 sales; 23/24/25 catalog (soft-fail on bill sync) */ private Integer billingFailStatus; private Integer pieces; private BigDecimal actualWeight; diff --git a/bms-back/bms-system/src/main/java/com/bms/price/enums/BillBillingFailStatus.java b/bms-back/bms-system/src/main/java/com/bms/price/enums/BillBillingFailStatus.java index 956ce584..b3194933 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/enums/BillBillingFailStatus.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/enums/BillBillingFailStatus.java @@ -1,10 +1,12 @@ package com.bms.price.enums; /** - * prc_order_bill.billing_fail_status 计费失败状态(数字)。 - * 0成功;1未匹配产品;2未匹配国家;3未匹配重量段。 - * 4 起与 prc_billing_task.fail_code 一一对应。 - * 仅 0/1/2/3 写入 prc_income_bill;仅 0 写入 prc_income_bill_fee。 + * prc_order_bill.billing_fail_status numeric codes. + * 0 success; + * 1/2/3 sales-price (package) miss: product / country / weight; + * 23/24/25 product-catalog price miss: product / country / weight; + * 4+ map to prc_billing_task.fail_code. + * Soft-fail income bill: 0/1/2/3/23/24/25; fee rows only for 0. */ public enum BillBillingFailStatus { @@ -30,7 +32,13 @@ public enum BillBillingFailStatus CUSTOMER_CODE_REQUIRED(19), CUSTOMER_DISABLED(20), FREIGHT_MISSING(21), - UNKNOWN(22); + UNKNOWN(22), + /** Product catalog (产品价) miss: no product rows. */ + CATALOG_PRODUCT(23), + /** Product catalog miss: product hit but country/zone miss. */ + CATALOG_COUNTRY(24), + /** Product catalog miss: product+country hit but weight band miss. */ + CATALOG_WEIGHT(25); private final int code; @@ -65,11 +73,13 @@ public enum BillBillingFailStatus return code != null && code.intValue() > SUCCESS.code; } - /** 0/1/2/3 才落 prc_income_bill。 */ + /** Soft-fail sales/catalog misses also persist prc_income_bill. */ public static boolean storesIncomeBill(Integer code) { int value = code == null ? SUCCESS.code : code.intValue(); - return value == SUCCESS.code || value == PRODUCT.code || value == COUNTRY.code || value == WEIGHT.code; + return value == SUCCESS.code + || value == PRODUCT.code || value == COUNTRY.code || value == WEIGHT.code + || value == CATALOG_PRODUCT.code || value == CATALOG_COUNTRY.code || value == CATALOG_WEIGHT.code; } /** 仅 0 落 prc_income_bill_fee。 */ @@ -110,6 +120,12 @@ public enum BillBillingFailStatus return BillTaskFailCode.COUNTRY_NOT_HIT.getCode(); case WEIGHT: return BillTaskFailCode.WEIGHT_NOT_HIT.getCode(); + case CATALOG_PRODUCT: + return BillTaskFailCode.CATALOG_PRODUCT_NOT_HIT.getCode(); + case CATALOG_COUNTRY: + return BillTaskFailCode.CATALOG_COUNTRY_NOT_HIT.getCode(); + case CATALOG_WEIGHT: + return BillTaskFailCode.CATALOG_WEIGHT_NOT_HIT.getCode(); case NO_CUSTOMER_PACKAGE: return BillTaskFailCode.NO_CUSTOMER_PACKAGE.getCode(); case NO_ACTIVE_PACKAGE_VERSION: diff --git a/bms-back/bms-system/src/main/java/com/bms/price/enums/BillTaskFailCode.java b/bms-back/bms-system/src/main/java/com/bms/price/enums/BillTaskFailCode.java index 4714f812..bd673244 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/enums/BillTaskFailCode.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/enums/BillTaskFailCode.java @@ -12,12 +12,18 @@ public enum BillTaskFailCode NO_ACTIVE_PACKAGE_VERSION("NO_ACTIVE_PACKAGE_VERSION"), ALREADY_IN_AR_BILL("ALREADY_IN_AR_BILL"), PRODUCT_ARCHIVE_MISSING("PRODUCT_ARCHIVE_MISSING"), - /** Soft-fail: product not in package (incl. after product_code_mapping). */ + /** Soft-fail: sales price (package) product miss. */ PRODUCT_NOT_HIT("PRODUCT_NOT_HIT"), - /** Soft-fail: product hit but country/zone miss. */ + /** Soft-fail: sales price country/zone miss. */ COUNTRY_NOT_HIT("COUNTRY_NOT_HIT"), - /** Soft-fail: product+country hit but weight band miss. */ + /** Soft-fail: sales price weight band miss. */ WEIGHT_NOT_HIT("WEIGHT_NOT_HIT"), + /** Soft-fail: product catalog (产品价) product miss. */ + CATALOG_PRODUCT_NOT_HIT("CATALOG_PRODUCT_NOT_HIT"), + /** Soft-fail: product catalog country/zone miss. */ + CATALOG_COUNTRY_NOT_HIT("CATALOG_COUNTRY_NOT_HIT"), + /** Soft-fail: product catalog weight band miss. */ + CATALOG_WEIGHT_NOT_HIT("CATALOG_WEIGHT_NOT_HIT"), PRICE_NOT_HIT("PRICE_NOT_HIT"), ZONE_PRICE_NOT_HIT("ZONE_PRICE_NOT_HIT"), POSTCODE_REQUIRED("POSTCODE_REQUIRED"), @@ -72,16 +78,29 @@ public enum BillTaskFailCode { return PRODUCT_ARCHIVE_MISSING.code; } - // Soft-fail messages from price.bill.billingFail.* (order matters: weight/country before generic) - if (containsAny(msg, "未匹配重量段", "WEIGHT_NOT_HIT", "billingFail.weight")) + // Soft-fail: product catalog before sales (more specific Chinese prefix) + if (containsAny(msg, "产品价未匹配重量段", "CATALOG_WEIGHT_NOT_HIT", "billingFail.catalogWeight")) + { + return CATALOG_WEIGHT_NOT_HIT.code; + } + if (containsAny(msg, "产品价未匹配国家", "CATALOG_COUNTRY_NOT_HIT", "billingFail.catalogCountry")) + { + return CATALOG_COUNTRY_NOT_HIT.code; + } + if (containsAny(msg, "产品价未匹配产品", "CATALOG_PRODUCT_NOT_HIT", "billingFail.catalogProduct")) + { + return CATALOG_PRODUCT_NOT_HIT.code; + } + // Soft-fail sales price (order matters: weight/country before generic product) + if (containsAny(msg, "销售价未匹配重量段", "未匹配重量段", "WEIGHT_NOT_HIT", "billingFail.weight")) { return WEIGHT_NOT_HIT.code; } - if (containsAny(msg, "未匹配国家", "COUNTRY_NOT_HIT", "billingFail.country")) + if (containsAny(msg, "销售价未匹配国家", "未匹配国家", "COUNTRY_NOT_HIT", "billingFail.country")) { return COUNTRY_NOT_HIT.code; } - if (containsAny(msg, "未匹配产品", "PRODUCT_NOT_HIT", "billingFail.product", "productNotInPackage")) + if (containsAny(msg, "销售价未匹配产品", "未匹配产品", "PRODUCT_NOT_HIT", "billingFail.product", "productNotInPackage")) { return PRODUCT_NOT_HIT.code; } diff --git a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java index b3fffa9c..c072dd62 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java @@ -420,8 +420,9 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService boolean productExcludedBySetProducts = false; boolean attemptedPriceMatch = false; boolean anyZoneRequired = false; - // Highest specificity among soft-failable misses: WEIGHT(3) > COUNTRY(2) > PRODUCT(1). - int missCode = 0; + // Sales miss: WEIGHT(3) > COUNTRY(2) > PRODUCT(1). Catalog miss: 25 > 24 > 23. + int salesMissCode = 0; + int catalogMissCode = 0; // Match version by exact bill datetime (effective_time / expire_time), not end-of-day. Date asOf = bizDate != null ? bizDate : new Date(); for (PrcCustomerPriceSet bind : binds) @@ -467,7 +468,7 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService if (anyProducts != null && !anyProducts.isEmpty()) { productExcludedBySetProducts = true; - missCode = Math.max(missCode, BillBillingFailStatus.PRODUCT.getCode()); + salesMissCode = Math.max(salesMissCode, BillBillingFailStatus.PRODUCT.getCode()); continue; } } @@ -497,23 +498,26 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService productCode, productName, cc, cn, zone.zoneCode, weight, bizDate); if (hit != null) { - // Billing requires product catalog price (产品价); package hit alone is not enough. - if (request instanceof TmsPriceBillRequest && !hasProductCatalogPrice(catalog)) - { - missCode = Math.max(missCode, - diagnoseCatalogMiss(productCode, cc, cn, zone.zoneCode, bizDate)); - continue; - } + // Temporarily skip product-catalog (产品价) soft-fail; sales package hit is enough. + // if (request instanceof TmsPriceBillRequest && !hasProductCatalogPrice(catalog)) + // { + // catalogMissCode = Math.max(catalogMissCode, + // diagnoseCatalogMiss(productCode, cc, cn, zone.zoneCode, bizDate)); + // continue; + // } stampRequestMeta(request, hit); return hit; } - missCode = Math.max(missCode, diagnoseFixedMiss(version.getPsvId(), productCode, cc, cn, zone.zoneCode)); + salesMissCode = Math.max(salesMissCode, + diagnoseFixedMiss(version.getPsvId(), productCode, cc, cn, zone.zoneCode)); } else if (TYPE_DISCOUNT.equals(setType)) { + // DISCOUNT still needs catalog as base rate; do not soft-fail as 产品价未匹配 for now. if (!hasProductCatalogPrice(catalog)) { - missCode = Math.max(missCode, diagnoseCatalogMiss(productCode, cc, cn, zone.zoneCode, bizDate)); + // catalogMissCode = Math.max(catalogMissCode, + // diagnoseCatalogMiss(productCode, cc, cn, zone.zoneCode, bizDate)); continue; } TmsPriceQuoteResult hit = tryDiscount(bind, set, version, catalog, productCode, productName, weight, bizDate); @@ -523,7 +527,7 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService return hit; } // Discount detail missing for product (or invalid discount) after catalog hit. - missCode = Math.max(missCode, BillBillingFailStatus.PRODUCT.getCode()); + salesMissCode = Math.max(salesMissCode, BillBillingFailStatus.PRODUCT.getCode()); } } @@ -536,8 +540,10 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService } if (!attemptedPriceMatch && productExcludedBySetProducts) { - missCode = Math.max(missCode, BillBillingFailStatus.PRODUCT.getCode()); + salesMissCode = Math.max(salesMissCode, BillBillingFailStatus.PRODUCT.getCode()); } + // Prefer product-catalog miss when present (sales may already have hit). + int missCode = catalogMissCode > 0 ? catalogMissCode : salesMissCode; if (request instanceof TmsPriceBillRequest && BillBillingFailStatus.isFail(Integer.valueOf(missCode))) { return buildBillingMissResult(request, productCode, productName, countryCode, countryName, @@ -591,27 +597,27 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService } /** - * Diagnose catalog miss for DISCOUNT base price. + * Diagnose product-catalog (产品价) miss: product absent -> 23; country/zone -> 24; else weight -> 25. */ private int diagnoseCatalogMiss(String productCode, String countryCode, String countryName, String zoneCode, Date bizDate) { if (StringUtils.isEmpty(productCode)) { - return BillBillingFailStatus.PRODUCT.getCode(); + return BillBillingFailStatus.CATALOG_PRODUCT.getCode(); } int byProduct = productCountryMapper.countByProduct(productCode, bizDate); if (byProduct <= 0) { - return BillBillingFailStatus.PRODUCT.getCode(); + return BillBillingFailStatus.CATALOG_PRODUCT.getCode(); } int byCountry = productCountryMapper.countByProductCountryZone( productCode, countryCode, countryName, zoneCode, bizDate); if (byCountry <= 0) { - return BillBillingFailStatus.COUNTRY.getCode(); + return BillBillingFailStatus.CATALOG_COUNTRY.getCode(); } - return BillBillingFailStatus.WEIGHT.getCode(); + return BillBillingFailStatus.CATALOG_WEIGHT.getCode(); } /** @@ -675,6 +681,18 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService { return MessageUtils.message("price.bill.billingFail.weight"); } + if (missCode == BillBillingFailStatus.CATALOG_PRODUCT.getCode()) + { + return MessageUtils.message("price.bill.billingFail.catalogProduct"); + } + if (missCode == BillBillingFailStatus.CATALOG_COUNTRY.getCode()) + { + return MessageUtils.message("price.bill.billingFail.catalogCountry"); + } + if (missCode == BillBillingFailStatus.CATALOG_WEIGHT.getCode()) + { + return MessageUtils.message("price.bill.billingFail.catalogWeight"); + } return MessageUtils.message("price.bill.packagePriceNotHit"); } diff --git a/bms-back/bms-system/src/main/java/com/bms/price/service/support/OrderBillExportSupport.java b/bms-back/bms-system/src/main/java/com/bms/price/service/support/OrderBillExportSupport.java index 478a7773..74e39ca9 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/service/support/OrderBillExportSupport.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/service/support/OrderBillExportSupport.java @@ -239,9 +239,12 @@ public final class OrderBillExportSupport switch (status.intValue()) { case 0: return "计费成功"; - case 1: return "未匹配产品"; - case 2: return "未匹配国家"; - case 3: return "未匹配重量段"; + case 1: return "销售价未匹配产品"; + case 2: return "销售价未匹配国家"; + case 3: return "销售价未匹配重量段"; + case 23: return "产品价未匹配产品"; + case 24: return "产品价未匹配国家"; + case 25: return "产品价未匹配重量段"; case 4: return "未绑定套餐"; case 5: return "无生效套餐版本"; case 6: return "已生成应收账单"; diff --git a/bms-front/src/components/BasicTable/index.vue b/bms-front/src/components/BasicTable/index.vue index 270ff9cf..107d10cc 100644 --- a/bms-front/src/components/BasicTable/index.vue +++ b/bms-front/src/components/BasicTable/index.vue @@ -588,6 +588,55 @@ function renderVirtualText(col, row, rowIndex) { return String(text) } +/** Flatten slot VNode text for virtual-table overflow tooltip. */ +function extractSlotText(nodes) { + if (nodes == null || nodes === false) return '' + if (typeof nodes === 'string' || typeof nodes === 'number') return String(nodes) + if (Array.isArray(nodes)) return nodes.map(extractSlotText).join('') + if (typeof nodes === 'object') { + if (typeof nodes.children === 'string' || typeof nodes.children === 'number') { + return String(nodes.children) + } + if (Array.isArray(nodes.children)) return extractSlotText(nodes.children) + } + return '' +} + +/** True when slot tree contains a component (button/tag/...), skip auto tooltip. */ +function slotHasComponent(nodes) { + if (nodes == null || nodes === false) return false + if (Array.isArray(nodes)) return nodes.some(slotHasComponent) + if (typeof nodes !== 'object') return false + if (typeof nodes.type === 'object' || typeof nodes.type === 'function') return true + if (Array.isArray(nodes.children)) return slotHasComponent(nodes.children) + return false +} + +function resolveVirtualTooltip(col, rowData, rowIndex, slotNodes) { + if (col.showOverflowTooltip === false) return '' + if (typeof col.tooltipFormatter === 'function') { + const tip = col.tooltipFormatter(rowData, col, rowData ? rowData[col.prop] : undefined, rowIndex) + return tip == null || tip === '' ? '' : String(tip) + } + if (slotNodes != null) { + if (slotHasComponent(slotNodes)) return '' + return extractSlotText(slotNodes).trim() + } + return renderVirtualText(col, rowData, rowIndex) +} + +function wrapVirtualTooltip(tip, cell) { + if (!tip) return cell + return h(ElTooltip, { + content: tip, + placement: 'top', + showAfter: 300, + enterable: false + }, { + default: () => cell + }) +} + const virtualColumns = computed(() => { const cols = [] if (props.selection) { @@ -629,18 +678,13 @@ const virtualColumns = computed(() => { }) } if (slotFn) { - return h('div', { class: 'basic-table-vcell' }, slotFn({ row: rowData, $index: rowIndex })) + const nodes = slotFn({ row: rowData, $index: rowIndex }) + const cell = h('div', { class: 'basic-table-vcell' }, nodes) + return wrapVirtualTooltip(resolveVirtualTooltip(col, rowData, rowIndex, nodes), cell) } const text = renderVirtualText(col, rowData, rowIndex) - if (!text) return h('div', { class: 'basic-table-vcell' }, '') - return h(ElTooltip, { - content: text, - placement: 'top', - showAfter: 300, - enterable: false - }, { - default: () => h('div', { class: 'basic-table-vcell' }, text) - }) + const cell = h('div', { class: 'basic-table-vcell' }, text || '') + return wrapVirtualTooltip(resolveVirtualTooltip(col, rowData, rowIndex), cell) } } if (headerSlot) column.headerCellRenderer = () => headerSlot({ column: col }) diff --git a/bms-front/src/views/price/billing/bill.vue b/bms-front/src/views/price/billing/bill.vue index 89daf5e2..952f7c33 100644 --- a/bms-front/src/views/price/billing/bill.vue +++ b/bms-front/src/views/price/billing/bill.vue @@ -449,7 +449,7 @@ const columns = [ { label: '销售员', prop: 'belongSaler', minWidth: 100, showOverflowTooltip: true }, { label: '结算员', prop: 'settlementMan', minWidth: 100, showOverflowTooltip: true }, { label: '客服员', prop: 'serviceMan', minWidth: 100, showOverflowTooltip: true }, - { label: '操作', prop: 'action', align: 'center', width: 240, fixed: 'right', slot: 'action', showInToolbar: false } + { label: '操作', prop: 'action', align: 'center', width: 240, fixed: 'right', slot: 'action', showInToolbar: false, showOverflowTooltip: false } ] const arrearsStatusOptions = [ @@ -462,9 +462,12 @@ const refundStatusOptions = [ ] const billingFailStatusOptions = [ { label: '计费成功', value: 0 }, - { label: '未匹配产品', value: 1 }, - { label: '未匹配国家', value: 2 }, - { label: '未匹配重量段', value: 3 }, + { label: '销售价未匹配产品', value: 1 }, + { label: '销售价未匹配国家', value: 2 }, + { label: '销售价未匹配重量段', value: 3 }, + { label: '产品价未匹配产品', value: 23 }, + { label: '产品价未匹配国家', value: 24 }, + { label: '产品价未匹配重量段', value: 25 }, ] const searchColumns = [ diff --git a/bms-front/src/views/price/billing/components/BatchAddIncomeFeeDialog.vue b/bms-front/src/views/price/billing/components/BatchAddIncomeFeeDialog.vue index c92e4613..4ada0adf 100644 --- a/bms-front/src/views/price/billing/components/BatchAddIncomeFeeDialog.vue +++ b/bms-front/src/views/price/billing/components/BatchAddIncomeFeeDialog.vue @@ -249,9 +249,12 @@ function orderStatusLabel(code) { function billingFailStatusLabel(code) { const map = { 0: '计费成功', - 1: '未匹配产品', - 2: '未匹配国家', - 3: '未匹配重量段' + 1: '销售价未匹配产品', + 2: '销售价未匹配国家', + 3: '销售价未匹配重量段', + 23: '产品价未匹配产品', + 24: '产品价未匹配国家', + 25: '产品价未匹配重量段' } const key = Number(code) return map[key] != null ? map[key] : String(code) diff --git a/bms-front/src/views/price/billing/components/BillDetail.vue b/bms-front/src/views/price/billing/components/BillDetail.vue index 71fb0042..45fd24d0 100644 --- a/bms-front/src/views/price/billing/components/BillDetail.vue +++ b/bms-front/src/views/price/billing/components/BillDetail.vue @@ -338,9 +338,12 @@ function formatDateTime(val) { const billingFailStatusOptions = [ { label: '计费成功', value: 0 }, - { label: '未匹配产品', value: 1 }, - { label: '未匹配国家', value: 2 }, - { label: '未匹配重量段', value: 3 }, + { label: '销售价未匹配产品', value: 1 }, + { label: '销售价未匹配国家', value: 2 }, + { label: '销售价未匹配重量段', value: 3 }, + { label: '产品价未匹配产品', value: 23 }, + { label: '产品价未匹配国家', value: 24 }, + { label: '产品价未匹配重量段', value: 25 }, { label: '未绑定套餐', value: 4 }, { label: '无生效套餐版本', value: 5 }, { label: '已生成应收账单', value: 6 }, diff --git a/bms-front/src/views/price/orderBill/index.vue b/bms-front/src/views/price/orderBill/index.vue index 11b58b3d..18d0a9c6 100644 --- a/bms-front/src/views/price/orderBill/index.vue +++ b/bms-front/src/views/price/orderBill/index.vue @@ -270,9 +270,12 @@ const orderStatusOptions = Object.keys(orderStatusMap).map(k => ({ label: orderS const billingFailStatusOptions = [ { label: '计费成功', value: 0 }, - { label: '未匹配产品', value: 1 }, - { label: '未匹配国家', value: 2 }, - { label: '未匹配重量段', value: 3 }, + { label: '销售价未匹配产品', value: 1 }, + { label: '销售价未匹配国家', value: 2 }, + { label: '销售价未匹配重量段', value: 3 }, + { label: '产品价未匹配产品', value: 23 }, + { label: '产品价未匹配国家', value: 24 }, + { label: '产品价未匹配重量段', value: 25 }, { label: '未绑定套餐', value: 4 }, { label: '无生效套餐版本', value: 5 }, { label: '已生成应收账单', value: 6 },