Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
f346785e
Commit
f346785e
authored
Feb 27, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售管理bug修复
parent
9d9e7e5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
2 deletions
+102
-2
ServiceHPSC001.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC001.java
+1
-1
HPSC001.js
src/main/webapp/HP/SC/HPSC001.js
+101
-1
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC001.java
View file @
f346785e
...
...
@@ -137,7 +137,7 @@ public class ServiceHPSC001 extends ServiceBase {
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
return
query
(
eiInfo
)
;
}
...
...
src/main/webapp/HP/SC/HPSC001.js
View file @
f346785e
...
...
@@ -4,6 +4,11 @@ $(function () {
resultGrid
.
dataSource
.
page
(
1
);
});
$
(
"#DELETE"
).
on
(
"click"
,
function
()
{
alert
(
1
);
return
false
;
});
IPLATUI
.
EFGrid
.
result
=
{
...
...
@@ -29,6 +34,24 @@ $(function () {
}
}
],
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
saveFunc
();
},
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
}
}
}
});
...
...
@@ -38,7 +61,8 @@ function check(id, auditStatus) {
inEiInfo
.
set
(
"result-0-status"
,
auditStatus
);
EiCommunicator
.
send
(
'HPSC001'
,
'check'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
//NotificationUtil(response.msg);
message
(
"提交成功,已生成项目档案"
);
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
...
...
@@ -50,3 +74,79 @@ function check(id, auditStatus) {
}
);
}
/**
* 保存
*/
function
saveFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
projType
=
item
.
get
(
"projType"
);
let
projName
=
item
.
get
(
"projName"
);
let
princ1
=
item
.
get
(
"princ1"
);
let
princ2
=
item
.
get
(
"princ2"
);
if
(
projType
===
""
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
项目类型
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
projName
===
""
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
项目名称
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
princ1
===
""
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
项目负责人
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
princ2
===
""
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
客户负责人
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPSC001"
,
"insert"
,
true
);
}
});
}
}
/**
* 删除
*/
function
deleteFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
status
===
"1"
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行记录未提交,不能删除!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPSC001"
,
"delete"
,
true
);
}
});
}
}
function
query
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
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