Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
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
常超
founder_vue
Commits
e83f038d
Commit
e83f038d
authored
Dec 05, 2022
by
liuguorong93
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警犬技术人员管理bug修复
parent
6a95046c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
src/utils/rules2.js
+13
-0
src/views/artisanManage/components/artisanManageEdit.vue
+8
-7
src/views/artisanManage/index.vue
+2
-2
No files found.
src/utils/rules2.js
View file @
e83f038d
...
...
@@ -158,6 +158,19 @@ var rules = {
callback
()
}
}
},
// 不能输入#号
noInputJing
:
(
rule
,
value
,
callback
)
=>
{
let
myreg
=
/
[
#
]
+/g
if
(
!
value
)
{
callback
(
new
Error
(
'请输入警犬芯片号'
))
}
else
{
if
(
myreg
.
test
(
value
))
{
callback
(
new
Error
(
'警犬芯片号不能含有#号'
))
}
else
{
callback
()
}
}
}
}
...
...
src/views/artisanManage/components/artisanManageEdit.vue
View file @
e83f038d
...
...
@@ -358,7 +358,7 @@ export default {
},
],
firstJqxph
:
[
{
required
:
true
,
message
:
"请输入警犬芯片号"
,
trigger
:
"blur"
},
{
required
:
true
,
validator
:
rules
.
noInputJing
,
trigger
:
"blur"
},
],
xxdjryXm
:
[
{
required
:
true
,
message
:
"采集人姓名必填"
,
trigger
:
"blur"
},
...
...
@@ -472,7 +472,7 @@ export default {
datas
.
firstJqxph
=
""
;
this
.
tableData
=
[];
let
jqxphArr
=
datas
.
jqxph
&&
datas
.
jqxph
.
length
?
datas
.
jqxph
.
split
(
"
,
"
)
:
[];
datas
.
jqxph
&&
datas
.
jqxph
.
length
?
datas
.
jqxph
.
split
(
"
#
"
)
:
[];
if
(
jqxphArr
&&
jqxphArr
.
length
===
1
)
{
datas
.
firstJqxph
=
jqxphArr
[
0
];
}
else
if
(
jqxphArr
&&
jqxphArr
.
length
>
1
)
{
...
...
@@ -505,11 +505,11 @@ export default {
this
.
$refs
.
detailInfoRef
.
validate
((
result
)
=>
{
if
(
result
)
{
// 处理警犬芯片号
let
jqxph
=
this
.
detailInfo
.
firstJqxph
+
"
,
"
;
let
jqxph
=
this
.
detailInfo
.
firstJqxph
+
"
#
"
;
if
(
this
.
tableData
&&
this
.
tableData
.
length
)
{
this
.
tableData
.
forEach
((
item
)
=>
{
if
(
item
.
xinpianhao
)
{
jqxph
=
jqxph
+
item
.
xinpianhao
+
"
,
"
;
jqxph
=
jqxph
+
item
.
xinpianhao
+
"
#
"
;
}
});
}
...
...
@@ -531,15 +531,13 @@ export default {
xxdjryGmsfhm
:
this
.
detailInfo
.
xxdjryGmsfhm
,
xxdjdwGajgmc
:
this
.
detailInfo
.
xxdjdwGajgmc
,
xxdjdwGajgjgdm
:
this
.
detailInfo
.
xxdjdwGajgjgdm
,
djsj
:
""
,
djsj
:
this
.
detailInfo
.
djsj
,
id
:
this
.
detailInfo
.
id
||
""
,
};
if
(
this
.
routeName
===
"artisanManageEdit"
)
{
params
.
djsj
=
this
.
detailInfo
.
djsj
;
this
.
editParams
(
params
);
}
else
{
params
.
djsj
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
addParams
(
params
);
}
}
...
...
@@ -617,9 +615,12 @@ export default {
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
let
myreg
=
/
[
#
]
+/g
;
let
curVal
=
item
.
xinpianhao
||
""
;
if
(
!
curVal
)
{
callback
(
new
Error
(
`请输入警犬芯片号`
));
}
else
if
(
myreg
.
test
(
curVal
))
{
callback
(
new
Error
(
"警犬芯片号不能含有#号"
));
}
else
{
callback
();
}
...
...
src/views/artisanManage/index.vue
View file @
e83f038d
...
...
@@ -126,13 +126,13 @@
size=
"small"
class=
"elTableClass"
>
<el-table-column
<
!--
<
el-table-column
label=
"序号"
align=
"center"
type=
"index"
:index=
"indexMethod"
width=
"50"
></el-table-column>
></el-table-column>
-->
<el-table-column
align=
"center"
label=
"操作"
...
...
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