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
ee6b4164
Commit
ee6b4164
authored
Jun 05, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产领料提交修改实时库存操作、提交后数据隐藏按钮
parent
670e2dcf
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
7 deletions
+70
-7
ServiceHGKC008.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
+16
-0
ServiceHGKC008A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC008A.java
+2
-0
ServiceHGKC010.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC010.java
+2
-0
HGKC008.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008.xml
+3
-0
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+7
-0
HGKC008.js
src/main/webapp/HG/KC/HGKC008.js
+3
-3
HGKC008A.js
src/main/webapp/HG/KC/HGKC008A.js
+34
-4
HGKC008A.jsp
src/main/webapp/HG/KC/HGKC008A.jsp
+3
-0
No files found.
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
View file @
ee6b4164
...
...
@@ -5,6 +5,9 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC008
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -13,7 +16,9 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
...
...
@@ -122,6 +127,17 @@ public class ServiceHGKC008 extends ServiceBase {
hgkc008
.
fromMap
(
map
);
DaoUtils
.
update
(
HGKC008
.
UPDATE_STATUS
,
hgkc008
);
}
List
<
HGKC008A
>
hgkc008AList
=
HGKCTools
.
HgKc008A
.
getHgkc008aList
(
hgkc008
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
hgkc008AList
)){
for
(
HGKC008A
hgkc008A
:
hgkc008AList
){
//领料如果是正数则为出库,需要减少库存,如果是退回则要加库存
BigDecimal
qty
=
hgkc008A
.
getInvQty
().
multiply
(
new
BigDecimal
(-
1
));
//增加库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc008A
.
getCompanyCode
(),
hgkc008A
.
getWhCode
(),
hgkc008A
.
getInvSpecId
(),
qty
,
hgkc008A
.
getInvUnitWeight
(),
hgkc008A
.
getInvWeight
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008A.java
View file @
ee6b4164
...
...
@@ -111,6 +111,8 @@ public class ServiceHGKC008A extends ServiceBase {
hgkc008a
.
setProjName
(
hgkc008
.
getProjName
());
hgkc008a
.
setWhCode
(
hgkc008
.
getWhCode
());
hgkc008a
.
setWhName
(
hgkc008
.
getWhName
());
hgkc008a
.
setCompanyCode
(
hgkc008
.
getCompanyCode
());
hgkc008a
.
setCompanyName
(
hgkc008
.
getCompanyName
());
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
DEFAULT
)
==
0
){
//如果明细里面有负数的,主表就是退库
if
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC010.java
View file @
ee6b4164
...
...
@@ -74,10 +74,12 @@ public class ServiceHGKC010 extends ServiceBase {
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
whCode
=
MapUtils
.
getString
(
queryMap
,
HGKC010
.
FIELD_WH_CODE
);
String
inventType
=
MapUtils
.
getString
(
queryMap
,
HGKC010
.
FIELD_INVENT_TYPE
);
String
companyCode
=
MapUtils
.
getString
(
queryMap
,
HGKC010
.
FIELD_COMPANY_CODE
);
Map
map
=
new
HashMap
();
map
.
put
(
HGKC010
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
map
.
put
(
HGKC010
.
FIELD_WH_CODE
,
whCode
);
map
.
put
(
HGKC010
.
FIELD_INVENT_TYPE
,
inventType
);
map
.
put
(
HGKC010
.
FIELD_COMPANY_CODE
,
companyCode
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_CODE_BOX_BLOCK_ID
),
map
,
false
);
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008.xml
View file @
ee6b4164
...
...
@@ -95,6 +95,9 @@
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
ee6b4164
...
...
@@ -342,6 +342,13 @@ public class HGKCTools {
}
public
static
List
<
HGKC008A
>
getHgkc008aList
(
Long
receiveId
)
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"receiveId"
,
receiveId
);
List
<
HGKC008A
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC008A
.
QUERY
,
paramMap
);
return
results
;
}
}
/**
...
...
src/main/webapp/HG/KC/HGKC008.js
View file @
ee6b4164
...
...
@@ -30,7 +30,7 @@ $(function (){
let
template
=
''
;
if
(
item
.
id
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail('
+
item
.
id
+
',
\'
'
+
item
.
whCode
+
'
\'
)" >领料详情</a>'
;
+
'onclick="showDetail('
+
item
.
id
+
',
\'
'
+
item
.
whCode
+
'
\'
,
\'
'
+
item
.
companyCode
+
'
\'
,
\'
'
+
item
.
status
+
'
\'
)" >领料详情</a>'
;
if
(
status
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateStatus('
+
item
.
id
+
',1)" >提交</a>'
;
...
...
@@ -224,9 +224,9 @@ function updateStatus(id,status) {
/**
* 显示详情
*/
function
showDetail
(
id
,
whCode
)
{
function
showDetail
(
id
,
whCode
,
companyCode
,
status
)
{
JSColorbox
.
open
({
href
:
"HGKC008A?methodName=initLoad&inqu_status-0-receiveId="
+
id
+
"&inqu_status-0-whCode="
+
whCode
,
href
:
"HGKC008A?methodName=initLoad&inqu_status-0-receiveId="
+
id
+
"&inqu_status-0-whCode="
+
whCode
+
"&inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-status="
+
status
,
title
:
"<div style='text-align: center;'>领料详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HG/KC/HGKC008A.js
View file @
ee6b4164
...
...
@@ -6,7 +6,6 @@ $(function (){
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
...
...
@@ -67,6 +66,7 @@ $(function (){
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
...
...
@@ -100,6 +100,21 @@ $(function (){
item
[
'receiveId'
]
=
$
(
"#inqu_status-0-receiveId"
).
val
();
return
$
(
"#inqu_status-0-receiveId"
).
val
();
}
},
{
field
:
"whCode"
,
template
:
function
(
item
)
{
item
[
'whCode'
]
=
$
(
"#inqu_status-0-whCode"
).
val
();
return
$
(
"#inqu_status-0-whCode"
).
val
();
}
}
,
{
field
:
"companyCode"
,
template
:
function
(
item
)
{
item
[
'companyCode'
]
=
$
(
"#inqu_status-0-companyCode"
).
val
();
return
$
(
"#inqu_status-0-companyCode"
).
val
();
}
}
],
loadComplete
:
function
(
grid
)
{
...
...
@@ -130,9 +145,9 @@ $(function (){
if
(
e
.
field
==
"inventType"
)
{
//选择后,先加载此方法,再加载属性中的方法,所以存货类型加载时,先修改存货编号下拉框的查询
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]
);
inInfo
.
set
(
"inqu_status-0-
inventType"
,
options
.
model
[
"inventType"
]
);
inInfo
.
set
(
"
field"
,
options
.
field
);
inInfo
.
set
(
"inqu_status-0-whCode"
,
item
.
whCode
);
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
item
.
companyCode
);
inInfo
.
set
(
"
inqu_status-0-inventType"
,
item
.
inventType
);
EiCommunicator
.
send
(
"HGKC010"
,
"queryInventCodeBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventRecordBoxBlocks
=
ei
.
getBlock
(
"invent_code_box_block_id"
).
getMappedRows
();
...
...
@@ -220,6 +235,21 @@ $(function (){
downKeyUp
();
})
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
var
status
=
$
(
"#inqu_status-0-status"
).
val
();
//如果提交了,则不能修改
if
(
status
&&
status
===
"1"
){
$
(
'#add'
).
hide
();
$
(
'#save-changes'
).
hide
();
$
(
'#cancel-changes'
).
hide
();
$
(
'#delete'
).
hide
();
}
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/KC/HGKC008A.jsp
View file @
ee6b4164
...
...
@@ -14,6 +14,8 @@
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFInput
ename=
"inqu_status-0-receiveId"
cname=
"领料单id"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-whCode"
cname=
"仓库编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-companyCode"
cname=
"仓库编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-status"
cname=
"状态"
colWidth=
"3"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
...
...
@@ -28,6 +30,7 @@
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"receiveId"
cname=
"领料单id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
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"
...
...
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