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
a3330339
Commit
a3330339
authored
Feb 24, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物资编码的生成规则
parent
78a4a48c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
409 additions
and
0 deletions
+409
-0
wzcodeForm.jsp
...in/webapp/webpage/modules/warehouse/wzcode/wzcodeForm.jsp
+72
-0
wzcodeList.js
...ain/webapp/webpage/modules/warehouse/wzcode/wzcodeList.js
+246
-0
wzcodeList.jsp
...in/webapp/webpage/modules/warehouse/wzcode/wzcodeList.jsp
+91
-0
No files found.
src/main/webapp/webpage/modules/warehouse/wzcode/wzcodeForm.jsp
0 → 100644
View file @
a3330339
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
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/wzcode/wzcode"
);
}
else
{
jp
.
error
(
data
.
msg
);
$
(
"#inputForm"
).
find
(
"button:submit"
).
button
(
"reset"
);
}
});
});
</script>
</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/wzcode/wzcode"
><i
class=
"ti-angle-left"
></i>
返回
</a>
</h3>
</div>
<div
class=
"panel-body"
>
<form:form
id=
"inputForm"
modelAttribute=
"wzcode"
action=
"${ctx}/warehouse/wzcode/wzcode/save"
method=
"post"
class=
"form-horizontal"
>
<form:hidden
path=
"id"
/>
<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:input
path=
"num"
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>
<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>
</div>
</body>
</html>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/wzcode/wzcodeList.js
0 → 100644
View file @
a3330339
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
$
(
document
).
ready
(
function
()
{
$
(
'#wzcodeTable'
).
bootstrapTable
({
//请求方法
method
:
'post'
,
//类型json
dataType
:
"json"
,
contentType
:
"application/x-www-form-urlencoded"
,
//显示检索按钮
showSearch
:
true
,
//显示刷新按钮
showRefresh
:
true
,
//显示切换手机试图按钮
showToggle
:
true
,
//显示 内容列下拉框
showColumns
:
true
,
//显示到处按钮
showExport
:
true
,
//显示切换分页按钮
showPaginationSwitch
:
true
,
//最低显示2行
minimumCountColumns
:
2
,
//是否显示行间隔色
striped
:
true
,
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
cache
:
false
,
//是否显示分页(*)
pagination
:
true
,
//排序方式
sortOrder
:
"asc"
,
//初始化加载第一页,默认第一页
pageNumber
:
1
,
//每页的记录行数(*)
pageSize
:
10
,
//可供选择的每页的行数(*)
pageList
:
[
10
,
25
,
50
,
100
],
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
url
:
"${ctx}/warehouse/wzcode/wzcode/data"
,
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'',
////查询参数,每次调用是会带上这个参数,可自定义
queryParams
:
function
(
params
)
{
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
searchParam
.
pageNo
=
params
.
limit
===
undefined
?
"1"
:
params
.
offset
/
params
.
limit
+
1
;
searchParam
.
pageSize
=
params
.
limit
===
undefined
?
-
1
:
params
.
limit
;
searchParam
.
orderBy
=
params
.
sort
===
undefined
?
""
:
params
.
sort
+
" "
+
params
.
order
;
return
searchParam
;
},
//分页方式:client客户端分页,server服务端分页(*)
sidePagination
:
"server"
,
contextMenuTrigger
:
"right"
,
//pc端 按右键弹出菜单
contextMenuTriggerMobile
:
"press"
,
//手机端 弹出菜单,click:单击, press:长按。
contextMenu
:
'#context-menu'
,
onContextMenuItem
:
function
(
row
,
$el
){
if
(
$el
.
data
(
"item"
)
==
"edit"
){
edit
(
row
.
id
);
}
else
if
(
$el
.
data
(
"item"
)
==
"view"
){
view
(
row
.
id
);
}
else
if
(
$el
.
data
(
"item"
)
==
"delete"
){
jp
.
confirm
(
'确认要删除该物资编码模块记录吗?'
,
function
(){
jp
.
loading
();
jp
.
get
(
"${ctx}/warehouse/wzcode/wzcode/delete?id="
+
row
.
id
,
function
(
data
){
if
(
data
.
success
){
$
(
'#wzcodeTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
}
else
{
jp
.
error
(
data
.
msg
);
}
})
});
}
},
onClickRow
:
function
(
row
,
$el
){
},
onShowSearch
:
function
()
{
$
(
"#search-collapse"
).
slideToggle
();
},
columns
:
[{
checkbox
:
true
}
,{
field
:
'code'
,
title
:
'类型编码'
,
sortable
:
true
,
sortName
:
'code'
,
formatter
:
function
(
value
,
row
,
index
){
value
=
jp
.
unescapeHTML
(
value
);
<
c
:
choose
>
<
c
:
when
test
=
"${fns:hasPermission('warehouse:wzcode:wzcode:edit')}"
>
return
"<a href='javascript:edit(
\"
"
+
row
.
id
+
"
\"
)'>"
+
value
+
"</a>"
;
<
/c:when
>
<
c
:
when
test
=
"${fns:hasPermission('warehouse:wzcode:wzcode:view')}"
>
return
"<a href='javascript:view(
\"
"
+
row
.
id
+
"
\"
)'>"
+
value
+
"</a>"
;
<
/c:when
>
<
c
:
otherwise
>
return
value
;
<
/c:otherwise
>
<
/c:choose
>
}
}
,{
field
:
'num'
,
title
:
'最后一个编码号'
,
sortable
:
true
,
sortName
:
'num'
}
,{
field
:
'remarks'
,
title
:
'备注信息'
,
sortable
:
true
,
sortName
:
'remarks'
}
]
});
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
)){
//如果是移动端
$
(
'#wzcodeTable'
).
bootstrapTable
(
"toggleView"
);
}
$
(
'#wzcodeTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#wzcodeTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#wzcodeTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
});
$
(
"#btnImport"
).
click
(
function
(){
jp
.
open
({
type
:
2
,
area
:
[
500
,
200
],
auto
:
true
,
title
:
"导入数据"
,
content
:
"${ctx}/tag/importExcel"
,
btn
:
[
'下载模板'
,
'确定'
,
'关闭'
],
btn1
:
function
(
index
,
layero
){
jp
.
downloadFile
(
'${ctx}/warehouse/wzcode/wzcode/import/template'
);
},
btn2
:
function
(
index
,
layero
){
var
iframeWin
=
layero
.
find
(
'iframe'
)[
0
];
//得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
iframeWin
.
contentWindow
.
importExcel
(
'${ctx}/warehouse/wzcode/wzcode/import'
,
function
(
data
)
{
if
(
data
.
success
){
jp
.
success
(
data
.
msg
);
refresh
();
}
else
{
jp
.
error
(
data
.
msg
);
}
jp
.
close
(
index
);
});
//调用保存事件
return
false
;
},
btn3
:
function
(
index
){
jp
.
close
(
index
);
}
});
});
$
(
"#export"
).
click
(
function
(){
//导出Excel文件
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
searchParam
.
pageNo
=
1
;
searchParam
.
pageSize
=
-
1
;
var
sortName
=
$
(
'#wzcodeTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
var
sortOrder
=
$
(
'#wzcodeTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortOrder
;
var
values
=
""
;
for
(
var
key
in
searchParam
){
values
=
values
+
key
+
"="
+
searchParam
[
key
]
+
"&"
;
}
if
(
sortName
!=
undefined
&&
sortOrder
!=
undefined
){
values
=
values
+
"orderBy="
+
sortName
+
" "
+
sortOrder
;
}
jp
.
downloadFile
(
'${ctx}/warehouse/wzcode/wzcode/export?'
+
values
);
})
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#wzcodeTable'
).
bootstrapTable
(
'refresh'
);
});
$
(
"#reset"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
"#searchForm input"
).
val
(
""
);
$
(
"#searchForm select"
).
val
(
""
);
$
(
"#searchForm .select-item"
).
html
(
""
);
$
(
'#wzcodeTable'
).
bootstrapTable
(
'refresh'
);
});
});
function
getIdSelections
()
{
return
$
.
map
(
$
(
"#wzcodeTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
.
id
});
}
function
deleteAll
(){
jp
.
confirm
(
'确认要删除该物资编码模块记录吗?'
,
function
(){
jp
.
loading
();
jp
.
get
(
"${ctx}/warehouse/wzcode/wzcode/deleteAll?ids="
+
getIdSelections
(),
function
(
data
){
if
(
data
.
success
){
$
(
'#wzcodeTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
}
else
{
jp
.
error
(
data
.
msg
);
}
})
})
}
function
refresh
(){
$
(
'#wzcodeTable'
).
bootstrapTable
(
'refresh'
);
}
function
add
(){
jp
.
go
(
"${ctx}/warehouse/wzcode/wzcode/form/add"
);
}
function
edit
(
id
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/wzcode/wzcode/form/edit?id="
+
id
);
}
function
view
(
id
)
{
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/wzcode/wzcode/form/view?id="
+
id
);
}
<
/script>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/wzcode/wzcodeList.jsp
0 → 100644
View file @
a3330339
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<head>
<title>
物资编码模块管理
</title>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"wzcodeList.js"
%
>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
物资编码模块列表
</h3>
</div>
<div
class=
"panel-body"
>
<!-- 搜索 -->
<div
id=
"search-collapse"
class=
"collapse"
>
<div
class=
"accordion-inner"
>
<form:form
id=
"searchForm"
modelAttribute=
"wzcode"
class=
"form form-horizontal well clearfix"
>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<label
class=
"label-item single-overflow pull-left"
title=
"类型编码:"
>
类型编码:
</label>
<form:input
path=
"code"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<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=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</div>
</div>
</form:form>
</div>
</div>
<!-- 工具栏 -->
<div
id=
"toolbar"
>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:add"
>
<button
id=
"add"
class=
"btn btn-primary"
onclick=
"add()"
>
<i
class=
"glyphicon glyphicon-plus"
></i>
新建
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:edit"
>
<button
id=
"edit"
class=
"btn btn-success"
disabled
onclick=
"edit()"
>
<i
class=
"glyphicon glyphicon-edit"
></i>
修改
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:del"
>
<button
id=
"remove"
class=
"btn btn-danger"
disabled
onclick=
"deleteAll()"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
删除
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:import"
>
<button
id=
"btnImport"
class=
"btn btn-info"
><i
class=
"fa fa-folder-open-o"
></i>
导入
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:export"
>
<button
id=
"export"
class=
"btn btn-warning"
>
<i
class=
"fa fa-file-excel-o"
></i>
导出
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:view"
>
<button
id=
"view"
class=
"btn btn-default"
disabled
onclick=
"view()"
>
<i
class=
"fa fa-search-plus"
></i>
查看
</button>
</shiro:hasPermission>
</div>
<!-- 表格 -->
<table
id=
"wzcodeTable"
data-toolbar=
"#toolbar"
></table>
<!-- context menu -->
<ul
id=
"context-menu"
class=
"dropdown-menu"
>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:view"
>
<li
data-item=
"view"
><a>
查看
</a></li>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:edit"
>
<li
data-item=
"edit"
><a>
编辑
</a></li>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:wzcode:wzcode:del"
>
<li
data-item=
"delete"
><a>
删除
</a></li>
</shiro:hasPermission>
<li
data-item=
"action1"
><a>
取消
</a></li>
</ul>
</div>
</div>
</div>
</body>
</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