refactor(option): 优化货物类型相关字段结构与样式调整
- 删除重复的“上级货物类型”相关字段配置,移至更合理位置 - 为部分字段增加隐藏和只读属性,避免误操作 - 注释移除样式中max-width限制,调整宽度显示 - 保持字段校验规则一致性,确保表单验证准确 - 代码格式与结构整理,提升可读性和维护性
This commit is contained in:
@@ -60,43 +60,12 @@ export const getCargoTypeOption = ctx => ({
|
||||
searchSpan: 6,
|
||||
value: 2,
|
||||
span: 24,
|
||||
hide: true,
|
||||
minWidth: 120,
|
||||
editDisabled: true,
|
||||
rules: [{ required: true, message: '请选择货物类型级别', trigger: 'change' }],
|
||||
change: ({ value }) => ctx.handleTypeLevelChange(value),
|
||||
},
|
||||
{
|
||||
label: '上级货物类型',
|
||||
prop: 'parentId',
|
||||
formslot: true,
|
||||
hide: true,
|
||||
display: false,
|
||||
span: 12,
|
||||
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '上级货物类型',
|
||||
prop: 'parentCargoName',
|
||||
slot: true,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
display: false,
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
label: '上级货物编码',
|
||||
prop: 'parentCargoCode',
|
||||
slot: true,
|
||||
readonly: true,
|
||||
editDisabled: true,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
display: false,
|
||||
span: 12,
|
||||
minWidth: 160,
|
||||
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '货物类型',
|
||||
prop: 'cargoName',
|
||||
@@ -139,6 +108,38 @@ export const getCargoTypeOption = ctx => ({
|
||||
],
|
||||
change: ({ value }) => ctx.handleCargoCodeChange(value),
|
||||
},
|
||||
{
|
||||
label: '上级货物类型',
|
||||
prop: 'parentId',
|
||||
formslot: true,
|
||||
hide: true,
|
||||
display: false,
|
||||
span: 12,
|
||||
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '上级货物类型',
|
||||
prop: 'parentCargoName',
|
||||
slot: true,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
display: false,
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
label: '上级货物编码',
|
||||
prop: 'parentCargoCode',
|
||||
slot: true,
|
||||
readonly: true,
|
||||
editDisabled: true,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
display: false,
|
||||
span: 12,
|
||||
minWidth: 160,
|
||||
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '创建人',
|
||||
prop: 'createUserName',
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
display: flex;
|
||||
flex: 0 0 100%;
|
||||
justify-content: flex-end;
|
||||
max-width: 100%;
|
||||
//max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user