fix(erp-frontend-vue): resolve TypeScript build errors (duplicate ids, unused vars, null guards, type mismatches)

Made-with: Cursor
This commit is contained in:
panchengyong
2026-03-01 16:40:38 +08:00
parent 10b6d0099a
commit e45616a09b
28 changed files with 45 additions and 49 deletions

View File

@@ -432,6 +432,7 @@ async function handleUpdate(row?: MdItem) {
resetForm()
await getTreeselect()
const itemId = row?.itemId || ids.value[0]
if (!itemId) return
const res = await getMdItem(itemId)
Object.assign(form, res.data)
optType.value = 'edit'

View File

@@ -218,6 +218,7 @@ function handleAdd() {
async function handleUpdate(row?: UnitMeasure) {
resetForm()
const measureId = row?.measureId || ids.value[0]
if (!measureId) return
const res = await getUnitMeasure(measureId)
Object.assign(form, res.data)
dialogTitle.value = '修改计量单位'

View File

@@ -209,6 +209,7 @@ function handleAdd() {
async function handleUpdate(row?: Workshop) {
resetForm()
const workshopId = row?.workshopId || ids.value[0]
if (!workshopId) return
const res = await getWorkshop(workshopId)
Object.assign(form, res.data)
dialogTitle.value = '修改车间'

View File

@@ -230,6 +230,7 @@ async function handleUpdate(row?: Workstation) {
resetForm()
await getWorkshops()
const workstationId = row?.workstationId || ids.value[0]
if (!workstationId) return
const res = await getWorkstation(workstationId)
Object.assign(form, res.data)
dialogTitle.value = '修改工作站'