| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- /**
- * QMS 质量管理系统模块配置:定义不同检验业务在导航、列表、表单等方面的差异。
- * 通过集中配置,页面组件可以根据当前模块动态渲染对应的文案、字段和表格列。
- */
- export const QMS_MODULES: Record<string, any> = {
- iqc: {
- code: 'iqc',
- name: 'IQC',
- label: '来料检验',
- systemTitle: '来料检验管理系统',
- defaultRoute: '/qms/iqc/task/list',
- navItems: [
- { key: 'applications', label: '来料检验申请', path: '/qms/iqc/apply/list' },
- { key: 'tasks', label: '来料检验任务', path: '/qms/iqc/task/list' },
- { key: 'favorites', label: '我的关注', path: '/qms/iqc/favorites' },
- { key: 'help', label: '帮助', path: '/qms/iqc/help' }
- ],
- applicationList: {
- title: '来料检验申请',
- actionButtons: {
- create: '新建申请',
- guide: true
- },
- keywordFields: ['id'],
- keywordPlaceholder: '搜索单据编号',
- columns: [
- { type: 'selection', width: 55 },
- { key: 'id', label: '单据编号', width: 200, type: 'applicationLink' },
- { key: 'applicantName', label: '申请人', width: 100 },
- { key: 'applyTime', label: '申请时间', width: 160, type: 'datetime' },
- { key: 'materialCount', label: '物料数', width: 100, type: 'number' },
- { key: 'remark', label: '备注', minWidth: 200, type: 'tooltip' }
- ],
- advancedFilters: [
- { key: 'statusList', label: '单据状态', type: 'select', multiple: true, optionsKey: 'applicationStatuses' }
- ]
- },
- applicationForm: {
- title: '来料检验申请单',
- baseFields: [
- { key: 'applicantName', label: '申请人', type: 'input', required: true, span: 8 },
- { key: 'applyTime', label: '申请时间', type: 'datetime', required: true, span: 8 },
- { key: 'businessType', label: '业务类型', type: 'select', span: 8, options: ['常规', '精密', '特殊'] },
- { key: 'department', label: '组织/部门', type: 'input', span: 8 }
- ],
- detail: {
- title: '物料明细',
- addable: true,
- columns: [
- { key: 'materialCode', label: '物料编码', type: 'input', width: 140, required: true },
- { key: 'materialName', label: '名称', type: 'input', width: 160, required: true },
- { key: 'specification', label: '规格', type: 'input', width: 160 },
- { key: 'batch', label: '批次', type: 'input', width: 140 },
- { key: 'inspectStatus', label: '状态', type: 'select', width: 120, options: ['待检验', '检验中', '检验完成'] },
- { key: 'quantity', label: '数量', type: 'number', width: 120, min: 0 },
- { key: 'unit', label: '单位', type: 'input', width: 100 },
- { key: 'remark', label: '备注', type: 'input', minWidth: 200 }
- ],
- defaultRow: {
- materialCode: '',
- materialName: '',
- specification: '',
- batch: '',
- inspectStatus: '待检验',
- quantity: 1,
- unit: 'PCS',
- remark: ''
- }
- },
- extraSections: [],
- remarkLabel: '总体备注'
- },
- taskList: {
- title: '来料检验任务',
- tabs: [
- { key: 'pending', label: '待检验' },
- { key: 'processing', label: '检验中' },
- { key: 'completed', label: '已完成' }
- ],
- keywordFields: ['applicationId', 'sourceOrderNum', 'batch'],
- columns: [
- { type: 'selection', width: 55 },
- { key: 'status', label: '状态', width: 90, type: 'status' },
- { key: 'id', label: '任务编号', width: 140 },
- { key: 'applicationId', label: '单据编号', width: 160, type: 'taskLink' },
- { key: 'sourceOrderNum', label: '来源单号', width: 160 },
- { key: 'batch', label: '批次', width: 130, type: 'batch' },
- { key: 'quantity', label: '数量', width: 100 },
- { key: 'unit', label: '单位', width: 80 },
- { key: 'applyTime', label: '申请时间', width: 170, type: 'datetime' },
- { key: 'remark', label: '备注', minWidth: 200, type: 'tooltip' }
- ],
- advancedFilters: []
- },
- },
- ipqc: {
- code: 'ipqc',
- name: 'IPQC',
- label: '过程检验',
- systemTitle: 'IPQC 过程检验管理',
- defaultRoute: '/qms/ipqc/task/list',
- navItems: [
- { key: 'applications', label: '过程检验申请', path: '/qms/ipqc/apply/list' },
- { key: 'tasks', label: '过程检验任务', path: '/qms/ipqc/task/list' },
- { key: 'favorites', label: '我的关注', path: '/qms/ipqc/favorites' },
- { key: 'help', label: '帮助', path: '/qms/ipqc/help' }
- ],
- applicationList: {
- title: '过程检验申请',
- actionButtons: { create: '新建申请', import: true, export: true, guide: true },
- keywordFields: ['id', 'workOrder', 'remark'],
- columns: [
- { type: 'selection', width: 55 },
- { key: 'id', label: '单据编号', width: 140, type: 'applicationLink' },
- { key: 'workOrder', label: '生产订单', width: 160 },
- { key: 'processStep', label: '工序/工步', width: 160, type: 'formatter', formatter: (row: any) => `${row.process || ''}/${row.step || ''}` },
- { key: 'lineStationEquipment', label: '线体/工位/设备', minWidth: 220, type: 'formatter', formatter: (row: any) => `${row.line || ''} / ${row.station || ''} / ${row.equipment || ''}` },
- { key: 'shift', label: '班次', width: 90 },
- { key: 'applicantName', label: '申请人', width: 100 },
- { key: 'applyTime', label: '申请时间', width: 170, type: 'datetime' },
- { key: 'status', label: '单据状态', width: 110, type: 'status' },
- { key: 'detailCount', label: '明细条数', width: 110, type: 'number' },
- { key: 'remark', label: '备注', minWidth: 200, type: 'tooltip' }
- ],
- advancedFilters: [
- { key: 'applicantIds', label: '申请人', type: 'select', multiple: true, optionsKey: 'applicants' },
- { key: 'statusList', label: '单据状态', type: 'select', multiple: true, optionsKey: 'applicationStatuses' },
- { key: 'processes', label: '工序/工步', type: 'select', multiple: true, optionsKey: 'processes' },
- { key: 'lines', label: '线体/工位/设备', type: 'select', multiple: true, optionsKey: 'lines' },
- { key: 'shifts', label: '班次', type: 'select', multiple: true, optionsKey: 'shifts' },
- { key: 'timeRange', label: '申请时间', type: 'datetimerange' }
- ]
- },
- applicationForm: {
- title: 'IPQC 过程检验申请单',
- baseFields: [
- { key: 'applicantName', label: '申请人', type: 'input', required: true, span: 8 },
- { key: 'applyTime', label: '申请时间', type: 'datetime', required: true, span: 8 },
- { key: 'workOrder', label: '生产订单/工单号', type: 'input', required: true, span: 8 },
- { key: 'process', label: '工序/工步', type: 'input', required: true, span: 8 },
- { key: 'line', label: '线体/工位/设备', type: 'input', required: true, span: 8 },
- { key: 'shift', label: '班次', type: 'select', span: 8, options: ['早班', '中班', '夜班'] },
- { key: 'samplingPlan', label: '抽样方案', type: 'input', span: 8 },
- { key: 'inspectionLevel', label: '检验水准', type: 'input', span: 8 },
- { key: 'aql', label: 'AQL', type: 'input', span: 8 },
- { key: 'processStage', label: '过程阶段', type: 'select', span: 8, options: ['首件', '巡检', '完工'] }
- ],
- detail: {
- title: '检验项目',
- addable: true,
- columns: [
- { key: 'category', label: '项目类别', type: 'select', width: 140, options: ['尺寸', '外观', '功能'] },
- { key: 'itemName', label: '项目名称', type: 'input', width: 200 },
- { key: 'standard', label: '标准', type: 'input', width: 200 },
- { key: 'upperLimit', label: '上限', type: 'input', width: 120 },
- { key: 'lowerLimit', label: '下限', type: 'input', width: 120 },
- { key: 'unit', label: '单位', type: 'input', width: 100 },
- { key: 'sampleSize', label: '抽样量', type: 'number', width: 110, min: 0 },
- { key: 'remark', label: '备注', type: 'input', minWidth: 200 }
- ],
- defaultRow: { category: '尺寸', itemName: '', standard: '', upperLimit: '', lowerLimit: '', unit: '', sampleSize: 0, remark: '' }
- },
- extraSections: [{ key: 'attachments', title: '附件', enable: true }],
- remarkLabel: '总体备注'
- },
- taskList: {
- title: '过程检验任务',
- tabs: [
- { key: 'pending', label: '待检验' },
- { key: 'processing', label: '检验中' },
- { key: 'completed', label: '已完成' }
- ],
- keywordFields: ['applicationId', 'workOrder', 'materialName'],
- columns: [
- { type: 'selection', width: 55 },
- { key: 'status', label: '状态', width: 90, type: 'status' },
- { key: 'id', label: '任务编号', width: 130 },
- { key: 'applicationId', label: '单据编号', width: 140, type: 'taskLink' },
- { key: 'workOrder', label: '生产订单', width: 160 },
- { key: 'process', label: '工序/工步', width: 160, type: 'formatter', formatter: (row: any) => `${row.process || ''}/${row.step || ''}` },
- { key: 'lineStationEquipment', label: '线体/工位/设备', minWidth: 220, type: 'formatter', formatter: (row: any) => `${row.line || ''} / ${row.station || ''} / ${row.equipment || ''}` },
- { key: 'materialInfo', label: '物料信息', minWidth: 220, type: 'textLines', lines: ['materialCode', 'materialName'] },
- { key: 'batch', label: '批次', width: 130, type: 'batch' },
- { key: 'responsibleName', label: '负责人', width: 100 },
- { key: 'priority', label: '优先级', width: 100, type: 'priority' },
- { key: 'startTime', label: '开始时间', width: 170, type: 'datetime' },
- { key: 'completeTime', label: '完成时间', width: 170, type: 'datetime' },
- { key: 'remark', label: '备注', minWidth: 200, type: 'tooltip' }
- ],
- advancedFilters: [
- { key: 'statusList', label: '状态', type: 'select', multiple: true, optionsKey: 'taskStatuses' },
- { key: 'workOrders', label: '生产订单', type: 'select', multiple: true, optionsKey: 'workOrders' },
- { key: 'processes', label: '工序/工步', type: 'select', multiple: true, optionsKey: 'processes' },
- { key: 'lines', label: '线体/工位/设备', type: 'select', multiple: true, optionsKey: 'lines' },
- { key: 'responsibleIds', label: '负责人', type: 'select', multiple: true, optionsKey: 'responsibles' },
- { key: 'priorities', label: '优先级', type: 'select', multiple: true, options: [{ label: '高', value: 'high' }, { label: '中', value: 'medium' }, { label: '低', value: 'low' }] },
- { key: 'timeRange', label: '时间范围', type: 'datetimerange' }
- ]
- },
- },
- fqc: {
- code: 'fqc',
- name: 'FQC',
- label: '成品检验',
- systemTitle: 'FQC 成品检验管理',
- defaultRoute: '/qms/fqc/task/list',
- navItems: [
- { key: 'applications', label: '成品检验申请', path: '/qms/fqc/apply/list' },
- { key: 'tasks', label: '成品检验任务', path: '/qms/fqc/task/list' },
- { key: 'favorites', label: '我的关注', path: '/qms/fqc/favorites' },
- { key: 'help', label: '帮助', path: '/qms/fqc/help' }
- ],
- applicationList: {
- title: '成品检验申请',
- actionButtons: { create: '新建申请', import: true, export: true, guide: true },
- keywordFields: ['id', 'productCode', 'customer', 'remark'],
- columns: [
- { type: 'selection', width: 55 },
- { key: 'id', label: '单据编号', width: 140, type: 'applicationLink' },
- { key: 'productInfo', label: '成品编码/名称/型号', minWidth: 260, type: 'textLines', lines: ['productCode', 'productName', 'productModel'] },
- { key: 'customer', label: '客户', width: 160 },
- { key: 'orderInfo', label: '订单/出货单', width: 200, type: 'formatter', formatter: (row: any) => `${row.salesOrder || ''} / ${row.shippingOrder || ''}` },
- { key: 'packageBatch', label: '包装批次/箱号', width: 180 },
- { key: 'applicantName', label: '申请人', width: 100 },
- { key: 'applyTime', label: '申请时间', width: 170, type: 'datetime' },
- { key: 'status', label: '单据状态', width: 110, type: 'status' },
- { key: 'detailCount', label: '明细条数', width: 110, type: 'number' },
- { key: 'remark', label: '备注', minWidth: 200, type: 'tooltip' }
- ],
- advancedFilters: [
- { key: 'applicantIds', label: '申请人', type: 'select', multiple: true, optionsKey: 'applicants' },
- { key: 'statusList', label: '单据状态', type: 'select', multiple: true, optionsKey: 'applicationStatuses' },
- { key: 'customers', label: '客户', type: 'select', multiple: true, optionsKey: 'customers' },
- { key: 'orders', label: '订单/出货单', type: 'select', multiple: true, optionsKey: 'orders' },
- { key: 'packageBatchList', label: '批次/箱号', type: 'select', multiple: true, optionsKey: 'packageBatches' },
- { key: 'timeRange', label: '申请时间', type: 'datetimerange' }
- ]
- },
- applicationForm: {
- title: 'FQC 成品检验申请单',
- baseFields: [
- { key: 'applicantName', label: '申请人', type: 'input', required: true, span: 8 },
- { key: 'applyTime', label: '申请时间', type: 'datetime', required: true, span: 8 },
- { key: 'customer', label: '客户', type: 'input', required: true, span: 8 },
- { key: 'salesOrder', label: '销售订单/出货单', type: 'input', required: true, span: 8 },
- { key: 'packageBatch', label: '包装批次/箱号范围', type: 'input', span: 8 },
- { key: 'productModel', label: '成品型号', type: 'input', span: 8 },
- { key: 'samplingPlan', label: '抽样方案', type: 'input', span: 8 },
- { key: 'inspectionLevel', label: '检验水准', type: 'input', span: 8 },
- { key: 'aql', label: 'AQL', type: 'input', span: 8 },
- { key: 'customerRequirement', label: '客户特殊要求', type: 'textarea', span: 24 }
- ],
- detail: {
- title: '检验项目',
- addable: true,
- columns: [
- { key: 'category', label: '项目类别', type: 'select', width: 160, options: ['外观', '功能', '尺寸', '可靠性抽测'] },
- { key: 'itemName', label: '项目名称', type: 'input', width: 200 },
- { key: 'standard', label: '标准', type: 'input', width: 200 },
- { key: 'upperLimit', label: '上限', type: 'input', width: 120 },
- { key: 'lowerLimit', label: '下限', type: 'input', width: 120 },
- { key: 'unit', label: '单位', type: 'input', width: 100 },
- { key: 'sampleSize', label: '抽样量', type: 'number', width: 110, min: 0 },
- { key: 'remark', label: '备注', type: 'input', minWidth: 200 }
- ],
- defaultRow: { category: '外观', itemName: '', standard: '', upperLimit: '', lowerLimit: '', unit: '', sampleSize: 0, remark: '' }
- },
- extraSections: [{ key: 'attachments', title: '附件', enable: true }],
- remarkLabel: '总体备注'
- },
- taskList: {
- title: '成品检验任务',
- tabs: [
- { key: 'pending', label: '待检验' },
- { key: 'processing', label: '检验中' },
- { key: 'completed', label: '已完成' }
- ],
- keywordFields: ['applicationId', 'productName', 'customer'],
- columns: [
- { type: 'selection', width: 55 },
- { key: 'status', label: '状态', width: 90, type: 'status' },
- { key: 'id', label: '任务编号', width: 130 },
- { key: 'applicationId', label: '单据编号', width: 150, type: 'taskLink' },
- { key: 'productInfo', label: '成品信息', minWidth: 240, type: 'textLines', lines: ['productCode', 'productName', 'productModel'] },
- { key: 'customer', label: '客户', width: 160 },
- { key: 'packageBatch', label: '包装批次/箱号', width: 180 },
- { key: 'releaseStatus', label: '判定/放行', width: 140 },
- { key: 'responsibleName', label: '负责人', width: 100 },
- { key: 'priority', label: '优先级', width: 100, type: 'priority' },
- { key: 'startTime', label: '开始时间', width: 170, type: 'datetime' },
- { key: 'completeTime', label: '完成时间', width: 170, type: 'datetime' },
- { key: 'remark', label: '备注', minWidth: 200, type: 'tooltip' }
- ],
- advancedFilters: [
- { key: 'statusList', label: '状态', type: 'select', multiple: true, optionsKey: 'taskStatuses' },
- { key: 'customers', label: '客户', type: 'select', multiple: true, optionsKey: 'customers' },
- { key: 'productModels', label: '型号', type: 'select', multiple: true, optionsKey: 'productModels' },
- { key: 'packageBatchList', label: '批次/箱号', type: 'select', multiple: true, optionsKey: 'packageBatches' },
- { key: 'responsibleIds', label: '负责人', type: 'select', multiple: true, optionsKey: 'responsibles' },
- { key: 'priorities', label: '优先级', type: 'select', multiple: true, options: [{ label: '高', value: 'high' }, { label: '中', value: 'medium' }, { label: '低', value: 'low' }] },
- { key: 'timeRange', label: '时间范围', type: 'datetimerange' }
- ]
- },
- }
- }
- export const QMS_MODULE_CODES = Object.keys(QMS_MODULES)
- export const DEFAULT_QMS_MODULE = 'iqc'
- export const SPEC_MODULE = {
- code: 'spec',
- label: '检规管理',
- systemTitle: '检规管理中心',
- navItems: [
- { key: 'index', label: '检规索引', path: '/qms/spec/index' },
- { key: 'import', label: '导入检规', path: '/qms/spec/import' }
- ]
- }
- export const QMS_MODULE_OPTIONS = Object.values(QMS_MODULES).map((item: any) => ({
- code: item.code,
- label: `${item.name} ${item.label}`
- }))
- export const getQmsModuleConfig = (code: string) => QMS_MODULES[code] || QMS_MODULES[DEFAULT_QMS_MODULE]
|