|
|
@ -596,7 +596,7 @@ const rules = ref({ |
|
|
|
name: [{ required: true, message: '请输入名字', trigger: 'blur' },{ max: 50, message: '不得超过50个字符', trigger: 'blur' }], |
|
|
|
description: [{ required: true, message: '请输入描述', trigger: 'blur' },{ max: 50, message: '不得超过50个字符', trigger: 'blur' }], |
|
|
|
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }], |
|
|
|
warehouse: [{ required: true, message: '请选择规则配置', trigger: 'blur' }], |
|
|
|
// warehouse: [{ required: true, message: '请选择规则配置', trigger: 'blur' }], |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
@ -866,6 +866,24 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
|
|
/** 提交表单 */ |
|
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
|
|
|
const submitForm = async () => { |
|
|
|
if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){ |
|
|
|
// 仓库 |
|
|
|
message.error('请选择仓库') |
|
|
|
return |
|
|
|
// formData.configuration.WarehouseCode |
|
|
|
}else if(warehouseType.value == 'AreaCode'&& !formData.value.configuration.AreaCode){ |
|
|
|
// 库区 |
|
|
|
message.error('请选择库区') |
|
|
|
return |
|
|
|
}else if(warehouseType.value == 'LocationGroupCode'&&!formData.value.configuration.LocationGroupCode){ |
|
|
|
// 库位组 |
|
|
|
message.error('请选择库位组') |
|
|
|
return |
|
|
|
}else if(warehouseType.value == 'LocationCode'&&!formData.value.configuration.LocationCode){ |
|
|
|
// 库位 |
|
|
|
message.error('请选择库位') |
|
|
|
return |
|
|
|
} |
|
|
|
// 校验表单 |
|
|
|
if (!formRef) return |
|
|
|
const valid = await formRef.value.validate() |
|
|
|