钉钉审批功能完善、混炼示方新增是否附加料
This commit is contained in:
@@ -694,11 +694,32 @@ export const downStepColumns: JVxeColumn[] = [...stepColumns];
|
||||
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A19】TCU温度条件表列宽可调且表头换行-----------
|
||||
/** TCU 温度条件明细列宽偏好 localStorage 键 */
|
||||
export const MIXING_TCU_COLUMN_WIDTH_CACHE_KEY = 'mes_xsl_mixing_spec_tcu_column_widths_v2';
|
||||
export const MIXING_TCU_COLUMN_WIDTH_CACHE_KEY = 'mes_xsl_mixing_spec_tcu_column_widths_v3';
|
||||
|
||||
/** TCU 温度条件明细列可缩小到的最小宽度 */
|
||||
export const MIXING_TCU_MIN_COLUMN_WIDTH = 48;
|
||||
|
||||
/** TCU 是否附加:否 */
|
||||
export const MIXING_TCU_ATTACH_NO = '0';
|
||||
|
||||
/** TCU 是否附加:是 */
|
||||
export const MIXING_TCU_ATTACH_YES = '1';
|
||||
|
||||
/** 判断 TCU 行是否允许维护附加重量 */
|
||||
export function isMixingTcuAttachEnabled(value: unknown): boolean {
|
||||
return value === 1 || value === '1' || value === true;
|
||||
}
|
||||
|
||||
/** 规范化 TCU 行是否附加/重量联动 */
|
||||
export function normalizeMixingTcuAttachRow(row: Recordable) {
|
||||
if (row.isAttach == null || row.isAttach === '') {
|
||||
row.isAttach = MIXING_TCU_ATTACH_NO;
|
||||
}
|
||||
if (!isMixingTcuAttachEnabled(row.isAttach)) {
|
||||
row.attachWeight = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export const tcuColumns: JVxeColumn[] = [
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】TCU区分固定上/下密炼机-----------
|
||||
{ title: '区分', key: 'sectionType', type: JVxeTypes.select, dictCode: 'xslmes_mixing_tcu_section', disabled: true, width: 96, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
@@ -709,6 +730,29 @@ export const tcuColumns: JVxeColumn[] = [
|
||||
{ title: '后混炼室温度', key: 'rearChamberTemp', type: JVxeTypes.inputNumber, width: 76, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '上下顶栓温度', key: 'topPlugTemp', type: JVxeTypes.inputNumber, width: 76, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '药品称量位置', key: 'drugWeighPos', type: JVxeTypes.select, dictCode: 'xslmes_mixing_drug_weigh_pos', width: 76, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
//update-begin---author:GHT ---date:2026-06-10 for:【混炼示方】TCU温度条件新增是否附加/重量-----------
|
||||
{
|
||||
title: '是否附加',
|
||||
key: 'isAttach',
|
||||
type: JVxeTypes.select,
|
||||
dictCode: 'yn',
|
||||
defaultValue: MIXING_TCU_ATTACH_NO,
|
||||
width: 76,
|
||||
minWidth: MIXING_TCU_MIN_COLUMN_WIDTH,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '重量',
|
||||
key: 'attachWeight',
|
||||
type: JVxeTypes.inputNumber,
|
||||
width: 76,
|
||||
minWidth: MIXING_TCU_MIN_COLUMN_WIDTH,
|
||||
align: 'center',
|
||||
props: {
|
||||
isDisabledCell: ({ row }: { row?: Recordable }) => !isMixingTcuAttachEnabled(row?.isAttach),
|
||||
},
|
||||
},
|
||||
//update-end---author:GHT ---date:2026-06-10 for:【混炼示方】TCU温度条件新增是否附加/重量-----------
|
||||
];
|
||||
|
||||
/** 读取已保存的 TCU 温度条件明细列宽 */
|
||||
@@ -1012,11 +1056,15 @@ export const MIXING_TCU_UP_MIXER_DRUG_WEIGH_POS = 'drug_scale';
|
||||
export function buildDefaultMixingTcuRows(rows: Recordable[] = []): Recordable[] {
|
||||
const up =
|
||||
rows.find((r) => r.sectionType === 'up_mixer') ||
|
||||
({ sectionType: 'up_mixer', drugWeighPos: MIXING_TCU_UP_MIXER_DRUG_WEIGH_POS } as Recordable);
|
||||
({ sectionType: 'up_mixer', drugWeighPos: MIXING_TCU_UP_MIXER_DRUG_WEIGH_POS, isAttach: MIXING_TCU_ATTACH_NO } as Recordable);
|
||||
if (up.sectionType === 'up_mixer' && !up.drugWeighPos) {
|
||||
up.drugWeighPos = MIXING_TCU_UP_MIXER_DRUG_WEIGH_POS;
|
||||
}
|
||||
const down = rows.find((r) => r.sectionType === 'down_mixer') || ({ sectionType: 'down_mixer', drugWeighPos: undefined } as Recordable);
|
||||
const down =
|
||||
rows.find((r) => r.sectionType === 'down_mixer') ||
|
||||
({ sectionType: 'down_mixer', drugWeighPos: undefined, isAttach: MIXING_TCU_ATTACH_NO } as Recordable);
|
||||
normalizeMixingTcuAttachRow(up);
|
||||
normalizeMixingTcuAttachRow(down);
|
||||
return [up, down];
|
||||
}
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】TCU默认两行及上密炼机药品称默认值-----------
|
||||
|
||||
Reference in New Issue
Block a user