From 4935fbf41a4cbe9bfbaab0f2ef9d388af98a7ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=95?= Date: Fri, 29 May 2026 16:32:14 +0800 Subject: [PATCH] =?UTF-8?q?update(web):=20=E8=BD=A6=E8=BE=86=E6=B0=A2?= =?UTF-8?q?=E8=B4=B9=E6=98=8E=E7=BB=86=E5=8F=B0=E8=B4=A6=E5=88=97=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E3=80=81=E9=A1=B6=E9=83=A8=E5=90=88=E8=AE=A1=E4=B8=8E?= =?UTF-8?q?=E6=89=BF=E6=8B=85=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同步承担方式/系统带出字段、顶部合计条及列表列顺序等业务调整。 Co-authored-by: Cursor --- web端/台账数据/车辆氢费明细.jsx | 916 +++++++++++++++++--------------- 1 file changed, 497 insertions(+), 419 deletions(-) diff --git a/web端/台账数据/车辆氢费明细.jsx b/web端/台账数据/车辆氢费明细.jsx index 2416a6b..cec7c31 100644 --- a/web端/台账数据/车辆氢费明细.jsx +++ b/web端/台账数据/车辆氢费明细.jsx @@ -7,11 +7,11 @@ var H2_LEDGER_REQUIREMENT_DOC = `# 车辆氢费明细 — 产品需求说明(P | 项目 | 内容 | |------|------| -| 文档版本 | v2.0(业务版) | +| 文档版本 | v2.1(业务版) | | 产品模块 | 台账数据 → 车辆氢费明细 | | 文档类型 | 产品需求说明 | | 适用读者 | 产品、业务、运营、测试、项目 | -| 修订说明 | 从业务与使用场景出发描述需求,不展开技术实现细节 | +| 修订说明 | 同步列表字段顺序、顶部合计条、承担方式、系统带出字段等现行页面行为 | --- @@ -134,9 +134,9 @@ flowchart LR | 客户名称 | 从客户库选择 | | 加氢站名称 | 从加氢站库选择 | | 业务员 | 按客户归属业务员筛选 | -| 结算状态 | 客户承担 / 我司承担 | -| 付款状态 | 未付款 / 已付款 / 部分付款 | -| 开票公司 | 从开票主体选择 | +| 承担方式 | 客户承担 / 我司承担 / 客户自行结算 / 其他结算 | +| 客户收款状态 | 已付款 / 未付款(系统带出,用于筛选) | +| 开票公司 | 从开票主体选择(系统带出字段对应公司) | 查询成功给予简短成功提示。 @@ -158,7 +158,17 @@ flowchart LR 不同区域之间有明显分隔,已对账区背景略灰、待保存区背景略黄,降低误操作概率。 -**底部合计:** 对当前列表可见记录,合计 **加氢量、成本总价、加氢总价**(随筛选与「仅看异常」变化)。 +**顶部合计条:** 表格上方独立展示 **加氢量(kg)、成本总价(元)、加氢总价(元)** 三项合计。 + +- **统计范围:** 与当前列表可见行一致。 +- **随查询重算:** 点击「查询」应用筛选条件后,合计立即按新结果重新汇总。 +- **随「仅显示异常数据」变化:** 开关开启时,仅对当前可见的异常记录(及本人待保存行)合计。 +- **说明:** 合计条含「待保存 / 未对账 / 已对账」等当前列表中的全部可见记录,与导出范围(仅未对账+已对账)不同。 + +**列表列顺序(左→右,业务视角):** +序号 → 加氢日期 → 加氢时间 → 加氢站名称 → 客户名称 → 车牌号 → 加氢量 → 成本单价 → 成本总价 → 加氢单价 → 加氢总价 → 行驶里程 → 备注 → 业务员 → 承担方式 → 对账日期 → **收票日期** → **加氢站付款状态** → **开票日期** → **客户收款状态** → **开票公司** → 状态 → 订单编号 → 操作(操作列固定右侧)。 + +**系统带出字段(不可手工维护):** 收票日期、加氢站付款状态、开票日期、客户收款状态、开票公司;选择/变更客户等信息后由系统自动刷新,单元格为浅灰底只读样式。 **列表勾选:** 仅 **未对账** 记录可勾选,用于批量「完成对账」。 @@ -182,26 +192,28 @@ flowchart LR | 信息项 | 用户是否填写 | 业务说明 | |--------|--------------|----------| -| 状态 | 否 | 展示「未对账」「已对账」;待保存不显示标签 | -| 订单编号 | 否 | 系统按规则自动生成,不可改 | | 加氢时间 | 是* | 精确到秒,必填 | -| 加氢日期 | 否 | 由加氢时间自动得出 | +| 加氢日期 | 否 | 由加氢时间自动得出,只读 | | 加氢站名称 | 是* | 必选 | +| 客户名称 | 是* | 必选,位于加氢站右侧;决定业务员与系统带出信息 | | 车牌号 | 是* | 必选,须为公司登记车辆 | -| 行驶里程 | 否 | 选填,用于业务留痕 | | 加氢量(kg) | 是* | 必填,用于算总价 | | 成本单价 | 是* | 必填,向站点的采购成本价 | | 成本总价 | 否 | 加氢量 × 成本单价,自动计算 | -| 客户名称 | 是* | 必选,决定业务员与财务带出信息 | | 加氢单价 | 是* | 必填,对客户的销售单价 | | 加氢总价 | 否 | 加氢量 × 加氢单价,自动计算 | -| 业务员 | 否 | 选客户后自动带出 | -| 结算状态 | 是* | 客户承担 / 我司承担 | -| 开票日期 | 否 | 系统按客户等业务规则带出 | -| 对账日期 | 否 | 系统带出 | -| 付款状态 | 否 | 系统带出 | -| 开票公司 | 否 | 系统带出 | +| 行驶里程 | 否 | 选填,位于加氢总价之后 | | 备注 | 否 | 自由文本 | +| 业务员 | 否 | 选客户后自动带出 | +| 承担方式 | 是* | 客户承担 / 我司承担 / 客户自行结算 / 其他结算 | +| 对账日期 | 否 | 完成对账等流程带出,只读 | +| 收票日期 | 否 | 由财务/收票模块自动带出,不可编辑 | +| 加氢站付款状态 | 否 | 已付款 / 未付款,由加氢站打款管理带出 | +| 开票日期 | 否 | 由开票模块自动带出 | +| 客户收款状态 | 否 | 已付款 / 未付款,由客户收款模块带出 | +| 开票公司 | 否 | 显示开票公司名称,系统自动带出 | +| 状态 | 否 | 展示「未对账」「已对账」;待保存不显示标签;列在列表末尾 | +| 订单编号 | 否 | 系统按规则自动生成,不可改;列在列表末尾 | \\* 保存时校验,缺失则标红提示。 @@ -271,7 +283,7 @@ flowchart LR ### 8.1 表头批量改价 / 改结算 - 在 **成本单价**、**加氢单价** 列表头可批量填入统一单价,作用于当前可编辑的所有记录(待保存 + 未对账)。 -- 在 **结算状态** 列表头可批量改为「客户承担」或「我司承担」。 +- 在 **承担方式** 列表头可批量改为四种承担方式之一。 - **已对账** 记录不参与批量修改。 ### 8.2 批量导入 @@ -281,11 +293,11 @@ flowchart LR **流程:** 1. 点击「批量导入」→ 下载标准模板 -2. 按模板填写(无需填开票日期、对账日期、付款状态、开票公司) +2. 按模板填写(无需填对账日期及收票/开票/付款等系统带出字段) 3. 上传文件 → 系统生成多条 **待保存** 记录 4. 业务核对列表 → 点击 **保存** 进入未对账 -**模板包含列:** 加氢时间、加氢站名称、车牌号、行驶里程、加氢量、成本单价、客户名称、加氢单价、结算状态、备注。 +**模板包含列:** 加氢时间、加氢站名称、车牌号、加氢量、成本单价、客户名称、加氢单价、承担方式、备注(行驶里程可在备注前按业务需要填写,导入模板列顺序以页面下载为准)。 **导入后状态:** 均为待保存,与手工新增一致,须保存后才参与对账与导出。 @@ -301,7 +313,7 @@ flowchart LR - 弹窗文案:「请选择导出的列」;支持全选/取消全选;默认勾选全部可导出列。 - 无符合条件数据时提示:暂无未对账或已对账数据可导出。 -**可导出列(业务名称):** 序号、状态、订单编号、加氢时间、加氢日期、加氢站名称、车牌号、行驶里程、加氢量、成本单价、成本总价、客户名称、加氢单价、加氢总价、业务员、结算状态、开票日期、对账日期、付款状态、开票公司、备注。 +**可导出列(业务名称):** 序号、状态、订单编号、加氢时间、加氢日期、加氢站名称、车牌号、加氢量、成本单价、成本总价、客户名称、加氢单价、加氢总价、行驶里程、业务员、承担方式、对账日期、备注、收票日期、加氢站付款状态、开票日期、客户收款状态、开票公司。 --- @@ -330,7 +342,7 @@ flowchart LR ### 10.1 保存 - 一次保存处理页面上**全部**待保存记录。 -- 必填:加氢时间、加氢站、车牌(须为登记车辆)、客户、加氢量、成本单价、加氢单价、结算状态。 +- 必填:加氢时间、加氢站、车牌(须为登记车辆)、客户、加氢量、成本单价、加氢单价、承担方式。 - 校验失败:仅格子标红,无「保存成功」类提示。 ### 10.2 完成对账 @@ -342,8 +354,8 @@ flowchart LR ### 10.3 筛选与列表 - 查询点击后生效;重置恢复。 -- 筛选后合计与所见列表一致。 -- 本人待保存新增行在筛选后仍可见。 +- **顶部合计条** 对当前列表可见行实时汇总;修改筛选并点击「查询」后重新计算;「仅显示异常数据」开启时仅统计可见行。 +- 本人待保存新增行在筛选后仍可见(合计亦包含这些行,若其在列表中展示)。 ### 10.4 导出 @@ -379,9 +391,13 @@ flowchart LR | 待保存 | 草稿,未进入对账流程 | | 未对账 | 已保存,等待业务确认并完成对账 | | 已对账 | 对账完成,业务员不可随意改动 | -| 客户承担 | 氢费由客户结算 | -| 我司承担 | 氢费由公司承担 | -| 未付款 / 已付款 / 部分付款 | 系统带出的付款进度,业务只读 | +| 客户承担 | 氢费由客户承担 | +| 我司承担 | 氢费由我司承担 | +| 客户自行结算 | 由客户自行与加氢站等方结算 | +| 其他结算 | 其他结算方式 | +| 加氢站付款状态 | 加氢站侧是否已付款,已付款 / 未付款 | +| 客户收款状态 | 客户侧是否已收款,已付款 / 未付款 | +| 收票日期 | 财务收票日期,系统带出 | | 标准价 | 公司维护的、按加氢站与生效时段确定的参考单价 | --- @@ -1327,6 +1343,35 @@ const Component = function () { { value: '00328', label: '北京中谊快运有限公司', salesperson: '金可鹏' }, ]; + /** 客户名称下拉:除客户库外的固定选项 */ + var CUSTOMER_ID_VEHICLE_MOVE = '__h2_customer_vehicle_move__'; + var CUSTOMER_ID_PENDING_CONFIRM = '__h2_customer_pending_confirm__'; + var CUSTOMER_EXTRA_OPTIONS = [ + { value: CUSTOMER_ID_VEHICLE_MOVE, label: '车辆异动', salesperson: '' }, + { value: CUSTOMER_ID_PENDING_CONFIRM, label: '特殊待确认客户', salesperson: '' } + ]; + + function isSpecialCustomerId(customerId) { + return ( + customerId === CUSTOMER_ID_VEHICLE_MOVE || + customerId === CUSTOMER_ID_PENDING_CONFIRM + ); + } + + function isRegularCustomerId(customerId) { + return !!customerId && !isSpecialCustomerId(customerId); + } + + function buildCustomerSelectOptions() { + return CUSTOMER_EXTRA_OPTIONS.map(function (c) { + return { value: c.value, label: c.label }; + }).concat( + CUSTOMER_LIST.map(function (c) { + return { value: c.value, label: c.label }; + }) + ); + } + var SALESPERSON_FILTER_OPTIONS = (function () { var seen = {}; var list = []; @@ -1351,7 +1396,9 @@ const Component = function () { var SETTLEMENT_STATUS_OPTIONS = [ { value: 'customer', label: '客户承担' }, - { value: 'internal', label: '我司承担' } + { value: 'internal', label: '我司承担' }, + { value: 'customer_self', label: '客户自行结算' }, + { value: 'other', label: '其他结算' } ]; var PAYMENT_STATUS_OPTIONS = [ @@ -1360,6 +1407,12 @@ const Component = function () { { value: 'partial', label: '部分付款' } ]; + /** 加氢站付款 / 客户收款(系统带出,仅已付款、未付款) */ + var BINARY_PAID_STATUS_OPTIONS = [ + { value: 'paid', label: '已付款' }, + { value: 'unpaid', label: '未付款' } + ]; + var CHANGE_LOG_FIELD_LABELS = { reconcileStatus: '状态', hydrogenTime: '加氢时间', @@ -1372,7 +1425,7 @@ const Component = function () { customerId: '客户名称', customerUnitPrice: '加氢单价(元/kg)', customerAmount: '加氢总价(元)', - settlementStatus: '结算状态', + settlementStatus: '承担方式', remark: '备注', orderNo: '订单编号', _copy: '复制新增', @@ -1394,13 +1447,15 @@ const Component = function () { '成本单价(元/kg)', '客户名称', '加氢单价(元/kg)', - '结算状态', + '承担方式', '备注' ]; var SETTLEMENT_LABEL_TO_VALUE = { 客户承担: 'customer', 我司承担: 'internal', + 客户自行结算: 'customer_self', + 其他结算: 'other', 客户结算: 'customer', 公司内部: 'internal' }; @@ -1436,6 +1491,9 @@ const Component = function () { var i; var text = String(label || '').trim(); if (!text) return null; + for (i = 0; i < CUSTOMER_EXTRA_OPTIONS.length; i++) { + if (CUSTOMER_EXTRA_OPTIONS[i].label === text) return CUSTOMER_EXTRA_OPTIONS[i]; + } for (i = 0; i < CUSTOMER_LIST.length; i++) { if (CUSTOMER_LIST[i].label === text) return CUSTOMER_LIST[i]; } @@ -1525,8 +1583,9 @@ const Component = function () { return i == null || i < 0 ? '' : String(cells[i] == null ? '' : cells[i]).trim(); }; var station = findStationByLabel(get('加氢站名称')); - var customer = findCustomerByLabel(get('客户名称')); - var settlementLabel = get('结算状态'); + var customerLabel = get('客户名称'); + var customer = customerLabel ? findCustomerByLabel(customerLabel) : null; + var settlementLabel = get('承担方式') || get('结算状态'); var now = nowDayjs(); var draft = { key: nextRowKey(), @@ -1542,10 +1601,10 @@ const Component = function () { costUnitPrice: normalizeBatchUnitPrice(get('成本单价(元/kg)')), costTotal: null, customerId: customer ? customer.value : undefined, - customerName: customer ? customer.label : get('客户名称'), + customerName: customer ? customer.label : '', customerUnitPrice: normalizeBatchUnitPrice(get('加氢单价(元/kg)') || get('对客单价(元/kg)')), customerAmount: null, - salesperson: customer ? customer.salesperson : '', + salesperson: customer ? customer.salesperson || '' : '', settlementStatus: SETTLEMENT_LABEL_TO_VALUE[settlementLabel] || 'customer', remark: get('备注'), createdAt: now, @@ -1606,6 +1665,10 @@ const Component = function () { function findCustomer(val) { var i; + if (!val) return null; + for (i = 0; i < CUSTOMER_EXTRA_OPTIONS.length; i++) { + if (CUSTOMER_EXTRA_OPTIONS[i].value === val) return CUSTOMER_EXTRA_OPTIONS[i]; + } for (i = 0; i < CUSTOMER_LIST.length; i++) { if (CUSTOMER_LIST[i].value === val) return CUSTOMER_LIST[i]; } @@ -1614,11 +1677,14 @@ const Component = function () { /** 原型:联调后从客户/合同/财务模块自动拉取,不可手工录入 */ function resolveLinkedModuleFields(row) { - if (!row || !row.customerId) { + if (!row || !isRegularCustomerId(row.customerId)) { return { + receiptDate: null, + stationPaymentStatus: null, invoiceDate: null, reconcileDate: null, paymentStatus: null, + customerReceiptStatus: null, companyId: undefined, companyName: '' }; @@ -1642,10 +1708,21 @@ const Component = function () { } catch (eLink) {} } var paymentStatus = idx % 3 === 0 ? 'paid' : idx % 3 === 1 ? 'partial' : 'unpaid'; + var receiptDate = base; + if (window.dayjs && base) { + try { + receiptDate = window.dayjs(base).subtract((idx % 5) + 2, 'day'); + } catch (eReceipt) {} + } + var stationPaymentStatus = idx % 2 === 0 ? 'paid' : 'unpaid'; + var customerReceiptStatus = paymentStatus === 'paid' ? 'paid' : 'unpaid'; return { + receiptDate: receiptDate, + stationPaymentStatus: stationPaymentStatus, invoiceDate: invoiceDate, reconcileDate: reconcileDate, paymentStatus: paymentStatus, + customerReceiptStatus: customerReceiptStatus, companyId: company.value, companyName: company.label }; @@ -1665,7 +1742,6 @@ const Component = function () { if (!row.stationId) inv.stationId = true; if (!row.plateNo) inv.plateNo = 'empty'; else if (!isPlateInVehicleTable(row.plateNo)) inv.plateNo = 'not_exist'; - if (!row.customerId) inv.customerId = true; if (isEmptyNum(row.hydrogenKg) || numOrZero(row.hydrogenKg) <= 0) inv.hydrogenKg = true; if (isEmptyNum(row.costUnitPrice) || numOrZero(row.costUnitPrice) <= 0) inv.costUnitPrice = true; if (isEmptyNum(row.customerUnitPrice) || numOrZero(row.customerUnitPrice) <= 0) inv.customerUnitPrice = true; @@ -1968,32 +2044,38 @@ const Component = function () { { key: 'hydrogenDate', label: '加氢日期', getValue: function (r) { return formatDate(r.hydrogenTime) || ''; } }, { key: 'stationName', label: '加氢站名称', getValue: function (r) { return r.stationName || ''; } }, { key: 'plateNo', label: '车牌号', getValue: function (r) { return r.plateNo || ''; } }, - { key: 'mileageKm', label: '行驶里程(km)', getValue: function (r) { return exportPlainNum(r.mileageKm); } }, { key: 'hydrogenKg', label: '加氢量(kg)', getValue: function (r) { return exportPlainNum(r.hydrogenKg); } }, { key: 'costUnitPrice', label: '成本单价(元/kg)', getValue: function (r) { return exportPlainNum(r.costUnitPrice); } }, { key: 'costTotal', label: '成本总价(元)', getValue: function (r) { return exportPlainNum(r.costTotal); } }, { key: 'customerName', label: '客户名称', getValue: function (r) { return r.customerName || ''; } }, { key: 'customerUnitPrice', label: '加氢单价(元/kg)', getValue: function (r) { return exportPlainNum(r.customerUnitPrice); } }, { key: 'customerAmount', label: '加氢总价(元)', getValue: function (r) { return exportPlainNum(r.customerAmount); } }, + { key: 'mileageKm', label: '行驶里程(km)', getValue: function (r) { return exportPlainNum(r.mileageKm); } }, { key: 'salesperson', label: '业务员', getValue: function (r) { return r.salesperson || ''; } }, { key: 'settlementStatus', - label: '结算状态', + label: '承担方式', getValue: function (r) { return exportLabelOf(SETTLEMENT_STATUS_OPTIONS, r.settlementStatus); } }, - { key: 'invoiceDate', label: '开票日期', getValue: function (r) { return formatDate(r.invoiceDate) || ''; } }, { key: 'reconcileDate', label: '对账日期', getValue: function (r) { return formatDate(r.reconcileDate) || ''; } }, + { key: 'remark', label: '备注', getValue: function (r) { return r.remark || ''; } }, + { key: 'receiptDate', label: '收票日期', getValue: function (r) { return formatDate(r.receiptDate) || ''; } }, { - key: 'paymentStatus', - label: '付款状态', - getValue: function (r) { return exportLabelOf(PAYMENT_STATUS_OPTIONS, r.paymentStatus); } + key: 'stationPaymentStatus', + label: '加氢站付款状态', + getValue: function (r) { return exportLabelOf(BINARY_PAID_STATUS_OPTIONS, r.stationPaymentStatus); } + }, + { key: 'invoiceDate', label: '开票日期', getValue: function (r) { return formatDate(r.invoiceDate) || ''; } }, + { + key: 'customerReceiptStatus', + label: '客户收款状态', + getValue: function (r) { return exportLabelOf(BINARY_PAID_STATUS_OPTIONS, r.customerReceiptStatus); } }, { key: 'companyName', label: '开票公司', getValue: function (r) { return r.companyName || exportLabelOf(COMPANY_LIST, r.companyId); } - }, - { key: 'remark', label: '备注', getValue: function (r) { return r.remark || ''; } } + } ]; } @@ -2067,11 +2149,14 @@ const Component = function () { costTotal: costTotal, customerAmount: customerAmount, stationName: station ? station.label : row.stationName, - customerName: customer ? customer.label : row.customerName, - salesperson: customer ? customer.salesperson : row.salesperson, + customerName: customer ? customer.label : '', + salesperson: customer ? customer.salesperson || '' : '', + receiptDate: linked.receiptDate, + stationPaymentStatus: linked.stationPaymentStatus, invoiceDate: linked.invoiceDate, reconcileDate: linked.reconcileDate, paymentStatus: linked.paymentStatus, + customerReceiptStatus: linked.customerReceiptStatus, companyId: linked.companyId, companyName: linked.companyName }); @@ -2153,7 +2238,7 @@ const Component = function () { customerName: customer.label, customerUnitPrice: custUnit, salesperson: customer.salesperson, - settlementStatus: i % 2 === 0 ? 'customer' : 'internal', + settlementStatus: ['customer', 'internal', 'customer_self', 'other'][i % 4], invoiceDate: day, reconcileDate: day, paymentStatus: i % 3 === 0 ? 'paid' : i % 3 === 1 ? 'partial' : 'unpaid', @@ -2200,8 +2285,15 @@ const Component = function () { 'background:#e8f4fc!important;border-bottom:1px solid #bae6fd!important;border-inline-end:1px solid #dbeafe!important;padding:0 6px!important;height:36px!important;text-align:center!important}' + '.h2-ledger-table .ant-table-tbody>tr:not(.ant-table-measure-row)>td{padding:4px 6px!important;vertical-align:middle!important;font-size:12px}' + '.h2-ledger-table .ant-table-tbody>tr.h2-row-data:hover>td{background:#f0f9ff!important}' + - '.h2-ledger-table .ant-table-summary>tr>td{font-weight:700;background:#f8fafc!important;border-top:2px solid #cbd5e1!important;padding:0 8px!important;height:38px!important}' + + '.h2-ledger-totals-bar{display:flex;align-items:stretch;gap:0;margin-bottom:10px;border:1px solid #bae6fd;border-radius:10px;overflow:hidden;background:#f8fafc;box-shadow:0 1px 0 rgba(15,23,42,0.04)}' + + '.h2-ledger-totals-bar__title{display:flex;align-items:center;justify-content:center;min-width:72px;padding:10px 14px;font-size:14px;font-weight:700;color:#0f172a;background:#e8f4fc;border-right:1px solid #bae6fd}' + + '.h2-ledger-totals-bar__items{display:flex;flex:1;flex-wrap:wrap}' + + '.h2-ledger-totals-bar__item{flex:1;min-width:160px;padding:8px 20px;border-right:1px solid #e2e8f0;display:flex;flex-direction:column;justify-content:center;gap:4px}' + + '.h2-ledger-totals-bar__item:last-child{border-right:none}' + + '.h2-ledger-totals-bar__label{font-size:12px;color:rgba(15,23,42,0.55);font-weight:500;line-height:1.2}' + + '.h2-ledger-totals-bar__value{font-size:16px;font-weight:700;color:#0f172a;font-variant-numeric:tabular-nums;line-height:1.3}' + '.h2-cell-readonly{color:#64748b;background:#f8fafc;padding:4px 6px}' + + '.h2-cell-auto{color:#475569;background:#f1f5f9;padding:4px 6px}' + '.h2-cell-warn{color:#874d00;background:#fffbe6!important;border:1px solid #ffe58f}' + '.h2-warn-input-wrap .ant-input-number,.h2-warn-input-wrap .ant-input-number-input{background:#fffbe6!important}' + '.h2-ledger-table .ant-picker.h2-datetime-picker{min-width:178px}' + @@ -2440,7 +2532,7 @@ const Component = function () { } if (paymentApplied) { list = list.filter(function (r) { - return r.paymentStatus === paymentApplied; + return r.customerReceiptStatus === paymentApplied; }); } if (companyApplied) { @@ -2897,7 +2989,7 @@ const Component = function () { var applyBatchSettlement = useCallback(function (value, setPopoverOpen, setSelectValue) { if (!value) { - message.warning('请选择结算状态'); + message.warning('请选择承担方式'); return; } var count = 0; @@ -2914,7 +3006,7 @@ const Component = function () { }); setPopoverOpen(false); setSelectValue(undefined); - message.success(count > 0 ? '已批量更新 ' + count + ' 条记录的结算状态' : '暂无可批量修改的记录'); + message.success(count > 0 ? '已批量更新 ' + count + ' 条记录的承担方式' : '暂无可批量修改的记录'); }, [appendChangeLog]); var applyBatchUnitPrice = useCallback(function (field, rawValue, setPopoverOpen, setInputValue) { @@ -2973,6 +3065,26 @@ const Component = function () { }); } + function autoLinkedCell(v, align) { + var text = v == null || v === '' ? '—' : v; + return React.createElement( + 'span', + { className: 'h2-cell-auto', style: { display: 'block', textAlign: align || 'center' } }, + text + ); + } + + function autoLinkedPaidStatus(v) { + var label = labelOf(BINARY_PAID_STATUS_OPTIONS, v); + if (!label || label === '-') return autoLinkedCell('—', 'center'); + var color = v === 'paid' ? 'success' : 'default'; + return React.createElement( + 'span', + { className: 'h2-cell-auto', style: { display: 'block', textAlign: 'center' } }, + React.createElement(Tag, { color: color, style: { margin: 0 } }, label) + ); + } + function readOnlyCell(v, align, warn, tip) { var cls = warn ? 'h2-cell-readonly h2-cell-warn' : 'h2-cell-readonly'; var inner = React.createElement( @@ -3203,27 +3315,12 @@ const Component = function () { return [ { title: '序号', dataIndex: 'seq', key: 'seq', width: 52, align: 'center', fixed: 'left' }, { - title: '状态', - key: 'recordStatus', - width: 72, + title: '加氢日期', + key: 'hydrogenDate', + width: 108, align: 'center', - fixed: 'left', render: function (_, record) { - var label = rowStatusLabel(record); - if (!label) return React.createElement('span', { style: { color: '#cbd5e1' } }, '—'); - var color = label === '已对账' ? 'blue' : 'orange'; - return React.createElement(Tag, { color: color, style: { margin: 0 } }, label); - } - }, - { - title: '订单编号', - dataIndex: 'orderNo', - key: 'orderNo', - width: 168, - align: 'center', - fixed: 'left', - render: function (v) { - return React.createElement('span', { style: { fontFamily: 'monospace', fontSize: 12 } }, v || '-'); + return readOnlyCell(formatDate(record.hydrogenTime) || '-'); } }, { @@ -3247,15 +3344,6 @@ const Component = function () { }); } }, - { - title: '加氢日期', - key: 'hydrogenDate', - width: 108, - align: 'center', - render: function (_, record) { - return readOnlyCell(formatDate(record.hydrogenTime) || '-'); - } - }, { title: reqTitle('加氢站名称'), dataIndex: 'stationId', @@ -3277,6 +3365,30 @@ const Component = function () { }); } }, + { + title: '客户名称', + dataIndex: 'customerId', + key: 'customerId', + width: 180, + align: 'center', + ellipsis: true, + render: function (v, record) { + if (!canEditRow(record)) { + return readOnlyCell(record.customerName || '-'); + } + return React.createElement(Select, { + style: cellInputStyle, + showSearch: true, + allowClear: true, + placeholder: '请选择', + value: v, + status: fieldInvalid(record, 'customerId') ? 'error' : undefined, + options: buildCustomerSelectOptions(), + filterOption: filterOption, + onChange: function (val) { patch(record.key, 'customerId', val); } + }); + } + }, { title: reqTitle('车牌号'), dataIndex: 'plateNo', @@ -3299,28 +3411,6 @@ const Component = function () { }); } }, - { - title: '行驶里程(km)', - dataIndex: 'mileageKm', - key: 'mileageKm', - width: 108, - align: 'right', - render: function (v, record) { - if (!canEditRow(record)) return readOnlyCell(isEmptyNum(v) ? '-' : fmtQty(v), 'right'); - return React.createElement(InputNumber, { - style: cellNumStyle, - min: 0.01, - precision: 2, - step: 0.01, - placeholder: '0.00', - value: isEmptyNum(v) ? null : v, - onChange: function (val) { patch(record.key, 'mileageKm', val == null ? null : val); }, - onBlur: function () { - patch(record.key, 'mileageKm', normalizeMileageKm(v)); - } - }); - } - }, { title: reqTitle('加氢量(kg)'), dataIndex: 'hydrogenKg', @@ -3385,28 +3475,6 @@ const Component = function () { align: 'right', render: function (v) { return readOnlyCell(fmtMoney(v), 'right'); } }, - { - title: reqTitle('客户名称'), - dataIndex: 'customerId', - key: 'customerId', - width: 180, - align: 'center', - ellipsis: true, - render: function (v, record) { - if (!canEditRow(record)) return readOnlyCell(record.customerName); - return React.createElement(Select, { - style: cellInputStyle, - showSearch: true, - allowClear: true, - placeholder: '请选择', - value: v, - status: fieldInvalid(record, 'customerId') ? 'error' : undefined, - options: CUSTOMER_LIST.map(function (c) { return { value: c.value, label: c.label }; }), - filterOption: filterOption, - onChange: function (val) { patch(record.key, 'customerId', val); } - }); - } - }, { title: makeBatchPriceTitle( '加氢单价(元/kg)', @@ -3448,79 +3516,27 @@ const Component = function () { render: function (v) { return readOnlyCell(fmtMoney(v), 'right'); } }, { - title: '业务员', - dataIndex: 'salesperson', - key: 'salesperson', - width: 88, - align: 'center', - render: function (v) { return readOnlyCell(v); } - }, - { - title: makeBatchSettlementTitle( - '结算状态', - '批量修改结算状态', - batchSettlementOpen, - setBatchSettlementOpen, - batchSettlementValue, - setBatchSettlementValue - ), - dataIndex: 'settlementStatus', - key: 'settlementStatus', - width: 118, - align: 'center', + title: '行驶里程(km)', + dataIndex: 'mileageKm', + key: 'mileageKm', + width: 108, + align: 'right', render: function (v, record) { - if (!canEditRow(record)) return readOnlyCell(labelOf(SETTLEMENT_STATUS_OPTIONS, v)); - return React.createElement(Select, { - style: cellInputStyle, - placeholder: '请选择', - value: v, - status: fieldInvalid(record, 'settlementStatus') ? 'error' : undefined, - options: SETTLEMENT_STATUS_OPTIONS, - onChange: function (val) { patch(record.key, 'settlementStatus', val); } + if (!canEditRow(record)) return readOnlyCell(isEmptyNum(v) ? '-' : fmtQty(v), 'right'); + return React.createElement(InputNumber, { + style: cellNumStyle, + min: 0.01, + precision: 2, + step: 0.01, + placeholder: '0.00', + value: isEmptyNum(v) ? null : v, + onChange: function (val) { patch(record.key, 'mileageKm', val == null ? null : val); }, + onBlur: function () { + patch(record.key, 'mileageKm', normalizeMileageKm(v)); + } }); } }, - { - title: '开票日期', - dataIndex: 'invoiceDate', - key: 'invoiceDate', - width: 112, - align: 'center', - render: function (v) { - return readOnlyCell(formatDate(v) || '-'); - } - }, - { - title: '对账日期', - dataIndex: 'reconcileDate', - key: 'reconcileDate', - width: 112, - align: 'center', - render: function (v) { - return readOnlyCell(formatDate(v) || '-'); - } - }, - { - title: '付款状态', - dataIndex: 'paymentStatus', - key: 'paymentStatus', - width: 88, - align: 'center', - render: function (v) { - return readOnlyCell(labelOf(PAYMENT_STATUS_OPTIONS, v) || '-'); - } - }, - { - title: '开票公司', - dataIndex: 'companyId', - key: 'companyId', - width: 180, - align: 'center', - ellipsis: true, - render: function (v, record) { - return readOnlyCell(record.companyName || labelOf(COMPANY_LIST, v) || '-'); - } - }, { title: '备注', dataIndex: 'remark', @@ -3537,63 +3553,131 @@ const Component = function () { }); } }, + { + title: '业务员', + dataIndex: 'salesperson', + key: 'salesperson', + width: 88, + align: 'center', + render: function (v) { return readOnlyCell(v); } + }, + { + title: makeBatchSettlementTitle( + '承担方式', + '批量修改承担方式', + batchSettlementOpen, + setBatchSettlementOpen, + batchSettlementValue, + setBatchSettlementValue + ), + dataIndex: 'settlementStatus', + key: 'settlementStatus', + width: 132, + align: 'center', + render: function (v, record) { + if (!canEditRow(record)) return readOnlyCell(labelOf(SETTLEMENT_STATUS_OPTIONS, v)); + return React.createElement(Select, { + style: cellInputStyle, + placeholder: '请选择', + value: v, + status: fieldInvalid(record, 'settlementStatus') ? 'error' : undefined, + options: SETTLEMENT_STATUS_OPTIONS, + onChange: function (val) { patch(record.key, 'settlementStatus', val); } + }); + } + }, + { + title: '对账日期', + dataIndex: 'reconcileDate', + key: 'reconcileDate', + width: 112, + align: 'center', + render: function (v) { + return readOnlyCell(formatDate(v) || '-'); + } + }, + { + title: '收票日期', + dataIndex: 'receiptDate', + key: 'receiptDate', + width: 112, + align: 'center', + render: function (v) { + return autoLinkedCell(formatDate(v) || '—', 'center'); + } + }, + { + title: '加氢站付款状态', + dataIndex: 'stationPaymentStatus', + key: 'stationPaymentStatus', + width: 120, + align: 'center', + render: function (v) { + return autoLinkedPaidStatus(v); + } + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + key: 'invoiceDate', + width: 112, + align: 'center', + render: function (v) { + return autoLinkedCell(formatDate(v) || '—', 'center'); + } + }, + { + title: '客户收款状态', + dataIndex: 'customerReceiptStatus', + key: 'customerReceiptStatus', + width: 112, + align: 'center', + render: function (v) { + return autoLinkedPaidStatus(v); + } + }, + { + title: '开票公司', + dataIndex: 'companyId', + key: 'companyId', + width: 180, + align: 'center', + ellipsis: true, + render: function (v, record) { + return autoLinkedCell(record.companyName || labelOf(COMPANY_LIST, v) || '—', 'center'); + } + }, + { + title: '状态', + key: 'recordStatus', + width: 72, + align: 'center', + render: function (_, record) { + var label = rowStatusLabel(record); + if (!label) return React.createElement('span', { style: { color: '#cbd5e1' } }, '—'); + var color = label === '已对账' ? 'blue' : 'orange'; + return React.createElement(Tag, { color: color, style: { margin: 0 } }, label); + } + }, + { + title: '订单编号', + dataIndex: 'orderNo', + key: 'orderNo', + width: 168, + align: 'center', + render: function (v) { + return React.createElement('span', { style: { fontFamily: 'monospace', fontSize: 12 } }, v || '-'); + } + }, { title: '操作', key: 'action', - width: 120, + width: 56, align: 'center', fixed: 'right', render: function (_, record) { var ref = latestRefs.current; - function renderEditIcon() { - return React.createElement( - 'svg', - { - viewBox: '64 64 896 896', - width: 14, - height: 14, - fill: 'currentColor', - 'aria-hidden': true - }, - React.createElement('path', { - d: 'M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 0 0 0-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 0 0 9.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9z' - }) - ); - } - - function renderCopyIcon() { - return React.createElement( - 'svg', - { - viewBox: '64 64 896 896', - width: 14, - height: 14, - fill: 'currentColor', - 'aria-hidden': true - }, - React.createElement('path', { - d: 'M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32z' - }) - ); - } - - function renderDeleteIcon() { - return React.createElement( - 'svg', - { - viewBox: '64 64 896 896', - width: 14, - height: 14, - fill: 'currentColor', - 'aria-hidden': true - }, - React.createElement('path', { - d: 'M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60v520c0 17.7 14.3 32 32 32h632c17.7 0 32-14.3 32-32V336h60c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 464c-17.7 0-32 14.3-32 32v288c0 17.7 14.3 32 32 32h64c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32h-64zm-192 0c-17.7 0-32 14.3-32 32v288c0 17.7 14.3 32 32 32h64c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32h-64zm-192 0c-17.7 0-32 14.3-32 32v288c0 17.7 14.3 32 32 32h64c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32h-64z' - }) - ); - } - function renderIconAction(title, iconNode, onClick, extraClass, disabled) { var cls = 'h2-action-icon-btn' + (extraClass ? ' ' + extraClass : '') + (disabled ? ' is-disabled' : ''); var node = React.createElement( @@ -3626,31 +3710,138 @@ const Component = function () { ); } - function renderMoreAction() { - return React.createElement( - Dropdown, - { - trigger: ['hover'], - placement: 'bottomRight', - menu: { - items: [ - { - key: 'changelog', - label: '变更日志', - onClick: function () { - openChangeLogModal(record); - } - } - ] - } - }, - renderIconAction('更多', renderMoreIcon(), null, 'h2-row-more-btn') - ); + function toggleEditRow() { + ref.setEditingKeys(function (prev) { + if (prev.indexOf(record.key) >= 0) { + return prev.filter(function (k) { return k !== record.key; }); + } + return prev.concat([record.key]); + }); } - function renderCopyButton() { + function confirmDeleteRow() { + ref.setAllRows(function (prev) { + return prev.filter(function (r) { return r.key !== record.key; }); + }); + ref.setSelectedRowKeys(function (prev) { + return prev.filter(function (k) { return k !== record.key; }); + }); + ref.setEditingKeys(function (prev) { + return prev.filter(function (k) { return k !== record.key; }); + }); + message.success('已删除'); + } + + function buildMoreMenuItems() { + var items = []; + var isEditing = ref.editingKeys.indexOf(record.key) >= 0; + var allowDelete = canDeleteRow(record, ref.isSupervisor); + var allowCopy = canCopyRow(record); + var editLabel = isEditing ? '完成编辑' : '编辑'; + + if (isReconciledRow(record)) { + if (!ref.isSupervisor) { + items.push({ + key: 'edit', + label: '编辑', + disabled: true, + title: '仅主管可编辑已对账数据' + }); + } else { + items.push({ + key: 'edit', + label: editLabel, + onClick: function () { toggleEditRow(); } + }); + } + } else if (isPendingRow(record) && canShowPendingActions(record)) { + items.push({ + key: 'edit', + label: editLabel, + onClick: function () { toggleEditRow(); } + }); + } else if (isNewRow(record) && record.createdBy === CURRENT_USER.id) { + items.push({ + key: 'edit', + label: editLabel, + onClick: function () { toggleEditRow(); } + }); + } + + if (allowCopy) { + items.push({ + key: 'copy', + label: '复制', + onClick: function () { + setCopyPopoverKey(record.key); + setCopyRowCount(1); + } + }); + } + + if (isReconciledRow(record)) { + if (!ref.isSupervisor) { + items.push({ + key: 'delete', + label: '删除', + disabled: true, + danger: true, + title: '仅主管可删除已对账数据' + }); + } else { + items.push({ + key: 'delete', + label: '删除', + danger: true, + onClick: function () { + Modal.confirm({ + title: '确认删除该条氢费记录?', + okText: '删除', + okType: 'danger', + cancelText: '取消', + onOk: confirmDeleteRow + }); + } + }); + } + } else if ( + (isPendingRow(record) && canShowPendingActions(record)) || + (isNewRow(record) && record.createdBy === CURRENT_USER.id) + ) { + items.push({ + key: 'delete', + label: '删除', + disabled: !allowDelete, + danger: true, + onClick: function () { + if (!allowDelete) return; + Modal.confirm({ + title: '确认删除该条氢费记录?', + okText: '删除', + okType: 'danger', + cancelText: '取消', + onOk: confirmDeleteRow + }); + } + }); + } + + if (items.length) { + items.push({ type: 'divider', key: 'divider-actions' }); + } + items.push({ + key: 'changelog', + label: '变更日志', + onClick: function () { + openChangeLogModal(record); + } + }); + return items; + } + + function renderCopyPopoverContent() { var popOpen = copyPopoverKey === record.key; - var popContent = React.createElement( + return React.createElement( 'div', { style: { width: 220 } }, React.createElement( @@ -3681,143 +3872,43 @@ const Component = function () { size: 'small', onClick: function () { applyCopyRows(record.key, copyRowCount); + setCopyPopoverKey(null); } }, '确认复制' ) ); + } + + function renderMoreAction() { + var popOpen = copyPopoverKey === record.key; + var dropdownNode = React.createElement( + Dropdown, + { + trigger: ['click'], + placement: 'bottomRight', + menu: { items: buildMoreMenuItems() } + }, + renderIconAction('更多', renderMoreIcon(), null, 'h2-row-more-btn') + ); return React.createElement( Popover, { - trigger: 'click', + trigger: [], placement: 'leftTop', open: popOpen, - content: popContent, + content: renderCopyPopoverContent(), onOpenChange: function (open) { - if (open) { - setCopyPopoverKey(record.key); - setCopyRowCount(1); - } else if (copyPopoverKey === record.key) { + if (!open && copyPopoverKey === record.key) { setCopyPopoverKey(null); } } }, - renderIconAction('复制', renderCopyIcon()) + dropdownNode ); } - function renderEditDeletePair(onEditClick, opts) { - opts = opts || {}; - var showCopy = opts.showCopy !== false; - var allowEdit = opts.allowEdit !== false; - var allowDelete = - opts.allowDelete !== false && canDeleteRow(record, ref.isSupervisor); - var isEditing = ref.editingKeys.indexOf(record.key) >= 0; - var editTitle = opts.editDisabledTitle && !allowEdit - ? opts.editDisabledTitle - : isEditing - ? '完成编辑' - : '编辑'; - var deleteTitle = opts.deleteDisabledTitle && !allowDelete - ? opts.deleteDisabledTitle - : '删除'; - var deleteBtn = React.createElement( - Popconfirm, - { - title: '确认删除该条氢费记录?', - disabled: !allowDelete, - onConfirm: function () { - if (!allowDelete) return; - ref.setAllRows(function (prev) { - return prev.filter(function (r) { return r.key !== record.key; }); - }); - ref.setSelectedRowKeys(function (prev) { - return prev.filter(function (k) { return k !== record.key; }); - }); - ref.setEditingKeys(function (prev) { - return prev.filter(function (k) { return k !== record.key; }); - }); - message.success('已删除'); - } - }, - renderIconAction( - deleteTitle, - renderDeleteIcon(), - null, - 'h2-action-icon-danger', - !allowDelete - ) - ); - var nodes = [ - renderIconAction( - editTitle, - renderEditIcon(), - allowEdit ? onEditClick : null, - '', - !allowEdit - ) - ]; - if (showCopy) nodes.push(renderCopyButton()); - nodes.push(deleteBtn, renderMoreAction()); - return React.createElement( - 'div', - { style: { display: 'inline-flex', alignItems: 'center', gap: 2, flexWrap: 'nowrap' } }, - nodes - ); - } - - if (isReconciledRow(record)) { - return renderEditDeletePair( - function () { - ref.setEditingKeys(function (prev) { - if (prev.indexOf(record.key) >= 0) { - return prev.filter(function (k) { return k !== record.key; }); - } - return prev.concat([record.key]); - }); - }, - { - showCopy: false, - allowEdit: ref.isSupervisor, - allowDelete: ref.isSupervisor, - editDisabledTitle: '仅主管可编辑已对账数据', - deleteDisabledTitle: '仅主管可删除已对账数据' - } - ); - } - - if (isPendingRow(record)) { - if (!canShowPendingActions(record)) return renderMoreAction(); - return renderEditDeletePair(function () { - ref.setEditingKeys(function (prev) { - if (prev.indexOf(record.key) >= 0) { - return prev.filter(function (k) { return k !== record.key; }); - } - return prev.concat([record.key]); - }); - }); - } - - if (!isNewRow(record) || record.createdBy !== CURRENT_USER.id) return renderMoreAction(); - return React.createElement( - 'div', - { style: { display: 'inline-flex', alignItems: 'center', gap: 2, flexWrap: 'nowrap' } }, - renderCopyButton(), - React.createElement( - Popconfirm, - { - title: '确认删除该条氢费记录?', - onConfirm: function () { - ref.setAllRows(function (prev) { - return prev.filter(function (r) { return r.key !== record.key; }); - }); - message.success('已删除'); - } - }, - renderIconAction('删除', renderDeleteIcon(), null, 'h2-action-icon-danger') - ), - renderMoreAction() - ); + return renderMoreAction(); } } ]; @@ -3905,43 +3996,30 @@ const Component = function () { [] ); - var tableSummary = useCallback(function () { - /** rowSelection 占第 0 列;按 columns 顺序逐列渲染,避免 colSpan 与固定列错位 */ - var selectionOffset = 1; + var renderTotalsBar = useCallback(function () { + var items = [ + { key: 'hydrogenKg', label: '加氢量(kg)', value: fmtQty(totals.hydrogenKg) }, + { key: 'costTotal', label: '成本总价(元)', value: fmtMoney(totals.costTotal) }, + { key: 'customerAmount', label: '加氢总价(元)', value: fmtMoney(totals.customerAmount) } + ]; return React.createElement( - Table.Summary, - null, + 'div', + { className: 'h2-ledger-totals-bar' }, + React.createElement('div', { className: 'h2-ledger-totals-bar__title' }, '合计'), React.createElement( - Table.Summary.Row, - null, - React.createElement(Table.Summary.Cell, { key: '__selection', index: 0 }), - columns.map(function (col, i) { - var colKey = col.key || col.dataIndex || String(i); - var idx = i + selectionOffset; - var align = col.align || 'center'; - var content = null; - if (colKey === 'seq') { - content = '合计'; - align = 'center'; - } else if (colKey === 'hydrogenKg') { - content = fmtQty(totals.hydrogenKg); - align = 'right'; - } else if (colKey === 'costTotal') { - content = fmtMoney(totals.costTotal); - align = 'right'; - } else if (colKey === 'customerAmount') { - content = fmtMoney(totals.customerAmount); - align = 'right'; - } + 'div', + { className: 'h2-ledger-totals-bar__items' }, + items.map(function (item) { return React.createElement( - Table.Summary.Cell, - { key: colKey, index: idx, align: align }, - content + 'div', + { key: item.key, className: 'h2-ledger-totals-bar__item' }, + React.createElement('div', { className: 'h2-ledger-totals-bar__label' }, item.label), + React.createElement('div', { className: 'h2-ledger-totals-bar__value' }, item.value) ); }) ) ); - }, [totals, columns]); + }, [totals]); return React.createElement( App, @@ -4068,7 +4146,7 @@ const Component = function () { style: filterControlStyle, value: customerDraft, onChange: function (v) { setCustomerDraft(v); }, - options: CUSTOMER_LIST.map(function (c) { return { value: c.value, label: c.label }; }), + options: buildCustomerSelectOptions(), filterOption: filterOption }) ) @@ -4115,7 +4193,7 @@ const Component = function () { Col, filterColProps, React.createElement('div', { style: filterItemStyle }, - React.createElement('div', { style: filterLabelStyle }, '结算状态'), + React.createElement('div', { style: filterLabelStyle }, '承担方式'), React.createElement(Select, { allowClear: true, placeholder: '全部', @@ -4130,14 +4208,14 @@ const Component = function () { Col, filterColProps, React.createElement('div', { style: filterItemStyle }, - React.createElement('div', { style: filterLabelStyle }, '付款状态'), + React.createElement('div', { style: filterLabelStyle }, '客户收款状态'), React.createElement(Select, { allowClear: true, placeholder: '全部', style: filterControlStyle, value: paymentDraft, onChange: function (v) { setPaymentDraft(v); }, - options: PAYMENT_STATUS_OPTIONS + options: BINARY_PAID_STATUS_OPTIONS }) ) ), @@ -4228,6 +4306,7 @@ const Component = function () { ) ) ), + renderTotalsBar(), React.createElement( 'div', { className: 'h2-ledger-table-wrap' }, @@ -4248,9 +4327,8 @@ const Component = function () { if (index > 0 && prevTier !== tier) cls += ' h2-row-tier-boundary'; return cls; }, - scroll: { x: 'max-content', y: filterExpanded ? 'calc(100vh - 476px)' : 'calc(100vh - 416px)' }, - sticky: true, - summary: tableSummary + scroll: { x: 'max-content', y: filterExpanded ? 'calc(100vh - 524px)' : 'calc(100vh - 464px)' }, + sticky: true }) ), React.createElement(