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
1885a7de
Commit
1885a7de
authored
Jul 20, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 47.92.228.5:huyi/warehouse into hy
parents
f98316e2
115b9d23
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1164 additions
and
898 deletions
+1164
-898
BuildQcUtil.java
...om/jeeplus/modules/warehouse/qrcode/util/BuildQcUtil.java
+4
-0
scan.jsp
src/main/webapp/webpage/include/scan.jsp
+125
-124
goodsList.js
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
+344
-343
goodsList.jsp
...main/webapp/webpage/modules/warehouse/goods/goodsList.jsp
+2
-2
logic.js
src/main/webapp/webpage/modules/warehouse/goods/logic.js
+154
-22
ledgerList.js
...ain/webapp/webpage/modules/warehouse/ledger/ledgerList.js
+56
-16
ledgerList.jsp
...in/webapp/webpage/modules/warehouse/ledger/ledgerList.jsp
+34
-0
materialRequisitionDetail.jsp
...rehouse/materialrequisition/materialRequisitionDetail.jsp
+61
-59
materialRequisitionForm.jsp
...warehouse/materialrequisition/materialRequisitionForm.jsp
+17
-17
outboundDetail.jsp
...app/webpage/modules/warehouse/outbound/outboundDetail.jsp
+76
-24
outboundList.js
...webapp/webpage/modules/warehouse/outbound/outboundList.js
+278
-282
outboundList.jsp
...ebapp/webpage/modules/warehouse/outbound/outboundList.jsp
+8
-9
storageDetail.jsp
...ebapp/webpage/modules/warehouse/storage/storageDetail.jsp
+5
-0
No files found.
src/main/java/com/jeeplus/modules/warehouse/qrcode/util/BuildQcUtil.java
View file @
1885a7de
...
@@ -27,6 +27,10 @@ public class BuildQcUtil {
...
@@ -27,6 +27,10 @@ public class BuildQcUtil {
map
.
put
(
"infoId"
,
goodsInfo
.
getId
());
map
.
put
(
"infoId"
,
goodsInfo
.
getId
());
TwoDimensionCode
.
encoderQRCode
(
JSON
.
toJSONString
(
map
),
qrImgPath
,
"png"
,
6
);
TwoDimensionCode
.
encoderQRCode
(
JSON
.
toJSONString
(
map
),
qrImgPath
,
"png"
,
6
);
File
file
=
new
File
(
qrImgPath
);
File
file
=
new
File
(
qrImgPath
);
File
file2
=
new
File
(
imgPath
);
if
(
file2
.
exists
())
{
file2
.
delete
();
}
try
{
try
{
BufferedImage
image
=
DrawQrcodeUtil
.
createAssetImageNew
(
file
,
qrCode
);
BufferedImage
image
=
DrawQrcodeUtil
.
createAssetImageNew
(
file
,
qrCode
);
DrawQrcodeUtil
drawQrcodeUtil
=
new
DrawQrcodeUtil
();
DrawQrcodeUtil
drawQrcodeUtil
=
new
DrawQrcodeUtil
();
...
...
src/main/webapp/webpage/include/scan.jsp
View file @
1885a7de
<%@ page contentType="text/html;charset=UTF-8" %>
<style>
<style>
#scanIpt_ {
#scanIpt_ {
position: absolute;
position: absolute;
...
@@ -12,145 +13,145 @@
...
@@ -12,145 +13,145 @@
<script>
<script>
// function Scan () {
// function Scan () {
// this.scanIptFocusTimer$ = null;
// this.scanIptFocusTimer$ = null;
// this.inputMethodCnType$ = false;
// this.inputMethodCnType$ = false;
//
//
// $(document).ready(function () {
// $(document).ready(function () {
// var ipt = getScanIpt();
// var ipt = getScanIpt();
// document.addEventListener('visibilitychange', pageVisible);
// document.addEventListener('visibilitychange', pageVisible);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionend', iptCompositionend);
// ipt.addEventListener('compositionend', iptCompositionend);
// scanIptGetFocusStart();
// scanIptGetFocusStart();
// })
// })
// }
// }
var scanIptFocusTimer$ = null;
var scanIptFocusTimer$ = null;
var inputMethodCnType$ = false;
var inputMethodCnType$ = false;
var focusStop = true;
var focusStop = true;
$(document).ready(function () {
$(document).ready(function () {
$(document.body).on('focusin', function (e) {
$(document.body).on('focusin', function (e) {
var dom = e.target;
var dom = e.target;
if (dom.id === 'scanIpt_') return;
if (dom.id === 'scanIpt_') return;
scanIptGetFocusStop();
scanIptGetFocusStop();
})
})
$(document.body).on('focusout', function (e) {
$(document.body).on('focusout', function (e) {
var dom = e.target;
var dom = e.target;
if (dom.id === 'scanIpt_') return;
if (dom.id === 'scanIpt_') return;
scanIptGetFocusStart();
scanIptGetFocusStart();
})
})
})
})
function scanStart () {
function scanStart () {
var ipt = getScanIpt();
var ipt = getScanIpt();
focusStop = false;
focusStop = false;
ipt.focus();
ipt.focus();
document.addEventListener('visibilitychange', pageVisible);
document.addEventListener('visibilitychange', pageVisible);
ipt.addEventListener('change', scanDataChange);
ipt.addEventListener('change', scanDataChange);
ipt.addEventListener('compositionstart', iptCompositionstart);
ipt.addEventListener('compositionstart', iptCompositionstart);
ipt.addEventListener('compositionend', iptCompositionend);
ipt.addEventListener('compositionend', iptCompositionend);
scanIptGetFocusStart();
// var allFormDom = $("input, select, textarea");
// allFormDom.on('focus', function () {
// if (this.id === 'scanIpt_') return;
// scanIptGetFocusStop();
// })
// allFormDom.on('blur', function () {
// if (this.id === 'scanIpt_') return;
// scanIptGetFocusStart();
// })
}
function scanStop () {
focusStop = true;
var ipt = getScanIpt();
ipt.removeEventListener('change', scanDataChange);
ipt.removeEventListener('compositionstart', iptCompositionstart);
scanIptGetFocusStop();
document.removeEventListener('visibilitychange', pageVisible);
}
window.onbeforeunload = function (e) {
scanStop();
}
// $(document).ready(function () {
// var ipt = getScanIpt();
// document.addEventListener('visibilitychange', pageVisible);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionend', iptCompositionend);
// })
function getScanIpt () {
return document.getElementById("scanIpt_");
}
function pageVisible () {
var state = document.visibilityState;
if (state === 'visible') {
scanIptGetFocusStart();
scanIptGetFocusStart();
} else if (state === 'hidden') {
// var allFormDom = $("input, select, textarea");
// allFormDom.on('focus', function () {
// if (this.id === 'scanIpt_') return;
// scanIptGetFocusStop();
// })
// allFormDom.on('blur', function () {
// if (this.id === 'scanIpt_') return;
// scanIptGetFocusStart();
// })
}
function scanStop () {
focusStop = true;
var ipt = getScanIpt();
ipt.removeEventListener('change', scanDataChange);
ipt.removeEventListener('compositionstart', iptCompositionstart);
scanIptGetFocusStop();
scanIptGetFocusStop();
document.removeEventListener('visibilitychange', pageVisible);
}
window.onbeforeunload = function (e) {
scanStop();
}
// $(document).ready(function () {
// var ipt = getScanIpt();
// document.addEventListener('visibilitychange', pageVisible);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionend', iptCompositionend);
// })
function getScanIpt () {
return document.getElementById("scanIpt_");
}
function pageVisible () {
var state = document.visibilityState;
if (state === 'visible') {
scanIptGetFocusStart();
} else if (state === 'hidden') {
scanIptGetFocusStop();
}
}
}
}
function scanIptGetFocusStart () {
function scanIptGetFocusStart () {
if (focusStop) return;
if (focusStop) return;
var ipt = getScanIpt();
var ipt = getScanIpt();
if (ipt) {
if (ipt) {
scanIptFocusTimer$ = iptFocus(ipt);
scanIptFocusTimer$ = iptFocus(ipt);
}
}
}
}
function scanIptGetFocusStop () {
function scanIptGetFocusStop () {
if (scanIptFocusTimer$) {
if (scanIptFocusTimer$) {
clearInterval(scanIptFocusTimer$);
clearInterval(scanIptFocusTimer$);
scanIptFocusTimer$ = null;
scanIptFocusTimer$ = null;
}
}
}
}
function iptFocus () {
function iptFocus () {
var ipt = getScanIpt();
var ipt = getScanIpt();
var timer = setInterval(function () {
var timer = setInterval(function () {
if (ipt !== document.activeElement && scanIptFocusTimer$) {
if (ipt !== document.activeElement && scanIptFocusTimer$) {
ipt.focus();
ipt.focus();
}
}, 300);
return timer;
}
function iptCompositionstart () {
inputMethodCnType$ = true;
}
function iptCompositionend () {
var ipt = getScanIpt();
if (inputMethodCnType$) {
jp.alert('请将输入法设置为英文');
inputMethodCnType$ = false;
ipt.value = '';
}
}
}, 300);
return timer;
}
function iptCompositionstart () {
inputMethodCnType = true;
}
function iptCompositionend () {
var ipt = getScanIpt();
if (inputMethodCnType$) {
jp.alert('请将输入法设置为英文');
inputMethodCnType$ = false;
ipt.value = '';
}
}
}
function scanDataChange () {
function scanDataChange () {
var elem = getScanIpt();
var elem = getScanIpt();
var val = $(elem).val();
var val = $(elem).val();
if (!val) {
if (!val) {
return;
return;
}
try {
window.scanIptChangeCallback && window.scanIptChangeCallback(val);
} catch (e) {}
setTimeout(function () {
$(elem).val('');
$(elem).blur();
}, 100)
}
}
try {
window.scanIptChangeCallback && window.scanIptChangeCallback(val);
} catch (e) {}
setTimeout(function () {
$(elem).val('');
$(elem).blur();
}, 100)
}
</script>
</script>
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
View file @
1885a7de
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
<
script
>
var
LODOP
;
var
LODOP
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'#goodsTable'
).
bootstrapTable
({
$
(
'#goodsTable'
).
bootstrapTable
({
//请求方法
//请求方法
method
:
'post'
,
method
:
'post'
,
//类型json
//类型json
dataType
:
"json"
,
dataType
:
"json"
,
contentType
:
"application/x-www-form-urlencoded"
,
contentType
:
"application/x-www-form-urlencoded"
,
//显示检索按钮
//显示检索按钮
showSearch
:
true
,
showSearch
:
true
,
//显示刷新按钮
//显示刷新按钮
showRefresh
:
true
,
showRefresh
:
true
,
//显示切换手机试图按钮
//显示切换手机试图按钮
showToggle
:
true
,
showToggle
:
true
,
//显示 内容列下拉框
//显示 内容列下拉框
showColumns
:
true
,
showColumns
:
true
,
//显示到处按钮
//显示到处按钮
showExport
:
true
,
showExport
:
true
,
//显示切换分页按钮
//显示切换分页按钮
showPaginationSwitch
:
true
,
showPaginationSwitch
:
true
,
//显示详情按钮
//显示详情按钮
detailView
:
true
,
detailView
:
true
,
//显示详细内容函数
//显示详细内容函数
detailFormatter
:
"detailFormatter"
,
detailFormatter
:
"detailFormatter"
,
//最低显示2行
//最低显示2行
minimumCountColumns
:
2
,
minimumCountColumns
:
2
,
//是否显示行间隔色
//是否显示行间隔色
striped
:
true
,
striped
:
true
,
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
cache
:
false
,
cache
:
false
,
//是否显示分页(*)
//是否显示分页(*)
pagination
:
true
,
pagination
:
true
,
//排序方式
//排序方式
sortOrder
:
"asc"
,
sortOrder
:
"asc"
,
//初始化加载第一页,默认第一页
//初始化加载第一页,默认第一页
pageNumber
:
1
,
pageNumber
:
1
,
//每页的记录行数(*)
//每页的记录行数(*)
pageSize
:
10
,
pageSize
:
10
,
//可供选择的每页的行数(*)
//可供选择的每页的行数(*)
pageList
:
[
10
,
25
,
50
,
100
],
pageList
:
[
10
,
25
,
50
,
100
],
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
url
:
"${ctx}/warehouse/goods/goods/data"
,
url
:
"${ctx}/warehouse/goods/goods/data"
,
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'',
//queryParamsType:'',
////查询参数,每次调用是会带上这个参数,可自定义
////查询参数,每次调用是会带上这个参数,可自定义
queryParams
:
function
(
params
)
{
queryParams
:
function
(
params
)
{
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
searchParam
.
pageNo
=
params
.
limit
===
undefined
?
"1"
:
params
.
offset
/
params
.
limit
+
1
;
searchParam
.
pageNo
=
params
.
limit
===
undefined
?
"1"
:
params
.
offset
/
params
.
limit
+
1
;
searchParam
.
pageSize
=
params
.
limit
===
undefined
?
-
1
:
params
.
limit
;
searchParam
.
pageSize
=
params
.
limit
===
undefined
?
-
1
:
params
.
limit
;
searchParam
.
orderBy
=
params
.
sort
===
undefined
?
""
:
params
.
sort
+
" "
+
params
.
order
;
searchParam
.
orderBy
=
params
.
sort
===
undefined
?
""
:
params
.
sort
+
" "
+
params
.
order
;
return
searchParam
;
return
searchParam
;
},
},
//分页方式:client客户端分页,server服务端分页(*)
//分页方式:client客户端分页,server服务端分页(*)
sidePagination
:
"server"
,
sidePagination
:
"server"
,
contextMenuTrigger
:
"right"
,
//pc端 按右键弹出菜单
contextMenuTrigger
:
"right"
,
//pc端 按右键弹出菜单
contextMenuTriggerMobile
:
"press"
,
//手机端 弹出菜单,click:单击, press:长按。
contextMenuTriggerMobile
:
"press"
,
//手机端 弹出菜单,click:单击, press:长按。
contextMenu
:
'#context-menu'
,
contextMenu
:
'#context-menu'
,
onContextMenuItem
:
function
(
row
,
$el
){
onContextMenuItem
:
function
(
row
,
$el
){
if
(
$el
.
data
(
"item"
)
==
"edit"
){
if
(
$el
.
data
(
"item"
)
==
"edit"
){
edit
(
row
.
id
);
edit
(
row
.
id
);
}
else
if
(
$el
.
data
(
"item"
)
==
"view"
){
}
else
if
(
$el
.
data
(
"item"
)
==
"view"
){
view
(
row
.
id
);
view
(
row
.
id
);
}
else
if
(
$el
.
data
(
"item"
)
==
"delete"
){
}
else
if
(
$el
.
data
(
"item"
)
==
"delete"
){
jp
.
confirm
(
'确认要删除该货品模块记录吗?'
,
function
(){
jp
.
confirm
(
'确认要删除该货品模块记录吗?'
,
function
(){
jp
.
loading
();
jp
.
loading
();
jp
.
get
(
"${ctx}/warehouse/goods/goods/delete?id="
+
row
.
id
,
function
(
data
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/delete?id="
+
row
.
id
,
function
(
data
){
if
(
data
.
success
){
if
(
data
.
success
){
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
jp
.
success
(
data
.
msg
);
}
else
{
}
else
{
jp
.
error
(
data
.
msg
);
jp
.
error
(
data
.
msg
);
}
}
})
})
});
});
}
}
},
},
onClickRow
:
function
(
row
,
$el
){
onClickRow
:
function
(
row
,
$el
){
},
},
onShowSearch
:
function
()
{
onShowSearch
:
function
()
{
$
(
"#search-collapse"
).
slideToggle
();
$
(
"#search-collapse"
).
slideToggle
();
},
},
columns
:
[{
columns
:
[{
checkbox
:
true
checkbox
:
true
}
}
,{
,{
field
:
'batchNum'
,
field
:
'batchNum'
,
title
:
'批次号'
,
title
:
'批次号'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'batchNum'
sortName
:
'batchNum'
,
formatter
:
function
(
value
,
row
,
index
){
,
formatter
:
function
(
value
,
row
,
index
){
value
=
jp
.
unescapeHTML
(
value
);
value
=
jp
.
unescapeHTML
(
value
);
return
"<a href='javascript:view(
\"
"
+
row
.
id
+
"
\"
)'>"
+
value
+
"</a>"
;
return
"<a href='javascript:view(
\"
"
+
row
.
id
+
"
\"
)'>"
+
value
+
"</a>"
;
}
}
}
}
,{
,{
field
:
'time'
,
field
:
'time'
,
title
:
'时间'
,
title
:
'时间'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'time'
sortName
:
'time'
}
,{
field
:
'remarks'
,
title
:
'备注信息'
,
sortable
:
true
,
sortName
:
'remarks'
}
,{
field
:
'operator.name'
,
title
:
'操作人'
,
sortable
:
true
,
sortName
:
'operator.name'
}
]
});
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
)){
//如果是移动端
$
(
'#goodsTable'
).
bootstrapTable
(
"toggleView"
);
}
$
(
'#goodsTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#goodsTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#goodsTable'
).
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/goods/goods/import/template'
);
},
btn2
:
function
(
index
,
layero
){
var
iframeWin
=
layero
.
find
(
'iframe'
)[
0
];
//得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
iframeWin
.
contentWindow
.
importExcel
(
'${ctx}/warehouse/goods/goods/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
=
$
(
'#goodsTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
var
sortOrder
=
$
(
'#goodsTable'
).
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
;
field
:
'remarks'
,
title
:
'备注信息'
,
sortable
:
true
,
sortName
:
'remarks'
}
}
,{
field
:
'operator.name'
,
title
:
'操作人'
,
sortable
:
true
,
sortName
:
'operator.name'
}
]
});
jp
.
downloadFile
(
'${ctx}/warehouse/goods/goods/export?'
+
values
);
})
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
)){
//如果是移动端
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#goodsTable'
).
bootstrapTable
(
"toggleView"
);
});
}
$
(
"#reset"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#goodsTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
$
(
"#searchForm input"
).
val
(
""
);
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
$
(
"#searchForm select"
).
val
(
""
);
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#goodsTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
"#searchForm .select-item"
).
html
(
""
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#goodsTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
});
});
$
(
"#btnImport"
).
click
(
function
(){
$
(
'#beginTime'
).
datetimepicker
({
jp
.
open
({
format
:
"YYYY-MM-DD HH:mm:ss"
type
:
2
,
});
area
:
[
500
,
200
],
$
(
'#endTime'
).
datetimepicker
({
auto
:
true
,
format
:
"YYYY-MM-DD HH:mm:ss"
title
:
"导入数据"
,
});
content
:
"${ctx}/tag/importExcel"
,
btn
:
[
'下载模板'
,
'确定'
,
'关闭'
],
});
btn1
:
function
(
index
,
layero
){
jp
.
downloadFile
(
'${ctx}/warehouse/goods/goods/import/template'
);
function
getIdSelections
()
{
},
return
$
.
map
(
$
(
"#goodsTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
btn2
:
function
(
index
,
layero
){
return
row
.
id
var
iframeWin
=
layero
.
find
(
'iframe'
)[
0
];
//得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
iframeWin
.
contentWindow
.
importExcel
(
'${ctx}/warehouse/goods/goods/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
=
$
(
'#goodsTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
var
sortOrder
=
$
(
'#goodsTable'
).
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/goods/goods/export?'
+
values
);
})
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
});
$
(
"#reset"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
"#searchForm input"
).
val
(
""
);
$
(
"#searchForm select"
).
val
(
""
);
$
(
"#searchForm .select-item"
).
html
(
""
);
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
});
$
(
'#beginTime'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
$
(
'#endTime'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
function
getIdSelections
()
{
return
$
.
map
(
$
(
"#goodsTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
.
id
});
}
function
deleteAll
(){
jp
.
confirm
(
'确认要删除该货品模块记录吗?'
,
function
(){
jp
.
loading
();
jp
.
get
(
"${ctx}/warehouse/goods/goods/deleteAll?ids="
+
getIdSelections
(),
function
(
data
){
if
(
data
.
success
){
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
}
else
{
jp
.
error
(
data
.
msg
);
}
})
})
}
//刷新列表
function
refresh
(){
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
}
function
add
(){
jp
.
openSaveDialog
(
'新增货品'
,
"${ctx}/warehouse/goods/goods/form/add"
,
'1200'
,
'800'
)
}
function
edit
(
id
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
}
jp
.
openSaveDialog
(
"编辑货品"
,
"${ctx}/warehouse/goods/goods/form/edit?id="
+
id
,
'1200'
,
'800'
);
function
deleteAll
(){
}
jp
.
confirm
(
'确认要删除该货品模块记录吗?'
,
function
(){
function
view
(
id
){
//没有权限时,不显示确定按钮
jp
.
loading
();
if
(
id
==
undefined
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/deleteAll?ids="
+
getIdSelections
(),
function
(
data
){
id
=
getIdSelections
();
if
(
data
.
success
){
}
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
jp
.
openViewDialog
(
"查看货品"
,
"${ctx}/warehouse/goods/goods/form/view?id="
+
id
,
'1200'
,
'800'
);
jp
.
success
(
data
.
msg
);
}
}
else
{
jp
.
error
(
data
.
msg
);
}
})
})
function
detailFormatter
(
index
,
row
)
{
}
var
htmltpl
=
$
(
"#goodsChildrenTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
html
=
Mustache
.
render
(
htmltpl
,
{
//刷新列表
idx
:
row
.
id
function
refresh
(){
});
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
$
.
get
(
"${ctx}/warehouse/goods/goods/detail?id="
+
row
.
id
,
function
(
goods
){
}
var
goodsChild1RowIdx
=
0
,
goodsChild1Tpl
=
$
(
"#goodsChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
function
add
(){
var
data1
=
goods
.
goodsInfoList
;
jp
.
openSaveDialog
(
'新增货品'
,
"${ctx}/warehouse/goods/goods/form/add"
,
'1200'
,
'800'
)
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
}
data1
[
i
].
dict
=
{};
data1
[
i
].
dict
.
state
=
jp
.
getDictLabel
(
$
{
fns
:
toJson
(
fns
:
getDictList
(
'wh_stockroom_state'
))},
data1
[
i
].
state
,
"-"
);
function
edit
(
id
){
addRow
(
'#goodsChild-'
+
row
.
id
+
'-1-List'
,
goodsChild1RowIdx
,
goodsChild1Tpl
,
data1
[
i
]);
if
(
id
==
undefined
){
goodsChild1RowIdx
=
goodsChild1RowIdx
+
1
;
id
=
getIdSelections
();
}
}
jp
.
openSaveDialog
(
"编辑货品"
,
"${ctx}/warehouse/goods/goods/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
})
function
view
(
id
){
//没有权限时,不显示确定按钮
return
html
;
if
(
id
==
undefined
){
}
id
=
getIdSelections
();
}
function
initLodop
(){
jp
.
openViewDialog
(
"查看货品"
,
"${ctx}/warehouse/goods/goods/form/view?id="
+
id
,
'1200'
,
'800'
);
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
}
}
function
addRow
(
list
,
idx
,
tpl
,
row
){
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
,
showAction
:
function
()
{
function
detailFormatter
(
index
,
row
)
{
return
row
.
qrCode
?
!
(
row
.
qrCode
.
state
!==
'0'
)
:
true
;
var
htmltpl
=
$
(
"#goodsChildrenTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
}
var
html
=
Mustache
.
render
(
htmltpl
,
{
}));
idx
:
row
.
id
}
});
$
.
get
(
"${ctx}/warehouse/goods/goods/detail?id="
+
row
.
id
,
function
(
goods
){
function
printQr_
(
id
)
{
var
goodsChild1RowIdx
=
0
,
goodsChild1Tpl
=
$
(
"#goodsChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
try
{
var
data1
=
goods
.
goodsInfoList
;
if
(
!
LODOP
){
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
initLodop
();
data1
[
i
].
dict
=
{};
}
data1
[
i
].
dict
.
state
=
jp
.
getDictLabel
(
$
{
fns
:
toJson
(
fns
:
getDictList
(
'wh_stockroom_state'
))},
data1
[
i
].
state
,
"-"
);
if
(
LODOP
){
addRow
(
'#goodsChild-'
+
row
.
id
+
'-1-List'
,
goodsChild1RowIdx
,
goodsChild1Tpl
,
data1
[
i
]);
jp
.
loading
(
'loading...'
);
goodsChild1RowIdx
=
goodsChild1RowIdx
+
1
;
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
}
var
row
=
res
.
body
.
goodsInfo
.
qrCode
;
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
SET_PRINT_PAGESIZE
(
1
,
1600
,
1000
,
0
)
})
createAllPage
(
row
);
LODOP
.
PREVIEW
();
return
html
;
jp
.
close
();
})
}
}
catch
(
e
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
jp
.
close
();
})
}
}
}
function
printQr
(
id
)
{
jp
.
loading
(
'loading...'
);
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
if
(
res
.
success
)
{
var
row
=
res
.
body
.
goodsInfo
.
qrCode
;
var
imgUrl
=
"${ctxPath}/"
+
row
.
url
;
// jp.showPic(imgUrl);
_thermal_Image_print_
(
imgUrl
);
}
jp
.
close
();
})
}
function
createAllPage
(
item
){
// if(!list){
// return;
// }
// list.forEach(function(item){
// LODOP.NewPage();
// var imgUrl = "${ctxPath}/" + item.url;
// LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />");
// })
LODOP
.
NewPage
();
var
imgUrl
=
"${ctxPath}/"
+
item
.
url
;
LODOP
.
ADD_PRINT_IMAGE
(
'0%'
,
"0%"
,
"100%"
,
"100%"
,
"<img width='800' border='0' src='"
+
imgUrl
+
"' />"
);
LODOP
.
SET_PRINT_STYLEA
(
0
,
"Stretch"
,
1
)
}
function
cleanQr
(
id
)
{
jp
.
confirm
(
'确认清除二维码吗?'
,
function
(){
jp
.
get
(
"${ctx}/warehouse/goods/goods/cleanQr?goodsInfoId="
+
id
,
function
(
res
)
{
res
.
success
&&
jp
.
success
(
'清除二维码成功!'
);
})
})
}
function
initLodop
(){
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
}
function
addRow
(
list
,
idx
,
tpl
,
row
){
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
,
showAction
:
function
()
{
return
row
.
qrCode
?
!
(
row
.
qrCode
.
state
!==
'0'
)
:
true
;
}
}));
}
function
printQr_
(
id
)
{
try
{
if
(
!
LODOP
){
initLodop
();
}
if
(
LODOP
){
jp
.
loading
(
'loading...'
);
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
row
=
res
.
body
.
goodsInfo
.
qrCode
;
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
SET_PRINT_PAGESIZE
(
1
,
1600
,
1000
,
0
)
createAllPage
(
row
);
LODOP
.
PREVIEW
();
jp
.
close
();
})
}
}
catch
(
e
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
jp
.
close
();
})
}
}
function
printQr
(
id
)
{
jp
.
loading
(
'loading...'
);
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
if
(
res
.
success
)
{
var
row
=
res
.
body
.
goodsInfo
.
qrCode
;
var
imgUrl
=
"${ctxPath}/"
+
row
.
url
;
jp
.
showPic
(
imgUrl
);
}
jp
.
close
();
})
}
function
createAllPage
(
item
){
// if(!list){
// return;
// }
// list.forEach(function(item){
// LODOP.NewPage();
// var imgUrl = "${ctxPath}/" + item.url;
// LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />");
// })
LODOP
.
NewPage
();
var
imgUrl
=
"${ctxPath}/"
+
item
.
url
;
LODOP
.
ADD_PRINT_IMAGE
(
'0%'
,
"0%"
,
"100%"
,
"100%"
,
"<img width='800' border='0' src='"
+
imgUrl
+
"' />"
);
LODOP
.
SET_PRINT_STYLEA
(
0
,
"Stretch"
,
1
)
}
function
cleanQr
(
id
)
{
jp
.
confirm
(
'确认清除二维码吗?'
,
function
(){
jp
.
get
(
"${ctx}/warehouse/goods/goods/cleanQr?goodsInfoId="
+
id
,
function
(
res
)
{
res
.
success
&&
jp
.
success
(
'清除二维码成功!'
);
})
})
}
<
/script
>
<
/script
>
<
script
type
=
"text/template"
id
=
"goodsChildrenTpl"
>
//<!--
<
script
type
=
"text/template"
id
=
"goodsChildrenTpl"
>
//<!--
<
div
class
=
"tabs-container"
>
<
div
class
=
"tabs-container"
>
...
@@ -374,8 +375,8 @@ $(document).ready(function() {
...
@@ -374,8 +375,8 @@ $(document).ready(function() {
<
/table
>
<
/table
>
<
/div
>
<
/div
>
<
/div>/
/-->
<
/div>/
/-->
<
/script
>
<
/script
>
<
script
type
=
"text/template"
id
=
"goodsChild1Tpl"
>
//<!--
<
script
type
=
"text/template"
id
=
"goodsChild1Tpl"
>
//<!--
<
tr
>
<
tr
>
<
td
>
<
td
>
{{
row
.
type
.
name
}}
{{
row
.
type
.
name
}}
...
@@ -412,4 +413,4 @@ $(document).ready(function() {
...
@@ -412,4 +413,4 @@ $(document).ready(function() {
{{
/
showAction
}}
{{
/
showAction
}}
<
/td
>
<
/td
>
<
/tr>/
/-->
<
/tr>/
/-->
<
/script
>
<
/script
>
src/main/webapp/webpage/modules/warehouse/goods/goodsList.jsp
View file @
1885a7de
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<
%@
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=
"goodsList.js"
%
>
<
%@
include
file=
"goodsList.js"
%
>
<
%@
include
file=
"logic.js"
%
>
</head>
</head>
<body>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"wrapper wrapper-content"
>
...
@@ -121,4 +122,4 @@
...
@@ -121,4 +122,4 @@
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/goods/logic.js
View file @
1885a7de
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
<
script
>
var
printerProtocolMap
=
{
usb
:
'usb'
,
tcp
:
'tcp'
}
var
printerDirectiveMap
=
{
_thermal_zpl_draw_print_
:
'_thermal_zpl_draw_print_'
,
_thermal_tspl_draw_print_
:
'_thermal_tspl_draw_print_'
,
_thermal_escpos_draw_print_
:
'_thermal_escpos_draw_print_'
}
var
defPrintOption
=
{
var
defPrintOption
=
{
// post ws
// post ws
linkDeviceType
:
'post'
,
linkDeviceType
:
'post'
,
// usb tcp
// usb tcp
protocol
:
'usb'
protocol
:
printerProtocolMap
.
usb
,
// 打印机指令
printerDirective
:
printerDirectiveMap
.
_thermal_zpl_draw_print_
}
}
var
device
=
''
;
var
printCallback
=
null
;
var
startLink
=
false
;
const
__io_lnk
=
function
()
{
const
__io_lnk
=
function
()
{
return
'localhost:8008'
return
'localhost:8008'
...
@@ -23,49 +39,165 @@ const __ws_url = function() {
...
@@ -23,49 +39,165 @@ const __ws_url = function() {
* @private
* @private
*/
*/
function
_thermal_enum_printer_
()
{
function
_thermal_enum_printer_
()
{
if
(
startLink
)
return
;
startLink
=
true
;
var
onBack
=
function
onBack
(
isOk
,
res
)
{
var
onBack
=
function
onBack
(
isOk
,
res
)
{
startLink
=
false
;
if
(
!
isOk
)
{
if
(
!
isOk
)
{
output_control
(
'通讯失败:'
+
JSON
.
stringify
(
res
));
jp
.
warning
(
'通讯失败:'
+
JSON
.
stringify
(
res
));
return
return
}
}
if
(
res
.
code
!==
0
)
{
if
(
res
.
code
!==
0
)
{
output_control
(
res
.
msg
);
jp
.
warning
(
res
.
msg
);
return
return
}
}
let
enum_list
=
document
.
getElementById
(
'enum_list'
)
if
(
enum_list
.
length
>
0
)
{
enum_list
.
clear
()
}
if
(
res
.
device
.
length
>
0
)
{
if
(
res
.
device
.
length
>
0
)
{
// for (let i = 0; i < res.device.length; i++) {
device
=
res
.
device
[
0
];
// let opt = document.createElement('option')
printCallback
&&
printCallback
();
// opt.text = res.device[i]
// enum_list.options.add(opt)
// }
console
.
log
(
res
);
}
else
{
}
else
{
output_control
(
res
.
message
)
jp
.
warning
(
res
.
message
)
}
}
}
}
let
pack
=
{
let
pack
=
{
command
:
'_thermal_enum_printer_'
,
command
:
'_thermal_enum_printer_'
,
require
:
require_type
()
,
require
:
defPrintOption
.
protocol
,
}
}
on_link_device
(
pack
,
onBack
);
on_link_device
(
pack
,
onBack
);
}
}
function
require_type
()
{
var
Image_style_letType
=
{
return
defPrintOption
.
protocol
;
'1'
:
'误差扩撒'
,
'2'
:
'有序抖动'
,
'3'
:
'阈值'
}
var
pageConfig
=
{
// 纸张宽度
draw_w
:
''
,
// 页长
draw_h
:
''
,
// 横向位置
Image_x
:
''
,
// 纵向位置
Image_y
:
''
,
// 图片宽度
Image_w
:
''
,
// 图片高度
Image_h
:
''
,
// 图片阈值
Image_Threshold
:
''
,
// 图片打印模式
Image_style_let
:
'1'
,
}
//绘图打印图片
function
_thermal_Image_print_
(
url
)
{
if
(
!
device
)
{
printCallback
=
printImage
.
bind
(
window
,
url
);
_thermal_enum_printer_
();
}
else
{
printImage
(
url
);
}
}
function
printImage
(
url
)
{
//直接打印( 打印:'true' / 预览:'false' )
var
printdirectly
=
'true'
//获取预览图为base64数据( base64:'true' / 路径:'false' )
var
get_base64_img
=
'false'
var
onBack
=
function
(
isok
,
res
)
{
if
(
!
isok
)
{
jp
.
warning
(
'通讯失败:'
+
JSON
.
stringify
(
res
));
return
}
if
(
res
.
code
!==
0
)
{
jp
.
warning
(
res
.
msg
);
return
}
if
(
printdirectly
===
'true'
)
{
jp
.
success
(
'绘图打印成功'
)
}
else
{
if
(
get_base64_img
===
'true'
)
{
console
.
log
(
res
.
image_base64
)
}
else
{
console
.
log
(
res
.
image_path
)
}
}
}
var
pack
=
{
command
:
defPrintOption
.
printerDirective
,
device
:
device
,
printdirectly
:
'true'
,
measurement_mode
:
'mm'
,
canvas_size
:
{
width
:
pageConfig
.
draw_w
,
height
:
pageConfig
.
draw_h
},
get_base64_img
:
'false'
,
is_label
:
'false'
,
print
:
[
{
func
:
"PDSetAddImageMode"
,
iMode
:
pageConfig
.
Image_style_let
,
iValueThreshold
:
pageConfig
.
Image_Threshold
},
{
func
:
"PDDrawImage"
,
iX
:
pageConfig
.
Image_x
,
iY
:
pageConfig
.
Image_y
,
iWidth
:
pageConfig
.
Image_w
,
iHeight
:
pageConfig
.
Image_h
,
szImageFile
:
url
},
]
}
on_link_device
(
pack
,
onBack
);
}
}
function
on_link_device
(
pack
,
onBack
)
{
function
on_link_device
(
pack
,
onBack
)
{
let
radio
=
document
.
getElementsByName
(
'req_model'
)
if
(
defPrintOption
.
linkDeviceType
===
'post'
)
{
if
(
radio
!=
null
)
{
jqPost
(
__io_url
(),
pack
,
onBack
);
if
(
radio
.
length
>
0
)
{
}
else
if
(
defPrintOption
.
linkDeviceType
===
'ws'
)
{
if
(
radio
[
0
].
checked
)
{
jqpost
(
__io_url
(),
pack
,
onback
)
}
jqLink
(
__ws_url
(),
pack
,
onBack
);
}
}
function
jqPost
(
url
,
pack
,
callback
)
{
$
.
ajax
({
url
:
url
,
type
:
'POST'
,
data
:
JSON
.
stringify
(
pack
),
dataType
:
'json'
,
success
:
function
(
data
)
{
callback
(
true
,
data
)
},
error
:
function
(
err
)
{
callback
(
false
,
err
)
}
}
if
(
radio
.
length
>
1
)
{
})
if
(
radio
[
1
].
checked
)
{
jqlink
(
__ws_url
(),
pack
,
onback
)
}
}
var
ws
=
null
;
function
jqLink
(
url
,
pack
,
callback
)
{
if
(
ws
==
null
)
{
ws
=
new
WebSocket
(
url
);
ws
.
onback
=
callback
;
ws
.
onopen
=
function
(
evt
)
{
ws
.
send
(
JSON
.
stringify
(
pack
))
};
ws
.
onclose
=
function
(
evt
)
{
ws
=
null
};
ws
.
onmessage
=
function
(
evt
)
{
ws
.
onback
(
true
,
eval
(
'('
+
evt
.
data
+
')'
))
};
ws
.
onerror
=
function
(
evt
)
{
ws
.
onback
(
false
,
evt
)
}
}
}
else
{
ws
.
onback
=
callback
;
ws
.
send
(
JSON
.
stringify
(
pack
))
}
}
}
}
...
...
src/main/webapp/webpage/modules/warehouse/ledger/ledgerList.js
View file @
1885a7de
...
@@ -182,22 +182,22 @@
...
@@ -182,22 +182,22 @@
}
}
});
});
});
});
$
(
"#export"
).
click
(
function
(){
//导出Excel文件
//
$("#export").click(function(){//导出Excel文件
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
//
var searchParam = $("#searchForm").serializeJSON();
searchParam
.
pageNo
=
1
;
//
searchParam.pageNo = 1;
searchParam
.
pageSize
=
-
1
;
//
searchParam.pageSize = -1;
var
sortName
=
$
(
'#ledgerTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
//
var sortName = $('#ledgerTable').bootstrapTable("getOptions", "none").sortName;
var
sortOrder
=
$
(
'#ledgerTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortOrder
;
//
var sortOrder = $('#ledgerTable').bootstrapTable("getOptions", "none").sortOrder;
var
values
=
""
;
//
var values = "";
for
(
var
key
in
searchParam
){
//
for(var key in searchParam){
values
=
values
+
key
+
"="
+
searchParam
[
key
]
+
"&"
;
//
values = values + key + "=" + searchParam[key] + "&";
}
//
}
if
(
sortName
!=
undefined
&&
sortOrder
!=
undefined
){
//
if(sortName != undefined && sortOrder != undefined){
values
=
values
+
"orderBy="
+
sortName
+
" "
+
sortOrder
;
//
values = values + "orderBy=" + sortName + " "+sortOrder;
}
//
}
//
jp
.
downloadFile
(
'${ctx}/warehouse/ledger/ledger/export?'
+
values
);
//
jp.downloadFile('${ctx}/warehouse/ledger/ledger/export?'+values);
})
//
})
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#ledgerTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#ledgerTable'
).
bootstrapTable
(
'refresh'
);
...
@@ -210,6 +210,46 @@
...
@@ -210,6 +210,46 @@
$
(
'#ledgerTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#ledgerTable'
).
bootstrapTable
(
'refresh'
);
});
});
$
(
"#export"
).
click
(
function
()
{
jp
.
open
({
type
:
1
,
title
:
'导出'
,
auto
:
true
,
area
:
[
'600'
,
'500'
],
content
:
Mustache
.
render
(
$
(
"#exportTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
),{}),
btn
:
[
'确定'
,
'关闭'
],
success
(
layeor
,
i
)
{
var
beginTime
=
layeor
.
find
(
'#beginTime'
);
var
endTime
=
layeor
.
find
(
'#endTime'
);
beginTime
.
datetimepicker
({
format
:
"YYYY-MM-DD"
});
endTime
.
datetimepicker
({
format
:
"YYYY-MM-DD"
});
},
yes
(
i
,
layeor
)
{
var
form
=
layeor
.
find
(
"#export-searchForm"
);
var
isValidate
=
form
.
validate
().
form
();
if
(
!
isValidate
)
{
return
false
;
}
else
{
var
params
=
form
.
serializeJSON
();
params
.
beginTime
=
params
.
beginTime
+
' 00:00:00'
;
params
.
endTime
=
params
.
endTime
+
' 23:59:59'
;
var
str
=
''
;
for
(
var
key
in
params
)
{
str
+=
'&'
+
key
+
'='
+
params
[
key
]
}
window
.
open
(
"${ctx}/warehouse/ledger/ledger/ledgerStreamWater?"
+
str
.
substr
(
1
));
jp
.
close
(
i
);
}
},
cancel
()
{
}
})
})
});
});
...
...
src/main/webapp/webpage/modules/warehouse/ledger/ledgerList.jsp
View file @
1885a7de
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,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"
%
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/plugin/layui/dist/css/layui.css"
>
<script
src=
"${ctxStatic}/plugin/layui/dist/layui.js"
></script>
<
%@
include
file=
"ledgerList.js"
%
>
<
%@
include
file=
"ledgerList.js"
%
>
<
%@
include
file=
"../../../include/scan.jsp"
%
>
<
%@
include
file=
"../../../include/scan.jsp"
%
>
<script
type=
"text/javascript"
src=
"${ctxStatic}/common/js/big.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/common/js/big.js"
></script>
...
@@ -98,6 +100,9 @@
...
@@ -98,6 +100,9 @@
<button
class=
"btn btn-default"
onclick=
"viewScanData()"
>
<button
class=
"btn btn-default"
onclick=
"viewScanData()"
>
<i
class=
"fa fa-search-plus"
></i>
查看二维码数据
<i
class=
"fa fa-search-plus"
></i>
查看二维码数据
</button>
</button>
<button
id=
"export"
class=
"btn btn-warning"
>
<i
class=
"fa fa-file-excel-o"
></i>
导出
</button>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
...
@@ -144,5 +149,34 @@
...
@@ -144,5 +149,34 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
</script>
</script>
<script
type=
"text/html"
id=
"exportTpl"
>
<
div
id
=
"export-searchForm-box"
class
=
"collapse show"
>
<
div
class
=
"accordion-inner"
>
<
form
:
form
id
=
"export-searchForm"
class
=
"form-horizontal"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
品名:
<
/label
>
<
div
class
=
"col-sm-10 control-label text-left"
>
//
<!--<
sys
:
treeselect
id
=
"type"
name
=
"typeId"
title
=
"品名代码"
url
=
"/warehouse/materialtype/materialType/treeData"
notAllowSelectParent
=
"true"
cssClass
=
"form-control required"
allowClear
=
"true"
allowSearch
=
"true"
/>
//-->
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
开始时间:
<
/label
>
<
div
class
=
"col-sm-10 control-label text-left"
>
<
input
class
=
"form-control required"
name
=
"beginTime"
id
=
"beginTime"
/>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
结束时间:
<
/label
>
<
div
class
=
"col-sm-10 control-label text-left"
>
<
input
class
=
"form-control required"
name
=
"endTime"
id
=
"endTime"
/>
<
/div
>
<
/div
>
<
/form:form
>
<
/div
>
<
/div
>
</script>
</body>
</body>
</html>
</html>
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionDetail.jsp
View file @
1885a7de
...
@@ -109,27 +109,27 @@
...
@@ -109,27 +109,27 @@
})
})
}
}
},
},
{
//
{
field: 'num',
//
field: 'num',
title: '数量',
//
title: '数量',
formatter: function (value, row, index) {
//
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoNumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
//
return Mustache.render($("#ledgerInfoNumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
//
row: row,
idx: index
//
idx: index
})
//
})
}
//
}
},
//
},
{
//
{
field: 'infoSum',
//
field: 'infoSum',
title: '总价',
//
title: '总价',
sortName: 'infoSum',
//
sortName: 'infoSum',
formatter: function (value, row, index) {
//
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoInfoSumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
//
return Mustache.render($("#ledgerInfoInfoSumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
//
row: row,
idx: index
//
idx: index
})
//
})
}
//
}
},
//
},
{
{
field: 'receiver.name',
field: 'receiver.name',
title: '领用人',
title: '领用人',
...
@@ -425,6 +425,7 @@
...
@@ -425,6 +425,7 @@
auto: true,
auto: true,
area: ['1200', '600'],
area: ['1200', '600'],
content: $("#scanTpl").html(),
content: $("#scanTpl").html(),
btn: ['确定', '关闭'],
success: function () {
success: function () {
// $("#scanResult").focus();
// $("#scanResult").focus();
scanStart();
scanStart();
...
@@ -436,8 +437,14 @@
...
@@ -436,8 +437,14 @@
jp.alert('至少选择一条数据');
jp.alert('至少选择一条数据');
return;
return;
}
}
selectDetailHandle(getScanTable(), selectTableData);
if (selectTableData.some(function (e) {
top.layer.close(index);
return !e.selectNum;
})) {
jp.alert('选择的数据必须填写选择数量');
return false;
}
selectDetailHandle($(selector), selectTableData);
layer.close(index);
},
},
cancel () {
cancel () {
scanStop();
scanStop();
...
@@ -449,32 +456,23 @@
...
@@ -449,32 +456,23 @@
var json = JSON.parse(val);
var json = JSON.parse(val);
var qrCodeId = json.code;
var qrCodeId = json.code;
// var params = "qrId=" + json.code;
// var params = "qrId=" + json.code;
console.log(val)
jp.get('${ctx}/warehouse/ledger/ledger/findByQrOrCode?qrId=' + qrCodeId, function (res) {
jp.get('${ctx}/warehouse/ledger/ledger/findByQrOrCode?qrCodeId=' + qrCodeId, function (res) {
var data = res.rows || [];
var data = res.rows || [];
if (data.length) {
if (data.length) {
//
var item = data[0];
var item = data[0];
//
//
// /***
// /***
// * 重复的物资编码去重
// * 重复的物资编码去重
// */
// */
// var fined = getTableData().find(function(v){
var fined = getSelectScanTable().find(function(v){
// return v.ledgerInfo.code === item.code
return v.ledgerInfo.code === item.code
// })
})
// if(fined){
if(fined){
// jp.warning('有物资重复不能领用');
jp.warning('有物资重复不能领用');
// return;
return;
// }
}
// $(selector).bootstrapTable('append', [
getScanTable().bootstrapTable('append', item);
// {
// id: '',
// delFlag: 0,
// remarks: '',
// ledgerInfo: item
// }
// ]);
// $(elem).val('').focus();
// $(elem).val('').focus();
debugger
console.log(data)
console.log(data)
}else{
}else{
jp.warning('未找到任何数据!');
jp.warning('未找到任何数据!');
...
@@ -497,21 +495,25 @@
...
@@ -497,21 +495,25 @@
var keyList = addDetailColumns.key.split('|');
var keyList = addDetailColumns.key.split('|');
table.bootstrapTable('destroy').bootstrapTable({
table.bootstrapTable('destroy').bootstrapTable({
data: [],
data: [],
columns: labelList.map(function (el, index) {
columns: [
var key = keyList[index];
{ checkbox: true }
return {
].concat(
title: el,
labelList.map(function (el, index) {
field: keyList[index],
var key = keyList[index];
formatter (v, r, i) {
return {
var result = v;
title: el,
if (top.gridSelectColumnFormatterMap[key]) {
field: keyList[index],
result = top.gridSelectColumnFormatterMap[key].formatter(v, r, i)
formatter (v, r, i) {
}
var result = v;
return result;
if (top.gridSelectColumnFormatterMap[key]) {
},
result = top.gridSelectColumnFormatterMap[key].formatter(v, r, i)
events: top.gridSelectColumnFormatterMap[key] ? top.gridSelectColumnFormatterMap[key].events : {}
}
}
return result;
})
},
events: top.gridSelectColumnFormatterMap[key] ? top.gridSelectColumnFormatterMap[key].events : {}
}
})
)
})
})
}
}
...
@@ -603,7 +605,7 @@
...
@@ -603,7 +605,7 @@
value="{{row.ledgerInfo.type.code}}"/>
value="{{row.ledgerInfo.type.code}}"/>
</script>
</script>
<script id="ledgerInfoTypeUnitTpl" type="text/html">
<script id="ledgerInfoTypeUnitTpl" type="text/html">
<input id="materialRequisitionInfoList{{idx}}_ledgerInfoTypeUnit
<input id="materialRequisitionInfoList{{idx}}_ledgerInfoTypeUnit
"
name="materialRequisitionInfoList[{{idx}}].ledgerInfo.type.unit" type="text" class="form-control" readonly
name="materialRequisitionInfoList[{{idx}}].ledgerInfo.type.unit" type="text" class="form-control" readonly
value="{{row.ledgerInfo.type.unit}}"/>
value="{{row.ledgerInfo.type.unit}}"/>
</script>
</script>
...
@@ -632,7 +634,7 @@
...
@@ -632,7 +634,7 @@
{{#row.receiver}}
{{#row.receiver}}
<div class="sign-result">
<div class="sign-result">
<img src="{{row.receiver}}" alt="签名" width="100%" />
<img src="{{row.receiver}}" alt="签名" width="100%" />
<span class="del-sign" onclick="delSign(this,
{{idx}}
)">×</span>
<span class="del-sign" onclick="delSign(this,
'{{idx}}'
)">×</span>
</div>
</div>
{{/row.receiver}}
{{/row.receiver}}
{{^row.receiver}}
{{^row.receiver}}
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionForm.jsp
View file @
1885a7de
...
@@ -154,23 +154,23 @@
...
@@ -154,23 +154,23 @@
<script
type=
"text/template"
id=
"scanTpl"
>
<script
type=
"text/template"
id=
"scanTpl"
>
<
div
class
=
"scan-content"
>
<
div
class
=
"scan-content"
>
<%--
<
input
type
=
"text"
id
=
"scanIpt"
/>--%>
<%--
<
input
type
=
"text"
id
=
"scanIpt"
/>--%>
<
div
id
=
"scan-searchForm-box"
class
=
"collapse show"
>
<%--
<
div
id
=
"scan-searchForm-box"
class
=
"collapse show"
>--%
>
<
div
class
=
"accordion-inner"
>
<%--
<
div
class
=
"accordion-inner"
>--%
>
<
form
:
form
id
=
"scan-searchForm"
class
=
"form form-horizontal well clearfix"
>
<%--
<
form
:
form
id
=
"scan-searchForm"
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
=
"code"
htmlEscape
=
"false"
class
=
" form-control"
/>
--%>
<%--
&
lt
;
%&
ndash
;
<
form
:
input
path
=
"code"
htmlEscape
=
"false"
class
=
" form-control"
/>&
ndash
;
%&
gt
;
--%>
<
input
type
=
"text"
id
=
"scan-code"
class
=
"form-control"
onfocus
=
"scanIptGetFocusStop()"
onblur
=
"scanIptGetFocusStart()"
/
>
<%--
<
input
type
=
"text"
id
=
"scan-code"
class
=
"form-control"
onfocus
=
"scanIptGetFocusStop()"
onblur
=
"scanIptGetFocusStart()"
/>--%
>
<
/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
=
"scan-search"
class
=
"btn btn-primary btn-rounded btn-bordered btn-sm"
onclick
=
"searchScanData()"
><
i
class
=
"fa fa-search"
><
/i> 查询</
a
>
<%--
<
a
id
=
"scan-search"
class
=
"btn btn-primary btn-rounded btn-bordered btn-sm"
onclick
=
"searchScanData()"
><
i
class
=
"fa fa-search"
><
/i> 查询</
a
>--%
>
<
a
id
=
"scan-reset"
class
=
"btn btn-primary btn-rounded btn-bordered btn-sm"
onclick
=
"refreshScanData()"
><
i
class
=
"fa fa-refresh"
><
/i> 重置</
a
>
<%--
<
a
id
=
"scan-reset"
class
=
"btn btn-primary btn-rounded btn-bordered btn-sm"
onclick
=
"refreshScanData()"
><
i
class
=
"fa fa-refresh"
><
/i> 重置</
a
>--%
>
<
/div
>
<%--
<
/div>--%
>
<
/div
>
<%--
<
/div>--%
>
<
/form:form
>
<%--
<
/form:form>--%
>
<
/div
>
<%--
<
/div>--%
>
<
/div
>
<%--
<
/div>--%
>
<
div
class
=
"scan-data-content"
>
<
div
class
=
"scan-data-content"
>
<
table
id
=
"scan_detail_table"
><
/table
>
<
table
id
=
"scan_detail_table"
><
/table
>
<
/div
>
<
/div
>
...
...
src/main/webapp/webpage/modules/warehouse/outbound/outboundDetail.jsp
View file @
1885a7de
...
@@ -46,30 +46,50 @@
...
@@ -46,30 +46,50 @@
}
}
},
},
{
{
field: 'ledgerInfo.
nam
e',
field: 'ledgerInfo.
cod
e',
title: '物资
名称
',
title: '物资
编码
',
formatter: function (value, row, index) {
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfo
Nam
eTpl").html(), {
return Mustache.render($("#ledgerInfo
Cod
eTpl").html(), {
row: row,
row: row,
idx: index
idx: index
})
})
}
}
},
},
{
{
field: 'ledgerInfo.
cod
e',
field: 'ledgerInfo.
type.nam
e',
title: '
物资编码
',
title: '
品名
',
formatter: function (value, row, index) {
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfo
CodeTpl").html(
), {
return Mustache.render($("#ledgerInfo
TypeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""
), {
row: row,
row: row,
idx: index
idx: index
})
})
}
}
},
},
{
{
field: 'ledgerInfo.type.
nam
e',
field: 'ledgerInfo.type.
cod
e',
title: '
品名
代码',
title: '代码',
formatter: function (value, row, index) {
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoTypeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
return Mustache.render($("#ledgerInfoTypeCodeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
}
},
{
field: 'ledgerInfo.amount',
title: '单价',
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoAmountTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
}
},
{
field: "ledgerInfo.type.unit",
title: '单位',
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoTypeUnitTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
row: row,
idx: index
idx: index
})
})
...
@@ -85,11 +105,22 @@
...
@@ -85,11 +105,22 @@
})
})
}
}
},
},
// {
// field: 'ledgerInfo.amount',
// title: '单价',
// formatter: function (value, row, index) {
// return Mustache.render($("#ledgerInfoAmountTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
// row: row,
// idx: index
// })
// }
// },
{
{
field: 'ledgerInfo.amount',
field: 'receiver.name',
title: '单价',
title: '领用人',
align: 'center',
formatter: function (value, row, index) {
formatter: function (value, row, index) {
return Mustache.render($("#
ledgerInfoAmount
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
return Mustache.render($("#
receiver
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
row: row,
idx: index
idx: index
})
})
...
@@ -105,15 +136,15 @@
...
@@ -105,15 +136,15 @@
})
})
}
}
},
},
{
//
{
field: '',
//
field: '',
title: '操作',
//
title: '操作',
formatter: function (value, row, index) {
//
formatter: function (value, row, index) {
var text = row.delFlag == 1 ? '撤销删除' : '删除';
//
var text = row.delFlag == 1 ? '撤销删除' : '删除';
var result = ["<a href='javascript:void(0);' onclick=\"removeRow(" + index + ", '" + row.id + "', '" + row.delFlag + "')\">" + text + "</a>"]
//
var result = ["<a href='javascript:void(0);' onclick=\"removeRow(" + index + ", '" + row.id + "', '" + row.delFlag + "')\">" + text + "</a>"]
return result.join('');
//
return result.join('');
}
//
}
}
//
}
]
]
});
});
}
}
...
@@ -284,6 +315,16 @@
...
@@ -284,6 +315,16 @@
<sys:treeselect id="outboundInfoList{{idx}}_ledgerInfoType" name="outboundInfoList[{{idx}}].ledgerInfo.type.id" value="{{row.ledgerInfo.type.id}}" labelName="outboundInfoList{{idx}}.ledgerInfo.type.name" labelValue="{{row.ledgerInfo.type.name}}"
<sys:treeselect id="outboundInfoList{{idx}}_ledgerInfoType" name="outboundInfoList[{{idx}}].ledgerInfo.type.id" value="{{row.ledgerInfo.type.id}}" labelName="outboundInfoList{{idx}}.ledgerInfo.type.name" labelValue="{{row.ledgerInfo.type.name}}"
title="品名代码" url="/warehouse/materialtype/materialType/treeData" cssClass="form-control " disabled="disabled" allowClear="true"/>//-->
title="品名代码" url="/warehouse/materialtype/materialType/treeData" cssClass="form-control " disabled="disabled" allowClear="true"/>//-->
</script>
</script>
<script id="ledgerInfoTypeCodeTpl" type="text/html">
<input id="outboundInfoList{{idx}}_ledgerInfoTypeCode"
name="outboundInfoList[{{idx}}].ledgerInfo.type.code" type="text" class="form-control" readonly
value="{{row.ledgerInfo.type.code}}"/>
</script>
<script id="ledgerInfoTypeUnitTpl" type="text/html">
<input id="outboundInfoList{{idx}}_ledgerInfoTypeUnit"
name="outboundInfoList[{{idx}}].ledgerInfo.type.unit" type="text" class="form-control" readonly
value="{{row.ledgerInfo.type.unit}}"/>
</script>
<script id="ledgerInfoModelTpl" type="text/html">
<script id="ledgerInfoModelTpl" type="text/html">
<input id="outboundInfoList{{idx}}_ledgerInfoModel"
<input id="outboundInfoList{{idx}}_ledgerInfoModel"
name="outboundInfoList[{{idx}}].ledgerInfo.model" type="text" class="form-control" readonly
name="outboundInfoList[{{idx}}].ledgerInfo.model" type="text" class="form-control" readonly
...
@@ -294,7 +335,19 @@
...
@@ -294,7 +335,19 @@
name="outboundInfoList[{{idx}}].ledgerInfo.amount" type="text" readonly class="form-control"
name="outboundInfoList[{{idx}}].ledgerInfo.amount" type="text" readonly class="form-control"
value="{{row.ledgerInfo.amount}}"/>
value="{{row.ledgerInfo.amount}}"/>
</script>
</script>
<script id="receiverTpl" type="text/html">
<input type="hidden" name="outboundInfoList[{{idx}}].receiver" value="{{row.receiver}}">
<div class="sign-result">
{{#row.receiver}}
<div class="sign-result">
<img src="{{row.receiver}}" alt="签名" width="100%" />
</div>
{{/row.receiver}}
{{^row.receiver}}
暂无签名
{{/row.receiver}}
</div>
</script>
<script id="remarksTpl" type="text/html">
<script id="remarksTpl" type="text/html">
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="2"
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="2"
onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
...
@@ -314,4 +367,4 @@
...
@@ -314,4 +367,4 @@
</div>
</div>
</div>
</div>
<br>
<br>
</script>
</script>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/outbound/outboundList.js
View file @
1885a7de
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
<
script
>
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'#outboundTable'
).
bootstrapTable
({
$
(
'#outboundTable'
).
bootstrapTable
({
//请求方法
//请求方法
method
:
'post'
,
method
:
'post'
,
//类型json
//类型json
dataType
:
"json"
,
dataType
:
"json"
,
contentType
:
"application/x-www-form-urlencoded"
,
contentType
:
"application/x-www-form-urlencoded"
,
//显示检索按钮
//显示检索按钮
showSearch
:
true
,
showSearch
:
true
,
//显示刷新按钮
//显示刷新按钮
showRefresh
:
true
,
showRefresh
:
true
,
//显示切换手机试图按钮
//显示切换手机试图按钮
showToggle
:
true
,
showToggle
:
true
,
//显示 内容列下拉框
//显示 内容列下拉框
showColumns
:
true
,
showColumns
:
true
,
//显示到处按钮
//显示到处按钮
showExport
:
true
,
showExport
:
true
,
//显示切换分页按钮
//显示切换分页按钮
showPaginationSwitch
:
true
,
showPaginationSwitch
:
true
,
//显示详情按钮
//显示详情按钮
detailView
:
true
,
detailView
:
true
,
//显示详细内容函数
//显示详细内容函数
detailFormatter
:
"detailFormatter"
,
detailFormatter
:
"detailFormatter"
,
//最低显示2行
//最低显示2行
minimumCountColumns
:
2
,
minimumCountColumns
:
2
,
//是否显示行间隔色
//是否显示行间隔色
striped
:
true
,
striped
:
true
,
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
cache
:
false
,
cache
:
false
,
//是否显示分页(*)
//是否显示分页(*)
pagination
:
true
,
pagination
:
true
,
//排序方式
//排序方式
sortOrder
:
"asc"
,
sortOrder
:
"asc"
,
//初始化加载第一页,默认第一页
//初始化加载第一页,默认第一页
pageNumber
:
1
,
pageNumber
:
1
,
//每页的记录行数(*)
//每页的记录行数(*)
pageSize
:
10
,
pageSize
:
10
,
//可供选择的每页的行数(*)
//可供选择的每页的行数(*)
pageList
:
[
10
,
25
,
50
,
100
],
pageList
:
[
10
,
25
,
50
,
100
],
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
url
:
"${ctx}/warehouse/outbound/outbound/data"
,
url
:
"${ctx}/warehouse/outbound/outbound/data"
,
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'',
//queryParamsType:'',
////查询参数,每次调用是会带上这个参数,可自定义
////查询参数,每次调用是会带上这个参数,可自定义
queryParams
:
function
(
params
)
{
queryParams
:
function
(
params
)
{
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
searchParam
.
pageNo
=
params
.
limit
===
undefined
?
"1"
:
params
.
offset
/
params
.
limit
+
1
;
searchParam
.
pageNo
=
params
.
limit
===
undefined
?
"1"
:
params
.
offset
/
params
.
limit
+
1
;
searchParam
.
pageSize
=
params
.
limit
===
undefined
?
-
1
:
params
.
limit
;
searchParam
.
pageSize
=
params
.
limit
===
undefined
?
-
1
:
params
.
limit
;
searchParam
.
orderBy
=
params
.
sort
===
undefined
?
""
:
params
.
sort
+
" "
+
params
.
order
;
searchParam
.
orderBy
=
params
.
sort
===
undefined
?
""
:
params
.
sort
+
" "
+
params
.
order
;
return
searchParam
;
return
searchParam
;
},
},
//分页方式:client客户端分页,server服务端分页(*)
//分页方式:client客户端分页,server服务端分页(*)
sidePagination
:
"server"
,
sidePagination
:
"server"
,
contextMenuTrigger
:
"right"
,
//pc端 按右键弹出菜单
contextMenuTrigger
:
"right"
,
//pc端 按右键弹出菜单
contextMenuTriggerMobile
:
"press"
,
//手机端 弹出菜单,click:单击, press:长按。
contextMenuTriggerMobile
:
"press"
,
//手机端 弹出菜单,click:单击, press:长按。
contextMenu
:
'#context-menu'
,
contextMenu
:
'#context-menu'
,
onContextMenuItem
:
function
(
row
,
$el
){
onContextMenuItem
:
function
(
row
,
$el
){
if
(
$el
.
data
(
"item"
)
==
"edit"
){
if
(
$el
.
data
(
"item"
)
==
"edit"
){
edit
(
row
.
id
);
edit
(
row
.
id
);
}
else
if
(
$el
.
data
(
"item"
)
==
"view"
){
}
else
if
(
$el
.
data
(
"item"
)
==
"view"
){
view
(
row
.
id
);
view
(
row
.
id
);
}
else
if
(
$el
.
data
(
"item"
)
==
"delete"
){
}
else
if
(
$el
.
data
(
"item"
)
==
"delete"
){
jp
.
confirm
(
'确认要删除该出库信息记录吗?'
,
function
(){
jp
.
confirm
(
'确认要删除该出库信息记录吗?'
,
function
(){
jp
.
loading
();
jp
.
loading
();
jp
.
get
(
"${ctx}/warehouse/outbound/outbound/delete?id="
+
row
.
id
,
function
(
data
){
jp
.
get
(
"${ctx}/warehouse/outbound/outbound/delete?id="
+
row
.
id
,
function
(
data
){
if
(
data
.
success
){
if
(
data
.
success
){
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
jp
.
success
(
data
.
msg
);
}
else
{
}
else
{
jp
.
error
(
data
.
msg
);
jp
.
error
(
data
.
msg
);
}
}
})
})
});
});
}
}
},
},
onClickRow
:
function
(
row
,
$el
){
onClickRow
:
function
(
row
,
$el
){
},
},
onShowSearch
:
function
()
{
onShowSearch
:
function
()
{
$
(
"#search-collapse"
).
slideToggle
();
$
(
"#search-collapse"
).
slideToggle
();
},
},
columns
:
[{
columns
:
[{
checkbox
:
true
checkbox
:
true
}
}
,{
,{
field
:
'number'
,
field
:
'number'
,
title
:
'出库单号'
,
title
:
'出库单号'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'number'
sortName
:
'number'
,
formatter
:
function
(
value
,
row
,
index
){
,
formatter
:
function
(
value
,
row
,
index
){
value
=
jp
.
unescapeHTML
(
value
);
value
=
jp
.
unescapeHTML
(
value
);
return
"<a href='javascript:view(
\"
"
+
row
.
id
+
"
\"
)'>"
+
value
+
"</a>"
;
return
"<a href='javascript:view(
\"
"
+
row
.
id
+
"
\"
)'>"
+
value
+
"</a>"
;
}
}
}
}
,{
,{
field
:
'outboundTime'
,
field
:
'outboundTime'
,
title
:
'出库时间'
,
title
:
'出库时间'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'outboundTime'
sortName
:
'outboundTime'
}
}
,{
,{
field
:
'type'
,
field
:
'type'
,
title
:
'出库分类'
,
title
:
'出库分类'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'type'
,
sortName
:
'type'
,
formatter
:
function
(
value
,
row
,
index
){
formatter
:
function
(
value
,
row
,
index
){
return
jp
.
getDictLabel
(
$
{
fns
:
toJson
(
fns
:
getDictList
(
'wh_delivery_type'
))},
value
,
"-"
);
return
jp
.
getDictLabel
(
$
{
fns
:
toJson
(
fns
:
getDictList
(
'wh_delivery_type'
))},
value
,
"-"
);
}
}
}
}
,{
,{
field
:
'operator.name'
,
field
:
'operator.name'
,
title
:
'操作人'
,
title
:
'操作人'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'operator.name'
sortName
:
'operator.name'
}
}
,{
,{
field
:
'remarks'
,
field
:
'remarks'
,
title
:
'备注信息'
,
title
:
'备注信息'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'remarks'
sortName
:
'remarks'
}
}
]
]
});
});
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
)){
//如果是移动端
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
)){
//如果是移动端
$
(
'#outboundTable'
).
bootstrapTable
(
"toggleView"
);
$
(
'#outboundTable'
).
bootstrapTable
(
"toggleView"
);
}
}
$
(
'#outboundTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
$
(
'#outboundTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#outboundTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#outboundTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#outboundTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#outboundTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
});
});
$
(
"#btnImport"
).
click
(
function
(){
$
(
"#btnImport"
).
click
(
function
(){
jp
.
open
({
jp
.
open
({
type
:
2
,
type
:
2
,
area
:
[
500
,
200
],
area
:
[
500
,
200
],
auto
:
true
,
auto
:
true
,
title
:
"导入数据"
,
title
:
"导入数据"
,
content
:
"${ctx}/tag/importExcel"
,
content
:
"${ctx}/tag/importExcel"
,
btn
:
[
'下载模板'
,
'确定'
,
'关闭'
],
btn
:
[
'下载模板'
,
'确定'
,
'关闭'
],
btn1
:
function
(
index
,
layero
){
btn1
:
function
(
index
,
layero
){
jp
.
downloadFile
(
'${ctx}/warehouse/outbound/outbound/import/template'
);
jp
.
downloadFile
(
'${ctx}/warehouse/outbound/outbound/import/template'
);
},
},
btn2
:
function
(
index
,
layero
){
btn2
:
function
(
index
,
layero
){
var
iframeWin
=
layero
.
find
(
'iframe'
)[
0
];
//得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
var
iframeWin
=
layero
.
find
(
'iframe'
)[
0
];
//得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
iframeWin
.
contentWindow
.
importExcel
(
'${ctx}/warehouse/outbound/outbound/import'
,
function
(
data
)
{
iframeWin
.
contentWindow
.
importExcel
(
'${ctx}/warehouse/outbound/outbound/import'
,
function
(
data
)
{
if
(
data
.
success
){
if
(
data
.
success
){
jp
.
success
(
data
.
msg
);
jp
.
success
(
data
.
msg
);
refresh
();
refresh
();
}
else
{
}
else
{
jp
.
error
(
data
.
msg
);
jp
.
error
(
data
.
msg
);
}
}
jp
.
close
(
index
);
jp
.
close
(
index
);
});
//调用保存事件
});
//调用保存事件
return
false
;
return
false
;
},
},
btn3
:
function
(
index
){
btn3
:
function
(
index
){
jp
.
close
(
index
);
jp
.
close
(
index
);
}
}
});
});
});
});
$
(
"#export"
).
click
(
function
(){
//导出Excel文件
$
(
"#export"
).
click
(
function
(){
//导出Excel文件
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
searchParam
.
pageNo
=
1
;
searchParam
.
pageNo
=
1
;
searchParam
.
pageSize
=
-
1
;
searchParam
.
pageSize
=
-
1
;
var
sortName
=
$
(
'#outboundTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
var
sortName
=
$
(
'#outboundTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
var
sortOrder
=
$
(
'#outboundTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortOrder
;
var
sortOrder
=
$
(
'#outboundTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortOrder
;
var
values
=
""
;
var
values
=
""
;
...
@@ -191,103 +191,103 @@ $(document).ready(function() {
...
@@ -191,103 +191,103 @@ $(document).ready(function() {
values
=
values
+
"orderBy="
+
sortName
+
" "
+
sortOrder
;
values
=
values
+
"orderBy="
+
sortName
+
" "
+
sortOrder
;
}
}
jp
.
downloadFile
(
'${ctx}/warehouse/outbound/outbound/export?'
+
values
);
jp
.
downloadFile
(
'${ctx}/warehouse/outbound/outbound/export?'
+
values
);
})
})
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
});
});
$
(
"#reset"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
"#reset"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
"#searchForm input"
).
val
(
""
);
$
(
"#searchForm input"
).
val
(
""
);
$
(
"#searchForm select"
).
val
(
""
);
$
(
"#searchForm select"
).
val
(
""
);
$
(
"#searchForm .select-item"
).
html
(
""
);
$
(
"#searchForm .select-item"
).
html
(
""
);
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
});
$
(
'#beginOutboundTime'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
$
(
'#endOutboundTime'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
function
getIdSelections
()
{
return
$
.
map
(
$
(
"#outboundTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
.
id
});
});
$
(
'#beginOutboundTime'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
$
(
'#endOutboundTime'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
function
getIdSelections
()
{
return
$
.
map
(
$
(
"#outboundTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
.
id
});
}
function
deleteAll
(){
jp
.
confirm
(
'确认要删除该出库信息记录吗?'
,
function
(){
jp
.
loading
();
jp
.
get
(
"${ctx}/warehouse/outbound/outbound/deleteAll?ids="
+
getIdSelections
(),
function
(
data
){
if
(
data
.
success
){
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
}
else
{
jp
.
error
(
data
.
msg
);
}
})
})
}
//刷新列表
function
refresh
(){
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
}
function
add
(){
jp
.
openSaveDialog
(
"新增出库单"
,
"${ctx}/warehouse/outbound/outbound/form/add"
,
'1200'
,
'800'
);
}
function
edit
(
id
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
}
jp
.
openSaveDialog
(
"编辑出库单"
,
"${ctx}/warehouse/outbound/outbound/form/edit?id="
+
id
,
'1200'
,
'800'
);
function
deleteAll
(){
}
jp
.
confirm
(
'确认要删除该出库信息记录吗?'
,
function
(){
function
view
(
id
){
//没有权限时,不显示确定按钮
jp
.
loading
();
if
(
id
==
undefined
){
jp
.
get
(
"${ctx}/warehouse/outbound/outbound/deleteAll?ids="
+
getIdSelections
(),
function
(
data
){
id
=
getIdSelections
();
if
(
data
.
success
){
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
jp
.
success
(
data
.
msg
);
}
else
{
jp
.
error
(
data
.
msg
);
}
})
})
}
//刷新列表
function
refresh
(){
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
}
function
add
(){
jp
.
openSaveDialog
(
"新增出库单"
,
"${ctx}/warehouse/outbound/outbound/form/add"
,
'1200'
,
'800'
);
}
function
edit
(
id
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
openSaveDialog
(
"编辑出库单"
,
"${ctx}/warehouse/outbound/outbound/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
function
view
(
id
){
//没有权限时,不显示确定按钮
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
openViewDialog
(
"查看出库单"
,
"${ctx}/warehouse/outbound/outbound/form/view?id="
+
id
,
'1200'
,
'800'
);
}
function
detailFormatter
(
index
,
row
)
{
var
htmltpl
=
$
(
"#outboundChildrenTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
html
=
Mustache
.
render
(
htmltpl
,
{
idx
:
row
.
id
});
$
.
get
(
"${ctx}/warehouse/outbound/outbound/detail?id="
+
row
.
id
,
function
(
outbound
){
var
outboundChild1RowIdx
=
0
,
outboundChild1Tpl
=
$
(
"#outboundChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
data1
=
outbound
.
outboundInfoList
;
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
data1
[
i
].
dict
=
{};
addRow
(
'#outboundChild-'
+
row
.
id
+
'-1-List'
,
outboundChild1RowIdx
,
outboundChild1Tpl
,
data1
[
i
]);
outboundChild1RowIdx
=
outboundChild1RowIdx
+
1
;
}
})
return
html
;
}
}
jp
.
openViewDialog
(
"查看出库单"
,
"${ctx}/warehouse/outbound/outbound/form/view?id="
+
id
,
'1200'
,
'800'
);
function
addRow
(
list
,
idx
,
tpl
,
row
){
}
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
}));
}
function
detailFormatter
(
index
,
row
)
{
var
htmltpl
=
$
(
"#outboundChildrenTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
html
=
Mustache
.
render
(
htmltpl
,
{
idx
:
row
.
id
});
$
.
get
(
"${ctx}/warehouse/outbound/outbound/detail?id="
+
row
.
id
,
function
(
outbound
){
var
outboundChild1RowIdx
=
0
,
outboundChild1Tpl
=
$
(
"#outboundChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
data1
=
outbound
.
outboundInfoList
;
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
data1
[
i
].
dict
=
{};
addRow
(
'#outboundChild-'
+
row
.
id
+
'-1-List'
,
outboundChild1RowIdx
,
outboundChild1Tpl
,
data1
[
i
]);
outboundChild1RowIdx
=
outboundChild1RowIdx
+
1
;
}
})
return
html
;
}
function
addRow
(
list
,
idx
,
tpl
,
row
){
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
}));
}
<
/script
>
<
/script
>
<
script
type
=
"text/template"
id
=
"outboundChildrenTpl"
>
//<!--
<
script
type
=
"text/template"
id
=
"outboundChildrenTpl"
>
//<!--
<
div
class
=
"tabs-container"
>
<
div
class
=
"tabs-container"
>
...
@@ -302,11 +302,11 @@ $(document).ready(function() {
...
@@ -302,11 +302,11 @@ $(document).ready(function() {
<
th
>
品名
<
/th
>
<
th
>
品名
<
/th
>
<
th
>
代码
<
/th
>
<
th
>
代码
<
/th
>
<
th
>
物资编码
<
/th
>
<
th
>
物资编码
<
/th
>
<
th
>
数量
<
/th
>
<
th
>
单位
<
/th
>
<
th
>
单位
<
/th
>
<
th
>
型号
<
/th
>
<
th
>
型号
<
/th
>
<
th
>
单价
<
/th
>
<
th
>
单价
<
/th
>
<
th
>
总价
<
/th
>
<
th
>
批次号
<
/th
>
<
th
>
批次号
<
/th
>
<
th
>
货架
<
/th
>
<
th
>
货架
<
/th
>
<
th
>
仓库
<
/th
>
<
th
>
仓库
<
/th
>
...
@@ -318,8 +318,8 @@ $(document).ready(function() {
...
@@ -318,8 +318,8 @@ $(document).ready(function() {
<
/table
>
<
/table
>
<
/div
>
<
/div
>
<
/div>/
/-->
<
/div>/
/-->
<
/script
>
<
/script
>
<
script
type
=
"text/template"
id
=
"outboundChild1Tpl"
>
//<!--
<
script
type
=
"text/template"
id
=
"outboundChild1Tpl"
>
//<!--
<
tr
>
<
tr
>
<
td
>
<
td
>
{{
row
.
ledgerInfo
.
code
}}
{{
row
.
ledgerInfo
.
code
}}
...
@@ -330,9 +330,7 @@ $(document).ready(function() {
...
@@ -330,9 +330,7 @@ $(document).ready(function() {
<
td
>
<
td
>
{{
row
.
ledgerInfo
.
type
.
code
}}
{{
row
.
ledgerInfo
.
type
.
code
}}
<
/td
>
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
num
}}
<
/td
>
<
td
>
<
td
>
{{
row
.
ledgerInfo
.
type
.
unit
}}
{{
row
.
ledgerInfo
.
type
.
unit
}}
<
/td
>
<
/td
>
...
@@ -342,9 +340,7 @@ $(document).ready(function() {
...
@@ -342,9 +340,7 @@ $(document).ready(function() {
<
td
>
<
td
>
{{
row
.
ledgerInfo
.
amount
}}
{{
row
.
ledgerInfo
.
amount
}}
<
/td
>
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
infoSum
}}
<
/td
>
<
td
>
<
td
>
{{
row
.
ledgerInfo
.
batchNum
}}
{{
row
.
ledgerInfo
.
batchNum
}}
<
/td
>
<
/td
>
...
@@ -361,4 +357,4 @@ $(document).ready(function() {
...
@@ -361,4 +357,4 @@ $(document).ready(function() {
{{
row
.
remarks
}}
{{
row
.
remarks
}}
<
/td
>
<
/td
>
<
/tr>/
/-->
<
/tr>/
/-->
<
/script
>
<
/script
>
src/main/webapp/webpage/modules/warehouse/outbound/outboundList.jsp
View file @
1885a7de
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<h3
class=
"panel-title"
>
出库信息列表
</h3>
<h3
class=
"panel-title"
>
出库信息列表
</h3>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<!-- 搜索 -->
<!-- 搜索 -->
<div
id=
"search-collapse"
class=
"collapse"
>
<div
id=
"search-collapse"
class=
"collapse"
>
<div
class=
"accordion-inner"
>
<div
class=
"accordion-inner"
>
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<span
class=
"input-group-addon"
>
<span
class=
"input-group-addon"
>
<span
class=
"glyphicon glyphicon-calendar"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span>
</span>
</span>
</div>
</div>
</div>
</div>
<div
class=
"col-xs-12 col-sm-1"
>
<div
class=
"col-xs-12 col-sm-1"
>
~
~
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<span
class=
"input-group-addon"
>
<span
class=
"input-group-addon"
>
<span
class=
"glyphicon glyphicon-calendar"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -67,11 +67,11 @@
...
@@ -67,11 +67,11 @@
<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
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>
<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>
</div>
</div>
</div>
</div>
<!-- 工具栏 -->
<!-- 工具栏 -->
<div
id=
"toolbar"
>
<div
id=
"toolbar"
>
<
%
--
<
shiro:hasPermission
name=
"warehouse:outbound:outbound:add"
>
--%>
<
%
--
<
shiro:hasPermission
name=
"warehouse:outbound:outbound:add"
>
--%>
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
<
%
--
</
button
>
--%>
<
%
--
</
button
>
--%>
<
%
--
</
shiro:hasPermission
>
--%>
<
%
--
</
shiro:hasPermission
>
--%>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
<table
id=
"outboundTable"
data-toolbar=
"#toolbar"
></table>
<table
id=
"outboundTable"
data-toolbar=
"#toolbar"
></table>
...
@@ -119,9 +119,9 @@
...
@@ -119,9 +119,9 @@
<li
data-item=
"delete"
><a>
删除
</a></li>
<li
data-item=
"delete"
><a>
删除
</a></li>
</shiro:hasPermission>
</shiro:hasPermission>
<li
data-item=
"action1"
><a>
取消
</a></li>
<li
data-item=
"action1"
><a>
取消
</a></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/storage/storageDetail.jsp
View file @
1885a7de
...
@@ -432,6 +432,11 @@
...
@@ -432,6 +432,11 @@
* 点击扫码显示扫码窗口
* 点击扫码显示扫码窗口
*/
*/
function addScan(){
function addScan(){
// 选择该批次号下的货品明细
if(!$("#batchNum").val()){
jp.warning('请选择批次号!');
return;
}
layer.open({
layer.open({
type: 1,
type: 1,
title: '扫码',
title: '扫码',
...
...
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