This commit is contained in:
zlwu committed 2026-05-21 05:11:53 +08:00
1 parent c55269de86
commit ee73f69759
64 files changed
+8023 -8085

No files matched your search

+1
View File
@@ -1663,6 +1663,7 @@ export function fetchCheckupInstitutionList(params?: {
page?: number
pageSize?: number
keyword?: string
status?: string
}) {
return request.get({
url: '/web/admin/checkup-institutions',
@@ -21,7 +21,7 @@
</div>
<div class="view-hero-main">
<h2>{{ title }}</h2>
<p v-if="meta" class="view-hero-meta">{{ meta }}</p>
<p v-if="heroMeta" class="view-hero-meta">{{ heroMeta }}</p>
</div>
</div>
@@ -112,6 +112,10 @@
title: string
icon?: Component
meta?: string
/** 顶部副标题展示的业务编码(渲染为「{codeLabel}:{code}」) */
code?: string
/** 与 code 搭配的标签文案,默认「编码」 */
codeLabel?: string
sections: ViewSection[]
/** 弹窗宽度,默认 720px */
width?: string
@@ -149,6 +153,13 @@
const iconComponent = computed(() =>
isIconComponent(props.icon) ? props.icon : Document
)
const heroMeta = computed(() => {
if (props.meta) return props.meta
const code = props.code
if (code == null || code === '') return ''
return `${props.codeLabel ?? '编码'}:${code}`
})
</script>
<style scoped lang="scss">
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_stock_log_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material-stock-log/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L1"}, {"id": "qc_material_index_pad", "label": "pad()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L924"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L722", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L723", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_system_view_dialog_index_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L724", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_admin", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L725", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L726", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L736", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "target": "qc_material_index_pad", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L924", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_material_index_pad", "callee": "padStart", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L924"}, {"caller_nid": "qc_material_index_pad", "callee": "String", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L924"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_lab_test_item_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/lab-test-item/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_status_tag_registry_ts", "label": "status-tag-registry.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/status-tag-registry.ts", "source_location": "L1"}, {"id": "utils_status_tag_registry_createlabelgetter", "label": "createLabelGetter()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/status-tag-registry.ts", "source_location": "L29"}, {"id": "utils_status_tag_registry_createtagtypegetter", "label": "createTagTypeGetter()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/status-tag-registry.ts", "source_location": "L33"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_status_tag_registry_ts", "target": "utils_status_tag_registry_createlabelgetter", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/status-tag-registry.ts", "source_location": "L29", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_status_tag_registry_ts", "target": "utils_status_tag_registry_createtagtypegetter", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/status-tag-registry.ts", "source_location": "L33", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_consumable_pack_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/consumable-pack/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_system_view_dialog_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/system-view-dialog/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_pilot_service_project_price_system_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/project-price-system/index.vue", "source_location": "L1"}, {"id": "project_price_system_index_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/project-price-system/index.vue", "source_location": "L499"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_pilot_service_project_price_system_index_vue", "target": "project_price_system_index_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/project-price-system/index.vue", "source_location": "L499", "weight": 1.0}], "raw_calls": [{"caller_nid": "project_price_system_index_if", "callee": "fetchDeleteProjectSystemItem", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/project-price-system/index.vue", "source_location": "L500"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_pilot_service_cell_product_type_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/cell-product-type/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_consumable_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/consumable/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "label": "sqxp.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_types_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_reagent_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/reagent/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_third_party_company_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/third-party-company/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_output_type_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/output-type/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_process_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/process/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_pilot_service_channel_channelviewdialog_vue", "label": "ChannelViewDialog.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/channel/ChannelViewDialog.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_pilot_service_cell_product_price_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/cell-product-price/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "label": "qc-material-usage.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L1"}, {"id": "api_qc_material_usage_fetchqcmaterialusagelist", "label": "fetchQcMaterialUsageList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L31"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_http", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "api_qc_material_usage_fetchqcmaterialusagelist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L31", "weight": 1.0}], "raw_calls": [{"caller_nid": "api_qc_material_usage_fetchqcmaterialusagelist", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L39"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_usage_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material-usage/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_cell_sample_type_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/cell-sample-type/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_process_category_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/process-category/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_system_view_dialog_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/system-view-dialog/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_sop_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/sop/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_pilot_service_cell_product_spec_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/pilot-service/cell-product-spec/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L1"}, {"id": "material_index_pad", "label": "pad()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L955"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L748", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L749", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_system_view_dialog_index_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L750", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_admin", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L751", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_material", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L752", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_material", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L762", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_index_vue", "target": "material_index_pad", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L955", "weight": 1.0}], "raw_calls": [{"caller_nid": "material_index_pad", "callee": "padStart", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L955"}, {"caller_nid": "material_index_pad", "callee": "String", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue", "source_location": "L955"}]}
+2 -2
View File
@@ -319,8 +319,8 @@ export const sampleCodeTypeTagType = createTagTypeGetter(sampleCodeType)
/** 耗材包类型 */
export const packType: StatusRegistry = {
bzhcb: { label: '标准耗材包', tagType: 'info' },
zdyhcb: { label: '自定义耗材包', tagType: 'primary' }
bzhcb: { label: '标准耗材包', tagType: 'primary' },
zdyhcb: { label: '自定义耗材包', tagType: 'warning' }
}
export const packTypeLabel = createLabelGetter(packType)
export const packTypeTagType = createTagTypeGetter(packType)
@@ -199,7 +199,8 @@
v-model:visible="viewVisible"
:title="viewRow?.typeName || '类型详情'"
:icon="Collection"
:meta="`类型编码:${viewRow?.typeCode || ''}${viewRow?.createTime ? ' · ' + viewRow.createTime : ''}`"
:code="viewRow?.typeCode"
code-label="类型编码"
:sections="viewSections"
/>
</section>
@@ -194,7 +194,8 @@
v-model:visible="viewVisible"
:title="viewRow?.projectName || '价格详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.projectCode"
code-label="项目编码"
:sections="viewSections"
/>
</section>
@@ -145,7 +145,8 @@
v-model:visible="viewVisible"
:title="viewRow?.specName || '规格详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.specCode"
code-label="规格编码"
:sections="viewSections"
/>
</section>
@@ -145,7 +145,8 @@
v-model:visible="viewVisible"
:title="viewRow?.productTypeName || '类型详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.productTypeCode"
code-label="类型编码"
:sections="viewSections"
/>
</section>
@@ -28,24 +28,44 @@
<div class="kpi-strip">
<div class="kpi-card">
<div class="kpi-label">渠道名称</div>
<div class="kpi-value">{{ dash(channel.channelName) }}</div>
</div>
<div class="kpi-card">
<div class="kpi-label">渠道类型</div>
<div class="kpi-value">
<el-tag :type="channelTypeTagType(channel.channelType)" size="small">
{{ channelTypeLabel(channel.channelType) }}
</el-tag>
<div class="kpi-card__icon" aria-hidden="true">
<el-icon><OfficeBuilding /></el-icon>
</div>
<div class="kpi-card__main">
<div class="kpi-label">渠道名称</div>
<div class="kpi-value kpi-value--emphasis">{{ dash(channel.channelName) }}</div>
</div>
</div>
<div class="kpi-card">
<div class="kpi-label">联系人</div>
<div class="kpi-value">{{ dash(channel.contactName) }}</div>
<div class="kpi-card__icon" aria-hidden="true">
<el-icon><CollectionTag /></el-icon>
</div>
<div class="kpi-card__main">
<div class="kpi-label">渠道类型</div>
<div class="kpi-value">
<el-tag :type="channelTypeTagType(channel.channelType)" size="small">
{{ channelTypeLabel(channel.channelType) }}
</el-tag>
</div>
</div>
</div>
<div class="kpi-card">
<div class="kpi-label">创建时间</div>
<div class="kpi-value">{{ dash(channel.createTime) }}</div>
<div class="kpi-card__icon" aria-hidden="true">
<el-icon><User /></el-icon>
</div>
<div class="kpi-card__main">
<div class="kpi-label">联系人</div>
<div class="kpi-value">{{ dash(channel.contactName) }}</div>
</div>
</div>
<div class="kpi-card">
<div class="kpi-card__icon" aria-hidden="true">
<el-icon><Calendar /></el-icon>
</div>
<div class="kpi-card__main">
<div class="kpi-label">创建时间</div>
<div class="kpi-value">{{ dash(channel.createTime) }}</div>
</div>
</div>
</div>
@@ -175,7 +195,7 @@
</el-tag>
</div>
</div>
<div class="data-grid data-grid--4">
<div class="data-grid data-grid--4 agreement-card__info">
<div v-if="agr.settlementType" class="data-item">
<div class="data-label">结算方式</div>
<div class="data-value">
@@ -197,6 +217,88 @@
<div class="data-value">{{ dash(agr.expiryDate) }}</div>
</div>
</div>
<div class="agreement-card__products">
<div class="agreement-products-head">
<h4 class="agreement-products-title">细胞产品信息</h4>
</div>
<div
v-if="(agreementPricesMap[agr.id] || []).length > 0"
class="list-body list-wrap agreement-price-list-wrap"
>
<el-table
:data="agreementPricesMap[agr.id] || []"
class="list-table agreement-price-table"
stripe
row-key="id"
max-height="360"
>
<el-table-column
type="index"
label="序号"
width="68"
align="center"
header-align="center"
/>
<el-table-column
prop="projectName"
label="项目名称"
min-width="120"
align="center"
header-align="center"
/>
<el-table-column
prop="projectCode"
label="项目编码"
min-width="100"
align="center"
header-align="center"
/>
<el-table-column
prop="cellTypeName"
label="细胞类型"
min-width="100"
align="center"
header-align="center"
/>
<el-table-column
prop="specText"
label="规格"
min-width="100"
align="center"
header-align="center"
/>
<el-table-column
label="原价(元)"
min-width="100"
align="center"
header-align="center"
>
<template #default="{ row: priceRow }">
{{ formatPrice(priceRow.originalPrice) }}
</template>
</el-table-column>
<el-table-column
label="协议价(元)"
min-width="100"
align="center"
header-align="center"
>
<template #default="{ row: priceRow }">
<span class="data-value--price">{{ formatPrice(priceRow.agreementPrice) }}</span>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
min-width="120"
align="center"
header-align="center"
show-overflow-tooltip
/>
</el-table>
</div>
<el-empty v-else description="暂无细胞产品信息" :image-size="48" class="agreement-price-empty" />
</div>
</div>
</div>
<el-empty v-else description="暂无协议信息" :image-size="48" />
@@ -233,7 +335,7 @@
<script setup lang="ts">
import { computed, nextTick, ref, watch } from 'vue'
import { Close } from '@element-plus/icons-vue'
import { Calendar, Close, CollectionTag, OfficeBuilding, User } from '@element-plus/icons-vue'
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
import { downloadAttachmentFile } from '@/utils/download-attachment'
import {
@@ -249,7 +351,8 @@
import {
fetchChannelInvoices,
fetchChannelMailAddresses,
fetchChannelAgreements
fetchChannelAgreements,
fetchChannelAgreementPrices
} from '@/api/admin'
const props = defineProps<{
@@ -274,6 +377,7 @@
const invoiceList = ref<any[]>([])
const mailList = ref<any[]>([])
const agreementList = ref<any[]>([])
const agreementPricesMap = ref<Record<string, any[]>>({})
const channel = computed(() => props.listRow || null)
@@ -308,6 +412,11 @@
return String(val)
}
function formatPrice(val: unknown) {
if (val === null || val === undefined || val === '') return '—'
return String(val)
}
function normalizeAgreementRow(row: Record<string, any>) {
const status = String(row.agreementStatus ?? row.status ?? 'dsx').trim() || 'dsx'
return {
@@ -377,10 +486,30 @@
}))
const agrRows = Array.isArray(agrRes) ? agrRes : (agrRes as any)?.list || []
agreementList.value = agrRows.map((row: Record<string, any>) => normalizeAgreementRow(row))
const entries = await Promise.all(
agreementList.value.map(async (agr: any) => {
if (!agr.id) return [agr.id, []] as const
try {
const priceRes = await fetchChannelAgreementPrices(agr.id)
const prices = Array.isArray(priceRes)
? priceRes
: (priceRes as any)?.list || []
return [agr.id, prices] as const
} catch {
return [agr.id, []] as const
}
})
)
const map: Record<string, any[]> = {}
entries.forEach(([id, prices]) => {
if (id) map[id as string] = prices as any[]
})
agreementPricesMap.value = map
} catch {
invoiceList.value = []
mailList.value = []
agreementList.value = []
agreementPricesMap.value = {}
} finally {
loading.value = false
}
@@ -399,6 +528,7 @@
invoiceList.value = []
mailList.value = []
agreementList.value = []
agreementPricesMap.value = {}
activeTab.value = 'basic'
}
@@ -450,43 +580,77 @@
}
}
/* KPI 摘要条(对齐 ProtocolViewDialog:统一薄荷绿通栏 + 图标徽章) */
.kpi-strip {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
gap: 0;
margin-bottom: 24px;
padding: 6px;
background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 52%, #ecfdf5 100%);
border: 1px solid #a7f3d0;
border-radius: 12px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.kpi-card {
background: #fff;
border-radius: 12px;
padding: 18px 20px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
border-left: 3px solid #10b981;
transition:
transform 0.2s,
box-shadow 0.2s;
display: flex;
align-items: flex-start;
gap: 12px;
padding: 14px 18px;
background: transparent;
border-radius: 8px;
transition: background 0.2s;
&:not(:last-child) {
border-right: 1px solid rgba(167, 243, 208, 0.75);
}
&:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
background: rgba(255, 255, 255, 0.55);
}
}
.kpi-card__icon {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
flex-shrink: 0;
border-radius: 10px;
background: #fff;
border: 1px solid #a7f3d0;
color: #059669;
font-size: 18px;
}
.kpi-card__main {
min-width: 0;
flex: 1;
}
.kpi-label {
font-size: 12px;
color: #94a3b8;
margin-bottom: 6px;
letter-spacing: 0.5px;
margin-bottom: 4px;
font-size: 11px;
font-weight: 500;
color: #64748b;
}
.kpi-value {
font-size: 16px;
font-size: 15px;
font-weight: 600;
color: #1e293b;
color: #0f172a;
display: flex;
align-items: center;
gap: 6px;
&--emphasis {
font-size: 16px;
font-weight: 700;
color: #047857;
letter-spacing: 0.02em;
}
}
.section-card {
@@ -676,10 +840,75 @@
flex-wrap: wrap;
}
.agreement-card .data-grid {
.agreement-card__info {
padding: 14px 18px;
}
.agreement-card__products {
padding: 14px 18px 16px;
border-top: 1px solid #f1f5f9;
background: #fafbfc;
}
.agreement-products-head {
margin-bottom: 10px;
}
.agreement-products-title {
margin: 0;
font-size: 14px;
font-weight: 600;
color: #1e293b;
line-height: 1.4;
&::before {
content: '';
display: inline-block;
width: 3px;
height: 14px;
background: #10b981;
border-radius: 2px;
margin-right: 8px;
vertical-align: -2px;
}
}
.agreement-price-list-wrap {
margin-bottom: 0;
border-radius: 8px;
background: #fff;
}
.agreement-price-empty {
padding: 20px 0;
}
.agreement-price-table.list-table {
border: none !important;
box-shadow: none !important;
&::before,
&::after {
display: none !important;
}
:deep(.el-table__inner-wrapper) {
border: none !important;
&::before {
display: none !important;
}
}
:deep(.el-table__cell) {
border-right: none !important;
}
:deep(.el-table__body tr:last-child td.el-table__cell) {
border-bottom: none !important;
}
}
.preview-container {
text-align: center;
}
@@ -689,6 +918,15 @@
grid-template-columns: repeat(2, 1fr);
}
.kpi-strip .kpi-card {
border-right: none !important;
border-bottom: 1px solid rgba(167, 243, 208, 0.75);
&:nth-last-child(-n + 2) {
border-bottom: none;
}
}
.data-grid--3,
.data-grid--4 {
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -698,4 +936,18 @@
grid-template-columns: 1fr;
}
}
@media (max-width: 900px) {
.kpi-strip {
grid-template-columns: repeat(2, 1fr);
}
.kpi-strip .kpi-card:nth-last-child(-n + 2) {
border-bottom: 1px solid rgba(167, 243, 208, 0.75);
}
.kpi-strip .kpi-card:last-child {
border-bottom: none;
}
}
</style>
@@ -94,53 +94,75 @@
</div>
</el-form>
<div class="detail-section">
<div class="detail-section-head">
<h3 class="detail-section-title">套餐项目明细</h3>
<el-button class="btn-main" type="primary" size="small" @click="openProjectSelector">
<el-icon><Plus /></el-icon>添加项目
</el-button>
<div class="detail-section package-detail-section">
<h3 class="detail-section-title">套餐项目明细</h3>
<div class="list-toolbar">
<div class="list-toolbar-row">
<div class="list-toolbar-selected">
共 <span class="sel-num">{{ detailItems.length }}</span> 项
</div>
<el-button class="btn-main" type="primary" @click="openProjectSelector">
<el-icon><Plus /></el-icon>添加项目
</el-button>
</div>
</div>
<div class="list-body list-wrap package-detail-list-wrap">
<el-table
v-if="detailItems.length"
:data="detailItems"
class="list-table package-detail-table"
stripe
max-height="280"
>
<el-table-column
type="index"
label="序号"
width="68"
align="center"
header-align="center"
/>
<el-table-column label="项目名称" min-width="160" align="center" header-align="center">
<template #default="{ row }">
{{ row.projectName }}
<span v-if="row.sourceProjectDeleted" class="form-label-tip">源项目已删除</span>
</template>
</el-table-column>
<el-table-column label="项目费用(元)" min-width="120" align="center" header-align="center">
<template #default="{ row }">
<el-input-number
v-model="row.projectFee"
:precision="2"
:min="0"
:controls="false"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="状态" width="90" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="row.status == '1' ? 'success' : 'info'" size="small">{{
row.status == '1' ? '正常' : '停用'
}}</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" min-width="140" align="center" header-align="center">
<template #default="{ row }">
<el-input v-model="row.remark" placeholder="可选" clearable />
</template>
</el-table-column>
<el-table-column label="操作" min-width="160" fixed="right" align="center" header-align="center">
<template #default="{ $index }">
<el-button class="btn-op-item" @click="detailItems.splice($index, 1)">
<el-icon><Delete /></el-icon>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-empty v-else description="请点击「添加项目」选择体检项目" :image-size="56" />
<div class="package-total">
套餐合计:<strong>¥{{ packageTotalFee.toFixed(2) }}</strong>
</div>
</div>
<el-table :data="detailItems" size="small" class="detail-table" max-height="280">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="项目名称" min-width="160" align="center">
<template #default="{ row }">
{{ row.projectName }}
<span v-if="row.sourceProjectDeleted" class="form-label-tip">源项目已删除</span>
</template>
</el-table-column>
<el-table-column label="项目费用(元)" min-width="120" align="center">
<template #default="{ row }">
<el-input-number
v-model="row.projectFee"
:precision="2"
:min="0"
:controls="false"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="状态" width="90" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="row.status == '1' ? 'success' : 'info'" size="small">{{ row.status == '1' ? '正常' : '停用' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" min-width="140" align="center" header-align="center">
<template #default="{ row }">
<el-input v-model="row.remark" placeholder="可选" clearable />
</template>
</el-table-column>
<el-table-column label="操作" min-width="260" fixed="right" align="center" header-align="center">
<template #default="{ $index }">
<el-button class="btn-op-item" @click="detailItems.splice($index, 1)">
<el-icon><Delete /></el-icon>删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="package-total"
>套餐合计:<strong>¥{{ packageTotalFee.toFixed(2) }}</strong></div
>
</div>
<template #footer>
@@ -163,46 +185,68 @@
destroy-on-close
:close-on-click-modal="false"
>
<el-input
v-model="projectSelectorKeyword"
placeholder="搜索项目名称"
clearable
style="width: 260px; margin-bottom: 12px"
/>
<el-table
:data="filteredProjectList"
max-height="360"
@selection-change="(rows) => (projectSelectorSelected = rows)"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="projectName" label="项目名称" min-width="140" align="center" />
<el-table-column label="项目费用(元)" width="110" align="center">
<template #default="{ row }">{{
row.projectFee != null ? `¥${row.projectFee}` : '—'
}}</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="90" align="center">
<template #default="{ row }">
<el-tag :type="row.status == '1' ? 'success' : 'info'" size="small">{{ row.status == '1' ? '正常' : '停用' }}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
min-width="120"
align="center"
show-overflow-tooltip
/>
</el-table>
<div class="list-toolbar project-selector-toolbar">
<div class="list-toolbar-row">
<div class="list-toolbar-selected">
已选 <span class="sel-num">{{ projectSelectorSelected.length }}</span> 项
</div>
<el-input
v-model="projectSelectorKeyword"
placeholder="搜索项目名称"
clearable
class="project-selector-search"
/>
</div>
</div>
<div class="list-body list-wrap project-selector-list-wrap">
<el-table
class="list-table"
:data="filteredProjectList"
stripe
max-height="360"
@selection-change="(rows) => (projectSelectorSelected = rows)"
>
<el-table-column type="selection" width="55" align="center" header-align="center" />
<el-table-column
prop="projectName"
label="项目名称"
min-width="140"
align="center"
header-align="center"
/>
<el-table-column label="项目费用(元)" width="120" align="center" header-align="center">
<template #default="{ row }">{{
row.projectFee != null ? `¥${row.projectFee}` : '—'
}}</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="90" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="row.status == '1' ? 'success' : 'info'" size="small">{{
row.status == '1' ? '正常' : '停用'
}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
min-width="120"
align="center"
header-align="center"
show-overflow-tooltip
/>
</el-table>
</div>
<template #footer>
<el-button class="btn-ghost" @click="projectSelectorVisible = false">取消</el-button>
<el-button class="btn-ghost" @click="projectSelectorVisible = false">
<el-icon><Close /></el-icon>取消
</el-button>
<el-button
class="btn-main"
type="primary"
:disabled="projectSelectorSelected.length === 0"
@click="confirmProjectSelector"
>
确认添加({{ projectSelectorSelected.length }})
<el-icon><Check /></el-icon>确认添加({{ projectSelectorSelected.length }})
</el-button>
</template>
</el-dialog>
@@ -427,36 +471,159 @@
}
}
.detail-section {
margin-top: 16px;
.detail-section-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.package-detail-section {
margin-top: 20px;
.detail-section-title {
margin: 0;
margin: 0 0 12px;
padding-left: 10px;
font-size: 14px;
font-weight: 600;
color: #1e293b;
border-left: 3px solid #10b981;
line-height: 1;
line-height: 1.4;
}
.list-toolbar {
background: var(--mint-table-head, #f8fafc);
border: 1px solid var(--mint-border, #e2e8f0);
border-bottom: none;
border-radius: var(--mint-radius, 10px) var(--mint-radius, 10px) 0 0;
}
.list-toolbar-row {
padding: 8px 16px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
.list-toolbar-selected {
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0 10px 0 0;
margin-right: 4px;
border-right: 1px solid var(--mint-border, #e2e8f0);
font-size: 12px;
color: var(--mint-text-muted, #64748b);
font-weight: 600;
}
.sel-num {
color: var(--mint-primary-dark, #059669);
font-weight: 700;
margin: 0 2px;
}
.package-detail-list-wrap.list-body.list-wrap {
border: 1px solid var(--mint-border, #e2e8f0);
border-top: 1px solid var(--mint-border, #e2e8f0);
border-radius: 0 0 var(--mint-radius, 10px) var(--mint-radius, 10px);
overflow: hidden;
background: #fff;
}
.package-detail-table.list-table {
width: 100%;
}
:deep(.el-table) {
--el-table-header-bg-color: var(--mint-table-head, #f8fafc);
--el-table-border-color: var(--mint-border, #e2e8f0);
--el-table-row-hover-bg-color: var(--mint-row-hover, #f0fdf4);
--el-table-text-color: var(--mint-text, #0f172a);
--el-table-header-text-color: var(--mint-text-muted, #64748b);
font-size: 14px;
}
:deep(.el-table th.el-table__cell) {
color: var(--mint-text-muted, #64748b);
font-size: 12px;
font-weight: 600;
}
:deep(.el-table td.el-table__cell) {
color: var(--mint-text, #0f172a);
font-size: 14px;
font-weight: 500;
}
.package-total {
margin-top: 0;
padding: 10px 16px 12px;
text-align: right;
font-size: 14px;
color: var(--mint-text-muted, #64748b);
border-top: 1px solid var(--mint-border, #e2e8f0);
background: var(--mint-surface, #fff);
strong {
color: #059669;
font-size: 16px;
}
}
}
.package-total {
margin-top: 12px;
text-align: right;
font-size: 14px;
color: var(--mint-text-muted);
.project-selector-toolbar {
margin-bottom: 0;
background: var(--mint-table-head, #f8fafc);
border: 1px solid var(--mint-border, #e2e8f0);
border-bottom: none;
border-radius: var(--mint-radius, 10px) var(--mint-radius, 10px) 0 0;
strong {
color: #059669;
font-size: 16px;
.list-toolbar-row {
padding: 8px 16px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
.list-toolbar-selected {
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0 10px 0 0;
margin-right: 4px;
border-right: 1px solid var(--mint-border, #e2e8f0);
font-size: 12px;
color: var(--mint-text-muted, #64748b);
font-weight: 600;
}
.project-selector-search {
width: 260px;
}
}
.project-selector-list-wrap.list-body.list-wrap {
border: 1px solid var(--mint-border, #e2e8f0);
border-top: 1px solid var(--mint-border, #e2e8f0);
border-radius: 0 0 var(--mint-radius, 10px) var(--mint-radius, 10px);
overflow: hidden;
background: #fff;
:deep(.el-table) {
--el-table-header-bg-color: var(--mint-table-head, #f8fafc);
--el-table-border-color: var(--mint-border, #e2e8f0);
--el-table-row-hover-bg-color: var(--mint-row-hover, #f0fdf4);
--el-table-text-color: var(--mint-text, #0f172a);
--el-table-header-text-color: var(--mint-text-muted, #64748b);
font-size: 14px;
}
:deep(.el-table th.el-table__cell) {
color: var(--mint-text-muted, #64748b);
font-size: 12px;
font-weight: 600;
}
:deep(.el-table td.el-table__cell) {
color: var(--mint-text, #0f172a);
font-size: 14px;
font-weight: 500;
}
}
</style>
@@ -72,7 +72,7 @@
<el-table-column prop="institutionAddress" label="机构地址" min-width="180" align="center" header-align="center" />
<el-table-column prop="contactName" label="联系人" min-width="100" align="center" header-align="center" />
<el-table-column prop="contactPhone" label="联系电话" min-width="120" align="center" header-align="center" />
<el-table-column prop="tag" label="状态" width="90" align="center" header-align="center">
<el-table-column prop="status" label="状态" width="90" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="row.status == '1' ? 'success' : 'info'" size="small">{{ row.status == '1' ? '正常' : '停用' }}</el-tag>
</template>
@@ -287,9 +287,9 @@
<!-- 查看弹窗 -->
<SystemViewDialog
v-model:visible="viewVisible"
title="查看机构"
:title="viewRow?.institutionName || '机构详情'"
:icon="OfficeBuilding"
:meta="viewInstitutionName"
:meta="viewHeroMeta"
:sections="viewSections"
/>
</section>
@@ -297,7 +297,7 @@
</template>
<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, computed, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
Plus,
@@ -401,8 +401,15 @@
// 查看弹窗
// ---------------------------------------------------------------------------
const viewVisible = ref(false)
const viewInstitutionName = ref('')
const viewRow = ref<any>(null)
const viewSections = ref<ViewSection[]>([])
const viewHeroMeta = computed(() => {
const row = viewRow.value
if (!row) return ''
const contact = (row.contactName || '').trim() || '—'
const phone = (row.contactPhone || '').trim() || '—'
return `联系人:${contact} · 联系电话:${phone}`
})
// ---------------------------------------------------------------------------
// 主表数据加载
@@ -414,7 +421,7 @@
page: pagination.page,
pageSize: pagination.pageSize,
keyword: searchForm.keyword || undefined,
tag: searchForm.tag ? Number(searchForm.tag) : undefined, // 后端 list 接口暂无 tag/status 过滤参数
status: searchForm.tag || undefined
})
tableData.value = (res as any)?.list || []
pagination.total = (res as any)?.total ?? 0
@@ -570,7 +577,7 @@
// 查看弹窗
// ---------------------------------------------------------------------------
async function handleView(row: any) {
viewInstitutionName.value = row.institutionName || ''
viewRow.value = row
const sections: ViewSection[] = [
{
title: '基本信息',
@@ -178,7 +178,7 @@
<el-table-column prop="cellTypeName" label="细胞类型" min-width="100" align="center" header-align="center" />
<el-table-column prop="specText" label="规格" min-width="100" align="center" header-align="center" />
<el-table-column label="单价(元)" min-width="100" align="center" header-align="center">
<template #default="{ row, $index }">
<template #default="{ row }">
<el-input-number
v-model="row.unitPrice"
:precision="2"
@@ -190,7 +190,12 @@
/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="260" fixed="right" align="center" header-align="center">
<el-table-column label="备注" min-width="140" align="center" header-align="center">
<template #default="{ row }">
<el-input v-model="row.remark" placeholder="备注" clearable />
</template>
</el-table-column>
<el-table-column label="操作" width="80" fixed="right" align="center" header-align="center">
<template #default="{ $index }">
<el-button class="btn-op-item" type="danger" link size="small" @click="detailItems.splice($index, 1)">
<el-icon><Delete /></el-icon>删除
@@ -266,7 +271,8 @@
v-model:visible="viewVisible"
:title="viewRow?.systemName || '体系详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.systemCode"
code-label="体系编码"
:sections="viewSections"
/>
</section>
@@ -347,6 +353,18 @@
systemCode: [{ required: true, message: '请输入体系编码', trigger: 'blur' }]
}
/** 价格明细按 orderNum、创建时间稳定排序,避免保存后顺序颠倒 */
function sortProjectSystemDetailItems(items: any[]) {
return [...items].sort((a, b) => {
const oa = a.orderNum ?? a.order_num ?? 0
const ob = b.orderNum ?? b.order_num ?? 0
if (oa !== ob) return oa - ob
const ta = a.createTime || ''
const tb = b.createTime || ''
return ta.localeCompare(tb)
})
}
// --- Selection ---
const handleSelectionChange = (rows: any[]) => {
selectedRows.value = rows
@@ -376,7 +394,7 @@
title: '价格明细',
fields: items.map((item: any, idx: number) => ({
label: `明细 ${idx + 1}`,
value: `${item.projectName || '-'} / ${item.cellTypeName || '-'} / ${item.specText || '-'} / ${item.unitPrice != null ? item.unitPrice + ' 元' : '-'}`,
value: `${item.projectName || '-'} / ${item.cellTypeName || '-'} / ${item.specText || '-'} / ${item.unitPrice != null ? item.unitPrice + ' 元' : '-'} / ${item.remark || '-'}`,
span: true
}))
}
@@ -484,8 +502,9 @@
}
}
// Create all current detail items
for (const item of detailItems.value) {
// Create all current detail items(按列表顺序写入 orderNum,保证再次打开顺序一致)
for (let i = 0; i < detailItems.value.length; i++) {
const item = detailItems.value[i]
const itemPayload = {
sourcePriceId: item.sourcePriceId || undefined,
projectName: item.projectName || undefined,
@@ -495,7 +514,9 @@
specText: item.specText || undefined,
specId: item.specId || undefined,
cellProductTypeId: item.cellProductTypeId || undefined,
unitPrice: item.unitPrice ?? undefined
unitPrice: item.unitPrice ?? undefined,
remark: item.remark?.trim() || undefined,
orderNum: i
}
await fetchCreateProjectSystemItem(masterId, itemPayload)
}
@@ -515,7 +536,8 @@
viewRow.value = row
try {
const res = await fetchProjectSystemItems(row.id)
viewDetailItems.value = (res as any)?.list || (res as any) || []
const raw = (res as any)?.list || (res as any) || []
viewDetailItems.value = sortProjectSystemDetailItems(raw)
} catch {
viewDetailItems.value = []
}
@@ -593,7 +615,8 @@
specText: row.specText || '',
specId: row.specId || '',
cellProductTypeId: row.cellProductTypeId || '',
unitPrice: row.unitPrice ?? null
unitPrice: row.unitPrice ?? null,
remark: row.remark || ''
})
}
priceSelectorVisible.value = false
@@ -101,8 +101,8 @@
header-align="center"
>
<template #default="{ row }">
<el-tag :type="row.packType === 'bzhcb' ? 'primary' : 'warning'" size="small">
{{ row.packType === 'bzhcb' ? '标准耗材包' : '自定义耗材包' }}
<el-tag :type="packTypeTagType(row.packType)" size="small">
{{ packTypeLabel(row.packType) }}
</el-tag>
</template>
</el-table-column>
@@ -149,84 +149,40 @@
</div>
</div>
<!-- 查看弹窗 -->
<el-dialog
v-model="viewVisible"
title="查看耗材包"
<SystemViewDialog
v-model:visible="viewVisible"
:title="detail?.packName || '耗材包详情'"
:icon="Box"
:code="detail?.packCode"
code-label="编号"
:sections="viewSections"
width="960px"
class="dialog-form-layout pack-view-dialog"
align-center
destroy-on-close
:close-on-click-modal="false"
>
<div v-loading="viewLoading" class="pack-view-body">
<template v-if="viewDetail">
<div class="form-section">
<div class="section-title">基本信息</div>
<div class="pack-view-kv-grid">
<div class="pack-view-kv">
<span class="pack-view-label">编号</span>
<span class="pack-view-value">{{ viewDetail.packCode || '—' }}</span>
</div>
<div class="pack-view-kv">
<span class="pack-view-label">名称</span>
<span class="pack-view-value">{{ viewDetail.packName || '—' }}</span>
</div>
<div class="pack-view-kv">
<span class="pack-view-label">使用场景</span>
<span class="pack-view-value">{{ viewDetail.usageScene || '—' }}</span>
</div>
<div class="pack-view-kv">
<span class="pack-view-label">类型</span>
<span class="pack-view-value">{{ packTypeLabel(viewDetail.packType) }}</span>
</div>
<div class="pack-view-kv">
<span class="pack-view-label">状态</span>
<span class="pack-view-value">
<el-tag :type="viewDetail.status === 1 ? 'success' : 'danger'" size="small">
{{ viewDetail.status === 1 ? '启用' : '停用' }}
</el-tag>
</span>
</div>
<div class="pack-view-kv">
<span class="pack-view-label">备注</span>
<span class="pack-view-value">{{ viewDetail.remark || '—' }}</span>
</div>
</div>
</div>
<div class="form-section">
<div class="section-title">耗材明细</div>
<el-table :data="viewDetail.items || []" stripe class="list-table inner-table">
<el-table-column
type="index"
label="序号"
width="56"
align="center"
header-align="center"
:index="(index) => index + 1"
/>
<el-table-column prop="consumableCode" label="耗材编码" min-width="120" align="center" header-align="center" />
<el-table-column prop="consumableName" label="耗材名称" min-width="120" align="center" header-align="center" />
<el-table-column prop="specModel" label="规格型号" min-width="120" align="center" header-align="center" />
<el-table-column prop="standardUsage" label="标准用量" min-width="100" align="center" header-align="center" />
<el-table-column prop="unit" label="单位" min-width="80" align="center" header-align="center" />
<el-table-column prop="remark" label="备注" min-width="140" align="center" header-align="center" />
</el-table>
<el-empty
v-if="!(viewDetail.items || []).length"
description="暂无耗材明细"
:image-size="48"
/>
</div>
</template>
</div>
<template #footer>
<el-button class="btn-ghost" @click="viewVisible = false">
<el-icon><Close /></el-icon>
关闭
</el-button>
<template #pack-items>
<el-table
v-if="(detail?.items || []).length"
:data="detail?.items || []"
stripe
class="list-table inner-table"
>
<el-table-column
type="index"
label="序号"
width="56"
align="center"
header-align="center"
:index="(index) => index + 1"
/>
<el-table-column prop="consumableCode" label="耗材编码" min-width="120" align="center" header-align="center" />
<el-table-column prop="consumableName" label="耗材名称" min-width="120" align="center" header-align="center" />
<el-table-column prop="specModel" label="规格型号" min-width="120" align="center" header-align="center" />
<el-table-column prop="standardUsage" label="标准用量" min-width="100" align="center" header-align="center" />
<el-table-column prop="unit" label="单位" min-width="80" align="center" header-align="center" />
<el-table-column prop="remark" label="备注" min-width="140" align="center" header-align="center" />
</el-table>
<el-empty v-else description="暂无耗材明细" :image-size="48" />
</template>
</el-dialog>
</SystemViewDialog>
<!-- 新增/编辑弹窗 -->
<el-dialog
@@ -339,7 +295,7 @@
<el-dialog
v-model="selectConsumableVisible"
title="选择耗材"
width="700px"
width="960px"
append-to-body
destroy-on-close
:close-on-click-modal="false"
@@ -369,7 +325,24 @@
<el-table-column prop="consumableCode" label="耗材编码" min-width="120" align="center" header-align="center" />
<el-table-column prop="consumableName" label="耗材名称" min-width="140" align="center" header-align="center" />
<el-table-column prop="specModel" label="规格型号" min-width="120" align="center" header-align="center" />
<el-table-column prop="standardUsage" label="标准用量" min-width="100" align="center" header-align="center" />
<el-table-column prop="unit" label="单位" min-width="80" align="center" header-align="center" />
<el-table-column
prop="description"
label="描述"
min-width="140"
align="center"
header-align="center"
show-overflow-tooltip
/>
<el-table-column
prop="remark"
label="备注"
min-width="120"
align="center"
header-align="center"
show-overflow-tooltip
/>
</el-table>
<template #footer>
<el-button class="btn-ghost" @click="selectConsumableVisible = false">取消</el-button>
@@ -388,7 +361,9 @@
</template>
<script setup lang="ts">
import { Plus, Close, Check, View, RefreshLeft, Search } from '@element-plus/icons-vue'
import { Plus, Close, Check, View, RefreshLeft, Search, Box } from '@element-plus/icons-vue'
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
import type { ViewSection } from '@/components/business/system-view-dialog/index.vue'
import {
fetchConsumablePackList,
fetchConsumablePackDetail,
@@ -398,7 +373,7 @@
fetchAllConsumables
} from '@/api/production'
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
import { packTypeLabel } from '@/utils/status-tag-registry'
import { packTypeLabel, packTypeTagType } from '@/utils/status-tag-registry'
defineOptions({ name: 'ProductionConsumablePack' })
@@ -414,8 +389,40 @@
const formRef = ref()
const editingId = ref<string | null>(null)
const viewVisible = ref(false)
const viewLoading = ref(false)
const viewDetail = ref<any>(null)
const detail = ref<any>(null)
const viewSections = computed<ViewSection[]>(() => {
if (!detail.value) return []
const d = detail.value
return [
{
title: '基本信息',
fields: [
{ label: '编号', value: d.packCode },
{ label: '名称', value: d.packName },
{ label: '使用场景', value: d.usageScene },
{
label: '类型',
value: packTypeLabel(d.packType),
tagType: packTypeTagType(d.packType)
},
{
label: '状态',
value: d.status === 1 ? '启用' : '停用',
tagType: d.status === 1 ? 'success' : 'danger'
},
{ label: '备注', value: d.remark, span: true },
{ label: '创建时间', value: d.createTime },
{ label: '更新时间', value: d.updateTime }
]
},
{
title: '耗材明细',
slot: 'pack-items',
fields: []
}
]
})
const formData = reactive({
packCode: '',
@@ -491,16 +498,11 @@
}
async function handleView(row: any) {
viewVisible.value = true
viewLoading.value = true
viewDetail.value = null
try {
viewDetail.value = await fetchConsumablePackDetail(row.id)
detail.value = await fetchConsumablePackDetail(row.id)
viewVisible.value = true
} catch {
ElMessage.error('加载详情失败')
viewVisible.value = false
} finally {
viewLoading.value = false
}
}
@@ -738,34 +740,4 @@
font-weight: 600;
}
}
.pack-view-body {
min-height: 120px;
}
.pack-view-kv-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px 24px;
}
.pack-view-kv {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
.pack-view-label {
font-size: 12px;
color: var(--mint-text-muted, #64748b);
line-height: 1.4;
}
.pack-view-value {
font-size: 14px;
color: var(--mint-text, #1e293b);
line-height: 1.5;
word-break: break-word;
}
</style>
@@ -167,7 +167,8 @@
v-model:visible="viewVisible"
:title="viewRow?.consumableName || '耗材详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.consumableCode"
code-label="耗材编码"
:sections="viewSections"
/>
</section>
@@ -140,7 +140,8 @@
v-model:visible="viewVisible"
:title="viewRow?.typeName || '类型详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.typeCode"
code-label="类型编码"
:sections="viewSections"
/>
</section>
@@ -140,7 +140,8 @@
v-model:visible="viewVisible"
:title="viewRow?.categoryName || '分类详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.categoryCode"
code-label="分类编码"
:sections="viewSections"
/>
</section>
@@ -439,9 +439,27 @@
<el-input v-model="row.collectionName" placeholder="请输入采集项名称" class="inner-cell-input" />
</template>
</el-table-column>
<el-table-column label="单位" min-width="120" align="center" header-align="center">
<el-table-column label="单位" min-width="150" align="center" header-align="center">
<template #default="{ row }">
<el-input v-model="row.unit" placeholder="如 °C、mL、%" class="inner-cell-input" />
<el-select
v-model="row.unit"
placeholder="请选择单位"
clearable
filterable
remote
reserve-keyword
class="inner-cell-select"
:loading="itemUnitOptionsLoading"
:remote-method="searchItemUnitOptions"
@visible-change="(visible) => visible && searchItemUnitOptions('')"
>
<el-option
v-for="item in itemUnitOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="排序号" width="88" align="center" header-align="center">
@@ -482,7 +500,7 @@
<el-dialog
v-model="selectReagentVisible"
title="选择试剂"
width="760px"
width="1000px"
append-to-body
destroy-on-close
:close-on-click-modal="false"
@@ -512,8 +530,10 @@
<el-table-column prop="reagentCode" label="试剂编码" min-width="120" align="center" header-align="center" />
<el-table-column prop="reagentName" label="试剂名称" min-width="140" align="center" header-align="center" />
<el-table-column prop="spec" label="规格" min-width="100" align="center" header-align="center" />
<el-table-column prop="standardUsage" label="标准用量" min-width="110" align="center" header-align="center" show-overflow-tooltip />
<el-table-column prop="unit" label="单位" min-width="80" align="center" header-align="center" />
<el-table-column prop="remark" label="备注" min-width="120" align="center" header-align="center" show-overflow-tooltip />
<el-table-column prop="description" label="描述" min-width="160" align="center" header-align="center" show-overflow-tooltip />
</el-table>
<template #footer>
<el-button class="btn-ghost" @click="selectReagentVisible = false">取消</el-button>
@@ -532,7 +552,7 @@
<el-dialog
v-model="selectConsumableVisible"
title="选择耗材"
width="760px"
width="1000px"
append-to-body
destroy-on-close
:close-on-click-modal="false"
@@ -562,8 +582,10 @@
<el-table-column prop="consumableCode" label="耗材编码" min-width="120" align="center" header-align="center" />
<el-table-column prop="consumableName" label="耗材名称" min-width="140" align="center" header-align="center" />
<el-table-column prop="specModel" label="规格型号" min-width="120" align="center" header-align="center" />
<el-table-column prop="standardUsage" label="标准用量" min-width="110" align="center" header-align="center" show-overflow-tooltip />
<el-table-column prop="unit" label="单位" min-width="80" align="center" header-align="center" />
<el-table-column prop="remark" label="备注" min-width="120" align="center" header-align="center" show-overflow-tooltip />
<el-table-column prop="description" label="描述" min-width="160" align="center" header-align="center" show-overflow-tooltip />
</el-table>
<template #footer>
<el-button class="btn-ghost" @click="selectConsumableVisible = false">取消</el-button>
@@ -582,7 +604,7 @@
<el-dialog
v-model="importPackVisible"
title="从耗材包导入"
width="640px"
width="960px"
append-to-body
destroy-on-close
:close-on-click-modal="false"
@@ -608,9 +630,24 @@
<el-radio v-model="selectedPackId" :value="row.id" @click.stop />
</template>
</el-table-column>
<el-table-column prop="packName" label="耗材包名称" min-width="180" align="center" header-align="center" />
<el-table-column prop="packName" label="耗材包名称" min-width="160" align="center" header-align="center" />
<el-table-column prop="packCode" label="编码" min-width="120" align="center" header-align="center" />
<el-table-column prop="remark" label="备注" min-width="140" align="center" header-align="center" show-overflow-tooltip />
<el-table-column prop="usageScene" label="使用场景" min-width="140" align="center" header-align="center" show-overflow-tooltip />
<el-table-column label="类型" min-width="130" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="packTypeTagType(row.packType)" size="small">
{{ packTypeLabel(row.packType) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" min-width="90" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="row.status === 1 ? 'success' : 'danger'" size="small">
{{ row.status === 1 ? '启用' : '停用' }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="120" align="center" header-align="center" show-overflow-tooltip />
</el-table>
<template #footer>
<el-button class="btn-ghost" @click="importPackVisible = false">取消</el-button>
@@ -647,6 +684,8 @@
fetchAllConsumablePacks,
fetchConsumablePackDetail
} from '@/api/production'
import { fetchItemUnitList } from '@/api/admin'
import { packTypeLabel, packTypeTagType } from '@/utils/status-tag-registry'
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
defineOptions({ name: 'ProductionProcess' })
@@ -687,6 +726,8 @@
const categoryOptions = ref<any[]>([])
const sopOptions = ref<any[]>([])
const outputTypeOptions = ref<any[]>([])
const itemUnitOptions = ref<{ label: string; value: string }[]>([])
const itemUnitOptionsLoading = ref(false)
const packOptions = ref<any[]>([])
const allReagentOptions = ref<any[]>([])
const allConsumableOptions = ref<any[]>([])
@@ -813,6 +854,43 @@
}
}
function mapItemUnitOption(u: { unitName?: string; unitCode?: string }) {
const name = (u.unitName || '').trim()
const code = (u.unitCode || '').trim()
return {
label: code ? `${name}(${code})` : name,
value: name
}
}
function ensureItemUnitOption(unitName: string) {
const v = unitName?.trim()
if (!v) return
if (!itemUnitOptions.value.some((o) => o.value === v)) {
itemUnitOptions.value = [{ label: v, value: v }, ...itemUnitOptions.value]
}
}
async function searchItemUnitOptions(query: string) {
itemUnitOptionsLoading.value = true
try {
const res = await fetchItemUnitList({
page: 1,
pageSize: 100,
keyword: query?.trim() || undefined
})
itemUnitOptions.value = (res.list || []).map(mapItemUnitOption).filter((o) => o.value)
} catch {
itemUnitOptions.value = []
} finally {
itemUnitOptionsLoading.value = false
}
}
function ensureDataCollectionUnitOptions() {
dataCollectionList.value.forEach((row) => ensureItemUnitOption(row.unit))
}
// 加载所有下拉参考数据
async function loadReferenceData() {
try {
@@ -913,9 +991,9 @@
reagentCode: r.reagentCode || '',
reagentName: r.reagentName || '',
spec: r.spec || '',
standardUsage: '',
standardUsage: r.standardUsage ?? '',
unit: r.unit || '',
remark: '',
remark: r.remark ?? '',
isKeyMaterial: false
})
return true
@@ -941,6 +1019,7 @@
dialogTitle.value = '新增工艺'
resetForm()
await loadReferenceData()
await searchItemUnitOptions('')
dialogVisible.value = true
nextTick(() => {
formRef.value?.clearValidate?.()
@@ -984,6 +1063,8 @@
remark: d.remark ?? ''
})
)
await searchItemUnitOptions('')
ensureDataCollectionUnitOptions()
} catch {
ElMessage.error('加载详情失败')
}
@@ -167,7 +167,8 @@
v-model:visible="viewVisible"
:title="viewRow?.reagentName || '试剂详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.reagentCode"
code-label="试剂编码"
:sections="viewSections"
/>
</section>
+3 -1
View File
@@ -71,6 +71,7 @@
<el-table-column prop="sopCode" label="SOP编号" min-width="130" align="center" header-align="center" />
<el-table-column prop="sopName" label="SOP文档名称" min-width="180" align="center" header-align="center" />
<el-table-column prop="versionNo" label="版本号" min-width="100" align="center" header-align="center" />
<el-table-column prop="remark" label="备注" min-width="160" align="center" header-align="center" show-overflow-tooltip />
<el-table-column label="附件数" min-width="90" align="center" header-align="center">
<template #default="{ row }">
{{ row.sopAttachments ? row.sopAttachments.split(',').length : 0 }}
@@ -243,7 +244,8 @@
v-model:visible="viewVisible"
:title="viewRow?.sopName || 'SOP详情'"
:icon="ScaleToOriginal"
:meta="viewRow?.createTime || ''"
:code="viewRow?.sopCode"
code-label="SOP编号"
:sections="viewSections"
>
<template #append>