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
c24be753
Commit
c24be753
authored
Sep 09, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-09 销售开票选择结算单增加含税金额,税率改为可修改
parent
e5f883dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
HGCW010A.js
src/main/webapp/HG/CW/HGCW010A.js
+25
-1
HGCW010A.jsp
src/main/webapp/HG/CW/HGCW010A.jsp
+5
-2
No files found.
src/main/webapp/HG/CW/HGCW010A.js
View file @
c24be753
...
@@ -14,7 +14,31 @@ $(function() {
...
@@ -14,7 +14,31 @@ $(function() {
pageable
:
{
pageable
:
{
pageSize
:
20
,
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
}
},
loadComplete
:
function
(
grid
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
){
var
item
=
e
.
items
[
0
];
if
(
e
.
field
==
"taxPoints"
){
if
(
item
.
thisSettlementTax
&&
item
.
thisPriceTax
){
let
thisSettlementAmount
=
item
.
thisPriceTax
/
(
item
.
taxPoints
/
100
+
1
);
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount
=
Number
(
thisSettlementAmount
.
toFixed
(
2
));
resultGrid
.
setCellValue
(
item
,
'thisSettlementAmount'
,
thisSettlementAmount
)
}
if
(
item
.
taxPoints
&&
item
.
thisPriceTax
){
let
thisSettlementTax
=
item
.
thisPriceTax
-
item
.
thisSettlementAmount
;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax
=
Number
(
thisSettlementTax
.
toFixed
(
2
));
resultGrid
.
setCellValue
(
item
,
'thisSettlementTax'
,
thisSettlementTax
)
}
loadChange
(
grid
,
e
,
"thisAmount"
);
}
}
)
},
}
}
...
...
src/main/webapp/HG/CW/HGCW010A.jsp
View file @
c24be753
...
@@ -42,8 +42,10 @@
...
@@ -42,8 +42,10 @@
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算编号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算编号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
<EF:EFColumn
ename=
"taxPoints"
cname=
"税率(%)"
width=
"80"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFComboColumn
ename=
"taxPoints"
cname=
"税率"
width=
"120"
align=
"center"
required=
"true"
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"结算价税合计金额"
hidden=
"true"
/>
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"结算税金"
width=
"120"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"结算税金"
width=
"120"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
data-regex=
"/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-regex=
"/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
...
@@ -52,6 +54,7 @@
...
@@ -52,6 +54,7 @@
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
data-regex=
"/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-regex=
"/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置15位整数和3位小数!"
/>
data-errorprompt=
"请输入数字,该值最大可设置15位整数和3位小数!"
/>
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"结算含税金额"
enable=
"false"
hidden=
"false"
format=
"{0:N3}"
align=
"right"
/>
<EF:EFColumn
ename=
"thisAmount"
cname=
"本次开票金额"
width=
"120"
enable=
"true"
readonly=
"false"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"thisAmount"
cname=
"本次开票金额"
width=
"120"
enable=
"true"
readonly=
"false"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
data-regex=
"/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-regex=
"/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
...
...
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