-
待新增
+
+
+ 待新增
+
+
+ 不可改价
+
-
+
供货价
@@ -288,6 +381,7 @@ function handleRowSave(row: PriceCompareRow) {
:precision="4"
:step="0.0001"
size="small"
+ :disabled="!!row._priceLocked"
:value="row.market_price"
@update:value="
(v) => onPriceChange(row, 'market_price', v as number)
@@ -307,7 +401,7 @@ function handleRowSave(row: PriceCompareRow) {
- 售价
+ {{ priceLabel }}
@@ -322,6 +416,7 @@ function handleRowSave(row: PriceCompareRow) {
:precision="4"
:step="0.0001"
size="small"
+ :disabled="!!row._priceLocked"
:value="row.price"
@update:value="
(v) => onPriceChange(row, 'price', v as number)
@@ -337,6 +432,47 @@ function handleRowSave(row: PriceCompareRow) {
+
+
+
+
+ 单位
+
+
+
+
+ {{ row.orig_unit_name || '—' }}
+
+ →
+
+ onUnitChange(row, String(v ?? ''))"
+ />
+
+ 待建
+
+
+
+
+
+
+ 单位
+ {{ row.unit_name || row.orig_unit_name || '—' }}
+
@@ -345,7 +481,7 @@ function handleRowSave(row: PriceCompareRow) {
>
-
+
+
{{ MEDICINE_SCOPE_NOTE }}
+
+
-
{{ item.label }}
+
+ {{ item.label }}
+ {{ item.tip }}
+
¥{{ formatMoney(item.value) }}
@@ -240,7 +240,12 @@ defineExpose({
:key="field.key"
class="df-detail-store__metric"
>
-
{{ field.label }}
+
+ {{ field.label }}
+
+ ({{ field.tip }})
+
+
¥{{ formatMoney(store[field.key]) }}
@@ -343,6 +348,28 @@ defineExpose({
border-radius: 12px;
box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}
+.df-detail-note {
+ margin-bottom: 12px;
+ padding: 10px 14px;
+ font-size: 13px;
+ line-height: 1.5;
+ color: #475569;
+ background: #f8fafc;
+ border: 1px solid #e2e8f0;
+ border-radius: 8px;
+}
+.dark .df-detail-note {
+ color: #cbd5e1;
+ background: #0b1220;
+ border-color: #1e293b;
+}
+.df-detail-metric__tip {
+ display: block;
+ margin-top: 2px;
+ font-size: 11px;
+ font-weight: 400;
+ color: #94a3b8;
+}
.dark .df-detail-hero {
background: #0f172a;
border-color: #334155;
diff --git a/apps/web-antd/src/views/finance/department-finance/config/metrics.ts b/apps/web-antd/src/views/finance/department-finance/config/metrics.ts
new file mode 100644
index 00000000..b97dfd99
--- /dev/null
+++ b/apps/web-antd/src/views/finance/department-finance/config/metrics.ts
@@ -0,0 +1,59 @@
+/**
+ * 部门财务指标字段与口径文案
+ * 西药侧含服务包、保健食品等非中药;已取消独立颗粒栏目
+ */
+export const MEDICINE_SCOPE_NOTE =
+ '口径说明:西药供货价/运费含服务包、保健食品、医疗器械、非药品等所有非中药;已取消独立「颗粒药」栏目。';
+
+/** 诊所卡/详情展示的金额字段(不含开票合计) */
+export const STORE_METRIC_FIELDS = [
+ { key: 'herbal_supply_price', label: '中药供货价' },
+ {
+ key: 'medicine_supply_price',
+ label: '西药供货价',
+ tip: '含服务包、保健食品等非中药',
+ },
+ { key: 'herbal_decoct_fee', label: '中药代煎费' },
+ { key: 'herbal_express_fee', label: '中药运费' },
+ {
+ key: 'medicine_express_fee',
+ label: '西药运费',
+ tip: '含非中药订单运费',
+ },
+] as const;
+
+/** Excel 汇总指标 */
+export const SUMMARY_METRICS: {
+ label: string;
+ key: string;
+ highlight?: boolean;
+}[] = [
+ { label: '中药供货价', key: 'herbal_supply_price' },
+ {
+ label: '西药供货价(含服务包/保健食品等非中药)',
+ key: 'medicine_supply_price',
+ },
+ { label: '中药代煎费', key: 'herbal_decoct_fee' },
+ { label: '中药运费', key: 'herbal_express_fee' },
+ { label: '西药运费(含非中药)', key: 'medicine_express_fee' },
+ { label: '开票合计', key: 'invoice_total', highlight: true },
+];
+
+export const STORE_HEADERS = [
+ '诊所名称',
+ '中药供货价',
+ '西药供货价(含服务包/保健食品等非中药)',
+ '中药代煎费',
+ '中药运费',
+ '西药运费(含非中药)',
+ '开票合计',
+];
+
+export const STORE_MONEY_KEYS = [
+ 'herbal_supply_price',
+ 'medicine_supply_price',
+ 'herbal_decoct_fee',
+ 'herbal_express_fee',
+ 'medicine_express_fee',
+ 'invoice_total',
+] as const;
diff --git a/apps/web-antd/src/views/finance/department-finance/utils/exportDepartmentFinanceExcel.ts b/apps/web-antd/src/views/finance/department-finance/utils/exportDepartmentFinanceExcel.ts
index 773da5f2..a5e080f8 100644
--- a/apps/web-antd/src/views/finance/department-finance/utils/exportDepartmentFinanceExcel.ts
+++ b/apps/web-antd/src/views/finance/department-finance/utils/exportDepartmentFinanceExcel.ts
@@ -9,6 +9,12 @@ import {
getDepartmentFinanceReportDetailApi,
getDepartmentFinanceStoreDrugDetailApi,
} from '#/views/finance/department-finance/api';
+import {
+ MEDICINE_SCOPE_NOTE,
+ STORE_HEADERS,
+ STORE_MONEY_KEYS,
+ SUMMARY_METRICS,
+} from '#/views/finance/department-finance/config/metrics';
const XLSX_MIME =
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
@@ -25,30 +31,6 @@ const DOUBLE_TOP_BORDER: Partial
= {
top: { style: 'double', color: { argb: 'FF000000' } },
};
-/** 诊所明细金额列(不含诊所名称) */
-const STORE_MONEY_KEYS = [
- 'herbal_supply_price',
- 'granule_supply_price',
- 'medicine_supply_price',
- 'herbal_decoct_fee',
- 'herbal_express_fee',
- 'medicine_express_fee',
- 'granule_express_fee',
- 'invoice_total',
-] as const;
-
-const STORE_HEADERS = [
- '诊所名称',
- '中药供货价',
- '颗粒药供货价',
- '西药供货价',
- '中药代煎费',
- '中药运费',
- '西药运费',
- '颗粒药运费',
- '开票合计',
-];
-
const DRUG_HEADERS = [
'诊所名称',
'药品编码',
@@ -59,18 +41,6 @@ const DRUG_HEADERS = [
'供货总额',
];
-/** 汇总键值表:指标名 -> summary 字段 */
-const SUMMARY_METRICS: { label: string; key: string; highlight?: boolean }[] = [
- { label: '中药供货价', key: 'herbal_supply_price' },
- { label: '颗粒药供货价', key: 'granule_supply_price' },
- { label: '西药供货价', key: 'medicine_supply_price' },
- { label: '中药代煎费', key: 'herbal_decoct_fee' },
- { label: '中药运费', key: 'herbal_express_fee' },
- { label: '西药运费', key: 'medicine_express_fee' },
- { label: '颗粒药运费', key: 'granule_express_fee' },
- { label: '开票合计', key: 'invoice_total', highlight: true },
-];
-
export interface DepartmentFinanceDrugRow {
store_name: string;
drug_number?: string;
@@ -288,10 +258,19 @@ function buildSummarySheet(
labelCell.fill = zebra;
moneyCell.fill = zebra;
}
- sheet.getRow(dataRow).height = metric.highlight ? 28 : 24;
+ sheet.getRow(dataRow).height = 24;
dataRow += 1;
});
+ // 口径说明行
+ sheet.mergeCells(dataRow, 1, dataRow, 2);
+ const noteCell = sheet.getCell(dataRow, 1);
+ noteCell.value = MEDICINE_SCOPE_NOTE;
+ noteCell.font = { size: 10, color: { argb: 'FF64748B' } };
+ noteCell.alignment = { wrapText: true, vertical: 'middle' };
+ sheet.getRow(dataRow).height = 36;
+ dataRow += 1;
+
autoFitColumns(sheet, layoutCols, 1, dataRow - 1, 14, 28);
freezeAt(sheet, headerRow);
}
diff --git a/apps/web-antd/src/views/finance/reconciliation/components/InvoicePriceDrawer.vue b/apps/web-antd/src/views/finance/reconciliation/components/InvoicePriceDrawer.vue
index 45b0b571..17abb5af 100644
--- a/apps/web-antd/src/views/finance/reconciliation/components/InvoicePriceDrawer.vue
+++ b/apps/web-antd/src/views/finance/reconciliation/components/InvoicePriceDrawer.vue
@@ -32,12 +32,22 @@ const statistics = computed(() => {
return [
{ title: '开票合计', value: m.invoice_total, icon: 'mdi:cash-multiple', color: 'text-blue-600', unit: '¥' },
{ title: '中药供货价', value: m.herbal_supply_price, icon: 'mdi:leaf', color: 'text-green-600', unit: '¥' },
- { title: '颗粒药供货价', value: m.granule_supply_price, icon: 'mdi:pill', color: 'text-teal-600', unit: '¥' },
- { title: '西药供货价', value: m.medicine_supply_price, icon: 'mdi:pharmacy', color: 'text-purple-600', unit: '¥' },
+ {
+ title: '西药供货价',
+ value: Number(m.medicine_supply_price || 0) + Number(m.granule_supply_price || 0),
+ icon: 'mdi:pharmacy',
+ color: 'text-purple-600',
+ unit: '¥',
+ },
{ title: '中药代煎费', value: m.herbal_decoct_fee, icon: 'mdi:fire', color: 'text-orange-600', unit: '¥' },
{ title: '中药运费', value: m.herbal_express_fee, icon: 'skill-icons:expressjs-dark', color: 'text-orange-500', unit: '¥' },
- { title: '西药运费', value: m.medicine_express_fee, icon: 'mdi:truck', color: 'text-indigo-600', unit: '¥' },
- { title: '颗粒药运费', value: m.granule_express_fee, icon: 'mdi:truck-outline', color: 'text-cyan-600', unit: '¥' },
+ {
+ title: '西药运费',
+ value: Number(m.medicine_express_fee || 0) + Number(m.granule_express_fee || 0),
+ icon: 'mdi:truck',
+ color: 'text-indigo-600',
+ unit: '¥',
+ },
];
});
@@ -93,6 +103,9 @@ defineExpose({
统计区间:{{ searchTime[0] }} ~ {{ searchTime[1] }}
诊所 ID: {{ storeId }}
+