Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
e5e5dac1
Commit
e5e5dac1
authored
Aug 21, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formitem
parent
028a42f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
gsb-marketplat/app/base/service/impl/configmag/formitemSve.js
+11
-3
No files found.
gsb-marketplat/app/base/service/impl/configmag/formitemSve.js
View file @
e5e5dac1
...
@@ -79,9 +79,6 @@ class FormitemService extends ServiceBase {
...
@@ -79,9 +79,6 @@ class FormitemService extends ServiceBase {
if
(
!
pobj
.
sequence
){
if
(
!
pobj
.
sequence
){
return
system
.
getResultFail
(
-
1
,
'表单排序不能为空'
)
return
system
.
getResultFail
(
-
1
,
'表单排序不能为空'
)
}
}
if
([
'contact_mobile'
,
'contact_name'
].
includes
(
pobj
.
code
)){
return
system
.
getResultFail
(
-
1
,
'默认表单项,不能修改'
);
}
let
template
=
await
this
.
templateDao
.
findOne
({
form_id
:
pobj
.
form_id
},[]);
let
template
=
await
this
.
templateDao
.
findOne
({
form_id
:
pobj
.
form_id
},[]);
if
(
template
&&
template
.
is_enabled
==
1
){
if
(
template
&&
template
.
is_enabled
==
1
){
return
system
.
getResultFail
(
-
1
,
'表单已投入使用,不能修改表单项'
);
return
system
.
getResultFail
(
-
1
,
'表单已投入使用,不能修改表单项'
);
...
@@ -91,6 +88,17 @@ class FormitemService extends ServiceBase {
...
@@ -91,6 +88,17 @@ class FormitemService extends ServiceBase {
return
configRet
;
return
configRet
;
}
}
pobj
.
config_params
=
configRet
.
data
;
pobj
.
config_params
=
configRet
.
data
;
if
([
'contact_mobile'
,
'contact_name'
].
includes
(
pobj
.
code
)){
// return system.getResultFail(-1,'默认表单项,不能修改');
delete
pobj
[
"item_type"
];
delete
pobj
[
"item_type_name"
];
delete
pobj
[
"is_required"
];
delete
pobj
[
"is_enabled"
];
delete
pobj
[
"name"
];
delete
pobj
[
"sequence"
];
delete
pobj
[
"code"
];
//item_type\item_type_name\is_required\is_enabled\name\sequence\code
}
let
upResult
=
await
this
.
update
(
pobj
);
let
upResult
=
await
this
.
update
(
pobj
);
return
system
.
getResult
(
upResult
);
return
system
.
getResult
(
upResult
);
}
}
...
...
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