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
3613d3a5
Commit
3613d3a5
authored
May 09, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理新增请购单备注输入框校验异常
parent
dc46c237
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
index.tsx
...ncreaseRequisition/components/materialTableCell/index.tsx
+10
-3
No files found.
src/pages/transaction/purchaseRequisition/increaseRequisition/components/materialTableCell/index.tsx
View file @
3613d3a5
...
@@ -4,6 +4,7 @@ import { EnvironmentOutlined } from '@ant-design/icons';
...
@@ -4,6 +4,7 @@ import { EnvironmentOutlined } from '@ant-design/icons';
import
{
FormDetailContext
}
from
'@/formSchema/context'
;
import
{
FormDetailContext
}
from
'@/formSchema/context'
;
import
{
getLogisticsSelectListMemberShipperAddress
}
from
'@/services/LogisticsV2Api'
;
import
{
getLogisticsSelectListMemberShipperAddress
}
from
'@/services/LogisticsV2Api'
;
import
{
useIntl
}
from
'umi'
;
import
{
useIntl
}
from
'umi'
;
import
{
validatorByte
}
from
'@/utils/regExp'
;
export
interface
MaterialTableCellProps
{
export
interface
MaterialTableCellProps
{
title
:
React
.
ReactNode
;
title
:
React
.
ReactNode
;
...
@@ -149,6 +150,7 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
...
@@ -149,6 +150,7 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
}
}
let
childNode
=
children
;
let
childNode
=
children
;
if
(
editable
)
{
if
(
editable
)
{
console
.
log
(
dataIndex
)
childNode
=
childNode
=
<>
<>
<
Form
.
Item
<
Form
.
Item
...
@@ -167,14 +169,18 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
...
@@ -167,14 +169,18 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
{
{
validator
:
validatorNumber
validator
:
validatorNumber
},
},
]
:
dataIndex
===
'remark'
?
]
:
(
dataIndex
===
'remark'
?
[
[
{
{
required
:
true
,
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.neirongbuneng1weikong'
,
defaultMessage
:
'内容不能为空'
}),
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.neirongbuneng1weikong'
,
defaultMessage
:
'内容不能为空'
}),
},
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
200
)
}
]
]
:
[
:
[
{
{
pattern
:
/^
\d
+
(\.\d
{1,4}
)?
$/
,
pattern
:
/^
\d
+
(\.\d
{1,4}
)?
$/
,
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.danjiajinxiansi'
,
defaultMessage
:
'单价仅限四位小数'
}),
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.danjiajinxiansi'
,
defaultMessage
:
'单价仅限四位小数'
}),
...
@@ -182,7 +188,8 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
...
@@ -182,7 +188,8 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
{
{
validator
:
validatorNumber
validator
:
validatorNumber
}
}
]
}
])
}
>
>
{
chooseFormItem
(
formItem
,
record
[
dataIndex
]
||
''
)
}
{
chooseFormItem
(
formItem
,
record
[
dataIndex
]
||
''
)
}
</
Form
.
Item
>
</
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