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
c13e830a
Commit
c13e830a
authored
May 17, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同管理
parent
6c8f42bf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
263 additions
and
172 deletions
+263
-172
HGCW002.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW002.java
+0
-3
ServiceHGCW002.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
+3
-0
ServiceHGCW002B.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW002B.java
+1
-5
ServiceHGCW003.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW003.java
+27
-61
ServiceHGCW999.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW999.java
+34
-16
HGCW002A.js
src/main/webapp/HG/CW/HGCW002A.js
+6
-6
HGCW002B.js
src/main/webapp/HG/CW/HGCW002B.js
+178
-78
HGCW002B.jsp
src/main/webapp/HG/CW/HGCW002B.jsp
+4
-2
HGCW099.js
src/main/webapp/HG/CW/HGCW099.js
+10
-1
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW002.java
View file @
c13e830a
...
...
@@ -267,9 +267,6 @@ public class HGCW002 extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TAX_POINTS
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"税点"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
View file @
c13e830a
...
...
@@ -96,6 +96,9 @@ public class ServiceHGCW002 extends ServiceBase {
HGCWTools
.
HgCw003
.
save
(
detail1Rows
,
contractNumber
,
userVO
);
HGCWTools
.
HgCw999
.
batchUpdate
(
detail2Rows
,
HGCW002
.
getId
());
}
else
{
HGCW002
.
setPlanStartDate
(
DateUtils
.
formatShort
(
HGCW002
.
getPlanStartDate
()));
HGCW002
.
setPlanEndDate
(
DateUtils
.
formatShort
(
HGCW002
.
getPlanEndDate
()));
HGCW002
.
setSigningDate
(
DateUtils
.
formatShort
(
HGCW002
.
getSigningDate
()));
this
.
modify
(
HGCW002
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW002B.java
View file @
c13e830a
...
...
@@ -38,14 +38,10 @@ public class ServiceHGCW002B extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"修改合同"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJECT_CODE_BOX_BLOCK_ID
),
null
,
false
);
String
id
=
inInfo
.
getString
(
"id"
);
HGCW002
HGCW002
=
HGCWTools
.
HgCw002
.
getId
(
id
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
HGCW002
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJECT_CODE_BOX_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){
{
put
(
"projCode"
,
HGCW002
.
getProjCode
());}
},
false
);
//获取清单
List
<
HGCW003
>
hgcw003List
=
HGCWTools
.
HgCw003
.
queryByContractNumber
(
HGCW002
.
getContractNumber
());
inInfo
.
addBlock
(
"detail1"
).
addRows
(
hgcw003List
);
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW003.java
View file @
c13e830a
...
...
@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.domain.HGCW003
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.LogUtils
;
...
...
@@ -67,25 +68,29 @@ public class ServiceHGCW003 extends ServiceBase {
*/
@OperationLogAnnotation
(
operModul
=
"合同清单"
,
operType
=
"保存"
,
operDesc
=
"保存"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
"detail1"
).
getRows
();
String
contractNumber
=
""
;
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW003
HGCW003
=
new
HGCW003
();
HGCW003
.
fromMap
(
resultRows
.
get
(
i
));
contractNumber
=
HGCW003
.
getContractNumber
();
if
(
HGCW003
.
getId
()
==
null
||
HGCW003
.
getId
()
==
0
)
{
this
.
add
(
HGCW003
);
}
else
{
this
.
modify
(
HGCW003
);
}
}
// inInfo = this.query(inInfo);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
List
<
HGCW003
>
hgcw003List
=
HGCWTools
.
HgCw003
.
queryByContractNumber
(
contractNumber
);
eiInfo
.
addBlock
(
"detail1"
).
addRows
(
hgcw003List
);
eiInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
eiInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
in
Info
;
return
ei
Info
;
}
/**
...
...
@@ -107,57 +112,11 @@ public class ServiceHGCW003 extends ServiceBase {
public
void
modify
(
HGCW003
HGCW003
)
{
DaoUtils
.
update
(
"HGCW003.update"
,
HGCW003
);
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"合同清单"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据写入
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW003
HGCW003
=
new
HGCW003
();
HGCW003
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
insert
(
"HGCW003.insert"
,
HGCW003
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
inInfo
;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"合同清单"
,
operType
=
"修改"
,
operDesc
=
"修改"
)
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW003
HGCW003
=
new
HGCW003
();
HGCW003
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
"HGCW003.update"
,
HGCW003
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据修改成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
public
void
deleteEntity
(
HGCW003
HGCW003
)
{
DaoUtils
.
update
(
"HGCW003.delete"
,
HGCW003
);
}
/**
* 删除操作
*
...
...
@@ -166,18 +125,25 @@ public class ServiceHGCW003 extends ServiceBase {
*/
@OperationLogAnnotation
(
operModul
=
"合同清单"
,
operType
=
"删除"
,
operDesc
=
"删除"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
"detail1"
).
getRows
();
String
contractNumber
=
""
;
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
DaoUtils
.
update
(
"HGCW003.delete"
,
resultRows
.
get
(
i
));
HGCW003
HGCW003
=
new
HGCW003
();
HGCW003
.
fromMap
(
resultRows
.
get
(
i
));
contractNumber
=
HGCW003
.
getContractNumber
();
this
.
deleteEntity
(
HGCW003
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
List
<
HGCW003
>
hgcw003List
=
HGCWTools
.
HgCw003
.
queryByContractNumber
(
contractNumber
);
eiInfo
.
addBlock
(
"detail1"
).
addRows
(
hgcw003List
);
eiInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
eiInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
}
return
in
Info
;
return
ei
Info
;
}
/**
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW999.java
View file @
c13e830a
...
...
@@ -3,7 +3,9 @@ package com.baosight.hggp.hg.cw.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.domain.HGCW003
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.LogUtils
;
...
...
@@ -88,7 +90,17 @@ public class ServiceHGCW999 extends ServiceEPBase {
}
return
inInfo
;
}
public
void
add
(
HGCW999
HGCW999
)
{
DaoUtils
.
insert
(
"HGCW999.insert"
,
HGCW999
);
}
public
void
deleteEntity
(
HGCW999
HGCW999
)
{
DaoUtils
.
update
(
"HGCW999.delete"
,
HGCW999
);
}
/**
* 新增操作
*
...
...
@@ -98,19 +110,24 @@ public class ServiceHGCW999 extends ServiceEPBase {
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"新增"
,
operDesc
=
"物料清单-附件清单A-新增操作"
)
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
try
{
Long
matId
=
null
;
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW999
fSc002A
=
new
HGCW999
();
fSc002A
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
insert
(
HGCW999
.
INSERT
,
fSc002A
);
matId
=
fSc002A
.
getMatId
();
this
.
add
(
fSc002A
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
List
<
HGCW999
>
hgcw999List
=
HGCWTools
.
HgCw999
.
queryByBiz
(
matId
,
"HT"
);
eiInfo
.
addBlock
(
"detail2"
).
addRows
(
hgcw999List
);
eiInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
eiInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
in
Info
,
e
,
"新增失败"
);
LogUtils
.
setDetailMsg
(
ei
Info
,
e
,
"新增失败"
);
}
return
in
Info
;
return
ei
Info
;
}
/**
...
...
@@ -121,23 +138,24 @@ public class ServiceHGCW999 extends ServiceEPBase {
*/
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"删除"
,
operDesc
=
"物料清单-附件清单A-删除操作"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
Long
matId
=
null
;
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
"detail2"
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW999
fSc002A
=
new
HGCW999
();
fSc002A
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
HGCW999
.
DELETE
,
fSc002A
);
// if (!fSc002A.getDocId().isEmpty()) {
// this.delectDoc(fSc002A.getDocId());
// }
matId
=
fSc002A
.
getMatId
();
this
.
deleteEntity
(
fSc002A
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
List
<
HGCW999
>
hgcw999List
=
HGCWTools
.
HgCw999
.
queryByBiz
(
matId
,
"HT"
);
eiInfo
.
addBlock
(
"detail2"
).
addRows
(
hgcw999List
);
eiInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
eiInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
in
Info
,
e
,
"删除失败"
);
LogUtils
.
setDetailMsg
(
ei
Info
,
e
,
"删除失败"
);
}
return
in
Info
;
return
ei
Info
;
}
/**
...
...
src/main/webapp/HG/CW/HGCW002A.js
View file @
c13e830a
...
...
@@ -33,10 +33,10 @@ $(function() {
var
totalPriceIncluding
=
0
;
var
valueAddedTax
=
0
;
allRows
.
forEach
(
function
(
row
,
index
)
{
totalPriceExcluding
+=
row
.
totalPriceExcluding
;
totalPriceIncluding
+=
row
.
totalPriceIncluding
;
totalPriceExcluding
+=
parseFloat
(
row
.
totalPriceExcluding
)
;
totalPriceIncluding
+=
parseFloat
(
row
.
totalPriceIncluding
)
;
});
valueAddedTax
=
totalPriceIncluding
-
totalPriceExcluding
;
valueAddedTax
=
parseFloat
(
totalPriceIncluding
)
-
parseFloat
(
totalPriceExcluding
)
;
$
(
"#result-0-totalContractPriceExcluding"
).
val
(
totalPriceExcluding
.
toFixed
(
3
))
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalPriceIncluding
.
toFixed
(
3
))
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
...
...
@@ -230,10 +230,10 @@ function uploadFileFunc() {
*
* @param docId
*/
function
uploadFileCallback
(
d
ocId
)
{
function
uploadFileCallback
(
d
ata
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-docId"
,
docId
);
inEiInfo
.
set
(
"result-0-bizType"
,
$
(
"#inqu_status-0-bizType"
).
val
()
);
inEiInfo
.
set
(
"result-0-docId"
,
d
ata
.
d
ocId
);
inEiInfo
.
set
(
"result-0-bizType"
,
data
.
bizType
);
EiCommunicator
.
send
(
'HGCW999'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
if
(
response
.
status
===
0
)
{
...
...
src/main/webapp/HG/CW/HGCW002B.js
View file @
c13e830a
$
(
function
()
{
initDate
();
$
(
"#cancel"
).
on
(
"click"
,
function
()
{
cancelFunc
();
});
...
...
@@ -24,32 +22,31 @@ $(function() {
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
// 计算总金额
var
taxPoints
=
$
(
"#result-0-taxPoints"
).
val
()
?
$
(
"#result-0-taxPoints"
).
val
()
:
0
;
var
taxPoints
=
$
(
"#result-0-taxPoints"
).
val
()
?
$
(
"#result-0-taxPoints"
).
val
()
/
100
:
0
;
var
totalPriceExcluding
=
item
.
provisionalQuantity
*
item
.
unitPriceExcludingTax
;
var
totalPriceIncluding
=
totalPriceExcluding
*
(
1
+
parseFloat
(
taxPoints
));
detail1Grid
.
setCellValue
(
item
,
'totalPriceExcluding'
,
totalPriceExcluding
);
detail1Grid
.
setCellValue
(
item
,
'totalPriceIncluding'
,
totalPriceIncluding
);
console
.
log
(
grid
.
dataSource
.
_data
);
console
.
log
(
detail1Grid
.
getDataItems
());
var
allRows
=
detail1Grid
.
getDataItems
();
var
totalPriceExcluding
=
0
;
var
totalPriceIncluding
=
0
;
var
valueAddedTax
=
0
;
allRows
.
forEach
(
function
(
row
,
index
)
{
totalPriceExcluding
+=
row
.
totalPriceExcluding
;
totalPriceIncluding
+=
row
.
totalPriceIncluding
;
});
valueAddedTax
=
totalPriceIncluding
-
totalPriceExcluding
;
$
(
"#result-0-totalContractPriceExcluding"
).
val
(
totalPriceExcluding
.
toFixed
(
3
))
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalPriceIncluding
.
toFixed
(
3
))
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
calculateAmount
();
}
});
setTimeout
(
function
()
{
initDate
();
},
1000
);
},
onAdd
:
function
(
e
)
{
var
contractNumber
=
$
(
"#result-0-contractNumber"
).
val
();
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'contractNumber'
]
=
contractNumber
;
});
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
saveResult1Func
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
saveResult1Func
(
btnNode
);
},
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
...
...
@@ -63,6 +60,9 @@ $(function() {
});
$
(
"#DELETE_FILE"
).
on
(
"click"
,
function
()
{
// let btnNode = $(this);
//禁用按钮
// btnNode.attr("disabled", true);
deleteFileFunc
();
});
IPLATUI
.
EFGrid
.
detail2
=
{
...
...
@@ -215,28 +215,70 @@ $(function() {
})
});
function
initDate
()
{
setTimeout
(
function
()
{
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
$
(
"#projCodeBox"
).
val
(
projCode
)
var
contractCategory
=
$
(
"#result-0-contractCategory"
).
val
()
if
(
contractCategory
==
"1"
||
contractCategory
==
"3"
)
{
$
(
"#contractCategoryName"
).
val
(
"收入"
);
}
else
if
(
contractCategory
==
"2"
||
contractCategory
==
"4"
){
$
(
"#contractCategoryName"
).
val
(
"支出"
);
}
else
{
$
(
"#contractCategoryName"
).
val
(
""
);
}
},
3000
);
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
$
(
"#projCodeBox"
).
data
(
"kendoDropDownList"
).
value
(
projCode
);
var
contractCategory
=
$
(
"#result-0-contractCategory"
).
val
()
if
(
contractCategory
==
"1"
||
contractCategory
==
"3"
)
{
$
(
"#contractCategoryName"
).
val
(
"收入"
);
}
else
if
(
contractCategory
==
"2"
||
contractCategory
==
"4"
){
$
(
"#contractCategoryName"
).
val
(
"支出"
);
}
else
{
$
(
"#contractCategoryName"
).
val
(
""
);
}
var
partyA
=
$
(
"#result-0-partyA"
).
val
();
var
partyB
=
$
(
"#result-0-partyB"
).
val
();
IPLAT
.
EFPopupInput
.
text
(
$
(
"#popupInputPartyA"
)
,
partyA
)
IPLAT
.
EFPopupInput
.
text
(
$
(
"#popupInputPartyB"
)
,
partyB
)
}
function
saveResult1Func
()
{
function
saveResult1Func
(
btn
)
{
let
rows
=
detail1Grid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
var
info
=
new
EiInfo
();
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"detail1"
));
EiCommunicator
.
send
(
"HGCW003"
,
"save"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
NotificationUtil
(
response
.
msg
);
}
catch
(
e
)
{
// TODO: handle exception
}
if
(
IPLAT
.
isAvailable
(
"detail1"
))
{
window
[
'detail1Grid'
].
setEiInfo
(
ei
);
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
//释放禁用按钮
btn
.
attr
(
"disabled"
,
false
);
}
});
}
function
uploadFileFunc
()
{
var
id
=
$
(
"#result-0-id"
).
val
();
JSColorbox
.
open
({
href
:
"HGCW099?methodName=initLoad&inqu_status-0-bizType=HT
"
,
href
:
"HGCW099?methodName=initLoad&inqu_status-0-bizType=HT
&inqu_status-0-matId="
+
id
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"60%"
,
height
:
"50%"
,
...
...
@@ -248,35 +290,30 @@ function uploadFileFunc() {
*
* @param docId
*/
function
uploadFileCallback
(
docId
)
{
function
uploadFileCallback
(
data
)
{
debugger
;
console
.
log
(
"uploadFileCallback"
)
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-docId"
,
docId
);
inEiInfo
.
set
(
"result-0-bizType"
,
$
(
"#inqu_status-0-bizType"
).
val
());
inEiInfo
.
set
(
"result-0-matId"
,
data
.
matId
);
inEiInfo
.
set
(
"result-0-docId"
,
data
.
docId
);
inEiInfo
.
set
(
"result-0-bizType"
,
data
.
bizType
);
EiCommunicator
.
send
(
'HGCW999'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
if
(
response
.
status
===
0
)
{
EiCommunicator
.
send
(
'HGCW999'
,
'queryDoc'
,
inEiInfo
,
{
onSuccess
(
e
)
{
console
.
log
(
e
);
if
(
e
.
status
===
0
)
{
let
data
=
e
.
extAttr
.
data
;
detail2Grid
.
dataSource
.
insert
();
detail2Grid
.
setCellValue
(
0
,
"rowNo"
,
0
);
detail2Grid
.
setCellValue
(
0
,
"id"
,
data
.
id
);
detail2Grid
.
setCellValue
(
0
,
"docId"
,
data
.
docId
);
detail2Grid
.
setCellValue
(
0
,
"docName"
,
data
.
docName
);
detail2Grid
.
setCellValue
(
0
,
"createdTime"
,
data
.
createdTime
);
detail2Grid
.
refresh
();
}
else
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
onSuccess
(
ei
)
{
if
(
ei
.
status
===
0
)
{
try
{
NotificationUtil
(
ei
.
msg
);
}
catch
(
e
)
{
// TODO: handle exception
}
if
(
IPLAT
.
isAvailable
(
"detail2"
))
{
window
[
'detail2Grid'
].
setEiInfo
(
ei
);
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
...
...
@@ -297,7 +334,7 @@ function cancelFunc() {
function
btnSaveFunc
()
{
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
"
detail1,detail2
"
,
"HGCW002"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowCallback
});
JSUtils
.
submitGrid
(
"
result
"
,
"HGCW002"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowCallback
});
}
});
}
...
...
@@ -307,10 +344,41 @@ function deleteFileFunc() {
message
(
"请选择数据"
);
return
;
}
rows
.
forEach
(
function
(
row
)
{
detail2Grid
.
removeRows
([
rows
.
rowNo
]);
// 刷新行号
})
refreshRowNo
();
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
var
info
=
new
EiInfo
();
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"detail2"
));
EiCommunicator
.
send
(
"HGCW999"
,
"delete"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
NotificationUtil
(
ei
.
msg
);
}
catch
(
e
)
{
// TODO: handle exception
}
if
(
IPLAT
.
isAvailable
(
"detail2"
))
{
window
[
'detail2Grid'
].
setEiInfo
(
ei
);
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
//释放禁用按钮
// btn.attr("disabled", false);
}
});
}
function
deleteResult1Func
()
{
let
rows
=
detail1Grid
.
getCheckedRows
();
...
...
@@ -318,22 +386,54 @@ function deleteResult1Func() {
message
(
"请选择数据"
);
return
;
}
rows
.
forEach
(
function
(
row
)
{
detail1Grid
.
removeRows
([
rows
.
rowNo
]);
// 刷新行号
})
refreshRowNo
();
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除1
\"
操作? "
,
{
ok
:
function
()
{
var
info
=
new
EiInfo
();
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"detail1"
));
EiCommunicator
.
send
(
"HGCW003"
,
"delete"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
NotificationUtil
(
response
.
msg
);
}
catch
(
e
)
{
// TODO: handle exception
}
if
(
IPLAT
.
isAvailable
(
"detail1"
))
{
window
[
'detail1Grid'
].
setEiInfo
(
ei
);
calculateAmount
();
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
let
refreshRowNo
=
function
()
{
let
allRows
=
detail1Grid
.
getDataItems
();
for
(
let
i
=
0
;
i
<
allRows
.
length
;
i
++
)
{
detail1Grid
.
setCellValue
(
i
,
"rowNo"
,
i
);
detail1Grid
.
refresh
();
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
}
});
}
$
(
window
).
load
(
function
()
{
refreshRowNo
();
});
function
calculateAmount
()
{
var
allRows
=
detail1Grid
.
getDataItems
();
var
totalPriceExcluding
=
0
;
var
totalPriceIncluding
=
0
;
var
valueAddedTax
=
0
;
allRows
.
forEach
(
function
(
row
,
index
)
{
totalPriceExcluding
+=
parseFloat
(
row
.
totalPriceExcluding
);
totalPriceIncluding
+=
parseFloat
(
row
.
totalPriceIncluding
);
});
valueAddedTax
=
parseFloat
(
totalPriceIncluding
)
-
parseFloat
(
totalPriceExcluding
);
$
(
"#result-0-totalContractPriceExcluding"
).
val
(
totalPriceExcluding
.
toFixed
(
3
))
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalPriceIncluding
.
toFixed
(
3
))
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
}
src/main/webapp/HG/CW/HGCW002B.jsp
View file @
c13e830a
...
...
@@ -9,6 +9,8 @@
<EF:EFPage
title=
"修改合同"
>
<EF:EFRegion
id=
"inqu1"
title=
"基本信息"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-id"
cname=
"id"
type=
"hidden"
/>
<EF:EFSelect
cname=
"项目编号"
ename=
"projCodeBox"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOptions
...
...
@@ -111,8 +113,8 @@
</EF:EFRegion>
<EF:EFRegion
id=
"detail1"
title=
"合同清单"
>
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"rowNo"
cname=
"行号"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"contractNumber"
cname=
"合同号"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventory"
cname=
"清单"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
align=
"center"
/>
<EF:EFColumn
ename=
"provisionalQuantity"
cname=
"暂定工程量"
format=
"{0:N3}"
align=
"center"
/>
...
...
@@ -126,8 +128,8 @@
</EF:EFRegion>
<EF:EFRegion
id=
"detail2"
title=
"附件信息"
>
<EF:EFGrid
blockId=
"detail2"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"rowNo"
cname=
"行号"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"matId"
cname=
"matId"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
...
...
src/main/webapp/HG/CW/HGCW099.js
View file @
c13e830a
...
...
@@ -10,10 +10,19 @@ $(function () {
}
$
(
"#fileDocId"
).
val
(
docId
);
NotificationUtil
(
"附件上传成功"
);
var
matId
=
$
(
"#inqu_status-0-matId"
).
val
();
var
bizType
=
$
(
"#inqu_status-0-bizType"
).
val
();
console
.
log
(
$
(
"#fileDocId"
).
val
())
console
.
log
(
$
(
"#inqu_status-0-matId"
).
val
())
console
.
log
(
$
(
"#inqu_status-0-bizType"
).
val
())
var
data
=
{
docId
:
docId
,
matId
:
matId
,
bizType
:
bizType
}
// saveTemp(e);
try
{
parent
.
JSColorbox
.
setValueCallback
(
d
ocId
);
parent
.
JSColorbox
.
setValueCallback
(
d
ata
);
}
catch
(
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