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
325f564a
Commit
325f564a
authored
Aug 17, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 宝宝生日限制
parent
7399d9ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
babyinfoDialog.vue
src/components/allCustomers/components/babyinfoDialog.vue
+19
-16
baseinfoDialog.vue
src/components/allCustomers/components/baseinfoDialog.vue
+1
-1
No files found.
src/components/allCustomers/components/babyinfoDialog.vue
View file @
325f564a
...
...
@@ -39,6 +39,7 @@
value-format=
"yyyy-MM-dd"
v-model=
"fieldsList[activeName].form[item.systemFieldId]"
type=
"date"
:picker-options=
"pickerOptions()"
/>
<el-select
v-if=
"item.fieldType == 2"
:placeholder=
"item.fieldDescription"
v-model=
"fieldsList[activeName].form[item.systemFieldId]"
style=
"width: 160px;"
>
<el-option
v-for=
"(el, index) in JSON.parse(item.fieldContent.replaceAll('\'', '"'))"
:key=
"index"
:label=
"el.name"
:value=
"el.name"
/>
...
...
@@ -195,22 +196,24 @@ 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
}
},
...
...
src/components/allCustomers/components/baseinfoDialog.vue
View file @
325f564a
<
template
>
<div>
<el-dialog
title=
"编辑基本信息
333
"
title=
"编辑基本信息"
custom-class=
"customer-dialog"
:visible
.
sync=
"visible"
:close-on-click-modal=
"false"
...
...
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