From 1a7b6c3f7832b0cf374cbcf3bb8befd8a4d96aaa Mon Sep 17 00:00:00 2001 From: user Date: Sun, 30 Mar 2025 23:22:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84=E6=B8=85=E9=99=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在多个编辑页面中,修正了输入框的清除功能逻辑,使其仅在新建记录时可清除。同时,在物料编辑页面中添加了输入框的变化事件处理函数。 --- src/main/webapp/app/admin/menu/menu-edit.vue | 2 +- .../webapp/app/entities/company/company-edit.vue | 2 +- .../webapp/app/entities/depart/depart-edit.vue | 2 +- src/main/webapp/app/entities/dict/dict-edit.vue | 2 +- .../entities/material/material-edit.component.ts | 14 +++++++++++++- .../webapp/app/entities/material/material-edit.vue | 6 +++--- .../webapp/app/entities/region/region-edit.vue | 2 +- src/main/webapp/app/entities/stock/stock-edit.vue | 2 +- 8 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/app/admin/menu/menu-edit.vue b/src/main/webapp/app/admin/menu/menu-edit.vue index e67f319..ab7f708 100644 --- a/src/main/webapp/app/admin/menu/menu-edit.vue +++ b/src/main/webapp/app/admin/menu/menu-edit.vue @@ -23,7 +23,7 @@ diff --git a/src/main/webapp/app/entities/company/company-edit.vue b/src/main/webapp/app/entities/company/company-edit.vue index cd4f0e5..4afbcd6 100644 --- a/src/main/webapp/app/entities/company/company-edit.vue +++ b/src/main/webapp/app/entities/company/company-edit.vue @@ -31,7 +31,7 @@ > diff --git a/src/main/webapp/app/entities/depart/depart-edit.vue b/src/main/webapp/app/entities/depart/depart-edit.vue index cd1a949..4e2025e 100644 --- a/src/main/webapp/app/entities/depart/depart-edit.vue +++ b/src/main/webapp/app/entities/depart/depart-edit.vue @@ -23,7 +23,7 @@ diff --git a/src/main/webapp/app/entities/dict/dict-edit.vue b/src/main/webapp/app/entities/dict/dict-edit.vue index 568ef59..e663653 100644 --- a/src/main/webapp/app/entities/dict/dict-edit.vue +++ b/src/main/webapp/app/entities/dict/dict-edit.vue @@ -23,7 +23,7 @@ diff --git a/src/main/webapp/app/entities/material/material-edit.component.ts b/src/main/webapp/app/entities/material/material-edit.component.ts index 096b44e..25dce78 100644 --- a/src/main/webapp/app/entities/material/material-edit.component.ts +++ b/src/main/webapp/app/entities/material/material-edit.component.ts @@ -3,7 +3,7 @@ import { useI18n } from 'vue-i18n'; import { useAlertService } from '@/shared/alert/alert.service'; import { useRoute, useRouter } from 'vue-router'; import axios from 'axios'; -import type { VxeFormInstance, VxeSelectInstance } from 'vxe-table'; +import type { VxeFormInstance } from 'vxe-table'; export default defineComponent({ name: 'MaterialUpdate', @@ -119,6 +119,16 @@ export default defineComponent({ router.go(-1); }; + const handleChange = (event: any) => { + const dataCy = event.$event.target.getAttribute('data-cy'); + console.log(`字段 ${dataCy} 触发,值为:`, event.value); + console.log(event); + }; + + const handleInput = (event: any) => { + console.log(event); + }; + const clearInput = (field: string) => { if (material.value[field]) { material.value[field] = null; @@ -161,6 +171,8 @@ export default defineComponent({ formRules, previousState, save, + handleChange, + handleInput, clearInput, statusDicts, matGroupDicts, diff --git a/src/main/webapp/app/entities/material/material-edit.vue b/src/main/webapp/app/entities/material/material-edit.vue index 68a2687..3106649 100644 --- a/src/main/webapp/app/entities/material/material-edit.vue +++ b/src/main/webapp/app/entities/material/material-edit.vue @@ -31,7 +31,7 @@ > @@ -65,7 +65,7 @@ :item-render="{}" >