Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
749923e4
Commit
749923e4
authored
Apr 22, 2022
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 字段可输入长度控制
parent
26cfc201
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
index.tsx
src/pages/order/components/customizedModal/index.tsx
+13
-10
index.tsx
...eliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
+4
-0
index.tsx
...eliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
+4
-0
No files found.
src/pages/order/components/customizedModal/index.tsx
View file @
749923e4
...
...
@@ -3,6 +3,7 @@
* @author: Gavin
* @description: 单选状态反馈选择结果, 示例应用场景: 详情页面点击提交, 弹窗选择审核状态, 是否需要填写原因。 ~~~!!!!单选模式,暂为不可异步, 待优化。
*/
import
{
validatorByte
}
from
'@/utils/regExp'
;
import
{
Form
,
Input
,
Modal
,
Radio
}
from
'antd'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
ModalCancelText
,
ModalOkText
,
ReasonPlaceholder1
,
ReasonRulesMessage
,
SelectRadioRulesMessage
}
from
'../translate'
;
...
...
@@ -126,16 +127,18 @@ const CustomizedModal: React.FC<CustomizedModalProps> = (props) => {
</
Radio
.
Group
>
</
Form
.
Item
>
{
visibleReason
?
<
Form
.
Item
name=
'reason'
rules=
{
[{
required
:
true
,
message
:
ReasonRulesMessage
}]
}
label=
'不确认原因'
>
<
Input
.
TextArea
allowClear
rows=
{
3
}
maxLength=
{
300
}
placeholder=
{
ReasonPlaceholder1
}
/>
</
Form
.
Item
>
:
null
visibleReason
?
<
Form
.
Item
label=
'不确认原因'
name=
'reason'
rules=
{
[
{
required
:
true
,
message
:
ReasonRulesMessage
},
{
validator
:
(
rule
,
value
,
callback
)
=>
validatorByte
(
rule
,
value
,
callback
,
300
)
}
]
}
>
<
Input
.
TextArea
allowClear
rows=
{
3
}
maxLength=
{
300
}
placeholder=
{
ReasonPlaceholder1
}
/>
</
Form
.
Item
>
:
null
}
</
Form
>
</
Modal
>
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
View file @
749923e4
...
...
@@ -20,6 +20,7 @@ import moment from 'moment'
import
usePrompt
from
'@/hooks/usePrompt'
import
FormProgress
,
{
HandleType
}
from
'@/components/FormProgress'
import
{
getMemberManageBuyerMember
}
from
'@/services/MemberV2Api'
import
{
validatorByte
}
from
'@/utils/regExp'
type
PropsType
=
{
type
:
'add'
|
'edit'
;
...
...
@@ -360,6 +361,9 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
labelCol={{ span: 0 }}
wrapperCol={{ span: 24 }}
name='remark'
rules={[
{ validator: (rule, value, callback) => validatorByte(rule, value, callback, 600) }
]}
>
<Input.TextArea rows={6} maxLength={300} placeholder='最长600个字符,300个汉字' />
</Form.Item>
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
View file @
749923e4
...
...
@@ -23,6 +23,7 @@ import moment from 'moment'
import
usePrompt
from
'@/hooks/usePrompt'
import
FormProgress
,
{
HandleType
}
from
'@/components/FormProgress'
import
{
getMemberManageUpperConsumerMerchantPage
}
from
'@/services/MemberV2Api'
import
{
validatorByte
}
from
'@/utils/regExp'
type
PropsType
=
{
type
:
'add'
|
'edit'
;
...
...
@@ -366,6 +367,9 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
labelCol={{ span: 0 }}
wrapperCol={{ span: 24 }}
name='remark'
rules={[
{ validator: (rule, value, callback) => validatorByte(rule, value, callback, 600) }
]}
>
<Input.TextArea rows={6} maxLength={300} placeholder='最长600个字符,300个汉字' />
</Form.Item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment