From 65c7175a1d7d448f91ee61a8a9aa935263939d37 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 17 四月 2025 10:10:22 +0800
Subject: [PATCH] feat: 接口对接

---
 src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue |   45 +++++++++++++++++++++++++++------------------
 1 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue b/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
index bdc92b9..b5a01b5 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>
@@ -244,15 +262,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