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
2b15d8a1
Commit
2b15d8a1
authored
Sep 20, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
93a24d61
a22f748f
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
442 additions
and
611 deletions
+442
-611
HGCW009.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW009.java
+21
-0
ServiceHGCW008.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
+1
-1
ServiceHGCW008A.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW008A.java
+7
-2
ServiceHGCW008B.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW008B.java
+25
-1
ServiceHGCW008D.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW008D.java
+29
-0
HGCW002.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
+23
-176
HGCW008.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW008.xml
+13
-3
HGCW009.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW009.xml
+44
-140
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+32
-0
HGCW008.jsp
src/main/webapp/HG/CW/HGCW008.jsp
+16
-12
HGCW008A.js
src/main/webapp/HG/CW/HGCW008A.js
+86
-72
HGCW008A.jsp
src/main/webapp/HG/CW/HGCW008A.jsp
+9
-8
HGCW008B.js
src/main/webapp/HG/CW/HGCW008B.js
+101
-156
HGCW008B.jsp
src/main/webapp/HG/CW/HGCW008B.jsp
+13
-20
HGCW008C.jsp
src/main/webapp/HG/CW/HGCW008C.jsp
+19
-18
HGCW008D.js
src/main/webapp/HG/CW/HGCW008D.js
+1
-2
HGCW008D.jsp
src/main/webapp/HG/CW/HGCW008D.jsp
+2
-0
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW009.java
View file @
2b15d8a1
...
@@ -35,6 +35,7 @@ public class HGCW009 extends DaoEPBase {
...
@@ -35,6 +35,7 @@ public class HGCW009 extends DaoEPBase {
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_UNIT_PRICE
=
"unitPrice"
;
/* 单价*/
public
static
final
String
FIELD_UNIT_PRICE
=
"unitPrice"
;
/* 单价*/
public
static
final
String
FIELD_TOTAL_PRICE
=
"totalPrice"
;
/* 总价*/
public
static
final
String
FIELD_TOTAL_PRICE
=
"totalPrice"
;
/* 总价*/
public
static
final
String
FIELD_TOTAL_TAX_PRICE
=
"totalTaxPrice"
;
/* 总价*/
public
static
final
String
FIELD_INVENTORY_ID
=
"inventoryId"
;
/* 清单ID*/
public
static
final
String
FIELD_INVENTORY_ID
=
"inventoryId"
;
/* 清单ID*/
public
static
final
String
FIELD_REMARKS
=
"remarks"
;
/* 备注*/
public
static
final
String
FIELD_REMARKS
=
"remarks"
;
/* 备注*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
...
@@ -59,6 +60,7 @@ public class HGCW009 extends DaoEPBase {
...
@@ -59,6 +60,7 @@ public class HGCW009 extends DaoEPBase {
public
static
final
String
COL_UNIT
=
"UNIT"
;
/* 单位*/
public
static
final
String
COL_UNIT
=
"UNIT"
;
/* 单位*/
public
static
final
String
COL_UNIT_PRICE
=
"UNIT_PRICE"
;
/* 单价*/
public
static
final
String
COL_UNIT_PRICE
=
"UNIT_PRICE"
;
/* 单价*/
public
static
final
String
COL_TOTAL_PRICE
=
"TOTAL_PRICE"
;
/* 总价*/
public
static
final
String
COL_TOTAL_PRICE
=
"TOTAL_PRICE"
;
/* 总价*/
public
static
final
String
COL_TOTAL_TAX_PRICE
=
"TOTAL_TAX_PRICE"
;
/* 总价*/
public
static
final
String
COL_INVENTORY_ID
=
"INVENTORY_ID"
;
/* 清单ID*/
public
static
final
String
COL_INVENTORY_ID
=
"INVENTORY_ID"
;
/* 清单ID*/
public
static
final
String
COL_REMARKS
=
"REMARKS"
;
/* 结算依据*/
public
static
final
String
COL_REMARKS
=
"REMARKS"
;
/* 结算依据*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
...
@@ -88,6 +90,7 @@ public class HGCW009 extends DaoEPBase {
...
@@ -88,6 +90,7 @@ public class HGCW009 extends DaoEPBase {
private
String
unit
=
" "
;
/* 单位*/
private
String
unit
=
" "
;
/* 单位*/
private
BigDecimal
unitPrice
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
unitPrice
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
totalPrice
=
new
BigDecimal
(
"0"
);
/* 总价*/
private
BigDecimal
totalPrice
=
new
BigDecimal
(
"0"
);
/* 总价*/
private
BigDecimal
totalTaxPrice
=
new
BigDecimal
(
"0"
);
/* 总价*/
private
Long
inventoryId
=
new
Long
(
0
);
/* 清单ID*/
private
Long
inventoryId
=
new
Long
(
0
);
/* 清单ID*/
private
String
remarks
=
" "
;
/* 结算依据*/
private
String
remarks
=
" "
;
/* 结算依据*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
...
@@ -169,6 +172,13 @@ public class HGCW009 extends DaoEPBase {
...
@@ -169,6 +172,13 @@ public class HGCW009 extends DaoEPBase {
eiColumn
.
setDescName
(
"总价"
);
eiColumn
.
setDescName
(
"总价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TOTAL_TAX_PRICE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"含税总价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENTORY_ID
);
eiColumn
=
new
EiColumn
(
FIELD_INVENTORY_ID
);
eiColumn
.
setDescName
(
"清单ID"
);
eiColumn
.
setDescName
(
"清单ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -423,6 +433,15 @@ public class HGCW009 extends DaoEPBase {
...
@@ -423,6 +433,15 @@ public class HGCW009 extends DaoEPBase {
public
void
setTotalPrice
(
BigDecimal
totalPrice
)
{
public
void
setTotalPrice
(
BigDecimal
totalPrice
)
{
this
.
totalPrice
=
totalPrice
;
this
.
totalPrice
=
totalPrice
;
}
}
public
BigDecimal
getTotalTaxPrice
()
{
return
totalTaxPrice
;
}
public
void
setTotalTaxPrice
(
BigDecimal
totalTaxPrice
)
{
this
.
totalTaxPrice
=
totalTaxPrice
;
}
/**
/**
* get the inventoryId - 清单ID.
* get the inventoryId - 清单ID.
* @return the inventoryId
* @return the inventoryId
...
@@ -589,6 +608,7 @@ public class HGCW009 extends DaoEPBase {
...
@@ -589,6 +608,7 @@ public class HGCW009 extends DaoEPBase {
setUnit
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT
)),
unit
));
setUnit
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT
)),
unit
));
setUnitPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT_PRICE
)),
unitPrice
));
setUnitPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT_PRICE
)),
unitPrice
));
setTotalPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TOTAL_PRICE
)),
totalPrice
));
setTotalPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TOTAL_PRICE
)),
totalPrice
));
setTotalTaxPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TOTAL_TAX_PRICE
)),
totalTaxPrice
));
setInventoryId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENTORY_ID
)),
inventoryId
));
setInventoryId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENTORY_ID
)),
inventoryId
));
setRemarks
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARKS
)),
remarks
));
setRemarks
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARKS
)),
remarks
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
@@ -620,6 +640,7 @@ public class HGCW009 extends DaoEPBase {
...
@@ -620,6 +640,7 @@ public class HGCW009 extends DaoEPBase {
map
.
put
(
FIELD_UNIT
,
StringUtils
.
toString
(
unit
,
eiMetadata
.
getMeta
(
FIELD_UNIT
)));
map
.
put
(
FIELD_UNIT
,
StringUtils
.
toString
(
unit
,
eiMetadata
.
getMeta
(
FIELD_UNIT
)));
map
.
put
(
FIELD_UNIT_PRICE
,
StringUtils
.
toString
(
unitPrice
,
eiMetadata
.
getMeta
(
FIELD_UNIT_PRICE
)));
map
.
put
(
FIELD_UNIT_PRICE
,
StringUtils
.
toString
(
unitPrice
,
eiMetadata
.
getMeta
(
FIELD_UNIT_PRICE
)));
map
.
put
(
FIELD_TOTAL_PRICE
,
StringUtils
.
toString
(
totalPrice
,
eiMetadata
.
getMeta
(
FIELD_TOTAL_PRICE
)));
map
.
put
(
FIELD_TOTAL_PRICE
,
StringUtils
.
toString
(
totalPrice
,
eiMetadata
.
getMeta
(
FIELD_TOTAL_PRICE
)));
map
.
put
(
FIELD_TOTAL_TAX_PRICE
,
StringUtils
.
toString
(
totalTaxPrice
,
eiMetadata
.
getMeta
(
FIELD_TOTAL_TAX_PRICE
)));
map
.
put
(
FIELD_INVENTORY_ID
,
StringUtils
.
toString
(
inventoryId
,
eiMetadata
.
getMeta
(
FIELD_INVENTORY_ID
)));
map
.
put
(
FIELD_INVENTORY_ID
,
StringUtils
.
toString
(
inventoryId
,
eiMetadata
.
getMeta
(
FIELD_INVENTORY_ID
)));
map
.
put
(
FIELD_REMARKS
,
StringUtils
.
toString
(
remarks
,
eiMetadata
.
getMeta
(
FIELD_REMARKS
)));
map
.
put
(
FIELD_REMARKS
,
StringUtils
.
toString
(
remarks
,
eiMetadata
.
getMeta
(
FIELD_REMARKS
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
View file @
2b15d8a1
...
@@ -121,7 +121,7 @@ public class ServiceHGCW008 extends ServiceBase {
...
@@ -121,7 +121,7 @@ public class ServiceHGCW008 extends ServiceBase {
this
.
add
(
hgcw008
);
this
.
add
(
hgcw008
);
// 写入其他数据
// 写入其他数据
HGCWTools
.
HgCw009
.
save
(
detail1Rows
,
settlementNumber
,
hgcw008
);
HGCWTools
.
HgCw009
.
save
(
detail1Rows
,
settlementNumber
,
hgcw008
);
}
else
{
}
else
{
hgcw008
.
setContractDate
(
DateUtils
.
formatShort
(
hgcw008
.
getContractDate
()));
hgcw008
.
setContractDate
(
DateUtils
.
formatShort
(
hgcw008
.
getContractDate
()));
HGCW008
hgcw008Db
=
HGCWTools
.
HgCw008
.
getId
(
hgcw008
.
getId
().
toString
());
HGCW008
hgcw008Db
=
HGCWTools
.
HgCw008
.
getId
(
hgcw008
.
getId
().
toString
());
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008A.java
View file @
2b15d8a1
...
@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.service;
...
@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.hg.cw.domain.HGCW008
;
import
com.baosight.hggp.hg.cw.domain.HGCW008
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
...
@@ -19,7 +20,9 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -19,7 +20,9 @@ import org.apache.commons.collections.CollectionUtils;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author yukang
* @author yukang
...
@@ -33,15 +36,17 @@ public class ServiceHGCW008A extends ServiceBase {
...
@@ -33,15 +36,17 @@ public class ServiceHGCW008A extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"账期维护"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@OperationLogAnnotation
(
operModul
=
"账期维护"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJECT_CODE_BOX_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJECT_CODE_BOX_BLOCK_ID
),
null
,
false
);
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW008
.
FIELD_CONTRACT_DATE
,
DateUtils
.
shortDate
());
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW008
.
FIELD_CONTRACT_DATE
,
DateUtils
.
shortDate
());
inInfo
.
addBlock
(
"detail1"
).
addBlockMeta
(
new
HGCW008
().
eiMetadata
);
inInfo
.
addBlock
(
"detail1"
).
addBlockMeta
(
new
HGCW008
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008B.java
View file @
2b15d8a1
...
@@ -2,11 +2,13 @@ package com.baosight.hggp.hg.cw.service;
...
@@ -2,11 +2,13 @@ package com.baosight.hggp.hg.cw.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.hg.cw.domain.HGCW008
;
import
com.baosight.hggp.hg.cw.domain.HGCW008
;
import
com.baosight.hggp.hg.cw.domain.HGCW007
;
import
com.baosight.hggp.hg.cw.domain.HGCW007
;
import
com.baosight.hggp.hg.cw.domain.HGCW009
;
import
com.baosight.hggp.hg.cw.domain.HGCW009
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -14,8 +16,12 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -14,8 +16,12 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author yukang
* @author yukang
...
@@ -35,13 +41,31 @@ public class ServiceHGCW008B extends ServiceBase {
...
@@ -35,13 +41,31 @@ public class ServiceHGCW008B extends ServiceBase {
String
id
=
inInfo
.
getString
(
"id"
);
String
id
=
inInfo
.
getString
(
"id"
);
HGCW008
HGCW008
=
HGCWTools
.
HgCw008
.
getId
(
id
);
HGCW008
HGCW008
=
HGCWTools
.
HgCw008
.
getId
(
id
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
HGCW008
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
HGCW008
);
//获取清单
//
获取清单
List
<
HGCW009
>
hgcw009List
=
HGCWTools
.
HgCw009
.
queryBySettlementNumber
(
HGCW008
.
getSettlementNumber
());
List
<
HGCW009
>
hgcw009List
=
HGCWTools
.
HgCw009
.
queryBySettlementNumber
(
HGCW008
.
getSettlementNumber
());
inInfo
.
addBlock
(
"detail1"
).
addRows
(
hgcw009List
);
inInfo
.
addBlock
(
"detail1"
).
addRows
(
hgcw009List
);
// 查询结算累计金额
Map
amountMap
=
queryCalculateAmount
(
HGCW008
.
getContractNumber
(),
id
);
inInfo
.
addBlock
(
"main"
).
addRow
(
amountMap
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 查询统计金额
*
* @param contractNumber
* @return
*/
public
static
Map
queryCalculateAmount
(
String
contractNumber
,
String
id
)
{
AssertUtils
.
isEmpty
(
contractNumber
,
"合同号不能为空"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"contractNumber"
,
contractNumber
);
paramMap
.
put
(
"excludeIds"
,
new
String
[]{
id
});
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
"HGCW008.queryCalculateAmount"
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
}
}
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008D.java
View file @
2b15d8a1
...
@@ -4,6 +4,8 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,6 +4,8 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -12,6 +14,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
...
@@ -12,6 +14,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author yukang
* @author yukang
...
@@ -56,6 +59,8 @@ public class ServiceHGCW008D extends ServiceBase {
...
@@ -56,6 +59,8 @@ public class ServiceHGCW008D extends ServiceBase {
inInfo
.
set
(
"inqu_status-0-ids"
,
ids
);
inInfo
.
set
(
"inqu_status-0-ids"
,
ids
);
}
}
inInfo
=
super
.
query
(
inInfo
,
HGCW003
.
QUERY
,
new
HGCW003
());
inInfo
=
super
.
query
(
inInfo
,
HGCW003
.
QUERY
,
new
HGCW003
());
// 查询合同税点
this
.
setContractInfo
(
inInfo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
@@ -83,4 +88,28 @@ public class ServiceHGCW008D extends ServiceBase {
...
@@ -83,4 +88,28 @@ public class ServiceHGCW008D extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
/**
* 设置合同信息
*
* @param inInfo
*/
private
void
setContractInfo
(
EiInfo
inInfo
)
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
String
>
contractNumbers
=
ObjectUtils
.
listKey
(
resultRows
,
HGCW003
.
FIELD_CONTRACT_NUMBER
);
// 根据计划号统计信息
Map
<
String
,
HGCW002
>
resultMap
=
HGCWTools
.
HgCw002
.
map
(
contractNumbers
);
if
(
MapUtils
.
isEmpty
(
resultMap
))
{
return
;
}
for
(
Map
resultRow
:
resultRows
)
{
String
contractNumber
=
MapUtils
.
getString
(
resultRow
,
HGCW003
.
FIELD_CONTRACT_NUMBER
);
HGCW002
dbCw02
=
resultMap
.
get
(
contractNumber
);
if
(
dbCw02
!=
null
)
{
resultRow
.
put
(
HGCW002
.
FIELD_TAX_POINTS
,
dbCw02
.
getTaxPoints
());
}
else
{
resultRow
.
put
(
HGCW002
.
FIELD_TAX_POINTS
,
0
);
}
}
}
}
}
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
View file @
2b15d8a1
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-05-10 15:49:56
Version : 1.0
schema : hggp
tableName : HGCW002
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
CONTRACT_TYPE TINYINT,
CONTRACT_CATEGORY TINYINT,
PARTY_A VARCHAR,
PARTY_B VARCHAR,
PARTY_C VARCHAR,
PLAN_START_DATE VARCHAR,
PLAN_END_DATE VARCHAR,
CONTRACT_STATUS TINYINT,
PARTY_A_NAME VARCHAR,
PARTY_A_PHONE_NUMBER VARCHAR,
ALREADY_NAME VARCHAR,
ALREADY_PHONE_NUMBER VARCHAR,
ENGINEERING_ADDRESS VARCHAR,
SIGNING_DATE VARCHAR,
MAIN_CONTRACT_NUMBER VARCHAR,
CONTRACT_CONTENT VARCHAR,
CONTRACTING_METHOD VARCHAR,
PAYMENT_METHOD TINYINT,
PRICING_METHOD TINYINT,
TAX_POINTS DECIMAL,
TOTAL_CONTRACT_PRICE_EXCLUDING DECIMAL,
VALUE_ADDED_TAX DECIMAL,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL,
REVIEW_STATUS TINYINT,
BALANCE_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap
namespace=
"HGCW002"
>
<sqlMap
namespace=
"HGCW002"
>
<typeAlias
alias=
"HGCW002"
type=
"com.baosight.hggp.hg.cw.domain.HGCW002"
/>
<typeAlias
alias=
"HGCW002"
type=
"com.baosight.hggp.hg.cw.domain.HGCW002"
/>
<sql
id=
"column"
>
<sql
id=
"column"
>
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
...
@@ -91,6 +47,7 @@
...
@@ -91,6 +47,7 @@
DEP_CODE as "depCode",
<!-- 部门编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount"
REMAINING_AMOUNT as "remainingAmount"
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
@@ -221,11 +178,13 @@
...
@@ -221,11 +178,13 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"HGCW002"
>
<sql
id=
"customCondition"
>
SELECT
<isNotEmpty
prepend=
" AND "
property=
"contractNumbers"
>
<include
refid=
"column"
/>
CONTRACT_NUMBER IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"contractNumbers"
>
#contractNumbers[]#
</iterate>
FROM ${hggpSchema}.HGCW002 WHERE 1=1
</isNotEmpty>
<include
refid=
"condition"
/>
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
$orderBy$
...
@@ -234,137 +193,25 @@
...
@@ -234,137 +193,25 @@
ID asc
ID asc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"HGCW002"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCW002
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"orderBy"
/>
</select>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCW002 WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGCW002
<include
refid=
"condition"
/>
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCategory">
CONTRACT_CATEGORY = #contractCategory#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
PARTY_B = #partyB#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyC">
PARTY_C = #partyC#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
PLAN_START_DATE = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
PLAN_END_DATE = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAName">
PARTY_A_NAME = #partyAName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAPhoneNumber">
PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyName">
ALREADY_NAME = #alreadyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyPhoneNumber">
ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="engineeringAddress">
ENGINEERING_ADDRESS = #engineeringAddress#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainContractNumber">
MAIN_CONTRACT_NUMBER = #mainContractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractContent">
CONTRACT_CONTENT = #contractContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractingMethod">
CONTRACTING_METHOD = #contractingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMethod">
PAYMENT_METHOD = #paymentMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pricingMethod">
PRICING_METHOD = #pricingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceExcluding">
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="valueAddedTax">
VALUE_ADDED_TAX = #valueAddedTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="balanceStatus">
BALANCE_STATUS = #balanceStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGCW002 (ID,
INSERT INTO ${hggpSchema}.HGCW002 (ID,
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW008.xml
View file @
2b15d8a1
...
@@ -99,8 +99,16 @@
...
@@ -99,8 +99,16 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<sql
id=
"customCondition"
>
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW008"
>
<isNotEmpty
prepend=
" AND "
property=
"excludeIds"
>
ID NOT IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"excludeIds"
>
#excludeIds[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW008"
>
SELECT
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
...
@@ -223,9 +231,11 @@
...
@@ -223,9 +231,11 @@
IFNULL(SUM(THIS_SETTLEMENT_TAX), 0) as "thisSettlementTax",
IFNULL(SUM(THIS_SETTLEMENT_TAX), 0) as "thisSettlementTax",
IFNULL(SUM(THIS_PRICE_TAX), 0) as "thisPriceTax",
IFNULL(SUM(THIS_PRICE_TAX), 0) as "thisPriceTax",
IFNULL(SUM(CUMULATIVE_SETTLEMENT_AMOUNT), 0) as "sumCumulativeSettlementAmount",
IFNULL(SUM(CUMULATIVE_SETTLEMENT_AMOUNT), 0) as "sumCumulativeSettlementAmount",
IFNULL(SUM(CUMULATIVE_SETTLEMENT_TAX), 0) as "sumCumulativeSettlementTax"
IFNULL(SUM(CUMULATIVE_SETTLEMENT_TAX), 0) as "sumCumulativeSettlementTax",
IFNULL(SUM(CUMULATIVE_PRICE_TAX), 0) as "sumCumulativePriceTax"
FROM ${hggpSchema}.HGCW008 WHERE 1=1
FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<update
id=
"submit"
>
<update
id=
"submit"
>
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW009.xml
View file @
2b15d8a1
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-05-22 10:58:05
Version : 1.0
schema : hggp
tableName : HGCW009
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_BASIS VARCHAR,
TASK_NAME VARCHAR,
ENGINEERING_CONTENT VARCHAR,
THIS_ENGINEERING_QUANTITY DECIMAL,
CUMULATIVE_ENGINEERING_QUANTITY DECIMAL,
UNIT VARCHAR,
UNIT_PRICE DECIMAL,
TOTAL_PRICE DECIMAL,
INVENTORY_ID BIGINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap
namespace=
"HGCW009"
>
<sqlMap
namespace=
"HGCW009"
>
<sql
id=
"column"
>
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 结算编号 -->
SETTLEMENT_BASIS as "settlementBasis",
<!-- 结算依据 -->
TASK_NAME as "taskName",
<!-- 任务名称 -->
ENGINEERING_CONTENT as "engineeringContent",
<!-- 工程内容 -->
THIS_ENGINEERING_QUANTITY as "thisEngineeringQuantity",
<!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY as "cumulativeEngineeringQuantity",
<!-- 至本次累计结算工程量 -->
UNIT as "unit",
<!-- 单位 -->
UNIT_PRICE as "unitPrice",
<!-- 含税单价 -->
TOTAL_PRICE as "totalPrice",
<!-- 不含税总价 -->
TOTAL_TAX_PRICE as "totalTaxPrice",
<!-- 含税总价 -->
INVENTORY_ID as "inventoryId",
<!-- 清单ID -->
REMARKS as "remarks",
<!-- 结算依据 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DEP_CODE as "depCode"
<!-- 部门编码 -->
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
@@ -101,33 +101,11 @@
...
@@ -101,33 +101,11 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW009"
>
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW009"
>
SELECT
SELECT
ID as "id",
<include
refid=
"column"
/>
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 结算编号 -->
SETTLEMENT_BASIS as "settlementBasis",
<!-- 结算依据 -->
TASK_NAME as "taskName",
<!-- 任务名称 -->
ENGINEERING_CONTENT as "engineeringContent",
<!-- 工程内容 -->
THIS_ENGINEERING_QUANTITY as "thisEngineeringQuantity",
<!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY as "cumulativeEngineeringQuantity",
<!-- 至本次累计结算工程量 -->
UNIT as "unit",
<!-- 单位 -->
UNIT_PRICE as "unitPrice",
<!-- 单价 -->
TOTAL_PRICE as "totalPrice",
<!-- 总价 -->
INVENTORY_ID as "inventoryId",
<!-- 清单ID -->
REMARKS as "remarks",
<!-- 结算依据 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DEP_CODE as "depCode"
<!-- 部门编码 -->
FROM ${hggpSchema}.HGCW009 WHERE 1=1
FROM ${hggpSchema}.HGCW009 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
$orderBy$
...
@@ -136,80 +114,14 @@
...
@@ -136,80 +114,14 @@
ID asc
ID asc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
</select>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCW009 WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGCW009
<include
refid=
"condition"
/>
WHERE 1=1
<include
refid=
"condition"
/>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementBasis">
SETTLEMENT_BASIS = #settlementBasis#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskName">
TASK_NAME = #taskName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="engineeringContent">
ENGINEERING_CONTENT = #engineeringContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisEngineeringQuantity">
THIS_ENGINEERING_QUANTITY = #thisEngineeringQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeEngineeringQuantity">
CUMULATIVE_ENGINEERING_QUANTITY = #cumulativeEngineeringQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventoryId">
INVENTORY_ID = #inventoryId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGCW009 (ID,
INSERT INTO ${hggpSchema}.HGCW009 (ID,
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
...
@@ -222,33 +134,29 @@
...
@@ -222,33 +134,29 @@
THIS_ENGINEERING_QUANTITY,
<!-- 本次结算工程量 -->
THIS_ENGINEERING_QUANTITY,
<!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY,
<!-- 至本次累计结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY,
<!-- 至本次累计结算工程量 -->
UNIT,
<!-- 单位 -->
UNIT,
<!-- 单位 -->
UNIT_PRICE,
<!-- 单价 -->
UNIT_PRICE,
<!-- 含税单价 -->
TOTAL_PRICE,
<!-- 总价 -->
TOTAL_PRICE,
<!-- 不含税总价 -->
TOTAL_TAX_PRICE,
<!-- 含税总价 -->
INVENTORY_ID,
<!-- 清单ID -->
INVENTORY_ID,
<!-- 清单ID -->
REMARKS,
<!-- 结算依据 -->
REMARKS,
<!-- 结算依据 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
CREATED_TIME,
<!-- 记录创建时间 -->
UPDATED_BY,
<!-- 记录修改者 -->
UPDATED_NAME,
<!-- 记录修改名称 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
DEP_CODE
<!-- 部门编码 -->
DEP_CODE
<!-- 部门编码 -->
)
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #settlementBasis#, #taskName#,
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #settlementBasis#, #taskName#,
#engineeringContent#, #thisEngineeringQuantity#, #cumulativeEngineeringQuantity#, #unit#, #unitPrice#,
#engineeringContent#, #thisEngineeringQuantity#, #cumulativeEngineeringQuantity#, #unit#, #unitPrice#,
#totalPrice#, #inventoryId#, #remarks#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedNa
me#,
#totalPrice#, #totalTaxPrice#, #inventoryId#, #remarks#, #createdBy#, #createdName#, #createdTi
me#,
#
updatedTime#, #
depCode#)
#depCode#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCW009 WHERE
DELETE FROM ${hggpSchema}.HGCW009 WHERE ID = #id#
ID = #id#
</delete>
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCW009
UPDATE ${hggpSchema}.HGCW009
SET
SET
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
SETTLEMENT_NUMBER = #settlementNumber#,
<!-- 结算编号 -->
SETTLEMENT_NUMBER = #settlementNumber#,
<!-- 结算编号 -->
...
@@ -258,19 +166,15 @@
...
@@ -258,19 +166,15 @@
THIS_ENGINEERING_QUANTITY = #thisEngineeringQuantity#,
<!-- 本次结算工程量 -->
THIS_ENGINEERING_QUANTITY = #thisEngineeringQuantity#,
<!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY = #cumulativeEngineeringQuantity#,
<!-- 至本次累计结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY = #cumulativeEngineeringQuantity#,
<!-- 至本次累计结算工程量 -->
UNIT = #unit#,
<!-- 单位 -->
UNIT = #unit#,
<!-- 单位 -->
UNIT_PRICE = #unitPrice#,
<!-- 单价 -->
UNIT_PRICE = #unitPrice#,
<!-- 含税单价 -->
TOTAL_PRICE = #totalPrice#,
<!-- 总价 -->
TOTAL_PRICE = #totalPrice#,
<!-- 不含税总价 -->
TOTAL_TAX_PRICE = #totalTaxPrice#,
<!-- 含税总价 -->
INVENTORY_ID = #inventoryId#,
<!-- 清单ID -->
INVENTORY_ID = #inventoryId#,
<!-- 清单ID -->
REMARKS = #remarks#,
<!-- 结算依据 -->
REMARKS = #remarks#,
<!-- 结算依据 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
CREATED_TIME = #createdTime#,
<!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
UPDATED_TIME = #updatedTime#
<!-- 记录修改时间 -->
DEP_CODE = #depCode#
<!-- 部门编码 -->
WHERE ID = #id#
WHERE
ID = #id#
</update>
</update>
<select
id=
"queryEngineeringQuantity"
resultClass=
"int"
>
<select
id=
"queryEngineeringQuantity"
resultClass=
"int"
>
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
2b15d8a1
...
@@ -253,6 +253,8 @@ public class HGCWTools {
...
@@ -253,6 +253,8 @@ public class HGCWTools {
}
}
public
static
class
HgCw002
{
public
static
class
HgCw002
{
public
static
UserVO
getUserCompany
()
{
public
static
UserVO
getUserCompany
()
{
UserVO
userVO
=
new
UserVO
();
UserVO
userVO
=
new
UserVO
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
...
@@ -285,6 +287,35 @@ public class HGCWTools {
...
@@ -285,6 +287,35 @@ public class HGCWTools {
return
DaoBase
.
getInstance
().
query
(
HGPZ003
.
QUERY
,
queryMap
);
return
DaoBase
.
getInstance
().
query
(
HGPZ003
.
QUERY
,
queryMap
);
}
}
/**
* 查询
*
* @param contractNumbers
* @return
*/
public
static
List
<
HGCW002
>
list
(
List
<
String
>
contractNumbers
)
{
if
(
CollectionUtils
.
isEmpty
(
contractNumbers
))
{
return
null
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"contractNumbers"
,
contractNumbers
);
return
DaoBase
.
getInstance
().
query
(
HGCW002
.
QUERY
,
paramMap
);
}
/**
* 根据计划号统计
*
* @param contractNumbers
* @return
*/
public
static
Map
<
String
,
HGCW002
>
map
(
List
<
String
>
contractNumbers
)
{
List
<
HGCW002
>
results
=
list
(
contractNumbers
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGCW002:
:
getContractNumber
,
item
->
item
));
}
public
static
HGCW002
getId
(
String
id
)
{
public
static
HGCW002
getId
(
String
id
)
{
AssertUtils
.
isNull
(
id
,
"合同ID不能为空!"
);
AssertUtils
.
isNull
(
id
,
"合同ID不能为空!"
);
List
<
HGCW002
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW002
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
List
<
HGCW002
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW002
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
...
@@ -614,6 +645,7 @@ public class HGCWTools {
...
@@ -614,6 +645,7 @@ public class HGCWTools {
}
}
public
static
class
HgCw009
{
public
static
class
HgCw009
{
public
static
void
save
(
List
<
Map
>
rows
,
String
settlementNumber
,
HGCW008
hgcw008
)
{
public
static
void
save
(
List
<
Map
>
rows
,
String
settlementNumber
,
HGCW008
hgcw008
)
{
AssertUtils
.
isNull
(
settlementNumber
,
"结算单号不能为空!"
);
AssertUtils
.
isNull
(
settlementNumber
,
"结算单号不能为空!"
);
rows
.
forEach
(
row
->
{
rows
.
forEach
(
row
->
{
...
...
src/main/webapp/HG/CW/HGCW008.jsp
View file @
2b15d8a1
...
@@ -37,24 +37,28 @@
...
@@ -37,24 +37,28 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
autoBind=
"false"
checkMode=
"single row"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
autoBind=
"false"
checkMode=
"single row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"170"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"170"
align=
"center"
/>
<EF:EFComboColumn
ename=
"reviewStatus"
cname=
"审批状态"
width=
"
10
0"
align=
"center"
<EF:EFComboColumn
ename=
"reviewStatus"
cname=
"审批状态"
width=
"
8
0"
align=
"center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.cw.reviewStatus"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.reviewStatus"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"所属公司"
align=
"center"
enable=
"false
"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"所属公司"
enable=
"false"
width=
"200"
align=
"left
"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
align=
"center"
enable=
"false
"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
enable=
"false"
width=
"130"
align=
"center
"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
align=
"center"
enable=
"false
"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"200"
align=
"left
"
/>
<EF:EFColumn
ename=
"contractNumber"
cname=
"合同号"
align=
"center"
enable=
"false
"
/>
<EF:EFColumn
ename=
"contractNumber"
cname=
"合同号"
enable=
"false"
width=
"180"
align=
"center
"
/>
<EF:EFColumn
ename=
"contractName"
cname=
"合同名称"
align=
"center"
enable=
"false
"
/>
<EF:EFColumn
ename=
"contractName"
cname=
"合同名称"
enable=
"false"
width=
"200"
align=
"left
"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算编号"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算编号"
align=
"center"
enable=
"false"
/>
<EF:EFComboColumn
ename=
"settlementType"
cname=
"结算类别"
width=
"100"
align=
"center"
<EF:EFComboColumn
ename=
"settlementType"
cname=
"结算类别"
width=
"100"
align=
"center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.cw.settlementType"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.settlementType"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"thisSettlementAmount"
cname=
"本次结算金额"
align=
"right"
enable=
"false"
format=
"{0:C2}"
/>
<EF:EFColumn
ename=
"thisSettlementAmount"
cname=
"本次结算金额"
enable=
"false"
width=
"140"
align=
"right"
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"本次结算税金"
align=
"right"
enable=
"false"
format=
"{0:C2}"
/>
format=
"{0:C2}"
/>
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"本次结算含税金额"
align=
"right"
enable=
"false"
format=
"{0:C2}"
/>
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"本次结算税金"
enable=
"false"
width=
"150"
align=
"right"
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
align=
"center"
enable=
"false"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
format=
"{0:C2}"
/>
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"本次结算含税金额"
enable=
"false"
width=
"150"
align=
"right"
format=
"{0:C2}"
/>
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
align=
"center"
enable=
"false"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</EF:EFPage>
</EF:EFPage>
...
...
src/main/webapp/HG/CW/HGCW008A.js
View file @
2b15d8a1
...
@@ -16,57 +16,29 @@ $(function() {
...
@@ -16,57 +16,29 @@ $(function() {
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
},
columns
:
[{
columns
:
[{
field
:
"totalPrice"
,
field
:
"total
Tax
Price"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
if
(
isBlank
(
item
.
totalPrice
)){
let
thisEngineeringQuantity
=
item
.
thisEngineeringQuantity
;
let
thisEngineeringQuantity
=
item
.
thisEngineeringQuantity
;
let
unitPrice
=
item
.
unitPrice
;
let
unitPrice
=
item
.
unitPrice
;
if
(
!
isBlank
(
thisEngineeringQuantity
)
&&
!
isBlank
(
unitPrice
)){
if
(
!
isBlank
(
thisEngineeringQuantity
)
&&
!
isBlank
(
unitPrice
)){
return
(
parseFloat
(
thisEngineeringQuantity
)
*
parseFloat
(
unitPrice
)).
toFixed
(
2
);
return
parseFloat
(
thisEngineeringQuantity
)
*
parseFloat
(
unitPrice
);
}
else
{
return
""
;
}
}
else
{
return
parseFloat
(
item
.
totalPrice
);
}
}
return
isBlank
(
item
.
totalPrice
)
?
""
:
parseFloat
(
item
.
totalPrice
);
}
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
$
(
"#BTN_CHOICE"
).
on
(
"click"
,
choiceFunc
);
$
(
"#BTN_CHOICE"
).
on
(
"click"
,
choiceFunc
);
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
if
(
e
.
field
==
"thisEngineeringQuantity"
)
{
if
(
e
.
field
==
"thisEngineeringQuantity"
||
e
.
field
==
"unitPrice"
)
{
var
tr
,
index
;
calcTotalPrice
(
e
,
2
);
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
var
inventoryId
=
item
.
inventoryId
;
var
thisEngineeringQuantity
=
parseFloat
(
item
.
thisEngineeringQuantity
)
||
0
;
// 工程量
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 单价
var
totalPrice
=
thisEngineeringQuantity
*
unitPrice
;
// 总价
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
.
toFixed
(
2
)));
queryCumulativeEngineeringQuantity
(
inventoryId
,
item
);
// 计算总金额
setTimeout
(
function
()
{
calculateAmount
(
detail1Grid
.
getDataItems
());
},
200
);
}
if
(
e
.
field
==
"unitPrice"
)
{
var
tr
,
index
;
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
var
inventoryId
=
item
.
inventoryId
;
var
thisEngineeringQuantity
=
parseFloat
(
item
.
thisEngineeringQuantity
)
||
0
;
// 工程量
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 单价
var
totalPrice
=
thisEngineeringQuantity
*
unitPrice
;
// 总价
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
.
toFixed
(
2
)));
// 计算总金额
calculateAmount
(
detail1Grid
.
getDataItems
());
}
}
if
(
e
.
field
==
"totalTaxPrice"
)
{
if
(
e
.
field
==
"totalPrice"
)
{
calcTotalPrice
(
e
,
1
);
var
tr
,
index
;
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
var
totalPrice
=
parseFloat
(
item
.
totalPrice
)
||
0
;
// 总价
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 单价
var
thisEngineeringQuantity
=
totalPrice
/
unitPrice
;
// 工程量
detail1Grid
.
setCellValue
(
item
,
'thisEngineeringQuantity'
,
parseFloat
(
thisEngineeringQuantity
));
// 计算总金额
calculateAmount
(
detail1Grid
.
getDataItems
());
}
}
});
});
},
},
...
@@ -238,7 +210,7 @@ function choiceFunc() {
...
@@ -238,7 +210,7 @@ function choiceFunc() {
callbackName
:
choiceCallbackFunc
callbackName
:
choiceCallbackFunc
});
});
$
(
"#JSColorboxWin"
).
css
({
"height"
:
"100%"
})
$
(
"#JSColorboxWin"
).
css
({
"height"
:
"100%"
})
}
else
{
}
else
{
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGCW008E?methodName=initLoad&inqu_status-0-contractNumber="
+
contractNumber
+
href
:
"HGCW008E?methodName=initLoad&inqu_status-0-contractNumber="
+
contractNumber
+
"&inqu_status-0-inventoryIds="
+
inventoryIds
.
join
(
","
)
+
"&inqu_status-0-inventoryIds="
+
inventoryIds
.
join
(
","
)
+
...
@@ -269,7 +241,8 @@ function choiceCallbackFunc(result1, result2, result3) {
...
@@ -269,7 +241,8 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
inventory
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
inventory
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalPriceIncluding
/
item
.
provisionalQuantity
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalPriceIncluding
/
item
.
provisionalQuantity
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPriceExcluding
);
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
})
})
...
@@ -281,6 +254,7 @@ function choiceCallbackFunc(result1, result2, result3) {
...
@@ -281,6 +254,7 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
projName
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
projName
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"remarks"
,
item
.
contractContent
);
detail1Grid
.
setCellValue
(
0
,
"remarks"
,
item
.
contractContent
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
...
@@ -307,7 +281,8 @@ function choiceCallbackFunc(result1, result2, result3) {
...
@@ -307,7 +281,8 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
inventory
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
inventory
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalPriceIncluding
/
item
.
provisionalQuantity
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalPriceIncluding
/
item
.
provisionalQuantity
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPriceExcluding
);
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
})
})
...
@@ -319,6 +294,7 @@ function choiceCallbackFunc(result1, result2, result3) {
...
@@ -319,6 +294,7 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
projName
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
projName
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalContractPriceIncluding
*
-
1
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalContractPriceIncluding
*
-
1
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalContractPriceIncluding
*
-
1
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalContractPriceIncluding
*
-
1
);
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalContractPriceIncluding
*
-
1
);
detail1Grid
.
setCellValue
(
0
,
"remarks"
,
item
.
contractContent
);
detail1Grid
.
setCellValue
(
0
,
"remarks"
,
item
.
contractContent
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
...
@@ -331,13 +307,13 @@ function choiceCallbackFunc(result1, result2, result3) {
...
@@ -331,13 +307,13 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
projName
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
projName
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalContractPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"remarks"
,
item
.
contractContent
);
detail1Grid
.
setCellValue
(
0
,
"remarks"
,
item
.
contractContent
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
})
})
}
}
calculateAmount
(
detail1Grid
.
getDataItems
())
calculateAmount
(
detail1Grid
.
getDataItems
())
JSColorbox
.
close
();
JSColorbox
.
close
();
}
}
function
cancelFunc
()
{
function
cancelFunc
()
{
...
@@ -349,12 +325,11 @@ function btnSaveFunc() {
...
@@ -349,12 +325,11 @@ function btnSaveFunc() {
fieldValidation
();
fieldValidation
();
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
"detail1"
,
"HGCW008"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowNewCallback
});
JSUtils
.
submitGridsData
(
"detail1"
,
"HGCW008"
,
"save"
,
false
,
/*JSUtils.submitGridsData("detail1", "HGCW008", "save", false,
function
(
res
)
{
function
(
res
)
{
parent
.
windowNewCallback
(
res
);
parent
.
windowNewCallback
(
res
);
}
}
);
*/
);
}
}
});
});
}
}
...
@@ -402,6 +377,44 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
...
@@ -402,6 +377,44 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
}
}
/**
/**
* 计算总金额
*
* @param e
* @param type 1.总价,2.单价或工程量
*/
function
calcTotalPrice
(
e
,
type
)
{
// 获取此model元素信息
let
item
=
e
.
items
[
0
];
let
settlementBasis
=
item
.
settlementBasis
;
let
taxPoints
=
settlementBasis
===
"合同内"
?
$
(
"#result-0-taxPoints"
).
val
()
:
0
;
if
(
type
===
1
)
{
// 含税总价
var
totalTaxPrice
=
parseFloat
(
item
.
totalTaxPrice
)
||
0
;
// 含税单价
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 工程量
var
thisEngineeringQuantity
=
totalTaxPrice
/
unitPrice
;
// 不含税金额
let
totalPrice
=
isBlank
(
taxPoints
)
?
totalTaxPrice
:
totalTaxPrice
/
(
1
+
taxPoints
/
100
);
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
));
detail1Grid
.
setCellValue
(
item
,
'thisEngineeringQuantity'
,
thisEngineeringQuantity
);
}
else
{
// 工程量
var
thisEngineeringQuantity
=
parseFloat
(
item
.
thisEngineeringQuantity
)
||
0
;
// 含税单价
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 含税总价
var
totalTaxPrice
=
thisEngineeringQuantity
*
unitPrice
;
// 不含税金额
let
totalPrice
=
isBlank
(
taxPoints
)
?
totalTaxPrice
:
totalTaxPrice
/
(
1
+
taxPoints
/
100
);
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
));
detail1Grid
.
setCellValue
(
item
,
'totalTaxPrice'
,
parseFloat
(
totalTaxPrice
));
}
// 计算总金额
calculateAmount
(
detail1Grid
.
getDataItems
());
}
/**
* 本次结算金额: 明细的本次结算求和
* 本次结算金额: 明细的本次结算求和
* 累计结算金额: 当前合同的所有结算单本次结算金额求和
* 累计结算金额: 当前合同的所有结算单本次结算金额求和
* 本次结算税金: 明细的本次结算求和(不含扣款 )*税率
* 本次结算税金: 明细的本次结算求和(不含扣款 )*税率
...
@@ -415,7 +428,7 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
...
@@ -415,7 +428,7 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
function
calculateAmount
(
rows
)
{
function
calculateAmount
(
rows
)
{
var
contractType
=
$
(
"#contractType"
).
val
();
var
contractType
=
$
(
"#contractType"
).
val
();
var
totalPrice
=
0
;
var
totalPrice
=
0
;
var
deductionPrice
=
0
;
var
deductionPrice
=
0
;
rows
.
forEach
(
function
(
row
,
index
)
{
rows
.
forEach
(
function
(
row
,
index
)
{
if
(
row
.
settlementBasis
==
"合同内"
)
{
if
(
row
.
settlementBasis
==
"合同内"
)
{
totalPrice
+=
parseFloat
(
row
.
totalPrice
);
totalPrice
+=
parseFloat
(
row
.
totalPrice
);
...
@@ -423,50 +436,51 @@ function calculateAmount(rows) {
...
@@ -423,50 +436,51 @@ function calculateAmount(rows) {
deductionPrice
+=
parseFloat
(
row
.
totalPrice
);
deductionPrice
+=
parseFloat
(
row
.
totalPrice
);
}
}
});
});
//税点
//
税点
var
taxPoints
=
$
(
"#result-0-taxPoints"
).
val
()
?
$
(
"#result-0-taxPoints"
).
val
()
/
100
:
0
;
var
taxPoints
=
$
(
"#result-0-taxPoints"
).
val
()
?
$
(
"#result-0-taxPoints"
).
val
()
/
100
:
0
;
//
本次结算金额
//
本次结算金额
var
thisSettlementAmount
=
totalPrice
+
deductionPrice
;
var
thisSettlementAmount
=
totalPrice
+
deductionPrice
;
//
累计结算金额
//
累计结算金额
var
cumulativeSettlementAmount
=
sumCumulativeSettlementAmount
+
thisSettlementAmount
;
var
cumulativeSettlementAmount
=
sumCumulativeSettlementAmount
+
thisSettlementAmount
;
//
本次结算税金
//
本次结算税金
var
thisSettlementTax
=
0
;
var
thisSettlementTax
=
0
;
if
(
contractType
==
"1"
)
{
if
(
contractType
==
"1"
)
{
thisSettlementTax
=
thisSettlementAmount
*
taxPoints
;
thisSettlementTax
=
thisSettlementAmount
*
taxPoints
;
}
else
{
}
else
{
thisSettlementTax
=
totalPrice
*
taxPoints
;
thisSettlementTax
=
totalPrice
*
taxPoints
;
}
}
//
累计结算税金
//
累计结算税金
var
cumulativeSettlementTax
=
sumCumulativeSettlementTax
+
thisSettlementTax
;
var
cumulativeSettlementTax
=
sumCumulativeSettlementTax
+
thisSettlementTax
;
//
本次价税合计=本次结算金额+本次结算税金
//
本次价税合计=本次结算金额+本次结算税金
var
thisPriceTax
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisSettlementTax
);
var
thisPriceTax
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisSettlementTax
);
//
累计价税合计=累计结算金额+累计结算税金
//
累计价税合计=累计结算金额+累计结算税金
var
cumulativePriceTax
=
parseFloat
(
cumulativeSettlementAmount
)
+
parseFloat
(
cumulativeSettlementTax
);
var
cumulativePriceTax
=
parseFloat
(
cumulativeSettlementAmount
)
+
parseFloat
(
cumulativeSettlementTax
);
$
(
"#result-0-thisSettlementAmount"
).
val
(
parseFloat
(
thisSettlementAmount
).
toFixed
(
3
));
$
(
"#result-0-thisSettlementAmount"
).
val
(
parseFloat
(
thisSettlementAmount
).
toFixed
(
2
));
$
(
"#result-0-cumulativeSettlementAmount"
).
val
(
parseFloat
(
cumulativeSettlementAmount
).
toFixed
(
3
));
$
(
"#result-0-cumulativeSettlementAmount"
).
val
(
parseFloat
(
cumulativeSettlementAmount
).
toFixed
(
2
));
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisSettlementTax
).
toFixed
(
3
));
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisSettlementTax
).
toFixed
(
2
));
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
3
));
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
2
));
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisPriceTax
).
toFixed
(
3
));
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisPriceTax
).
toFixed
(
2
));
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
3
));
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
2
));
}
}
function
fieldValidation
()
{
function
fieldValidation
()
{
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
if
(
isBlank
(
projCode
))
{
if
(
isBlank
(
projCode
))
{
message
(
"请选择项目!"
)
message
(
"请选择项目!"
)
return
;
return
;
}
}
var
contractDate
=
$
(
"#result-0-contractDate"
).
val
();
var
contractDate
=
$
(
"#result-0-contractDate"
).
val
();
if
(
isBlank
(
contractDate
))
{
if
(
isBlank
(
contractDate
))
{
message
(
"请选择结算日期!"
)
message
(
"请选择结算日期!"
)
return
;
return
;
}
}
}
}
function
calculateAmount2
(
taxPoints
)
{
function
calculateAmount2
(
taxPoints
)
{
var
rows
=
detail1Grid
.
getDataItems
();
var
rows
=
detail1Grid
.
getDataItems
();
var
contractType
=
$
(
"#contractType"
).
val
();
var
contractType
=
$
(
"#contractType"
).
val
();
var
totalPrice
=
0
;
var
totalPrice
=
0
;
var
deductionPrice
=
0
;
var
deductionPrice
=
0
;
rows
.
forEach
(
function
(
row
,
index
)
{
rows
.
forEach
(
function
(
row
,
index
)
{
if
(
row
.
settlementBasis
==
"合同内"
)
{
if
(
row
.
settlementBasis
==
"合同内"
)
{
totalPrice
+=
parseFloat
(
row
.
totalPrice
);
totalPrice
+=
parseFloat
(
row
.
totalPrice
);
...
@@ -485,17 +499,17 @@ function calculateAmount2(taxPoints) {
...
@@ -485,17 +499,17 @@ function calculateAmount2(taxPoints) {
}
}
//本次价税合计=本次结算金额+本次结算税金
//本次价税合计=本次结算金额+本次结算税金
var
thisPriceTax
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisSettlementTax
);
var
thisPriceTax
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisSettlementTax
);
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisSettlementTax
).
toFixed
(
2
))
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisSettlementTax
).
toFixed
(
3
))
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisPriceTax
).
toFixed
(
2
))
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisPriceTax
).
toFixed
(
3
))
//累计结算金额
//累计结算金额
var
cumulativeSettlementAmount
=
parseFloat
(
sumCumulativeSettlementAmount
)
+
parseFloat
(
thisSettlementAmount
);
var
cumulativeSettlementAmount
=
parseFloat
(
sumCumulativeSettlementAmount
)
+
parseFloat
(
thisSettlementAmount
);
//累计结算税金
//累计结算税金
var
cumulativeSettlementTax
=
parseFloat
(
sumCumulativeSettlementTax
)
+
parseFloat
(
thisSettlementTax
);
var
cumulativeSettlementTax
=
parseFloat
(
sumCumulativeSettlementTax
)
+
parseFloat
(
thisSettlementTax
);
//累计价税合计=累计结算金额+累计结算税金
//累计价税合计=累计结算金额+累计结算税金
var
cumulativePriceTax
=
parseFloat
(
cumulativeSettlementAmount
)
+
parseFloat
(
cumulativeSettlementTax
);
var
cumulativePriceTax
=
parseFloat
(
cumulativeSettlementAmount
)
+
parseFloat
(
cumulativeSettlementTax
);
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
2
))
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
3
))
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
2
))
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
3
))
}
}
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
...
...
src/main/webapp/HG/CW/HGCW008A.jsp
View file @
2b15d8a1
...
@@ -69,16 +69,17 @@
...
@@ -69,16 +69,17 @@
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"rowNo"
cname=
"行号"
hidden=
"true"
/>
<EF:EFColumn
ename=
"rowNo"
cname=
"行号"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementBasis"
cname=
"结算依据"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementBasis"
cname=
"结算依据"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"taskName"
cname=
"任务名称"
align=
"
center
"
/>
<EF:EFColumn
ename=
"taskName"
cname=
"任务名称"
align=
"
left
"
/>
<EF:EFColumn
ename=
"engineeringContent"
cname=
"工程内容"
align=
"
center
"
/>
<EF:EFColumn
ename=
"engineeringContent"
cname=
"工程内容"
align=
"
left
"
/>
<EF:EFColumn
ename=
"thisEngineeringQuantity"
cname=
"本次结算工程量"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"thisEngineeringQuantity"
cname=
"本次结算工程量"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"cumulativeEngineeringQuantity"
cname=
"至本次累计结算工程量"
format=
"{0:N3}"
align=
"right
"
<EF:EFColumn
ename=
"cumulativeEngineeringQuantity"
cname=
"至本次累计结算工程量"
enable=
"false"
width=
"140
"
enable=
"false
"
/>
format=
"{0:N3}"
align=
"right
"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
align=
"center"
/>
<EF:EFColumn
ename=
"unitPrice"
cname=
"单价"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"unitPrice"
cname=
"含税单价"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"totalPrice"
cname=
"合价"
format=
"{0:N2}"
align=
"right"
/>
<EF:EFColumn
ename=
"totalPrice"
cname=
"不含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"right"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
align=
"center"
/>
<EF:EFColumn
ename=
"totalTaxPrice"
cname=
"含税总价"
format=
"{0:N2}"
align=
"right"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
align=
"left"
/>
<EF:EFColumn
ename=
"inventoryId"
cname=
"清单id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventoryId"
cname=
"清单id"
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/HG/CW/HGCW008B.js
View file @
2b15d8a1
var
sumCumulativeSettlementAmount
=
0
;
var
sumCumulativeSettlementTax
=
0
;
$
(
function
()
{
$
(
function
()
{
$
(
"#cancel"
).
on
(
"click"
,
function
()
{
$
(
"#cancel"
).
on
(
"click"
,
function
()
{
...
@@ -16,56 +13,29 @@ $(function() {
...
@@ -16,56 +13,29 @@ $(function() {
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
},
columns
:
[{
columns
:
[{
field
:
"totalPrice"
,
field
:
"total
Tax
Price"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
if
(
isBlank
(
item
.
totalTaxPrice
)){
let
thisEngineeringQuantity
=
item
.
thisEngineeringQuantity
;
let
thisEngineeringQuantity
=
item
.
thisEngineeringQuantity
;
let
unitPrice
=
item
.
unitPrice
;
let
unitPrice
=
item
.
unitPrice
;
if
(
!
isBlank
(
thisEngineeringQuantity
)
&&
!
isBlank
(
unitPrice
))
{
if
(
!
isBlank
(
thisEngineeringQuantity
)
&&
!
isBlank
(
unitPrice
)){
return
(
parseFloat
(
thisEngineeringQuantity
)
*
parseFloat
(
unitPrice
)).
toFixed
(
2
);
return
parseFloat
(
thisEngineeringQuantity
)
*
parseFloat
(
unitPrice
);
}
else
{
return
""
;
}
}
else
{
return
parseFloat
(
item
.
totalTaxPrice
);
}
}
return
isBlank
(
item
.
totalPrice
)
?
""
:
parseFloat
(
item
.
totalPrice
);
}
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
$
(
"#BTN_CHOICE"
).
on
(
"click"
,
choiceFunc
);
$
(
"#BTN_CHOICE"
).
on
(
"click"
,
choiceFunc
);
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
if
(
e
.
field
==
"thisEngineeringQuantity"
)
{
if
(
e
.
field
==
"thisEngineeringQuantity"
||
e
.
field
==
"unitPrice"
)
{
var
tr
,
index
;
calcTotalPrice
(
e
,
2
);
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
var
inventoryId
=
item
.
inventoryId
;
var
thisEngineeringQuantity
=
parseFloat
(
item
.
thisEngineeringQuantity
)
||
0
;
// 工程量
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 单价
var
totalPrice
=
thisEngineeringQuantity
*
unitPrice
;
// 总价
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
));
queryCumulativeEngineeringQuantity
(
inventoryId
,
item
);
// 计算总金额
setTimeout
(
function
()
{
calculateAmount
(
detail1Grid
.
getDataItems
());
},
200
);
}
}
if
(
e
.
field
==
"unitPrice"
)
{
if
(
e
.
field
==
"totalTaxPrice"
)
{
var
tr
,
index
;
calcTotalPrice
(
e
,
1
);
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
var
inventoryId
=
item
.
inventoryId
;
var
thisEngineeringQuantity
=
parseFloat
(
item
.
thisEngineeringQuantity
)
||
0
;
// 工程量
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 单价
var
totalPrice
=
thisEngineeringQuantity
*
unitPrice
;
// 总价
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
));
// 计算总金额
calculateAmount
(
detail1Grid
.
getDataItems
());
}
if
(
e
.
field
==
"totalPrice"
)
{
var
tr
,
index
;
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
var
totalPrice
=
parseFloat
(
item
.
totalPrice
)
||
0
;
// 总价
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 单价
var
thisEngineeringQuantity
=
totalPrice
/
unitPrice
;
// 工程量
detail1Grid
.
setCellValue
(
item
,
'thisEngineeringQuantity'
,
parseFloat
(
thisEngineeringQuantity
));
// 计算总金额
calculateAmount
(
detail1Grid
.
getDataItems
());
}
}
});
});
setTimeout
(
function
()
{
setTimeout
(
function
()
{
...
@@ -139,50 +109,6 @@ $(function() {
...
@@ -139,50 +109,6 @@ $(function() {
}
}
}
}
IPLATUI
.
EFPopupInput
=
{
"popupInputProjCode"
:
{
query
:
function
(
e
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-reviewStatus"
,
3
);
inInfo
.
set
(
"inqu_status-0-approvalStatus"
,
2
);
return
inInfo
;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill
:
function
(
e
)
{
console
.
log
(
"Step"
+
(
++
i
)
+
": ----backFill----"
);
// 回填数据
var
model
=
e
.
model
;
var
contractNumber
=
model
.
contractNumber
;
var
info
=
new
EiInfo
();
info
.
set
(
"contractNumber"
,
contractNumber
);
EiCommunicator
.
send
(
"HGCW008"
,
"queryCalculateAmount"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
var
data
=
ei
.
extAttr
.
result
;
sumCumulativeSettlementAmount
=
data
[
0
].
sumCumulativeSettlementAmount
;
sumCumulativeSettlementTax
=
data
[
0
].
sumCumulativeSettlementTax
;
}
else
{
NotificationUtil
(
ei
,
"error"
);
return
0
;
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
return
0
;
}
});
}
}
};
window
.
document
.
addEventListener
(
"keyup"
,
function
(
event
)
{
window
.
document
.
addEventListener
(
"keyup"
,
function
(
event
)
{
if
(
event
.
keyCode
===
13
){
if
(
event
.
keyCode
===
13
){
var
grid
=
$
(
"#ef_grid_result"
).
data
(
"kendoGrid"
);
var
grid
=
$
(
"#ef_grid_result"
).
data
(
"kendoGrid"
);
...
@@ -276,7 +202,8 @@ function choiceCallbackFunc(result1, result2) {
...
@@ -276,7 +202,8 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
inventory
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
inventory
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
unitPriceExcludingTax
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
unitPriceExcludingTax
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
provisionalQuantity
*
item
.
unitPriceExcludingTax
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPriceExcluding
);
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalPriceIncluding
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
})
})
...
@@ -378,6 +305,44 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
...
@@ -378,6 +305,44 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
}
}
/**
/**
* 计算总金额
*
* @param e
* @param type 1.总价,2.单价或工程量
*/
function
calcTotalPrice
(
e
,
type
)
{
// 获取此model元素信息
let
item
=
e
.
items
[
0
];
let
settlementBasis
=
item
.
settlementBasis
;
let
taxPoints
=
settlementBasis
===
"合同内"
?
$
(
"#result-0-taxPoints"
).
val
()
:
0
;
if
(
type
===
1
)
{
// 含税总价
var
totalTaxPrice
=
parseFloat
(
item
.
totalTaxPrice
)
||
0
;
// 含税单价
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 工程量
var
thisEngineeringQuantity
=
totalTaxPrice
/
unitPrice
;
// 不含税金额
let
totalPrice
=
isBlank
(
taxPoints
)
?
totalTaxPrice
:
totalTaxPrice
/
(
1
+
taxPoints
/
100
);
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
));
detail1Grid
.
setCellValue
(
item
,
'thisEngineeringQuantity'
,
thisEngineeringQuantity
);
}
else
{
// 工程量
var
thisEngineeringQuantity
=
parseFloat
(
item
.
thisEngineeringQuantity
)
||
0
;
// 含税单价
var
unitPrice
=
parseFloat
(
item
.
unitPrice
)
||
0
;
// 含税总价
var
totalTaxPrice
=
thisEngineeringQuantity
*
unitPrice
;
// 不含税金额
let
totalPrice
=
isBlank
(
taxPoints
)
?
totalTaxPrice
:
totalTaxPrice
/
(
1
+
taxPoints
/
100
);
detail1Grid
.
setCellValue
(
item
,
'totalPrice'
,
parseFloat
(
totalPrice
));
detail1Grid
.
setCellValue
(
item
,
'totalTaxPrice'
,
parseFloat
(
totalTaxPrice
));
}
// 计算总金额
calculateAmount
(
detail1Grid
.
getDataItems
());
}
/**
* 本次结算金额: 明细的本次结算求和
* 本次结算金额: 明细的本次结算求和
* 累计结算金额: 当前合同的所有结算单本次结算金额求和
* 累计结算金额: 当前合同的所有结算单本次结算金额求和
* 本次结算税金: 明细的本次结算求和(不含扣款 )*税率
* 本次结算税金: 明细的本次结算求和(不含扣款 )*税率
...
@@ -389,82 +354,62 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
...
@@ -389,82 +354,62 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
* @param rows
* @param rows
*/
*/
function
calculateAmount
(
rows
)
{
function
calculateAmount
(
rows
)
{
var
contractType
=
$
(
"#contractType"
).
val
();
var
thisAmount
=
0
;
var
totalPrice
=
0
;
var
thisTaxAmount
=
0
;
var
deductionPrice
=
0
;
rows
.
forEach
(
function
(
row
,
index
)
{
rows
.
forEach
(
function
(
row
,
index
)
{
if
(
row
.
settlementBasis
==
"合同内"
)
{
thisAmount
+=
parseFloat
(
row
.
totalPrice
);
totalPrice
+=
parseFloat
(
row
.
totalPrice
);
thisTaxAmount
+=
parseFloat
(
row
.
totalTaxPrice
);
}
else
{
deductionPrice
+=
parseFloat
(
row
.
totalPrice
);
}
});
});
//税点
// 本次结算税金
var
taxPoints
=
$
(
"#result-0-taxPoints"
).
val
()
?
$
(
"#result-0-taxPoints"
).
val
()
/
100
:
0
;
var
thisTax
=
thisTaxAmount
-
thisAmount
;
//本次结算金额
// 累计不含税金额,不含本结算单
var
thisSettlementAmount
=
totalPrice
+
deductionPrice
;
var
sumAmount
=
$
(
"#main-0-thisSettlementAmount"
).
val
();
//累计结算金额
// 累计税额,不含本结算单
var
cumulativeSettlementAmount
=
sumCumulativeSettlementAmount
+
thisSettlementAmount
;
var
sumTax
=
$
(
"#main-0-thisSettlementTax"
).
val
();
//本次结算税金
// 累计含税金额,不含本结算单
var
thisSettlementTax
=
0
;
var
sumTaxAmount
=
$
(
"#main-0-thisPriceTax"
).
val
();
if
(
contractType
==
"1"
)
{
// 累计结算金额
thisSettlementTax
=
thisSettlementAmount
*
taxPoints
;
var
cumulativeSettlementAmount
=
parseFloat
(
sumAmount
)
+
thisAmount
;
}
else
{
// 累计结算税金
thisSettlementTax
=
totalPrice
*
taxPoints
;
var
cumulativeSettlementTax
=
parseFloat
(
sumTax
)
+
thisTax
;
}
// 累计价税合计=累计结算金额+累计结算税金
//累计结算税金
var
cumulativePriceTax
=
parseFloat
(
sumTaxAmount
)
+
thisTaxAmount
;
var
cumulativeSettlementTax
=
sumCumulativeSettlementTax
+
thisSettlementTax
;
$
(
"#result-0-thisSettlementAmount"
).
val
(
parseFloat
(
thisAmount
).
toFixed
(
3
))
//本次价税合计=本次结算金额+本次结算税金
$
(
"#result-0-cumulativeSettlementAmount"
).
val
(
parseFloat
(
cumulativeSettlementAmount
).
toFixed
(
3
))
var
thisPriceTax
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisSettlementTax
);
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisTax
).
toFixed
(
3
))
//累计价税合计=累计结算金额+累计结算税金
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
3
))
var
cumulativePriceTax
=
parseFloat
(
cumulativeSettlementAmount
)
+
parseFloat
(
cumulativeSettlementTax
);
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisTaxAmount
).
toFixed
(
3
))
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
3
))
$
(
"#result-0-thisSettlementAmount"
).
val
(
parseFloat
(
thisSettlementAmount
).
toFixed
(
2
))
$
(
"#result-0-cumulativeSettlementAmount"
).
val
(
parseFloat
(
cumulativeSettlementAmount
).
toFixed
(
2
))
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisSettlementTax
).
toFixed
(
2
))
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
2
))
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisPriceTax
).
toFixed
(
2
))
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
2
))
}
}
/**
* 调整税率
*
* @param taxPoints
*/
function
calculateAmount2
(
taxPoints
)
{
function
calculateAmount2
(
taxPoints
)
{
var
rows
=
detail1Grid
.
getDataItems
();
// 本次结算金额
var
contractType
=
$
(
"#contractType"
).
val
();
var
totalPrice
=
0
;
var
deductionPrice
=
0
;
rows
.
forEach
(
function
(
row
,
index
)
{
if
(
row
.
settlementBasis
==
"合同内"
)
{
totalPrice
+=
parseFloat
(
row
.
totalPrice
);
}
else
{
deductionPrice
+=
parseFloat
(
row
.
totalPrice
);
}
});
//本次结算金额
var
thisSettlementAmount
=
$
(
"#result-0-thisSettlementAmount"
).
val
()
||
0
;
var
thisSettlementAmount
=
$
(
"#result-0-thisSettlementAmount"
).
val
()
||
0
;
//本次结算税金
// 本次结算税金
var
thisSettlementTax
=
0
;
var
thisTax
=
thisSettlementAmount
*
taxPoints
;
if
(
contractType
==
"1"
)
{
// 本次价税合计=本次结算金额+本次结算税金
thisSettlementTax
=
thisSettlementAmount
*
taxPoints
;
var
thisTaxPrice
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisTax
);
}
else
{
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisTax
).
toFixed
(
3
))
thisSettlementTax
=
totalPrice
*
taxPoints
;
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisTaxPrice
).
toFixed
(
3
))
}
// 累计税额,不含本结算单
//本次价税合计=本次结算金额+本次结算税金
var
sumTax
=
$
(
"#main-0-thisSettlementTax"
).
val
();
var
thisPriceTax
=
parseFloat
(
thisSettlementAmount
)
+
parseFloat
(
thisSettlementTax
);
// 累计含税金额,不含本结算单
$
(
"#result-0-thisSettlementTax"
).
val
(
parseFloat
(
thisSettlementTax
).
toFixed
(
2
))
var
sumTaxAmount
=
$
(
"#main-0-thisPriceTax"
).
val
();
$
(
"#result-0-thisPriceTax"
).
val
(
parseFloat
(
thisPriceTax
).
toFixed
(
2
))
// 累计结算税金
//累计结算金额
var
cumulativeSettlementTax
=
parseFloat
(
sumTax
)
+
parseFloat
(
thisTax
);
var
cumulativeSettlementAmount
=
parseFloat
(
sumCumulativeSettlementAmount
)
+
parseFloat
(
thisSettlementAmount
);
// 累计结算含税金额
//累计结算税金
var
cumulativeSettlementAmount
=
parseFloat
(
sumTaxAmount
)
+
parseFloat
(
thisTaxPrice
);
var
cumulativeSettlementTax
=
parseFloat
(
sumCumulativeSettlementTax
)
+
parseFloat
(
thisSettlementTax
);
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
3
))
//累计价税合计=累计结算金额+累计结算税金
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativeSettlementAmount
).
toFixed
(
3
))
var
cumulativePriceTax
=
parseFloat
(
cumulativeSettlementAmount
)
+
parseFloat
(
cumulativeSettlementTax
);
$
(
"#result-0-cumulativeSettlementTax"
).
val
(
parseFloat
(
cumulativeSettlementTax
).
toFixed
(
2
))
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
2
))
}
}
function
initDate
()
{
function
initDate
()
{
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
var
contractNumber
=
$
(
"#result-0-contractNumber"
).
val
();
var
contractNumber
=
$
(
"#result-0-contractNumber"
).
val
();
IPLAT
.
EFPopupInput
.
text
(
$
(
"#popupInputProjCode"
)
,
projCode
)
//根据合同回去合同类型
//根据合同回去合同类型
var
info
=
new
EiInfo
();
var
info
=
new
EiInfo
();
info
.
set
(
"contractNumber"
,
contractNumber
);
info
.
set
(
"contractNumber"
,
contractNumber
);
...
...
src/main/webapp/HG/CW/HGCW008B.jsp
View file @
2b15d8a1
...
@@ -4,22 +4,13 @@
...
@@ -4,22 +4,13 @@
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<head>
</head>
<EF:EFPage
title=
"修改结算单"
>
<EF:EFPage
title=
"修改结算单"
>
<EF:EFRegion
id=
"inqu1"
title=
"基本信息"
>
<EF:EFRegion
id=
"inqu1"
title=
"基本信息"
>
<EF:EFInput
ename=
"main-0-thisSettlementAmount"
cname=
"累计结算金额"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-thisSettlementTax"
cname=
"累计结算税金"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-thisPriceTax"
cname=
"累计结算价税合计金额"
type=
"hidden"
/>
<EF:EFInput
ename=
"result-0-id"
cname=
"id"
type=
"hidden"
/>
<EF:EFInput
ename=
"result-0-id"
cname=
"id"
type=
"hidden"
/>
<div
class=
"row"
>
<div
class=
"row"
>
<
%
--
<
EF:EFPopupInput
ename=
"popupInputProjCode"
cname=
"项目编号"
popupTitle=
"项目信息"
popupWidth=
"900"
serviceName=
"HGCW002"
methodName=
"queryContractByType"
resultId=
"result"
save=
"false"
popupType=
"ServiceGrid"
refresh=
"true"
valueField=
"projCode"
textField=
"projCode"
columnEnames=
"projCode,projName,contractNumber,contractName,totalContractPriceIncluding,contractTypeStr"
columnCnames=
"项目编码,项目名称,合同号,合同名称,合同总价,合同类型"
backFillColumnIds=
"projCode,projName,contractNumber,contractName,totalContractPriceIncluding,contractTypeStr,contractType"
backFillFieldIds=
"result-0-projCode,result-0-projName,result-0-contractNumber,result-0-contractName,result-0-totalContractPrice,result-0-contractTypeStr,contractType"
readonly=
"true"
required=
"true"
resizable=
"true"
colWidth=
"4"
>
</EF:EFPopupInput>
--%>
<EF:EFInput
ename=
"result-0-projCode"
cname=
"项目编号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projCode"
cname=
"项目编号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projName"
cname=
"项目简称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projName"
cname=
"项目简称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-contractNumber"
cname=
"合同号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-contractNumber"
cname=
"合同号"
colWidth=
"4"
readonly=
"true"
/>
...
@@ -66,15 +57,17 @@
...
@@ -66,15 +57,17 @@
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算单"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算单"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementBasis"
cname=
"结算依据"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementBasis"
cname=
"结算依据"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"taskName"
cname=
"任务名称"
align=
"center"
/>
<EF:EFColumn
ename=
"taskName"
cname=
"任务名称"
align=
"left"
/>
<EF:EFColumn
ename=
"engineeringContent"
cname=
"工程内容"
align=
"center"
/>
<EF:EFColumn
ename=
"engineeringContent"
cname=
"工程内容"
align=
"left"
/>
<EF:EFColumn
ename=
"thisEngineeringQuantity"
cname=
"本次结算工程量"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"thisEngineeringQuantity"
cname=
"本次结算工程量"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"cumulativeEngineeringQuantity"
cname=
"至本次累计结算工程量"
format=
"{0:N3}"
align=
"right"
enable=
"false"
/>
<EF:EFColumn
ename=
"cumulativeEngineeringQuantity"
cname=
"至本次累计结算工程量"
enable=
"false"
width=
"140"
<EF:EFColumn
ename=
"unit"
cname=
"单位"
align=
"center"
/>
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"unitPrice"
cname=
"单价"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
align=
"center"
/>
<EF:EFColumn
ename=
"totalPrice"
cname=
"合价"
format=
"{0:N2}"
align=
"right"
/>
<EF:EFColumn
ename=
"unitPrice"
cname=
"含税单价"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
align=
"center"
/>
<EF:EFColumn
ename=
"totalPrice"
cname=
"不含税总价"
enable=
"false"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"totalTaxPrice"
cname=
"含税总价"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
align=
"left"
/>
<EF:EFColumn
ename=
"inventoryId"
cname=
"清单id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventoryId"
cname=
"清单id"
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/HG/CW/HGCW008C.jsp
View file @
2b15d8a1
...
@@ -4,33 +4,32 @@
...
@@ -4,33 +4,32 @@
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<head>
<EF:EFPage
title=
"结算单详情"
>
</head>
<EF:EFPage
title=
"修改结算单"
>
<EF:EFRegion
id=
"inqu1"
title=
"基本信息"
>
<EF:EFRegion
id=
"inqu1"
title=
"基本信息"
>
<EF:EFInput
ename=
"result-0-id"
cname=
"id"
type=
"hidden"
/>
<EF:EFInput
ename=
"result-0-id"
cname=
"id"
type=
"hidden"
/>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-projCode"
cname=
"项目编号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projCode"
cname=
"项目编号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projName"
cname=
"项目简称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projName"
cname=
"项目简称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-contractNumber"
cname=
"合同号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-contractNumber"
cname=
"合同号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"contractType"
cname=
"合同类型"
type=
"hidden"
/>
<EF:EFInput
ename=
"contractType"
cname=
"合同类型"
type=
"hidden"
/>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-contractName"
cname=
"合同名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-contractName"
cname=
"合同名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-settlementNumber"
cname=
"结算编号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-settlementNumber"
cname=
"结算编号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFSelect
cname=
"结算类别"
ename=
"result-0-settlementType"
colWidth=
"4"
filter=
"contains"
readonly=
"true"
<EF:EFSelect
cname=
"结算类别"
ename=
"result-0-settlementType"
colWidth=
"4"
filter=
"contains"
readonly=
"true"
enable=
"false"
>
enable=
"false"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.cw.settlementType"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.settlementType"
/>
</EF:EFSelect>
</EF:EFSelect>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFSelect
cname=
"税点"
ename=
"result-0-taxPoints"
colWidth=
"4"
filter=
"contains"
readonly=
"true"
enable=
"false"
>
<EF:EFSelect
cname=
"税点"
ename=
"result-0-taxPoints"
colWidth=
"4"
filter=
"contains"
readonly=
"true"
enable=
"false"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"价税分离"
ename=
"result-0-priceTaxSeparation"
colWidth=
"4"
filter=
"contains"
readonly=
"true"
enable=
"false"
>
<EF:EFSelect
cname=
"价税分离"
ename=
"result-0-priceTaxSeparation"
colWidth=
"4"
filter=
"contains"
readonly=
"true"
enable=
"false"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.cw.priceTaxSeparation"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.priceTaxSeparation"
/>
</EF:EFSelect>
</EF:EFSelect>
...
@@ -56,15 +55,17 @@
...
@@ -56,15 +55,17 @@
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFGrid
blockId=
"detail1"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算单"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算单"
hidden=
"true"
/>
<EF:EFColumn
ename=
"settlementBasis"
cname=
"结算依据"
align=
"center"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"settlementBasis"
cname=
"结算依据"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"taskName"
cname=
"任务名称"
align=
"center"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"taskName"
cname=
"任务名称"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"engineeringContent"
cname=
"工程内容"
align=
"center"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"engineeringContent"
cname=
"工程内容"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"thisEngineeringQuantity"
cname=
"本次结算工程量"
format=
"{0:N3}"
align=
"right"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"thisEngineeringQuantity"
cname=
"本次结算工程量"
enable=
"false"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"cumulativeEngineeringQuantity"
cname=
"至本次累计结算工程量"
format=
"{0:N3}"
align=
"right"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"cumulativeEngineeringQuantity"
cname=
"至本次累计结算工程量"
enable=
"false"
width=
"140"
<EF:EFColumn
ename=
"unit"
cname=
"单位"
align=
"center"
readonly=
"true"
enable=
"false"
/>
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"unitPrice"
cname=
"单价"
format=
"{0:N3}"
align=
"right"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"totalPrice"
cname=
"合价"
format=
"{0:N2}"
align=
"right"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"unitPrice"
cname=
"含税单价"
enable=
"false"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
align=
"center"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"totalPrice"
cname=
"不含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"right"
/>
<EF:EFColumn
ename=
"totalTaxPrice"
cname=
"含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"right"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"inventoryId"
cname=
"清单id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventoryId"
cname=
"清单id"
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/HG/CW/HGCW008D.js
View file @
2b15d8a1
...
@@ -33,8 +33,7 @@ $(function () {
...
@@ -33,8 +33,7 @@ $(function () {
allRows
=
resultGrid
.
getCheckedRows
();
allRows
=
resultGrid
.
getCheckedRows
();
result3Row
=
result3Grid
.
getCheckedRows
();
result3Row
=
result3Grid
.
getCheckedRows
();
if
(
allRows
.
length
>
0
)
{
if
(
allRows
.
length
>
0
)
{
parent
.
JSColorbox
.
setValueCallback
(
allRows
,
result3Row
);
parent
.
JSColorbox
.
setValueCallback
(
allRows
,
result3Row
);
}
else
{
}
else
{
message
(
"请选择至少一条合同清单!"
);
message
(
"请选择至少一条合同清单!"
);
return
;
return
;
...
...
src/main/webapp/HG/CW/HGCW008D.jsp
View file @
2b15d8a1
...
@@ -17,12 +17,14 @@
...
@@ -17,12 +17,14 @@
<EF:EFColumn
ename=
"provisionalQuantity"
cname=
"暂定工程量"
format=
"{0:N3}"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"provisionalQuantity"
cname=
"暂定工程量"
format=
"{0:N3}"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"measurementMethod"
cname=
"计量方式"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"measurementMethod"
cname=
"计量方式"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"supplyMethod"
cname=
"材料供应方式"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"supplyMethod"
cname=
"材料供应方式"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"taxPoints"
cname=
"合同税点"
enable=
"false"
width=
"90"
align=
"center"
/>
<EF:EFColumn
ename=
"unitPriceExcludingTax"
cname=
"除税单价/元"
format=
"{0:N3}"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"unitPriceExcludingTax"
cname=
"除税单价/元"
format=
"{0:N3}"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"totalPriceExcluding"
cname=
"不含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"center"
/>
<EF:EFColumn
ename=
"totalPriceExcluding"
cname=
"不含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"center"
/>
<EF:EFColumn
ename=
"totalPriceIncluding"
cname=
"含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"center"
/>
<EF:EFColumn
ename=
"totalPriceIncluding"
cname=
"含税总价"
enable=
"false"
format=
"{0:N2}"
align=
"center"
/>
<EF:EFColumn
ename=
"laborCosts"
cname=
"其中人工费、元"
format=
"{0:N3}"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"laborCosts"
cname=
"其中人工费、元"
format=
"{0:N3}"
align=
"center"
enable=
"false"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result3"
title=
"签证单"
fitHeight=
"true"
>
<EF:EFRegion
id=
"result3"
title=
"签证单"
fitHeight=
"true"
>
<EF:EFGrid
blockId=
"result3"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
queryMethod=
"query3"
>
<EF:EFGrid
blockId=
"result3"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
queryMethod=
"query3"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
...
...
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