outaozhen 4 лет назад
Родитель
Сommit
003101c001
1 измененных файлов с 4 добавлено и 20 удалено
  1. 4 20
      src/pages/Customer/Client/components/AddClient/index.jsx

+ 4 - 20
src/pages/Customer/Client/components/AddClient/index.jsx

@@ -46,18 +46,6 @@ const AddClient = props => {
     if ('qq' in changedValues) {
       formRef.current?.setFieldsValue({ email: `${changedValues.qq}@qq.com` })
     }
-    // const clientName = formRef.current?.getFieldValue('clientName')
-    // if (clientName) {
-    //   const clientNameNum = clientName.split('')
-    //   const [firstName, ...lastName] = clientNameNum
-    //   const nameAfter = `(${lastName.join('')})`
-    //   const newClientName = `${firstName + nameAfter}工`
-    //   formRef.current?.setFieldsValue({ niceName: newClientName })
-    // } else if (!formRef.current?.getFieldValue('qq')) {
-    //   const emailNum = qq.value
-    //   const newEmail = `${emailNum}@qq.com`
-    //   formRef.current?.setFieldsValue({ email: newEmail })
-    // }
   }
   return (
     <ModalDragForm
@@ -92,8 +80,7 @@ const AddClient = props => {
                 }
                 formRef.current && formRef.current.setFieldsValue(values)
                 submit()
-              }}
-            >
+              }}>
               添加并关联
             </Button>
           ) : null
@@ -105,8 +92,7 @@ const AddClient = props => {
         setValidStatusFtl('')
         !isNullOrUnDef(reload) && reload()
         return true
-      }}
-    >
+      }}>
       {showDataItem ? <ProFormText name={`${dataType}Id`} hidden /> : null}
       <ProFormText
         name="clientName"
@@ -117,8 +103,7 @@ const AddClient = props => {
       <Form.Item
         label="客户地区"
         name="districtIds"
-        rules={[{ required: true, message: '请选择地区' }]}
-      >
+        rules={[{ required: true, message: '请选择地区' }]}>
         <LazyCascader showFooter={true} />
       </Form.Item>
       <Row>
@@ -140,8 +125,7 @@ const AddClient = props => {
             name="telephone"
             validateStatus={validStatusFtl}
             hasFeedback
-            rules={[{ required: true, message: '请输入手机号码' }]}
-          >
+            rules={[{ required: true, message: '请输入手机号码' }]}>
             <TelephoneFormItem validateFn={status => setValidStatusFtl(status)} />
           </Form.Item>
           <ProFormText