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
前端-吴智勇
jinfa-platform
Commits
fd96bc58
Commit
fd96bc58
authored
Jan 17, 2022
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
8128bba7
c1704c39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
add.tsx
src/pages/balance/businessReconciliation/readyAdd/add.tsx
+18
-9
No files found.
src/pages/balance/businessReconciliation/readyAdd/add.tsx
View file @
fd96bc58
...
@@ -81,13 +81,17 @@ const Add = () => {
...
@@ -81,13 +81,17 @@ const Add = () => {
const
basicFormCol
=
[
const
basicFormCol
=
[
{
{
label
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
name
:
'reconciliationAbstract'
,
placeholder
:
'请输入对账单摘要'
,
rules
:
[{
required
:
true
,
message
:
'请输入对账单摘要'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
name
:
'reconciliationAbstract'
,
placeholder
:
'请输入对账单摘要'
,
rules
:
[{
required
:
true
,
message
:
'请输入对账单摘要'
},
{
validator
:
(
_
,
value
)
=>
{
validator
:
(
_
,
value
,
callback
)
=>
{
try
{
let
_str
=
value
;
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
30
*
2
)
{
if
(
_str
.
length
>
30
*
2
)
{
return
Promise
.
reject
(
new
Error
(
`最长60个字符,30个汉字`
))
callback
(
'最长60个字符,30个汉字'
)
}
else
{
// return Promise.reject(new Error(`最长60个字符,30个汉字`))
return
Promise
.
resolve
();
}
callback
();
}
catch
(
error
)
{
callback
();
}
}
}
}
}]
}]
...
@@ -95,13 +99,18 @@ const Add = () => {
...
@@ -95,13 +99,18 @@ const Add = () => {
{
{
label
:
intl
.
formatMessage
({
id
:
'balance.beizhu'
}),
name
:
'remark'
,
placeholder
:
'请输入对备注'
,
rules
:
[
label
:
intl
.
formatMessage
({
id
:
'balance.beizhu'
}),
name
:
'remark'
,
placeholder
:
'请输入对备注'
,
rules
:
[
{
{
validator
:
(
_
,
value
)
=>
{
validator
:
(
_
,
value
,
callback
)
=>
{
try
{
let
_str
=
value
;
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
value
.
length
>
60
*
2
)
{
if
(
value
.
length
>
60
*
2
)
{
return
Promise
.
reject
(
new
Error
(
`最长120个字符`
))
callback
(
'最长120个字符'
)
}
else
{
// return Promise.reject(new Error(`最长120个字符`))
return
Promise
.
resolve
();
}
callback
();
// return Promise.resolve();
}
catch
(
error
)
{
callback
();
}
}
}
}
}
}
...
@@ -288,7 +297,7 @@ const Add = () => {
...
@@ -288,7 +297,7 @@ const Add = () => {
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
'数量需要大于0'
))
return
Promise
.
reject
(
new
Error
(
'数量需要大于0'
))
}
}
if
(
value
>
record
.
reconciliationQuantity
)
{
if
(
value
>
record
.
reconciliationQuantity
)
{
return
Promise
.
reject
(
new
Error
(
'不能大于待对账数量'
))
return
Promise
.
reject
(
new
Error
(
'不能大于待对账数量'
))
}
}
return
Promise
.
resolve
()
return
Promise
.
resolve
()
...
...
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