新增混炼示方生成预览与批量创建功能,优化相关字段及用户交互,修复界面显示问题,增强系统稳定性和用户体验。
This commit is contained in:
@@ -35,7 +35,7 @@ export const columns: BasicColumn[] = [
|
||||
{ title: '机台', align: 'center', dataIndex: 'machineName', width: 120 },
|
||||
{ title: '制作日期', align: 'center', dataIndex: 'makeDate', width: 120 },
|
||||
{ title: '发行编号', align: 'center', dataIndex: 'issueNumber', width: 150 },
|
||||
{ title: '段数', align: 'center', dataIndex: 'stageCount', width: 80 },
|
||||
{ title: '段数', align: 'center', dataIndex: 'stageCount', width: 88 },
|
||||
{ title: '纯混炼时间(秒)', align: 'center', dataIndex: 'pureMixSec', width: 130 },
|
||||
{ title: '变更日期', align: 'center', dataIndex: 'changeDate', width: 120 },
|
||||
{ title: '修改时间', align: 'center', dataIndex: 'updateTime', width: 165 },
|
||||
@@ -49,18 +49,21 @@ export const searchFormSchema: FormSchema[] = [
|
||||
|
||||
export const mainSchema: FormSchema[] = [
|
||||
{ label: '', field: 'id', component: 'Input', show: false },
|
||||
{ label: '', field: 'machineId', component: 'Input', show: false },
|
||||
{ label: '规格', field: 'specName', component: 'Input', required: true, colProps: { span: 8 } },
|
||||
{ label: '用途', field: 'purpose', component: 'AutoComplete', required: true, colProps: { span: 8 } },
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】混炼示方基本信息字段优化-----------
|
||||
{ label: '用途', field: 'purpose', component: 'Input', required: true, colProps: { span: 8 } },
|
||||
{ label: '机台', field: 'machineName', component: 'Input', colProps: { span: 8 } },
|
||||
{ label: '制作日期', field: 'makeDate', component: 'DatePicker', colProps: { span: 8 }, componentProps: { valueFormat: 'YYYY-MM-DD' } },
|
||||
{ label: '发行编号', field: 'issueNumber', component: 'AutoComplete', required: true, colProps: { span: 8 } },
|
||||
{ label: '发行编号', field: 'issueNumber', component: 'Input', required: true, colProps: { span: 8 } },
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】混炼示方基本信息字段优化-----------
|
||||
{ label: '换算系数', field: 'convertFactor', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
|
||||
{ label: '填充体积', field: 'fillVolume', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
|
||||
{ label: '回收炭黑(秒)', field: 'recycleCarbonSec', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 0, style: { width: '100%' } } },
|
||||
{ label: '母胶比重', field: 'motherRubberSg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
|
||||
{ label: '终炼胶比重', field: 'finalRubberSg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
|
||||
{ label: '适用工厂', field: 'applyFactory', component: 'Input', colProps: { span: 8 } },
|
||||
{ label: '段数', field: 'stageCount', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 0, style: { width: '100%' } } },
|
||||
{ label: '段数', field: 'stageCount', component: 'Input', colProps: { span: 8 }, componentProps: { placeholder: '如 2/3' } },
|
||||
{ label: '纯混炼时间(秒)', field: 'pureMixSec', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 0, style: { width: '100%' } } },
|
||||
{ label: '回收炭黑(KG)', field: 'recycleCarbonKg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
|
||||
{ label: '自动小料打印设定', field: 'autoSmallPrintSetting', component: 'Input', colProps: { span: 8 } },
|
||||
@@ -198,13 +201,32 @@ export function calcMixingMaterialTableWidth(columns: JVxeColumn[], widthMap: Re
|
||||
export const MIXING_STEP_MIN_COLUMN_WIDTH = 48;
|
||||
|
||||
export const stepColumns: JVxeColumn[] = [
|
||||
{ title: '动作', key: 'actionName', type: JVxeTypes.input, width: 120, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH },
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A35】混合步骤动作/组合列常显下拉倒三角-----------
|
||||
{
|
||||
title: '动作',
|
||||
key: 'actionName',
|
||||
type: JVxeTypes.slot,
|
||||
slotName: 'actionNameSlot',
|
||||
width: 120,
|
||||
minWidth: MIXING_STEP_MIN_COLUMN_WIDTH,
|
||||
},
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A35】混合步骤动作/组合列常显下拉倒三角-----------
|
||||
{ title: '时间(")', key: 'actionSec', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '保护时间', key: 'protectSec', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '温度(℃)', key: 'tempC', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '功率(Kw)', key: 'powerKw', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '能量(Kwh)', key: 'energyKwh', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '组合', key: 'comboMode', type: JVxeTypes.input, width: 72, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A35】混合步骤动作/组合列常显下拉倒三角-----------
|
||||
{
|
||||
title: '组合',
|
||||
key: 'comboMode',
|
||||
type: JVxeTypes.slot,
|
||||
slotName: 'comboModeSlot',
|
||||
width: 72,
|
||||
minWidth: MIXING_STEP_MIN_COLUMN_WIDTH,
|
||||
align: 'center',
|
||||
},
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A35】混合步骤动作/组合列常显下拉倒三角-----------
|
||||
{ title: '转速(rpm)', key: 'speedRpm', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '压力(Mpa)', key: 'pressureMpa', type: JVxeTypes.inputNumber, width: 80, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '栓(%)', key: 'boltPercent', type: JVxeTypes.inputNumber, width: 72, minWidth: MIXING_STEP_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
@@ -281,7 +303,9 @@ export const MIXING_TCU_COLUMN_WIDTH_CACHE_KEY = 'mes_xsl_mixing_spec_tcu_column
|
||||
export const MIXING_TCU_MIN_COLUMN_WIDTH = 48;
|
||||
|
||||
export const tcuColumns: JVxeColumn[] = [
|
||||
{ title: '区分', key: 'sectionType', type: JVxeTypes.select, dictCode: 'xslmes_mixing_tcu_section', width: 96, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
//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' },
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】TCU区分固定上/下密炼机-----------
|
||||
{ title: '前转子温度', key: 'frontRotorTemp', type: JVxeTypes.inputNumber, width: 76, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '后转子温度', key: 'rearRotorTemp', type: JVxeTypes.inputNumber, width: 76, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
{ title: '前混炼室温度', key: 'frontChamberTemp', type: JVxeTypes.inputNumber, width: 76, minWidth: MIXING_TCU_MIN_COLUMN_WIDTH, align: 'center' },
|
||||
@@ -580,8 +604,36 @@ export function createEmptyDownStepRows(count = DEFAULT_MIXING_DOWN_STEP_ROW_COU
|
||||
return createEmptyMixingRows(count);
|
||||
}
|
||||
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】TCU默认两行及上密炼机药品称默认值-----------
|
||||
/** 上密炼机 TCU 行默认药品称量位置(药品称) */
|
||||
export const MIXING_TCU_UP_MIXER_DRUG_WEIGH_POS = 'drug_scale';
|
||||
|
||||
/** 构建 TCU 温度条件默认两行(上密炼机/下密炼机) */
|
||||
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);
|
||||
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);
|
||||
return [up, down];
|
||||
}
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A33】TCU默认两行及上密炼机药品称默认值-----------
|
||||
|
||||
/** 确保明细行具备唯一 id(JVxeTable 依赖 rowKey=id) */
|
||||
export function normalizeMixingDetailRows(rows: Recordable[] = []): Recordable[] {
|
||||
return (rows || []).map((row) => ({ ...row, id: row?.id || buildUUID() }));
|
||||
}
|
||||
|
||||
//update-begin---author:cursor ---date:20260522 for:【XSLMES-20260522-A39】编辑页明细补齐默认空行与新增一致-----------
|
||||
/** 编辑/详情加载时补齐明细默认空行(不少于 defaultCount,已有数据行保留) */
|
||||
export function ensureMixingDetailRows(rows: Recordable[] = [], defaultCount: number): Recordable[] {
|
||||
const normalized = normalizeMixingDetailRows(rows);
|
||||
if (normalized.length >= defaultCount) {
|
||||
return normalized;
|
||||
}
|
||||
return [...normalized, ...createEmptyMixingRows(defaultCount - normalized.length)];
|
||||
}
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A39】编辑页明细补齐默认空行与新增一致-----------
|
||||
//update-end---author:cursor ---date:20260522 for:【XSLMES-20260522-A22】明细表默认空行数-----------
|
||||
|
||||
Reference in New Issue
Block a user