From a579f0e15cb01ea9b852e4ce86b5604986a3c4ee Mon Sep 17 00:00:00 2001 From: geht <2947093423@qq.com> Date: Tue, 26 May 2026 10:10:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=82=E7=85=A7=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E6=B7=B7=E5=90=88=E6=AD=A5=E9=AA=A4=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=8C=85=E5=90=AB=E6=B7=B7=E5=90=88=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E3=80=81=E7=8A=B6=E6=80=81=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=8F=8A=E5=8E=86=E5=8F=B2=E6=AD=A5=E9=AA=A4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=EF=BC=8C=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BD=93=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesXslMixingSpec/MesXslMixingSpec.data.ts | 70 ++++++ .../components/MesXslMixingSpecModal.vue | 42 ++++ ...MesXslMixingSpecStepHistorySelectModal.vue | 232 ++++++++++++++++++ 3 files changed, 344 insertions(+) create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecStepHistorySelectModal.vue diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts b/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts index 734c5bb..7b7ad45 100644 --- a/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts @@ -1115,3 +1115,73 @@ export function applyMixingMaterialFromSelection(row: Recordable, material: Reco //update-end---author:cursor ---date:20260525 for:【XSLMES-20260525-A53】种类仅读配置表,移除小类名兜底----------- } //update-end---author:cursor ---date:20260525 for:【XSLMES-20260525-A50】混炼示方密炼物料选料弹窗与种类解析----------- + +//update-begin---author:cursor ---date:20260526 for:【XSLMES-20260526-A58】参照历史混合步骤选择弹窗----------- +/** 混合步骤可复制的业务字段 */ +export const MIXING_STEP_COPY_FIELD_KEYS = [ + 'sortNo', + 'actionName', + 'actionSec', + 'protectSec', + 'tempC', + 'powerKw', + 'energyKwh', + 'comboMode', + 'speedRpm', + 'pressureMpa', + 'boltPercent', +] as const; + +/** 判断混合步骤行是否含有效业务数据 */ +export function isMixingStepRowFilled(row: Recordable = {}): boolean { + return MIXING_STEP_COPY_FIELD_KEYS.some((key) => { + const value = row[key]; + return value != null && value !== ''; + }); +} + +/** 从历史混炼示方混合步骤克隆为新行(生成新 id,剔除主表/审计字段) */ +export function cloneMixingHistoryStepRows(sourceRows: Recordable[] = []): Recordable[] { + return (sourceRows || []) + .filter((row) => isMixingStepRowFilled(row)) + .map((row, index) => { + const next: Recordable = { id: buildUUID() }; + MIXING_STEP_COPY_FIELD_KEYS.forEach((key) => { + const value = row[key]; + if (value != null && value !== '') { + next[key] = value; + } + }); + if (next.sortNo == null) { + next.sortNo = index + 1; + } + return next; + }); +} + +/** 解析混炼示方配方状态(参照旧系统展示) */ +export function resolveMixingSpecFormulaStatus(record: Recordable = {}): string { + if (Number(record.delFlag) === 1) { + return '作废'; + } + if (record.approveTime) { + return '审批通过'; + } + return '编制中'; +} + +/** 参照历史混合步骤:混炼示方选择列表列 */ +export const mixingSpecHistorySelectColumns: BasicColumn[] = [ + { title: '示方编号', align: 'center', dataIndex: 'specName', width: 160 }, + { title: '机台', align: 'center', dataIndex: 'machineName', width: 100 }, + { title: '发行编号', align: 'center', dataIndex: 'issueNumber', width: 150 }, + { title: '发行日期', align: 'center', dataIndex: 'makeDate', width: 120 }, + { + title: '配方状态', + align: 'center', + dataIndex: 'formulaStatus', + width: 100, + customRender: ({ record }) => resolveMixingSpecFormulaStatus(record), + }, +]; +//update-end---author:cursor ---date:20260526 for:【XSLMES-20260526-A58】参照历史混合步骤选择弹窗----------- diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue b/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue index 9bec8b2..31ca379 100644 --- a/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue @@ -284,6 +284,9 @@ 混合步骤