Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
d34e8f9d
Commit
d34e8f9d
authored
Jan 22, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.生产领料单联动修改
parent
99612115
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
424 additions
and
351 deletions
+424
-351
ServiceHPKC001.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
+4
-14
ServiceHPKC002.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
+78
-47
HPKC001.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
+25
-21
HPKC002.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
+26
-18
HPKC001.js
src/main/webapp/HP/KC/HPKC001.js
+30
-20
HPKC001.jsp
src/main/webapp/HP/KC/HPKC001.jsp
+14
-3
HPKC002.js
src/main/webapp/HP/KC/HPKC002.js
+227
-196
HPKC002.jsp
src/main/webapp/HP/KC/HPKC002.jsp
+20
-32
No files found.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
View file @
d34e8f9d
...
...
@@ -86,7 +86,7 @@ public class ServiceHPKC001 extends ServiceBase {
dao
.
insert
(
"HPKC001.insert"
,
insertEntity
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_
DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_
SUCCESS
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
PlatException
e
)
{
...
...
@@ -97,7 +97,7 @@ public class ServiceHPKC001 extends ServiceBase {
return
inInfo
;
}
return
query
(
inInfo
)
;
return
inInfo
;
}
/**
...
...
@@ -141,7 +141,7 @@ public class ServiceHPKC001 extends ServiceBase {
dao
.
insert
(
"HPKC001.update"
,
updateEntity
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_
DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_
SUCCESS
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
PlatException
e
)
{
...
...
@@ -151,7 +151,7 @@ public class ServiceHPKC001 extends ServiceBase {
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
)
;
return
inInfo
;
}
/**
...
...
@@ -180,14 +180,4 @@ public class ServiceHPKC001 extends ServiceBase {
return
eiInfo
;
}
public
EiInfo
queryMaterialTypeSetName
(
EiInfo
eiInfo
)
{
eiInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
());
return
eiInfo
;
}
public
EiInfo
queryWhCodeSetName
(
EiInfo
eiInfo
)
{
CommonMethod
.
initBlock
(
eiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
return
eiInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
View file @
d34e8f9d
...
...
@@ -2,19 +2,22 @@ package com.baosight.hpjx.hp.kc.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.InventTypeEnun
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC002
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.*
;
/**
* @author YK
...
...
@@ -27,17 +30,17 @@ public class ServiceHPKC002 extends ServiceBase {
*/
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPKC002
HPKC002
=
new
HPKC002
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
HPKC002
);
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
().
clear
(
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD
_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_QUERY
_BLOCK_ID
),
null
);
EiBlock
block
=
outInfo
.
addBlock
(
EiConstant
.
queryBlock
);
block
.
setCell
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
PARAM_WH_CODE
,
outInfo
.
getBlock
(
ACConstants
.
WH_CODE_BLOCK_ID
).
getRow
(
ACConstants
.
ROW_CODE_0
).
get
(
ACConstants
.
FIELD_VALUE
));
block
.
setCell
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
PARAM_WH_CODE
,
outInfo
.
getBlock
(
ACConstants
.
WH_CODE_QUERY_BLOCK_ID
).
getRow
(
ACConstants
.
ROW_CODE_0
).
get
(
ACConstants
.
FIELD_VALUE
)
);
outInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
());
return
out
Info
;
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_QUERY_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME
_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC
_BLOCK_ID
),
null
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC002
().
eiMetadata
);
inInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
()
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
in
Info
;
}
/**
...
...
@@ -61,15 +64,31 @@ public class ServiceHPKC002 extends ServiceBase {
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRowCount
();
i
++)
{
String
documentTime
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
);
if
(
StringUtils
.
isNotBlank
(
documentTime
)){
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
,
StringUtil
.
removeHorizontalLine
(
documentTime
));
}
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"status"
,
1
);
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"approvalStatus"
,
0
);
super
.
insert
(
inInfo
,
"HPKC002.insert"
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
this
.
checkSaveData
(
resultRows
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC002
insertEntity
=
new
HPKC002
();
insertEntity
.
fromMap
(
resultRows
.
get
(
i
));
// 仓库名称
Map
params
=
new
HashMap
<>();
params
.
put
(
"whCode"
,
insertEntity
.
getWhCode
());
List
query
=
dao
.
query
(
"HPPZ007.queryByWhCode"
,
params
);
insertEntity
.
setWhName
(((
HPPZ007
)
query
.
get
(
0
)).
getWhName
());
//物料类型
insertEntity
.
setMaterialTypeName
(
InventTypeEnun
.
getNameByCode
(
insertEntity
.
getMaterialType
()));
// 生成单据号
insertEntity
.
setDocumentCode
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC002_NUMBER
));
// 去除日期字符串中的-
insertEntity
.
setDocumentTime
(
StringUtil
.
removeHorizontalLine
(
insertEntity
.
getDocumentTime
()));
insertEntity
.
setStatus
(
1
);
insertEntity
.
setApprovalStatus
(
0
);
dao
.
insert
(
"HPKC002.insert"
,
insertEntity
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
...
...
@@ -78,30 +97,53 @@ public class ServiceHPKC002 extends ServiceBase {
return
inInfo
;
}
return
query
(
inInfo
);
return
inInfo
;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC002
entity
=
new
HPKC002
();
entity
.
fromMap
(
resultRows
.
get
(
i
));
AssertUtils
.
isEmpty
(
entity
.
getMaterialType
(),
"物料类型不能为空"
);
AssertUtils
.
isEmpty
(
entity
.
getMaterialCode
(),
"物料不能为空"
);
AssertUtils
.
isEmpty
(
entity
.
getWhCode
(),
"仓库不能为空"
);
}
}
/**
* 修改操作.
*/
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
HPKC002
hpkc002
=
new
HPKC002
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpkc002
.
fromMap
(
map
);
String
documentTime
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
);
if
(
StringUtils
.
isNotBlank
(
documentTime
)){
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
,
StringUtil
.
removeHorizontalLine
(
documentTime
));
}
this
.
dao
.
update
(
"HPKC002.update"
,
hpkc002
.
toMap
());
CommonMethod
.
udpateInfo
(
inInfo
,
EiConstant
.
resultBlock
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
this
.
checkSaveData
(
resultRows
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC002
updateEntity
=
new
HPKC002
();
updateEntity
.
fromMap
(
resultRows
.
get
(
i
));
// 仓库名称
Map
params
=
new
HashMap
<>();
params
.
put
(
"whCode"
,
updateEntity
.
getWhCode
());
List
query
=
dao
.
query
(
"HPPZ007.queryByWhCode"
,
params
);
updateEntity
.
setWhName
(((
HPPZ007
)
query
.
get
(
0
)).
getWhName
());
//物料类型
updateEntity
.
setMaterialTypeName
(
InventTypeEnun
.
getNameByCode
(
updateEntity
.
getMaterialType
()));
dao
.
insert
(
"HPKC002.update"
,
updateEntity
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
...
...
@@ -109,7 +151,7 @@ public class ServiceHPKC002 extends ServiceBase {
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
)
;
return
inInfo
;
}
/**
...
...
@@ -137,15 +179,4 @@ public class ServiceHPKC002 extends ServiceBase {
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
}
public
EiInfo
queryMaterialTypeSetName
(
EiInfo
eiInfo
)
{
eiInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
());
return
eiInfo
;
}
public
EiInfo
queryWhCodeSetName
(
EiInfo
eiInfo
)
{
CommonMethod
.
initBlock
(
eiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
return
eiInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
View file @
d34e8f9d
...
...
@@ -2,6 +2,29 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPKC001"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialType"
>
MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialCode"
>
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC001"
>
SELECT
...
...
@@ -32,18 +55,7 @@
CUST_CODE as "custCode",
<!-- 供应商编码 -->
CUST_NAME as "custName"
<!-- 供应商名称 -->
FROM hpjx.t_hpkc001 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
@@ -56,15 +68,7 @@
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpkc001 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
View file @
d34e8f9d
...
...
@@ -2,6 +2,29 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPKC002"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialType"
>
MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialCode"
>
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC002"
>
SELECT
...
...
@@ -32,15 +55,7 @@
CUST_CODE as "custCode",
<!-- 供应商编码 -->
CUST_NAME as "custName"
<!-- 供应商名称 -->
FROM hpjx.t_hpkc002 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
@@ -52,17 +67,10 @@
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
...
...
src/main/webapp/HP/KC/HPKC001.js
View file @
d34e8f9d
...
...
@@ -139,21 +139,37 @@ $(function() {
resultGrid
.
setCellValue
(
editorModel0
,
"unit"
,
""
);
});
$
(
"input[name='materialCode']"
).
on
(
'change'
,
function
(
me
)
{
var
material
Type
=
$
(
"input[name='materialTyp
e']"
).
val
();
var
material
Code
=
$
(
"input[name='materialCod
e']"
).
val
();
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"invent
Type"
,
materialTyp
e
);
EiCommunicator
.
send
(
"HPPZ00
6
"
,
"query"
,
eiInfo
,
{
queryEiInfo
.
set
(
"invent
Code"
,
materialCod
e
);
EiCommunicator
.
send
(
"HPPZ00
4
"
,
"query"
,
eiInfo
,
{
onSuccess
:
function
(
eiInfo
)
{
var
status
=
eiInfo
.
getStatus
();
if
(
status
!=
"-1"
)
{
console
.
log
(
eiInfo
)
var
materialName
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
2
];
var
materialCode
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
3
];
var
spec
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
6
];
var
unit
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
12
];
resultGrid
.
setCellValue
(
e
.
row
,
"materialCode"
,
materialCode
);
var
materialName
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
14
];
resultGrid
.
setCellValue
(
e
.
row
,
"materialName"
,
materialName
);
resultGrid
.
setCellValue
(
e
.
row
,
"unit"
,
unit
);
//清空物料信息
resultGrid
.
setCellValue
(
editorModel0
,
"spec"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"unit"
,
""
);
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
$
(
"input[name='spec']"
).
on
(
'change'
,
function
(
me
)
{
var
spec
=
$
(
"input[name='spec']"
).
val
();
var
materialCode
=
$
(
"input[name='materialCode']"
).
val
();
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"inventCode"
,
materialCode
);
queryEiInfo
.
set
(
"spec"
,
spec
);
EiCommunicator
.
send
(
"HPPZ006"
,
"query"
,
eiInfo
,
{
onSuccess
:
function
(
eiInfo
)
{
var
status
=
eiInfo
.
getStatus
();
if
(
status
!=
"-1"
)
{
console
.
log
(
eiInfo
)
var
unit
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
23
];
resultGrid
.
setCellValue
(
editorModel0
,
"unit"
,
unit
);
}
},
onFail
:
function
(
ei
)
{
}
...
...
@@ -205,15 +221,7 @@ $(function() {
});
});
},
onSuccess
:
function
(
e
)
{
if
(
e
.
type
!=
'read'
)
{
// 新增、修改、删除的时候刷新页面
resultGrid
.
dataSource
.
page
(
1
);
}
showPreview
();
}
};
});
...
...
@@ -225,12 +233,13 @@ $(window).load(function () {
let
eiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
inventNam
eGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
materialCod
eGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
inInfo
,
{
let
speceiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
speceiInfo
,
{
onSuccess
:
function
(
ei
)
{
specGlobalData
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
},
...
...
@@ -238,7 +247,8 @@ $(window).load(function () {
}
},
{
async
:
false
});
EiCommunicator
.
send
(
"HPPZ007"
,
"queryComboBox"
,
inInfo
,
{
let
wheiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ007"
,
"queryComboBox"
,
wheiInfo
,
{
onSuccess
:
function
(
ei
)
{
whCodeGlobalData
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
},
...
...
src/main/webapp/HP/KC/HPKC001.jsp
View file @
d34e8f9d
...
...
@@ -11,6 +11,10 @@
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"inqu_status-0-documentTime"
cname=
"单据日期"
format=
"yyyy-MM-dd"
required=
"true"
/>
<EF:EFInput
ename=
"inqu_status-0-documentCode"
cname=
"采购入库单号"
colWidth=
"4"
readonly=
"false"
/>
<EF:EFSelect
cname=
"物料类型"
blockId=
"inqu_status"
ename=
"materialType"
row=
"0"
colWidth=
"3"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
valueTemplate=
"#=textField#"
filter=
"contains"
required=
"false"
defultValue=
"ALL"
...
...
@@ -18,6 +22,13 @@
<EF:EFOption
label=
"请选择"
value=
""
></EF:EFOption>
<EF:EFOptions
blockId=
"whName_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-materialCode"
cname=
"物料名称"
valueTemplate=
"#=textField#"
filter=
"contains"
required=
"false"
defultValue=
"ALL"
template=
"#=textField#"
>
<EF:EFOption
label=
"请选择"
value=
""
></EF:EFOption>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
...
...
@@ -31,10 +42,10 @@
</EF:EFComboColumn>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
width=
"100"
readonly=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"materialCode"
cname=
"物料编码"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
enable=
"false"
hidden=
"true"
required=
"true"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
width=
"80"
readonly=
"false"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialCode"
cname=
"物料名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
width=
"120"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
width=
"80"
readonly=
"false"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"数量"
width=
"80"
defaultValue=
"0"
data-regex=
"/^[0-9]\\\d*$/"
data-errorprompt=
"请输入正整数"
readonly=
"false"
align=
"right"
required=
"true"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
defaultValue=
"0"
data-rules=
"number"
maxLength=
"20"
width=
"100"
align=
"right"
readonly=
"false"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
width=
"100"
readonly=
"false"
/>
...
...
src/main/webapp/HP/KC/HPKC002.js
View file @
d34e8f9d
let
materialCodeGlobalData
=
[];
let
whCodeGlobalData
=
[];
let
specGlobalData
=
[];
$
(
function
()
{
var
editorModel0
=
''
;
var
eiInfo
=
new
EiInfo
();
var
globalData
=
[];
var
day1
=
new
Date
();
day1
.
setTime
(
day1
.
getTime
());
var
s1
=
day1
.
getFullYear
()
+
"-"
+
(
day1
.
getMonth
()
+
1
)
+
"-"
+
day1
.
getDate
();
$
(
"#inqu_status-0-receiptDate"
).
val
(
s1
);
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
// 点击查询按钮,从第1页开始查询
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[
{
field
:
"materialCode"
,
// template: function(dataItem) {
// for (var i = 0 ; i < globalData.length ; i++) {
// if ( globalData[i]['valueField'] === dataItem['materialCode']) {
// return globalData[i]['textField'];
// }
// }
// return "";
// },
editor
:
function
(
container
,
options
)
{
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
var
cellIndex
=
grid
.
cellIndex
(
container
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"materialType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
globalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
},
}
],
onRowClick
:
function
(
e
)
{
editorModel0
=
e
.
row
;
$
(
"input[name='whCode']"
).
on
(
'change'
,
function
(
me
)
{
var
whCode
=
$
(
"input[name='whCode']"
).
val
();
var
whCodeData
;
EiCommunicator
.
send
(
"HPKC001"
,
"queryWhCodeSetName"
,
eiInfo
,
{
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
columns
:
[
{
field
:
"materialCode"
,
template
:
function
(
dataItem
)
{
for
(
var
i
=
0
;
i
<
materialCodeGlobalData
.
length
;
i
++
)
{
if
(
materialCodeGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'materialCode'
])
{
return
materialCodeGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
var
cellIndex
=
grid
.
cellIndex
(
container
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"materialType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
var
queryData
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
whCodeData
=
queryData
;
whCodeData
.
forEach
(
title
=>
{
if
(
title
.
valueField
==
whCode
){
var
valueField
=
title
.
textField
.
substring
(
title
.
textField
.
lastIndexOf
(
'-'
)
+
1
);
resultGrid
.
setCellValue
(
editorModel0
,
"whName"
,
valueField
);
}
})
dataSource
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
materialCodeGlobalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
$
(
"input[name='materialType']"
).
on
(
'change'
,
function
(
me
)
{
var
materialType
=
$
(
"input[name='materialType']"
).
val
();
var
materialTypeData
;
EiCommunicator
.
send
(
"HPKC001"
,
"queryMaterialTypeSetName"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
var
queryData
=
ei
.
getBlock
(
"customer_type_block_id"
).
getMappedRows
();
materialTypeData
=
queryData
;
materialTypeData
.
forEach
(
title
=>
{
if
(
title
.
textField
==
materialType
){
resultGrid
.
setCellValue
(
editorModel0
,
"materialTypeName"
,
title
.
valueField
);
}
})
},
onFail
:
function
(
ei
)
{
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
},
},
{
field
:
"whCode"
,
template
:
function
(
dataItem
)
{
for
(
var
i
=
0
;
i
<
whCodeGlobalData
.
length
;
i
++
)
{
if
(
whCodeGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'whCode'
])
{
return
whCodeGlobalData
[
i
][
'textField'
];
}
},
{
async
:
false
});
//清空物料信息
resultGrid
.
setCellValue
(
editorModel0
,
"materialName"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"materialCode"
,
""
);
});
$
(
"input[name='materialCode']"
).
on
(
'change'
,
function
(
me
)
{
var
materialCode
=
$
(
"input[name='materialCode']"
).
val
();
var
materialType
=
$
(
"input[name='materialType']"
).
val
();
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"inventType"
,
materialType
);
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
var
whEiInfo
=
new
EiInfo
();
whEiInfo
.
set
(
"whType"
,
options
.
model
[
"materialType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ00
4"
,
"queryComboBox"
,
e
iInfo
,
{
EiCommunicator
.
send
(
"HPPZ00
7"
,
"queryComboBox"
,
whE
iInfo
,
{
onSuccess
:
function
(
ei
)
{
var
queryData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
dataSource
=
queryData
;
dataSource
.
forEach
(
title
=>
{
if
(
title
.
valueField
==
materialCode
){
var
valueField
=
title
.
textField
.
substring
(
title
.
textField
.
lastIndexOf
(
'-'
)
+
1
);
resultGrid
.
setCellValue
(
editorModel0
,
"materialName"
,
valueField
);
}
})
dataSource
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
whCodeGlobalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
},
},
loadComplete
:
function
(
grid
)
{
// 新增
$
(
"#BTN_INSERT"
).
on
(
"click"
,
function
()
{
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
IPLAT
.
submitNode
(
$
(
"#HPKC002"
),
"HPKC002"
,
"insert"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
NotificationUtil
({
msg
:
'新增成功'
});
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
:
function
(
ei
)
{
// onFail 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
{
field
:
"spec"
,
template
:
function
(
dataItem
)
{
for
(
var
i
=
0
;
i
<
specGlobalData
.
length
;
i
++
)
{
if
(
specGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'spec'
])
{
return
specGlobalData
[
i
][
'textField'
];
}
});
});
// 修改
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
function
()
{
var
rowCount
=
resultGrid
.
getCheckedRows
();
// 检验是否选中数据
if
(
rowCount
==
null
||
rowCount
==
""
)
{
NotificationUtil
({
msg
:
'请选择一条或多条数据'
},
"warning"
);
return
false
;
}
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
IPLAT
.
submitNode
(
$
(
"#HPKC002"
),
"HPKC002"
,
"update"
,
{
var
specEiInfo
=
new
EiInfo
();
specEiInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"materialCode"
]);
specEiInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"materialType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
specEiInfo
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'修改成功'
});
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
},
onFail
:
function
(
ei
)
{
// onFail 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
dataSource
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
specGlobalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
},
}
],
onRowClick
:
function
(
e
)
{
editorModel0
=
e
.
row
;
$
(
"input[name='materialType']"
).
on
(
'change'
,
function
(
me
)
{
//清空物料信息
resultGrid
.
setCellValue
(
editorModel0
,
"materialName"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"materialCode"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"whCode"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"whName"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"spec"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"unit"
,
""
);
});
$
(
"input[name='materialCode']"
).
on
(
'change'
,
function
(
me
)
{
var
materialCode
=
$
(
"input[name='materialCode']"
).
val
();
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"inventCode"
,
materialCode
);
EiCommunicator
.
send
(
"HPPZ004"
,
"query"
,
eiInfo
,
{
onSuccess
:
function
(
eiInfo
)
{
var
status
=
eiInfo
.
getStatus
();
if
(
status
!=
"-1"
)
{
console
.
log
(
eiInfo
)
var
materialName
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
14
];
resultGrid
.
setCellValue
(
e
.
row
,
"materialName"
,
materialName
);
//清空物料信息
resultGrid
.
setCellValue
(
editorModel0
,
"spec"
,
""
);
resultGrid
.
setCellValue
(
editorModel0
,
"unit"
,
""
);
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
$
(
"input[name='spec']"
).
on
(
'change'
,
function
(
me
)
{
var
spec
=
$
(
"input[name='spec']"
).
val
();
var
materialCode
=
$
(
"input[name='materialCode']"
).
val
();
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"inventCode"
,
materialCode
);
queryEiInfo
.
set
(
"spec"
,
spec
);
EiCommunicator
.
send
(
"HPPZ006"
,
"query"
,
eiInfo
,
{
onSuccess
:
function
(
eiInfo
)
{
var
status
=
eiInfo
.
getStatus
();
if
(
status
!=
"-1"
)
{
console
.
log
(
eiInfo
)
var
unit
=
eiInfo
.
blocks
.
result
.
rows
[
0
][
23
];
resultGrid
.
setCellValue
(
editorModel0
,
"unit"
,
unit
);
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
},
loadComplete
:
function
(
grid
)
{
//删除
$
(
"#DELETE"
).
on
(
"click"
,
function
()
{
});
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
var
dataItems
=
resultGrid
.
getCheckedRows
();
if
(
dataItems
==
null
||
dataItems
==
""
)
{
NotificationUtil
({
msg
:
'选择要删除的数据'
},
"warning"
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
return
false
;
}
IPLAT
.
submitNode
(
$
(
"#HPKC002"
),
"HPKC002"
,
"delete"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'删除成功'
});
//删除
$
(
"#DELETE"
).
on
(
"click"
,
function
()
{
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
}
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
:
function
(
ei
)
{
// onFail
// 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
var
dataItems
=
resultGrid
.
getCheckedRows
();
if
(
dataItems
==
null
||
dataItems
==
""
)
{
NotificationUtil
({
msg
:
'选择要删除的数据'
},
"warning"
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
return
false
;
}
IPLAT
.
submitNode
(
$
(
"#HPKC002"
),
"HPKC002"
,
"delete"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'删除成功'
});
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
},
onFail
:
function
(
ei
)
{
// onFail
// 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
}
});
});
});
}
}
};
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 存货名称
let
eiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
materialCodeGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
let
speceiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
speceiInfo
,
{
onSuccess
:
function
(
ei
)
{
specGlobalData
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
};
let
wheiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ007"
,
"queryComboBox"
,
wheiInfo
,
{
onSuccess
:
function
(
ei
)
{
whCodeGlobalData
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
src/main/webapp/HP/KC/HPKC002.jsp
View file @
d34e8f9d
...
...
@@ -11,6 +11,10 @@
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"inqu_status-0-documentTime"
cname=
"单据日期"
format=
"yyyy-MM-dd"
required=
"true"
/>
<EF:EFInput
ename=
"inqu_status-0-documentCode"
cname=
"生产领料单号"
colWidth=
"4"
readonly=
"false"
/>
<EF:EFSelect
cname=
"物料类型"
blockId=
"inqu_status"
ename=
"materialType"
row=
"0"
colWidth=
"3"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
valueTemplate=
"#=textField#"
filter=
"contains"
required=
"false"
defultValue=
"ALL"
...
...
@@ -18,6 +22,13 @@
<EF:EFOption
label=
"请选择"
value=
""
></EF:EFOption>
<EF:EFOptions
blockId=
"whName_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-materialCode"
cname=
"物料名称"
valueTemplate=
"#=textField#"
filter=
"contains"
required=
"false"
defultValue=
"ALL"
template=
"#=textField#"
>
<EF:EFOption
label=
"请选择"
value=
""
></EF:EFOption>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
...
...
@@ -25,39 +36,16 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"false"
isFloat=
"true"
autoFit=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"documentTime"
cname=
"单据日期"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
width=
"100"
required=
"true"
/>
<EF:EFColumn
ename=
"documentCode"
cname=
"生产领料单号"
width=
"100"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库编码"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
width=
"100"
required=
"true"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
width=
"120"
readonly=
"true"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFComboColumn
ename=
"materialType"
cname=
"物料类型"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"customer_type_block_id"
textField=
"textField"
valueField=
"textField"
align=
"center"
filter=
"contains"
width=
"100"
required=
"true"
>
<EF:EFColumn
ename=
"documentCode"
cname=
"采购入库单号"
width=
"100"
readonly=
"false"
align=
"center"
required=
"false"
enable=
"false"
/>
<EF:EFComboColumn
ename=
"materialType"
cname=
"物料类型"
width=
"90"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"materialTypeName"
cname=
"物料类型名称"
width=
"100"
readonly=
"true"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialCode"
cname=
"物料编码"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
width=
"120"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
width=
"80"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
width=
"100"
readonly=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"materialCode"
cname=
"物料名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
width=
"120"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
width=
"80"
readonly=
"false"
align=
"center"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"数量"
width=
"80"
defaultValue=
"0"
data-regex=
"/^[0-9]\\\d*$/"
data-errorprompt=
"请输入正整数"
readonly=
"false"
align=
"right"
required=
"true"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
defaultValue=
"0"
data-rules=
"number"
maxLength=
"20"
width=
"100"
align=
"right"
readonly=
"false"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
width=
"100"
readonly=
"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