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
453bb24e
Commit
453bb24e
authored
Jul 09, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-09 采购开票修复发票号编辑和税点选择计算
parent
eaa15396
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
HGCW012.js
src/main/webapp/HG/CW/HGCW012.js
+18
-1
HGCW012.jsp
src/main/webapp/HG/CW/HGCW012.jsp
+5
-2
No files found.
src/main/webapp/HG/CW/HGCW012.js
View file @
453bb24e
...
...
@@ -22,11 +22,28 @@ $(function() {
return
template
;
}
}],
loadComplete
:
function
(
e
)
{
loadComplete
:
function
(
grid
)
{
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
//$("#BTN_UPDATE").on("click",updateFunc);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#B_SAVE"
).
on
(
"click"
,
saveFunc
);
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
){
var
item
=
e
.
items
[
0
];
if
(
e
.
field
==
"taxPoints"
){
if
(
item
.
thisSettlementTax
&&
item
.
totalContractPriceIncluding
){
let
thisSettlementAmount
=
item
.
totalContractPriceIncluding
/
(
item
.
taxPoints
/
100
+
1
);
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount
=
Number
(
thisSettlementAmount
.
toFixed
(
2
));
resultGrid
.
setCellValue
(
item
,
'thisSettlementAmount'
,
thisSettlementAmount
)
}
if
(
item
.
taxPoints
&&
item
.
totalContractPriceIncluding
){
let
thisSettlementTax
=
item
.
totalContractPriceIncluding
-
item
.
thisSettlementAmount
;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax
=
Number
(
thisSettlementTax
.
toFixed
(
2
));
resultGrid
.
setCellValue
(
item
,
'thisSettlementTax'
,
thisSettlementTax
)
}
}
})
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
)
{
...
...
src/main/webapp/HG/CW/HGCW012.jsp
View file @
453bb24e
...
...
@@ -42,8 +42,11 @@
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"signingDate"
cname=
"开票日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
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=
"billNumber"
cname=
"发票号"
width=
"120"
enable=
"true"
readonly=
"false"
align=
"center"
/>
<EF:EFComboColumn
ename=
"taxPoints"
cname=
"税率"
width=
"120"
align=
"center"
required=
"true"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"thisSettlementAmount"
cname=
"不含税金额"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"税额"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"totalContractPriceIncluding"
cname=
"发票总额"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
...
...
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