Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warehouse
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
胡懿
warehouse
Commits
22a350e9
Commit
22a350e9
authored
Jun 06, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 47.92.228.5:huyi/warehouse into hy
parents
da2a05d8
6218a63f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
22 deletions
+73
-22
MaterialRequisition.java
...house/materialrequisition/entity/MaterialRequisition.java
+9
-0
MaterialRequisitionMapper.xml
...erialrequisition/mapper/xml/MaterialRequisitionMapper.xml
+4
-0
MaterialRequisitionService.java
...terialrequisition/service/MaterialRequisitionService.java
+5
-13
MaterialRequisitionController.java
...aterialrequisition/web/MaterialRequisitionController.java
+13
-2
materialRequisitionList.js
.../warehouse/materialrequisition/materialRequisitionList.js
+26
-0
materialRequisitionList.jsp
...warehouse/materialrequisition/materialRequisitionList.jsp
+16
-7
No files found.
src/main/java/com/jeeplus/modules/warehouse/materialrequisition/entity/MaterialRequisition.java
View file @
22a350e9
...
@@ -22,6 +22,7 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> {
...
@@ -22,6 +22,7 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
String
number
;
// 领用单号
private
String
number
;
// 领用单号
private
String
status
;
// 出库状态 1未出库 2已出库
private
User
operator
;
// 操作人
private
User
operator
;
// 操作人
// private String receiver; // 领用人
// private String receiver; // 领用人
private
Office
office
;
// 领用机构
private
Office
office
;
// 领用机构
...
@@ -72,6 +73,14 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> {
...
@@ -72,6 +73,14 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> {
return
time
;
return
time
;
}
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
void
setTime
(
Date
time
)
{
public
void
setTime
(
Date
time
)
{
this
.
time
=
time
;
this
.
time
=
time
;
}
}
...
...
src/main/java/com/jeeplus/modules/warehouse/materialrequisition/mapper/xml/MaterialRequisitionMapper.xml
View file @
22a350e9
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<sql
id=
"materialRequisitionColumns"
>
<sql
id=
"materialRequisitionColumns"
>
a.id AS "id",
a.id AS "id",
a.number AS "number",
a.number AS "number",
a.status AS "status",
a.operator AS "operator.id",
a.operator AS "operator.id",
a.collecting_office_id AS "office.id",
a.collecting_office_id AS "office.id",
a.time AS "time",
a.time AS "time",
...
@@ -87,6 +88,7 @@
...
@@ -87,6 +88,7 @@
INSERT INTO t_wh_material_requisition(
INSERT INTO t_wh_material_requisition(
id,
id,
number,
number,
status,
operator,
operator,
collecting_office_id,
collecting_office_id,
time,
time,
...
@@ -99,6 +101,7 @@
...
@@ -99,6 +101,7 @@
) VALUES (
) VALUES (
#{id},
#{id},
#{number},
#{number},
#{status},
#{operator.id},
#{operator.id},
#{office.id},
#{office.id},
#{time},
#{time},
...
@@ -114,6 +117,7 @@
...
@@ -114,6 +117,7 @@
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE t_wh_material_requisition SET
UPDATE t_wh_material_requisition SET
number = #{number},
number = #{number},
status = #{status},
operator = #{operator.id},
operator = #{operator.id},
collecting_office_id = #{office.id},
collecting_office_id = #{office.id},
time = #{time},
time = #{time},
...
...
src/main/java/com/jeeplus/modules/warehouse/materialrequisition/service/MaterialRequisitionService.java
View file @
22a350e9
...
@@ -68,23 +68,14 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM
...
@@ -68,23 +68,14 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
void
save
(
MaterialRequisition
materialRequisition
)
{
public
void
save
(
MaterialRequisition
materialRequisition
)
{
materialRequisition
.
setStatus
(
"1"
);
super
.
save
(
materialRequisition
);
super
.
save
(
materialRequisition
);
materialRequisitionInfoMapper
.
delete
(
new
MaterialRequisitionInfo
(
materialRequisition
));
for
(
MaterialRequisitionInfo
materialRequisitionInfo
:
materialRequisition
.
getMaterialRequisitionInfoList
()){
for
(
MaterialRequisitionInfo
materialRequisitionInfo
:
materialRequisition
.
getMaterialRequisitionInfoList
()){
materialRequisitionInfo
.
setId
(
null
);
materialRequisitionInfo
.
setMaterialRequisition
(
materialRequisition
);
materialRequisitionInfo
.
setMaterialRequisition
(
materialRequisition
);
if
(
materialRequisitionInfo
.
getId
()
==
null
){
continue
;
}
if
(
MaterialRequisitionInfo
.
DEL_FLAG_NORMAL
.
equals
(
materialRequisitionInfo
.
getDelFlag
())){
if
(
StringUtils
.
isBlank
(
materialRequisitionInfo
.
getId
())){
materialRequisitionInfo
.
preInsert
();
materialRequisitionInfo
.
preInsert
();
materialRequisitionInfoMapper
.
insert
(
materialRequisitionInfo
);
materialRequisitionInfoMapper
.
insert
(
materialRequisitionInfo
);
}
else
{
materialRequisitionInfo
.
preUpdate
();
materialRequisitionInfoMapper
.
update
(
materialRequisitionInfo
);
}
}
else
{
materialRequisitionInfoMapper
.
delete
(
materialRequisitionInfo
);
}
}
}
}
}
...
@@ -104,7 +95,8 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM
...
@@ -104,7 +95,8 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM
if
(
materialRequisition
.
getNumber
()
==
null
&&
Objects
.
equals
(
materialRequisition
.
getNumber
(),
""
)){
if
(
materialRequisition
.
getNumber
()
==
null
&&
Objects
.
equals
(
materialRequisition
.
getNumber
(),
""
)){
materialRequisition
.
setNumber
(
this
.
createLYDH
());
materialRequisition
.
setNumber
(
this
.
createLYDH
());
}
}
this
.
save
(
materialRequisition
);
materialRequisition
.
setStatus
(
"2"
);
super
.
save
(
materialRequisition
);
Outbound
outbound
=
new
Outbound
();
Outbound
outbound
=
new
Outbound
();
//设置相关表单id为领用主表的ID
//设置相关表单id为领用主表的ID
outbound
.
setRelationId
(
materialRequisition
.
getId
());
outbound
.
setRelationId
(
materialRequisition
.
getId
());
...
...
src/main/java/com/jeeplus/modules/warehouse/materialrequisition/web/MaterialRequisitionController.java
View file @
22a350e9
...
@@ -123,8 +123,14 @@ public class MaterialRequisitionController extends BaseController {
...
@@ -123,8 +123,14 @@ public class MaterialRequisitionController extends BaseController {
return
j
;
return
j
;
}
}
//新增或编辑表单保存
//新增或编辑表单保存
// materialRequisitionService.save(materialRequisition);//保存
if
(!
Objects
.
equals
(
materialRequisition
.
getStatus
(),
"2"
)){
materialRequisitionService
.
delivery
(
materialRequisition
);
materialRequisitionService
.
save
(
materialRequisition
);
//保存
}
else
{
j
.
setSuccess
(
false
);
j
.
setMsg
(
"该物资领用单已出库不可以修改"
);
return
j
;
}
// materialRequisitionService.delivery(materialRequisition);
j
.
setSuccess
(
true
);
j
.
setSuccess
(
true
);
j
.
setMsg
(
"保存物资领用成功"
);
j
.
setMsg
(
"保存物资领用成功"
);
...
@@ -263,6 +269,11 @@ public class MaterialRequisitionController extends BaseController {
...
@@ -263,6 +269,11 @@ public class MaterialRequisitionController extends BaseController {
}
}
//新增或编辑表单保存
//新增或编辑表单保存
// materialRequisitionService.save(materialRequisition);//保存
// materialRequisitionService.save(materialRequisition);//保存
if
(
Objects
.
equals
(
materialRequisition
.
getStatus
(),
"2"
)){
j
.
setSuccess
(
false
);
j
.
setMsg
(
"该物资已领用出库,不可重复领用"
);
return
j
;
}
materialRequisitionService
.
delivery
(
materialRequisition
);
materialRequisitionService
.
delivery
(
materialRequisition
);
j
.
setSuccess
(
true
);
j
.
setSuccess
(
true
);
j
.
setMsg
(
"保存物资领用成功"
);
j
.
setMsg
(
"保存物资领用成功"
);
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionList.js
View file @
22a350e9
...
@@ -121,6 +121,16 @@ $(document).ready(function() {
...
@@ -121,6 +121,16 @@ $(document).ready(function() {
}
}
,{
,{
field
:
'status'
,
title
:
'出库状态'
,
sortable
:
true
,
sortName
:
'status'
,
formatter
:
function
(
value
,
row
,
index
){
return
jp
.
getDictLabel
(
$
{
fns
:
toJson
(
fns
:
getDictList
(
'wh_delivery_status'
))},
value
,
"-"
);
}
}
,{
field
:
'remarks'
,
field
:
'remarks'
,
title
:
'备注信息'
,
title
:
'备注信息'
,
sortable
:
true
,
sortable
:
true
,
...
@@ -142,6 +152,7 @@ $(document).ready(function() {
...
@@ -142,6 +152,7 @@ $(document).ready(function() {
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
$
(
'#delivery'
).
prop
(
'disabled'
,
!
(
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'getSelections'
).
length
==
1
&&
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'getSelections'
)[
0
].
status
==
'1'
));
});
});
$
(
"#btnImport"
).
click
(
function
(){
$
(
"#btnImport"
).
click
(
function
(){
...
@@ -279,6 +290,21 @@ $(document).ready(function() {
...
@@ -279,6 +290,21 @@ $(document).ready(function() {
}));
}));
}
}
/**
* 出库
*/
function
onDelivery
(){
jp
.
confirm
(
'确认是否出库?'
,
function
(){
jp
.
get
(
'${ctx}/warehouse/materialrequisition/materialRequisition/delivery?id='
+
getIdSelections
(),
function
(
res
){
if
(
res
.
success
){
jp
.
success
(
res
.
msg
);
refresh
();
}
else
{
jp
.
error
(
res
.
msg
);
}
})
})
}
<
/script
>
<
/script
>
<
script
type
=
"text/template"
id
=
"materialRequisitionChildrenTpl"
>
//<!--
<
script
type
=
"text/template"
id
=
"materialRequisitionChildrenTpl"
>
//<!--
<
div
class
=
"tabs-container"
>
<
div
class
=
"tabs-container"
>
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionList.jsp
View file @
22a350e9
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<html>
<head>
<head>
<title>
物资领用管理
</title>
<title>
物资领用管理
</title>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
name=
"decorator"
content=
"ani"
/>
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"materialRequisitionList.js"
%
>
<
%@
include
file=
"materialRequisitionList.js"
%
>
</head>
</head>
<body>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
物资领用列表
</h3>
<h3
class=
"panel-title"
>
物资领用列表
</h3>
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
<!-- 搜索 -->
<!-- 搜索 -->
<div
id=
"search-collapse"
class=
"collapse"
>
<div
id=
"search-collapse"
class=
"collapse"
>
<div
class=
"accordion-inner"
>
<div
class=
"accordion-inner"
>
<form:form
id=
"searchForm"
modelAttribute=
"materialRequisition"
class=
"form form-horizontal well clearfix"
>
<form:form
id=
"searchForm"
modelAttribute=
"materialRequisition"
class=
"form form-horizontal well clearfix"
>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<label
class=
"label-item single-overflow pull-left"
title=
"领用单号:"
>
领用单号:
</label>
<label
class=
"label-item single-overflow pull-left"
title=
"领用单号:"
>
领用单号:
</label>
<form:input
path=
"number"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
<form:input
path=
"number"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
...
@@ -31,8 +32,10 @@
...
@@ -31,8 +32,10 @@
</div>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<div
style=
"margin-top:26px"
>
<div
style=
"margin-top:26px"
>
<a
id=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-search"
></i>
查询
</a>
<a
id=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
class=
"fa fa-search"
></i>
查询
</a>
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</div>
</div>
</div>
</div>
</form:form>
</form:form>
...
@@ -69,6 +72,11 @@
...
@@ -69,6 +72,11 @@
<i
class=
"fa fa-search-plus"
></i>
查看
<i
class=
"fa fa-search-plus"
></i>
查看
</button>
</button>
</shiro:hasPermission>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:outbound:outbound:add"
>
<button
id=
"delivery"
class=
"btn btn-primary"
disabled
onclick=
"onDelivery()"
>
<i
class=
"glyphicon glyphicon-plus"
></i>
出库
</button>
</shiro:hasPermission>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
...
@@ -89,6 +97,6 @@
...
@@ -89,6 +97,6 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
\ 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