Commit 29a9f2d0 authored by liguangyu06's avatar liguangyu06
Browse files

Add SPD Playwright UI automation framework for GitLab CI and Jenkins.

Keep credentials, browser cache, and Cursor skills out of the repository so clones can run from .env.example and npm ci.
parents
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const consumeTrendColumns = {
campus: '院区名称',
consumeDept: '消耗科室',
productName: '产品名称',
productCode: '产品编号',
field: '单位',
manufacturer: '生产厂家',
field2: '规格',
field3: '科室编码',
deptName: '科室名称',
field4: '上年同月出库',
field5: '上月出库',
field6: '本月出库',
field7: '同比额',
field8: '同比',
field9: '环比额',
field10: '环比',
} as const;
export const consumeTrendComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'consumeDept', label: '消耗科室', type: 'select' },
{ key: 'productName', label: '产品名称', type: 'text' },
];
export const consumeTrendComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'productName', type: 'text', label: '产品名称' },
{ key: 'campus', type: 'select', label: '院区名称' },
{ key: 'consumeDept', type: 'select', label: '消耗科室' },
{ key: 'consumableCategory', type: 'cascader', label: '耗材分类' },
{ key: 'financeCategory', type: 'cascader', label: '财务分类' },
{ key: 'consumableType', type: 'select', label: '耗材类型' },
{ key: 'statMode', type: 'select', label: '统计方式' },
{ key: 'chargeFlag', type: 'select', label: '是否收费' },
];
export const consumeTrendComboAssertKeys = ['productName'] as const;
export const consumeTrendData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
isChart?: boolean;
presetConsumeDept?: string;
presetDetailMonth?: string;
detailMonthLabel?: string;
detailViewTabs?: readonly ['耗材', '科室'];
} = {
reportPath: '/spd/form/consume/report/consume/trend',
iframeSrc: 'consume/trend',
productNameSelector: '#form_item_branchId',
/** 上部近12个月趋势图;下部数据详情列表(仅此表做列表断言)。 */
tableWrapperIndex: 0,
columns: consumeTrendColumns,
coreTableHeaders: ['产品编号', '产品名称', '单位', '生产厂家', '规格', '科室编码', '科室名称', '上年同月出库'],
columnAliases: {
field5: ['采购计划号'],
deptName: ['请领科室'],
consumeDept: ['科室名称'],
},
horizontalScrollAnchorColumn: '院区名称',
horizontalScrollTargetColumn: '环比',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
presetConsumeDept: '检验科(千泉院区)',
presetDetailMonth: '2026-04',
detailMonthLabel: '数据详情',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
drawerFieldInputIds: {
productName: 'form_item_goodsName',
campus: 'form_item_branchId',
consumeDept: 'form_item_deptId',
consumableCategory: 'form_item_settleType',
financeCategory: 'form_item_factKind',
consumableType: 'form_item_purModes',
chargeFlag: 'form_item_chargeFlag',
},
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
isChart: true,
exportTaskName: '消耗趋势分析',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['上月出库', '本月出库'],
detailViewTabs: ['耗材', '科室'] as const,
comboSampleScrollColumns: ['环比'],
comboSamplePickKeys: [
'productName',
'productCode',
'field',
'field2',
'manufacturer',
'deptName',
],
drawerFields: consumeTrendComboDrawerFields,
};
import {
buildSortColumnCases,
type CenterReportPageData,
} from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costDeptClassifyChargeColumns = {
entryDate: '入账日期',
campus: '院区名称',
deptName: '科室名称',
classifyMode: '分类方式',
classifyName: '分类名称',
consumableType: '耗材类型',
materialType: '物资类型',
deptType: '科室类型',
queryDimension: '查询维度',
deptTypeCol: '科室类型',
deptNameCol: '科室名称',
} as const;
/** 快捷区始终可见字段。 */
export const costDeptClassifyChargeComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'deptName', label: '科室名称', type: 'select' },
];
/** 点击「展开」后可见的筛选字段(无高级筛选抽屉)。 */
export const costDeptClassifyChargeComboExpandedFields: readonly DeptQuickFieldDef[] = [
{ key: 'classifyMode', label: '分类方式', type: 'select' },
{ key: 'classifyName', label: '分类名称', type: 'cascader' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'materialType', label: '物资类型', type: 'select' },
{ key: 'deptType', label: '科室类型', type: 'select' },
{ key: 'queryDimension', label: '查询维度', type: 'select' },
];
export const costDeptClassifyChargeComboDrawerFields: readonly CenterReportDrawerField[] = [];
export const costDeptClassifyChargeComboAssertKeys = ['deptNameCol'] as const;
/** 主表可排序列(透视表仅「科室名称」列带 sorter)。 */
export const costDeptClassifyChargeSortColumns = ['科室名称'] as const;
export const costDeptClassifyChargeSortCases = buildSortColumnCases(
'STAT-CCC',
costDeptClassifyChargeSortColumns,
4,
);
export const costDeptClassifyChargeData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/chargeSummary',
iframeSrc: 'settel/chargeSummary',
productNameSelector: '#form_item_goodsName',
columns: costDeptClassifyChargeColumns,
coreTableHeaders: ['科室类型', '科室名称', '科室小计'],
sortColumns: [...costDeptClassifyChargeSortColumns],
sortCasePrefix: 'STAT-CCC',
sortCaseStartIndex: 4,
mockNotExistProduct: '__NOT_EXIST_DEPT__99999',
mockFieldLabel: '入账日期',
mockNotExistDept: '__NOT_EXIST_DEPT__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: true,
exportTaskName: '科室成本分类汇总(计费科室)',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: false,
horizontalScrollAnchorColumn: '科室类型',
horizontalScrollTargetColumn: '科室名称',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['entryDate', 'campus', 'deptName', 'deptNameCol'],
drawerFields: costDeptClassifyChargeComboDrawerFields,
};
import type { CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costDeptClassifyColumns = {
entryTime: '入账时间',
campus: '院区名称',
deptName: '科室名称',
} as const;
export const costDeptClassifyComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryTime', label: '入账时间', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'deptName', label: '科室名称', type: 'select' },
];
export const costDeptClassifyComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const costDeptClassifyComboAssertKeys = ['entryTime', 'campus', 'deptName'] as const;
export const costDeptClassifyData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/deptSummary',
iframeSrc: 'settel/deptSummary',
productNameSelector: '#form_item_goodsName',
columns: costDeptClassifyColumns,
coreTableHeaders: ['科室名称', '院区名称', '入账时间'],
mockNotExistProduct: '__NOT_EXIST_DEPT__99999',
mockFieldLabel: '入账时间',
mockNotExistDept: '__NOT_EXIST_DEPT__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: true,
exportTaskName: '科室成本分类汇总',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '科室名称',
horizontalScrollTargetColumn: '入账时间',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['entryTime', 'campus', 'deptName'],
drawerFields: costDeptClassifyComboDrawerFields,
};
import type { CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costDeptNetInColumns = {
statMonth: '统计月份',
deptName: '科室名称',
consumableType: '耗材类型',
statDate: '统计日期',
supplierName: '进院供应商',
productName: '产品名称',
batchNo: '批号',
settlement: '结算方式',
inboundPrice: '入院单价',
} as const;
export const costDeptNetInComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statMonth', label: '统计月份', type: 'date' },
{ key: 'deptName', label: '科室名称', type: 'select' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'statDate', label: '统计日期', type: 'date' },
];
export const costDeptNetInComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'inboundPrice', type: 'text', label: '入院单价' },
];
export const costDeptNetInComboAssertKeys = ['statMonth', 'deptName', 'consumableType', 'statDate'] as const;
export const costDeptNetInData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/costSearch',
iframeSrc: 'settel/costSearch',
productNameSelector: '#form_item_goodsName',
columns: costDeptNetInColumns,
coreTableHeaders: ['产品名称', '科室名称', '进院供应商', '统计日期', '统计月份', '耗材类型'],
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
mockFieldInDrawer: true,
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '科室净入成本查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '耗材类型',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['statMonth', 'deptName', 'consumableType', 'statDate', 'inboundPrice'],
drawerFields: costDeptNetInComboDrawerFields,
};
import type { CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costDeptRankColumns = {
statMonth: '统计月份',
campus: '院区',
consumableType: '耗材类型',
} as const;
export const costDeptRankComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statMonth', label: '统计月份', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
];
export const costDeptRankComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const costDeptRankComboAssertKeys = ['statMonth', 'campus', 'consumableType'] as const;
export const costDeptRankData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settle/deptRank',
iframeSrc: 'settle/deptRank',
productNameSelector: '#form_item_goodsName',
columns: costDeptRankColumns,
coreTableHeaders: ['院区', '统计月份', '耗材类型'],
mockNotExistProduct: '__NOT_EXIST_VALUE__99999',
mockFieldLabel: '统计月份',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '科室成本排名',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '院区',
horizontalScrollTargetColumn: '耗材类型',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['statMonth', 'campus', 'consumableType'],
drawerFields: costDeptRankComboDrawerFields,
};
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costEntryDetailColumns = {
productName: '产品名称',
spec: '规格型号',
consumableType: '耗材类型',
manufacturer: '器械注册人-术语配置',
productCode: '产品编号',
productAlias: '产品俗称',
unit: '单位',
registrationNo: '注册证号',
insuranceCode27: '27位医保编码',
supplierName: '进院供应商',
settlementPrice: '结算单价',
consumableCategory: '耗材分类',
financeClassify: '财务分类',
entryQty: '入账数量',
entryAmount: '入账金额',
entryDate: '入账日期',
onlineOfflineFlag: '线上线下标记-批次属性',
campus: '院区名称',
} as const;
/** 主表列 → 底部合计标签。 */
export const costEntryDetailSummaryMetrics = [
{ key: 'entryQty', label: '入账数量', summaryLabels: ['入账数量'] },
{ key: 'entryAmount', label: '入账金额', summaryLabels: ['入账金额'] },
] as const;
export const costEntryDetailComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'productName', label: '产品名称', type: 'text' },
];
export const costEntryDetailComboDrawerFields: readonly CenterReportDrawerField[] = [];
export const costEntryDetailComboAssertKeys = ['entryDate', 'productName'] as const;
/** 主表可见业务列(不含序号);无排序控件时脚本 skip。 */
export const costEntryDetailSortColumns = [
'产品名称',
'规格型号',
'器械注册人-术语配置',
'产品编号',
'产品俗称',
'单位',
'耗材类型',
'注册证号',
'27位医保编码',
'进院供应商',
'结算单价',
'耗材分类',
'财务分类',
'入账数量',
'入账金额',
'入账日期',
] as const;
export const costEntryDetailSortCases = buildSortColumnCases(
'STAT-CED',
costEntryDetailSortColumns,
11,
);
export const costEntryDetailData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/entryCost',
iframeSrc: 'settel/entryCost',
productNameSelector: '#form_item_goodsName',
columns: costEntryDetailColumns,
columnAliases: {
manufacturer: ['器械注册人-术语配置', '生产厂家', '器械注册人'],
supplierName: ['进院供应商', '进院供应商名称'],
},
coreTableHeaders: ['产品名称', '规格型号', '入账数量', '入账金额', '入账日期'],
summaryKeywords: ['入账数量', '入账金额'],
sortColumns: costEntryDetailSortColumns,
sortCasePrefix: 'STAT-CED',
sortCaseStartIndex: 11,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: true,
exportTaskName: '成本入账明细查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '入账日期',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['entryDate', 'productName'],
drawerFields: costEntryDetailComboDrawerFields,
firstRowSummaryMatch: {
metrics: costEntryDetailSummaryMetrics,
requiredKey: 'productName',
fields: costEntryDetailComboQuickFields,
footerKeywords: ['入账数量', '入账金额', '合计'],
},
};
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costEntryExecColumns = {
productCode: '产品编号',
productName: '产品名称',
productAlias: '产品俗称',
spec: '规格型号',
unit: '单位',
consumableType: '耗材类型',
registrationNo: '注册证号',
insuranceCode27: '27位医保编码',
supplierName: '进院供应商',
settlementPrice: '结算单价',
consumableCategory: '耗材分类',
financeClassify: '财务分类',
entryQty: '入账数量',
entryAmount: '入账金额',
entryDate: '入账日期',
execDeptName: '执行科室名称',
manufacturer: '器械注册人-术语配置',
onlineOfflineFlag: '线上线下标记',
} as const;
/** 主表列 → 底部合计标签。 */
export const costEntryExecSummaryMetrics = [
{ key: 'entryQty', label: '入账数量', summaryLabels: ['入账数量'] },
{ key: 'entryAmount', label: '入账金额', summaryLabels: ['入账金额'] },
] as const;
export const costEntryExecComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
];
export const costEntryExecComboDrawerFields: readonly CenterReportDrawerField[] = [];
export const costEntryExecComboAssertKeys = ['entryDate', 'productName', 'consumableType'] as const;
/** 主表可见业务列(不含序号);无排序控件时脚本 skip。 */
export const costEntryExecSortColumns = [
'产品编号',
'产品名称',
'规格型号',
'器械注册人-术语配置',
'产品俗称',
'单位',
'耗材类型',
'27位医保编码',
'进院供应商',
'结算单价',
'耗材分类',
'财务分类',
'入账数量',
'入账金额',
] as const;
export const costEntryExecSortCases = buildSortColumnCases(
'STAT-CEE',
costEntryExecSortColumns,
11,
);
export const costEntryExecData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/entryExecCost',
iframeSrc: 'settel/entryExecCost',
productNameSelector: '#form_item_goodsName',
columns: costEntryExecColumns,
columnAliases: {
manufacturer: ['器械注册人-术语配置', '生产厂家', '器械注册人'],
supplierName: ['进院供应商', '进院供应商名称'],
},
coreTableHeaders: ['产品名称', '入账日期', '耗材类型', '执行科室名称', '入账数量', '入账金额'],
summaryKeywords: ['入账数量', '入账金额'],
sortColumns: costEntryExecSortColumns,
sortCasePrefix: 'STAT-CEE',
sortCaseStartIndex: 11,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: true,
exportTaskName: '成本入账明细查询(执行科室维度)',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '执行科室名称',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['entryDate', 'productName', 'consumableType'],
drawerFields: costEntryExecComboDrawerFields,
firstRowSummaryMatch: {
metrics: costEntryExecSummaryMetrics,
requiredKey: 'productName',
fields: costEntryExecComboQuickFields,
footerKeywords: ['入账数量', '入账金额', '合计'],
},
};
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costEntrySummaryColumns = {
productCode: '产品编号',
productName: '产品名称',
spec: '规格型号',
manufacturer: '器械注册人-术语配置',
productAlias: '产品俗称',
unit: '单位',
consumableType: '耗材类型',
registrationNo: '注册证号',
insuranceCode27: '27位医保编码',
supplierName: '进院供应商',
settlementPrice: '结算单价',
consumableCategory: '耗材分类',
financeClassify: '财务分类',
costQty: '成本数量',
costAmount: '成本金额',
onlineOfflineFlag: '线上线下标记',
entryDate: '入账日期',
campus: '院区名称',
} as const;
/** 主表列 → 底部合计标签。 */
export const costEntrySummarySummaryMetrics = [
{ key: 'costQty', label: '成本数量', summaryLabels: ['成本数量'] },
{ key: 'costAmount', label: '成本金额', summaryLabels: ['成本金额'] },
] as const;
/** 快捷区可见字段(展开后含产品名称等;样本有值才填)。 */
export const costEntrySummaryComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'spec', label: '规格型号', type: 'text' },
{ key: 'manufacturer', label: '器械注册人-术语配置', type: 'text' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'supplierName', label: '进院供应商', type: 'text' },
{ key: 'financeClassify', label: '财务分类', type: 'select' },
];
export const costEntrySummaryComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const costEntrySummaryComboAssertKeys = [
'productName',
'spec',
'consumableType',
'supplierName',
] as const;
/** 主表可见业务列(不含序号);无排序控件时脚本 skip。 */
export const costEntrySummarySortColumns = [
'产品编号',
'产品名称',
'规格型号',
'器械注册人-术语配置',
'产品俗称',
'单位',
'耗材类型',
'注册证号',
'27位医保编码',
'进院供应商',
'结算单价',
'耗材分类',
'财务分类',
'成本数量',
'成本金额',
'线上线下标记',
] as const;
export const costEntrySummarySortCases = buildSortColumnCases(
'STAT-CET',
costEntrySummarySortColumns,
11,
);
export const costEntrySummaryData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settle/entryCostTotal',
iframeSrc: 'settle/entryCostTotal',
productNameSelector: '#form_item_goodsName',
columns: costEntrySummaryColumns,
columnAliases: {
manufacturer: ['器械注册人-术语配置', '生产厂家', '器械注册人'],
supplierName: ['进院供应商', '进院供应商名称'],
},
coreTableHeaders: ['产品编号', '产品名称', '规格型号', '成本数量', '成本金额'],
summaryKeywords: ['成本数量', '成本金额'],
sortColumns: costEntrySummarySortColumns,
sortCasePrefix: 'STAT-CET',
sortCaseStartIndex: 11,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: true,
exportTaskName: '成本入账汇总查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品编号',
horizontalScrollTargetColumn: '成本金额',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: [
'entryDate',
'campus',
'productName',
'spec',
'manufacturer',
'consumableType',
'supplierName',
'financeClassify',
],
drawerFields: costEntrySummaryComboDrawerFields,
firstRowSummaryMatch: {
metrics: costEntrySummarySummaryMetrics,
requiredKey: 'productName',
fields: costEntrySummaryComboQuickFields,
footerKeywords: ['成本数量', '成本金额', '合计'],
},
};
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costFinInColumns = {
financeMonth: '财务月份',
supplierName: '进院供应商名称',
inboundOrderNo: '入库单号',
} as const;
/** 主表可见业务列(不含序号/操作);无排序控件时脚本 skip。 */
export const costFinInSortColumns = ['进院供应商名称', '入库单号'] as const;
export const costFinInComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'financeMonth', label: '财务月份', type: 'date' },
{ key: 'supplierName', label: '进院供应商名称', type: 'select' },
{ key: 'inboundOrderNo', label: '入库单号', type: 'text' },
];
export const costFinInComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const costFinInComboAssertKeys = ['financeMonth', 'supplierName', 'inboundOrderNo'] as const;
export const costFinInData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settle/inStock',
iframeSrc: 'settle/inStock',
productNameSelector: '#form_item_goodsName',
columns: costFinInColumns,
coreTableHeaders: ['进院供应商名称', '财务月份', '入库单号'],
sortColumns: costFinInSortColumns,
sortCasePrefix: 'STAT-CFI',
sortCaseStartIndex: 10,
mockNotExistProduct: '__NOT_EXIST_ORDER__99999',
mockFieldLabel: '入库单号',
mockNotExistSupplier: '__NOT_EXIST_SUPPLIER__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: false,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: false,
exportTaskName: '财务入库单',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '进院供应商名称',
horizontalScrollTargetColumn: '入库单号',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['financeMonth', 'supplierName', 'inboundOrderNo'],
drawerFields: costFinInComboDrawerFields,
};
export const costFinInSortCases = buildSortColumnCases('STAT-CFI', costFinInSortColumns, 10);
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costFinOutColumns = {
outboundOrderNo: '出库单号',
deptName: '科室名称',
financeMonth: '财务月份',
qty: '数量',
amount: '金额',
consumableType: '耗材类型',
financeClassify: '财务分类',
isVolume: '是否带量',
onlineOfflineFlag: '线上线下标记',
createdAt: '制单时间',
campus: '院区名称',
} as const;
/** 主表列 → 底部合计标签。 */
export const costFinOutSummaryMetrics = [
{ key: 'qty', label: '数量', summaryLabels: ['数量', '合计数量', '出库数量'] },
{ key: 'amount', label: '金额', summaryLabels: ['金额', '合计金额', '出库金额'] },
] as const;
/** 快捷区实际字段(扫描):财务月份、院区名称、科室名称、出库单号、耗材类型、财务分类、是否带量、线上线下标记。 */
export const costFinOutComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'financeMonth', label: '财务月份', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'deptName', label: '科室名称', type: 'select' },
{ key: 'outboundOrderNo', label: '出库单号', type: 'text' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'financeClassify', label: '财务分类', type: 'select' },
{ key: 'isVolume', label: '是否带量', type: 'select' },
{ key: 'onlineOfflineFlag', label: '线上线下标记', type: 'select' },
];
export const costFinOutComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
/** 主表可见业务列(不含序号/操作);无排序控件时脚本 skip。 */
export const costFinOutSortColumns = [
'出库单号',
'科室名称',
'财务月份',
'数量',
'金额',
'耗材类型',
'财务分类',
'是否带量',
'线上线下标记',
'制单时间',
] as const;
/** 分页用例 STAT-CFO-007:财务月份默认区间(保证结果超过 1 页)。 */
export const costFinOutPaginationFinanceMonth = {
label: '财务月份',
start: '2026-01',
end: '2026-08',
} as const;
export const costFinOutComboAssertKeys = [
'financeMonth',
'deptName',
'outboundOrderNo',
'consumableType',
'isVolume',
'onlineOfflineFlag',
] as const;
export const costFinOutData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settle/outStock',
iframeSrc: 'settle/outStock',
productNameSelector: '#form_item_goodsName',
columns: costFinOutColumns,
coreTableHeaders: ['出库单号', '科室名称', '财务月份', '数量', '金额', '耗材类型'],
summaryKeywords: ['数量', '金额'],
columnAliases: {
qty: ['数量', '出库数量'],
amount: ['金额', '出库金额'],
financeClassify: ['财务分类'],
onlineOfflineFlag: ['线上线下标记', '线上线下'],
},
mockNotExistProduct: '__NOT_EXIST_ORDER__99999',
mockFieldLabel: '出库单号',
mockNotExistDept: '__NOT_EXIST_DEPT__99999',
sortColumns: costFinOutSortColumns,
sortCasePrefix: 'STAT-CFO',
sortCaseStartIndex: 12,
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: true,
exportTaskName: '财务出库单',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '出库单号',
horizontalScrollTargetColumn: '制单时间',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: [
'financeMonth',
'campus',
'deptName',
'outboundOrderNo',
'consumableType',
'financeClassify',
'isVolume',
'onlineOfflineFlag',
'qty',
'amount',
],
drawerFields: costFinOutComboDrawerFields,
firstRowSummaryMatch: {
metrics: costFinOutSummaryMetrics,
requiredKey: 'outboundOrderNo',
fields: costFinOutComboQuickFields,
footerKeywords: ['数量', '金额', '合计'],
},
};
export const costFinOutSortCases = buildSortColumnCases(
'STAT-CFO',
costFinOutSortColumns,
12,
);
import type { CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costFinanceClassifyColumns = {
entryMonth: '入账月份',
consumableType: '耗材类型',
classifyMode: '分类方式',
classifyName: '分类名称',
materialType: '物资类型',
campus: '院区名称',
} as const;
export const costFinanceClassifyComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryMonth', label: '入账月份', type: 'date' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'classifyMode', label: '分类方式', type: 'select' },
{ key: 'classifyName', label: '分类名称', type: 'select' },
];
export const costFinanceClassifyComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const costFinanceClassifyComboAssertKeys = ['entryMonth', 'consumableType', 'classifyMode', 'classifyName'] as const;
export const costFinanceClassifyData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/financeWithClassify',
iframeSrc: 'settel/financeWithClassify',
productNameSelector: '#form_item_goodsName',
columns: costFinanceClassifyColumns,
coreTableHeaders: ['院区名称', '入账月份', '耗材类型', '分类方式', '分类名称', '物资类型'],
mockNotExistProduct: '__NOT_EXIST_VALUE__99999',
mockFieldLabel: '入账月份',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: false,
exportTaskName: '财务分类进销存',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '院区名称',
horizontalScrollTargetColumn: '物资类型',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['entryMonth', 'consumableType', 'classifyMode', 'classifyName'],
drawerFields: costFinanceClassifyComboDrawerFields,
};
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costFinancePsiColumns = {
entryMonth: '入账月份',
consumableType: '耗材类型',
campus: '院区名称',
financeClassify: '财务分类',
consumableCategory: '耗材分类',
isOpening: '是否期初',
settlement: '结算方式',
productName: '产品名称',
spec: '规格型号',
productCode: '产品编号',
manufacturer: '生产厂家',
unit: '单位',
openingQty: '期初数量',
openingAmount: '期初金额',
inQty: '入库数量',
inAmount: '入库金额',
outQty: '出库数量',
outAmount: '出库金额',
lossQty: '报损数量',
lossAmount: '报损金额',
endQty: '期末数量',
endAmount: '期末金额',
} as const;
/** 主表金额列 → 底部合计标签(本页底部只有金额合计)。 */
export const costFinancePsiSummaryMetrics = [
{ key: 'openingAmount', label: '期初金额', summaryLabels: ['期初总金额'] },
{ key: 'inAmount', label: '入库金额', summaryLabels: ['入库总金额'] },
{ key: 'outAmount', label: '出库金额', summaryLabels: ['出库总金额'] },
{ key: 'lossAmount', label: '报损金额', summaryLabels: ['报损总金额'] },
{ key: 'endAmount', label: '期末金额', summaryLabels: ['期末总金额'] },
] as const;
/** 快捷区实际字段(扫描):入账月份、耗材类型、院区名称。产品名称在抽屉。 */
export const costFinancePsiComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryMonth', label: '入账月份', type: 'date' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'campus', label: '院区名称', type: 'select' },
];
/**
* 高级筛选抽屉:只填主表能取到样本的字段(产品名称/规格型号/生产厂家)。
* 财务分类、耗材分类、是否期初、结算方式无列表列,禁止盲选首项。
*/
export const costFinancePsiComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'productName', type: 'text', label: '产品名称' },
{ key: 'spec', type: 'text', label: '规格型号' },
{ key: 'manufacturer', type: 'text', label: '生产厂家' },
];
/** 结果断言仅用主表可见列。 */
export const costFinancePsiComboAssertKeys = [
'productName',
'consumableType',
'spec',
'manufacturer',
] as const;
/** 主表可见业务列(不含序号);无排序控件时脚本 skip。 */
export const costFinancePsiSortColumns = [
'产品名称',
'规格型号',
'产品编号',
'生产厂家',
'耗材类型',
'单位',
'期初数量',
'入库数量',
'入库金额',
'出库数量',
'出库金额',
'报损数量',
'报损金额',
'期末数量',
] as const;
export const costFinancePsiData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/financeWithProduct',
iframeSrc: 'settel/financeWithProduct',
productNameSelector: '#form_item_goodsName',
columns: costFinancePsiColumns,
columnAliases: {
manufacturer: ['生产厂家', '器械注册人', '器械注册人-术语配置'],
},
coreTableHeaders: ['产品名称', '规格型号', '产品编号', '生产厂家', '耗材类型', '单位', '期初数量', '入库数量', '出库数量'],
summaryKeywords: ['期初总金额', '入库总金额', '出库总金额', '报损总金额', '期末总金额'],
dimensions: ['仅看带量'],
sortColumns: costFinancePsiSortColumns,
sortCasePrefix: 'STAT-CFP',
sortCaseStartIndex: 16,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '财务产品进销存',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '出库金额',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: [
'entryMonth',
'consumableType',
'campus',
'productName',
'productCode',
'spec',
'manufacturer',
],
drawerFields: costFinancePsiComboDrawerFields,
drawerFieldInputIds: {
productName: 'form_item_goodsName',
spec: 'form_item_goodsGg',
manufacturer: 'form_item_goodsMfrsName',
},
};
export const costFinancePsiSortCases = buildSortColumnCases(
'STAT-CFP',
costFinancePsiSortColumns,
16,
);
import {
buildSortColumnCases,
type CenterReportPageData,
} from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costProductRankColumns = {
statMonth: '统计月份',
campus: '院区',
consumableType: '耗材类型',
consumableCategory: '耗材分类',
costQty: '成本数量',
costAmount: '成本金额',
ratio: '占比',
dictPrice: '字典价',
productName: '产品名称',
registrant: '器械注册人-术语配置',
productSpec: '产品规格',
deptName: '科室名称',
} as const;
/** 左侧产品排名列表核心列(tableWrapperIndex=0;含维度勾选后展示的列)。 */
export const costProductRankLeftHeaders = [
'成本数量',
'成本金额',
'占比',
'字典价',
'产品名称',
'器械注册人-术语配置',
'产品规格',
] as const;
/** 右侧科室明细核心列(tableWrapperIndex=1;点选左侧行后展示)。 */
export const costProductRankDetailHeaders = ['科室名称', '成本数量', '成本金额', '占比'] as const;
export const costProductRankComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statMonth', label: '统计月份', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'consumableCategory', label: '耗材分类', type: 'select' },
];
export const costProductRankComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'isKeySupervised', type: 'select', label: '是否重点监管' },
];
export const costProductRankComboAssertKeys = ['productName', 'costAmount'] as const;
/** 左侧产品排名列表可排序列(含维度勾选后展示列;勿含右侧科室明细列)。 */
export const costProductRankLeftSortColumns = [
'成本数量',
'成本金额',
'占比',
'产品名称',
'产品规格',
'器械注册人-术语配置',
] as const;
/** 右侧科室明细可排序列(与左侧同名列须指定 tableWrapperIndex=1)。 */
export const costProductRankDetailSortColumns = ['成本数量', '成本金额', '占比'] as const;
export const costProductRankLeftSortCases = buildSortColumnCases(
'STAT-CPR',
costProductRankLeftSortColumns,
12,
);
export const costProductRankDetailSortCases = buildSortColumnCases(
'STAT-CPR',
costProductRankDetailSortColumns,
18,
);
export const costProductRankData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settle/productRank',
iframeSrc: 'settle/productRank',
productNameSelector: '#form_item_goodsName',
columns: costProductRankColumns,
coreTableHeaders: costProductRankLeftHeaders,
tableWrapperIndex: 0,
detailTableWrapperIndex: 1,
sortTableWrapperIndex: 0,
sortColumns: [...costProductRankLeftSortColumns, ...costProductRankDetailSortColumns],
sortCasePrefix: 'STAT-CPR',
sortCaseStartIndex: 12,
dimensions: ['显示注册人', '显示品规'],
mockNotExistProduct: '__NOT_EXIST_VALUE__99999',
mockFieldLabel: '统计月份',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '产品成本排名',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '产品规格',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['statMonth', 'campus', 'consumableType', 'productName', 'costAmount'],
drawerFields: costProductRankComboDrawerFields,
leftColumnSettingsToggleCandidates: ['产品名称', '器械注册人-术语配置', '产品规格', '字典价'],
detailColumnSettingsToggleCandidates: ['科室名称'],
columnSettingsToggleCandidates: ['产品名称', '科室名称'],
};
import type { CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costSettleEntryColumns = {
productName: '产品名称',
entryDate: '入账日期',
consumableType: '耗材类型',
supplierName: '进院供应商名称',
subSupplierName: '二级供应商名称',
settleType: '结算类型',
sourceOrderNo: '源单号',
campus: '院区名称',
deptName: '科室名称',
financeClassify: '财务分类',
consumableCategory: '耗材分类',
isOpeningGenerated: '是否期初生成',
onlineOfflineFlag: '线上线下标记',
isVolume: '是否带量',
volumeProject: '带量项目',
volumeContractNo: '带量合同号',
insuranceCode: '医保编码',
financeInboundOrder: '对应财务入库单',
entryQty: '入账数量',
entryAmount: '入账金额',
} as const;
/** 主表列 → 底部合计标签。 */
export const costSettleEntrySummaryMetrics = [
{ key: 'entryQty', label: '入账数量', summaryLabels: ['入账数量'] },
{ key: 'entryAmount', label: '入账金额', summaryLabels: ['入账金额'] },
] as const;
/** STAT-CSE-004:快捷区仅产品名称 / 入账日期 / 耗材类型(与 CSV 一致)。 */
export const costSettleEntryComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
];
/** STAT-CSE-004 抽屉:有列表样本才填,不写带量/医保等 CSV 未要求字段。 */
export const costSettleEntryComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'supplierName', type: 'text', label: '进院供应商名称' },
{ key: 'subSupplierName', type: 'text', label: '二级供应商名称' },
{ key: 'settleType', type: 'select', label: '结算类型' },
{ key: 'sourceOrderNo', type: 'text', label: '源单号' },
{ key: 'campus', type: 'select', label: '院区名称' },
{ key: 'deptName', type: 'select', label: '科室名称' },
{ key: 'financeClassify', type: 'cascader', label: '财务分类' },
{ key: 'consumableCategory', type: 'select', label: '耗材分类' },
{ key: 'isOpeningGenerated', type: 'select', label: '是否期初生成' },
];
export const costSettleEntryComboAssertKeys = ['productName', 'entryDate', 'consumableType', 'supplierName'] as const;
export const costSettleEntryData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/entrySettle',
iframeSrc: 'settel/entrySettle',
productNameSelector: '#form_item_goodsName',
columns: costSettleEntryColumns,
coreTableHeaders: ['产品名称', '科室名称', '院区名称', '进院供应商名称', '入账日期', '耗材类型'],
summaryKeywords: ['入账数量', '入账金额'],
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: false,
exportTaskName: '结算入账明细查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '耗材类型',
horizontalScrollDragDelta: 320,
comboSkipDrawerKeys: ['sourceOrderNo', 'subSupplierName', 'consumableCategory', 'financeClassify'],
comboSamplePickKeys: [
'productName',
'entryDate',
'consumableType',
'supplierName',
'subSupplierName',
'settleType',
'sourceOrderNo',
'campus',
'deptName',
'financeClassify',
'consumableCategory',
'isOpeningGenerated',
],
drawerFields: costSettleEntryComboDrawerFields,
firstRowSummaryMatch: {
metrics: costSettleEntrySummaryMetrics,
requiredKey: 'productName',
fields: costSettleEntryComboQuickFields,
footerKeywords: ['入账数量', '入账金额', '合计'],
absAll: true,
},
};
import type { CenterReportPageData } from './center-report-shared.types';
import type { CenterReportDrawerField } from './center-report-shared.types';
import type { DeptQuickFieldDef } from './dept-report-field-defs';
export const costSupplyClassifyColumns = {
entryMonth: '入账月份',
consumableType: '耗材类型',
classifyMode: '分类方式',
supplierName: '进院供应商名称',
subSupplierName: '二级供应商名称',
campus: '院区名称',
queryDimension: '查询维度',
subGroupDimension: '二级分组维度',
isOpeningGenerated: '是否期初生成',
settlement: '结算方式',
} as const;
export const costSupplyClassifyComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryMonth', label: '入账月份', type: 'date' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'classifyMode', label: '分类方式', type: 'select' },
{ key: 'supplierName', label: '进院供应商名称', type: 'text' },
];
export const costSupplyClassifyComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'isOpeningGenerated', type: 'select', label: '是否期初生成' },
{ key: 'settlement', type: 'select', label: '结算方式' },
];
export const costSupplyClassifyComboAssertKeys = ['entryMonth', 'consumableType', 'classifyMode', 'supplierName'] as const;
export const costSupplyClassifyData: CenterReportPageData = {
reportPath: '/spd/form/settleCost/report/settel/supply',
iframeSrc: 'settel/supply',
productNameSelector: '#form_item_goodsName',
columns: costSupplyClassifyColumns,
coreTableHeaders: ['计费', '非计费', '小计'],
dimensions: ['区分二级商'],
mockNotExistProduct: '__NOT_EXIST_SUPPLIER__99999',
mockFieldLabel: '进院供应商名称',
mockFieldInDrawer: true,
mockNotExistSupplier: '__NOT_EXIST_SUPPLIER__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: false,
exportTaskName: '供应商入账分类汇总',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '院区名称',
horizontalScrollTargetColumn: '二级供应商名称',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['entryMonth', 'consumableType', 'classifyMode', 'supplierName', 'isOpeningGenerated', 'settlement'],
drawerFields: costSupplyClassifyComboDrawerFields,
};
import type { CenterReportPageData } from './center-report-shared.types';
import {
deptReportEntryComboDrawerFields,
deptReportEntryComboQuickFields,
} from './dept-report-field-defs';
export const deptReportEntryColumns = {
productCode: '产品编号',
productName: '产品名称',
inboundQty: '入库数量',
inboundAmount: '入库金额',
billType: '单据类型',
settlement: '结算方式',
batchNo: '批号',
billMode: '单据形态',
deptName: '科室名称',
orderNo: '单号',
accountDate: '记账日期',
supplierName: '进院供应商名称',
} as const;
export const deptReportEntryData: CenterReportPageData = {
reportPath: '/spd/form/deptReport/report/dept/entry',
iframeSrc: 'dept/entry',
productNameSelector: '#form_item_goodsName',
columns: deptReportEntryColumns,
coreTableHeaders: ['产品编号', '产品名称', '入库数量', '入库金额', '耗材类型'],
summaryKeywords: ['入库品种', '入库单元数', '入库数量', '入库金额'],
forbiddenSummaryKeywords: ['出库品种', '合计出库金额'],
dimensions: ['区分包装', '区分批号', '区分进院供应商'],
drawerFields: deptReportEntryComboDrawerFields,
subTableHeaders: ['入库单号', '记账日期', '单据类型', '查看'],
subTableOrderNoKeywords: ['入库单号', '单号'],
detailTabKeywords: ['详情', '入库', '单据'],
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
columnSettingsToggleCandidates: ['产品俗称', '线上线下标记'],
horizontalScrollAnchorColumn: '产品编号',
horizontalScrollTargetColumn: '医保编码',
horizontalScrollDragDelta: 320,
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
quantityColumnLabels: ['入库数量', '数量'],
mainQuantitySampleKey: 'inboundQty',
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: true,
hasBatchPrint: false,
hasFilterToggle: false,
exportTaskName: '科室入库汇总报表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
comboSkipDrawerKeys: ['orderNo', 'storageArea', 'sourceWarehouse', 'chargeable'],
comboSampleScrollColumns: ['结算方式', '批号', '科室名称', '单号', '进院供应商名称'],
comboSamplePickKeys: ['productName', 'accountDate', 'billType', 'deptName', 'dept', 'orderNo', 'settlement'],
comboSampleFieldAliases: { dept: 'deptName' },
comboSampleMaxRowScan: 5,
columnAliases: { deptName: ['科室名称', '科室'], orderNo: ['单号', '入库单号'] },
};
export { deptReportEntryComboQuickFields, deptReportEntryComboDrawerFields };
export const deptReportEntryComboAssertKeys = ['productCode', 'productName', 'inboundQty', 'settlement'] as const;
import type { CenterReportDrawerField } from './center-report-shared.types';
/** 快捷区字段(与 CSV 组合查询步骤一致)。 */
export type DeptQuickFieldDef = {
key: string;
label: string;
type: 'text' | 'select' | 'date' | 'cascader';
};
/** 快捷区与高级筛选抽屉同名字段(打开抽屉时应自动带入)。 */
export type QuickDrawerSyncField = {
quickLabel: string;
drawerLabel: string;
type: 'text' | 'date' | 'select' | 'cascader';
sampleKey?: string;
};
/** 产品名称 + 记账日期(明细/汇总类页面抽屉重叠字段)。 */
export const standardProductNameDateSyncFields: readonly QuickDrawerSyncField[] = [
{ quickLabel: '产品名称', drawerLabel: '产品名称', type: 'text', sampleKey: 'productName' },
{ quickLabel: '记账日期', drawerLabel: '记账日期', type: 'date', sampleKey: 'accountDate' },
];
/** 后勤物资:物资名称 + 记账日期 + 物资分类(中心库 cascader)。 */
export const centerLmmMaterialSyncFields: readonly QuickDrawerSyncField[] = [
{ quickLabel: '物资名称', drawerLabel: '物资名称', type: 'text', sampleKey: 'materialName' },
{ quickLabel: '记账日期', drawerLabel: '记账日期', type: 'date', sampleKey: 'accountDate' },
{ quickLabel: '物资分类', drawerLabel: '物资分类', type: 'cascader', sampleKey: 'consumableCategory' },
];
/** 后勤物资:科室页物资分类为 select。 */
export const deptLmmMaterialSyncFields: readonly QuickDrawerSyncField[] = [
{ quickLabel: '物资名称', drawerLabel: '物资名称', type: 'text', sampleKey: 'materialName' },
{ quickLabel: '记账日期', drawerLabel: '记账日期', type: 'date', sampleKey: 'accountDate' },
{ quickLabel: '物资分类', drawerLabel: '物资分类', type: 'select', sampleKey: 'materialCategory' },
];
/** 中心库产品进销存:入账日期 + 院区 + 耗材类型。 */
export const centerReportPsiSyncFields: readonly QuickDrawerSyncField[] = [
{ quickLabel: '入账日期', drawerLabel: '入账日期', type: 'date', sampleKey: 'entryDate' },
{ quickLabel: '院区名称', drawerLabel: '院区名称', type: 'select', sampleKey: 'campus' },
{ quickLabel: '耗材类型', drawerLabel: '耗材类型', type: 'select', sampleKey: 'consumableType' },
];
/** 科室产品进销存:入账日期 + 院区 + 科室。 */
export const deptReportPsiSyncFields: readonly QuickDrawerSyncField[] = [
{ quickLabel: '入账日期', drawerLabel: '入账日期', type: 'date', sampleKey: 'entryDate' },
{ quickLabel: '院区名称', drawerLabel: '院区名称', type: 'select', sampleKey: 'campus' },
{ quickLabel: '科室名称', drawerLabel: '科室名称', type: 'select', sampleKey: 'dept' },
];
export const centerReportPsiComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
];
/** STAT-DOD-004 抽屉字段(科室出入库明细)。 */
export const deptReportSheetComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'dept', type: 'select', label: '科室' },
{ key: 'storageArea', type: 'select', label: '库区名称' },
{ key: 'billMode', type: 'select', label: '单据形态' },
{ key: 'consumableCategory', type: 'cascader', label: '耗材分类' },
{ key: 'batchNo', type: 'text', label: '批号' },
{ key: 'barcode', type: 'text', label: '条码号' },
{ key: 'orderNo', type: 'text', label: '单号' },
{ key: 'supplier', type: 'text', label: '进院供应商' },
{ key: 'settlement', type: 'select', label: '结算方式' },
{ key: 'remark', type: 'text', label: '备注' },
{ key: 'spec', type: 'text', label: '规格型号' },
{ key: 'operator', type: 'select', label: '制单人' },
{ key: 'statDimension', type: 'select', label: '统计维度' },
{ key: 'chargeable', type: 'select', label: '是否收费' },
{ key: 'focusControl', type: 'select', label: '是否重点管控' },
{ key: 'focusControlType', type: 'select', label: '重点管控分类' },
{ key: 'insuranceCode', type: 'text', label: '医保编码' },
];
export const deptReportSheetComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'accountDate', label: '记账日期', type: 'date' },
{ key: 'billType', label: '单据类型', type: 'select' },
];
/** STAT-DES-004 */
export const deptReportEntryComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'dept', type: 'select', label: '科室' },
{ key: 'storageArea', type: 'select', label: '库区名称' },
{ key: 'billMode', type: 'select', label: '单据形态' },
{ key: 'sourceWarehouse', type: 'select', label: '来源库房' },
{ key: 'orderNo', type: 'text', label: '单号' },
{ key: 'settlement', type: 'select', label: '结算方式' },
{ key: 'supplierName', type: 'text', label: '进院供应商名称' },
{ key: 'chargeable', type: 'select', label: '产品是否收费' },
];
export const deptReportEntryComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'accountDate', label: '记账日期', type: 'date' },
{ key: 'billType', label: '单据类型', type: 'select' },
];
/** STAT-DOS-004 */
export const deptReportOutComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'dept', type: 'select', label: '科室' },
{ key: 'storageArea', type: 'select', label: '库区名称' },
{ key: 'billMode', type: 'select', label: '单据形态' },
{ key: 'batchNo', type: 'text', label: '批号' },
{ key: 'orderNo', type: 'text', label: '单号' },
{ key: 'outboundTarget', type: 'text', label: '出库目标' },
{ key: 'settlement', type: 'select', label: '结算方式' },
{ key: 'supplierName', type: 'text', label: '进院供应商名称' },
{ key: 'chargeable', type: 'select', label: '产品是否收费' },
];
export const deptReportOutComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'accountDate', label: '记账日期', type: 'date' },
{ key: 'billType', label: '单据类型', type: 'select' },
];
/** STAT-DPS-004 */
export const deptReportPsiComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'entryDate', label: '入账日期', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'dept', label: '科室名称', type: 'select' },
];
export const deptReportPsiComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'consumableType', type: 'select', label: '耗材类型' },
{ key: 'consumableCategory', type: 'cascader', label: '耗材分类' },
{ key: 'productName', type: 'text', label: '产品名称' },
{ key: 'spec', type: 'text', label: '规格型号' },
{ key: 'manufacturer', type: 'text', label: '生产厂家' },
];
/** STAT-DLS-006 */
export const deptReportLmmSheetComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'materialName', label: '物资名称', type: 'text' },
{ key: 'accountDate', label: '记账日期', type: 'date' },
{ key: 'materialCategory', label: '物资分类', type: 'cascader' },
];
export const deptReportLmmSheetComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'orderNo', type: 'text', label: '单号' },
{ key: 'campus', type: 'select', label: '院区名称' },
{ key: 'dept', type: 'select', label: '科室名称' },
{ key: 'billType', type: 'select', label: '单据类型' },
{ key: 'generationStyle', type: 'select', label: '生成方式' },
{ key: 'supplier', type: 'text', label: '进院供应商' },
{ key: 'purchaser', type: 'text', label: '采购员' },
];
/** STAT-DTR-002 */
export const deptReportTurnoverComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statPeriod', label: '统计周期', type: 'select' },
{ key: 'dept', label: '科室', type: 'select' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'spec', label: '规格型号', type: 'text' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
];
import type { CenterReportPageData } from './center-report-shared.types';
import { lmmDeptSummaryMatch } from './center-report-shared.types';
import {
deptReportLmmSheetComboDrawerFields,
deptReportLmmSheetComboQuickFields,
} from './dept-report-field-defs';
export const deptReportLmmSheetColumns = {
materialCode: '物资编号',
materialName: '物资名称',
accountDate: '记账日期',
materialCategory: '物资分类',
billType: '单据类型',
inboundQty: '入库数量',
outboundQty: '出库数量',
batchNo: '批号',
amount: '金额',
orderNo: '单号',
campus: '院区名称',
deptName: '科室名称',
generationStyle: '生成方式',
supplier: '进院供应商',
purchaser: '采购员',
} as const;
export const deptReportLmmSheetData: CenterReportPageData = {
reportPath: '/spd/form/deptReport/report/dept/lmmSheet',
iframeSrc: 'dept/lmmSheet',
productNameSelector: '#form_item_goodsName',
columns: deptReportLmmSheetColumns,
columnAliases: {
materialName: ['物资名称', '产品名称'],
materialCode: ['物资编号', '物资编码'],
materialCategory: ['物资分类', '耗材分类'],
deptName: ['科室名称', '科室'],
},
coreTableHeaders: ['物资编号', '物资名称', '来源/目标', '单据类型', '物资分类', '结算方式'],
summaryKeywords: [...lmmDeptSummaryMatch.metricLabels],
summaryMatch: lmmDeptSummaryMatch,
drawerFields: deptReportLmmSheetComboDrawerFields,
mockNotExistMaterial: '__NOT_EXIST_MATERIAL__99999',
mockNotExistProduct: '__NOT_EXIST_MATERIAL__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasFilterToggle: false,
exportTaskName: '科室出入库明细(后勤)报表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
comboSampleScrollColumns: ['单号', '院区名称', '科室名称', '单据类型', '生成方式', '进院供应商', '采购员'],
comboSamplePickKeys: ['materialName', 'accountDate', 'materialCategory', 'orderNo', 'campus', 'dept', 'deptName', 'billType', 'generationStyle', 'supplier'],
comboSampleFieldAliases: { dept: 'deptName' },
comboSampleMaxRowScan: 5,
};
export { deptReportLmmSheetComboQuickFields, deptReportLmmSheetComboDrawerFields };
export const deptReportLmmSheetComboAssertKeys = [
'materialCode',
'materialName',
'accountDate',
'materialCategory',
'billType',
] as const;
import type { CenterReportPageData } from './center-report-shared.types';
import {
deptReportOutComboDrawerFields,
deptReportOutComboQuickFields,
} from './dept-report-field-defs';
export const deptReportOutColumns = {
productCode: '产品编号',
productName: '产品名称',
outboundQty: '出库数量',
outboundAmount: '出库金额',
billType: '单据类型',
settlement: '结算方式',
batchNo: '批号',
billMode: '单据形态',
deptName: '科室名称',
orderNo: '单号',
accountDate: '记账日期',
supplierName: '进院供应商名称',
} as const;
export const deptReportOutData: CenterReportPageData = {
reportPath: '/spd/form/deptReport/report/dept/out',
iframeSrc: 'dept/out',
productNameSelector: '#form_item_goodsName',
columns: deptReportOutColumns,
coreTableHeaders: ['产品编号', '产品名称', '出库数量', '出库金额', '耗材类型'],
summaryKeywords: ['出库数量', '合计出库金额'],
forbiddenSummaryKeywords: ['入库品种', '入库数量'],
dimensions: ['区分包装', '区分批号', '区分进院供应商'],
drawerFields: deptReportOutComboDrawerFields,
subTableHeaders: ['出库单号', '记账日期', '单据类型', '查看'],
subTableOrderNoKeywords: ['出库单号', '单号'],
detailTabKeywords: ['详情', '出库', '单据'],
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
columnSettingsToggleCandidates: ['产品俗称', '线上线下标记'],
horizontalScrollAnchorColumn: '产品编号',
horizontalScrollTargetColumn: '医保编码',
horizontalScrollDragDelta: 320,
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
quantityColumnLabels: ['出库数量', '数量'],
mainQuantitySampleKey: 'outboundQty',
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: true,
hasBatchPrint: false,
hasFilterToggle: false,
exportTaskName: '科室出库汇总报表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
comboSampleScrollColumns: ['结算方式', '单据形态', '批号', '科室名称', '单号', '进院供应商名称'],
comboSamplePickKeys: ['productName', 'accountDate', 'billType', 'deptName', 'dept', 'orderNo', 'settlement', 'billMode', 'batchNo'],
comboSampleFieldAliases: { dept: 'deptName' },
comboSampleMaxRowScan: 5,
columnAliases: { deptName: ['科室名称', '科室'], orderNo: ['单号', '出库单号'] },
};
export { deptReportOutComboQuickFields, deptReportOutComboDrawerFields };
export const deptReportOutComboAssertKeys = ['productCode', 'productName', 'outboundQty', 'settlement'] as const;
import type { CenterReportPageData } from './center-report-shared.types';
import {
deptReportPsiComboDrawerFields,
deptReportPsiComboQuickFields,
} from './dept-report-field-defs';
export const deptReportPsiColumns = {
productCode: '产品编号',
productName: '产品名称',
spec: '规格型号',
consumableType: '耗材类型',
consumableCategory: '耗材分类',
manufacturer: '生产厂家',
campus: '院区名称',
deptName: '科室名称',
openingQty: '期初数量',
netInQty: '净入数量',
netOutQty: '净出数量',
} as const;
export const deptReportPsiData: CenterReportPageData = {
reportPath: '/spd/form/deptReport/report/dept/psi',
iframeSrc: 'dept/psi',
productNameSelector: '#form_item_branchName',
columns: deptReportPsiColumns,
coreTableHeaders: ['产品编号', '产品名称', '规格型号', '期初数量', '净入数量', '净出数量', '期末数量'],
drawerFields: deptReportPsiComboDrawerFields,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasFilterToggle: false,
exportTaskName: '科室产品进销存报表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
comboSampleScrollColumns: ['院区名称', '科室名称', '耗材类型', '耗材分类', '规格型号', '生产厂家'],
comboSamplePickKeys: ['campus', 'dept', 'deptName', 'consumableType', 'consumableCategory', 'productName', 'spec', 'manufacturer'],
comboSampleFieldAliases: { dept: 'deptName' },
comboSampleMaxRowScan: 5,
columnAliases: { deptName: ['科室名称', '科室'] },
};
export { deptReportPsiComboQuickFields, deptReportPsiComboDrawerFields, deptReportPsiSyncFields } from './dept-report-field-defs';
export const deptReportPsiComboAssertKeys = [
'productCode',
'productName',
'spec',
'consumableType',
'consumableCategory',
'manufacturer',
] as const;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment