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
4b8e0a4d
Commit
4b8e0a4d
authored
Jul 22, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-22 采购收票 1、选择结算单字段显示调整 2、结算日期显示调整为日期格式 3、查询条件修复 4、采购收票发票金额计算逻辑bug修复
5、采购收货添加是否开票字段,采购开票之后不再显示对应的采购收货
parent
68124012
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
177 additions
and
75 deletions
+177
-75
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+2
-0
HGCW012.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012.java
+4
-4
ServiceHGCW012.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
+42
-18
ServiceHGCW012A.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW012A.java
+1
-0
ServiceHGCW012C.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW012C.java
+2
-1
HGCW012.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
+5
-2
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+25
-1
HGCW012.js
src/main/webapp/HG/CW/HGCW012.js
+1
-1
HGCW012A.js
src/main/webapp/HG/CW/HGCW012A.js
+62
-37
HGCW012C.jsp
src/main/webapp/HG/CW/HGCW012C.jsp
+2
-1
common.js
src/main/webapp/common/js/common.js
+8
-2
jsUtils.js
src/main/webapp/common/js/jsUtils.js
+23
-8
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
4b8e0a4d
...
...
@@ -67,6 +67,8 @@ public class HGSqlConstant {
public
static
final
String
UPDATE_QTY
=
MODULE_NAME
+
"updateQty"
;
// 收货完成
public
static
final
String
UPDATE_CONFIRM
=
MODULE_NAME
+
"updateConfirm"
;
public
static
final
String
UPDATE_IS_INVOICING
=
MODULE_NAME
+
"updateIsInvoicing"
;
}
public
class
HgCw012
{
...
...
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012.java
View file @
4b8e0a4d
...
...
@@ -119,7 +119,7 @@ public class HGCW012 extends DaoEPBase {
private
BigDecimal
remainingAmount
=
new
BigDecimal
(
"0"
);
/* 剩余开票/收票金额*/
private
String
receiveDate
=
" "
;
/* 收票日期*/
private
Integer
contractType
=
new
Integer
(
0
);
/* 合同类型;1.采购收货2.劳务3.租赁*/
private
Boolean
inventTypeDetail
;
/* 存货大类*/
private
Integer
inventTypeDetail
;
/* 存货大类*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
String
spec
=
" "
;
/* 规格*/
...
...
@@ -683,7 +683,7 @@ public class HGCW012 extends DaoEPBase {
* get the inventTypeDetail - 存货大类.
* @return the inventTypeDetail
*/
public
Boolean
getInventTypeDetail
()
{
public
Integer
getInventTypeDetail
()
{
return
this
.
inventTypeDetail
;
}
...
...
@@ -692,7 +692,7 @@ public class HGCW012 extends DaoEPBase {
*
* @param inventTypeDetail - 存货大类
*/
public
void
setInventTypeDetail
(
Boolean
inventTypeDetail
)
{
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
}
/**
...
...
@@ -808,7 +808,7 @@ public class HGCW012 extends DaoEPBase {
setRemainingAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMAINING_AMOUNT
)),
remainingAmount
));
setReceiveDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_DATE
)),
receiveDate
));
setContractType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_TYPE
)),
contractType
));
setInventTypeDetail
(
NumberUtils
.
to
Boolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
setInventTypeDetail
(
NumberUtils
.
to
Integer
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
View file @
4b8e0a4d
...
...
@@ -5,15 +5,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.domain.HGCW012
;
import
com.baosight.hggp.hg.cw.domain.HGCW013
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
...
@@ -22,6 +21,7 @@ import com.baosight.iplat4j.core.util.NumberUtils;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
...
...
@@ -83,9 +83,9 @@ public class ServiceHGCW012 extends ServiceBase {
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGCW012
HGCW012
=
new
HGCW012
();
HGCW012
.
fromMap
(
resultRow
s
.
get
(
i
)
);
HGCW012
.
fromMap
(
resultRow
);
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
HGCW012
.
setCompanyCode
(
userVO
.
getUsercode
());
HGCW012
.
setCompanyName
(
userVO
.
getUsername
());
...
...
@@ -99,6 +99,7 @@ public class ServiceHGCW012 extends ServiceBase {
this
.
add
(
HGCW012
);
}
else
{
this
.
modify
(
HGCW012
);
this
.
updateHGCW013
(
HGCW012
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
@@ -259,7 +260,7 @@ public class ServiceHGCW012 extends ServiceBase {
}
//获取相应的数据
List
<
HGCW013
>
hgcw013List
=
HGCWTools
.
HgCw013
.
mapToeList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
//
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if
(
CollectionUtils
.
isNotEmpty
(
hgcw013List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
...
...
@@ -272,10 +273,12 @@ public class ServiceHGCW012 extends ServiceBase {
hgcw012
.
setBillTybe
(
1
);
//hgcw012.setSigningDate(DateUtils.shortDate());
hgcw012
.
setReceiveDate
(
DateUtils
.
shortDate
());
BigDecimal
totalContractPriceIncluding
=
BigDecimal
.
ZERO
;
StringBuffer
settlementNumber
=
new
StringBuffer
();
hgcw012
.
setPartyA
(
hgcw013List
.
get
(
0
).
getPartyA
());
//BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
//StringBuffer settlementNumber = new StringBuffer();
Map
<
String
,
BigDecimal
>
rowMap
=
new
HashMap
<>();
for
(
HGCW013
hgcw013
:
hgcw013List
)
{
HGCWTools
.
HgCw013
.
countTaxAmount
(
resultRows
,
hgcw012
,
rowMap
);
/*for (HGCW013 hgcw013 : hgcw013List) {
settlementNumber.append(hgcw013.getSettlementNumber()).append(",");
}
for (Map m : resultRows) {
...
...
@@ -283,20 +286,23 @@ public class ServiceHGCW012 extends ServiceBase {
BigDecimal remainingAmount = new BigDecimal(m.get("thisSettlementAmount").toString());
rowMap.put(c, remainingAmount);
totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}
hgcw012
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
hgcw012
.
setPartyA
(
hgcw013List
.
get
(
0
).
getPartyA
());
hgcw012
.
setTaxPoints
(
hgcw013List
.
get
(
0
).
getTaxPoints
());
hgcw012
.
setThisSettlementTax
(
hgcw013List
.
get
(
0
).
getThisSettlementTax
());
hgcw012
.
setThisSettlementAmount
(
hgcw013List
.
get
(
0
).
getThisSettlementAmount
());
hgcw012
.
setSettlementNumber
(
settlementNumber
.
toString
().
substring
(
0
,
settlementNumber
.
length
()
-
1
));
hgcw012
.
setRemainingAmount
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
}*/
//hgcw012.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
//hgcw012.setTaxPoints(hgcw013List.get(0).getTaxPoints());
//hgcw012.setThisSettlementTax(hgcw013List.get(0).getThisSettlementTax());
//hgcw012.setThisSettlementAmount(hgcw013List.get(0).getThisSettlementAmount());
//hgcw012.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
//hgcw012.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
this
.
add
(
hgcw012
);
//生成明细表
for
(
HGCW013
hgcw013
:
hgcw013List
)
{
hgcw013
.
setMainId
(
hgcw012
.
getId
());
hgcw013
.
setId
(
null
);
HGCGTools
.
HgCg003
.
updateIsInvoicing
(
hgcw013
.
getSettlementNumber
(),
HGConstant
.
CgIsInvoicing
.
S_1
);
this
.
addHGCW013
(
hgcw013
);
}
}
else
{
HGCW012
hgcw012
=
HGCWTools
.
HgCw012
.
getId
(
mainId
);
...
...
@@ -438,6 +444,24 @@ public class ServiceHGCW012 extends ServiceBase {
public
void
addHGCW013
(
HGCW013
HGCW013
)
{
DaoUtils
.
insert
(
"HGCW013.insert"
,
HGCW013
);
}
public
void
updateHGCW013
(
HGCW012
hgcw012
)
{
List
<
HGCW013
>
hgcw013s
=
HGCWTools
.
HgCw013
.
getMainId
(
hgcw012
.
getId
());
for
(
HGCW013
hgcw013
:
hgcw013s
)
{
hgcw013
.
setBillNumber
(
hgcw012
.
getBillNumber
());
hgcw013
.
setTaxPoints
(
hgcw012
.
getTaxPoints
());
BigDecimal
taxPoints
=
new
BigDecimal
(
hgcw012
.
getTaxPoints
());
// 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal
thisAmount
=
hgcw013
.
getTotalContractPriceIncluding
();
//开票总额
BigDecimal
taxRateAsDecimal
=
taxPoints
.
divide
(
new
BigDecimal
(
"100"
)).
add
(
new
BigDecimal
(
"1"
));
// 将税率转换为小数形式
BigDecimal
thisSettlementAmount
=
thisAmount
.
divide
(
taxRateAsDecimal
,
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
thisSettlementTax
=
thisAmount
.
subtract
(
thisSettlementAmount
);
// 计算税额
hgcw013
.
setThisSettlementTax
(
thisSettlementTax
.
toString
());
hgcw013
.
setThisSettlementAmount
(
thisSettlementAmount
.
toString
());
DaoUtils
.
update
(
HGCW013
.
UPDATE
,
hgcw013
);
}
}
/**
* 提交操作
* @param inInfo
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012A.java
View file @
4b8e0a4d
...
...
@@ -61,6 +61,7 @@ public class ServiceHGCW012A extends ServiceBase {
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"signingDateTo"
,
DateUtils
.
formatShort
(
signingDateTo
));
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCG003
.
FIELD_STATUS
,
HGConstant
.
CgReceiveStatus
.
S_5
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCG003
.
FIELD_IS_INVOICING
,
HGConstant
.
CgIsInvoicing
.
S_0
);
inInfo
=
super
.
query
(
inInfo
,
HGCG003
.
QUERY
,
new
HGCG003
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012C.java
View file @
4b8e0a4d
...
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.hg.cw.domain.HGCW012
;
import
com.baosight.hggp.hg.cw.domain.HGCW013
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -51,7 +52,7 @@ public class ServiceHGCW012C extends ServiceBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGCW01
2
.
QUERY
,
new
HGCW012
());
inInfo
=
super
.
query
(
inInfo
,
HGCW01
3
.
QUERY
,
new
HGCW012
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
View file @
4b8e0a4d
...
...
@@ -91,7 +91,7 @@
BILL_TYBE = #billTybe#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"billNumber"
>
BILL_NUMBER
= #billNumber#
BILL_NUMBER
LIKE CONCAT('%',#billNumber#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"billState"
>
BILL_STATE = #billState#
...
...
@@ -100,7 +100,7 @@
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"partyA"
>
PARTY_A
= #partyA#
PARTY_A
LIKE CONCAT('%',#partyA#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"reviewStatus"
>
REVIEW_STATUS = #reviewStatus#
...
...
@@ -319,6 +319,9 @@
RECEIVE_WEIGHT
<!-- 收货重量 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#, #contractType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #depositQty#, #receiveWeight#)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012
</selectKey>
</insert>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
4b8e0a4d
...
...
@@ -865,7 +865,31 @@ public class HGCWTools {
return
results
;
}
public
static
void
countTaxAmount
(
List
<
Map
>
rows
,
HGCW012
hgcw012
,
Map
<
String
,
BigDecimal
>
rowMap
)
{
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
StringBuffer
settlementNumber
=
new
StringBuffer
();
BigDecimal
thisAmount
=
BigDecimal
.
ZERO
;
BigDecimal
taxPoints
=
new
BigDecimal
(
"13"
);
// 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal
taxRateAsDecimal
=
taxPoints
.
divide
(
new
BigDecimal
(
"100"
)).
add
(
new
BigDecimal
(
"1"
));
// 将税率 转换为小数形式
if
(
CollectionUtils
.
isNotEmpty
(
rows
))
{
for
(
Map
row
:
rows
)
{
String
amount
=
row
.
get
(
"thisSettlementAmount"
).
toString
();
BigDecimal
remainingAmount
=
new
BigDecimal
(
amount
);
//发票总额
thisAmount
=
thisAmount
.
add
(
remainingAmount
);
String
c
=
row
.
get
(
"receiveNo"
).
toString
();
settlementNumber
.
append
(
c
).
append
(
","
);
rowMap
.
put
(
c
,
remainingAmount
);
}
}
BigDecimal
thisSettlementAmount
=
thisAmount
.
divide
(
taxRateAsDecimal
,
2
,
RoundingMode
.
HALF_UP
);
//不含税金额
BigDecimal
thisSettlementTax
=
thisAmount
.
subtract
(
thisSettlementAmount
);
// 计算 税额
hgcw012
.
setTaxPoints
(
new
Integer
(
String
.
valueOf
(
taxPoints
)));
//税率
hgcw012
.
setThisSettlementTax
(
thisSettlementTax
.
toString
());
//税额
hgcw012
.
setThisSettlementAmount
(
thisSettlementAmount
.
toString
());
//不含税金额
hgcw012
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
thisAmount
)));
//发票总额
hgcw012
.
setRemainingAmount
(
new
BigDecimal
(
decimalFormat
.
format
(
thisAmount
)));
//剩余发票金额
hgcw012
.
setSettlementNumber
(
settlementNumber
.
toString
().
substring
(
0
,
settlementNumber
.
length
()
-
1
));
//来源单号
}
}
public
static
class
HgCw014
{
...
...
src/main/webapp/HG/CW/HGCW012.js
View file @
4b8e0a4d
...
...
@@ -151,7 +151,7 @@ function windowCallback() {
function
contractDetailFunc
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW012C?methodName=initLoad&inqu_status-0-
i
d="
+
id
+
"&efParentFormEname=HGCW012"
,
href
:
"HGCW012C?methodName=initLoad&inqu_status-0-
mainI
d="
+
id
+
"&efParentFormEname=HGCW012"
,
title
:
"<div style='text-align: center;'>明细详情</div>"
,
width
:
"90%"
,
height
:
"90%"
,
...
...
src/main/webapp/HG/CW/HGCW012A.js
View file @
4b8e0a4d
...
...
@@ -76,21 +76,21 @@ function btnSaveFunc(btnNode, gridNode) {
}
let
flag
=
true
;
if
(
gridNode
==
'resultA'
){
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
thisAmount
=
item
[
'this
Amount'
];
let
remainingAmount
=
item
[
'remainingAmount'
];
if
(
!
isNumber
(
thisAmount
)
&&
!
isPositiveNumber
(
thisAmount
))
{
message
(
"勾选的第"
+
(
index
+
1
)
+
"行本次收票金额必须是大于0的数字"
)
;
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
thisAmount
)
>
parseFloat
(
remainingAmount
))
{
message
(
"第"
+
(
index
+
1
)
+
"行本次收票金额不能大于剩余收票金额"
)
;
flag
=
false
;
return
false
;
}
}
)};
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
thisAmount
=
item
[
'thisAmount'
];
let
remainingAmount
=
item
[
'remaining
Amount'
];
if
(
!
isNumber
(
thisAmount
)
&&
!
isPositiveNumber
(
thisAmount
))
{
message
(
"勾选的第"
+
(
index
+
1
)
+
"行本次收票金额必须是大于0的数字"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
thisAmount
)
>
parseFloat
(
remainingAmount
))
{
message
(
"第"
+
(
index
+
1
)
+
"行本次收票金额不能大于剩余收票金额"
);
flag
=
false
;
return
false
;
}
}
)
}
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据生成票据吗?"
,
{
ok
:
function
()
{
...
...
@@ -201,6 +201,7 @@ $(function () {
field
:
"receiveWeight"
,
title
:
"重量"
,
headerTemplate
:
"<span style='color: '>重量 </span>"
,
format
:
"{0:N3}"
,
enable
:
false
,
locked
:
false
},
...
...
@@ -209,12 +210,16 @@ $(function () {
title
:
"收货日期"
,
headerTemplate
:
"<span style='color: '>收货日期 </span>"
,
enable
:
false
,
locked
:
false
locked
:
false
,
template
:
function
(
date
)
{
return
date
.
receiveDate
?
convertToDate
(
date
.
receiveDate
,
"yyyy-MM-dd"
):
" "
;
}
},
{
field
:
"amount"
,
title
:
"收货金额"
,
headerTemplate
:
"<span style='color: '>收货金额 </span>"
,
format
:
"{0:N2}"
,
enable
:
false
,
locked
:
false
},
...
...
@@ -222,7 +227,12 @@ $(function () {
field
:
"thisSettlementAmount"
,
title
:
"收票总额"
,
headerTemplate
:
"<span style='color: '>收票总额 </span>"
,
locked
:
false
format
:
"{0:N2}"
,
locked
:
false
,
template
:
function
(
date
)
{
date
.
thisSettlementAmount
=
date
.
amount
;
return
date
.
amount
}
}],
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
...
...
@@ -286,7 +296,10 @@ $(function () {
field
:
"contractDate"
,
title
:
"结算日期"
,
headerTemplate
:
"<span style='color: '>结算日期 </span>"
,
locked
:
false
locked
:
false
,
template
:
function
(
date
)
{
return
date
.
contractDate
?
convertToDate
(
date
.
contractDate
,
"yyyy-MM-dd"
):
" "
;
}
},
{
field
:
"taxPoints"
,
...
...
@@ -296,32 +309,37 @@ $(function () {
},
{
field
:
"thisPriceTax"
,
title
:
"收款价税合计金额"
,
headerTemplate
:
"<span style='color: '>收款价税合计金额 </span>"
,
title
:
"收票价税合计金额"
,
headerTemplate
:
"<span style='color: '>收票价税合计金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},
{
field
:
"thisSettlementTax"
,
title
:
"收款税金"
,
headerTemplate
:
"<span style='color: '>收款税金 </span>"
,
title
:
"收票税金"
,
headerTemplate
:
"<span style='color: '>收票税金 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},
{
field
:
"thisSettlementAmount"
,
title
:
"收款金额"
,
headerTemplate
:
"<span style='color: '>收款金额 </span>"
,
title
:
"收票金额"
,
headerTemplate
:
"<span style='color: '>收票金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},
{
field
:
"thisAmount"
,
title
:
"本次收款金额"
,
headerTemplate
:
"<span style='color: '>本次收款金额 </span>"
,
title
:
"本次收票金额"
,
headerTemplate
:
"<span style='color: '>本次收票金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},
{
field
:
"remainingAmount"
,
title
:
"剩余收款金额"
,
headerTemplate
:
"<span style='color: '>剩余收款金额 </span>"
,
title
:
"剩余收票金额"
,
headerTemplate
:
"<span style='color: '>剩余收票金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
}],
loadComplete
:
function
(
grid
)
{
...
...
@@ -388,7 +406,10 @@ $(function () {
field
:
"signingDate"
,
title
:
"结算日期"
,
headerTemplate
:
"<span style='color: '>结算日期 </span>"
,
locked
:
false
locked
:
false
,
template
:
function
(
date
)
{
return
date
.
signingDate
?
convertToDate
(
date
.
signingDate
,
"yyyy-MM-dd"
):
" "
;
}
},
{
field
:
"taxPoints"
,
...
...
@@ -398,25 +419,29 @@ $(function () {
},
{
field
:
"totalContractPriceIncluding"
,
title
:
"收款价税合计金额"
,
headerTemplate
:
"<span style='color: '>收款价税合计金额 </span>"
,
title
:
"收票价税合计金额"
,
headerTemplate
:
"<span style='color: '>收票价税合计金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},
{
field
:
"valueAddedTax"
,
title
:
"收款税金"
,
headerTemplate
:
"<span style='color: '>收款税金 </span>"
,
title
:
"收票税金"
,
headerTemplate
:
"<span style='color: '>收票税金 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},
{
field
:
"totalContractPriceExcluding"
,
title
:
"收款金额"
,
headerTemplate
:
"<span style='color: '>收款金额 </span>"
,
title
:
"收票金额"
,
headerTemplate
:
"<span style='color: '>收票金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
},{
field
:
"thisAmount"
,
title
:
"本次收款金额"
,
headerTemplate
:
"<span style='color: '>本次收款金额 </span>"
,
title
:
"本次收票金额"
,
headerTemplate
:
"<span style='color: '>本次收票金额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
}],
loadComplete
:
function
(
grid
)
{
...
...
src/main/webapp/HG/CW/HGCW012C.jsp
View file @
4b8e0a4d
...
...
@@ -7,10 +7,11 @@
<head>
</head>
<EF:EFPage
title=
"详情清单"
>
<EF:EFInput
blockId=
"inqu_status"
row=
"0"
ename=
"
i
d"
cname=
"隐藏条件"
type=
"hidden"
/>
<EF:EFInput
blockId=
"inqu_status"
row=
"0"
ename=
"
mainI
d"
cname=
"隐藏条件"
type=
"hidden"
/>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
autoBind=
"false"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"partyA"
cname=
"客户名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"来源单号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
...
...
src/main/webapp/common/js/common.js
View file @
4b8e0a4d
...
...
@@ -288,6 +288,12 @@ function currMonth(getYear) {
return
year
+
'-'
+
(
month
<
10
?
'0'
+
month
:
month
);
}
// 日期格式化yyyyMMddz转yyyy-MM-dd
function
convertToDate
(
dateString
,
format
)
{
var
parts
=
dateString
.
match
(
/
(\d{4})(\d{2})(\d{2})
/
);
return
dateFormate
(
new
Date
(
parts
[
1
],
parts
[
2
]
-
1
,
parts
[
3
]),
format
);
// 月份是从0开始的,所以减1
}
/**
* cookie 操作
*
...
...
@@ -324,8 +330,8 @@ function getCookie(c_name) {
/**
*
* @param date
* @param fmt
* @param date
日期时间
* @param fmt
时间格式
* @returns {*}
*/
function
dateFormate
(
date
,
fmt
)
{
...
...
src/main/webapp/common/js/jsUtils.js
View file @
4b8e0a4d
...
...
@@ -126,7 +126,12 @@
return
false
;
}
};
/**
* 判断value是否可以,不可用返回defaultValue
* @param value
* @param defaultValue 默认值
* @returns {*}
*/
var
defaultIfEmpty
=
function
(
value
,
defaultValue
)
{
if
(
!
IPLAT
.
isAvailable
(
value
))
{
return
defaultValue
;
...
...
@@ -439,6 +444,11 @@
return
eiblock
;
}
/**
* 设置grid数据
* @param resultId 根据resultId的类型,获取Kendo UI Grid控件实例或数据源实例。
* @param eiInfo 从eiInfo中获取分页信息(限制条数和偏移量),将eiInfo设置到Grid控件实例中。
*/
var
grid_setEiInfo
=
function
(
resultId
,
eiInfo
)
{
var
r
,
n
=
null
,
result
=
resultId
;
if
(
resultId
.
constructor
==
String
)
{
...
...
@@ -464,6 +474,11 @@
}
}
/**
* 用于设置数据源的数据,并根据条件对数据进行处理和赋值
* @param eiBlock 获取相关数据,包括数据总数count、限制数量limit和偏移量offset
* @param dataSource 根据传入的数据源类型,如果为字符串,则通过该字符串获取Kendo Grid对象,并将其数据源保存在n中
*/
var
grid_setData
=
function
(
eiBlock
,
dataSource
)
{
var
count
=
0
,
e
=
[],
limit
=
0
,
offset
=
0
;
if
(
eiBlock
!=
undefined
)
{
...
...
@@ -610,15 +625,15 @@
var
obj
=
{
isGetForm
:
true
,
isRefreshre
:
true
,
isProgress
:
true
,
isAlldata
:
false
};
$
.
extend
(
obj
,
parameter
);
var
_IPLAT
=
IPLAT
;
var
$activeElement
=
$
(
document
.
activeElement
);
$activeElement
.
attr
(
"disabled"
,
true
);
var
$activeElement
=
$
(
document
.
activeElement
);
// 获取焦点的元素
$activeElement
.
attr
(
"disabled"
,
true
);
//禁用按钮 防止重复提交
// 点击的按钮
if
(
obj
.
isProgress
)
{
_IPLAT
.
progress
(
$
(
"body"
),
true
);
_IPLAT
.
progress
(
$
(
"body"
),
true
);
//弹出页面遮盖层
}
var
eiInfo
=
__eiInfo
var
info
=
obj
.
eiinfo
||
new
EiInfo
();
if
(
!
IPLAT
.
isAvailable
(
obj
.
isGetForm
)
||
obj
.
isGetForm
===
true
)
{
if
(
!
IPLAT
.
isAvailable
(
obj
.
isGetForm
)
||
obj
.
isGetForm
===
true
)
{
//IPLAT.isAvailable 判断对象是否为空
info
.
setByNodeObject
(
document
.
body
);
}
if
(
IPLAT
.
isAvailable
(
grid_ids
))
{
...
...
@@ -658,9 +673,9 @@
}
$activeElement
.
attr
(
"disabled"
,
false
);
if
(
obj
.
isProgress
)
{
_IPLAT
.
progress
(
$
(
"body"
),
false
);
_IPLAT
.
progress
(
$
(
"body"
),
false
);
//关闭页面遮盖层
}
if
(
typeof
obj
.
onSuccessCallback
===
'function'
)
{
if
(
typeof
obj
.
onSuccessCallback
===
'function'
)
{
//onSuccessCallback 类型是函数就执行函数
obj
.
onSuccessCallback
(
ei
);
}
},
...
...
@@ -668,7 +683,7 @@
// 发生异常
$activeElement
.
attr
(
"disabled"
,
false
);
if
(
obj
.
isProgress
)
{
_IPLAT
.
progress
(
$
(
"body"
),
false
);
_IPLAT
.
progress
(
$
(
"body"
),
false
);
//关闭页面遮盖层
}
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
...
...
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