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
1ffb5e81
Commit
1ffb5e81
authored
Sep 22, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-20 合并结算单问题
parent
2b15d8a1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
ServiceHGCW008.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
+9
-0
HGCW008A.js
src/main/webapp/HG/CW/HGCW008A.js
+13
-5
HGCW008B.js
src/main/webapp/HG/CW/HGCW008B.js
+9
-2
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
View file @
1ffb5e81
...
@@ -188,13 +188,22 @@ public class ServiceHGCW008 extends ServiceBase {
...
@@ -188,13 +188,22 @@ public class ServiceHGCW008 extends ServiceBase {
for
(
Map
resultRow
:
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGCW008
hgcw008
=
new
HGCW008
();
HGCW008
hgcw008
=
new
HGCW008
();
hgcw008
.
fromMap
(
resultRow
);
hgcw008
.
fromMap
(
resultRow
);
List
<
HGCW006
>
hgcw006s
=
DaoBase
.
getInstance
().
query
(
HGCW006
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"contractNumber"
,
hgcw008
.
getContractNumber
());}
});
List
<
HGCW010
>
hgcw010List
=
DaoBase
.
getInstance
().
query
(
HGCW010
.
QUERY
,
List
<
HGCW010
>
hgcw010List
=
DaoBase
.
getInstance
().
query
(
HGCW010
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
new
HashMap
<
String
,
Object
>(){{
put
(
HGCW010
.
FIELD_SETTLEMENT_NUMBER
,
hgcw008
.
getSettlementNumber
());
put
(
HGCW010
.
FIELD_SETTLEMENT_NUMBER
,
hgcw008
.
getSettlementNumber
());
}});
}});
AssertUtils
.
isNotEmpty
(
hgcw010List
,
"结算单["
+
hgcw008
.
getSettlementNumber
()
+
"]已生成销售开票,不能删除!"
);
AssertUtils
.
isNotEmpty
(
hgcw010List
,
"结算单["
+
hgcw008
.
getSettlementNumber
()
+
"]已生成销售开票,不能删除!"
);
if
(
hgcw006s
.
size
()>
0
){
// 反写租赁剩余金额
HGCWTools
.
HgCw006
.
deductionAmount
(
hgcw008
.
getContractNumber
(),
hgcw008
.
getThisPriceTax
().
negate
());
}
else
{
// 反写金额
// 反写金额
HGCWTools
.
HgCw008
.
remainingAmount
(
hgcw008
.
getContractNumber
(),
hgcw008
.
getThisPriceTax
().
negate
());
HGCWTools
.
HgCw008
.
remainingAmount
(
hgcw008
.
getContractNumber
(),
hgcw008
.
getThisPriceTax
().
negate
());
}
DaoUtils
.
update
(
HGCW008
.
DELETE
,
hgcw008
);
DaoUtils
.
update
(
HGCW008
.
DELETE
,
hgcw008
);
// 更新累计金额
// 更新累计金额
HGCWTools
.
HgCw008
.
updateCumulativeSettlement
(
hgcw008
.
getContractNumber
());
HGCWTools
.
HgCw008
.
updateCumulativeSettlement
(
hgcw008
.
getContractNumber
());
...
...
src/main/webapp/HG/CW/HGCW008A.js
View file @
1ffb5e81
...
@@ -26,7 +26,9 @@ $(function() {
...
@@ -26,7 +26,9 @@ $(function() {
}
else
{
}
else
{
return
""
;
return
""
;
}
}
}
else
{
}
else
if
(
!
isBlank
(
item
.
totalTaxPrice
)){
return
parseFloat
(
item
.
totalTaxPrice
);
}
else
{
return
parseFloat
(
item
.
totalPrice
);
return
parseFloat
(
item
.
totalPrice
);
}
}
}
}
...
@@ -55,10 +57,14 @@ $(function() {
...
@@ -55,10 +57,14 @@ $(function() {
},
},
onAdd
:
function
(
e
)
{
onAdd
:
function
(
e
)
{
var
contractType
=
$
(
"#contractType"
).
val
();
var
contractType
=
$
(
"#contractType"
).
val
();
if
(
contractType
==
"1"
)
{
if
(
contractType
==
"1"
||
contractType
==
"5"
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'settlementBasis'
]
=
"罚款"
;
item
[
'settlementBasis'
]
=
"罚款"
;
});
});
}
else
if
(
contractType
==
"6"
||
contractType
==
"7"
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'settlementBasis'
]
=
"合同内"
;
});
}
}
},
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
...
@@ -267,8 +273,9 @@ function choiceCallbackFunc(result1, result2, result3) {
...
@@ -267,8 +273,9 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid
.
setCellValue
(
0
,
"thisEngineeringQuantity"
,
item
.
deviceNumber
);
detail1Grid
.
setCellValue
(
0
,
"thisEngineeringQuantity"
,
item
.
deviceNumber
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
deviceName
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
deviceName
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
unitPrice
*
item
.
day
Number
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalPriceIncluding
/
item
.
device
Number
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPrice
.
toFixed
(
2
));
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPrice
.
toFixed
(
2
));
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalPriceIncluding
.
toFixed
(
2
));
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
})
})
...
@@ -325,11 +332,12 @@ function btnSaveFunc() {
...
@@ -325,11 +332,12 @@ function btnSaveFunc() {
fieldValidation
();
fieldValidation
();
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"detail1"
,
"HGCW008"
,
"save"
,
false
,
JSUtils
.
submitGrid
(
"detail1"
,
"HGCW008"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowNewCallback
})
/*JSUtils.submitGridsData("detail1", "HGCW008", "save", false,
function (res) {
function (res) {
parent.windowNewCallback(res);
parent.windowNewCallback(res);
}
}
);
);
*/
}
}
});
});
}
}
...
...
src/main/webapp/HG/CW/HGCW008B.js
View file @
1ffb5e81
...
@@ -23,6 +23,8 @@ $(function() {
...
@@ -23,6 +23,8 @@ $(function() {
}
else
{
}
else
{
return
""
;
return
""
;
}
}
}
else
if
(
!
isBlank
(
item
.
totalTaxPrice
)){
return
parseFloat
(
item
.
totalTaxPrice
);
}
else
{
}
else
{
return
parseFloat
(
item
.
totalTaxPrice
);
return
parseFloat
(
item
.
totalTaxPrice
);
}
}
...
@@ -59,10 +61,14 @@ $(function() {
...
@@ -59,10 +61,14 @@ $(function() {
item
[
'settlementNumber'
]
=
settlementNumber
;
item
[
'settlementNumber'
]
=
settlementNumber
;
});
});
var
contractType
=
$
(
"#contractType"
).
val
();
var
contractType
=
$
(
"#contractType"
).
val
();
if
(
contractType
==
"1"
)
{
if
(
contractType
==
"1"
||
contractType
==
"5"
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'settlementBasis'
]
=
"罚款"
;
item
[
'settlementBasis'
]
=
"罚款"
;
});
});
}
else
if
(
contractType
==
"6"
||
contractType
==
"7"
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'settlementBasis'
]
=
"合同内"
;
});
}
}
},
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
...
@@ -225,8 +231,9 @@ function choiceCallbackFunc(result1, result2) {
...
@@ -225,8 +231,9 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid
.
setCellValue
(
0
,
"thisEngineeringQuantity"
,
item
.
deviceNumber
);
detail1Grid
.
setCellValue
(
0
,
"thisEngineeringQuantity"
,
item
.
deviceNumber
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
deviceName
);
detail1Grid
.
setCellValue
(
0
,
"taskName"
,
item
.
deviceName
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unit"
,
item
.
unit
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
unitPrice
*
item
.
day
Number
);
detail1Grid
.
setCellValue
(
0
,
"unitPrice"
,
item
.
totalPriceIncluding
/
item
.
device
Number
);
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPrice
.
toFixed
(
2
));
detail1Grid
.
setCellValue
(
0
,
"totalPrice"
,
item
.
totalPrice
.
toFixed
(
2
));
detail1Grid
.
setCellValue
(
0
,
"totalTaxPrice"
,
item
.
totalPriceIncluding
.
toFixed
(
2
));
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
setCellValue
(
0
,
"inventoryId"
,
item
.
id
);
detail1Grid
.
refresh
();
detail1Grid
.
refresh
();
})
})
...
...
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