This commit is contained in:
zlwu committed 2026-05-22 16:25:04 +08:00
1 parent 53d3b21f57
commit 1f5de9030e
54 files changed
+10954 -4322

No files matched your search

@@ -154,7 +154,7 @@
destroy-on-close
:close-on-click-modal="false"
>
<div class="process-dialog-body min-h-[200px]">
<DialogFormBody :loading="dialogLoading" body-class="process-dialog-body min-h-[200px]">
<div class="detail-tabs">
<div
v-for="tab in formTabs"
@@ -482,7 +482,7 @@
</div>
</div>
</el-form>
</div>
</DialogFormBody>
<template #footer>
<el-button class="btn-ghost" @click="dialogVisible = false">
@@ -687,6 +687,7 @@
import { fetchItemUnitList } from '@/api/admin'
import { packTypeLabel, packTypeTagType } from '@/utils/status-tag-registry'
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
import DialogFormBody from '@/components/business/dialog-form-body/index.vue'
defineOptions({ name: 'ProductionProcess' })
@@ -699,6 +700,7 @@
// 弹窗状态
const dialogVisible = ref(false)
const dialogLoading = ref(false)
const dialogTitle = ref('新增工艺')
const isEdit = ref(false)
const submitLoading = ref(false)
@@ -1018,13 +1020,15 @@
isEdit.value = false
dialogTitle.value = '新增工艺'
resetForm()
await loadReferenceData()
await searchItemUnitOptions('')
dialogVisible.value = true
nextTick(() => {
formRef.value?.clearValidate?.()
initDataCollectionSortable()
})
dialogLoading.value = true
nextTick(() => formRef.value?.clearValidate?.())
try {
await Promise.all([loadReferenceData(), searchItemUnitOptions('')])
} finally {
dialogLoading.value = false
nextTick(() => initDataCollectionSortable())
}
}
async function handleEdit(row: any) {
@@ -1032,9 +1036,14 @@
isEdit.value = true
dialogTitle.value = '编辑工艺'
editingId.value = row.id
await loadReferenceData()
dialogVisible.value = true
dialogLoading.value = true
nextTick(() => formRef.value?.clearValidate?.())
try {
const detail = await fetchProcessDetail(row.id)
const [, detail] = await Promise.all([
loadReferenceData(),
fetchProcessDetail(row.id)
])
formData.processCode = detail.processCode || ''
formData.processName = detail.processName || ''
formData.categoryId = detail.categoryId || ''
@@ -1067,12 +1076,10 @@
ensureDataCollectionUnitOptions()
} catch {
ElMessage.error('加载详情失败')
} finally {
dialogLoading.value = false
nextTick(() => initDataCollectionSortable())
}
dialogVisible.value = true
nextTick(() => {
formRef.value?.clearValidate?.()
initDataCollectionSortable()
})
}
async function handleSubmit() {