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
670e2dcf
Commit
670e2dcf
authored
Jun 05, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分BUG处理:账期维护、合同管理金额自动计算
parent
cb2d4d4f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
4 deletions
+155
-4
ServiceHGCW001.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW001.java
+2
-0
HGCW001.js
src/main/webapp/HG/CW/HGCW001.js
+9
-2
HGCW002A.js
src/main/webapp/HG/CW/HGCW002A.js
+72
-1
HGCW002B.js
src/main/webapp/HG/CW/HGCW002B.js
+72
-1
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW001.java
View file @
670e2dcf
...
...
@@ -71,6 +71,8 @@ public class ServiceHGCW001 extends ServiceBase {
HGCW001
HGCW001
=
new
HGCW001
();
HGCW001
.
fromMap
(
resultRows
.
get
(
i
));
HGCW001
.
setAccountPeriod
(
DateUtils
.
formatShort
(
HGCW001
.
getAccountPeriod
()));
HGCW001
.
setAccountPeriodDateStart
(
DateUtils
.
formatShort
(
HGCW001
.
getAccountPeriodDateStart
()));
HGCW001
.
setAccountPeriodDateEnd
(
DateUtils
.
formatShort
(
HGCW001
.
getAccountPeriodDateEnd
()));
if
(
HGCW001
.
getId
()
==
null
||
HGCW001
.
getId
()
==
0
)
{
this
.
add
(
HGCW001
);
}
else
{
...
...
src/main/webapp/HG/CW/HGCW001.js
View file @
670e2dcf
...
...
@@ -71,8 +71,8 @@ function saveFunc() {
let
companyCode
=
item
.
get
(
"companyCode"
);
let
accountYear
=
item
.
get
(
"accountYear"
);
let
accountPeriod
=
item
.
get
(
"accountPeriod"
);
let
accountPeriodDateStart
=
item
.
get
(
"accountPeriod
Status
"
);
let
accountPeriodDateEnd
=
item
.
get
(
"accountPeriod
Status
"
);
let
accountPeriodDateStart
=
item
.
get
(
"accountPeriod
DateStart
"
);
let
accountPeriodDateEnd
=
item
.
get
(
"accountPeriod
DateEnd
"
);
if
(
isBlank
(
companyCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
公司名称
\"
,不能为空!"
);
...
...
@@ -99,6 +99,13 @@ function saveFunc() {
flag
=
false
;
return
false
;
}
if
(
accountPeriodDateStart
>
accountPeriodDateEnd
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
账期开始日期
\"
不能大于
\"
账期结束日期
\"
!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/CW/HGCW002A.js
View file @
670e2dcf
...
...
@@ -108,7 +108,43 @@ $(function() {
$
(
"#result-0-mainContractNumber"
).
val
(
""
);
}
}
},
"result-0-taxPoints"
:
{
// 点击下拉选项时触发
select
:
function
(
e
)
{
//获取勾选值
var
allRows
=
detail1Grid
.
getDataItems
();
if
(
allRows
.
length
>
0
)
{
var
dataItem
=
e
.
dataItem
;
var
valueField
=
dataItem
[
'valueField'
];
if
(
valueField
)
{
var
taxPoints
=
valueField
/
100
;
var
totalContractPriceIncluding
=
0
;
var
valueAddedTax
=
0
;
//更新表格含税金额
for
(
var
i
=
0
;
i
<
allRows
.
length
;
i
++
)
{
var
row
=
allRows
[
i
];
var
totalPriceIncluding
=
row
.
totalPriceExcluding
*
(
1
+
parseFloat
(
taxPoints
));
detail1Grid
.
setCellValue
(
row
,
'totalPriceIncluding'
,
totalPriceIncluding
);
totalContractPriceIncluding
+=
totalPriceIncluding
;
}
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalContractPriceIncluding
.
toFixed
(
3
))
var
totalPriceExcluding
=
$
(
"#result-0-totalContractPriceExcluding"
).
val
();
valueAddedTax
=
parseFloat
(
totalContractPriceIncluding
.
toFixed
(
3
))
-
parseFloat
(
totalPriceExcluding
);
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
}
else
{
var
totalContractPriceExcluding
=
0
;
var
valueAddedTax
=
0
;
for
(
var
i
=
0
;
i
<
allRows
.
length
;
i
++
)
{
var
row
=
allRows
[
i
];
detail1Grid
.
setCellValue
(
row
,
'totalPriceIncluding'
,
row
.
totalPriceExcluding
);
totalContractPriceExcluding
+=
parseFloat
(
row
.
totalPriceExcluding
);
}
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalContractPriceExcluding
.
toFixed
(
3
))
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
}
}
}
},
}
IPLATUI
.
EFPopupInput
=
{
...
...
@@ -359,6 +395,41 @@ function fieldValidation() {
return
;
}
}
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
if
(
isBlank
(
projCode
))
{
message
(
"请选择项目!"
);
return
;
}
var
contractName
=
$
(
"#result-0-contractName"
).
val
();
if
(
isBlank
(
contractName
))
{
message
(
"请填写合同名称!"
);
return
;
}
var
partyA
=
$
(
"#result-0-partyA"
).
val
();
if
(
isBlank
(
partyA
))
{
message
(
"请选择甲方!"
);
return
;
}
var
planStartDate
=
$
(
"#result-0-planStartDate"
).
val
();
if
(
isBlank
(
planStartDate
))
{
message
(
"请选择计划开工日期!"
);
return
;
}
var
planEndDate
=
$
(
"#result-0-planEndDate"
).
val
();
if
(
isBlank
(
planEndDate
))
{
message
(
"请选择计划竣工日期!"
);
return
;
}
var
engineeringAddress
=
$
(
"#result-0-engineeringAddress"
).
val
();
if
(
isBlank
(
engineeringAddress
))
{
message
(
"请填写工程地址!"
);
return
;
}
var
contractContent
=
$
(
"#result-0-engineeringAddress"
).
val
();
if
(
isBlank
(
contractContent
))
{
message
(
"请填写合同内容!"
);
return
;
}
}
function
calculateAmount
(
item
)
{
...
...
src/main/webapp/HG/CW/HGCW002B.js
View file @
670e2dcf
...
...
@@ -119,7 +119,43 @@ $(function() {
$
(
"#result-0-partyA"
).
val
(
""
);
$
(
"#result-0-partyB"
).
val
(
""
);
}
}
},
"result-0-taxPoints"
:
{
// 点击下拉选项时触发
select
:
function
(
e
)
{
//获取勾选值
var
allRows
=
detail1Grid
.
getDataItems
();
if
(
allRows
.
length
>
0
)
{
var
dataItem
=
e
.
dataItem
;
var
valueField
=
dataItem
[
'valueField'
];
if
(
valueField
)
{
var
taxPoints
=
valueField
/
100
;
var
totalContractPriceIncluding
=
0
;
var
valueAddedTax
=
0
;
//更新表格含税金额
for
(
var
i
=
0
;
i
<
allRows
.
length
;
i
++
)
{
var
row
=
allRows
[
i
];
var
totalPriceIncluding
=
row
.
totalPriceExcluding
*
(
1
+
parseFloat
(
taxPoints
));
detail1Grid
.
setCellValue
(
row
,
'totalPriceIncluding'
,
totalPriceIncluding
);
totalContractPriceIncluding
+=
totalPriceIncluding
;
}
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalContractPriceIncluding
.
toFixed
(
3
))
var
totalPriceExcluding
=
$
(
"#result-0-totalContractPriceExcluding"
).
val
();
valueAddedTax
=
parseFloat
(
totalContractPriceIncluding
.
toFixed
(
3
))
-
parseFloat
(
totalPriceExcluding
);
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
}
else
{
var
totalContractPriceExcluding
=
0
;
var
valueAddedTax
=
0
;
for
(
var
i
=
0
;
i
<
allRows
.
length
;
i
++
)
{
var
row
=
allRows
[
i
];
detail1Grid
.
setCellValue
(
row
,
'totalPriceIncluding'
,
row
.
totalPriceExcluding
);
totalContractPriceExcluding
+=
parseFloat
(
row
.
totalPriceExcluding
);
}
$
(
"#result-0-totalContractPriceIncluding"
).
val
(
totalContractPriceExcluding
.
toFixed
(
3
))
$
(
"#result-0-valueAddedTax"
).
val
(
valueAddedTax
.
toFixed
(
3
))
}
}
}
},
}
IPLATUI
.
EFPopupInput
=
{
...
...
@@ -496,5 +532,40 @@ function fieldValidation() {
return
;
}
}
var
projCode
=
$
(
"#result-0-projCode"
).
val
();
if
(
!
projCode
)
{
message
(
"请选择项目!"
);
return
;
}
var
contractName
=
$
(
"#result-0-contractName"
).
val
();
if
(
!
contractName
)
{
message
(
"请填写合同名称!"
);
return
;
}
var
partyA
=
$
(
"#result-0-partyA"
).
val
();
if
(
!
partyA
)
{
message
(
"请选择甲方!"
);
return
;
}
var
planStartDate
=
$
(
"#result-0-planStartDate"
).
val
();
if
(
!
planStartDate
)
{
message
(
"请选择计划开工日期!"
);
return
;
}
var
planEndDate
=
$
(
"#result-0-planEndDate"
).
val
();
if
(
!
planEndDate
)
{
message
(
"请选择计划竣工日期!"
);
return
;
}
var
engineeringAddress
=
$
(
"#result-0-engineeringAddress"
).
val
();
if
(
!
engineeringAddress
)
{
message
(
"请填写工程地址!"
);
return
;
}
var
contractContent
=
$
(
"#result-0-engineeringAddress"
).
val
();
if
(
!
contractContent
)
{
message
(
"请填写合同内容!"
);
return
;
}
}
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