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
8557429b
Commit
8557429b
authored
Jun 19, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-19 优化其它入库和其它出库功能
parent
c469a33b
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
124 additions
and
58 deletions
+124
-58
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+4
-4
ServiceHGKC006.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
+5
-4
ServiceHGKC012.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC012.java
+1
-1
HGPZ004.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ004.xml
+1
-0
HGPZ005.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
+8
-1
HGPZ007.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ007.xml
+1
-0
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+5
-6
HGKC006A.js
src/main/webapp/HG/KC/HGKC006A.js
+18
-10
HGKC006A.jsp
src/main/webapp/HG/KC/HGKC006A.jsp
+2
-2
HGKC007A.js
src/main/webapp/HG/KC/HGKC007A.js
+15
-13
HGKC007A.jsp
src/main/webapp/HG/KC/HGKC007A.jsp
+2
-2
HGPZ005.js
src/main/webapp/HG/PZ/HGPZ005.js
+1
-1
HGPZ005.jsp
src/main/webapp/HG/PZ/HGPZ005.jsp
+1
-1
HGPZ010.js
src/main/webapp/HG/PZ/HGPZ010.js
+56
-8
HGPZ010.jsp
src/main/webapp/HG/PZ/HGPZ010.jsp
+4
-5
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
8557429b
...
...
@@ -70,7 +70,7 @@ public enum DdynamicEnum {
* 用途:存货类型下拉框 (不默认状态)
* 编写:
*/
INVENT_TYPE_BOX_BLOCK_ID
(
"invent_type_box_block_id"
,
"inventType"
,
"inventTypeName"
,
"status"
,
"HGPZ004.queryInventTypeBox"
),
INVENT_TYPE_BOX_BLOCK_ID
(
"invent_type_box_block_id"
,
"inventType"
,
"inventTypeName"
,
"status"
,
"
parInventType"
,
"
HGPZ004.queryInventTypeBox"
),
/**
* 模块:存货类型
...
...
@@ -84,14 +84,14 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框
* 编写:
*/
INVENT_RECORD_BLOCK_ID
(
"invent_record_block_id"
,
"inventCode"
,
"inventName"
,
"HGPZ005.queryComboBox"
),
INVENT_RECORD_BLOCK_ID
(
"invent_record_block_id"
,
"inventCode"
,
"inventName"
,
"
inventType"
,
"spec"
,
"
HGPZ005.queryComboBox"
),
/**
* 模块:存货档案
* 用途:存货档案下拉框 (不默认状态)
* 编写:
*/
INVENT_RECORD_BOX_BLOCK_ID
(
"invent_record_box_block_id"
,
"inventCode"
,
"inventName"
,
"status"
,
"HGPZ005.queryInventCodeBox"
),
INVENT_RECORD_BOX_BLOCK_ID
(
"invent_record_box_block_id"
,
"inventCode"
,
"inventName"
,
"status"
,
"
id"
,
"inventType"
,
"spec"
,
"material"
,
"unit"
,
"
HGPZ005.queryInventCodeBox"
),
/**
* 模块:存货档案
...
...
@@ -189,7 +189,7 @@ public enum DdynamicEnum {
* 用途:仓库档案下拉框 不默认状态
* 编写:
*/
WH_CODE_BLOCK_ID
(
"wh_code_block_id"
,
"whCode"
,
"whName"
,
"status"
,
"HGPZ007.queryWhCodeBox"
),
WH_CODE_BLOCK_ID
(
"wh_code_block_id"
,
"whCode"
,
"whName"
,
"status"
,
"whType"
,
"HGPZ007.queryWhCodeBox"
),
/**
* 模块:厂区管理
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
View file @
8557429b
...
...
@@ -183,10 +183,11 @@ public class ServiceHGKC006 extends ServiceBase {
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"提交成功!"
);
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"提交失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"提交失败!"
,
e
.
getMessage
());
//eiInfo.setStatus(EiConstant.STATUS_FAILURE);
//eiInfo.setMsg("提交失败,原因参见详细错误描述!");
//eiInfo.setDetailMsg(e.getMessage());
LogUtils
.
setDetailMsg
(
eiInfo
,
e
,
"提交失败"
);
//logError("提交失败!", e.getMessage());
return
eiInfo
;
}
return
eiInfo
;
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC012.java
View file @
8557429b
...
...
@@ -26,7 +26,7 @@ public class ServiceHGKC012 extends ServiceEPBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
inInfo
=
super
.
query
(
inInfo
,
HGKC012
.
QUERY
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
//
queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_BLOCK_ID
),
null
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
,
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ004.xml
View file @
8557429b
...
...
@@ -232,6 +232,7 @@
SELECT DISTINCT
INVENT_TYPE as "inventType",
INVENT_TYPE_NAME as "inventTypeName",
PAR_INVENT_TYPE as "parInventType",
STATUS AS "status"
FROM ${hggpSchema}.HGPZ004
WHERE DELETE_FLAG = 0
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
View file @
8557429b
...
...
@@ -299,8 +299,10 @@
<select
id=
"queryComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
INVENT_NAME as "inventName",
SPEC as "spec"
<!-- 规格 -->
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
AND STATUS=1
...
...
@@ -317,6 +319,11 @@
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName",
ID as "id",
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
SPEC as "spec",
<!-- 规格 -->
MATERIAL as "material",
<!-- 材质 -->
UNIT as "unit",
STATUS as "status"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ007.xml
View file @
8557429b
...
...
@@ -243,6 +243,7 @@
SELECT DISTINCT
WH_CODE as "whCode",
WH_NAME as "whName",
WH_TYPE as "whType",
STATUS as "status"
FROM ${hggpSchema}.HGPZ007
WHERE DELETE_FLAG = 0
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
8557429b
...
...
@@ -31,10 +31,7 @@ import org.apache.commons.collections.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -589,8 +586,10 @@ public class HGPZTools {
* @param list
*/
public
static
void
add
(
List
<
Map
>
list
){
List
<
HGPZ004
>
hgpz004s
=
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
new
HashMap
<>());
Map
parmap
=
hgpz004s
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ004:
:
getInventTypeName
,
HGPZ004:
:
getInventType
,(
v1
,
v2
)
->
v1
));
List
<
HGPZ004
>
hgpz004s
=
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGPZ004
.
FIELD_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
}});
Map
parmap
=
hgpz004s
.
stream
().
filter
(
item
->
!
Objects
.
equals
(
item
.
getParInventType
(),
"root"
)).
collect
(
Collectors
.
toMap
(
HGPZ004:
:
getInventTypeName
,
HGPZ004:
:
getInventType
,(
v1
,
v2
)
->
v2
));
for
(
Map
map:
list
)
{
String
inventType
=
MapUtils
.
getString
(
parmap
,
StringUtils
.
trimToEmpty
(
map
.
get
(
HGPZ005
.
FIELD_INVENT_TYPE
).
toString
()));
AssertUtils
.
isEmpty
(
inventType
,
String
.
format
(
"存货类型[%s]代码不存在,添加失败!"
,
inventType
));
...
...
src/main/webapp/HG/KC/HGKC006A.js
View file @
8557429b
...
...
@@ -37,9 +37,9 @@ $(function () {
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#
[#:param2Field#]
"
,
valueTemplate
:
"[#:valueField#]#:textField#
[#:param2Field#]
"
,
template
:
"[#:valueField#]#:textField#
[#:param2Field#]
"
,
filter
:
"contains"
});
}
...
...
@@ -77,7 +77,10 @@ $(function () {
{
field
:
"invQty"
,
template
:
function
(
item
)
{
if
(
Number
(
item
.
invQty
)
>
0
){
calUnitWeight
(
item
,
item
.
partLength
,
item
.
partWidth
,
item
.
partThick
,
item
.
partCoefficient
);
}
return
item
.
invQty
==
0
?
"-"
:
item
.
invQty
;
}
},
...
...
@@ -154,7 +157,8 @@ $(function () {
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
,
'inventType'
,
inventRecordBoxBlocks
[
i
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
]);
}
}
let
specInInfo
=
new
EiInfo
();
...
...
@@ -167,15 +171,17 @@ $(function () {
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
specBoxBlocks
[
0
][
'param5Field'
]);
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
specBoxBlocks
[
0
][
'valueField'
]);
resultGrid
.
setCellValue
(
item
,
'partLength'
,
specBoxBlocks
[
0
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
specBoxBlocks
[
0
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'partThick'
,
specBoxBlocks
[
0
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'partCoefficient'
,
specBoxBlocks
[
0
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
loadChange
(
grid
,
e
,
"partSpec"
);
calUnitWeight
(
item
,
item
.
partLength
,
item
.
partWidth
,
item
.
partThick
,
item
.
partCoefficient
);
loadChange
(
grid
,
e
,
"invQty"
);
}
if
(
e
.
field
==
"partSpec"
)
{
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
...
...
@@ -241,6 +247,8 @@ let calUnitWeight = function (item,length,width,thick,coefficient) {
let
amount
=
length
*
width
*
thick
*
coefficient
/
1000000
;
//item['amount'] = amount.toString();
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
amount
);
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
item
.
invQty
*
amount
);
}
}
/**
...
...
src/main/webapp/HG/KC/HGKC006A.jsp
View file @
8557429b
...
...
@@ -43,8 +43,8 @@
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"
1
20"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"1
2
0"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"
2
20"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"1
6
0"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
enable=
"true"
/>
<EF:EFColumn
ename=
"partSpecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"存货档案id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
...
...
src/main/webapp/HG/KC/HGKC007A.js
View file @
8557429b
...
...
@@ -19,6 +19,7 @@ $(function () {
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
item
.
inventName
=
inventRecordBoxBlocks
[
i
][
'textField'
];
template
=
inventRecordBoxBlocks
[
i
][
'valueField'
];
}
}
...
...
@@ -35,9 +36,9 @@ $(function () {
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#
[#:param3Field#]
"
,
valueTemplate
:
"[#:valueField#]#:textField#
[#:param3Field#]
"
,
template
:
"[#:valueField#]#:textField#
[#:param3Field#]
"
,
filter
:
"contains"
});
}
...
...
@@ -159,18 +160,19 @@ $(function () {
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
,
'inventType'
,
inventRecordBoxBlocks
[
i
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
]);
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
inventRecordBoxBlocks
[
i
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
inventRecordBoxBlocks
[
i
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'partLength'
,
inventRecordBoxBlocks
[
i
][
'param4Field'
]);
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
inventRecordBoxBlocks
[
i
][
'param5Field'
]);
resultGrid
.
setCellValue
(
item
,
'partThick'
,
inventRecordBoxBlocks
[
i
][
'param6Field'
]);
resultGrid
.
setCellValue
(
item
,
'invQty'
,
inventRecordBoxBlocks
[
i
][
'param7Field'
]);
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
inventRecordBoxBlocks
[
i
][
'param8Field'
]);
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
inventRecordBoxBlocks
[
i
][
'param9Field'
]);
}
}
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
loadChange
(
grid
,
e
,
"partSpec"
);
loadChange
(
grid
,
e
,
"price"
);
}
if
(
e
.
field
==
"partSpec"
)
{
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
...
...
src/main/webapp/HG/KC/HGKC007A.jsp
View file @
8557429b
...
...
@@ -35,8 +35,8 @@
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"
1
20"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"1
2
0"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"
2
20"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"1
6
0"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"规格"
width=
"120"
align=
"center"
enable=
"true"
required=
"true"
/>
<EF:EFColumn
ename=
"partSpecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
...
...
src/main/webapp/HG/PZ/HGPZ005.js
View file @
8557429b
...
...
@@ -30,7 +30,7 @@ $(function() {
field
:
"inventType"
,
filter
:
function
(
options
)
{
return
_
.
filter
(
inventTypeBox
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
"true"
;
return
item
[
"param1Field"
]
==
"true"
&&
item
[
"param2Field"
]
!=
"root"
;
})
},
editor
:
function
(
container
,
options
)
{
...
...
src/main/webapp/HG/PZ/HGPZ005.jsp
View file @
8557429b
...
...
@@ -26,7 +26,7 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"160"
align=
"center"
/>
<EF:EFColumn
cname=
"存货编码"
ename=
"inventCode"
width=
"140"
align=
"center"
enable=
"true"
readonly=
"true"
/>
<EF:EFColumn
cname=
"存货编码"
ename=
"inventCode"
width=
"140"
align=
"center"
enable=
"true"
re
quired=
"true"
re
adonly=
"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"
...
...
src/main/webapp/HG/PZ/HGPZ010.js
View file @
8557429b
...
...
@@ -70,6 +70,8 @@ $(function() {
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
InventNameGlobalData
.
length
;
i
++
)
{
if
(
InventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
dataItem
[
'material'
]
=
InventNameGlobalData
[
i
][
'param5Field'
];
dataItem
[
'unit'
]
=
InventNameGlobalData
[
i
][
'param6Field'
];
return
InventNameGlobalData
[
i
][
'textField'
];
}
}
...
...
@@ -80,10 +82,36 @@ $(function() {
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"query
Combo
Box"
);
inInfo
.
set
(
"blockId"
,
"invent_record_block_id"
);
inInfo
.
set
(
"methodName"
,
"query
InventCode
Box"
);
inInfo
.
set
(
"blockId"
,
"invent_record_b
ox_b
lock_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
//refreshSelect(container, inInfo);
let
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
let
cellIndex
=
grid
.
cellIndex
(
container
);
let
input
=
$
(
'<input />'
);
let
field
=
inInfo
.
get
(
"field"
);
input
.
attr
(
"name"
,
field
);
input
.
attr
(
"id"
,
field
);
input
.
appendTo
(
container
);
let
dataSource
;
let
serviceName
=
inInfo
.
get
(
"serviceName"
);
let
methodName
=
inInfo
.
get
(
"methodName"
);
let
blockId
=
inInfo
.
get
(
"blockId"
);
EiCommunicator
.
send
(
serviceName
,
methodName
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
blockId
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#-#=param4Field#"
,
filter
:
"contains"
});
}
},{
field
:
"inventRecordId"
,
...
...
@@ -98,7 +126,7 @@ $(function() {
return
inventAllGlobalData
[
i
][
'textField'
];
}
}
return
""
;
return
dataItem
[
"inventRecordId"
]
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
...
...
@@ -117,7 +145,7 @@ $(function() {
return
inventAllGlobalData
[
i
][
'param1Field'
];
}
}
return
""
;
return
dataItem
[
"material"
]
;
}
},
{
field
:
"unit"
,
...
...
@@ -127,7 +155,7 @@ $(function() {
return
inventAllGlobalData
[
i
][
'param2Field'
];
}
}
return
""
;
return
dataItem
[
"unit"
]
;
}
},{
field
:
"createdName"
,
...
...
@@ -145,7 +173,27 @@ $(function() {
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
if
(
e
.
field
===
"inventCode"
){
loadChange
(
grid
,
e
,
"inventRecordId"
);
let
item
=
e
.
items
[
0
];
for
(
let
i
=
0
;
i
<
InventNameGlobalData
.
length
;
i
++
)
{
if
(
InventNameGlobalData
[
i
][
'valueField'
]
===
item
[
'inventCode'
])
{
resultGrid
.
setCellValue
(
item
,
'inventType'
,
InventNameGlobalData
[
i
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventRecordId'
,
InventNameGlobalData
[
i
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventName'
,
InventNameGlobalData
[
i
][
'textField'
]);
resultGrid
.
setCellValue
(
item
,
'material'
,
InventNameGlobalData
[
i
][
'param5Field'
]);
resultGrid
.
setCellValue
(
item
,
'unit'
,
InventNameGlobalData
[
i
][
'param6Field'
]);
}
}
loadChange
(
grid
,
e
,
"warnNum"
);
}
else
if
(
e
.
field
===
"whCode"
){
let
item
=
e
.
items
[
0
];
for
(
let
i
=
0
;
i
<
WhNameGlobalData
.
length
;
i
++
)
{
if
(
WhNameGlobalData
[
i
][
'valueField'
]
===
item
.
whCode
)
{
resultGrid
.
setCellValue
(
item
,
'whType'
,
WhNameGlobalData
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'whName'
,
WhNameGlobalData
[
i
][
'textField'
])
}
}
loadChange
(
grid
,
e
,
"inventCode"
);
}
else
if
(
e
.
field
==
"inventRecordId"
)
{
var
tr
,
index
;
...
...
@@ -231,7 +279,7 @@ let initInvent = function () {
*/
let
initSpec
=
function
()
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventTypes"
,
[
1
,
2
]);
//
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInventBoxAll"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
...
...
src/main/webapp/HG/PZ/HGPZ010.jsp
View file @
8557429b
...
...
@@ -34,17 +34,16 @@
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"
12
0"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"
20
0"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"warnNum"
cname=
"预警值"
width=
"100"
align=
"right"
format=
"{0:N3}"
maxLength=
"20"
required=
"true"
/>
<EF:EFColumn
ename=
"warnNum"
cname=
"预警值"
width=
"100"
align=
"right"
format=
"{0:N3}"
maxLength=
"20"
required=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"1
0
0"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"1
2
0"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时刻"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
<EF:EFColumn
ename=
"updatedName"
cname=
"修改人"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"updatedName"
cname=
"修改人"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"updatedTime"
cname=
"修改时间"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
</EF:EFGrid>
...
...
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