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
e7f11fa5
Commit
e7f11fa5
authored
Jan 23, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时库存管理;
parent
77d284d6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
264 additions
and
139 deletions
+264
-139
DdynamicEnum.java
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
+1
-1
HPKC010.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC010.java
+99
-99
ServiceHPKC010.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
+43
-0
HPKC010.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC010.xml
+4
-4
ServiceHPPZ006.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
+2
-0
HPPZ006.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ006.xml
+0
-2
HPKC010.js
src/main/webapp/HP/KC/HPKC010.js
+108
-9
HPKC010.jsp
src/main/webapp/HP/KC/HPKC010.jsp
+7
-24
No files found.
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
View file @
e7f11fa5
...
...
@@ -55,7 +55,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框
* 编写:wwl
*/
INVENT_ALL_BLOCK_ID
(
"invent_all_block_id"
,
"id"
,
"
inventType"
,
"inventName"
,
"
spec"
,
"material"
,
"unit"
,
"HPPZ006.queryComboBoxAll"
),
INVENT_ALL_BLOCK_ID
(
"invent_all_block_id"
,
"id"
,
"spec"
,
"material"
,
"unit"
,
"HPPZ006.queryComboBoxAll"
),
/**
* 模块:存货档案(规格)
...
...
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC010.java
View file @
e7f11fa5
...
...
@@ -26,10 +26,10 @@ public class HPKC010 extends DaoEPBase {
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
//
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
//
public static final String FIELD_INVENT_TYPE = "inventType"; /* 物料类型*/
//
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
//
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 物料类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 物料编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 物料名称*/
public
static
final
String
FIELD_INVENT_RECORD_ID
=
"inventRecordId"
;
/* 存货档案ID*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 账面数量*/
public
static
final
String
FIELD_WEIGHT
=
"weight"
;
/* 账面重量*/
...
...
@@ -44,10 +44,10 @@ public class HPKC010 extends DaoEPBase {
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_WH_CODE
=
"WH_CODE"
;
/* 仓库编码*/
//
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
//
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 物料类型*/
//
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
//
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public
static
final
String
COL_WH_NAME
=
"WH_NAME"
;
/* 仓库名称*/
public
static
final
String
COL_INVENT_TYPE
=
"INVENT_TYPE"
;
/* 物料类型*/
public
static
final
String
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 物料编码*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 物料名称*/
public
static
final
String
COL_INVENT_RECORD_ID
=
"inventRecordId"
;
/* 存货档案ID*/
public
static
final
String
COL_AMOUNT
=
"amount"
;
/* 数量*/
public
static
final
String
COL_WEIGHT
=
"weight"
;
/* 重量*/
...
...
@@ -68,10 +68,10 @@ public class HPKC010 extends DaoEPBase {
private
Long
id
=
new
Long
(
0
);
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
whCode
=
" "
;
/* 仓库编码*/
//
private String whName = " "; /* 仓库名称*/
//
private String inventType = " "; /* 物料类型*/
//
private String inventCode = " "; /* 物料编码*/
//
private String inventName = " "; /* 物料名称*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
inventType
=
" "
;
/* 物料类型*/
private
String
inventCode
=
" "
;
/* 物料编码*/
private
String
inventName
=
" "
;
/* 物料名称*/
private
Long
inventRecordId
=
new
Long
(
0
);
/* 存货档案ID*/
private
BigDecimal
amount
=
new
BigDecimal
(
0.00
);
/* 数量*/
private
BigDecimal
weight
=
new
BigDecimal
(
0.00
);
/* 重量*/
...
...
@@ -102,21 +102,21 @@ public class HPKC010 extends DaoEPBase {
eiColumn
.
setDescName
(
"仓库编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
//
eiColumn = new EiColumn(FIELD_WH_NAME);
//
eiColumn.setDescName("仓库名称");
//
eiMetadata.addMeta(eiColumn);
//
//
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
//
eiColumn.setDescName("存货类型");
//
eiMetadata.addMeta(eiColumn);
//
//
eiColumn = new EiColumn(FIELD_INVENT_CODE);
//
eiColumn.setDescName("存货编码");
//
eiMetadata.addMeta(eiColumn);
//
//
eiColumn = new EiColumn(FIELD_INVENT_NAME);
//
eiColumn.setDescName("存货名称");
//
eiMetadata.addMeta(eiColumn);
eiColumn
=
new
EiColumn
(
FIELD_WH_NAME
);
eiColumn
.
setDescName
(
"仓库名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"存货编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"存货档案ID"
);
...
...
@@ -223,70 +223,70 @@ public class HPKC010 extends DaoEPBase {
public
void
setWhCode
(
String
whCode
)
{
this
.
whCode
=
whCode
;
}
//
/**
//
* get the whName - 仓库名称.
//
* @return the whName
//
*/
//
public String getWhName() {
//
return this.whName;
//
}
//
//
/**
//
* set the whName - 仓库名称.
//
*
//
* @param whName - 仓库名称
//
*/
//
public void setWhName(String whName) {
//
this.whName = whName;
//
}
//
/**
//
* get the matType - 物料类型.
//
* @return the matType
//
*/
//
public String getInventType() {
//
return this.inventType;
//
}
//
//
/**
//
* set the matType - 物料类型.
//
*
//
* @param inventType - 物料类型
//
*/
//
public void setInventType(String inventType) {
//
this.inventType = inventType;
//
}
//
/**
//
* get the matCode - 物料编码.
//
* @return the matCode
//
*/
//
public String getInventCode() {
//
return this.inventCode;
//
}
//
//
/**
//
* set the matCode - 物料编码.
//
*
//
* @param inventCode - 物料编码
//
*/
//
public void setInventCode(String inventCode) {
//
this.inventCode = inventCode;
//
}
//
/**
//
* get the matName - 物料名称.
//
* @return the matName
//
*/
//
public String getInventName() {
//
return this.inventName;
//
}
//
//
/**
//
* set the matName - 物料名称.
//
*
//
* @param inventName - 物料名称
//
*/
//
public void setInventName(String inventName) {
//
this.inventName = inventName;
//
}
/**
* get the whName - 仓库名称.
* @return the whName
*/
public
String
getWhName
()
{
return
this
.
whName
;
}
/**
* set the whName - 仓库名称.
*
* @param whName - 仓库名称
*/
public
void
setWhName
(
String
whName
)
{
this
.
whName
=
whName
;
}
/**
* get the matType - 物料类型.
* @return the matType
*/
public
String
getInventType
()
{
return
this
.
inventType
;
}
/**
* set the matType - 物料类型.
*
* @param inventType - 物料类型
*/
public
void
setInventType
(
String
inventType
)
{
this
.
inventType
=
inventType
;
}
/**
* get the matCode - 物料编码.
* @return the matCode
*/
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the matCode - 物料编码.
*
* @param inventCode - 物料编码
*/
public
void
setInventCode
(
String
inventCode
)
{
this
.
inventCode
=
inventCode
;
}
/**
* get the matName - 物料名称.
* @return the matName
*/
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the matName - 物料名称.
*
* @param inventName - 物料名称
*/
public
void
setInventName
(
String
inventName
)
{
this
.
inventName
=
inventName
;
}
public
Long
getInventRecordId
()
{
return
inventRecordId
;
...
...
@@ -420,10 +420,10 @@ public class HPKC010 extends DaoEPBase {
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
//
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
//
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
//
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
//
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
id
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WEIGHT
)),
weight
));
...
...
@@ -446,10 +446,10 @@ public class HPKC010 extends DaoEPBase {
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
//
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
//
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
//
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
//
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_WEIGHT
,
StringUtils
.
toString
(
weight
,
eiMetadata
.
getMeta
(
FIELD_WEIGHT
)));
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
View file @
e7f11fa5
...
...
@@ -3,6 +3,8 @@ package com.baosight.hpjx.hp.kc.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ006
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
...
@@ -10,6 +12,7 @@ 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.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.util.DateUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -187,6 +190,7 @@ public class ServiceHPKC010 extends ServiceBase {
||
Objects
.
isNull
(
amout
)||
weight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
throw
new
PlatException
(
"当前库存为空,库存变更数量与重量不能小于等于0!"
);
}
generatorBaseInfo
(
newObj
);
DaoUtils
.
insert
(
"insert"
,
newObj
);
}
else
{
//修改
...
...
@@ -243,6 +247,45 @@ public class ServiceHPKC010 extends ServiceBase {
return
hpkc010
;
}
private
void
generatorBaseInfo
(
HPKC010
hpkc010
)
{
String
whName
=
""
;
Integer
inventType
=
new
Integer
(
0
);
String
inventCode
=
""
;
String
inventName
=
""
;
EiInfo
inInfo
=
new
EiInfo
();
try
{
inInfo
.
set
(
"whCode"
,
hpkc010
.
getWhCode
());
inInfo
.
set
(
EiConstant
.
serviceName
,
"HPPZ007"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"queryByWhCode"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
List
<
HPPZ007
>
whNameList
=
(
List
)
outInfo
.
get
(
"list"
);
whName
=
whNameList
.
get
(
0
).
getWhName
();
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"库存更新失败!"
);
throw
new
PlatException
(
"仓库编码异常,找不到对应的仓库档案!"
);
}
try
{
inInfo
.
setRows
(
EiConstant
.
queryBlock
,
new
ArrayList
(){{
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
"id"
,
hpkc010
.
getInventRecordId
());}});}});
inInfo
.
set
(
EiConstant
.
serviceName
,
"HPPZ006"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"query"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
HPPZ006
hppz006
=
new
HPPZ006
();
List
<
Map
>
inventList
=
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
hppz006
.
fromMap
(
inventList
.
get
(
0
));
inventType
=
hppz006
.
getInventType
();
inventCode
=
hppz006
.
getInventCode
();
inventName
=
hppz006
.
getInventName
();
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"库存更新失败!"
);
throw
new
PlatException
(
"存货档案ID异常,找不到对应的存货档案!"
);
}
hpkc010
.
setWhName
(
whName
);
hpkc010
.
setInventType
(
inventType
.
toString
());
hpkc010
.
setInventCode
(
inventCode
);
hpkc010
.
setInventName
(
inventName
);
}
/**
* 校验库存变更请求参数
* @param companyCode
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC010.xml
View file @
e7f11fa5
...
...
@@ -6,10 +6,10 @@
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
<!-- WH_NAME as "whName", <!– 仓库名称 –>
-->
<!-- INVENT_TYPE as "inventType", <!– 物料类型 –>
-->
<!-- INVENT_CODE as "inventCode", <!– 物料编码 –>
-->
<!-- INVENT_NAME as "inventName", <!– 物料名称 –>
-->
WH_NAME as "whName",
<!-- 仓库名称
-->
INVENT_TYPE as "inventType",
<!-- 物料类型
-->
INVENT_CODE as "inventCode",
<!-- 物料编码
-->
INVENT_NAME as "inventName",
<!-- 物料名称
-->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
AMOUNT as "amount",
<!-- 数量 -->
WEIGHT as "weight",
<!-- 重量 -->
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
View file @
e7f11fa5
...
...
@@ -15,6 +15,7 @@ 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
;
...
...
@@ -194,4 +195,5 @@ public class ServiceHPPZ006 extends ServiceBase {
}
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ006.xml
View file @
e7f11fa5
...
...
@@ -200,8 +200,6 @@
<select
id=
"queryComboBoxAll"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
ID AS "id",
INVENT_TYPE AS "inventType",
CONCAT(INVENT_CODE,'-',INVENT_NAME) AS "inventName",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
MATERIAL AS "material" ,
<!-- 材质 -->
UNIT AS "unit"
<!-- 单位 -->
...
...
src/main/webapp/HP/KC/HPKC010.js
View file @
e7f11fa5
...
...
@@ -9,6 +9,97 @@ $(function() {
IPLATUI
.
EFGrid
=
{
"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
:
"spec"
,
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
)
{
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#"
});
}
},
{
field
:
"material"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
specGlobalData
.
length
;
i
++
)
{
if
(
specGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventRecordId'
])
{
return
specGlobalData
[
i
][
'param1Field'
];
}
}
return
""
;
}
},
{
field
:
"unit"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
specGlobalData
.
length
;
i
++
)
{
if
(
specGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventRecordId'
])
{
return
specGlobalData
[
i
][
'param2Field'
];
}
}
return
""
;
}
}],
loadComplete
:
function
(
grid
)
{
//删除
$
(
"#DELETE"
).
on
(
"click"
,
function
()
{
...
...
@@ -55,15 +146,23 @@ $(function() {
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// let eiInfo = new EiInfo();
// // 规格
// EiCommunicator.send("HPPZ006", "queryComboBoxAll", eiInfo, {
// onSuccess: function (ei) {
// specGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// 存货名称
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"
,
"queryComboBoxAll"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
specGlobalData
=
ei
.
getBlock
(
"invent_all_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 查询
query
();
});
...
...
src/main/webapp/HP/KC/HPKC010.jsp
View file @
e7f11fa5
...
...
@@ -30,31 +30,14 @@
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"120"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"invent_all_block_id"
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"120"
columnTemplate=
"#=param1Field#"
itemTemplate=
"#=param1Field#"
blockName=
"invent_all_block_id"
textField=
"param1Field"
valueField=
"valueField"
align=
"center"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"spec"
cname=
"规格"
width=
"120"
columnTemplate=
"#=param2Field#"
itemTemplate=
"#=param2Field#"
blockName=
"invent_all_block_id"
textField=
"param2Field"
valueField=
"valueField"
align=
"center"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"material"
cname=
"材质"
width=
"120"
columnTemplate=
"#=param3Field#"
itemTemplate=
"#=param3Field#"
blockName=
"invent_all_block_id"
textField=
"param3Field"
valueField=
"valueField"
align=
"center"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"unit"
cname=
"单位"
width=
"120"
columnTemplate=
"#=param4Field#"
itemTemplate=
"#=param4Field#"
blockName=
"invent_all_block_id"
textField=
"param4Field"
valueField=
"valueField"
align=
"center"
filter=
"contains"
>
<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=
"spec"
cname=
"规格"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"amount"
cname=
"数量"
format=
"{0:N3}"
maxLength=
"20"
width=
"90"
align=
"right"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
format=
"{0:N3}"
maxLength=
"20"
width=
"90"
align=
"right"
/>
<EF:EFColumn
ename=
"createdBy"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
...
...
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