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
500e42aa
Commit
500e42aa
authored
Aug 21, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form
parent
e5e5dac1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
+1
-0
gsb-marketplat/app/base/service/impl/configmag/forminfoSve.js
+14
-2
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
+5
-1
No files found.
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
View file @
500e42aa
...
@@ -22,6 +22,7 @@ module.exports = (db, DataTypes) => {
...
@@ -22,6 +22,7 @@ module.exports = (db, DataTypes) => {
templatelink_snapshot
:
DataTypes
.
JSON
,
//模板链接快照
templatelink_snapshot
:
DataTypes
.
JSON
,
//模板链接快照
record_content
:
DataTypes
.
JSON
,
//记录内容
record_content
:
DataTypes
.
JSON
,
//记录内容
push_status
:
DataTypes
.
INTEGER
,
//推送状态 0:未推送,1:已推送 2:异常
push_status
:
DataTypes
.
INTEGER
,
//推送状态 0:未推送,1:已推送 2:异常
op_notes
:
DataTypes
.
STRING
,
//操作备注
},
{
},
{
paranoid
:
true
,
//假的删除
paranoid
:
true
,
//假的删除
underscored
:
true
,
underscored
:
true
,
...
...
gsb-marketplat/app/base/service/impl/configmag/forminfoSve.js
View file @
500e42aa
...
@@ -21,7 +21,12 @@ class ForminfoService extends ServiceBase {
...
@@ -21,7 +21,12 @@ class ForminfoService extends ServiceBase {
if
(
!
pobj
.
form_describe
){
if
(
!
pobj
.
form_describe
){
return
system
.
getResultFail
(
-
1
,
'表单描述不能为空'
);
return
system
.
getResultFail
(
-
1
,
'表单描述不能为空'
);
}
}
var
checkFormInfo
=
await
this
.
dao
.
model
.
findOne
({
where
:{
name
:
pobj
.
name
},
raw
:
true
});
if
(
checkFormInfo
&&
checkFormInfo
.
id
){
return
system
.
getResultFail
(
-
300
,
'表单名称重复,操作失败'
);
}
let
code
=
await
this
.
getBusUid
(
"fm"
)
let
code
=
await
this
.
getBusUid
(
"fm"
)
pobj
.
code
=
code
;
pobj
.
code
=
code
;
pobj
.
user_id
=
pobj
.
userid
;
pobj
.
user_id
=
pobj
.
userid
;
...
@@ -95,6 +100,12 @@ class ForminfoService extends ServiceBase {
...
@@ -95,6 +100,12 @@ class ForminfoService extends ServiceBase {
name
:
pobj
.
name
,
name
:
pobj
.
name
,
form_describe
:
pobj
.
form_describe
form_describe
:
pobj
.
form_describe
}
}
var
checkFormInfo
=
await
this
.
dao
.
model
.
findOne
({
where
:{
name
:
pobj
.
name
},
raw
:
true
});
if
(
checkFormInfo
&&
checkFormInfo
.
id
){
return
system
.
getResultFail
(
-
300
,
'表单名称重复,操作失败'
);
}
let
template
=
await
this
.
templateDao
.
findOne
({
form_id
:
pobj
.
id
},[]);
let
template
=
await
this
.
templateDao
.
findOne
({
form_id
:
pobj
.
id
},[]);
if
(
template
&&
template
.
is_enabled
==
1
){
if
(
template
&&
template
.
is_enabled
==
1
){
return
system
.
getResultFail
(
-
1
,
'表单已投入使用,不能修改'
)
return
system
.
getResultFail
(
-
1
,
'表单已投入使用,不能修改'
)
...
@@ -182,7 +193,8 @@ class ForminfoService extends ServiceBase {
...
@@ -182,7 +193,8 @@ class ForminfoService extends ServiceBase {
minchars
=
7
;
minchars
=
7
;
maxchars
=
11
;
maxchars
=
11
;
}
}
let
rule
=
{
"validator"
:
"validatex"
,
"trigger"
:
"blur"
,
"minchars"
:
minchars
,
"maxchars"
:
maxchars
}
let
rule
=
{
"validator"
:
"validatex"
,
"trigger"
:
"blur"
,
"minchars"
:
minchars
,
"maxchars"
:
maxchars
};
rule
[
"verifysms"
]
=
param
.
verify_sms
||
0
;
rules
.
push
(
rule
);
rules
.
push
(
rule
);
}
}
//省市选项 增加 ignorelevel属性 忽略区县为4,不忽略为5
//省市选项 增加 ignorelevel属性 忽略区县为4,不忽略为5
...
...
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
View file @
500e42aa
...
@@ -65,7 +65,11 @@ class FormsubmitrecordService extends ServiceBase {
...
@@ -65,7 +65,11 @@ class FormsubmitrecordService extends ServiceBase {
template_id
:
linkInfo
.
template_id
,
templatelink_id
:
linkInfo
.
id
,
template_id
:
linkInfo
.
template_id
,
templatelink_id
:
linkInfo
.
id
,
form_id
:
forminfo
.
id
,
record_status
:
1
,
templatelink_snapshot
:
linkInfo
,
form_id
:
forminfo
.
id
,
record_status
:
1
,
templatelink_snapshot
:
linkInfo
,
form_snapshot
:{
forminfo
:
forminfo
,
formitems
:
formitems
},
form_snapshot
:{
forminfo
:
forminfo
,
formitems
:
formitems
},
record_content
:
params
,
business_code
:
templateinfo
.
business_code
record_content
:
params
,
business_code
:
templateinfo
.
business_code
,
push_status
:
0
}
if
(
ab
.
push_status
==
1
){
addObj
.
push_status
=
1
;
}
}
await
this
.
dao
.
create
(
addObj
);
//创建记录
await
this
.
dao
.
create
(
addObj
);
//创建记录
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
...
...
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