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 type { CenterReportPageData } from './center-report-shared.types';
import { deptSheetSummaryMatch } from './center-report-shared.types';
import {
deptReportSheetComboDrawerFields,
deptReportSheetComboQuickFields,
} from './dept-report-field-defs';
export const deptReportSheetColumns = {
deptName: '科室名称',
productCode: '产品编号',
productName: '产品名称',
accountDate: '记账日期',
billType: '单据类型',
batchNo: '批号',
orderNo: '单号',
spec: '规格型号',
settlement: '结算方式',
inboundQty: '入库数量',
outboundQty: '出库数量',
amount: '金额',
billMode: '单据形态',
barcode: '条码号',
supplier: '进院供应商',
remark: '备注',
operator: '制单人',
statDimension: '统计维度',
chargeable: '是否收费',
focusControl: '是否重点管控',
focusControlType: '重点管控分类',
insuranceCode: '医保编码',
consumableCategory: '耗材分类',
} as const;
export const deptReportSheetData: CenterReportPageData = {
reportPath: '/spd/form/deptReport/report/dept/sheet',
iframeSrc: 'dept/sheet',
productNameSelector: '#form_item_goodsName',
columns: deptReportSheetColumns,
columnAliases: { orderNo: ['单号', '单据号'], deptName: ['科室名称', '科室'] },
coreTableHeaders: ['科室名称', '产品编号', '产品名称', '单据类型', '批号', '入库数量', '出库数量', '单号'],
summaryKeywords: [...deptSheetSummaryMatch.metricLabels],
summaryMatch: deptSheetSummaryMatch,
drawerFields: deptReportSheetComboDrawerFields,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
columnSettingsToggleCandidates: ['注册证号', '生产日期'],
horizontalScrollAnchorColumn: '产品编号',
horizontalScrollTargetColumn: '医保编码',
horizontalScrollDragDelta: 320,
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: [
'productName', 'accountDate', 'billType', 'deptName', 'dept', 'batchNo', 'orderNo',
'spec', 'settlement', 'operator', 'consumableCategory', 'barcode', 'supplier',
],
comboSampleFieldAliases: { dept: 'deptName' },
comboSampleMaxRowScan: 2,
drawerFieldInputIds: {
batchNo: 'form_item_batchCode',
barcode: 'form_item_barcode',
orderNo: 'form_item_orderNo',
supplier: 'form_item_provName',
spec: 'form_item_goodsRegCert',
insuranceCode: 'form_item_miCode',
},
};
export { deptReportSheetComboQuickFields, deptReportSheetComboDrawerFields };
export const deptReportSheetComboAssertKeys = [
'productCode',
'productName',
'deptName',
'billType',
'batchNo',
'orderNo',
'spec',
'settlement',
'operator',
'consumableCategory',
] as const;
import { buildSortColumnCases, type CenterReportPageData } from './center-report-shared.types';
import { deptReportTurnoverComboQuickFields } from './dept-report-field-defs';
export const deptReportTurnoverColumns = {
productCode: '产品编号',
productName: '产品名称',
spec: '规格型号',
consumableType: '耗材类型',
openingQty: '期初数量',
closingQty: '期末数量',
avgStock: '平均库存数量',
outboundQty: '出库数量',
turnoverDays: '库存周转天数',
turnoverTimes: '库存周转次数',
turnoverRate: '库存周转率',
statPeriod: '统计周期',
dept: '科室',
} as const;
export const deptReportTurnoverSortColumns = [
'期初数量',
'期末数量',
'平均库存数量',
'出库数量',
'库存周转天数',
'库存周转次数',
'库存周转率',
] as const;
export const deptReportTurnoverData: CenterReportPageData = {
reportPath: '/spd/form/deptReport/report/dept/deptPro',
iframeSrc: 'dept/deptPro',
productNameSelector: '#table_search_form_goodsName',
columns: deptReportTurnoverColumns,
coreTableHeaders: ['产品编号', '产品名称', '规格型号', '生产厂家', '耗材类型'],
extraTableHeaders: ['期初数量', '期末数量', '平均库存数量', '出库数量', '库存周转天数', '库存周转次数', '库存周转率'],
sortColumns: deptReportTurnoverSortColumns,
sortCasePrefix: 'STAT-DTR',
sortCaseStartIndex: 6,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasFilterToggle: true,
exportTaskName: '科室产品周转率报表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['生产厂家'],
};
export { deptReportTurnoverComboQuickFields };
export const deptReportTurnoverSortCases = buildSortColumnCases(
'STAT-DTR',
deptReportTurnoverSortColumns,
6,
);
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 excCostColumns = {
his: 'HIS流水号',
field: '起止时间',
field2: '患者信息',
field3: '异常情况',
campus: '院区',
stockDept: '库存科室',
id: '住院号/患者ID',
field4: '患者姓名',
field5: '计退费时间',
chargeDept: '计费科室',
field6: '计/退费',
field7: '计费金额',
field8: '唯一码',
orderNo: '单号',
field9: '记账时间',
productCode: '产品编号',
productName: '产品名称',
spec: '规格型号',
field10: '单位',
field11: '结算单价',
} as const;
export const excCostComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '起止时间', type: 'date' },
{ key: 'his', label: 'HIS流水号', type: 'text' },
{ key: 'field2', label: '患者信息', type: 'text' },
];
export const excCostComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '起止时间', type: 'date' },
{ key: 'his', label: 'HIS流水号', type: 'text' },
{ key: 'field2', label: '患者信息', type: 'text' },
];
export const excCostComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'his', type: 'text', label: 'HIS流水号' },
{ key: 'field2', type: 'text', label: '患者信息' },
{ key: 'field3', type: 'select', label: '异常情况' },
{ key: 'campus', type: 'select', label: '院区' },
{ key: 'stockDept', type: 'select', label: '库存科室' },
];
export const excCostComboAssertKeys = ['his', 'field2', 'field5'] as const;
export const excCostDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '起止时间', type: 'date' },
{ key: 'his', label: 'HIS流水号', type: 'text' },
{ key: 'field2', label: '患者信息', type: 'text' },
];
export const excCostDomainAssertKeys = ['field', 'his', 'field2'] as const;
export const excCostData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/abnormalReport/report/abnormal/cost',
iframeSrc: 'abnormal/cost',
productNameSelector: '#form_item_goodsName',
columns: excCostColumns,
coreTableHeaders: ['HIS流水号', '住院号/患者ID', '患者姓名', '计退费时间', '计费科室', '库存科室', '计/退费', '计费金额'],
columnAliases: {
field2: ['患者姓名'],
},
horizontalScrollAnchorColumn: 'HIS流水号',
horizontalScrollTargetColumn: '异常情况',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_HIS_NO__99999',
mockFieldLabel: 'HIS流水号',
drawerResetFieldLabel: 'HIS流水号',
drawerResetFieldKey: 'his',
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,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['计退费时间', '患者姓名', '异常情况', '库存科室'],
comboSamplePickKeys: ['his', 'field2', 'field3', 'field4', 'field5', 'campus', 'stockDept'],
comboSampleDateFromKey: { targetKey: 'field', sourceKey: 'field5' },
comboSampleFieldAliases: { field2: 'field4' },
comboSampleMaxRowScan: 5,
quickFieldInputIds: {
his: 'form_item_jfId',
field2: 'form_item_cname',
},
drawerFields: excCostComboDrawerFields,
};
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 excLowColumns = {
statDate: '统计日期',
campus: '院区',
deptName: '科室',
his: 'HIS收费编码',
his2: 'HIS项目名称',
field: '净计费数量',
productCode: '产品编号',
productName: '产品名称',
spec: '规格型号',
field2: '器械注册人-术语配置',
field3: '单位',
field4: '净消耗数量',
} as const;
export const excLowComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const excLowComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const excLowComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'campus', type: 'select', label: '院区' },
{ key: 'deptName', type: 'select', label: '科室' },
];
export const excLowComboAssertKeys = ['statDate', 'campus'] as const;
export const excLowDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const excLowDomainAssertKeys = ['statDate', 'campus', 'deptName'] as const;
export const excLowData: CenterReportPageData & {
mockFieldLabel?: string;
mockPreferFutureDate?: boolean;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
columnSettingsToggleAssertHeaders?: Readonly<Record<string, string>>;
} = {
reportPath: '/spd/form/abnormalReport/report/abnormal/low',
iframeSrc: 'abnormal/low',
productNameSelector: '#form_item_campus',
columns: excLowColumns,
coreTableHeaders: ['HIS收费编码', 'HIS项目名称', '净计费数量', '产品编号', '产品名称', '规格型号', '器械注册人-术语配置', '单位'],
columnAliases: {
deptName: ['请领科室', '科室名称'],
},
horizontalScrollAnchorColumn: 'HIS收费编码',
horizontalScrollTargetColumn: '净消耗数量',
horizontalScrollDragDelta: 320,
// 本页快捷区仅有:统计日期 / 院区 / 科室;空列表用未来可选统计日期(明日等)构造无匹配
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '统计日期',
mockPreferFutureDate: true,
drawerResetFieldLabel: '院区',
drawerResetFieldKey: 'campus',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: false,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '低值计费接口差异统计',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
// 双行合并表头:列设置勾选的是分组列,断言落到末行叶列
columnSettingsToggleCandidates: ['HIS计费情况', 'SPD消耗情况'],
columnSettingsToggleAssertHeaders: {
HIS计费情况: 'HIS收费编码',
SPD消耗情况: '产品编号',
},
comboSampleScrollColumns: ['科室'],
comboSamplePickKeys: ['statDate', 'campus', 'deptName'],
comboSampleMaxRowScan: 5,
drawerFields: excLowComboDrawerFields,
};
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 excLowniColumns = {
statDate: '统计日期',
campus: '院区',
deptName: '科室',
field: '有差异',
his: 'HIS收费编码',
his2: 'HIS项目名称',
field2: '净计费数量',
productCode: '产品编号',
productName: '产品名称',
spec: '规格型号',
field3: '器械注册人-术语配置',
field4: '单位',
field5: '净消耗数量',
} as const;
export const excLowniComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const excLowniComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const excLowniComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'campus', type: 'select', label: '院区' },
{ key: 'deptName', type: 'select', label: '科室' },
{ key: 'field', type: 'text', label: '有差异' },
];
export const excLowniComboAssertKeys = ['statDate', 'campus'] as const;
export const excLowniDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const excLowniDomainAssertKeys = ['statDate', 'campus', 'deptName'] as const;
export const excLowniData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/abnormalReport/report/abnormal/lowNoInterface',
iframeSrc: 'abnormal/lowNoInterface',
productNameSelector: '#form_item_campus',
columns: excLowniColumns,
coreTableHeaders: ['HIS收费编码', 'HIS项目名称', '净计费数量', '产品编号', '产品名称', '规格型号', '器械注册人-术语配置', '单位'],
columnAliases: {
field5: ['采购计划号'],
deptName: ['请领科室', '科室名称'],
},
horizontalScrollAnchorColumn: 'HIS收费编码',
horizontalScrollTargetColumn: '净消耗数量',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '统计日期',
mockNotExistCode: '__NOT_EXIST_HIS__99999',
drawerResetFieldLabel: '院区',
drawerResetFieldKey: 'campus',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: false,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '低值计费消耗差异统计',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
// 双行合并表头:列设置勾选分组列,断言落到末行叶列
columnSettingsToggleCandidates: ['HIS计费情况', 'SPD消耗情况'],
columnSettingsToggleAssertHeaders: {
HIS计费情况: 'HIS收费编码',
SPD消耗情况: '产品编号',
},
comboSampleScrollColumns: ['有差异'],
comboSamplePickKeys: ['statDate', 'campus', 'deptName', 'field'],
comboSampleMaxRowScan: 5,
drawerFields: excLowniComboDrawerFields,
};
/**
* 数据层入口:页面差异用 data/{page}.data.ts,公共契约在此导出。
* 用例标题带 STAT-xxx 时,fixtures 会自动写入 caseId annotation。
*/
export { spdData } from './test-data';
export {
buildSortColumnCases,
pickSortSampleCases,
type CenterReportDrawerField,
type CenterReportPageData,
type SummaryMatchProfile,
} from './center-report-shared.types';
export type { DeptQuickFieldDef, QuickDrawerSyncField } from './dept-report-field-defs';
export { caseTitle, extractCaseId } from '../core/case-meta';
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 invoiceBalanceStatusColumns = {
field: '结算单号',
field2: '结算月份',
supplierName: '进院供应商',
field3: '结算数量',
field4: '结算金额',
field5: '结算单状态',
field6: '制单时间',
field7: '是否交发票',
field8: '发票号',
field9: '已开票金额',
field10: '待开票金额',
field11: '核对状态',
field12: '已核对金额',
field13: '待核对金额',
field14: '结算单标签',
field15: '结算单备注',
} as const;
export const invoiceBalanceStatusComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '结算单号', type: 'text' },
{ key: 'field2', label: '结算月份', type: 'date' },
{ key: 'supplierName', label: '进院供应商', type: 'select' },
];
export const invoiceBalanceStatusComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const invoiceBalanceStatusComboAssertKeys = ['field', 'field4'] as const;
export const invoiceBalanceStatusDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '结算单号', type: 'text' },
];
export const invoiceBalanceStatusDomainAssertKeys = ['field', 'field4'] as const;
export const invoiceBalanceStatusData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/settleInvoice/report/settleInvoice/balanceInvoice',
iframeSrc: 'settleInvoice/balanceInvoice',
productNameSelector: '#form_item_provId',
columns: invoiceBalanceStatusColumns,
coreTableHeaders: ['结算单号', '进院供应商', '结算月份', '结算数量', '结算金额', '结算单状态', '制单时间', '是否交发票'],
columnAliases: {
supplierName: ['进院供应商名称'],
field5: ['采购计划号'],
},
sortColumns: ['结算单号', '进院供应商', '结算月份', '结算数量', '结算金额', '制单时间', '发票号', '已开票金额', '待开票金额', '已核对金额', '待核对金额', '结算单标签'],
sortCasePrefix: 'STAT-IBL',
sortCaseStartIndex: 20,
horizontalScrollAnchorColumn: '结算单号',
horizontalScrollTargetColumn: '进院供应商',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_SETTLE_NO__99999',
mockFieldLabel: '结算单号',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
printRequiresDetailSelection: true,
hasFilterToggle: false,
exportTaskName: '结算单发票状态查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['进院供应商'],
comboSamplePickKeys: ['field', 'field4'],
drawerFields: invoiceBalanceStatusComboDrawerFields,
};
export const invoiceBalanceStatusSortColumns = ['结算单号', '进院供应商', '结算月份', '结算数量', '结算金额', '制单时间', '发票号', '已开票金额', '待开票金额', '已核对金额', '待核对金额', '结算单标签'] as const;
export const invoiceBalanceStatusSortCases = buildSortColumnCases(
'STAT-IBL',
invoiceBalanceStatusSortColumns,
9,
);
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 invoiceProvClassifyColumns = {
field: '归档日期',
classifyMode: '分类方式',
supplierName: '进院供应商名称',
consumableType: '耗材类型',
} as const;
export const invoiceProvClassifyComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '归档日期', type: 'date' },
{ key: 'classifyMode', label: '分类方式', type: 'select' },
{ key: 'supplierName', label: '进院供应商名称', type: 'text' },
];
export const invoiceProvClassifyComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'consumableType', type: 'select', label: '耗材类型' },
];
export const invoiceProvClassifyComboAssertKeys = ['supplierName', 'classifyMode'] as const;
export const invoiceProvClassifyDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '归档日期', type: 'date' },
{ key: 'classifyMode', label: '分类方式', type: 'select' },
];
export const invoiceProvClassifyDomainAssertKeys = ['supplierName', 'classifyMode'] as const;
export const invoiceProvClassifyData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/settleInvoice/report/settleInvoice/provInvoice',
iframeSrc: 'settleInvoice/provInvoice',
productNameSelector: '#form_item_provId',
columns: invoiceProvClassifyColumns,
coreTableHeaders: ['进院供应商名称', '归档日期', '分类方式', '耗材类型'],
columnAliases: {
supplierName: ['进院供应商'],
},
horizontalScrollAnchorColumn: '归档日期',
horizontalScrollTargetColumn: '耗材类型',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_SUPPLIER__99999',
mockFieldLabel: '进院供应商名称',
drawerResetFieldLabel: '耗材类型',
drawerResetFieldKey: 'consumableType',
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,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['耗材类型'],
comboSamplePickKeys: ['supplierName', 'classifyMode', 'consumableType'],
drawerFields: invoiceProvClassifyComboDrawerFields,
};
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 invoiceSettleColumns = {
campus: '院区名称',
field: '结算月份',
supplierName: '进院供应商名称',
isVolume: '是否带量',
field2: '线上线下',
supplierName2: '进院供应商',
hrp: 'HRP供应商编码',
field3: '入账金额',
field4: '结算金额',
field5: '已归档金额',
field6: '当期归档金额',
field7: '挂账金额',
field8: '未归档金额',
} as const;
export const invoiceSettleComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '结算月份', type: 'date' },
{ key: 'supplierName', label: '进院供应商名称', type: 'select' },
{ key: 'campus', label: '院区名称', type: 'select' },
];
export const invoiceSettleComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'isVolume', type: 'select', label: '是否带量' },
{ key: 'field2', type: 'select', label: '线上线下' },
];
export const invoiceSettleComboAssertKeys = ['supplierName', 'field4'] as const;
export const invoiceSettleDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '结算月份', type: 'date' },
{ key: 'supplierName', label: '进院供应商名称', type: 'select' },
];
export const invoiceSettleDomainAssertKeys = ['supplierName', 'field4'] as const;
export const invoiceSettleData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/settleInvoice/report/settleInvoice/invoice',
iframeSrc: 'settleInvoice/invoice',
productNameSelector: '#form_item_provId',
columns: invoiceSettleColumns,
coreTableHeaders: ['结算月份', '进院供应商', 'HRP供应商编码', '入账金额', '结算金额', '已归档金额', '当期归档金额', '挂账金额'],
columnAliases: {
supplierName: ['进院供应商'],
field5: ['采购计划号'],
},
sortColumns: ['结算月份', '进院供应商', 'HRP供应商编码', '入账金额', '结算金额', '已归档金额', '当期归档金额', '挂账金额', '未归档金额'],
sortCasePrefix: 'STAT-ISV',
sortCaseStartIndex: 20,
horizontalScrollAnchorColumn: '结算月份',
horizontalScrollTargetColumn: '院区名称',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_SUPPLIER__99999',
mockFieldLabel: '结算月份',
mockDateStart: '2035-01',
mockDateEnd: '2035-02',
drawerResetFieldLabel: '是否带量',
drawerResetFieldKey: 'isVolume',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: true,
hasBatchPrint: false,
hasToolbarPrint: true,
subTableHeaders: ['结算单号', '发票号', '开票金额', '查看'],
subTableOrderNoKeywords: ['结算单号', '单号'],
detailTabKeywords: ['详情', '结算', '发票'],
hasFilterToggle: false,
exportTaskName: '结算开票查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['线上线下'],
comboSampleScrollColumns: ['院区名称'],
comboSamplePickKeys: ['supplierName', 'field4', 'isVolume', 'field2'],
drawerFields: invoiceSettleComboDrawerFields,
};
export const invoiceSettleSortColumns = ['结算月份', '进院供应商', 'HRP供应商编码', '入账金额', '结算金额', '已归档金额', '当期归档金额', '挂账金额', '未归档金额'] as const;
export const invoiceSettleSortCases = buildSortColumnCases(
'STAT-ISV',
invoiceSettleSortColumns,
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 type OpsCheckTableSectionTitle = '中心库业务单据' | '科室库业务单据';
export const opsCheckColumns = {
campus: '院区',
field: '统计时间',
billType: '单据类型',
settleType: '结算类型',
field2: '流水数据行',
field3: '入账数据行',
field4: '数据行差额',
field5: '流水数量',
field6: '入账数量',
field7: '入账数量差额',
field8: '流水金额',
field9: '入账金额',
field10: '入账金额差额',
} as const;
export const opsCheckComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '统计时间', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
];
export const opsCheckComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '统计时间', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
];
export const opsCheckComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'campus', type: 'select', label: '院区' },
];
export const opsCheckComboAssertKeys = ['field', 'campus'] as const;
export const opsCheckDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '统计时间', type: 'date' },
{ key: 'campus', label: '院区', type: 'select' },
];
export const opsCheckDomainAssertKeys = ['field', 'campus'] as const;
export const opsCheckData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
tableSections?: readonly { title: OpsCheckTableSectionTitle; wrapperIndex: number }[];
} = {
reportPath: '/spd/form/devOps/report/devOps/check',
iframeSrc: 'devOps/check',
productNameSelector: '#form_item_campus',
columns: opsCheckColumns,
coreTableHeaders: ['单据类型', '结算类型', '流水数据行', '入账数据行', '数据行差额', '流水数量', '入账数量', '入账数量差额'],
columnAliases: {
field5: ['采购计划号'],
},
horizontalScrollAnchorColumn: '统计时间',
horizontalScrollTargetColumn: '院区',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_DEPT__99999',
mockFieldLabel: '统计时间',
drawerResetFieldLabel: '院区',
drawerResetFieldKey: 'campus',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: false,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '入账核对查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['单据类型', '结算类型', '流水数量', '流水数据行'],
/** 双表区块:中心库(上)/ 科室库(下),各自独立列设置 */
tableSections: [
{ title: '中心库业务单据', wrapperIndex: 0 },
{ title: '科室库业务单据', wrapperIndex: 1 },
],
comboSampleScrollColumns: ['院区'],
comboSamplePickKeys: ['field', 'campus'],
comboSampleMaxRowScan: 5,
drawerFields: opsCheckComboDrawerFields,
};
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 polConsumerColumns = {
volumeProject: '带量项目',
field: '任务名称',
field2: '消耗日期',
field3: '带量项目合同号',
field4: '带量项目名称',
field5: '带量类别',
field6: '状态',
field7: '计划开始日期',
field8: '计划结束日期',
field9: '任务数量',
field10: '初始完成量',
field11: '产品编码',
productName: '产品名称',
spec: '规格型号',
field12: '器械注册人-术语配置',
consumableType: '耗材类型',
field13: '单位',
27: '27位医保编码',
field14: '注册证号',
field15: '耗材一级分类',
field16: '耗材二级分类',
consumableCategory: '耗材分类',
field17: '财务一级分类',
field18: '财务二级分类',
financeClassify: '财务分类',
field19: '完成数量',
} as const;
/** 扫描快捷区全量(含展开后):带量项目/任务名称/消耗日期/带量类别/项目状态/产品名称。
* 「带量项目」输入框占位为合同号/名称,样本取自列「带量项目合同号」。
* 「项目状态」对应列表列「状态」。 */
export const polConsumerComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field2', label: '消耗日期', type: 'date' },
{ key: 'field3', label: '带量项目', type: 'text' },
{ key: 'field', label: '任务名称', type: 'text' },
{ key: 'field5', label: '带量类别', type: 'select' },
{ key: 'field6', label: '项目状态', type: 'select' },
{ key: 'productName', label: '产品名称', type: 'text' },
];
export const polConsumerComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field2', label: '消耗日期', type: 'date' },
{ key: 'field3', label: '带量项目', type: 'text' },
{ key: 'field', label: '任务名称', type: 'text' },
];
export const polConsumerComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'field3', type: 'text', label: '带量项目' },
{ key: 'field', type: 'text', label: '任务名称' },
{ key: 'field5', type: 'select', label: '带量类别' },
{ key: 'field6', type: 'select', label: '项目状态' },
{ key: 'productName', type: 'text', label: '产品名称' },
];
export const polConsumerComboAssertKeys = ['field3', 'field', 'field5', 'field6', 'productName'] as const;
/** 收起后隐藏的扩展条件(第二行)。 */
export const polConsumerExpandedQuickLabels = ['带量类别', '项目状态', '产品名称'] as const;
/** 扫描识别的可排序列(data/scan/pol-consumer-sort-columns.json sortableColumns)。 */
export const polConsumerSortColumns = [
'带量项目合同号',
'带量项目名称',
'计划开始日期',
'计划结束日期',
'任务名称',
'任务数量',
'初始完成量',
'产品编码',
'产品名称',
'规格型号',
'器械注册人-术语配置',
'耗材类型',
'单位',
'27位医保编码',
'注册证号',
'完成数量',
] as const;
export const polConsumerSortCases = buildSortColumnCases(
'STAT-PVC',
polConsumerSortColumns,
8,
);
export const polConsumerData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/policy/report/policy/vbpConsumer',
iframeSrc: 'policy/vbpConsumer',
productNameSelector: '#form_item_field',
columns: polConsumerColumns,
coreTableHeaders: ['带量项目合同号', '带量项目名称', '带量类别', '状态', '计划开始日期', '计划结束日期', '任务名称', '任务数量'],
columnAliases: {
field5: ['采购计划号'],
},
horizontalScrollAnchorColumn: '消耗日期',
horizontalScrollTargetColumn: '带量项目合同号',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '带量项目',
drawerResetFieldLabel: '带量项目',
drawerResetFieldKey: 'field3',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
sortColumns: [...polConsumerSortColumns],
sortCasePrefix: 'STAT-PVC',
sortCaseStartIndex: 8,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: true,
exportTaskName: '带量目录消耗数据统计',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['带量项目合同号', '带量类别', '状态', '任务名称', '产品名称'],
comboSamplePickKeys: ['field3', 'field', 'field5', 'field6', 'productName'],
comboSampleMaxRowScan: 5,
drawerFields: polConsumerComboDrawerFields,
};
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 polDeptColumns = {
field: '带量项目名称',
deptName: '科室名称',
field2: '计划开始日期',
field3: '带量项目编号',
volumeContractNo: '带量合同号',
field4: '器械注册人-术语配置',
field5: '项目目标数',
field6: '项目完成数',
field7: '项目完成率',
field8: '状态',
field9: '计划结束日期',
field10: '任务名称',
field11: '任务目标数',
field12: '任务完成数',
field13: '任务完成率',
field14: '科室编号',
field15: '任务数',
field16: '初始完成数',
field17: '成本数量',
field18: '总计完成数',
field19: '日均完成量',
field20: '预计完成量',
field21: '执行进度',
field22: '预计完成度',
} as const;
export const polDeptComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field2', label: '计划开始日期', type: 'date' },
{ key: 'field', label: '带量项目名称', type: 'text' },
// 全量组合不强制科室:日期+项目名+科室易导致无匹配
];
export const polDeptComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field2', label: '计划开始日期', type: 'date' },
{ key: 'field', label: '带量项目名称', type: 'text' },
{ key: 'deptName', label: '科室名称', type: 'select' },
];
export const polDeptComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'field', type: 'text', label: '带量项目名称' },
{ key: 'deptName', type: 'select', label: '科室名称' },
];
export const polDeptComboAssertKeys = ['field2', 'field'] as const;
export const polDeptDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field2', label: '计划开始日期', type: 'date' },
{ key: 'field', label: '带量项目名称', type: 'text' },
{ key: 'deptName', label: '科室名称', type: 'select' },
];
export const polDeptDomainAssertKeys = ['field2', 'field', 'deptName'] as const;
export const polDeptData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/policy/report/policy/deptVbpRate',
iframeSrc: 'policy/deptVbpRate',
productNameSelector: '#form_item_field',
columns: polDeptColumns,
coreTableHeaders: ['带量项目编号', '带量项目名称', '带量合同号', '器械注册人-术语配置', '项目目标数', '项目完成数', '项目完成率', '状态'],
columnAliases: {
field5: ['采购计划号'],
deptName: ['请领科室'],
},
horizontalScrollAnchorColumn: '计划开始日期',
horizontalScrollTargetColumn: '科室名称',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '带量项目名称',
drawerResetFieldLabel: '带量项目名称',
drawerResetFieldKey: 'field',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: false,
exportTaskName: '带量科室任务明细',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['科室名称'],
comboSamplePickKeys: ['field2', 'field', 'deptName'],
comboSampleMaxRowScan: 5,
drawerFields: polDeptComboDrawerFields,
};
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 polKeyColumns = {
field: '报告期月份',
field2: '基期月份',
campus: '院区名称',
productName: '产品名称',
202609202609: '基期2026-09至2026-09',
field3: '结算金额',
field4: '占比',
field5: '增长金额',
field6: '金额增长',
field7: '占比增长',
} as const;
export const polKeyComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '报告期月份', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
];
export const polKeyComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '报告期月份', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
];
export const polKeyComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'campus', type: 'select', label: '院区名称' },
{ key: '202609202609', type: 'text', label: '基期2026-09至2026-09' },
];
export const polKeyComboAssertKeys = ['field', 'campus'] as const;
export const polKeyDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '报告期月份', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
];
export const polKeyDomainAssertKeys = ['field', 'campus'] as const;
export const polKeyData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/policy/report/policy/keyPoint',
iframeSrc: 'policy/keyPoint',
productNameSelector: '#table_search_form_goodsName',
columns: polKeyColumns,
// 双行分组表头叶列(末行);产品名称/产品规格为 rowspan 首行叶列
coreTableHeaders: ['产品名称', '产品规格', '结算金额', '占比', '增长金额', '金额增长', '占比增长'],
columnAliases: {
field5: ['采购计划号'],
},
// 锚点/目标取末行叶列(locators.tableHeader 定位 thead 末行);远侧用「占比增长」
horizontalScrollAnchorColumn: '结算金额',
horizontalScrollTargetColumn: '占比增长',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
drawerResetFieldLabel: '院区名称',
drawerResetFieldKey: 'campus',
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,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['基期2026-09至2026-09'],
comboSamplePickKeys: ['field', 'campus', '202609202609'],
comboSampleMaxRowScan: 5,
drawerFields: polKeyComboDrawerFields,
};
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 polRateColumns = {
field: '带量项目名称',
productName: '产品名称',
field2: '计划开始日期',
field3: '带量项目编号',
volumeContractNo: '带量合同号',
field4: '器械注册人-术语配置',
field5: '项目目标数',
field6: '期间项目采购数',
field7: '项目完成数',
field8: '项目有效完成数',
field9: '项目完成率',
field10: '项目有效完成率',
field11: '状态',
field12: '计划结束日期',
field13: '任务目标数',
field14: '任务初始完成数',
field15: '期间任务采购数',
field16: '任务完成数',
field17: '任务完成率',
productCode: '产品编号',
spec: '规格型号',
field18: '单位',
field19: '注册证规格',
field20: '注册证型号',
insuranceCode: '医保编码',
field21: '进院日期',
field22: '注册证号',
field23: '默认进院供应商',
field24: '招标文号',
id: '阳采ID',
field25: '初始完成量',
field26: '期间产品采购数',
field27: '总计完成量',
field28: '实际开始时间',
field29: '实际结束时间',
} as const;
export const polRateComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '带量项目名称', type: 'text' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'field2', label: '计划开始日期', type: 'date' },
];
export const polRateComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '带量项目名称', type: 'text' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'field2', label: '计划开始日期', type: 'date' },
];
export const polRateComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'field', type: 'text', label: '带量项目名称' },
{ key: 'productName', type: 'text', label: '产品名称' },
];
export const polRateComboAssertKeys = ['field', 'productName'] as const;
export const polRateDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '带量项目名称', type: 'text' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'field2', label: '计划开始日期', type: 'date' },
];
export const polRateDomainAssertKeys = ['field', 'productName', 'field2'] as const;
export const polRateData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/policy/report/policy/rate',
iframeSrc: 'policy/rate',
productNameSelector: '#form_item_field',
columns: polRateColumns,
coreTableHeaders: ['带量项目编号', '带量项目名称', '带量合同号', '器械注册人-术语配置', '项目目标数', '期间项目采购数', '项目完成数', '项目有效完成数'],
columnAliases: {
field5: ['采购计划号'],
},
horizontalScrollAnchorColumn: '带量项目名称',
horizontalScrollTargetColumn: '项目完成率',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
drawerResetFieldLabel: '带量项目名称',
drawerResetFieldKey: 'field',
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,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['完成率'],
comboSamplePickKeys: ['field', 'productName'],
comboSampleMaxRowScan: 5,
drawerFields: polRateComboDrawerFields,
};
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 polSevenColumns = {
field: '统计区间',
7: '7位医保码',
field2: '带量一级分类',
field3: '一级分类',
field4: '二级分类',
field5: '三级分类',
field6: '合同名称',
field7: '合同号',
field8: '任务截止日期',
field9: '带量执行情况',
field10: '分类结算入账数量',
field11: '结算数量占比',
field12: '分类成本入账数量',
field13: '成本数量占比',
field14: '分类科室消耗数量',
field15: '消耗数量占比',
} as const;
export const polSevenComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '统计区间', type: 'date' },
{ key: '7', label: '7位医保码', type: 'text' },
{ key: 'field2', label: '带量一级分类', type: 'select' },
// 合同名称在折叠区且样本值常无法精确命中下拉,全量组合不强制
];
export const polSevenComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '统计区间', type: 'date' },
{ key: '7', label: '7位医保码', type: 'text' },
{ key: 'field2', label: '带量一级分类', type: 'select' },
];
export const polSevenComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'field', type: 'date', label: '统计区间' },
{ key: '7', type: 'text', label: '7位医保码' },
{ key: 'field2', type: 'select', label: '带量一级分类' },
{ key: 'field6', type: 'select', label: '合同名称' },
];
export const polSevenComboAssertKeys = ['7', 'field2', 'field6'] as const;
export const polSevenDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '统计区间', type: 'date' },
{ key: '7', label: '7位医保码', type: 'text' },
{ key: 'field2', label: '带量一级分类', type: 'select' },
{ key: 'field6', label: '合同名称', type: 'select' },
];
export const polSevenDomainAssertKeys = ['field', '7', 'field2'] as const;
export const polSevenData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/policy/report/policy/sevenMiCode',
iframeSrc: 'policy/sevenMiCode',
productNameSelector: '#form_item_7',
columns: polSevenColumns,
coreTableHeaders: ['7位医保码', '一级分类', '二级分类', '三级分类', '带量一级分类', '合同名称', '合同号', '任务截止日期'],
columnAliases: {
field5: ['采购计划号'],
'7': ['7位医保编码', '医保码'],
},
horizontalScrollAnchorColumn: '统计区间',
horizontalScrollTargetColumn: '带量一级分类',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '7位医保码',
mockNotExistCode: '__NOT_EXIST_MICODE__99999',
drawerResetFieldLabel: '统计区间',
drawerResetFieldKey: 'field',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: true,
exportTaskName: '7位医保码带量分析',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['带量一级分类', '合同名称', '分类结算入账数量'],
comboSamplePickKeys: ['field', '7', 'field2', 'field6'],
/** 需扫到「分类结算入账数量>0」的带量一级分类行,合并组内行较多 */
comboSampleMaxRowScan: 40,
drawerFields: polSevenComboDrawerFields,
};
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 polTaskColumns = {
field: '项目起始日期',
field2: '项目结束日期',
field3: '项目名称',
field4: '项目编号',
field5: '项目类别',
field6: '器械注册人-术语配置',
field7: '任务名称',
field8: '目标数量',
field9: '初始完成量',
field10: '已采购量',
field11: '已完成量',
field12: '日均完成量',
field13: '预计完成量',
field14: '执行进度',
field15: '预计完成度',
field16: '有效执行量',
field17: '有效执行进度',
} as const;
export const polTaskComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '项目起始日期', type: 'date' },
{ key: 'field3', label: '项目名称', type: 'select' },
{ key: 'field4', label: '项目编号', type: 'text' },
];
export const polTaskComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '项目起始日期', type: 'date' },
{ key: 'field3', label: '项目名称', type: 'select' },
{ key: 'field4', label: '项目编号', type: 'text' },
];
export const polTaskComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'field3', type: 'select', label: '项目名称' },
{ key: 'field4', type: 'text', label: '项目编号' },
];
export const polTaskComboAssertKeys = ['field', 'field3'] as const;
export const polTaskDomainQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'field', label: '项目起始日期', type: 'date' },
{ key: 'field3', label: '项目名称', type: 'select' },
{ key: 'field4', label: '项目编号', type: 'text' },
];
export const polTaskDomainAssertKeys = ['field', 'field3', 'field4'] as const;
export const polTaskData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/policy/report/policy/task',
iframeSrc: 'policy/task',
productNameSelector: '#table_search_form_projectName',
columns: polTaskColumns,
coreTableHeaders: ['项目编号', '项目名称', '项目起始日期', '项目结束日期', '项目类别', '器械注册人-术语配置', '任务名称', '目标数量'],
columnAliases: {
field5: ['采购计划号'],
},
horizontalScrollAnchorColumn: '项目起始日期',
horizontalScrollTargetColumn: '项目编号',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '项目编号',
drawerResetFieldLabel: '项目名称',
drawerResetFieldKey: 'field3',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
sortColumns: ['项目编号', '项目名称'],
sortCasePrefix: 'STAT-PTS',
sortCaseStartIndex: 20,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: true,
exportTaskName: '带量任务统计',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['项目编号'],
comboSamplePickKeys: ['field', 'field3', 'field4'],
comboSampleMaxRowScan: 5,
drawerFields: polTaskComboDrawerFields,
quickFieldInputIds: {
field4: 'table_search_form_orderNo',
},
};
export const polTaskSortColumns = ['项目编号', '项目名称', '项目起始日期', '项目结束日期', '器械注册人-术语配置', '任务名称', '目标数量'] as const;
export const polTaskSortCases = buildSortColumnCases(
'STAT-PTS',
polTaskSortColumns,
20,
);
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 reagEntryColumns = {
statDate: '统计日期',
supplierName: '进院供应商',
productName: '产品名称',
productCode: '产品编号',
spec: '规格型号',
registrant: '器械注册人-术语配置',
unit: '单位',
deliveryQty: '配送数量',
batchQty: '批号数量',
overBatchQty: '超批号数量',
campusScope: '院区范围',
} as const;
/** 本模块统计日期固定区间(所有用例统一使用,不从主表抽样)。 */
export const reagEntryFixedStatDateRange = {
label: '统计日期',
start: '2025-01-01',
end: '2025-12-31',
sampleValue: '2025-01-01 ~ 2025-12-31',
} as const;
/** 院区范围固定为千泉院区(所有用例统一使用,不从主表抽样)。 */
export const reagEntryFixedCampusScope = {
label: '院区范围',
value: '千泉院区',
} as const;
/** 全量快捷区字段(展开筛选区,非高级筛选抽屉)。 */
export const reagEntryComboFullQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'supplierName', label: '进院供应商', type: 'text' },
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'spec', label: '规格型号', type: 'text' },
{ key: 'registrant', label: '器械注册人-术语配置', type: 'text' },
{ key: 'overBatchQty', label: '超批号数量', type: 'text' },
{ key: 'campusScope', label: '院区范围', type: 'select' },
];
export const reagEntryComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'supplierName', label: '进院供应商', type: 'text' },
{ key: 'productName', label: '产品名称', type: 'text' },
];
/** STAT-RBE-008:有数据时首行样本导出所用快捷区字段(固定统计日期+院区+样本供应商/产品)。 */
export const reagEntryExportSampleFields: readonly DeptQuickFieldDef[] = [
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'campusScope', label: '院区范围', type: 'select' },
{ key: 'supplierName', label: '进院供应商', type: 'text' },
{ key: 'productName', label: '产品名称', type: 'text' },
];
export const reagEntryComboDrawerFields: readonly CenterReportDrawerField[] = [];
export const reagEntryComboAssertKeys = [
'supplierName',
'productName',
'spec',
'registrant',
] as const;
export const reagEntryDomainQuickFields: readonly DeptQuickFieldDef[] = reagEntryComboFullQuickFields;
export const reagEntryDomainAssertKeys = [
'statDate',
'supplierName',
'productName',
'spec',
'registrant',
] as const;
export const reagEntryData: CenterReportPageData & {
mockFieldLabel?: string;
drawerResetFieldLabel?: string;
drawerResetFieldKey?: string;
} = {
reportPath: '/spd/form/reagentBatch/report/reagentBatch/entry',
iframeSrc: 'reagentBatch/entry',
productNameSelector: '#table_search_form_goodsName',
columns: reagEntryColumns,
coreTableHeaders: [
'产品编号',
'产品名称',
'规格型号',
'器械注册人-术语配置',
'单位',
'进院供应商',
'配送数量',
'批号数量',
],
columnAliases: {
supplierName: ['进院供应商名称'],
field: ['器械注册人-术语配置'],
field5: ['采购计划号'],
},
horizontalScrollAnchorColumn: '产品编号',
horizontalScrollTargetColumn: '器械注册人-术语配置',
horizontalScrollDragDelta: 320,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
drawerResetFieldLabel: '进院供应商',
drawerResetFieldKey: 'supplierName',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: false,
hasExport: true,
hasExpandRow: false,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: true,
detailTabKeywords: ['详情', '批号', '试剂'],
exportTaskName: '试剂批号统计明细',
exportSuccessMessage: '导出成功,请前往任务中心下载',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
columnSettingsToggleCandidates: ['备注'],
comboSampleScrollColumns: ['规格型号', '器械注册人-术语配置', '进院供应商', '批号数量'],
comboSamplePickKeys: ['supplierName', 'productName', 'spec', 'registrant'],
comboSampleMaxRowScan: 5,
quickFieldInputIds: {
supplierName: 'table_search_form_supplierName',
productName: 'table_search_form_goodsName',
spec: 'table_search_form_goodsSpec',
registrant: 'table_search_form_mfrsName',
overBatchQty: 'table_search_form_batchCodeQuantity',
},
drawerFields: [],
};
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 reconDeptAccountColumns = {
campus: '院区名称',
deptName: '科室名称',
statDate: '统计日期',
settlement: '结算方式',
billCount: '单据数量',
outboundQty: '出库数量',
outboundAmount: '出库金额',
returnQty: '退库数量',
returnAmount: '退库金额',
netOutQty: '净出数量',
netOutAmount: '净出金额',
} as const;
/** 主表列 → 底部合计标签(底部为「单据数」,主表为「单据数量」)。 */
export const reconDeptAccountSummaryMetrics = [
{ key: 'billCount', label: '单据数量', summaryLabels: ['单据数', '单据数量'] },
{ key: 'outboundQty', label: '出库数量', summaryLabels: ['出库数量'] },
{ key: 'outboundAmount', label: '出库金额', summaryLabels: ['出库金额'] },
{ key: 'returnQty', label: '退库数量', summaryLabels: ['退库数量'] },
{ key: 'returnAmount', label: '退库金额', summaryLabels: ['退库金额'] },
{ key: 'netOutQty', label: '净出数量', summaryLabels: ['净出数量'] },
{ key: 'netOutAmount', label: '净出金额', summaryLabels: ['净出金额'] },
] as const;
export const reconDeptAccountComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'deptName', label: '科室名称', type: 'select' },
{ key: 'statDate', label: '统计日期', type: 'date' },
];
export const reconDeptAccountComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'settlement', type: 'select', label: '结算方式' },
];
export const reconDeptAccountComboAssertKeys = ['campus', 'deptName', 'statDate'] as const;
export const reconDeptAccountData: CenterReportPageData = {
reportPath: '/spd/form/checkAccount/report/checkAccount/deptAccount',
iframeSrc: 'checkAccount/deptAccount',
productNameSelector: '#form_item_goodsName',
columns: reconDeptAccountColumns,
coreTableHeaders: ['科室名称', '院区名称', '统计日期', '结算方式', '单据数量', '出库数量', '出库金额'],
summaryKeywords: ['单据数', '出库数量', '出库金额', '退库数量', '退库金额', '净出数量', '净出金额'],
dimensions: ['区分库区'],
mockNotExistProduct: '__NOT_EXIST_DEPT__99999',
mockFieldLabel: '统计日期',
mockNotExistDept: '__NOT_EXIST_DEPT__99999',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: true,
hasBatchPrint: false,
hasToolbarPrint: true,
hasFilterToggle: false,
exportTaskName: '科室对账查询',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '科室名称',
horizontalScrollTargetColumn: '结算方式',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['campus', 'deptName', 'statDate', 'settlement'],
drawerFields: reconDeptAccountComboDrawerFields,
firstRowSummaryMatch: {
metrics: reconDeptAccountSummaryMetrics,
requiredKey: 'deptName',
fields: reconDeptAccountComboQuickFields,
narrowKeys: ['campus', 'deptName'],
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 reconDeptNetInColumns = {
productName: '产品名称',
statDate: '统计日期',
consumableType: '耗材类型',
campus: '院区名称',
deptName: '科室名称',
netInQty: '净入数量',
netInAmount: '净入金额',
} as const;
/** 主表列 → 底部合计标签。 */
export const reconDeptNetInSummaryMetrics = [
{ key: 'netInQty', label: '净入数量', summaryLabels: ['净入数量'] },
{ key: 'netInAmount', label: '净入金额', summaryLabels: ['净入金额'] },
] as const;
export const reconDeptNetInComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'statDate', label: '统计日期', type: 'date' },
{ key: 'consumableType', label: '耗材类型', type: 'select' },
{ key: 'campus', label: '院区名称', type: 'select' },
];
export const reconDeptNetInComboDrawerFields: readonly CenterReportDrawerField[] = [
// 无额外抽屉字段
];
export const reconDeptNetInComboAssertKeys = ['productName', 'statDate', 'consumableType', 'campus'] as const;
/** 截图可见列表字段(不含序号);无排序控件时脚本 skip。 */
export const reconDeptNetInSortColumns = [
'产品名称',
'单位',
'规格',
'型号',
'产品编号',
'规格型号',
'器械注册人-术语配置',
'产品类型',
] as const;
export const reconDeptNetInData: CenterReportPageData = {
reportPath: '/spd/form/checkAccount/report/checkAccount/outRequest',
iframeSrc: 'checkAccount/outRequest',
productNameSelector: '#form_item_goodsName',
columns: reconDeptNetInColumns,
coreTableHeaders: ['产品名称', '科室名称', '院区名称', '统计日期', '耗材类型', '净入数量', '净入金额'],
summaryKeywords: ['净入数量', '净入金额'],
dimensions: ['区分批号', '区分目标科室', '区分单价'],
sortColumns: reconDeptNetInSortColumns,
sortCasePrefix: 'STAT-RNI',
sortCaseStartIndex: 20,
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: true,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '科室净入汇总表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '耗材类型',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['productName', 'statDate', 'consumableType', 'campus'],
drawerFields: reconDeptNetInComboDrawerFields,
firstRowSummaryMatch: {
metrics: reconDeptNetInSummaryMetrics,
requiredKey: 'productName',
fields: reconDeptNetInComboQuickFields,
narrowKeys: ['productName'],
footerKeywords: ['净入数量', '净入金额', '入库数量', '入库金额'],
},
};
export const reconDeptNetInSortCases = buildSortColumnCases(
'STAT-RNI',
reconDeptNetInSortColumns,
20,
);
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 reconDeptNetOutColumns = {
productName: '产品名称',
accountDate: '记账日期',
campus: '院区名称',
deptName: '科室',
billForm: '单据形态',
batchNo: '批号',
orderNo: '单号',
outTarget: '出库目标',
settlement: '结算方式',
netOutQty: '净出数量',
netOutAmount: '净出金额',
} as const;
/** 主表列 → 底部合计标签。 */
export const reconDeptNetOutSummaryMetrics = [
{ key: 'netOutQty', label: '净出数量', summaryLabels: ['净出数量'] },
{ key: 'netOutAmount', label: '净出金额', summaryLabels: ['净出金额'] },
] as const;
export const reconDeptNetOutComboQuickFields: readonly DeptQuickFieldDef[] = [
{ key: 'productName', label: '产品名称', type: 'text' },
{ key: 'accountDate', label: '记账日期', type: 'date' },
{ key: 'campus', label: '院区名称', type: 'select' },
{ key: 'deptName', label: '科室', type: 'select' },
];
export const reconDeptNetOutComboDrawerFields: readonly CenterReportDrawerField[] = [
{ key: 'settlement', type: 'select', label: '结算方式' },
];
export const reconDeptNetOutComboAssertKeys = ['productName', 'accountDate', 'campus', 'deptName'] as const;
export const reconDeptNetOutData: CenterReportPageData = {
reportPath: '/spd/form/checkAccount/report/checkAccount/deptOut',
iframeSrc: 'checkAccount/deptOut',
productNameSelector: '#form_item_goodsName',
columns: reconDeptNetOutColumns,
coreTableHeaders: ['产品名称', '科室', '院区名称', '记账日期', '单据形态', '批号', '净出数量', '净出金额'],
summaryKeywords: ['净出数量', '净出金额'],
dimensions: ['区分包装', '区分批号'],
mockNotExistProduct: '__NOT_EXIST_PRODUCT__99999',
mockFieldLabel: '产品名称',
paginationPageSizeFrom: '50 条/页',
paginationPageSizeTo: '100 条/页',
sampleRowIndex: 0,
hasAdvancedFilter: true,
hasExport: true,
hasExpandRow: true,
hasBatchPrint: false,
hasToolbarPrint: false,
hasFilterToggle: false,
exportTaskName: '科室净出汇总表',
exportDirectDownload: false,
exportSelectFirstRow: false,
exportQueryFromSample: true,
horizontalScrollAnchorColumn: '产品名称',
horizontalScrollTargetColumn: '批号',
horizontalScrollDragDelta: 320,
comboSamplePickKeys: ['productName', 'accountDate', 'campus', 'deptName', 'settlement'],
drawerFields: reconDeptNetOutComboDrawerFields,
firstRowSummaryMatch: {
metrics: reconDeptNetOutSummaryMetrics,
requiredKey: 'productName',
fields: reconDeptNetOutComboQuickFields,
narrowKeys: ['productName'],
footerKeywords: ['净出数量', '净出金额', '出库数量', '出库金额'],
},
};
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