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
57f9617d
Commit
57f9617d
authored
Jan 25, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化上传附件弹窗和回调操作
parent
f96ceae4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
69 deletions
+59
-69
HPSC002A.js
src/main/webapp/HP/SC/HPSC002A.js
+33
-30
HPSC002A.jsp
src/main/webapp/HP/SC/HPSC002A.jsp
+0
-4
HPSC099.js
src/main/webapp/HP/SC/HPSC099.js
+5
-2
HPZL001.js
src/main/webapp/HP/ZL/HPZL001.js
+21
-30
HPZL001.jsp
src/main/webapp/HP/ZL/HPZL001.jsp
+0
-3
No files found.
src/main/webapp/HP/SC/HPSC002A.js
View file @
57f9617d
...
...
@@ -5,7 +5,7 @@ $(function () {
field
:
"operator"
,
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
IPLATUI
.
CONTEXT_PATH
+
'/EU/DM/EUDM06.jsp?docId='
+
item
.
filePath
+
'href="'
+
IPLATUI
.
CONTEXT_PATH
+
'/EU/DM/EUDM06.jsp?docId='
+
item
.
docId
+
'" >附件下载</a>'
;
return
template
;
}
...
...
@@ -15,33 +15,6 @@ $(function () {
}
};
// 关闭事件
IPLATUI
.
EFWindow
=
{
"uploadFile"
:
{
close
:
function
(
e
)
{
let
$iframe
=
uploadFileWindow
.
element
.
children
(
"iframe"
);
let
iframejQuery
=
$iframe
[
0
].
contentWindow
.
$
;
// 子窗口中的jQuery对象
let
uploadFile
=
iframejQuery
(
"#fileDocId"
).
val
();
if
(
isBlank
(
uploadFile
))
{
return
;
}
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-matId"
,
$
(
"#inqu_status-0-matId"
).
val
());
inEiInfo
.
set
(
"result-0-docId"
,
uploadFile
);
EiCommunicator
.
send
(
'HPSC002A'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
}
};
$
(
"#ef_form_head"
).
hide
();
// 查询
...
...
@@ -72,9 +45,39 @@ var query = function (e) {
/**
* 文件上传
*
* @param id
*/
function
uploadFile
()
{
uploadFileWindow
.
open
().
center
();
function
uploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSC099?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"60%"
,
height
:
"70%"
,
callbackName
:
uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function
uploadFileCallback
(
docId
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-matId"
,
$
(
"#inqu_status-0-matId"
).
val
());
inEiInfo
.
set
(
"result-0-docId"
,
docId
);
EiCommunicator
.
send
(
'HPSC002A'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
// 关闭弹窗
JSColorbox
.
close
();
}
/**
...
...
src/main/webapp/HP/SC/HPSC002A.jsp
View file @
57f9617d
...
...
@@ -28,8 +28,4 @@
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
</EF:EFGrid>
</EF:EFRegion>
<
%
--
EEDM8010
页面加载时,不会加载
EEDM6000
(
lazyload=
"true"
)
--
%
>
<EF:EFWindow
id=
"uploadFile"
url=
"${ctx}/web/HPSC099"
lazyload=
"true"
refresh=
"true"
>
</EF:EFWindow>
</EF:EFPage>
src/main/webapp/HP/SC/HPSC099.js
View file @
57f9617d
...
...
@@ -7,7 +7,11 @@ $(function () {
$
(
"#fileDocId"
).
val
(
e
.
response
.
docId
);
NotificationUtil
(
"附件上传成功"
);
console
.
log
(
$
(
"#fileDocId"
).
val
())
try
{
parent
.
JSColorbox
.
setValueCallback
(
e
.
response
.
docId
);
}
catch
(
e
){
}
},
}
};
});
\ No newline at end of file
});
src/main/webapp/HP/ZL/HPZL001.js
View file @
57f9617d
let
rowId
;
$
(
function
()
{
// 查询
...
...
@@ -43,33 +42,6 @@ $(function() {
}]
}
};
// 关闭事件
IPLATUI
.
EFWindow
=
{
"uploadFile"
:
{
close
:
function
(
e
)
{
let
$iframe
=
uploadFileWindow
.
element
.
children
(
"iframe"
);
let
iframejQuery
=
$iframe
[
0
].
contentWindow
.
$
;
// 子窗口中的jQuery对象
let
uploadFile
=
iframejQuery
(
"#fileDocId"
).
val
();
if
(
isBlank
(
uploadFile
))
{
return
;
}
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
rowId
);
inEiInfo
.
set
(
"result-0-affix"
,
uploadFile
);
EiCommunicator
.
send
(
'HPZL001'
,
'bindDocIdById'
,
inEiInfo
,
{
onSuccess
(
response
)
{
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
},
}
};
});
/**
...
...
@@ -78,8 +50,27 @@ $(function() {
* @param id
*/
function
openUploadFile
(
id
)
{
uploadFileWindow
.
open
().
center
();
rowId
=
id
;
JSColorbox
.
open
({
href
:
"HPSC099?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"60%"
,
height
:
"70%"
,
callbackName
:
function
(
docId
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-affix"
,
docId
);
EiCommunicator
.
send
(
'HPZL001'
,
'bindDocIdById'
,
inEiInfo
,
{
onSuccess
(
response
)
{
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
});
}
/**
...
...
src/main/webapp/HP/ZL/HPZL001.jsp
View file @
57f9617d
...
...
@@ -60,7 +60,4 @@
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFRegion>
<
%
--
EEDM8010
页面加载时,不会加载
EEDM6000
(
lazyload=
"true"
)
--
%
>
<EF:EFWindow
id=
"uploadFile"
url=
"${ctx}/web/HPSC099"
lazyload=
"true"
refresh=
"true"
>
</EF:EFWindow>
</EF:EFPage>
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