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
182273de
Commit
182273de
authored
Jul 06, 2024
by
13420
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算单,开票,采购bug调整
parent
83a72b01
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
87 additions
and
23 deletions
+87
-23
ServiceHGCW008.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
+2
-1
HGCW012.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
+1
-1
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+4
-3
HGCW008.jsp
src/main/webapp/HG/CW/HGCW008.jsp
+3
-2
HGCW008A.js
src/main/webapp/HG/CW/HGCW008A.js
+13
-8
HGCW008A.jsp
src/main/webapp/HG/CW/HGCW008A.jsp
+4
-3
HGCW010.js
src/main/webapp/HG/CW/HGCW010.js
+2
-2
HGCW012.js
src/main/webapp/HG/CW/HGCW012.js
+52
-1
HGCW012.jsp
src/main/webapp/HG/CW/HGCW012.jsp
+4
-2
HGCW012A.js
src/main/webapp/HG/CW/HGCW012A.js
+2
-0
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
View file @
182273de
...
...
@@ -86,7 +86,7 @@ public class ServiceHGCW008 extends ServiceBase {
HGCW008
.
setCompanyCode
(
userVO
.
getUsercode
());
HGCW008
.
setCompanyName
(
userVO
.
getUsername
());
HGCW008
.
setSettlementNumber
(
settlementNumber
);
HGCW008
.
setReviewStatus
(
0
);
HGCW008
.
setReviewStatus
(
2
);
HGCW008
.
setContractDate
(
DateUtils
.
formatShort
(
HGCW008
.
getContractDate
()));
HGCW008
.
setRemainingAmount
(
HGCW008
.
getThisPriceTax
());
this
.
add
(
HGCW008
);
...
...
@@ -139,6 +139,7 @@ public class ServiceHGCW008 extends ServiceBase {
*/
@OperationLogAnnotation
(
operModul
=
"租赁合同"
,
operType
=
"删除"
,
operDesc
=
"删除"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
View file @
182273de
...
...
@@ -135,7 +135,7 @@
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.
service
.HGCW012"
>
resultClass=
"com.baosight.hggp.hg.cw.
domain
.HGCW012"
>
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
182273de
...
...
@@ -16,6 +16,7 @@ import org.apache.commons.collections.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -402,9 +403,9 @@ public class HGCWTools {
String
remainingAmount
=
row
.
get
(
"thisAmount"
).
toString
();
BigDecimal
taxPoints
=
new
BigDecimal
(
row
.
get
(
"taxPoints"
).
toString
());
// 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal
thisAmount
=
new
BigDecimal
(
row
.
get
(
"thisAmount"
).
toString
());
BigDecimal
taxRateAsDecimal
=
taxPoints
.
divide
(
new
BigDecimal
(
"100"
));
// 将税率转换为小数形式
BigDecimal
thisSettlement
Tax
=
thisAmount
.
multiply
(
taxRateAsDecimal
);
// 计算税额
BigDecimal
thisSettlement
Amount
=
thisAmount
.
subtract
(
thisSettlementTax
);
BigDecimal
taxRateAsDecimal
=
taxPoints
.
divide
(
new
BigDecimal
(
"100"
))
.
add
(
new
BigDecimal
(
"1"
))
;
// 将税率转换为小数形式
BigDecimal
thisSettlement
Amount
=
thisAmount
.
divide
(
taxRateAsDecimal
,
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
thisSettlement
Tax
=
thisAmount
.
subtract
(
thisSettlementAmount
);
// 计算税额
HGCW011
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
remainingAmount
));
HGCW011
.
setSettlementNumber
(
settlementNumber
);
HGCW011
.
setThisSettlementTax
(
thisSettlementTax
.
toString
());
...
...
src/main/webapp/HG/CW/HGCW008.jsp
View file @
182273de
...
...
@@ -19,7 +19,7 @@
<EF:EFInput
cname=
"合同名称"
ename=
"contractName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFDateSpan
startCname=
"结算日期(从)"
endCname=
"至"
blockId=
"inqu_status"
startName=
"contractDateFrom"
endName=
"contractDateTo"
row=
"0"
role=
"date"
format=
"yyyy
-MM-
dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
format=
"yyyy
MM
dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
</EF:EFDateSpan>
<EF:EFInput
cname=
"结算编号"
ename=
"settlementNumber"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"结算类别"
ename=
"inqu_status-0-settlementType"
colWidth=
"3"
filter=
"contains"
>
...
...
@@ -28,7 +28,7 @@
</EF:EFSelect>
<EF:EFSelect
cname=
"审批状态"
ename=
"inqu_status-0-reviewStatus"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.cw.reviewStatus"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.reviewStatus"
condition =
"ITEM_CODE IN ('2','3')"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
...
...
@@ -49,6 +49,7 @@
</EF:EFComboColumn>
<EF:EFColumn
ename=
"thisSettlementAmount"
cname=
"本次结算金额"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"本次结算税金"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"本次结算含税金额"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
align=
"center"
enable=
"false"
/>
<EF:EFComboColumn
ename=
"reviewStatus"
cname=
"审批状态"
width=
"100"
align=
"center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
...
...
src/main/webapp/HG/CW/HGCW008A.js
View file @
182273de
...
...
@@ -258,7 +258,18 @@ function cancelFunc() {
}
function
btnSaveFunc
()
{
fieldValidation
();
{
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
if
(
isBlank
(
projCode
))
{
message
(
"请选择项目!"
)
}
var
contractDate
=
$
(
"#result-0-contractDate"
).
val
();
if
(
isBlank
(
contractDate
))
{
message
(
"请选择结算日期!"
)
return
;
}
}
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
"detail1"
,
"HGCW008"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowCallback
});
...
...
@@ -392,13 +403,7 @@ function calculateAmount2(taxPoints) {
$
(
"#result-0-cumulativePriceTax"
).
val
(
parseFloat
(
cumulativePriceTax
).
toFixed
(
3
))
}
function
fieldValidation
()
{
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
if
(
isBlank
(
projCode
))
{
message
(
"请选择项目!"
);
return
;
}
}
$
(
window
).
load
(
function
()
{
refreshRowNo
();
});
...
...
src/main/webapp/HG/CW/HGCW008A.jsp
View file @
182273de
...
...
@@ -14,9 +14,9 @@
resultId=
"contract_combo_box"
save=
"false"
popupType=
"ServiceGrid"
valueField=
"projCode"
textField=
"projCode"
columnEnames=
"projCode,projName,contractNumber,contractName,totalContractPrice
Ex
cluding"
columnEnames=
"projCode,projName,contractNumber,contractName,totalContractPrice
In
cluding"
columnCnames=
"项目编码,项目名称,合同号,合同名称,合同总价"
backFillColumnIds=
"projCode,projName,contractNumber,contractName,totalContractPrice
Ex
cluding,contractType"
backFillColumnIds=
"projCode,projName,contractNumber,contractName,totalContractPrice
In
cluding,contractType"
backFillFieldIds=
"result-0-projCode,result-0-projName,result-0-contractNumber,result-0-contractName,result-0-totalContractPrice,contractType"
readonly=
"true"
required=
"true"
resizable=
"true"
popupTitle=
"项目信息"
popupWidth=
"800"
>
...
...
@@ -46,7 +46,8 @@
<EF:EFCodeOption
codeName=
"hggp.cw.priceTaxSeparation"
/>
</EF:EFSelect>
<EF:EFDatePicker
cname=
"结算日期"
ename=
"result-0-contractDate"
colWidth=
"4"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
enable=
"true"
align=
"center"
required=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-thisSettlementAmount"
cname=
"本次结算金额(元)"
colWidth=
"4"
readonly=
"true"
/>
...
...
src/main/webapp/HG/CW/HGCW010.js
View file @
182273de
...
...
@@ -33,11 +33,11 @@ $(function() {
var
item
=
e
.
items
[
0
];
if
(
e
.
field
==
"taxPoints"
){
if
(
item
.
taxPoints
&&
item
.
totalContractPriceIncluding
){
let
thisSettlementTax
=
item
.
t
axPoints
*
item
.
totalContractPriceIncluding
/
100
;
let
thisSettlementTax
=
item
.
t
otalContractPriceIncluding
-
item
.
thisSettlementAmount
;
resultGrid
.
setCellValue
(
item
,
'thisSettlementTax'
,
thisSettlementTax
)
}
if
(
item
.
thisSettlementTax
&&
item
.
totalContractPriceIncluding
){
let
thisSettlementAmount
=
item
.
totalContractPriceIncluding
-
item
.
thisSettlementTax
;
let
thisSettlementAmount
=
item
.
totalContractPriceIncluding
/
(
item
.
taxPoints
/
100
+
1
)
;
resultGrid
.
setCellValue
(
item
,
'thisSettlementAmount'
,
thisSettlementAmount
)
}
loadChange
(
grid
,
e
,
"price"
);
...
...
src/main/webapp/HG/CW/HGCW012.js
View file @
182273de
...
...
@@ -27,7 +27,7 @@ $(function() {
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
updateFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#B_SAVE"
).
on
(
"click"
,
saveFunc
);
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
)
{
...
...
@@ -71,6 +71,57 @@ function addFunc() {
callbackName
:
windowCallback
});
}
/**
* 保存
*/
function
saveFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
reviewStatus
=
item
.
get
(
"reviewStatus"
);
if
((
reviewStatus
===
"1"
)){
message
(
"数据已审核"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
var
info
=
new
EiInfo
();
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
));
EiCommunicator
.
send
(
"HGCW012"
,
"save"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
query
();
}
catch
(
e
)
{
// TODO: handle exception
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
}
/**
* 修改
...
...
src/main/webapp/HG/CW/HGCW012.jsp
View file @
182273de
...
...
@@ -34,8 +34,10 @@
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cw.billTybe"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"receiveDate"
cname=
"收票日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"signingDate"
cname=
"开票日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"receiveDate"
cname=
"签订日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"signingDate"
cname=
"签订日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"billNumber"
cname=
"发票号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"taxPoints"
cname=
"税率"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"thisSettlementAmount"
cname=
"不含税金额"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
...
...
src/main/webapp/HG/CW/HGCW012A.js
View file @
182273de
...
...
@@ -147,6 +147,7 @@ $(function () {
field
:
"receiveDate"
,
title
:
"结算日期"
,
headerTemplate
:
"<span style='color: '>结算日期 </span>"
,
enable
:
false
,
locked
:
true
},
{
...
...
@@ -159,6 +160,7 @@ $(function () {
field
:
"amount"
,
title
:
"结算金额"
,
headerTemplate
:
"<span style='color: '>结算金额 </span>"
,
enable
:
false
,
locked
:
false
},
{
...
...
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