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
261fa378
Commit
261fa378
authored
Feb 23, 2023
by
yyq1988
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化物资类型表单
parent
c5e0dcf4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
85 deletions
+85
-85
materialTypeForm.jsp
...bpage/modules/warehouse/materialtype/materialTypeForm.jsp
+76
-76
materialTypeList.js
...ebpage/modules/warehouse/materialtype/materialTypeList.js
+9
-9
No files found.
src/main/webapp/webpage/modules/warehouse/materialtype/materialTypeForm.jsp
View file @
261fa378
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<head>
<title>
物资类型管理
</title>
<meta
name=
"decorator"
content=
"ani"
/>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
jp
.
ajaxForm
(
"#inputForm"
,
function
(
data
){
if
(
data
.
success
){
jp
.
success
(
data
.
msg
);
jp
.
go
(
"${ctx}/warehouse/materialtype/materialType?parentIds="
+
data
.
body
.
parentIds
);
}
else
{
jp
.
error
(
data
.
msg
);
$
(
"#inputForm"
).
find
(
"button:submit"
).
button
(
"reset"
);
}
});
});
</script>
<title>
物资类型管理
</title>
<meta
name=
"decorator"
content=
"ani"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/common/css/form.css"
>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
<a
class=
"panelButton"
href=
"${ctx}/warehouse/materialtype/materialType"
><i
class=
"ti-angle-left"
></i>
返回
</a>
</h3>
</div>
<div
class=
"panel-body"
>
<form:form
id=
"inputForm"
modelAttribute=
"materialType"
action=
"${ctx}/warehouse/materialtype/materialType/save"
method=
"post"
class=
"form-horizontal"
>
<form:hidden
path=
"id"
/>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
><font
color=
"red"
>
*
</font>
名称:
</label>
<div
class=
"col-sm-10"
>
<form:input
path=
"name"
htmlEscape=
"false"
class=
"form-control required"
/>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
><font
color=
"red"
>
*
</font>
排序:
</label>
<div
class=
"col-sm-10"
>
<form:input
path=
"sort"
htmlEscape=
"false"
class=
"form-control required"
/>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
物资类型编码:
</label>
<div
class=
"col-sm-10"
>
<form:input
path=
"code"
htmlEscape=
"false"
class=
"form-control "
/>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
备注信息:
</label>
<div
class=
"col-sm-10"
>
<form:textarea
path=
"remarks"
htmlEscape=
"false"
rows=
"4"
class=
"form-control "
/>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
上级父级编号:
</label>
<div
class=
"col-sm-10"
>
<sys:treeselect
id=
"parent"
name=
"parent.id"
value=
"${materialType.parent.id}"
labelName=
"parent.name"
labelValue=
"${materialType.parent.name}"
title=
"父级编号"
url=
"/warehouse/materialtype/materialType/treeData"
extId=
"${materialType.id}"
cssClass=
"form-control "
allowClear=
"true"
/>
</div>
</div>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-body"
>
<form:form
id=
"inputForm"
modelAttribute=
"materialType"
action=
"${ctx}/warehouse/materialtype/materialType/save"
method=
"post"
class=
"form-horizontal"
>
<form:hidden
path=
"id"
/>
<h3
class=
"text-center"
>
物资类型表
</h3>
<table
class=
"table table-bordered main-table"
>
<tr>
<td><font
color=
"red"
>
*
</font>
名称
</td>
<td>
<form:input
path=
"name"
htmlEscape=
"false"
class=
"form-control required"
/>
</td>
<td><font
color=
"red"
>
*
</font>
排序
</td>
<td>
<form:input
path=
"sort"
htmlEscape=
"false"
class=
"form-control required"
/>
</td>
</tr>
<c:if
test=
"${mode == 'add' || mode=='edit'}"
>
<div
class=
"col-lg-3"
></div>
<div
class=
"col-lg-6"
>
<div
class=
"form-group text-center"
>
<div>
<button
class=
"btn btn-primary btn-block btn-lg btn-parsley"
data-loading-text=
"正在提交..."
>
提 交
</button>
</div>
</div>
</div>
</c:if>
</form:form>
</div>
</div>
</div>
</div>
<tr>
<td><font
color=
"red"
>
*
</font>
物资类型编码
</td>
<td>
<form:input
path=
"code"
htmlEscape=
"false"
class=
"form-control required"
/>
</td>
<td><font
color=
"red"
>
*
</font>
父级编号
</td>
<td>
<sys:treeselect
id=
"parent"
name=
"parent.id"
value=
"${materialType.parent.id}"
labelName=
"parent.name"
labelValue=
"${materialType.parent.name}"
title=
"父级编号"
url=
"/warehouse/materialtype/materialType/treeData"
extId=
"${materialType.id}"
cssClass=
"form-control required"
allowClear=
"true"
/>
</td>
</tr>
<tr>
<td>
备注
</td>
<td
colspan=
"3"
>
<form:textarea
path=
"remarks"
htmlEscape=
"false"
rows=
"4"
class=
"form-control "
/>
</td>
</tr>
</table>
</form:form>
</div>
</div>
</div>
</div>
</div>
<script>
function
save
()
{
var
isValidate
=
jp
.
validateForm
(
'#inputForm'
);
//校验表单
if
(
!
isValidate
){
return
false
;
}
else
{
jp
.
loading
();
jp
.
post
(
$
(
"#inputForm"
).
attr
(
'action'
),
$
(
'#inputForm'
).
serialize
(),
function
(
data
){
if
(
data
.
success
){
jp
.
getParent
().
refresh
();
var
dialogIndex
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
// 获取窗口索引
parent
.
layer
.
close
(
dialogIndex
);
jp
.
success
(
data
.
msg
)
}
else
{
jp
.
error
(
data
.
msg
);
}
})
}
}
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/materialtype/materialTypeList.js
View file @
261fa378
...
...
@@ -50,16 +50,16 @@
}
function
add
(){
//新增
jp
.
go
(
'${ctx}/warehouse/materialtype/materialType/form/add
'
);
jp
.
openSaveDialog
(
"新增物资类型"
,
'${ctx}/warehouse/materialtype/materialType/form/add'
,
'800'
,
'600
'
);
}
function
edit
(
id
){
//编辑
jp
.
go
(
'${ctx}/warehouse/materialtype/materialType/form/edit?id='
+
id
);
jp
.
openSaveDialog
(
"编辑物资类型"
,
'${ctx}/warehouse/materialtype/materialType/form/edit?id='
+
id
,
'800'
,
'600'
);
}
function
view
(
id
){
//查看
jp
.
go
(
'${ctx}/warehouse/materialtype/materialType/form/view?id='
+
id
);
jp
.
openViewDialog
(
"查看物资类型"
,
'${ctx}/warehouse/materialtype/materialType/form/view?id='
+
id
,
'800'
,
'600'
);
}
function
addChild
(
id
){
//添加下级机构
jp
.
go
(
'${ctx}/warehouse/materialtype/materialType/form/add?parent.id='
+
id
);
jp
.
openSaveDialog
(
"添加下级物资类型"
,
'${ctx}/warehouse/materialtype/materialType/form/add?parent.id='
+
id
,
'800'
,
'600'
);
}
function
refresh
(){
//刷新
var
index
=
jp
.
loading
(
"正在加载,请稍等..."
);
...
...
@@ -71,13 +71,13 @@
<
td
>
<
c
:
choose
>
<
c
:
when
test
=
"${fns:hasPermission('warehouse:materialtype:materialType:edit')}"
>
<
a
href
=
"${ctx}/warehouse/materialtype/materialType/form/edit?id={{d.row.id}}
"
>
<
a
onclick
=
"edit('{{d.row.id}}')
"
>
{{
d
.
row
.
name
===
undefined
?
""
:
d
.
row
.
name
}}
<
/a>
<
/c:when
>
<
c
:
when
test
=
"${fns:hasPermission('warehouse:materialtype:materialType:view')}"
>
<
a
href
=
"${ctx}/warehouse/materialtype/materialType/form/view?id={{d.row.id}}
"
>
<
a
onclick
=
"view('{{d.row.id}}')
"
>
{{
d
.
row
.
name
===
undefined
?
""
:
d
.
row
.
name
}}
<
/a>
...
...
@@ -102,16 +102,16 @@
<
/button
>
<
ul
class
=
"dropdown-menu"
role
=
"menu"
>
<
shiro
:
hasPermission
name
=
"warehouse:materialtype:materialType:view"
>
<
li
><
a
href
=
"${ctx}/warehouse/materialtype/materialType/form/view?id={{d.row.id}}
"
><
i
class
=
"fa fa-search-plus"
><
/i> 查看</
a
><
/li
>
<
li
><
a
onclick
=
"view('{{d.row.id}}')
"
><
i
class
=
"fa fa-search-plus"
><
/i> 查看</
a
><
/li
>
<
/shiro:hasPermission
>
<
shiro
:
hasPermission
name
=
"warehouse:materialtype:materialType:edit"
>
<
li
><
a
href
=
"${ctx}/warehouse/materialtype/materialType/form/edit?id={{d.row.id}}
"
><
i
class
=
"fa fa-edit"
><
/i> 修改</
a
><
/li
>
<
li
><
a
onclick
=
"edit('{{d.row.id}}')
"
><
i
class
=
"fa fa-edit"
><
/i> 修改</
a
><
/li
>
<
/shiro:hasPermission
>
<
shiro
:
hasPermission
name
=
"warehouse:materialtype:materialType:del"
>
<
li
><
a
onclick
=
"return del(this, '{{d.row.id}}')"
><
i
class
=
"fa fa-trash"
><
/i> 删除</
a
><
/li
>
<
/shiro:hasPermission
>
<
shiro
:
hasPermission
name
=
"warehouse:materialtype:materialType:add"
>
<
li
><
a
href
=
"${ctx}/warehouse/materialtype/materialType/form/add?parent.id={{d.row.id}}
"
><
i
class
=
"fa fa-plus"
><
/i> 添加下级物资类型</
a
><
/li
>
<
li
><
a
onclick
=
"addChild('{{d.row.id}}')
"
><
i
class
=
"fa fa-plus"
><
/i> 添加下级物资类型</
a
><
/li
>
<
/shiro:hasPermission
>
<
/ul
>
<
/div
>
...
...
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