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
63a68ac0
Commit
63a68ac0
authored
Aug 11, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单重为总重除以数量,保存时有提示有数量或重量未填写
parent
3c9a496a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+2
-1
HGSC009A.js
src/main/webapp/HG/SC/HGSC009A.js
+13
-6
HGSC009A.jsp
src/main/webapp/HG/SC/HGSC009A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
63a68ac0
...
...
@@ -126,7 +126,8 @@ public class ServiceHGSC009A extends ServiceBase {
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGSC009A
hgsc009A
=
new
HGSC009A
();
hgsc009A
.
fromMap
(
resultRows
.
get
(
i
));
//AssertUtils.isNull(hgsc009A.s(), "是否启用不能为空");
AssertUtils
.
isTrue
(
hgsc009A
.
getGrossAmount
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"重量不能小于等于0"
);
AssertUtils
.
isTrue
(
hgsc009A
.
getQuantity
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"数量不能小于等于0"
);
}
}
...
...
src/main/webapp/HG/SC/HGSC009A.js
View file @
63a68ac0
...
...
@@ -63,17 +63,24 @@ $(function () {
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
//数量发生变化进行计算
if
(
e
.
field
===
"quantity"
){
if
(
e
.
items
[
0
].
singleWeigh
t
!=
null
){
let
grossAmount
=
e
.
items
[
0
].
quantity
*
e
.
items
[
0
].
singleWeight
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'
grossAmount'
,
grossAmoun
t
);
if
(
e
.
items
[
0
].
grossAmoun
t
!=
null
){
let
singleWeight
=
e
.
items
[
0
].
grossAmount
/
e
.
items
[
0
].
quantity
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'
singleWeight'
,
singleWeigh
t
);
}
}
if
(
e
.
field
===
"singleWeight"
){
//数量总重发生变化
if
(
e
.
field
===
"grossAmount"
){
if
(
e
.
items
[
0
].
quantity
!=
null
){
let
grossAmount
=
e
.
items
[
0
].
quantity
*
e
.
items
[
0
].
singleWeight
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'
grossAmount'
,
grossAmoun
t
);
let
singleWeight
=
e
.
items
[
0
].
grossAmount
/
e
.
items
[
0
].
quantity
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'
singleWeight'
,
singleWeigh
t
);
}
}
// if(e.field === "singleWeight"){
// if(e.items[0].quantity != null){
// let grossAmount = e.items[0].quantity * e.items[0].singleWeight;
// resultGrid.setCellValue(e.items[0], 'grossAmount', grossAmount);
// }
// }
if
(
e
.
field
===
"inventCode"
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlockId
.
length
;
i
++
)
{
if
(
inventRecordBoxBlockId
[
i
][
'valueField'
]
===
e
.
items
[
0
].
inventCode
)
{
...
...
src/main/webapp/HG/SC/HGSC009A.jsp
View file @
63a68ac0
...
...
@@ -60,7 +60,7 @@
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
enable=
"false"
/>
<EF:EFColumn
ename=
"grossAmount"
cname=
"总重(KG)"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"grossAmount"
cname=
"总重(KG)"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
...
...
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