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
9f328428
Commit
9f328428
authored
May 24, 2024
by
13420
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
優化調整
parent
164eb831
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
170 deletions
+34
-170
ServiceHGCW002.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
+9
-4
ServiceHGCW004.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW004.java
+1
-4
HGCW002.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
+3
-0
HGCW004.js
src/main/webapp/HG/CW/HGCW004.js
+9
-63
HGCW005.js
src/main/webapp/HG/CW/HGCW005.js
+12
-99
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
View file @
9f328428
...
...
@@ -22,10 +22,7 @@ import org.apache.commons.collections.CollectionUtils;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @author yukang
...
...
@@ -262,12 +259,20 @@ public class ServiceHGCW002 extends ServiceBase {
public
EiInfo
projectComboBox
(
EiInfo
inInfo
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
String
>
contractTypArray
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
inInfo
.
getString
(
"reviewStatus"
)))
{
map
.
put
(
"reviewStatus"
,
inInfo
.
getString
(
"reviewStatus"
));
}
if
(
StringUtils
.
isNotEmpty
(
inInfo
.
getString
(
"contractType"
)))
{
map
.
put
(
"contractType"
,
inInfo
.
getString
(
"contractType"
));
}
if
(
StringUtils
.
isNotEmpty
(
inInfo
.
getString
(
"contractTyps"
)))
{
String
[]
contractTyps
=
inInfo
.
getString
(
"contractTyps"
).
split
(
","
);
for
(
String
c
:
contractTyps
)
{
contractTypArray
.
add
(
c
);
}
map
.
put
(
"contractTyps"
,
contractTypArray
);
}
List
<
HGCW002
>
HGCW002List
=
dao
.
query
(
"HGCW002.queryProjectComboBox"
,
map
);
inInfo
.
addBlock
(
"projcet_combo_box"
).
setRows
(
HGCW002List
);
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW004.java
View file @
9f328428
...
...
@@ -193,10 +193,7 @@ public class ServiceHGCW004 extends ServiceBase {
// * 上传附件
// * @param inInfo
// * @return
// */
// @OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件")
// public EiInfo form(EiInfo inInfo) {
// return inInfo;
// *
// }
@OperationLogAnnotation
(
operModul
=
"账期维护"
,
operType
=
"上传附件"
,
operDesc
=
"上传附件操作"
)
public
EiInfo
updateDocId
(
EiInfo
inInfo
){
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
View file @
9f328428
...
...
@@ -510,6 +510,9 @@
<isNotEmpty
prepend=
" AND "
property=
"contractType"
>
CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractTyps"
>
CONTRACT_TYPE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"contractTyps"
>
#contractTyps[]#
</iterate>
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
</select>
...
...
src/main/webapp/HG/CW/HGCW004.js
View file @
9f328428
...
...
@@ -24,8 +24,8 @@ $(function() {
let
auditStatus
=
item
.
status
;
let
template
=
''
;
if
(
item
.
id
)
{
template
+
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="
uploadFile('
+
item
.
id
+
')" >附件上传
</a>'
;
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="
fileDetailFunc('
+
item
.
id
+
')">附件详情
</a>'
;
}
return
template
;
...
...
@@ -254,67 +254,13 @@ function updateStatus(id,deviceStatus) {
}
);
}
/**
* 文件上传
*
* @param id
*/
function
uploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW004A?methodName=initLoad&inqu_status-0-id="
+
id
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"60%"
,
height
:
"50%"
,
callbackName
:
uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function
uploadFileCallback
(
result
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
result
.
id
);
inEiInfo
.
set
(
"result-0-docId"
,
result
.
docId
);
inEiInfo
.
set
(
"result-0-docName"
,
result
.
docName
);
EiCommunicator
.
send
(
'HGCW004'
,
'updateDocId'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
if
(
ei
.
status
==
"-1"
)
{
NotificationUtil
({
msg
:
ei
.
msg
,
detailMsg
:
ei
.
detailMsg
},
"error"
);
}
else
{
NotificationUtil
(
ei
.
msg
);
query
();
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
function
loadChange
(
grid
,
e
,
field
)
{
var
cell_label
=
field
,
that
=
grid
;
// locked 表示是否为固定列
var
locked
=
that
.
isCellLocked
(
cell_label
);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var
tr
,
index
;
// 获取此 model 元素信息
var
item
=
e
.
items
[
0
];
var
_uid
=
item
.
uid
;
if
(
locked
)
{
tr
=
$
(
".k-grid-content-locked tr[data-uid="
+
_uid
+
"]"
);
index
=
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
);
}
else
{
tr
=
$
(
".k-grid-content tr[data-uid="
+
_uid
+
"]"
);
index
=
parseInt
(
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
))
-
that
.
lockedHeader
.
find
(
"th"
).
length
;
}
// 获取子 cell(td)
var
td
=
tr
.
children
(
"td:eq("
+
index
+
")"
);
// 触发 td.click 事件,
td
.
trigger
(
"click"
);
function
fileDetailFunc
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW999?methodName=initLoad&inqu_status-0-bizType=QZ&inqu_status-0-matId="
+
id
+
"&efParentFormEname=HGCW004"
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
src/main/webapp/HG/CW/HGCW005.js
View file @
9f328428
...
...
@@ -23,7 +23,7 @@ $(function() {
let
template
=
''
;
if
(
item
.
id
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="
uploadFile
('
+
item
.
id
+
')" >附件上传</a>'
;
+
'onclick="
fileDetailFunc
('
+
item
.
id
+
')" >附件上传</a>'
;
}
return
template
;
...
...
@@ -35,7 +35,7 @@ $(function() {
query
:
function
(
container
,
params
)
{
var
queryInfo
=
new
EiInfo
();
// info.set("reviewStatus","3")
queryInfo
.
set
(
"contractTyp
e"
,
"2
"
)
queryInfo
.
set
(
"contractTyp
s"
,
"2,4
"
)
return
queryInfo
;
},
init
:
function
(
e
,
options
)
{
...
...
@@ -104,39 +104,7 @@ function saveFunc() {
return
;
}
let
flag
=
true
;
// $.each(rows, function(index, item) {
// let companyCode= item.get("companyCode");
// let accountYear= item.get("accountYear");
// let accountPeriod= item.get("accountPeriod");
// let accountPeriodDateStart= item.get("accountPeriodStatus");
// let accountPeriodDateEnd= item.get("accountPeriodStatus");
//
// if(isBlank(companyCode)){
// message("选中的第"+(index+1)+"行\"公司名称\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountYear)){
// message("选中的第"+(index+1)+"行\"会计年度\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountPeriod)){
// message("选中的第"+(index+1)+"行\"会计期\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountPeriodDateStart)){
// message("选中的第"+(index+1)+"行\"账期开始日期\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountPeriodDateEnd)){
// message("选中的第"+(index+1)+"行\"账期结束日期\",不能为空!");
// flag = false;
// return false;
// }
// });
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
...
...
@@ -220,70 +188,6 @@ function updateStatus(id,deviceStatus) {
}
);
}
/**
* 文件上传
*
* @param id
*/
function
uploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW005A?methodName=initLoad&inqu_status-0-id="
+
id
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"60%"
,
height
:
"50%"
,
callbackName
:
uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function
uploadFileCallback
(
result
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
result
.
id
);
inEiInfo
.
set
(
"result-0-docId"
,
result
.
docId
);
inEiInfo
.
set
(
"result-0-docName"
,
result
.
docName
);
EiCommunicator
.
send
(
'HGCW005'
,
'updateDocId'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
if
(
ei
.
status
==
"-1"
)
{
NotificationUtil
({
msg
:
ei
.
msg
,
detailMsg
:
ei
.
detailMsg
},
"error"
);
}
else
{
NotificationUtil
(
ei
.
msg
);
query
();
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
function
loadChange
(
grid
,
e
,
field
)
{
var
cell_label
=
field
,
that
=
grid
;
// locked 表示是否为固定列
var
locked
=
that
.
isCellLocked
(
cell_label
);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var
tr
,
index
;
// 获取此 model 元素信息
var
item
=
e
.
items
[
0
];
var
_uid
=
item
.
uid
;
if
(
locked
)
{
tr
=
$
(
".k-grid-content-locked tr[data-uid="
+
_uid
+
"]"
);
index
=
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
);
}
else
{
tr
=
$
(
".k-grid-content tr[data-uid="
+
_uid
+
"]"
);
index
=
parseInt
(
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
))
-
that
.
lockedHeader
.
find
(
"th"
).
length
;
}
// 获取子 cell(td)
var
td
=
tr
.
children
(
"td:eq("
+
index
+
")"
);
// 触发 td.click 事件,
td
.
trigger
(
"click"
);
}
function
submitFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
!=
1
)
{
...
...
@@ -331,3 +235,11 @@ function submitFunc() {
}
}
function
fileDetailFunc
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW999?methodName=initLoad&inqu_status-0-bizType=KK&inqu_status-0-matId="
+
id
+
"&efParentFormEname=HGCW005"
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
\ No newline at end of file
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