|
@@ -40,7 +40,7 @@ const AddClient = props => {
|
|
|
// const clientName = formRef.current?.getFieldValue('clientName')
|
|
// const clientName = formRef.current?.getFieldValue('clientName')
|
|
|
if (!changedValues) return
|
|
if (!changedValues) return
|
|
|
if ('clientName' in changedValues) {
|
|
if ('clientName' in changedValues) {
|
|
|
- if (!changedValues.clientName) {
|
|
|
|
|
|
|
+ if (!changedValues.clientName || changedValues.clientName?.length === 1) {
|
|
|
formRef.current?.setFieldsValue({ niceName: '' })
|
|
formRef.current?.setFieldsValue({ niceName: '' })
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -101,7 +101,8 @@ const AddClient = props => {
|
|
|
}
|
|
}
|
|
|
formRef.current && formRef.current.setFieldsValue(values)
|
|
formRef.current && formRef.current.setFieldsValue(values)
|
|
|
submit()
|
|
submit()
|
|
|
- }}>
|
|
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
添加并关联
|
|
添加并关联
|
|
|
</Button>
|
|
</Button>
|
|
|
) : null
|
|
) : null
|
|
@@ -113,7 +114,8 @@ const AddClient = props => {
|
|
|
setValidStatusFtl('')
|
|
setValidStatusFtl('')
|
|
|
!isNullOrUnDef(reload) && reload()
|
|
!isNullOrUnDef(reload) && reload()
|
|
|
return true
|
|
return true
|
|
|
- }}>
|
|
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
{showDataItem ? <ProFormText name={`${dataType}Id`} hidden /> : null}
|
|
{showDataItem ? <ProFormText name={`${dataType}Id`} hidden /> : null}
|
|
|
<ProFormText
|
|
<ProFormText
|
|
|
name="clientName"
|
|
name="clientName"
|
|
@@ -124,7 +126,8 @@ const AddClient = props => {
|
|
|
<Form.Item
|
|
<Form.Item
|
|
|
label="客户地区"
|
|
label="客户地区"
|
|
|
name="districtIds"
|
|
name="districtIds"
|
|
|
- rules={[{ required: true, message: '请选择地区' }]}>
|
|
|
|
|
|
|
+ rules={[{ required: true, message: '请选择地区' }]}
|
|
|
|
|
+ >
|
|
|
<LazyCascader showFooter={true} />
|
|
<LazyCascader showFooter={true} />
|
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
<Row>
|
|
<Row>
|
|
@@ -146,7 +149,8 @@ const AddClient = props => {
|
|
|
name="telephone"
|
|
name="telephone"
|
|
|
validateStatus={validStatusFtl}
|
|
validateStatus={validStatusFtl}
|
|
|
hasFeedback
|
|
hasFeedback
|
|
|
- rules={[{ required: true, message: '请输入手机号码' }]}>
|
|
|
|
|
|
|
+ rules={[{ required: true, message: '请输入手机号码' }]}
|
|
|
|
|
+ >
|
|
|
<TelephoneFormItem validateFn={status => setValidStatusFtl(status)} />
|
|
<TelephoneFormItem validateFn={status => setValidStatusFtl(status)} />
|
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
<ProFormText
|
|
<ProFormText
|