Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
member
Overview
Overview
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
member
member
Commits
2411016b
Commit
2411016b
authored
Aug 17, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: baobao
parent
325f564a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
babyinfoDialog.vue
src/components/allCustomers/components/babyinfoDialog.vue
+17
-18
No files found.
src/components/allCustomers/components/babyinfoDialog.vue
View file @
2411016b
...
...
@@ -92,7 +92,7 @@ export default {
},
disabledDate
(
time
)
{
let
start
=
new
Date
();
start
.
setFullYear
(
start
.
getFullYear
()
-
10
0
);
start
.
setFullYear
(
start
.
getFullYear
()
-
2
0
);
start
.
setDate
(
start
.
getDate
()
+
1
);
start
=
new
Date
(
`
${
start
.
getFullYear
()}
-
${
start
.
getMonth
()
+
1
}
-
${
start
.
getDate
()}
`
);
let
end
=
new
Date
();
...
...
@@ -197,23 +197,22 @@ export default {
}
return
{
validator
:
validatePass
,
trigger
:
'blur'
}
}
// else if(item.unifiedIdentification == 'k20303') {
// let rule = JSON.parse(item.fieldContent.replaceAll('\'', '"'));
// let time = rule.timeLong
// validatePass = (rule, value, callback) => {
// if (value === '' || value === null) {
// callback();
// } else if (new Date().getFullYear() - new Date(value).getFullYear() > parseInt(time)) {
// callback(new Error(`超过当前日期时间之前${time}年`));
// } else if(new Date(value) > new Date()) {
// callback(new Error(`超过当前日期时间`));
// } else {
// callback();
// }
// }
// return { validator: validatePass, trigger: 'blur' }
// }
else
{
else
if
(
item
.
unifiedIdentification
==
'k20303'
)
{
let
rule
=
JSON
.
parse
(
item
.
fieldContent
.
replaceAll
(
'
\'
'
,
'"'
));
let
time
=
rule
.
timeLong
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
||
value
===
null
)
{
callback
();
}
else
if
(
new
Date
().
getFullYear
()
-
new
Date
(
value
).
getFullYear
()
>
parseInt
(
time
))
{
callback
(
new
Error
(
`超过当前日期时间之前
${
time
}
年`
));
}
else
if
(
new
Date
(
value
)
>
new
Date
())
{
callback
(
new
Error
(
`超过当前日期时间`
));
}
else
{
callback
();
}
}
return
{
validator
:
validatePass
,
trigger
:
'blur'
}
}
else
{
return
null
}
},
...
...
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