|
|
@@ -18,23 +18,59 @@
|
|
|
<el-table-column prop="productModel" label="产品型号" min-width="140" show-overflow-tooltip resizable />
|
|
|
<el-table-column prop="productionBatchNo" label="生产批号" min-width="140" show-overflow-tooltip resizable />
|
|
|
<el-table-column prop="productionWorkOrder" label="生产工单" min-width="150" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="resultJudgement" label="结果判定" min-width="110" resizable />
|
|
|
- <el-table-column prop="attachment" label="附件" min-width="100" resizable />
|
|
|
- <el-table-column prop="remark" label="备注" min-width="160" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="inspector" label="检验人" min-width="120" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="processCode" label="工序编码" min-width="130" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="processName" label="工序名称" min-width="140" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="productionPerson" label="生产人员" min-width="120" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="sampleQty" label="样本量" min-width="100" resizable />
|
|
|
- <el-table-column prop="formNo" label="表单编号" min-width="140" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="versionNo" label="版本号" min-width="100" resizable />
|
|
|
+ <el-table-column prop="businessStatus" label="流程状态" min-width="130" resizable>
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag v-if="row.businessStatus" size="small" :type="businessStatusTagType(row.businessStatus)">
|
|
|
+ {{ businessStatusText(row.businessStatus) }}
|
|
|
+ </el-tag>
|
|
|
+ <span v-else>未发起</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="resultJudgement" label="结果判定" min-width="110" resizable>
|
|
|
+ <template #default="{ row }">{{ judgementText(row.resultJudgement) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="attachment" label="附件" min-width="100" resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.attachment) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="160" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.remark) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspector" label="检验人" min-width="120" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspector) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="processCode" label="工序编码" min-width="130" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.processCode) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="processName" label="工序名称" min-width="140" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.processName) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productionPerson" label="生产人员" min-width="120" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.productionPerson) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sampleQty" label="样本量" min-width="100" resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.sampleQty) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="formNo" label="表单编号" min-width="140" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.formNo) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="versionNo" label="版本号" min-width="100" resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.versionNo) }}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="effectiveDate" label="生效日期" min-width="150" resizable>
|
|
|
<template #default="{ row }">{{ fmtDate(row.effectiveDate) }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="materialCode" label="物料编码" min-width="140" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="materialName" label="物料名称" min-width="160" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="inspecStandardVersion" label="检规版本" min-width="110" resizable />
|
|
|
- <el-table-column prop="inspecStandardCode" label="检规编号" min-width="130" show-overflow-tooltip resizable />
|
|
|
+ <el-table-column prop="materialCode" label="物料编码" min-width="140" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.materialCode) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialName" label="物料名称" min-width="160" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.materialName) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspecStandardVersion" label="检规版本" min-width="110" resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspecStandardVersion) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspecStandardCode" label="检规编号" min-width="130" show-overflow-tooltip resizable>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspecStandardCode) }}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" width="90" fixed="right">
|
|
|
<template #default="{ row }">
|
|
|
<el-button link type="primary" @click="openDetail(row)">查看</el-button>
|
|
|
@@ -63,6 +99,11 @@
|
|
|
<div class="flow-status-line">
|
|
|
<el-tag size="small" :type="flowTagType">{{ flowStatusText }}</el-tag>
|
|
|
<span class="flow-msg">{{ flowState.message }}</span>
|
|
|
+ <!-- 当前节点:仅在流程进行中且后端给出中文节点名时展示。
|
|
|
+ 终态时后端返回 null,此处即不显示,避免残留旧节点造成误导。 -->
|
|
|
+ <span v-if="!flowState.isCompleted && flowState.currentNodeName" class="flow-meta">
|
|
|
+ 当前节点:{{ flowState.currentNodeName }}
|
|
|
+ </span>
|
|
|
<span v-if="flowState.inspectorName" class="flow-meta">检验员:{{ flowState.inspectorName }}</span>
|
|
|
<span v-if="flowState.supervisorName" class="flow-meta">主管:{{ flowState.supervisorName }}</span>
|
|
|
</div>
|
|
|
@@ -117,57 +158,87 @@
|
|
|
<el-descriptions-item label="处置类型">{{ dispTypeText(disposition.dispositionType) }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="处置数量">{{ disposition.dispositionQty ?? '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="返工/让步/报废">{{ disposition.reworkQty ?? 0 }} / {{ disposition.concessionQty ?? 0 }} / {{ disposition.scrapQty ?? 0 }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="责任部门">{{ disposition.responsibilityDept || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="责任人">{{ disposition.responsibleUser || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="处置人">{{ disposition.submittedByName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="处置意见" :span="3">{{ disposition.dispositionOpinion || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="责任部门">{{ displayValue(disposition.responsibilityDept) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="责任人">{{ displayValue(disposition.responsibleUser) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="处置人">{{ displayValue(disposition.submittedByName) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="处置意见" :span="3">{{ displayValue(disposition.dispositionOpinion) }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<el-descriptions :column="3" border size="small">
|
|
|
- <el-descriptions-item label="单据编号">{{ detail.billNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="产品型号">{{ detail.productModel || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="生产批号">{{ detail.productionBatchNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="生产工单">{{ detail.productionWorkOrder || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="结果判定">{{ detail.resultJudgement || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="检验状态">{{ detail.inspectionStatus || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="检验人">{{ detail.inspector || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="工序编码">{{ detail.processCode || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="工序名称">{{ detail.processName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="生产人员">{{ detail.productionPerson || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="样本量">{{ detail.sampleQty ?? '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="生效日期">{{ fmtDate(detail.effectiveDate) || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="物料编码">{{ detail.materialCode || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="物料名称">{{ detail.materialName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="表单编号">{{ detail.formNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="版本号">{{ detail.versionNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="检规版本">{{ detail.inspecStandardVersion || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="检规编号">{{ detail.inspecStandardCode || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="备注" :span="3">{{ detail.remark || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="单据编号">{{ displayValue(detail.billNo) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="产品型号">{{ displayValue(detail.productModel) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生产批号">{{ displayValue(detail.productionBatchNo) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生产工单">{{ displayValue(detail.productionWorkOrder) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="结果判定">{{ judgementText(detail.resultJudgement) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检验状态">{{ displayValue(detail.inspectionStatus) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检验人">{{ displayValue(detail.inspector) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="工序编码">{{ displayValue(detail.processCode) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="工序名称">{{ displayValue(detail.processName) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生产人员">{{ displayValue(detail.productionPerson) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="样本量">{{ displayValue(detail.sampleQty) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生效日期">{{ fmtDate(detail.effectiveDate) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="物料编码">{{ displayValue(detail.materialCode) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="物料名称">{{ displayValue(detail.materialName) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="表单编号">{{ displayValue(detail.formNo) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="版本号">{{ displayValue(detail.versionNo) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检规版本">{{ displayValue(detail.inspecStandardVersion) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检规编号">{{ displayValue(detail.inspecStandardCode) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="备注" :span="3">{{ displayValue(detail.remark) }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
|
|
|
<div class="detail-lines-title">检验明细</div>
|
|
|
<el-table :data="detailLines" border stripe size="small">
|
|
|
<el-table-column type="index" label="#" width="50" />
|
|
|
- <el-table-column prop="inspectionItem" label="检验项目" min-width="140" show-overflow-tooltip />
|
|
|
- <el-table-column prop="inspectionBasis" label="检验依据" min-width="140" show-overflow-tooltip />
|
|
|
- <el-table-column prop="processCode" label="工序编码" min-width="110" show-overflow-tooltip />
|
|
|
- <el-table-column prop="processName" label="工序名称" min-width="120" show-overflow-tooltip />
|
|
|
- <el-table-column prop="inspectionMethod" label="检验方法" min-width="120" show-overflow-tooltip />
|
|
|
- <el-table-column prop="technicalStandard" label="技术标准" min-width="120" show-overflow-tooltip />
|
|
|
- <el-table-column prop="upperLimit" label="上限" min-width="90" />
|
|
|
- <el-table-column prop="lowerLimit" label="下限" min-width="90" />
|
|
|
- <el-table-column prop="measurementInstrument" label="测量仪器" min-width="120" show-overflow-tooltip />
|
|
|
- <el-table-column prop="sampleQty" label="样本量" min-width="80" />
|
|
|
- <el-table-column prop="inspectionQty" label="检验数量" min-width="90" />
|
|
|
- <el-table-column prop="unqualifiedQty" label="不合格数" min-width="90" />
|
|
|
- <el-table-column prop="resultJudgement" label="判定" min-width="80" />
|
|
|
- <el-table-column prop="inspector" label="检验人" min-width="100" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="inspectionItem" label="检验项目" min-width="140" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspectionItem) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspectionBasis" label="检验依据" min-width="140" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspectionBasis) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="processCode" label="工序编码" min-width="110" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.processCode) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="processName" label="工序名称" min-width="120" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.processName) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspectionMethod" label="检验方法" min-width="120" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspectionMethod) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="technicalStandard" label="技术标准" min-width="120" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.technicalStandard) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="upperLimit" label="上限" min-width="90">
|
|
|
+ <template #default="{ row }">{{ displayValue(row.upperLimit) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="lowerLimit" label="下限" min-width="90">
|
|
|
+ <template #default="{ row }">{{ displayValue(row.lowerLimit) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="measurementInstrument" label="测量仪器" min-width="120" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.measurementInstrument) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sampleQty" label="样本量" min-width="80">
|
|
|
+ <template #default="{ row }">{{ displayValue(row.sampleQty) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspectionQty" label="检验数量" min-width="90">
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspectionQty) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="unqualifiedQty" label="不合格数" min-width="90">
|
|
|
+ <template #default="{ row }">{{ displayValue(row.unqualifiedQty) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="resultJudgement" label="判定" min-width="80">
|
|
|
+ <template #default="{ row }">{{ judgementText(row.resultJudgement) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inspector" label="检验人" min-width="100" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.inspector) }}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="inspectionTime" label="检验时间" min-width="150">
|
|
|
<template #default="{ row }">{{ fmtDateTime(row.inspectionTime) }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="remark" label="备注" min-width="140" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="140" show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">{{ displayValue(row.remark) }}</template>
|
|
|
+ </el-table-column>
|
|
|
<template #empty>
|
|
|
<el-empty description="暂无明细" />
|
|
|
</template>
|
|
|
@@ -182,6 +253,7 @@ import { computed, onActivated, onMounted, reactive, ref } from 'vue';
|
|
|
import { useRoute } from 'vue-router';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import AidopDemoShell from '/@/views/aidop/components/AidopDemoShell.vue';
|
|
|
+import { formatDate } from '/@/utils/formatTime';
|
|
|
import {
|
|
|
fetchIpqcInspectionList,
|
|
|
fetchIpqcInspectionDetail,
|
|
|
@@ -251,14 +323,76 @@ function onSizeChange() {
|
|
|
loadList();
|
|
|
}
|
|
|
|
|
|
-function fmtDate(v?: string) {
|
|
|
- if (!v) return '';
|
|
|
- return v.length >= 10 ? v.slice(0, 10) : v;
|
|
|
+// ───────────────────────── 展示层 formatter ─────────────────────────
|
|
|
+// 只影响渲染。提交 payload、v-model、select option value 一律保持后端原始枚举/数值,
|
|
|
+// 严禁把中文写回业务契约。
|
|
|
+
|
|
|
+/** 空值统一占位。0 / false 是合法业务值必须原样显示,故不可用 `||`。 */
|
|
|
+function displayValue(v: unknown) {
|
|
|
+ if (v === null || v === undefined) return '-';
|
|
|
+ if (typeof v === 'string' && v.trim() === '') return '-';
|
|
|
+ return v as string | number | boolean;
|
|
|
+}
|
|
|
+
|
|
|
+/** 解析后端日期串(支持 'YYYY-MM-DD HH:mm:ss' 与 ISO-T),不可解析返回 null。 */
|
|
|
+function toDate(v?: string | null) {
|
|
|
+ if (!v) return null;
|
|
|
+ const d = new Date(String(v).replace(' ', 'T'));
|
|
|
+ return isNaN(d.getTime()) ? null : d;
|
|
|
}
|
|
|
|
|
|
-function fmtDateTime(v?: string) {
|
|
|
- if (!v) return '';
|
|
|
- return v.length > 19 ? v.slice(0, 19).replace('T', ' ') : v.replace('T', ' ');
|
|
|
+function fmtDate(v?: string | null) {
|
|
|
+ const d = toDate(v);
|
|
|
+ return d ? formatDate(d, 'YYYY-mm-dd') : '-';
|
|
|
+}
|
|
|
+
|
|
|
+function fmtDateTime(v?: string | null) {
|
|
|
+ const d = toDate(v);
|
|
|
+ return d ? formatDate(d, 'YYYY-mm-dd HH:MM:SS') : '-';
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 流程业务状态字典。key 同时覆盖 businessStatus(扩展表)与 flowStatus(ApprovalFlow 实例)两套原始值,
|
|
|
+ * 二者大小写不同、互不冲突。**未知枚举原样返回**——后端将来新增状态时宁可露出原值,也不静默显示"未知"。
|
|
|
+ */
|
|
|
+const BUSINESS_STATUS_TEXT: Record<string, string> = {
|
|
|
+ // businessStatus(ado_s6_ipqc_inspection_flow_state.business_status)
|
|
|
+ INSPECTING: '检验中',
|
|
|
+ PENDING_REVIEW: '待主管审核',
|
|
|
+ APPROVED: '已通过',
|
|
|
+ RETURNED: '已退回',
|
|
|
+ PENDING_DISPOSITION: '待质量处置',
|
|
|
+ DISPOSED: '已处置',
|
|
|
+ // flowStatus(尚无 businessStatus 时的兜底来源)
|
|
|
+ NotStarted: '待检验',
|
|
|
+ Running: '流程进行中',
|
|
|
+ Approved: '已通过',
|
|
|
+};
|
|
|
+
|
|
|
+function businessStatusText(v?: string | null) {
|
|
|
+ if (v === null || v === undefined || v === '') return '-';
|
|
|
+ return BUSINESS_STATUS_TEXT[v] ?? v;
|
|
|
+}
|
|
|
+
|
|
|
+/** 状态标签颜色(与文案分离,沿用页面既有色彩语义)。 */
|
|
|
+function businessStatusTagType(v?: string | null) {
|
|
|
+ if (v === 'APPROVED' || v === 'DISPOSED' || v === 'Approved') return 'success';
|
|
|
+ if (v === 'RETURNED') return 'warning';
|
|
|
+ if (v === 'PENDING_DISPOSITION') return 'danger';
|
|
|
+ if (v === 'PENDING_REVIEW') return 'primary';
|
|
|
+ return 'info';
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 结果判定字典,与录入下拉「合格(0) / 不合格(1)」同源。
|
|
|
+ * 后端 result_judgement 为字符串字典码,前端表单为 number,故两型都要认。
|
|
|
+ * **0 是合法值**,禁止用 truthy 判断。
|
|
|
+ */
|
|
|
+function judgementText(v?: string | number | null) {
|
|
|
+ if (v === 0 || v === '0') return '合格';
|
|
|
+ if (v === 1 || v === '1') return '不合格';
|
|
|
+ if (v === null || v === undefined || (typeof v === 'string' && v.trim() === '')) return '-';
|
|
|
+ return String(v);
|
|
|
}
|
|
|
|
|
|
// 详情 drawer:头 + 明细(确定子集列)+ 检验员/主管流程区。
|
|
|
@@ -311,15 +445,10 @@ const submitForm = reactive<{ jgpd: number | null; jyhgsl: number; jybhgsl: numb
|
|
|
bz: '',
|
|
|
});
|
|
|
|
|
|
-const flowStatusText = computed(() => flowState.value.businessStatus || flowState.value.flowStatus || '未发起');
|
|
|
-const flowTagType = computed(() => {
|
|
|
- const s = flowState.value.businessStatus;
|
|
|
- if (s === 'APPROVED' || s === 'DISPOSED') return 'success';
|
|
|
- if (s === 'RETURNED') return 'warning';
|
|
|
- if (s === 'PENDING_DISPOSITION') return 'danger';
|
|
|
- if (s === 'PENDING_REVIEW') return 'primary';
|
|
|
- return 'info';
|
|
|
-});
|
|
|
+/** 原始状态值(businessStatus 优先,回落 flowStatus)——只用于取文案/颜色,不直接上屏。 */
|
|
|
+const flowStatusRaw = computed(() => flowState.value.businessStatus || flowState.value.flowStatus || '');
|
|
|
+const flowStatusText = computed(() => (flowStatusRaw.value ? businessStatusText(flowStatusRaw.value) : '未发起'));
|
|
|
+const flowTagType = computed(() => businessStatusTagType(flowStatusRaw.value));
|
|
|
|
|
|
// 主管整批判定表单 + N3 质量处置表单 + 已有处置
|
|
|
const supervisorForm = reactive<{ jgpd: number | null }>({ jgpd: null });
|