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
ea2c1e3b
Commit
ea2c1e3b
authored
Apr 11, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-11 企业管理功能优化
parent
de7e1581
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
71 deletions
+84
-71
HPPZ009.js
src/main/webapp/HP/PZ/HPPZ009.js
+76
-65
HPPZ009.jsp
src/main/webapp/HP/PZ/HPPZ009.jsp
+8
-6
No files found.
src/main/webapp/HP/PZ/HPPZ009.js
View file @
ea2c1e3b
$
(
function
()
{
IPLATUI
.
EFGrid
.
result
=
{
copyToAdd
:
false
,
pageable
:
{
pageSize
:
2
0
,
pageSize
:
1
0
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[
{
field
:
"docIdPc"
,
title
:
"PC端log"
,
template
:
function
(
item
)
{
let
docId
=
item
.
docIdPc
;
let
template
=
''
;
if
(
docId
!=
null
&&
docId
.
length
>
0
){
let
src
=
downloadHref
(
docId
);
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+
'href="'
+
src
+
'" target="_blank">'
+
'<img src="'
+
src
+
'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>'
;
}
return
template
;
}
},
{
field
:
"docIdApp"
,
title
:
"APP端log"
,
template
:
function
(
item
)
{
let
docId
=
item
.
docIdApp
;
let
template
=
''
;
if
(
docId
!=
null
&&
docId
.
length
>
0
){
let
src
=
downloadHref
(
docId
);
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+
'href="'
+
src
+
'" target="_blank">'
+
'<img src="'
+
src
+
'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>'
;
}
return
template
;
}
}
],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
...
...
@@ -14,6 +47,7 @@ $(function () {
$
(
"#type"
).
val
(
"insert"
)
$
(
"#companyName"
).
val
(
""
);
$
(
"#loginPrefix"
).
val
(
""
);
$
(
"#loginPrefix"
).
removeAttr
(
"readonly"
);
$
(
"#validFlag"
).
val
(
1
);
$
(
"#PCfileDocId"
).
val
(
""
);
$
(
"#APPfileDocId"
).
val
(
""
);
...
...
@@ -28,7 +62,7 @@ $(function () {
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
e
.
preventDefault
();
//save
();
updateCompany
();
},
onDelete
:
function
(
e
)
{
// 阻止后台删除请求,使用自定义删除
...
...
@@ -44,21 +78,7 @@ $(function () {
* e.tr tr, jquery
*/
onRowClick
:
function
(
e
)
{
let
app
=
$
(
"#app-img"
),
pc
=
$
(
"#pc-img"
);
$
(
"#type"
).
val
(
"update"
);
$
(
"#companyCode"
).
val
(
e
.
model
.
companyCode
);
$
(
"#companyName"
).
val
(
e
.
model
.
companyName
);
$
(
"#loginPrefix"
).
val
(
e
.
model
.
loginPrefix
);
$
(
"#validFlag"
).
val
(
e
.
model
.
validFlag
);
$
(
"#PCfileDocId"
).
val
(
e
.
model
.
docIdPc
);
$
(
"#APPfileDocId"
).
val
(
e
.
model
.
docIdApp
);
$
(
"#remark"
).
val
(
e
.
model
.
remark
);
$
(
"#id"
).
val
(
e
.
model
.
id
);
addImgLabel
(
app
,
e
.
model
.
docIdApp
);
addImgLabel
(
pc
,
e
.
model
.
docIdPc
);
$
(
"#insertGroup_wnd_title"
).
text
(
"修改企业管理"
);
addCompany
(
$
(
"#insertGroup"
));
/*WindowUtil({
"title": "",
"content": "<div class='kendo-del-message'>" + e.row + "</div>"
...
...
@@ -86,6 +106,11 @@ $(function () {
localization
:
{
invalidFileExtension
:
"文件格式不支持, 上传失败"
},
loadComplete
:
function
(
e
)
{
var
uploader
=
e
.
sender
.
uploader
;
uploader
.
clearAllFiles
();
// 清空所有历史上传文件
},
success
:
function
(
e
)
{
let
docId
=
e
.
response
.
docId
;
if
(
isBlank
(
docId
))
{
...
...
@@ -108,6 +133,11 @@ $(function () {
localization
:
{
invalidFileExtension
:
"文件格式不支持, 上传失败"
},
loadComplete
:
function
(
e
)
{
var
uploader
=
e
.
sender
.
uploader
;
uploader
.
clearAllFiles
();
// 清空所有历史上传文件
},
success
:
function
(
e
)
{
let
docId
=
e
.
response
.
docId
;
if
(
isBlank
(
docId
))
{
...
...
@@ -157,6 +187,7 @@ let save = function (){
onSuccess
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
$
(
"#insertGroup"
).
data
(
"kendoWindow"
).
close
();
// 清除上传队列
resultGrid
.
dataSource
.
page
(
1
);
// onFail 表示失败回掉函数
},
onFail
:
function
(
ei
)
{
...
...
@@ -168,52 +199,6 @@ let save = function (){
};
/**
* 保存
*/
/*let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length = 1) {
$("#type").val("update")
}
let result = new EiInfo();
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
EiCommunicator.send("HPXS003", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
resultGrid.dataSource.page(1);
},
onFail: function (ei) {
// 发生异常
NotificationUtil("执行失败,原因[" + ei + "]", "error");
}
}, {
async: false
});
/!*JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ009", "save", true);
}
});*!/
}*/
/**
* 删除
*/
let
deleteFunc
=
function
()
{
...
...
@@ -236,11 +221,36 @@ let deleteFunc = function () {
* @param id
*/
function
addCompany
(
id
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
//打开弹窗
$
(
".k-upload-status-total"
).
remove
();
id
.
data
(
"kendoWindow"
).
open
().
center
();
}
function
updateCompany
()
{
//获取grid选中数据
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
app
=
$
(
"#app-img"
),
pc
=
$
(
"#pc-img"
);
$
(
"#type"
).
val
(
"update"
);
$
(
"#companyCode"
).
val
(
rows
[
0
][
"companyCode"
]);
$
(
"#companyName"
).
val
(
rows
[
0
][
"companyName"
]);
$
(
"#loginPrefix"
).
val
(
rows
[
0
][
"loginPrefix"
]);
$
(
"#loginPrefix"
).
attr
(
"readonly"
,
"true"
);
$
(
"#validFlag"
).
val
(
rows
[
0
][
"validFlag"
]);
$
(
"#PCfileDocId"
).
val
(
rows
[
0
][
"docIdPc"
]);
$
(
"#APPfileDocId"
).
val
(
rows
[
0
][
"docIdApp"
]);
$
(
"#remark"
).
val
(
rows
[
0
][
"remark"
]);
$
(
"#id"
).
val
(
rows
[
0
][
"id"
]);
addImgLabel
(
app
,
rows
[
0
][
"docIdApp"
]);
addImgLabel
(
pc
,
rows
[
0
][
"docIdPc"
]);
$
(
"#insertGroup_wnd_title"
).
text
(
"修改企业管理"
);
addCompany
(
$
(
"#insertGroup"
));
}
$
(
"#update"
).
click
(
function
()
{
var
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
...
...
@@ -261,6 +271,7 @@ $("#update").click(function () {
}
});
});
/**
* 附件上传回调
*
...
...
src/main/webapp/HP/PZ/HPPZ009.jsp
View file @
ea2c1e3b
...
...
@@ -15,12 +15,14 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"single"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docIdPc"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docIdApp"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
cname=
"企业编码"
ename=
"companyCode"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"企业名称"
ename=
"companyName"
width=
"140"
required=
"true"
/>
<EF:EFColumn
cname=
"登录前缀"
ename=
"loginPrefix"
width=
"100"
align=
"center"
readonly=
"true"
/>
<EF:EFComboColumn
cname=
"是否启用"
ename=
"validFlag"
width=
"80"
align=
"center"
required=
"true"
>
<
%
--
<
EF:EFColumn
ename=
"docIdPc"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docIdApp"
cname=
"主键"
hidden=
"true"
/>
--%>
<EF:EFColumn
cname=
"企业编码"
ename=
"companyCode"
enable=
"false"
width=
"120"
height=
"50"
align=
"center"
/>
<EF:EFColumn
cname=
"企业名称"
ename=
"companyName"
width=
"140"
align=
"center"
required=
"true"
/>
<EF:EFColumn
cname=
"登录前缀"
ename=
"loginPrefix"
width=
"80"
align=
"center"
readonly=
"true"
/>
<EF:EFColumn
cname=
"PC端log"
ename=
"docIdPc"
align=
"center"
width=
"200"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
cname=
"APP端log"
ename=
"docIdApp"
align=
"center"
width=
"200"
readonly=
"true"
enable=
"false"
/>
<EF:EFComboColumn
cname=
"是否启用"
ename=
"validFlag"
width=
"70"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hpjx.hppz.validFlag"
/>
</EF:EFComboColumn>
<EF:EFColumn
cname=
"备注"
ename=
"remark"
width=
"150"
editType=
"textarea"
/>
...
...
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