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
4800b392
Commit
4800b392
authored
Jun 17, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产领料树未刷新问题处理
parent
ad50261d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
29 deletions
+50
-29
HGSC004A.js
src/main/webapp/HG/SC/HGSC004A.js
+40
-27
HGSC004A.jsp
src/main/webapp/HG/SC/HGSC004A.jsp
+10
-2
No files found.
src/main/webapp/HG/SC/HGSC004A.js
View file @
4800b392
...
@@ -152,31 +152,6 @@ $(function () {
...
@@ -152,31 +152,6 @@ $(function () {
}
}
},
},
{
{
field
:
"quantity"
,
title
:
"数量"
,
template
:
function
(
item
)
{
if
(
item
.
quantity
&&
item
.
singleWeight
){
let
totalWeight
=
item
.
quantity
*
item
.
singleWeight
;
item
[
'totalWeight'
]
=
totalWeight
;
}
return
item
.
quantity
;
}
},
{
field
:
"singleWeight"
,
title
:
"单重(kg)"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
quantity
&&
item
.
singleWeight
){
let
totalWeight
=
item
.
quantity
*
item
.
singleWeight
;
item
[
'totalWeight'
]
=
totalWeight
.
toString
();
}
template
=
item
.
singleWeight
;
console
.
log
(
item
)
return
template
;
}
},
{
field
:
"productCode"
,
field
:
"productCode"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
""
;
let
template
=
""
;
...
@@ -259,6 +234,7 @@ $(function () {
...
@@ -259,6 +234,7 @@ $(function () {
// 此 grid 对象
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
// 判断父级节点是否发生变化
// 判断父级节点是否发生变化
if
(
e
.
field
==
"productCode"
)
{
if
(
e
.
field
==
"productCode"
)
{
loadChange
(
grid
,
e
,
"productId"
);
loadChange
(
grid
,
e
,
"productId"
);
...
@@ -268,19 +244,36 @@ $(function () {
...
@@ -268,19 +244,36 @@ $(function () {
loadChange
(
grid
,
e
,
"width"
);
loadChange
(
grid
,
e
,
"width"
);
loadChange
(
grid
,
e
,
"thick"
);
loadChange
(
grid
,
e
,
"thick"
);
loadChange
(
grid
,
e
,
"productType"
);
loadChange
(
grid
,
e
,
"productType"
);
// loadChange(grid,e,"quantity");
}
}
if
(
e
.
field
==
"quantity"
)
{
if
(
e
.
field
==
"quantity"
)
{
resultGrid
.
setCellValue
(
item
,
'singleWeight'
,
item
.
singleWeight
);
if
(
item
.
quantity
&&
item
.
singleWeight
){
let
totalWeight
=
item
.
quantity
*
item
.
singleWeight
;
resultGrid
.
setCellValue
(
item
,
'totalWeight'
,
totalWeight
)
}
loadChange
(
grid
,
e
,
"singleWeight"
);
loadChange
(
grid
,
e
,
"singleWeight"
);
loadChange
(
grid
,
e
,
"totalWeight"
);
}
}
if
(
e
.
field
==
"singleWeight"
)
{
if
(
e
.
field
==
"singleWeight"
)
{
if
(
item
.
quantity
&&
item
.
singleWeight
){
let
totalWeight
=
item
.
quantity
*
item
.
singleWeight
;
resultGrid
.
setCellValue
(
item
,
'totalWeight'
,
totalWeight
)
}
loadChange
(
grid
,
e
,
"totalWeight"
);
loadChange
(
grid
,
e
,
"totalWeight"
);
}
}
});
});
},
},
onSuccess
:
function
(
e
)
{
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
){
||
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGSC004A"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
onSuccess
:
function
(
inInfo
)
{
refreshTree
();
}
});
query
();
query
();
}
}
},
},
...
@@ -582,6 +575,26 @@ let save = function (btnNode) {
...
@@ -582,6 +575,26 @@ let save = function (btnNode) {
return
;
return
;
}
}
let
flag
=
true
;
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
productCode
=
item
.
get
(
"productCode"
);
let
quantity
=
item
.
get
(
"quantity"
);
let
singleWeight
=
item
.
get
(
"singleWeight"
);
if
(
isBlank
(
productCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
产品编号
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
quantity
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
数量
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
singleWeight
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
单重(kg)
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
...
...
src/main/webapp/HG/SC/HGSC004A.jsp
View file @
4800b392
...
@@ -58,8 +58,16 @@
...
@@ -58,8 +58,16 @@
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"quantity"
required=
"true"
cname=
"数量"
/>
<EF:EFColumn
ename=
"quantity"
required=
"true"
cname=
"数量"
/>
<EF:EFColumn
ename=
"singleWeight"
required=
"true"
format=
"{0:N3}"
cname=
"单重(kg)"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(kg)"
width=
"100"
enable=
"true"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"totalWeight"
cname=
"总重(kg)"
required=
"true"
format=
"{0:N3}"
enable=
"false"
/>
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"17"
required=
"true"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"总重(kg)"
width=
"100"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"17"
required=
"false"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"productStatus"
width=
"90"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"productStatus"
width=
"90"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
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