Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
e7da7e30
Commit
e7da7e30
authored
Oct 23, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购收货增加附件
parent
6052c324
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
51 deletions
+50
-51
HGCG003.js
src/main/webapp/HG/CG/HGCG003.js
+30
-9
HGDM099.js
src/main/webapp/HG/DM/HGDM099.js
+16
-40
HGDM099.jsp
src/main/webapp/HG/DM/HGDM099.jsp
+3
-2
common.js
src/main/webapp/common/js/common.js
+1
-0
No files found.
src/main/webapp/HG/CG/HGCG003.js
View file @
e7da7e30
...
@@ -14,18 +14,20 @@ $(function () {
...
@@ -14,18 +14,20 @@ $(function () {
title
:
"操作"
,
title
:
"操作"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
''
;
let
template
=
''
;
if
(
!
isBlank
(
item
.
id
))
{
if
(
isBlank
(
item
.
id
))
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
return
template
;
+
'onclick="showDetail(
\'
'
+
item
.
receiveNo
+
'
\'
)" >详情</a>'
;
}
}
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail(
\'
'
+
item
.
receiveNo
+
'
\'
)" >详情</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showFile(
\'
'
+
item
.
receiveNo
+
'
\'
)" >附件</a>'
;
if
(
item
.
status
==
0
&&
item
.
source
==
1
)
{
if
(
item
.
status
==
0
&&
item
.
source
==
1
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
'onclick="updateStatus('
+
item
.
id
+
',2)" >确认收货</a>'
;
+
'onclick="updateStatus('
+
item
.
id
+
',2)" >确认收货</a>'
;
}
return
template
;
}
}
},
{
return
template
;
}
},
{
field
:
"companyCode"
,
field
:
"companyCode"
,
title
:
"公司编码"
,
title
:
"公司编码"
,
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
...
@@ -385,6 +387,25 @@ function windowCallback() {
...
@@ -385,6 +387,25 @@ function windowCallback() {
JSColorbox
.
close
();
JSColorbox
.
close
();
}
}
/**
* 附件清单
*
* @param bizId
*/
let
showFile
=
function
(
bizId
)
{
let
params
=
{
"inqu_status-0-bizId"
:
bizId
,
"inqu_status-0-bizType"
:
"PUR_RECEIVE"
,
}
JSColorbox
.
open
({
href
:
"HGDM099"
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
params
:
params
});
}
function
updateStatus
(
id
,
status
)
{
function
updateStatus
(
id
,
status
)
{
let
inEiInfo
=
new
EiInfo
();
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-id"
,
id
);
...
...
src/main/webapp/HG/DM/HGDM099.js
View file @
e7da7e30
...
@@ -4,15 +4,16 @@ $(function () {
...
@@ -4,15 +4,16 @@ $(function () {
columns
:
[{
columns
:
[{
field
:
"operator"
,
field
:
"operator"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
let
template
=
""
;
+
'href="'
+
downloadHref
(
item
.
docId
)
+
'" target="_blank">附件下载</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
CommonUtils
.
previewFile
(
item
.
docId
,
item
.
docName
)
+
'" target="_blank">预览</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
CommonUtils
.
downloadFile
(
item
.
docId
,
false
)
+
'" target="_blank">下载</a>'
;
return
template
;
return
template
;
}
}
}],
}]
loadComplete
:
function
(
grid
)
{
},
dataBound
:
function
()
{
}
}
}
};
};
...
@@ -43,40 +44,15 @@ var query = function (e) {
...
@@ -43,40 +44,15 @@ var query = function (e) {
/**
/**
* 文件上传
* 文件上传
*
* @param id
*/
*/
function
uploadFile
(
id
)
{
function
uploadFile
()
{
JSColorbox
.
open
({
let
bizId
=
$
(
"#inqu_status-0-bizId"
).
val
();
href
:
"HGDM099A"
,
let
bizType
=
$
(
"#inqu_status-0-bizType"
).
val
();
title
:
"<div style='text-align: center;'>附件上传</div>"
,
CommonUtils
.
uploadFile
(
bizType
,
bizId
,
function
(
res
)
{
width
:
"60%"
,
// 刷新列表
height
:
"50%"
,
resultGrid
.
dataSource
.
page
(
1
);
callbackName
:
uploadFileCallback
// 关闭弹窗
});
JSColorbox
.
close
();
}
/**
* 附件上传回调
*
* @param docId
*/
function
uploadFileCallback
(
e
)
{
let
res
=
e
.
response
;
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-bizId"
,
$
(
"#inqu_status-0-bizId"
).
val
());
inEiInfo
.
set
(
"result-0-bizType"
,
$
(
"#inqu_status-0-bizType"
).
val
());
inEiInfo
.
set
(
"result-0-docId"
,
res
.
docId
);
inEiInfo
.
set
(
"result-0-docName"
,
res
.
docName
);
EiCommunicator
.
send
(
'HGDM099'
,
'upload'
,
inEiInfo
,
{
onSuccess
(
response
)
{
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
});
}
}
...
...
src/main/webapp/HG/DM/HGDM099.jsp
View file @
e7da7e30
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
<EF:EFPage
title=
"附件清单"
>
<EF:EFPage
title=
"附件清单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<EF:EFInput
cname=
"业务ID"
ename=
"bizId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"业务单号"
ename=
"bizId"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
readonly=
"true"
/>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docType"
cname=
"文件类型"
enable=
"false"
width=
"100"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
...
...
src/main/webapp/common/js/common.js
View file @
e7da7e30
...
@@ -679,6 +679,7 @@ function loadChange(grid,e,field) {
...
@@ -679,6 +679,7 @@ function loadChange(grid,e,field) {
// Base64转码
// Base64转码
let
urlEncode
;
let
urlEncode
;
try
{
try
{
docName
=
encodeURIComponent
(
docName
);
urlEncode
=
encodeURIComponent
(
btoa
(
url
+
docName
));
urlEncode
=
encodeURIComponent
(
btoa
(
url
+
docName
));
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
"encodeURIComponent fail:"
,
e
)
console
.
error
(
"encodeURIComponent fail:"
,
e
)
...
...
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