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
14298a2e
Commit
14298a2e
authored
Jan 23, 2024
by
wasx8023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.其他入库单逻辑关联库存
parent
e7f11fa5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
371 additions
and
95 deletions
+371
-95
HPConstant.java
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
+2
-0
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+14
-0
HPKC006.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC006.java
+0
-0
ServiceHPKC005.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
+14
-14
ServiceHPKC006.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
+0
-0
ServiceHPKC007.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007.java
+19
-6
ServiceHPKC009.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
+4
-4
ServiceHPKC010.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
+14
-13
HPKC006.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC006.xml
+0
-0
HPKCTools.java
src/main/java/com/baosight/hpjx/hp/kc/tools/HPKCTools.java
+90
-0
ServiceHPPZ006.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
+1
-3
AssertUtils.java
src/main/java/com/baosight/hpjx/util/AssertUtils.java
+14
-0
ObjectUtils.java
src/main/java/com/baosight/hpjx/util/ObjectUtils.java
+16
-0
HPKC005.jsp
src/main/webapp/HP/KC/HPKC005.jsp
+1
-1
HPKC006.js
src/main/webapp/HP/KC/HPKC006.js
+134
-7
HPKC006.jsp
src/main/webapp/HP/KC/HPKC006.jsp
+48
-47
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
View file @
14298a2e
...
...
@@ -36,6 +36,8 @@ public class HPConstant {
public
static
final
String
INVENT_CODE
=
"INVENT_CODE"
;
// 仓库编码
public
static
final
String
WH_CODE
=
"WH_CODE"
;
// 其他入库单号
public
static
final
String
OTHER_ENTER_NO
=
"OTHER_ENTER_NO"
;
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
14298a2e
...
...
@@ -7,6 +7,20 @@ package com.baosight.hpjx.hp.constant;
public
class
HPSqlConstant
{
/**
* HPKC006 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC006
{
// 查询
public
static
final
String
QUERY_SUM
=
"HPKC006.querySum"
;
// 锁
public
static
final
String
LOCK
=
"HPKC006.lock"
;
}
/**
* HPKC009 SQL 定义
*
* @author:songx
...
...
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC006.java
View file @
14298a2e
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
View file @
14298a2e
...
...
@@ -4,13 +4,13 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC005
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtil
;
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
;
...
...
@@ -36,16 +36,16 @@ public class ServiceHPKC005 extends ServiceBase {
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPKC005
HPKC005
=
new
HPKC005
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
HPKC005
);
outInfo
.
addBlock
(
EiConstant
.
queryBlock
).
setCell
(
0
,
"receiptDate"
,
CommonMethod
.
getCurrentSameYearMonth
()
);
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_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
MATERIAL_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
null
,
false
);
return
out
Info
;
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
MATERIAL_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC006
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
in
Info
;
}
/**
...
...
@@ -169,10 +169,10 @@ public class ServiceHPKC005 extends ServiceBase {
*/
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
(
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC005
fKc005
=
new
HPKC005
();
fKc005
.
fromMap
(
eiBlock
.
getRow
(
i
));
fKc005
.
fromMap
(
resultRows
.
get
(
i
));
// 设置基础信息
this
.
setBaseInfo
(
fKc005
);
DaoUtils
.
update
(
HPKC005
.
UPDATE
,
fKc005
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
View file @
14298a2e
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007.java
View file @
14298a2e
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
service
;
import
com.baosight.hpjx.hp.kc.domain.HPKC007
;
import
com.baosight.hpjx.util.LogUtils
;
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.hpjx.hp.kc.domain.HPKC007
;
import
java.text.SimpleDateFormat
;
import
java.util.Map
;
/**
* 其他出库单
*
* @author:songx
* @date:2024/1/23,21:44
*/
public
class
ServiceHPKC007
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPKC007
hpkc007
=
new
HPKC007
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
hpkc007
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
hpkc007
.
eiMetadata
);
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC007
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作.
*/
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
View file @
14298a2e
...
...
@@ -320,7 +320,7 @@ public class ServiceHPKC009 extends ServiceBase {
List
<
HPKC006
>
bItems
=
dao
.
query
(
"HPKC006.statDate"
,
queryMap
);
Map
<
String
,
HPKC006
>
bItemMap
=
bItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
get
MatType
()
+
"#"
+
item
.
getMa
tCode
(),
item
->
item
));
+
item
.
get
InventType
()
+
"#"
+
item
.
getInven
tCode
(),
item
->
item
));
// 1.3、发出
List
<
HPKC007
>
cItems
=
dao
.
query
(
"HPKC007.statDate"
,
queryMap
);
Map
<
String
,
HPKC007
>
cItemMap
=
cItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
...
...
@@ -336,10 +336,10 @@ public class ServiceHPKC009 extends ServiceBase {
// 根据期末库存生成收发存对象
for
(
HPKC006
aItem
:
aItems
)
{
String
key
=
aItem
.
getCompanyCode
()
+
"#"
+
aItem
.
getDepCode
()
+
"#"
+
aItem
.
getWhCode
()
+
"#"
+
aItem
.
get
MatType
()
+
"#"
+
aItem
.
getMa
tCode
();
+
aItem
.
getWhCode
()
+
"#"
+
aItem
.
get
InventType
()
+
"#"
+
aItem
.
getInven
tCode
();
HPKC009
kc009
=
BeanUtils
.
copy
(
aItem
,
HPKC009
.
class
);
kc009
.
setInventType
(
Integer
.
parseInt
(
aItem
.
get
Ma
tType
()));
kc009
.
setInventCode
(
aItem
.
get
Ma
tCode
());
kc009
.
setInventType
(
Integer
.
parseInt
(
aItem
.
get
Inven
tType
()));
kc009
.
setInventCode
(
aItem
.
get
Inven
tCode
());
kc009
.
setKcType
(
HPConstant
.
KcType
.
QT
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
View file @
14298a2e
...
...
@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.kc.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ006
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
...
...
@@ -166,19 +167,19 @@ public class ServiceHPKC010 extends ServiceBase {
/**
* 更新库存
* @param companyCode 企业编码
* @param whCode 仓库编码
* @param inventRecordId 存货档案ID
* @param amout 数量
* @param weight 重量
*
* @param inInfo
* @return
*/
public
EiInfo
updateStock
(
String
companyCode
,
String
whCode
,
Long
inventRecordId
,
BigDecimal
amout
,
BigDecimal
weight
){
EiInfo
inInfo
=
new
EiInfo
();
public
EiInfo
updateStock
(
EiInfo
inInfo
){
String
whCode
=
inInfo
.
getString
(
"whCode"
);
Long
inventRecordId
=
Long
.
parseLong
(
inInfo
.
getString
(
"inventRecordId"
));
BigDecimal
amount
=
new
BigDecimal
(
inInfo
.
getString
(
"amount"
));
BigDecimal
weight
=
new
BigDecimal
(
inInfo
.
getString
(
"weight"
));
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
try
{
checkUpdateStockParam
(
companyCode
,
whCode
,
inventRecordId
,
amout
,
weight
);
HPKC010
newObj
=
generatorBaseInfo
(
companyCode
,
whCode
,
inventRecordId
,
amout
,
weight
);
checkUpdateStockParam
(
companyCode
,
whCode
,
inventRecordId
,
amou
n
t
,
weight
);
HPKC010
newObj
=
generatorBaseInfo
(
companyCode
,
whCode
,
inventRecordId
,
amou
n
t
,
weight
);
List
<
Map
>
list
=
dao
.
query
(
"queryByCondition"
,
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
companyCode
);
put
(
"whCode"
,
whCode
);
...
...
@@ -186,8 +187,8 @@ public class ServiceHPKC010 extends ServiceBase {
}});
if
(
CollectionUtils
.
isEmpty
(
list
)){
//新增
if
(
Objects
.
isNull
(
amou
t
)||
amou
t
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
||
Objects
.
isNull
(
amout
)||
weight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
if
(
Objects
.
isNull
(
amou
nt
)||
amoun
t
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
||
Objects
.
isNull
(
amou
n
t
)||
weight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
throw
new
PlatException
(
"当前库存为空,库存变更数量与重量不能小于等于0!"
);
}
generatorBaseInfo
(
newObj
);
...
...
@@ -196,7 +197,7 @@ public class ServiceHPKC010 extends ServiceBase {
//修改
HPKC010
oldObj
=
new
HPKC010
();
oldObj
.
fromMap
(
list
.
get
(
0
));
BigDecimal
afterAmout
=
oldObj
.
getAmount
().
add
(
amout
);
BigDecimal
afterAmout
=
oldObj
.
getAmount
().
add
(
amou
n
t
);
BigDecimal
afterWeight
=
oldObj
.
getWeight
().
add
(
weight
);
if
(
afterAmout
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
||
afterWeight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
throw
new
PlatException
(
"库存更新失败,出库数量与重量不能大于当前库存!"
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC006.xml
View file @
14298a2e
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/kc/tools/HPKCTools.java
0 → 100644
View file @
14298a2e
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
tools
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
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.soa.XLocalManager
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author:songx
* @date:2024/1/23,21:18
*/
public
class
HPKCTools
{
/**
* 锁
*
* @param otherEnterNos
* @return
*/
public
static
void
lockKc006
(
List
<
String
>
otherEnterNos
)
{
if
(
CollectionUtils
.
isEmpty
(
otherEnterNos
))
{
return
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"otherEnterNos"
,
otherEnterNos
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPKC006
.
LOCK
,
queryMap
);
}
/**
* 查询其他入库信息
*
* @param otherEnterNos
* @return
*/
public
static
List
<
HPKC006
>
listKc006
(
List
<
String
>
otherEnterNos
)
{
if
(
CollectionUtils
.
isEmpty
(
otherEnterNos
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"otherEnterNos"
,
otherEnterNos
);
return
DaoBase
.
getInstance
().
query
(
HPKC006
.
QUERY
,
queryMap
);
}
/**
* 查询其他入库信息
*
* @param otherEnterNos
* @return
*/
public
static
Map
<
String
,
HPKC006
>
mapKc006
(
List
<
String
>
otherEnterNos
)
{
List
<
HPKC006
>
results
=
listKc006
(
otherEnterNos
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HPKC006:
:
getOtherEnterNo
,
item
->
item
));
}
/**
* 更新库存
*
* @param whCode
* @param inventRecordId
* @param amount
* @param weight
*/
public
static
void
updateStock
(
String
whCode
,
Long
inventRecordId
,
BigDecimal
amount
,
BigDecimal
weight
)
{
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"whCode"
,
whCode
);
inInfo
.
set
(
"inventRecordId"
,
inventRecordId
);
inInfo
.
set
(
"amount"
,
amount
);
inInfo
.
set
(
"weight"
,
weight
);
inInfo
.
set
(
EiConstant
.
serviceName
,
"HPKC010"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"updateStock"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
if
(
outInfo
.
getStatus
()
<
0
)
{
throw
new
PlatException
(
"跟新库存失败:"
+
outInfo
.
getMsg
());
}
}
}
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
View file @
14298a2e
...
...
@@ -3,7 +3,6 @@ package com.baosight.hpjx.hp.pz.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.InitiateModeEnum
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ006
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.util.AssertUtils
;
...
...
@@ -15,7 +14,6 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
...
...
@@ -51,7 +49,7 @@ public class ServiceHPPZ006 extends ServiceBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
"HPPZ006.query"
,
new
HP
KC
006
());
inInfo
=
super
.
query
(
inInfo
,
"HPPZ006.query"
,
new
HP
PZ
006
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
src/main/java/com/baosight/hpjx/util/AssertUtils.java
View file @
14298a2e
...
...
@@ -5,6 +5,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.util.Collection
;
import
java.util.Map
;
...
...
@@ -148,4 +149,17 @@ public class AssertUtils {
}
}
/**
* A大于B
*
* @param a
* @param b
* @param message
*/
public
static
void
isGt
(
BigDecimal
a
,
BigDecimal
b
,
String
message
)
{
if
(
a
.
compareTo
(
b
)
<
1
)
{
throw
new
PlatException
(
message
);
}
}
}
src/main/java/com/baosight/hpjx/util/ObjectUtils.java
View file @
14298a2e
package
com
.
baosight
.
hpjx
.
util
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 重写Apache.ObjectUtils类方法
*
...
...
@@ -83,4 +88,15 @@ public class ObjectUtils extends org.apache.commons.lang.ObjectUtils {
return
StringUtils
.
isBlank
(
object
.
toString
());
}
/**
* 从集合MAP中取KEY
*
* @param items
* @param keyName
* @return
*/
public
static
List
<
String
>
listKey
(
List
<
Map
>
items
,
String
keyName
)
{
return
items
.
stream
().
map
(
item
->
MapUtils
.
getString
(
item
,
keyName
)).
collect
(
Collectors
.
toList
());
}
}
src/main/webapp/HP/KC/HPKC005.jsp
View file @
14298a2e
...
...
@@ -41,7 +41,7 @@
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"statisticalNumber"
cname=
"盘点单号"
enable=
"false"
width=
"130"
al
gi
n=
"center"
/>
<EF:EFColumn
ename=
"statisticalNumber"
cname=
"盘点单号"
enable=
"false"
width=
"130"
al
ig
n=
"center"
/>
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
width=
"90"
align=
"center"
required=
"true"
/>
<
%
--
<
EF:EFComboColumn
ename=
"status"
cname=
"单据状态"
enable=
"false"
width=
"100"
readonly=
"true"
...
...
src/main/webapp/HP/KC/HPKC006.js
View file @
14298a2e
$
(
function
()
{
var
inventNameGlobalData
=
[];
var
specGlobalData
=
[];
$
(
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
IPLATUI
.
EFGrid
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
"result"
:
{
columns
:
[{
field
:
"inventCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
inventNameGlobalData
.
length
;
i
++
)
{
if
(
inventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
return
inventNameGlobalData
[
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
);
let
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"inventType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ006"
,
"queryMaterialComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"material_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
}
},
{
field
:
"inventRecordId"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
specGlobalData
.
length
;
i
++
)
{
if
(
specGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventRecordId'
])
{
return
specGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
refreshsel
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
);
let
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
}
}],
loadComplete
:
function
(
grid
)
{
}
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 保存
$
(
"#BTN_SAVE"
).
on
(
"click"
,
save
);
});
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 存货名称
let
eiInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
inventNameGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 规格
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
specGlobalData
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
// 点击查询按钮,从第1页开始查询
}
/**
* 保存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPKC006"
,
"save"
,
true
);
}
});
}
src/main/webapp/HP/KC/HPKC006.jsp
View file @
14298a2e
...
...
@@ -4,60 +4,61 @@
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<head>
<
%
--
<
link
rel=
"stylesheet"
href=
"${ctx}/css/simulatedOperation.css"
/>
--%>
</head>
<EF:EFPage
title=
"其他入库单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
align-item=
"center"
><
%
--
type=
"query"
efRegionShowClear=
"true"
efRegionSave=
"true"
--
%
>
<style>
.row
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
</style>
<div
class=
"row"
>
<
%
--
blockId=
"inqu_status"
row=
"0"
--
%
>
<EF:EFDatePicker
blockId=
"inqu_status"
ename =
"receiptTime"
cname=
"单据日期"
format=
"yyyy-MM-dd"
/>
<EF:EFInput
blockId=
"inqu_status"
ename=
"otherEnthouse"
cname=
"其他入库单号"
row=
"0"
/>
<EF:EFInput
blockId=
"inqu_status"
ename=
"whName"
cname=
"仓库名称"
row=
"0"
/>
<EF:EFSelect
cname=
"单据状态"
optionLabel=
"全部"
blockId=
"inqu_status"
ename=
"status"
row=
"0"
>
<EF:EFOption
label=
"审核"
value=
"1"
/>
<EF:EFOption
label=
"反审"
value=
"0"
/>
<EF:EFPage
title=
"其他入库单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
align-item=
"center"
>
<div
class=
"row"
>
<EF:EFDatePicker
cname=
"单据日期"
ename=
"inqu_status-0-receiptDate"
colWidth=
"3"
role=
"date"
format=
"yyyy-MM-dd"
readonly=
"true"
/>
<EF:EFInput
cname=
"入库单号"
ename=
"inqu_status-0-otherEnterNo"
colWidth=
"3"
/>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
template=
"#=valueField#-#=textField#"
valueTemplate=
"#=valueField#-#=textField#"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFSelect>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"存货名称"
ename=
"inqu_status-0-inventCode"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"material_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-spec"
cname=
"规格"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"spec_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no
"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row
"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"receiptTime"
cname=
"单据日期"
/>
<EF:EFColumn
ename=
"otherEnthouse"
cname=
"其他入库单号"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
/>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
/>
<EF:EFColumn
ename=
"matType"
cname=
"物料类型"
/>
<EF:EFColumn
ename=
"matCode"
cname=
"物料编码"
/>
<EF:EFColumn
ename=
"matName"
cname=
"物料名称"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
/>
<EF:EFColumn
ename=
"amount"
cname=
"数量"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
/>
<EF:EFComboColumn
align=
"center"
ename=
"status"
cname=
"操作"
>
<EF:EFOption
label=
"审核"
value=
"1"
/>
<EF:EFOption
label=
"反审"
value=
"0"
/>
<EF:EFColumn
ename=
"otherEnterNo"
cname=
"入库单号"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
width=
"90"
align=
"center"
required=
"true"
/>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库编码"
width=
"120"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
required=
"true"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"100"
align=
"center"
required=
"true"
columnTemplate=
"#=valueField#-#=textField#"
itemTemplate=
"#=valueField#-#=textField#"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"amount"
cname=
"数量"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"right"
sumType=
"all"
required=
"true"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"right"
sumType=
"all"
required=
"true"
/>
<EF:EFColumn
ename=
"notes"
cname=
"备注"
width=
"100"
/>
<EF:EFColumn
ename=
"createdBy"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时刻"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var
ctx
=
"${ctx}"
;
</script>
<script
src=
"${ctx}/HP/KC/HPKC006.js"
></script>
\ No newline at end of file
</EF:EFPage>
\ No newline at end of file
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