新增混炼示方选择弹窗及相关功能,支持规格选择与参照新增,优化用户交互体验。

This commit is contained in:
geht
2026-05-26 10:21:56 +08:00
parent a579f0e15c
commit 51cac2c17a
3 changed files with 390 additions and 17 deletions

View File

@@ -1185,3 +1185,62 @@ export const mixingSpecHistorySelectColumns: BasicColumn[] = [
},
];
//update-end---author:cursor ---date:20260526 for【XSLMES-20260526-A58】参照历史混合步骤选择弹窗-----------
//update-begin---author:cursor ---date:20260526 for【XSLMES-20260526-A59】规格点击选择混炼示方及参照新增-----------
/** 参照新增时需剔除的主表字段 */
export const MIXING_SPEC_MAIN_STRIP_FIELDS = [
'id',
'createBy',
'createTime',
'updateBy',
'updateTime',
'draftBy',
'draftTime',
'proofreadBy',
'proofreadTime',
'auditBy',
'auditTime',
'approveBy',
'approveTime',
'changeDate',
'delFlag',
'tenantId',
'sysOrgCode',
] as const;
/** 参照新增时需剔除的明细字段 */
export const MIXING_SPEC_CHILD_STRIP_FIELDS = [
'id',
'mixingSpecId',
'createBy',
'createTime',
'updateBy',
'updateTime',
'tenantId',
] as const;
/** 参照选中示方新增:复制除 ID 及审计字段外的全部数据 */
export function cloneMixingSpecPageForReferenceAdd(source: Recordable = {}): Recordable {
const main: Recordable = { ...source };
MIXING_SPEC_MAIN_STRIP_FIELDS.forEach((key) => delete main[key]);
main.id = '';
const cloneChildList = (rows: Recordable[] = []) =>
normalizeMixingDetailRows(
(rows || []).map((row) => {
const next: Recordable = { ...row };
MIXING_SPEC_CHILD_STRIP_FIELDS.forEach((key) => delete next[key]);
delete next.baseUnitWeight;
return next;
}),
);
return {
...main,
materialList: cloneChildList(source.materialList),
stepList: cloneChildList(source.stepList),
downStepList: cloneChildList(source.downStepList),
tcuList: cloneChildList(source.tcuList),
};
}
//update-end---author:cursor ---date:20260526 for【XSLMES-20260526-A59】规格点击选择混炼示方及参照新增-----------