Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
f2a12697
Commit
f2a12697
authored
Jun 04, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
其他入库单,其他出库单
parent
5aff4d51
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
149 additions
and
120 deletions
+149
-120
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+35
-0
HGConstants.java
src/main/java/com/baosight/hggp/common/HGConstants.java
+3
-0
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+15
-0
ServiceHGKC006.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
+1
-1
ServiceHGKC006A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC006A.java
+0
-1
ServiceHGKC007.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
+1
-1
ServiceHGKC007A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC007A.java
+0
-1
HGKC006.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006.xml
+1
-1
HGKC006A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
+1
-1
HGKC007.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007.xml
+1
-1
HGKC007A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
+1
-1
ServiceHGPZ005.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
+12
-0
HGPZ005.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
+19
-0
CommonMethod.java
src/main/java/com/baosight/hggp/util/CommonMethod.java
+2
-0
HGKC006.jsp
src/main/webapp/HG/KC/HGKC006.jsp
+3
-0
HGKC006A.js
src/main/webapp/HG/KC/HGKC006A.js
+22
-53
HGKC006A.jsp
src/main/webapp/HG/KC/HGKC006A.jsp
+4
-2
HGKC007.jsp
src/main/webapp/HG/KC/HGKC007.jsp
+3
-1
HGKC007A.js
src/main/webapp/HG/KC/HGKC007A.js
+22
-54
HGKC007A.jsp
src/main/webapp/HG/KC/HGKC007A.jsp
+3
-2
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
f2a12697
...
...
@@ -108,6 +108,15 @@ public enum DdynamicEnum {
INVENT_ALL_BOX_BLOCK_ID
(
"invent_all_box_block_id"
,
"id"
,
"spec"
,
"material"
,
"unit"
,
"length"
,
"width"
,
"thick"
,
"coefficient"
,
"status"
,
"HGPZ005.queryInventBoxAll"
),
/**
* 模块:存货档案(ALL 不默认状态)
* 用途:存货档案下拉框
* 编写:
*/
INVENT_NAME_BOX_BLOCK_ID
(
"invent_name_box_block_id"
,
"inventCode"
,
"inventText"
,
"inventName"
,
"spec"
,
"inventType"
,
"length"
,
"width"
,
"thick"
,
"coefficient"
,
"id"
,
"HGPZ005.queryInventNameBox"
),
/**
* 模块:规格
* 用途:存货档案下拉框
...
...
@@ -347,6 +356,8 @@ public enum DdynamicEnum {
private
String
param8
;
private
String
param9
;
private
String
param10
;
/** 数据源 */
private
final
String
dbSource
;
...
...
@@ -456,6 +467,22 @@ public enum DdynamicEnum {
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
dbSource
)
{
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
param1
=
param1
;
this
.
param2
=
param2
;
this
.
param3
=
param3
;
this
.
param4
=
param4
;
this
.
param5
=
param5
;
this
.
param6
=
param6
;
this
.
param7
=
param7
;
this
.
param8
=
param8
;
this
.
dbSource
=
dbSource
;
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
param9
,
String
dbSource
)
{
this
.
blockId
=
blockId
;
this
.
value
=
value
;
...
...
@@ -472,6 +499,7 @@ public enum DdynamicEnum {
this
.
dbSource
=
dbSource
;
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
param9
,
String
dbSource
,
Map
paramMap
)
{
...
...
@@ -594,6 +622,13 @@ public enum DdynamicEnum {
this
.
param9
=
param9
;
}
public
String
getParam10
()
{
return
param10
;
}
public
void
setParam10
(
String
param10
)
{
this
.
param10
=
param10
;
}
public
Map
getParamMap
()
{
return
paramMap
;
}
...
...
src/main/java/com/baosight/hggp/common/HGConstants.java
View file @
f2a12697
...
...
@@ -64,6 +64,9 @@ public class HGConstants {
public
static
final
String
PARAM9_FIELD
=
"param9Field"
;
/** 前后台交互下拉框字段 字段名 dzg */
public
static
final
String
PARAM10_FIELD
=
"param10Field"
;
/** 前后台交互下拉框字段 字段名 dzg */
public
static
final
String
VALUE_FIELD
=
"valueField"
;
public
static
final
String
PARAM_FILENAME
=
"fileName"
;
...
...
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
f2a12697
...
...
@@ -263,6 +263,21 @@ public class HGConstant {
/**
*
* 数据来源
* @author:songx
* @date:2024/5/15,15:18
*/
public
static
class
Source
{
// 盘点
public
static
final
Integer
PD
=
1
;
// 调拨
public
static
final
Integer
DB
=
2
;
// 其他
public
static
final
Integer
QT
=
3
;
}
/**
*
* 物料变动状态
* @author:songx
* @date:2024/5/15,15:18
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
View file @
f2a12697
...
...
@@ -136,7 +136,7 @@ public class ServiceHGKC006 extends ServiceBase {
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
hgkc006
.
setCompanyCode
(
userVO
.
getUsercode
());
hgkc006
.
setCompanyName
(
userVO
.
getUsername
());
hgkc006
.
setSource
(
1
);
hgkc006
.
setSource
(
HGConstant
.
Source
.
QT
);
DaoUtils
.
insert
(
HGKC006
.
INSERT
,
hgkc006
);
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006A.java
View file @
f2a12697
...
...
@@ -124,7 +124,6 @@ public class ServiceHGKC006A extends ServiceBase {
*/
private
void
add
(
HGKC006A
hgkc006A
,
HGKC006
hgkc006
)
throws
Exception
{
hgkc006A
.
setPrimaryId
(
hgkc006
.
getId
());
hgkc006A
.
setSource
(
1
);
hgkc006A
.
setOtherEnterNo
(
hgkc006
.
getOtherEnterNo
());
DaoUtils
.
insert
(
HGKC006A
.
INSERT
,
hgkc006A
);
// 更新库存数量
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
View file @
f2a12697
...
...
@@ -137,7 +137,7 @@ public class ServiceHGKC007 extends ServiceBase {
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
hgkc007
.
setCompanyCode
(
userVO
.
getUsercode
());
hgkc007
.
setCompanyName
(
userVO
.
getUsername
());
hgkc007
.
setSource
(
1
);
hgkc007
.
setSource
(
HGConstant
.
Source
.
QT
);
DaoUtils
.
insert
(
HGKC007
.
INSERT
,
hgkc007
);
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC007A.java
View file @
f2a12697
...
...
@@ -126,7 +126,6 @@ public class ServiceHGKC007A extends ServiceBase {
*/
private
void
add
(
HGKC007A
hgkc007A
,
HGKC007
hgkc007
)
throws
Exception
{
hgkc007A
.
setPrimaryId
(
hgkc007
.
getId
());
hgkc007A
.
setSource
(
1
);
hgkc007A
.
setOtherOutNo
(
hgkc007
.
getOtherOutNo
());
DaoUtils
.
insert
(
HGKC007A
.
INSERT
,
hgkc007A
);
// 更新库存数量
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006.xml
View file @
f2a12697
...
...
@@ -215,7 +215,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID a
sc
CREATED_TIME de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
View file @
f2a12697
...
...
@@ -260,7 +260,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID a
sc
CREATED_TIME de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007.xml
View file @
f2a12697
...
...
@@ -215,7 +215,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID a
sc
CREATED_TIME de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
View file @
f2a12697
...
...
@@ -260,7 +260,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID a
sc
CREATED_TIME de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
f2a12697
...
...
@@ -301,6 +301,18 @@ public class ServiceHGPZ005 extends ServiceBase {
return
inInfo
;
}
public
EiInfo
queryInventNameBox
(
EiInfo
inInfo
)
{
try
{
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
INVENT_NAME_BOX_BLOCK_ID
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
EiInfoUtils
.
getFirstRow
(
inInfo
),
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询规格失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"存货档案"
,
operType
=
"导入"
,
operDesc
=
"导入操作"
)
public
EiInfo
importDate
(
EiInfo
inInfo
)
{
try
{
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
View file @
f2a12697
...
...
@@ -386,6 +386,25 @@
<include
refid=
"condition"
/>
ORDER BY ID
</select>
<select
id=
"queryInventNameBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
INVENT_CODE as "inventCode",
CONCAT('[',INVENT_CODE,']',INVENT_NAME,(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END)) as "inventText",
INVENT_NAME as "inventName",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
INVENT_TYPE as "inventType",
LENGTH AS "length" ,
<!-- 长 -->
WIDTH AS "width" ,
<!-- 宽 -->
THICK AS "thick" ,
<!-- 厚 -->
COEFFICIENT AS "coefficient",
<!-- 系数 -->
ID AS "id"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
AND STATUS = 1
<include
refid=
"condition"
/>
ORDER BY INVENT_CODE
</select>
<!---->
<select
id=
"queryInventBoxAll"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
...
...
src/main/java/com/baosight/hggp/util/CommonMethod.java
View file @
f2a12697
...
...
@@ -105,6 +105,7 @@ public class CommonMethod {
row
.
put
(
HGConstants
.
PARAM7_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
HGConstants
.
PARAM8_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
HGConstants
.
PARAM9_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam9
())));
row
.
put
(
HGConstants
.
PARAM10_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam10
())));
}
else
{
row
.
put
(
HGConstants
.
TEXT_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
HGConstants
.
PARAM1_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam1
())));
...
...
@@ -116,6 +117,7 @@ public class CommonMethod {
row
.
put
(
HGConstants
.
PARAM7_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
HGConstants
.
PARAM8_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
HGConstants
.
PARAM9_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam9
())));
row
.
put
(
HGConstants
.
PARAM10_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam10
())));
}
resultRows
.
add
(
row
);
}
...
...
src/main/webapp/HG/KC/HGKC006.jsp
View file @
f2a12697
...
...
@@ -54,6 +54,9 @@
<EF:EFComboColumn
cname=
"状态"
ename=
"submitStatus"
width=
"90"
align=
"center"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hpkc.submitStatus"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
cname=
"数据来源"
ename=
"source"
width=
"90"
align=
"center"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hpkc.source"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/KC/HGKC006A.js
View file @
f2a12697
...
...
@@ -17,7 +17,7 @@ $(function () {
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
InventNameGlobalData
.
length
;
i
++
)
{
if
(
InventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
dataItem
[
'inventName'
]
=
InventNameGlobalData
[
i
][
'
text
Field'
];
dataItem
[
'inventName'
]
=
InventNameGlobalData
[
i
][
'
param1
Field'
];
return
InventNameGlobalData
[
i
][
'textField'
];
}
}
...
...
@@ -25,35 +25,10 @@ $(function () {
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"queryComboBox"
);
inInfo
.
set
(
"blockId"
,
"invent_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
},{
field
:
"inventRecordId"
,
filter
:
function
(
options
)
{
return
_
.
filter
(
inventAllGlobalData
,
function
(
item
)
{
return
item
[
"param7Field"
]
==
"true"
;
})
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
inventAllGlobalData
.
length
;
i
++
)
{
if
(
inventAllGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventRecordId'
])
{
return
inventAllGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"queryInventBoxAll"
);
inInfo
.
set
(
"blockId"
,
"invent_all_box_block_id"
);
inInfo
.
set
(
"methodName"
,
"queryInventNameBox"
);
inInfo
.
set
(
"blockId"
,
"invent_name_box_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
...
...
@@ -96,31 +71,23 @@ $(function () {
loadComplete
:
function
(
grid
)
{
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
if
(
e
.
field
===
"inventCode"
){
loadChange
(
grid
,
e
,
"inventRecordId"
);
}
else
if
(
e
.
field
==
"inventRecordId"
)
{
if
(
e
.
field
==
"inventCode"
)
{
var
tr
,
index
;
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
for
(
let
i
=
0
;
i
<
inventAllGlobalData
.
length
;
i
++
)
{
if
(
inventAllGlobalData
[
i
][
'valueField'
]
===
item
.
inventRecordId
)
{
resultGrid
.
setCellValue
(
item
,
'partLength'
,
inventAllGlobalData
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
inventAllGlobalData
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'partThick'
,
inventAllGlobalData
[
i
][
'param5Field'
])
if
(
inventAllGlobalData
[
i
][
'valueField'
]
===
item
.
inventCode
)
{
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
inventAllGlobalData
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'inventType'
,
inventAllGlobalData
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'partLength'
,
inventAllGlobalData
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
inventAllGlobalData
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'partThick'
,
inventAllGlobalData
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'coefficient'
,
inventAllGlobalData
[
i
][
'param7Field'
])
resultGrid
.
setCellValue
(
item
,
'inventRecordId'
,
inventAllGlobalData
[
i
][
'param8Field'
])
calUnitWeight
(
item
,
inventAllGlobalData
[
i
][
'param4Field'
],
inventAllGlobalData
[
i
][
'param5Field'
],
inventAllGlobalData
[
i
][
'param6Field'
],
inventAllGlobalData
[
i
][
'param7Field'
]);
}
}
}
/* if (e.field == "invQty") {
loadChange(grid,e,"invWeight");
loadChange(grid,e,"amount");
}
if (e.field == "invUnitWeight") {
loadChange(grid,e,"invWeight");
}
if (e.field == "price") {
loadChange(grid,e,"amount");
}*/
});
},
onSave
:
function
(
e
)
{
...
...
@@ -192,9 +159,9 @@ let initSpec = function () {
let
inInfo
=
new
EiInfo
();
//inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInvent
BoxAll
"
,
inInfo
,
{
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInvent
NameBox
"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventAllGlobalData
=
ei
.
getBlock
(
"invent_
all
_box_block_id"
).
getMappedRows
();
inventAllGlobalData
=
ei
.
getBlock
(
"invent_
name
_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
...
...
@@ -223,6 +190,13 @@ let selectTaskCallback = function () {
JSColorbox
.
close
();
}
let
calUnitWeight
=
function
(
item
,
length
,
width
,
thick
,
coefficient
)
{
if
(
length
&&
width
&&
thick
&&
coefficient
){
let
amount
=
length
*
width
*
thick
*
coefficient
/
1000000
;
//item['amount'] = amount.toString();
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
amount
);
}
}
/**
* 保存
...
...
@@ -248,11 +222,6 @@ let save = function () {
flag
=
false
;
return
false
;
}
if
(
isBlank
(
inventRecordId
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
规格
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/KC/HGKC006A.jsp
View file @
f2a12697
...
...
@@ -32,15 +32,17 @@
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"120"
align=
"center"
required=
"true"
blockName=
"invent_type_box_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly
=
"false"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable
=
"false"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partThick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"coefficient"
cname=
"系数"
width=
"80"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
...
...
src/main/webapp/HG/KC/HGKC007.jsp
View file @
f2a12697
...
...
@@ -55,7 +55,9 @@
<EF:EFComboColumn
cname=
"状态"
ename=
"submitStatus"
width=
"90"
align=
"center"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hpkc.submitStatus"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
cname=
"数据来源"
ename=
"source"
width=
"90"
align=
"center"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hpkc.source"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/KC/HGKC007A.js
View file @
f2a12697
...
...
@@ -17,7 +17,7 @@ $(function () {
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
InventNameGlobalData
.
length
;
i
++
)
{
if
(
InventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
dataItem
[
'inventName'
]
=
InventNameGlobalData
[
i
][
'
text
Field'
];
dataItem
[
'inventName'
]
=
InventNameGlobalData
[
i
][
'
param1
Field'
];
return
InventNameGlobalData
[
i
][
'textField'
];
}
}
...
...
@@ -25,35 +25,10 @@ $(function () {
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"queryComboBox"
);
inInfo
.
set
(
"blockId"
,
"invent_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
},{
field
:
"inventRecordId"
,
filter
:
function
(
options
)
{
return
_
.
filter
(
inventAllGlobalData
,
function
(
item
)
{
return
item
[
"param7Field"
]
==
"true"
;
})
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
inventAllGlobalData
.
length
;
i
++
)
{
if
(
inventAllGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventRecordId'
])
{
return
inventAllGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"queryInventBoxAll"
);
inInfo
.
set
(
"blockId"
,
"invent_all_box_block_id"
);
inInfo
.
set
(
"methodName"
,
"queryInventNameBox"
);
inInfo
.
set
(
"blockId"
,
"invent_name_box_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
...
...
@@ -96,31 +71,23 @@ $(function () {
loadComplete
:
function
(
grid
)
{
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
if
(
e
.
field
===
"inventCode"
){
loadChange
(
grid
,
e
,
"inventRecordId"
);
}
else
if
(
e
.
field
==
"inventRecordId"
)
{
if
(
e
.
field
==
"inventCode"
)
{
var
tr
,
index
;
// 获取此model元素信息
var
item
=
e
.
items
[
0
];
for
(
let
i
=
0
;
i
<
inventAllGlobalData
.
length
;
i
++
)
{
if
(
inventAllGlobalData
[
i
][
'valueField'
]
===
item
.
inventRecordId
)
{
resultGrid
.
setCellValue
(
item
,
'partLength'
,
inventAllGlobalData
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
inventAllGlobalData
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'partThick'
,
inventAllGlobalData
[
i
][
'param5Field'
])
if
(
inventAllGlobalData
[
i
][
'valueField'
]
===
item
.
inventCode
)
{
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
inventAllGlobalData
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'inventType'
,
inventAllGlobalData
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'partLength'
,
inventAllGlobalData
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
inventAllGlobalData
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'partThick'
,
inventAllGlobalData
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'coefficient'
,
inventAllGlobalData
[
i
][
'param7Field'
])
resultGrid
.
setCellValue
(
item
,
'inventRecordId'
,
inventAllGlobalData
[
i
][
'param8Field'
])
calUnitWeight
(
item
,
inventAllGlobalData
[
i
][
'param4Field'
],
inventAllGlobalData
[
i
][
'param5Field'
],
inventAllGlobalData
[
i
][
'param6Field'
],
inventAllGlobalData
[
i
][
'param7Field'
]);
}
}
}
/* if (e.field == "invQty") {
loadChange(grid,e,"invWeight");
loadChange(grid,e,"amount");
}
if (e.field == "invUnitWeight") {
loadChange(grid,e,"invWeight");
}
if (e.field == "price") {
loadChange(grid,e,"amount");
}*/
});
},
onSave
:
function
(
e
)
{
...
...
@@ -192,9 +159,9 @@ let initSpec = function () {
let
inInfo
=
new
EiInfo
();
//inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInvent
BoxAll
"
,
inInfo
,
{
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInvent
NameBox
"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventAllGlobalData
=
ei
.
getBlock
(
"invent_
all
_box_block_id"
).
getMappedRows
();
inventAllGlobalData
=
ei
.
getBlock
(
"invent_
name
_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
...
...
@@ -224,7 +191,13 @@ let selectTaskCallback = function () {
JSColorbox
.
close
();
}
let
calUnitWeight
=
function
(
item
,
length
,
width
,
thick
,
coefficient
)
{
if
(
length
&&
width
&&
thick
&&
coefficient
){
let
amount
=
length
*
width
*
thick
*
coefficient
/
1000000
;
//item['amount'] = amount.toString();
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
amount
);
}
}
/**
* 保存
...
...
@@ -250,11 +223,6 @@ let save = function () {
flag
=
false
;
return
false
;
}
if
(
isBlank
(
inventRecordId
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
规格
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/KC/HGKC007A.jsp
View file @
f2a12697
...
...
@@ -24,12 +24,13 @@
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"120"
align=
"center"
required=
"true"
blockName=
"invent_type_box_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly
=
"false"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable
=
"false"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"规格"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partThick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
...
...
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