From 8f2468dc2a974040556fd0f49afb87df39401ff4 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 06 八月 2025 17:10:12 +0800
Subject: [PATCH] fix: 字典
---
src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue | 52 +++++++++++++++++++++++++++++-----------------------
1 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue b/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
index bdc92b9..84c2d09 100644
--- a/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
+++ b/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
@@ -2,14 +2,18 @@
<LoadingLayout :loading="isEdit && isLoading">
<AppScrollContainer>
<ChunkCell title="浼佷笟鍩烘湰淇℃伅">
- <ProForm :model="form" :rules="rules" ref="formRef" label-width="120px" :is-read="isDetail">
+ <ProForm :model="form" ref="formRef" label-width="140px" :is-read="isDetail">
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="浼佷笟鍚嶇О:" prop="enterpriseName">
+ <ProFormItemV2
+ label="浼佷笟鍚嶇О:"
+ prop="enterpriseName"
+ :check-rules="[{ message: '璇疯緭鍏ヤ紒涓氬悕绉�' }]"
+ >
<ProFormText
v-model.trim="form.enterpriseName"
:maxlength="30"
- placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О"
+ placeholder="璇疯緭鍏ヤ紒涓氬悕绉�"
/>
</ProFormItemV2>
</ProFormColItem>
@@ -38,7 +42,11 @@
</ProFormCol>
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="缁熶竴绀句細淇$敤浠g爜:" prop="societyCreditCode">
+ <ProFormItemV2
+ label="缁熶竴绀句細淇$敤浠g爜:"
+ prop="societyCreditCode"
+ :check-rules="[{ message: '璇疯緭鍏ョ粺涓�绀句細淇$敤浠g爜', type: 'societyCreditCode' }]"
+ >
<ProFormText
v-model.trim="form.societyCreditCode"
placeholder="璇疯緭鍏ョ粺涓�绀句細淇$敤浠g爜"
@@ -100,7 +108,6 @@
<ChunkCell title="鑱旂郴淇℃伅">
<ProForm
:model="form"
- :rules="rules"
ref="settingFormRef"
label-width="140px"
:scroll-to-error="false"
@@ -108,7 +115,11 @@
>
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="鑱旂郴浜�:" prop="contact">
+ <ProFormItemV2
+ label="鑱旂郴浜�:"
+ prop="contact"
+ :check-rules="[{ message: '璇疯緭鍏ヨ仈绯讳汉' }]"
+ >
<ProFormText
v-model.trim="form.contact"
:maxlength="30"
@@ -119,7 +130,11 @@
</ProFormCol>
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="鑱旂郴鐢佃瘽:" prop="contactPhone">
+ <ProFormItemV2
+ label="鑱旂郴鐢佃瘽:"
+ prop="contactPhone"
+ :check-rules="[{ message: '璇疯緭鍏ヨ仈绯荤數璇�', type: 'phone' }]"
+ >
<ProFormText v-model.trim="form.contactPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
</ProFormItemV2>
</ProFormColItem>
@@ -141,7 +156,6 @@
<ChunkCell title="璐﹀彿淇℃伅">
<ProForm
:model="form"
- :rules="rules"
ref="accountFormRef"
label-width="140px"
:scroll-to-error="false"
@@ -149,7 +163,11 @@
>
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="璐﹀彿:" prop="contact">
+ <ProFormItemV2
+ label="璐﹀彿:"
+ prop="contact"
+ :check-rules="[{ message: '璇疯緭鍏ヨ处鍙�' }]"
+ >
<ProFormText v-model.trim="form.contact" :maxlength="30" placeholder="璇疯緭鍏ヨ处鍙�" />
</ProFormItemV2>
</ProFormColItem>
@@ -178,8 +196,7 @@
} from '@bole-core/components';
import { FormRules, FormInstance } from 'element-plus';
import { SearchType } from '@/constants';
-import * as flexEnterpriseServices from '@/services/api/FlexEnterprise';
-import { useRouteView, useGlobalEventContext, GlobalEvent, useSearchSettingType } from '@/hooks';
+import { useRouteView, useGlobalEventContext, GlobalEvent } from '@/hooks';
import _ from 'lodash';
import { validateFormList, filterCN } from '@/utils';
import { Message, BoleRegExp } from '@bole-core/core';
@@ -207,9 +224,7 @@
const { closeViewPush } = useRouteView();
const eventContext = useGlobalEventContext();
-const { searchSettingTypeList: typeList } = useSearchSettingType({
- searchType: SearchType.IndustryCategory,
-});
+const typeList = ref([]);
const form = reactive({
id: '',
@@ -244,15 +259,6 @@
const formRef = ref<FormInstance>();
const settingFormRef = ref<FormInstance>();
const accountFormRef = ref<FormInstance>();
-
-const rules = reactive<FormRules>({
- enterpriseName: [{ required: true, message: '璇疯緭鍏ヤ紒涓氬悕绉�', trigger: 'blur' }],
- contact: [{ required: true, message: '璇疯緭鍏ヨ仈绯讳汉', trigger: 'blur' }],
- contactPhone: [
- { required: true, message: '璇疯緭鍏ヨ仈绯荤數璇�', trigger: 'blur' },
- { message: '璇疯緭鍏ユ纭殑鑱旂郴鐢佃瘽', trigger: 'blur', pattern: BoleRegExp.RegPhoneNumber },
- ],
-});
async function handleSubmit() {
try {
--
Gitblit v1.9.1