refactor(mes): 优化弹窗标题显示

refactor(framework): 优化 ObjectUtils 工具类
pull/871/MERGE
YunaiV 2026-02-26 01:44:00 +08:00
parent a94e55b533
commit e26a40fe0e
3 changed files with 10 additions and 3 deletions

View File

@ -224,7 +224,14 @@ const { t } = useI18n() // 国际化
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const dialogTitle = computed(() => {
const titles = {
create: '添加出货检验单',
update: '修改出货检验单',
detail: '查看出货检验单信息'
}
return titles[formType.value] || formType.value
}) // formType
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const activeTab = ref('line') //
@ -280,7 +287,6 @@ const generateCode = () => {
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
activeTab.value = 'line'
resetForm()

View File

@ -129,6 +129,7 @@ const formRules = reactive({
})
const formRef = ref() // Ref
// TODO @AIformType 使 stock shelving
const isUpdate = computed(() => ['create', 'update'].includes(formType.value)) //
const isStock = computed(() => formType.value === 'shelving') //
const isHeaderReadonly = computed(() => ['shelving', 'detail'].includes(formType.value)) //

View File

@ -249,7 +249,7 @@ const handleNoticeLineChange = (line: any) => {
/** 打开表单弹窗 */
const openForm = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
dialogTitle.value = type === 'create' ? '添加物料入库单行' : '修改物料入库单行'
lineFormType.value = type
resetForm()
if (id) {