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
64bb2fb2
Commit
64bb2fb2
authored
Jun 25, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产领料单与明细根据状态判断字段是否能修改保存
parent
fd0ebcc7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
111 deletions
+47
-111
HGKC008.js
src/main/webapp/HG/KC/HGKC008.js
+26
-13
HGKC008A.js
src/main/webapp/HG/KC/HGKC008A.js
+17
-94
HGKC008A.jsp
src/main/webapp/HG/KC/HGKC008A.jsp
+4
-4
No files found.
src/main/webapp/HG/KC/HGKC008.js
View file @
64bb2fb2
...
...
@@ -43,7 +43,6 @@ $(function (){
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodes
.
length
;
i
++
)
{
if
(
companyCodes
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodes
[
i
][
'textField'
]
return
companyCodes
[
i
][
'textField'
];
}
}
...
...
@@ -56,7 +55,6 @@ $(function (){
if
(
item
.
projCode
){
for
(
let
i
=
0
;
i
<
projCodes
.
length
;
i
++
){
if
(
item
.
projCode
===
projCodes
[
i
][
'valueField'
]){
item
[
'projName'
]
=
projCodes
[
i
][
'textField'
];
template
=
projCodes
[
i
][
'valueField'
];
}
}
...
...
@@ -98,7 +96,6 @@ $(function (){
if
(
item
.
whCode
){
for
(
let
i
=
0
;
i
<
whRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
whCode
===
whRecordBoxBlocks
[
i
][
'valueField'
]){
item
[
'whName'
]
=
whRecordBoxBlocks
[
i
][
'textField'
];
template
=
whRecordBoxBlocks
[
i
][
'valueField'
];
}
}
...
...
@@ -135,25 +132,41 @@ $(function (){
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
// 判断父级节点是否发生变化
if
(
e
.
field
==
"projCode"
)
{
loadChange
(
grid
,
e
,
"projName"
);
for
(
let
i
=
0
;
i
<
projCodes
.
length
;
i
++
)
{
if
(
projCodes
[
i
][
'valueField'
]
===
item
[
'projCode'
]){
resultGrid
.
setCellValue
(
item
,
'projName'
,
projCodes
[
i
][
'textField'
])
}
}
}
if
(
e
.
field
==
"companyCode"
)
{
e
.
items
[
0
].
projCode
=
""
;
e
.
items
[
0
].
projName
=
""
;
e
.
items
[
0
].
whCode
=
""
;
e
.
items
[
0
].
whName
=
""
;
loadChange
(
grid
,
e
,
"projName"
);
loadChange
(
grid
,
e
,
"whCode"
);
loadChange
(
grid
,
e
,
"whName"
);
loadChange
(
grid
,
e
,
"projCode"
);
for
(
let
i
=
0
;
i
<
companyCodes
.
length
;
i
++
)
{
if
(
companyCodes
[
i
][
'valueField'
]
===
item
[
'companyCode'
]){
resultGrid
.
setCellValue
(
item
,
'companyName'
,
companyCodes
[
i
][
'textField'
])
}
}
resultGrid
.
setCellValue
(
item
,
'projName'
,
''
)
resultGrid
.
setCellValue
(
item
,
'whCode'
,
''
)
resultGrid
.
setCellValue
(
item
,
'whName'
,
''
)
resultGrid
.
setCellValue
(
item
,
'projCode'
,
''
)
}
if
(
e
.
field
==
"whCode"
)
{
loadChange
(
grid
,
e
,
"whName"
);
for
(
let
i
=
0
;
i
<
whRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
whCode
===
whRecordBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'whName'
,
whRecordBoxBlocks
[
i
][
'textField'
])
}
}
}
});
},
beforeEdit
:
function
(
e
)
{
let
item
=
e
.
model
;
if
(
item
.
status
!=
'0'
){
e
.
preventDefault
();
}
},
afterEdit
:
function
(
e
)
{
},
onSave
:
function
(
e
)
{
...
...
src/main/webapp/HG/KC/HGKC008A.js
View file @
64bb2fb2
...
...
@@ -19,6 +19,13 @@ $(function (){
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
100
],
},
beforeEdit
:
function
(
e
)
{
var
status
=
$
(
"#inqu_status-0-status"
).
val
();
//如果提交了,则不能修改
if
(
status
&&
status
===
"1"
){
e
.
preventDefault
();
}
},
columns
:
[
{
field
:
"inventCode"
,
...
...
@@ -41,51 +48,7 @@ $(function (){
input
.
kendoDropDownList
({
dataSource
:
inventRecordBoxBlocks
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
filter
:
"contains"
});
}
},
{
field
:
"invSpec"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
invSpec
){
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
invSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
template
=
specBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
;
EiCommunicator
.
send
(
"HGKC010"
,
"querySpecBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"spec_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataTextField
:
"valueField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
...
...
@@ -130,65 +93,25 @@ $(function (){
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
totalWeight
)
}
}
if
(
e
.
field
==
"inventType"
)
{
//选择后,先加载此方法,再加载属性中的方法,所以存货类型加载时,先修改存货编号下拉框的查询
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
item
.
whCode
);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
item
.
companyCode
);
inInfo
.
set
(
"inqu_status-0-inventType"
,
item
.
inventType
);
EiCommunicator
.
send
(
"HGKC010"
,
"queryInventCodeBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventRecordBoxBlocks
=
ei
.
getBlock
(
"invent_code_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
resultGrid
.
setCellValue
(
item
,
'inventCode'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventName'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
loadChange
(
grid
,
e
,
"inventCode"
);
}
if
(
e
.
field
==
"inventCode"
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
])
}
}
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
loadChange
(
grid
,
e
,
"invSpec"
);
}
if
(
e
.
field
==
"invSpec"
)
{
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
invSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'invLength'
,
specBoxBlocks
[
i
][
'param1Field'
])
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
specBoxBlocks
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'invThick'
,
specBoxBlocks
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
specBoxBlocks
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
specBoxBlocks
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
specBoxBlocks
[
i
][
'param7Field'
])
resultGrid
.
setCellValue
(
item
,
'inventType'
,
specBoxBlocks
[
i
][
'param1Field'
])
resultGrid
.
setCellValue
(
item
,
'invSpecId'
,
specBoxBlocks
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'invSpec'
,
specBoxBlocks
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'invLength'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invWidth'
,
specBoxBlocks
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'invThick'
,
specBoxBlocks
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
specBoxBlocks
[
i
][
'param7Field'
])
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
specBoxBlocks
[
i
][
'param8Field'
])
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
specBoxBlocks
[
i
][
'param9Field'
])
}
}
resultGrid
.
setCellValue
(
item
,
'price'
,
""
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
""
)
loadChange
(
grid
,
e
,
"invQty"
);
}
});
},
afterEdit
:
function
(
e
)
{
...
...
src/main/webapp/HG/KC/HGKC008A.jsp
View file @
64bb2fb2
...
...
@@ -31,15 +31,15 @@
<EF:EFColumn
ename=
"receiveId"
cname=
"领料单id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"120"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"120"
align=
"center"
required=
"true"
blockName=
"invent_type_box_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"
true"
enable=
"
false"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"120"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"invSpecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"invSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"invSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"invLength"
cname=
"长度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invWidth"
cname=
"宽度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invThick"
cname=
"厚度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
...
...
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