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
2036bf4d
Commit
2036bf4d
authored
Jan 22, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购入库单功能提交
parent
1a8f1078
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
435 additions
and
282 deletions
+435
-282
DdynamicEnum.java
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
+9
-2
InventTypeEnun.java
src/main/java/com/baosight/hpjx/common/InventTypeEnun.java
+29
-8
HPConstant.java
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
+9
-5
ServiceHPKC001.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
+79
-33
HPKC001.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
+2
-2
ServiceHPPZ006.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
+20
-2
ServiceHPPZ007.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ007.java
+14
-4
HPPZ006.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ006.xml
+18
-0
CommonMethod.java
src/main/java/com/baosight/hpjx/util/CommonMethod.java
+16
-1
HPKC001.js
src/main/webapp/HP/KC/HPKC001.js
+216
-197
HPKC001.jsp
src/main/webapp/HP/KC/HPKC001.jsp
+7
-21
HPPZ007.js
src/main/webapp/HP/PZ/HPPZ007.js
+1
-2
HPPZ007.jsp
src/main/webapp/HP/PZ/HPPZ007.jsp
+15
-5
No files found.
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
View file @
2036bf4d
...
@@ -42,7 +42,14 @@ public enum DdynamicEnum {
...
@@ -42,7 +42,14 @@ public enum DdynamicEnum {
* 编写:wwl
* 编写:wwl
*/
*/
INVENT_RECORD_BLOCK_ID
(
"invent_record_block_id"
,
"id"
,
"inventName"
,
"HPPZ006.queryComboBox"
),
INVENT_RECORD_BLOCK_ID
(
"invent_record_block_id"
,
"id"
,
"inventName"
,
"HPPZ006.queryComboBox"
),
/**
* 模块:存货档案
* 用途:存货档案下拉框
* 编写:jhs
*/
MATERIAL_RECORD_BLOCK_ID
(
"material_record_block_id"
,
"inventCode"
,
"inventName"
,
"HPPZ006.queryMaterialComboBox"
),
/**
/**
* 模块:存货档案
* 模块:存货档案
* 用途:存货档案下拉框
* 用途:存货档案下拉框
...
@@ -50,7 +57,7 @@ public enum DdynamicEnum {
...
@@ -50,7 +57,7 @@ public enum DdynamicEnum {
*/
*/
INVENT_SPEC_BLOCK_ID
(
"invent_spec_block_id"
,
"spec"
,
"spec"
,
"HPPZ006.queryComboBoxSpec"
),
INVENT_SPEC_BLOCK_ID
(
"invent_spec_block_id"
,
"spec"
,
"spec"
,
"HPPZ006.queryComboBoxSpec"
),
/**
/**
* 模块:仓库档案
* 模块:仓库档案
* 用途:仓库档案下拉框
* 用途:仓库档案下拉框
...
...
src/main/java/com/baosight/hpjx/common/InventTypeEnun.java
View file @
2036bf4d
...
@@ -26,6 +26,27 @@ public enum InventTypeEnun {
...
@@ -26,6 +26,27 @@ public enum InventTypeEnun {
this
.
value
=
value
;
this
.
value
=
value
;
}
}
public
static
String
getNameByCode
(
String
code
){
String
returnName
=
""
;
switch
(
code
){
case
"1"
:
returnName
=
MATERIAL
.
value
;
break
;
case
"2"
:
returnName
=
CONSUMABLE
.
value
;
break
;
case
"3"
:
returnName
=
SEMI_FINISHED_PRODUCT
.
value
;
break
;
case
"4"
:
returnName
=
FINISHED_PRODUCT
.
value
;
break
;
default
:
break
;
}
return
returnName
;
};
public
Integer
getCode
()
{
public
Integer
getCode
()
{
return
code
;
return
code
;
}
}
...
@@ -46,20 +67,20 @@ public enum InventTypeEnun {
...
@@ -46,20 +67,20 @@ public enum InventTypeEnun {
EiBlock
block
=
new
EiBlock
(
"customer_type_block_id"
);
EiBlock
block
=
new
EiBlock
(
"customer_type_block_id"
);
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>()
{{
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
HPConstants
.
TEXT_FIELD
,
MATERIAL
.
code
);
put
(
HPConstants
.
TEXT_FIELD
,
MATERIAL
.
code
+
HPConstants
.
SPLICING_SYMBOL
+
MATERIAL
.
value
);
put
(
HPConstants
.
VALUE_FIELD
,
MATERIAL
.
valu
e
);
put
(
HPConstants
.
VALUE_FIELD
,
MATERIAL
.
cod
e
);
}});
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
HPConstants
.
TEXT_FIELD
,
CONSUMABLE
.
code
);
put
(
HPConstants
.
TEXT_FIELD
,
CONSUMABLE
.
code
+
HPConstants
.
SPLICING_SYMBOL
+
CONSUMABLE
.
value
);
put
(
HPConstants
.
VALUE_FIELD
,
CONSUMABLE
.
valu
e
);
put
(
HPConstants
.
VALUE_FIELD
,
CONSUMABLE
.
cod
e
);
}});
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
HPConstants
.
TEXT_FIELD
,
SEMI_FINISHED_PRODUCT
.
code
);
put
(
HPConstants
.
TEXT_FIELD
,
SEMI_FINISHED_PRODUCT
.
code
+
HPConstants
.
SPLICING_SYMBOL
+
SEMI_FINISHED_PRODUCT
.
value
);
put
(
HPConstants
.
VALUE_FIELD
,
SEMI_FINISHED_PRODUCT
.
valu
e
);
put
(
HPConstants
.
VALUE_FIELD
,
SEMI_FINISHED_PRODUCT
.
cod
e
);
}});
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
HPConstants
.
TEXT_FIELD
,
FINISHED_PRODUCT
.
code
);
put
(
HPConstants
.
TEXT_FIELD
,
FINISHED_PRODUCT
.
code
+
HPConstants
.
SPLICING_SYMBOL
+
FINISHED_PRODUCT
.
value
);
put
(
HPConstants
.
VALUE_FIELD
,
FINISHED_PRODUCT
.
valu
e
);
put
(
HPConstants
.
VALUE_FIELD
,
FINISHED_PRODUCT
.
cod
e
);
}});
}});
}};
}};
block
.
setRows
(
rows
);
block
.
setRows
(
rows
);
...
...
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
View file @
2036bf4d
...
@@ -5,7 +5,7 @@ package com.baosight.hpjx.hp.constant;
...
@@ -5,7 +5,7 @@ package com.baosight.hpjx.hp.constant;
* @date:2024/1/18,17:16
* @date:2024/1/18,17:16
*/
*/
public
class
HPConstant
{
public
class
HPConstant
{
/**
/**
* 序列号
* 序列号
*
*
...
@@ -13,19 +13,23 @@ public class HPConstant {
...
@@ -13,19 +13,23 @@ public class HPConstant {
* @date:2021/8/17,15:22
* @date:2021/8/17,15:22
*/
*/
public
class
SequenceId
{
public
class
SequenceId
{
// 盘点单号
// 盘点单号
public
static
final
String
STATISTICAL_NUMBER
=
"STATISTICAL_NUMBER"
;
public
static
final
String
STATISTICAL_NUMBER
=
"STATISTICAL_NUMBER"
;
// 统计单号
// 统计单号
public
static
final
String
HPKC008_NUMBER
=
"HPKC008_NUMBER"
;
public
static
final
String
HPKC008_NUMBER
=
"HPKC008_NUMBER"
;
// 巡检单号
// 巡检单号
public
static
final
String
HPZL001_NUMBER
=
"HPZL001_NUMBER"
;
public
static
final
String
HPZL001_NUMBER
=
"HPZL001_NUMBER"
;
//采购入库单号
public
static
final
String
HPKC001_NUMBER
=
"HPKC001_NUMBER"
;
//生产领料单号
public
static
final
String
HPKC002_NUMBER
=
"HPKC002_NUMBER"
;
// 生产入库单号
// 生产入库单号
public
static
final
String
HPKC003_PROD_NO
=
"HPKC003_PROD_NO"
;
public
static
final
String
HPKC003_PROD_NO
=
"HPKC003_PROD_NO"
;
// 生产销售单号
// 生产销售单号
public
static
final
String
HPKC004_SALE_NO
=
"HPKC004_SALE_NO"
;
public
static
final
String
HPKC004_SALE_NO
=
"HPKC004_SALE_NO"
;
}
}
/**
/**
* 库存类型
* 库存类型
*
*
...
@@ -33,7 +37,7 @@ public class HPConstant {
...
@@ -33,7 +37,7 @@ public class HPConstant {
* @date:2024/1/20,15:18
* @date:2024/1/20,15:18
*/
*/
public
class
KcType
{
public
class
KcType
{
// 采购
// 采购
public
static
final
String
CG
=
"CG"
;
public
static
final
String
CG
=
"CG"
;
// 生产
// 生产
...
@@ -41,5 +45,5 @@ public class HPConstant {
...
@@ -41,5 +45,5 @@ public class HPConstant {
// 其他
// 其他
public
static
final
String
QT
=
"QT"
;
public
static
final
String
QT
=
"QT"
;
}
}
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
View file @
2036bf4d
...
@@ -3,11 +3,17 @@ package com.baosight.hpjx.hp.kc.service;
...
@@ -3,11 +3,17 @@ package com.baosight.hpjx.hp.kc.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.HPConstants
;
import
com.baosight.hpjx.common.HPConstants
;
import
com.baosight.hpjx.common.InventTypeEnun
;
import
com.baosight.hpjx.common.InventTypeEnun
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC005
;
import
com.baosight.hpjx.hp.kc.domain.HPKC009
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.hp.pz.domain.THppz004
;
import
com.baosight.hpjx.hp.pz.domain.THppz004
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
@@ -15,6 +21,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
...
@@ -15,6 +21,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.*
;
import
java.util.*
;
...
@@ -31,17 +38,17 @@ public class ServiceHPKC001 extends ServiceBase {
...
@@ -31,17 +38,17 @@ public class ServiceHPKC001 extends ServiceBase {
*/
*/
@Override
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPKC001
HPKC001
=
new
HPKC001
();
try
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
HPKC001
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
().
clear
(
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_QUERY_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH
_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
MATERIAL
_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_QUERY
_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC
_BLOCK_ID
),
null
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC001
().
eiMetadata
);
EiBlock
block
=
outInfo
.
addBlock
(
EiConstant
.
queryBlock
);
inInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
()
);
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
));
}
catch
(
PlatException
e
)
{
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
)
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
outInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
());
}
return
out
Info
;
return
in
Info
;
}
}
/**
/**
...
@@ -65,15 +72,31 @@ public class ServiceHPKC001 extends ServiceBase {
...
@@ -65,15 +72,31 @@ public class ServiceHPKC001 extends ServiceBase {
public
EiInfo
insert
(
EiInfo
inInfo
)
{
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRowCount
();
i
++)
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
String
documentTime
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
);
this
.
checkSaveData
(
resultRows
);
if
(
StringUtils
.
isNotBlank
(
documentTime
)){
// 写入数据
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
,
StringUtil
.
removeHorizontalLine
(
documentTime
));
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
}
HPKC001
insertEntity
=
new
HPKC001
();
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"status"
,
1
);
insertEntity
.
fromMap
(
resultRows
.
get
(
i
));
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"approvalStatus"
,
0
);
// 仓库名称
super
.
insert
(
inInfo
,
"HPKC001.insert"
);
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
.
HPKC001_NUMBER
));
// 去除日期字符串中的-
insertEntity
.
setDocumentTime
(
StringUtil
.
removeHorizontalLine
(
insertEntity
.
getDocumentTime
()));
insertEntity
.
setStatus
(
1
);
insertEntity
.
setApprovalStatus
(
0
);
DaoUtils
.
insert
(
"HPKC001.insert"
,
insertEntity
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
...
@@ -85,6 +108,23 @@ public class ServiceHPKC001 extends ServiceBase {
...
@@ -85,6 +108,23 @@ public class ServiceHPKC001 extends ServiceBase {
return
query
(
inInfo
);
return
query
(
inInfo
);
}
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC001
entity
=
new
HPKC001
();
entity
.
fromMap
(
resultRows
.
get
(
i
));
AssertUtils
.
isEmpty
(
entity
.
getMaterialType
(),
"物料类型不能为空"
);
AssertUtils
.
isEmpty
(
entity
.
getMaterialCode
(),
"物料不能为空"
);
AssertUtils
.
isEmpty
(
entity
.
getWhCode
(),
"仓库不能为空"
);
}
}
/**
/**
* 修改操作.
* 修改操作.
...
@@ -92,25 +132,31 @@ public class ServiceHPKC001 extends ServiceBase {
...
@@ -92,25 +132,31 @@ public class ServiceHPKC001 extends ServiceBase {
@Override
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
CommonMethod
.
udpateInfo
(
inInfo
,
EiConstant
.
resultBlock
);
HPKC001
hpkc001
=
new
HPKC001
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
this
.
checkSaveData
(
resultRows
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
// 写入数据
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
hpkc001
.
fromMap
(
map
);
HPKC001
updateEntity
=
new
HPKC001
();
String
documentTime
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
);
updateEntity
.
fromMap
(
resultRows
.
get
(
i
));
if
(
StringUtils
.
isNotBlank
(
documentTime
)){
// 仓库名称
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"documentTime"
,
StringUtil
.
removeHorizontalLine
(
documentTime
));
Map
params
=
new
HashMap
<>();
}
params
.
put
(
"whCode"
,
updateEntity
.
getWhCode
());
this
.
dao
.
update
(
"HPKC001.update"
,
hpkc001
.
toMap
());
List
query
=
dao
.
query
(
"HPPZ007.queryByWhCode"
,
params
);
updateEntity
.
setWhName
(((
HPPZ007
)
query
.
get
(
0
)).
getWhName
());
//物料类型
updateEntity
.
setMaterialTypeName
(
InventTypeEnun
.
getNameByCode
(
updateEntity
.
getMaterialType
()));
DaoUtils
.
update
(
"HPKC001.update"
,
updateEntity
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setMsg
(
"修改成功!"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"
修改
失败"
,
e
.
getMessage
());
logError
(
"
新增
失败"
,
e
.
getMessage
());
return
inInfo
;
return
inInfo
;
}
}
return
query
(
inInfo
);
return
query
(
inInfo
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
View file @
2036bf4d
...
@@ -110,8 +110,8 @@
...
@@ -110,8 +110,8 @@
UPDATE hpjx.t_hpkc001
UPDATE hpjx.t_hpkc001
SET
SET
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#,
UPDATED_
BY = #updatedBy
#,
UPDATED_
NAME = #updatedName
#,
UPDATED_
BY = #updatedBy
#
UPDATED_
TIME = #updatedTime
#
<isNotEmpty
property=
"companyCode"
>
<isNotEmpty
property=
"companyCode"
>
,COMPANY_CODE = #companyCode#
,COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
View file @
2036bf4d
...
@@ -136,7 +136,7 @@ public class ServiceHPPZ006 extends ServiceBase {
...
@@ -136,7 +136,7 @@ public class ServiceHPPZ006 extends ServiceBase {
eiInfo
.
setMsg
(
"删除成功!"
);
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
return
eiInfo
;
}
}
/**
/**
* 规格下拉框
* 规格下拉框
*
*
...
@@ -153,5 +153,23 @@ public class ServiceHPPZ006 extends ServiceBase {
...
@@ -153,5 +153,23 @@ public class ServiceHPPZ006 extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
public
EiInfo
queryComboBox
(
EiInfo
eiInfo
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"inventType"
,
eiInfo
.
getString
(
"inventType"
));
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
);
CommonMethod
.
initBlock
(
eiInfo
,
list
,
map
);
return
eiInfo
;
}
public
EiInfo
queryMaterialComboBox
(
EiInfo
eiInfo
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"inventType"
,
eiInfo
.
getString
(
"inventType"
));
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
MATERIAL_RECORD_BLOCK_ID
);
CommonMethod
.
initBlock
(
eiInfo
,
list
,
map
);
return
eiInfo
;
}
}
}
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ007.java
View file @
2036bf4d
package
com
.
baosight
.
hpjx
.
hp
.
pz
.
service
;
package
com
.
baosight
.
hpjx
.
hp
.
pz
.
service
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.InventTypeEnun
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -10,10 +13,7 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
...
@@ -10,10 +13,7 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
ServiceHPPZ007
extends
ServiceBase
{
public
class
ServiceHPPZ007
extends
ServiceBase
{
...
@@ -21,6 +21,7 @@ public class ServiceHPPZ007 extends ServiceBase {
...
@@ -21,6 +21,7 @@ public class ServiceHPPZ007 extends ServiceBase {
HPPZ007
hppz007
=
new
HPPZ007
();
HPPZ007
hppz007
=
new
HPPZ007
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
hppz007
);
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
hppz007
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
hppz007
.
eiMetadata
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
hppz007
.
eiMetadata
);
inInfo
.
setBlock
(
InventTypeEnun
.
generatorEiBlock
());
return
inInfo
;
return
inInfo
;
}
}
...
@@ -135,4 +136,13 @@ public class ServiceHPPZ007 extends ServiceBase {
...
@@ -135,4 +136,13 @@ public class ServiceHPPZ007 extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
public
EiInfo
queryComboBox
(
EiInfo
eiInfo
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"whType"
,
eiInfo
.
getString
(
"whType"
));
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
);
CommonMethod
.
initBlock
(
eiInfo
,
list
,
map
);
return
eiInfo
;
}
}
}
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ006.xml
View file @
2036bf4d
...
@@ -116,6 +116,21 @@
...
@@ -116,6 +116,21 @@
ORDER BY INVENT_CODE
ORDER BY INVENT_CODE
</select>
</select>
<select
id=
"queryMaterialComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz006 WHERE STATUS=1
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
<!-- 规格下拉框 -->
<!-- 规格下拉框 -->
<select
id=
"queryComboBoxSpec"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryComboBoxSpec"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
SELECT DISTINCT
...
@@ -127,6 +142,9 @@
...
@@ -127,6 +142,9 @@
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
INVENT_CODE = #inventCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
</isNotEmpty>
ORDER BY ID
ORDER BY ID
</select>
</select>
...
...
src/main/java/com/baosight/hpjx/util/CommonMethod.java
View file @
2036bf4d
...
@@ -99,6 +99,21 @@ public class CommonMethod {
...
@@ -99,6 +99,21 @@ public class CommonMethod {
}
}
}
}
public
static
void
udpateInfo
(
EiInfo
eiInfo
,
String
resultBlock
){
EiBlock
block
=
eiInfo
.
getBlock
(
resultBlock
);
String
userId
=
UserSession
.
getLoginName
();
String
userName
=
UserSession
.
getLoginCName
();
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_COMPANYCODE
,
""
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_TIME
,
time
);
}
}
public
static
void
updateuserInfo
(
EiInfo
eiInfo
,
String
resultBlock
){
public
static
void
updateuserInfo
(
EiInfo
eiInfo
,
String
resultBlock
){
EiBlock
block
=
eiInfo
.
getBlock
(
resultBlock
);
EiBlock
block
=
eiInfo
.
getBlock
(
resultBlock
);
...
@@ -165,5 +180,5 @@ public class CommonMethod {
...
@@ -165,5 +180,5 @@ public class CommonMethod {
return
yearMonthDay
;
return
yearMonthDay
;
}
}
}
}
src/main/webapp/HP/KC/HPKC001.js
View file @
2036bf4d
let
materialCodeGlobalData
=
[];
let
whCodeGlobalData
=
[];
let
specGlobalData
=
[];
$
(
function
()
{
$
(
function
()
{
var
editorModel0
=
''
;
var
editorModel0
=
''
;
var
eiInfo
=
new
EiInfo
();
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
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
// 点击查询按钮,从第1页开始查询
resultGrid
.
dataSource
.
page
(
1
);
// 点击查询按钮,从第1页开始查询
});
});
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
.
result
=
{
"result"
:
{
pageable
:
{
columns
:
[
pageSize
:
20
,
{
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
field
:
"materialCode"
,
},
// template: function(dataItem) {
columns
:
[
// for (var i = 0 ; i < globalData.length ; i++) {
{
// if ( globalData[i]['valueField'] === dataItem['materialCode']) {
field
:
"materialCode"
,
// return globalData[i]['textField'];
template
:
function
(
dataItem
)
{
// }
for
(
var
i
=
0
;
i
<
materialCodeGlobalData
.
length
;
i
++
)
{
// }
if
(
materialCodeGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'materialCode'
])
{
// return "";
return
materialCodeGlobalData
[
i
][
'textField'
];
// },
}
editor
:
function
(
container
,
options
)
{
}
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
return
""
;
var
cellIndex
=
grid
.
cellIndex
(
container
);
},
var
input
=
$
(
'<input />'
);
editor
:
function
(
container
,
options
)
{
input
.
attr
(
"name"
,
options
.
field
);
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
input
.
attr
(
"id"
,
options
.
field
);
var
cellIndex
=
grid
.
cellIndex
(
container
);
input
.
appendTo
(
container
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"materialType"
]);
input
.
attr
(
"id"
,
options
.
field
);
var
dataSource
;
input
.
appendTo
(
container
);
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"materialType"
]);
onSuccess
:
function
(
ei
)
{
var
dataSource
;
dataSource
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
globalData
=
dataSource
;
EiCommunicator
.
send
(
"HPPZ006"
,
"queryMaterialComboBox"
,
eiInfo
,
{
},
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
,
{
onSuccess
:
function
(
ei
)
{
onSuccess
:
function
(
ei
)
{
var
queryData
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
dataSource
=
ei
.
getBlock
(
"material_record_block_id"
).
getMappedRows
();
whCodeData
=
queryData
;
materialCodeGlobalData
=
dataSource
;
whCodeData
.
forEach
(
title
=>
{
if
(
title
.
valueField
==
whCode
){
var
valueField
=
title
.
textField
.
substring
(
title
.
textField
.
lastIndexOf
(
'-'
)
+
1
);
resultGrid
.
setCellValue
(
editorModel0
,
"whName"
,
valueField
);
}
})
},
onFail
:
function
(
ei
)
{
},
onFail
:
function
(
ei
)
{
}
}
},
{
async
:
false
});
},
{
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
});
}
//清空物料信息
return
""
;
resultGrid
.
setCellValue
(
editorModel0
,
"materialName"
,
""
);
},
resultGrid
.
setCellValue
(
editorModel0
,
"materialCode"
,
""
);
editor
:
function
(
container
,
options
)
{
});
var
input
=
$
(
'<input />'
);
$
(
"input[name='materialCode']"
).
on
(
'change'
,
function
(
me
)
{
input
.
attr
(
"name"
,
options
.
field
);
var
materialCode
=
$
(
"input[name='materialCode']"
).
val
();
input
.
attr
(
"id"
,
options
.
field
);
var
materialType
=
$
(
"input[name='materialType']"
).
val
();
input
.
appendTo
(
container
);
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"inventType"
,
materialType
);
var
whEiInfo
=
new
EiInfo
();
whEiInfo
.
set
(
"whType"
,
options
.
model
[
"materialType"
]);
var
dataSource
;
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ00
4"
,
"queryComboBox"
,
e
iInfo
,
{
EiCommunicator
.
send
(
"HPPZ00
7"
,
"queryComboBox"
,
whE
iInfo
,
{
onSuccess
:
function
(
ei
)
{
onSuccess
:
function
(
ei
)
{
var
queryData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
dataSource
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
dataSource
=
queryData
;
whCodeGlobalData
=
dataSource
;
dataSource
.
forEach
(
title
=>
{
if
(
title
.
valueField
==
materialCode
){
var
valueField
=
title
.
textField
.
substring
(
title
.
textField
.
lastIndexOf
(
'-'
)
+
1
);
resultGrid
.
setCellValue
(
editorModel0
,
"materialName"
,
valueField
);
}
})
},
onFail
:
function
(
ei
)
{
},
onFail
:
function
(
ei
)
{
}
}
},
{
async
:
false
});
},
{
async
:
false
});
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
},
},
},
loadComplete
:
function
(
grid
)
{
{
// 新增
field
:
"spec"
,
$
(
"#BTN_INSERT"
).
on
(
"click"
,
function
()
{
template
:
function
(
dataItem
)
{
var
btnNode
=
$
(
this
);
for
(
var
i
=
0
;
i
<
specGlobalData
.
length
;
i
++
)
{
//禁用按钮
if
(
specGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'spec'
])
{
btnNode
.
attr
(
"disabled"
,
true
);
return
specGlobalData
[
i
][
'textField'
];
IPLAT
.
submitNode
(
$
(
"#HPKC001"
),
"HPKC001"
,
"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
);
}
}
});
});
// 修改
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
function
()
{
var
rowCount
=
resultGrid
.
getCheckedRows
();
// 检验是否选中数据
if
(
rowCount
==
null
||
rowCount
==
""
)
{
NotificationUtil
({
msg
:
'请选择一条或多条数据'
},
"warning"
);
return
false
;
}
}
var
btnNode
=
$
(
this
);
return
""
;
//禁用按钮
},
btnNode
.
attr
(
"disabled"
,
true
);
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
IPLAT
.
submitNode
(
$
(
"#HPKC001"
),
"HPKC001"
,
"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
)
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
dataSource
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
NotificationUtil
(
ei
,
"error"
);
specGlobalData
=
dataSource
;
}
else
{
},
onFail
:
function
(
ei
)
{
NotificationUtil
({
msg
:
'修改成功'
});
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
:
function
(
ei
)
{
// onFail 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
}
}
},
{
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
materialType
=
$
(
"input[name='materialType']"
).
val
();
var
queryEiInfo
=
new
EiInfo
();
queryEiInfo
.
set
(
"inventType"
,
materialType
);
EiCommunicator
.
send
(
"HPPZ006"
,
"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
);
resultGrid
.
setCellValue
(
e
.
row
,
"materialName"
,
materialName
);
resultGrid
.
setCellValue
(
e
.
row
,
"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
(
$
(
"#HPKC001"
),
"HPKC001"
,
"delete"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'删除成功'
});
//删除
// 绑定grid
$
(
"#DELETE"
).
on
(
"click"
,
function
()
{
resultGrid
.
setEiInfo
(
ei
);
}
var
btnNode
=
$
(
this
);
//释放禁用按钮
//禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
btnNode
.
attr
(
"disabled"
,
true
);
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
);
btnNode
.
attr
(
"disabled"
,
false
);
return
false
;
}
}
IPLAT
.
submitNode
(
$
(
"#HPKC001"
),
"HPKC001"
,
"delete"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'删除成功'
});
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
:
function
(
ei
)
{
// onFail
// 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
}
});
});
});
});
}
},
},
onSuccess
:
function
(
e
)
{
if
(
e
.
type
!=
'read'
)
{
// 新增、修改、删除的时候刷新页面
resultGrid
.
dataSource
.
page
(
1
);
}
showPreview
();
}
};
};
});
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 存货名称
let
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ006"
,
"queryMaterialComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
materialCodeGlobalData
=
ei
.
getBlock
(
"material_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
EiCommunicator
.
send
(
"HPPZ006"
,
"queryComboBoxSpec"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
specGlobalData
=
ei
.
getBlock
(
"invent_spec_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
EiCommunicator
.
send
(
"HPPZ007"
,
"queryComboBox"
,
inInfo
,
{
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/HPKC001.jsp
View file @
2036bf4d
...
@@ -25,39 +25,25 @@
...
@@ -25,39 +25,25 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"false"
isFloat=
"true"
autoFit=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"false"
isFloat=
"true"
autoFit=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"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=
"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:EFColumn
ename=
"documentCode"
cname=
"采购入库单号"
width=
"100"
readonly=
"false"
align=
"center"
required=
"false"
enable=
"false"
/>
<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"
<EF:EFComboColumn
ename=
"materialType"
cname=
"物料类型"
cname=
"物料类型"
columnTemplate=
"#=textField#"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"customer_type_block_id"
blockName=
"customer_type_block_id"
textField=
"textField"
textField=
"textField"
valueField=
"
text
Field"
valueField=
"
value
Field"
align=
"center"
align=
"center"
filter=
"contains"
filter=
"contains"
width=
"100"
width=
"100"
required=
"true"
>
>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"materialTypeName"
cname=
"物料类型名称"
width=
"100"
readonly=
"true"
enable=
"false"
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=
"materialCode"
cname=
"物料编码"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
enable=
"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"
enable=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"
unit"
cname=
"单位"
width=
"80"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"
spec"
cname=
"规格"
width=
"120"
readonly=
"false"
align=
"center"
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=
"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=
"weight"
cname=
"重量"
defaultValue=
"0"
data-rules=
"number"
maxLength=
"20"
width=
"100"
align=
"right"
readonly=
"false"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
width=
"100"
readonly=
"false"
/>
<EF:EFColumn
ename=
"remarks"
cname=
"备注"
width=
"100"
readonly=
"false"
/>
...
...
src/main/webapp/HP/PZ/HPPZ007.js
View file @
2036bf4d
...
@@ -12,4 +12,4 @@ $(function () {
...
@@ -12,4 +12,4 @@ $(function () {
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
},
}
}
});
});
\ No newline at end of file
src/main/webapp/HP/PZ/HPPZ007.jsp
View file @
2036bf4d
...
@@ -24,10 +24,21 @@
...
@@ -24,10 +24,21 @@
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"whType"
<EF:EFColumn
ename=
"whType"
cname=
"仓库类型"
/>
cname=
"仓库类型"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"customer_type_block_id"
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
width=
"100"
required=
"true"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
/>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
/>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
/>
...
@@ -49,4 +60,4 @@
...
@@ -49,4 +60,4 @@
<script>
<script>
var
ctx
=
"${ctx}"
;
var
ctx
=
"${ctx}"
;
</script>
</script>
<script
src=
"${ctx}/HP/PZ/HPPZ007.js"
></script>
<script
src=
"${ctx}/HP/PZ/HPPZ007.js"
></script>
\ 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