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
115b9d23
Commit
115b9d23
authored
Jul 20, 2023
by
anxiaohe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
台账导出、出库表单修改、物资领用模块(自动、手动)添加明细
parent
642aefed
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
501 additions
and
236 deletions
+501
-236
scan.jsp
src/main/webapp/webpage/include/scan.jsp
+51
-50
goodsList.js
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
+35
-34
goodsList.jsp
...main/webapp/webpage/modules/warehouse/goods/goodsList.jsp
+1
-0
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
+47
-45
materialRequisitionForm.jsp
...warehouse/materialrequisition/materialRequisitionForm.jsp
+17
-17
outboundDetail.jsp
...app/webpage/modules/warehouse/outbound/outboundDetail.jsp
+75
-22
outboundList.js
...webapp/webpage/modules/warehouse/outbound/outboundList.js
+26
-30
outboundList.jsp
...ebapp/webpage/modules/warehouse/outbound/outboundList.jsp
+0
-0
storageDetail.jsp
...ebapp/webpage/modules/warehouse/storage/storageDetail.jsp
+5
-0
No files found.
src/main/webapp/webpage/include/scan.jsp
View file @
115b9d23
<%@ page contentType="text/html;charset=UTF-8" %>
<style>
#scanIpt_ {
position: absolute;
...
...
@@ -12,25 +13,25 @@
<script>
// function Scan () {
// this.scanIptFocusTimer$ = null;
// this.inputMethodCnType$ = false;
//
// $(document).ready(function () {
// var ipt = getScanIpt();
// document.addEventListener('visibilitychange', pageVisible);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionend', iptCompositionend);
// scanIptGetFocusStart();
// })
// }
var scanIptFocusTimer$ = null;
var inputMethodCnType$ = false;
var focusStop = true;
$(document).ready(function () {
// function Scan () {
// this.scanIptFocusTimer$ = null;
// this.inputMethodCnType$ = false;
//
// $(document).ready(function () {
// var ipt = getScanIpt();
// document.addEventListener('visibilitychange', pageVisible);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionend', iptCompositionend);
// scanIptGetFocusStart();
// })
// }
var scanIptFocusTimer$ = null;
var inputMethodCnType$ = false;
var focusStop = true;
$(document).ready(function () {
$(document.body).on('focusin', function (e) {
var dom = e.target;
if (dom.id === 'scanIpt_') return;
...
...
@@ -41,9 +42,9 @@ $(document).ready(function () {
if (dom.id === 'scanIpt_') return;
scanIptGetFocusStart();
})
})
})
function scanStart () {
function scanStart () {
var ipt = getScanIpt();
focusStop = false;
ipt.focus();
...
...
@@ -61,61 +62,61 @@ function scanStart () {
// if (this.id === 'scanIpt_') return;
// scanIptGetFocusStart();
// })
}
}
function scanStop () {
function scanStop () {
focusStop = true;
var ipt = getScanIpt();
ipt.removeEventListener('change', scanDataChange);
ipt.removeEventListener('compositionstart', iptCompositionstart);
scanIptGetFocusStop();
document.removeEventListener('visibilitychange', pageVisible);
}
}
window.onbeforeunload = function (e) {
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);
// })
// $(document).ready(function () {
// var ipt = getScanIpt();
// document.addEventListener('visibilitychange', pageVisible);
// ipt.addEventListener('change', scanDataChange);
// ipt.addEventListener('compositionstart', iptCompositionstart);
// ipt.addEventListener('compositionend', iptCompositionend);
// })
function getScanIpt () {
function getScanIpt () {
return document.getElementById("scanIpt_");
}
}
function pageVisible () {
function pageVisible () {
var state = document.visibilityState;
if (state === 'visible') {
scanIptGetFocusStart();
} else if (state === 'hidden') {
scanIptGetFocusStop();
}
}
}
function scanIptGetFocusStart () {
function scanIptGetFocusStart () {
if (focusStop) return;
var ipt = getScanIpt();
if (ipt) {
scanIptFocusTimer$ = iptFocus(ipt);
}
}
}
function scanIptGetFocusStop () {
function scanIptGetFocusStop () {
if (scanIptFocusTimer$) {
clearInterval(scanIptFocusTimer$);
scanIptFocusTimer$ = null;
}
}
}
function iptFocus () {
function iptFocus () {
var ipt = getScanIpt();
var timer = setInterval(function () {
if (ipt !== document.activeElement && scanIptFocusTimer$) {
...
...
@@ -123,22 +124,22 @@ function iptFocus () {
}
}, 300);
return timer;
}
}
function iptCompositionstart () {
inputMethodCnType
= true;
}
function iptCompositionstart () {
inputMethodCnType$
= true;
}
function iptCompositionend () {
function iptCompositionend () {
var ipt = getScanIpt();
if (inputMethodCnType$) {
jp.alert('请将输入法设置为英文');
inputMethodCnType$ = false;
ipt.value = '';
}
}
}
function scanDataChange () {
function scanDataChange () {
var elem = getScanIpt();
var val = $(elem).val();
if (!val) {
...
...
@@ -151,6 +152,6 @@ function scanDataChange () {
$(elem).val('');
$(elem).blur();
}, 100)
}
}
</script>
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
View file @
115b9d23
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
var
LODOP
;
<
script
>
var
LODOP
;
$
(
document
).
ready
(
function
()
{
$
(
'#goodsTable'
).
bootstrapTable
({
...
...
@@ -203,15 +203,15 @@ $(document).ready(function() {
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
});
function
getIdSelections
()
{
function
getIdSelections
()
{
return
$
.
map
(
$
(
"#goodsTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
.
id
});
}
}
function
deleteAll
(){
function
deleteAll
(){
jp
.
confirm
(
'确认要删除该货品模块记录吗?'
,
function
(){
jp
.
loading
();
...
...
@@ -225,35 +225,35 @@ $(document).ready(function() {
})
})
}
}
//刷新列表
function
refresh
(){
//刷新列表
function
refresh
(){
$
(
'#goodsTable'
).
bootstrapTable
(
'refresh'
);
}
function
add
(){
}
function
add
(){
jp
.
openSaveDialog
(
'新增货品'
,
"${ctx}/warehouse/goods/goods/form/add"
,
'1200'
,
'800'
)
}
}
function
edit
(
id
){
function
edit
(
id
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
openSaveDialog
(
"编辑货品"
,
"${ctx}/warehouse/goods/goods/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
}
function
view
(
id
){
//没有权限时,不显示确定按钮
function
view
(
id
){
//没有权限时,不显示确定按钮
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
openViewDialog
(
"查看货品"
,
"${ctx}/warehouse/goods/goods/form/view?id="
+
id
,
'1200'
,
'800'
);
}
}
function
detailFormatter
(
index
,
row
)
{
function
detailFormatter
(
index
,
row
)
{
var
htmltpl
=
$
(
"#goodsChildrenTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
html
=
Mustache
.
render
(
htmltpl
,
{
idx
:
row
.
id
...
...
@@ -272,22 +272,22 @@ $(document).ready(function() {
})
return
html
;
}
}
function
initLodop
(){
function
initLodop
(){
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
}
}
function
addRow
(
list
,
idx
,
tpl
,
row
){
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
)
{
function
printQr_
(
id
)
{
try
{
if
(
!
LODOP
){
initLodop
();
...
...
@@ -309,21 +309,22 @@ $(document).ready(function() {
jp
.
close
();
})
}
}
}
function
printQr
(
id
)
{
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.showPic(imgUrl);
_thermal_Image_print_
(
imgUrl
);
}
jp
.
close
();
})
}
}
function
createAllPage
(
item
){
function
createAllPage
(
item
){
// if(!list){
// return;
...
...
@@ -337,15 +338,15 @@ $(document).ready(function() {
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
)
{
function
cleanQr
(
id
)
{
jp
.
confirm
(
'确认清除二维码吗?'
,
function
(){
jp
.
get
(
"${ctx}/warehouse/goods/goods/cleanQr?goodsInfoId="
+
id
,
function
(
res
)
{
res
.
success
&&
jp
.
success
(
'清除二维码成功!'
);
})
})
}
}
<
/script
>
<
script
type
=
"text/template"
id
=
"goodsChildrenTpl"
>
//<!--
...
...
@@ -374,8 +375,8 @@ $(document).ready(function() {
<
/table
>
<
/div
>
<
/div>/
/-->
<
/script
>
<
script
type
=
"text/template"
id
=
"goodsChild1Tpl"
>
//<!--
<
/script
>
<
script
type
=
"text/template"
id
=
"goodsChild1Tpl"
>
//<!--
<
tr
>
<
td
>
{{
row
.
type
.
name
}}
...
...
@@ -412,4 +413,4 @@ $(document).ready(function() {
{{
/
showAction
}}
<
/td
>
<
/tr>/
/-->
<
/script
>
<
/script
>
src/main/webapp/webpage/modules/warehouse/goods/goodsList.jsp
View file @
115b9d23
...
...
@@ -8,6 +8,7 @@
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"goodsList.js"
%
>
<
%@
include
file=
"logic.js"
%
>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
...
...
src/main/webapp/webpage/modules/warehouse/goods/logic.js
View file @
115b9d23
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
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
=
{
// post ws
linkDeviceType
:
'post'
,
// 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
()
{
return
'localhost:8008'
...
...
@@ -23,49 +39,165 @@ const __ws_url = function() {
* @private
*/
function
_thermal_enum_printer_
()
{
if
(
startLink
)
return
;
startLink
=
true
;
var
onBack
=
function
onBack
(
isOk
,
res
)
{
startLink
=
false
;
if
(
!
isOk
)
{
output_control
(
'通讯失败:'
+
JSON
.
stringify
(
res
));
jp
.
warning
(
'通讯失败:'
+
JSON
.
stringify
(
res
));
return
}
if
(
res
.
code
!==
0
)
{
output_control
(
res
.
msg
);
jp
.
warning
(
res
.
msg
);
return
}
let
enum_list
=
document
.
getElementById
(
'enum_list'
)
if
(
enum_list
.
length
>
0
)
{
enum_list
.
clear
()
}
if
(
res
.
device
.
length
>
0
)
{
// for (let i = 0; i < res.device.length; i++) {
// let opt = document.createElement('option')
// opt.text = res.device[i]
// enum_list.options.add(opt)
// }
console
.
log
(
res
);
device
=
res
.
device
[
0
];
printCallback
&&
printCallback
();
}
else
{
output_control
(
res
.
message
)
jp
.
warning
(
res
.
message
)
}
}
let
pack
=
{
command
:
'_thermal_enum_printer_'
,
require
:
require_type
()
,
require
:
defPrintOption
.
protocol
,
}
on_link_device
(
pack
,
onBack
);
}
function
require_type
()
{
return
defPrintOption
.
protocol
;
var
Image_style_letType
=
{
'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
)
{
let
radio
=
document
.
getElementsByName
(
'req_model'
)
if
(
radio
!=
null
)
{
if
(
radio
.
length
>
0
)
{
if
(
radio
[
0
].
checked
)
{
jqpost
(
__io_url
(),
pack
,
onback
)
}
if
(
defPrintOption
.
linkDeviceType
===
'post'
)
{
jqPost
(
__io_url
(),
pack
,
onBack
);
}
else
if
(
defPrintOption
.
linkDeviceType
===
'ws'
)
{
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 @
115b9d23
...
...
@@ -182,22 +182,22 @@
}
});
});
$
(
"#export"
).
click
(
function
(){
//导出Excel文件
var
searchParam
=
$
(
"#searchForm"
).
serializeJSON
();
searchParam
.
pageNo
=
1
;
searchParam
.
pageSize
=
-
1
;
var
sortName
=
$
(
'#ledgerTable'
).
bootstrapTable
(
"getOptions"
,
"none"
).
sortName
;
var
sortOrder
=
$
(
'#ledgerTable'
).
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/ledger/ledger/export?'
+
values
);
})
//
$("#export").click(function(){//导出Excel文件
//
var searchParam = $("#searchForm").serializeJSON();
//
searchParam.pageNo = 1;
//
searchParam.pageSize = -1;
//
var sortName = $('#ledgerTable').bootstrapTable("getOptions", "none").sortName;
//
var sortOrder = $('#ledgerTable').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/ledger/ledger/export?'+values);
//
})
$
(
"#search"
).
click
(
"click"
,
function
()
{
// 绑定查询按扭
$
(
'#ledgerTable'
).
bootstrapTable
(
'refresh'
);
...
...
@@ -210,6 +210,46 @@
$
(
'#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 @
115b9d23
...
...
@@ -7,6 +7,8 @@
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.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=
"../../../include/scan.jsp"
%
>
<script
type=
"text/javascript"
src=
"${ctxStatic}/common/js/big.js"
></script>
...
...
@@ -98,6 +100,9 @@
<button
class=
"btn btn-default"
onclick=
"viewScanData()"
>
<i
class=
"fa fa-search-plus"
></i>
查看二维码数据
</button>
<button
id=
"export"
class=
"btn btn-warning"
>
<i
class=
"fa fa-file-excel-o"
></i>
导出
</button>
</div>
<!-- 表格 -->
...
...
@@ -144,5 +149,34 @@
<
/div
>
<
/div
>
</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>
</html>
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionDetail.jsp
View file @
115b9d23
...
...
@@ -109,27 +109,27 @@
})
}
},
{
field: 'num',
title: '数量',
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoNumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
}
},
{
field: 'infoSum',
title: '总价',
sortName: 'infoSum',
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfoInfoSumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
}
},
//
{
//
field: 'num',
//
title: '数量',
//
formatter: function (value, row, index) {
//
return Mustache.render($("#ledgerInfoNumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
//
row: row,
//
idx: index
//
})
//
}
//
},
//
{
//
field: 'infoSum',
//
title: '总价',
//
sortName: 'infoSum',
//
formatter: function (value, row, index) {
//
return Mustache.render($("#ledgerInfoInfoSumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
//
row: row,
//
idx: index
//
})
//
}
//
},
{
field: 'receiver.name',
title: '领用人',
...
...
@@ -425,6 +425,7 @@
auto: true,
area: ['1200', '600'],
content: $("#scanTpl").html(),
btn: ['确定', '关闭'],
success: function () {
// $("#scanResult").focus();
scanStart();
...
...
@@ -436,8 +437,14 @@
jp.alert('至少选择一条数据');
return;
}
selectDetailHandle(getScanTable(), selectTableData);
top.layer.close(index);
if (selectTableData.some(function (e) {
return !e.selectNum;
})) {
jp.alert('选择的数据必须填写选择数量');
return false;
}
selectDetailHandle($(selector), selectTableData);
layer.close(index);
},
cancel () {
scanStop();
...
...
@@ -449,32 +456,23 @@
var json = JSON.parse(val);
var qrCodeId = json.code;
// var params = "qrId=" + json.code;
console.log(val)
jp.get('${ctx}/warehouse/ledger/ledger/findByQrOrCode?qrCodeId=' + qrCodeId, function (res) {
jp.get('${ctx}/warehouse/ledger/ledger/findByQrOrCode?qrId=' + qrCodeId, function (res) {
var data = res.rows || [];
if (data.length) {
//
var item = data[0];
var item = data[0];
//
// /***
// * 重复的物资编码去重
// */
// var fined = getTableData().find(function(v){
// return v.ledgerInfo.code === item.code
// })
// if(fined){
// jp.warning('有物资重复不能领用');
// return;
// }
// $(selector).bootstrapTable('append', [
// {
// id: '',
// delFlag: 0,
// remarks: '',
// ledgerInfo: item
// }
// ]);
var fined = getSelectScanTable().find(function(v){
return v.ledgerInfo.code === item.code
})
if(fined){
jp.warning('有物资重复不能领用');
return;
}
getScanTable().bootstrapTable('append', item);
// $(elem).val('').focus();
debugger
console.log(data)
}else{
jp.warning('未找到任何数据!');
...
...
@@ -497,7 +495,10 @@
var keyList = addDetailColumns.key.split('|');
table.bootstrapTable('destroy').bootstrapTable({
data: [],
columns: labelList.map(function (el, index) {
columns: [
{ checkbox: true }
].concat(
labelList.map(function (el, index) {
var key = keyList[index];
return {
title: el,
...
...
@@ -512,6 +513,7 @@
events: top.gridSelectColumnFormatterMap[key] ? top.gridSelectColumnFormatterMap[key].events : {}
}
})
)
})
}
...
...
@@ -603,7 +605,7 @@
value="{{row.ledgerInfo.type.code}}"/>
</script>
<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
value="{{row.ledgerInfo.type.unit}}"/>
</script>
...
...
@@ -632,7 +634,7 @@
{{#row.receiver}}
<div class="sign-result">
<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>
{{/row.receiver}}
{{^row.receiver}}
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionForm.jsp
View file @
115b9d23
...
...
@@ -154,23 +154,23 @@
<script
type=
"text/template"
id=
"scanTpl"
>
<
div
class
=
"scan-content"
>
<%--
<
input
type
=
"text"
id
=
"scanIpt"
/>--%>
<
div
id
=
"scan-searchForm-box"
class
=
"collapse show"
>
<
div
class
=
"accordion-inner"
>
<
form
:
form
id
=
"scan-searchForm"
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"
class
=
" form-control"
/>
--%>
<
input
type
=
"text"
id
=
"scan-code"
class
=
"form-control"
onfocus
=
"scanIptGetFocusStop()"
onblur
=
"scanIptGetFocusStart()"
/
>
<
/div
>
<
div
class
=
"col-xs-12 col-sm-6 col-md-4"
>
<
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-reset"
class
=
"btn btn-primary btn-rounded btn-bordered btn-sm"
onclick
=
"refreshScanData()"
><
i
class
=
"fa fa-refresh"
><
/i> 重置</
a
>
<
/div
>
<
/div
>
<
/form:form
>
<
/div
>
<
/div
>
<%--
<
div
id
=
"scan-searchForm-box"
class
=
"collapse show"
>--%
>
<%--
<
div
class
=
"accordion-inner"
>--%
>
<%--
<
form
:
form
id
=
"scan-searchForm"
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>--%
>
<%--
&
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()"
/>--%
>
<%--
<
/div>--%
>
<%--
<
div
class
=
"col-xs-12 col-sm-6 col-md-4"
>--%
>
<%--
<
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-reset"
class
=
"btn btn-primary btn-rounded btn-bordered btn-sm"
onclick
=
"refreshScanData()"
><
i
class
=
"fa fa-refresh"
><
/i> 重置</
a
>--%
>
<%--
<
/div>--%
>
<%--
<
/div>--%
>
<%--
<
/form:form>--%
>
<%--
<
/div>--%
>
<%--
<
/div>--%
>
<
div
class
=
"scan-data-content"
>
<
table
id
=
"scan_detail_table"
><
/table
>
<
/div
>
...
...
src/main/webapp/webpage/modules/warehouse/outbound/outboundDetail.jsp
View file @
115b9d23
...
...
@@ -46,30 +46,50 @@
}
},
{
field: 'ledgerInfo.
nam
e',
title: '物资
名称
',
field: 'ledgerInfo.
cod
e',
title: '物资
编码
',
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfo
Nam
eTpl").html(), {
return Mustache.render($("#ledgerInfo
Cod
eTpl").html(), {
row: row,
idx: index
})
}
},
{
field: 'ledgerInfo.
cod
e',
title: '
物资编码
',
field: 'ledgerInfo.
type.nam
e',
title: '
品名
',
formatter: function (value, row, index) {
return Mustache.render($("#ledgerInfo
CodeTpl").html(
), {
return Mustache.render($("#ledgerInfo
TypeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""
), {
row: row,
idx: index
})
}
},
{
field: 'ledgerInfo.type.
nam
e',
title: '
品名
代码',
field: 'ledgerInfo.type.
cod
e',
title: '代码',
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,
idx: index
})
...
...
@@ -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',
title: '单价',
field: 'receiver.name',
title: '领用人',
align: 'center',
formatter: function (value, row, index) {
return Mustache.render($("#
ledgerInfoAmount
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
return Mustache.render($("#
receiver
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
...
...
@@ -105,15 +136,15 @@
})
}
},
{
field: '',
title: '操作',
formatter: function (value, row, index) {
var text = row.delFlag == 1 ? '撤销删除' : '删除';
var result = ["<a href='javascript:void(0);' onclick=\"removeRow(" + index + ", '" + row.id + "', '" + row.delFlag + "')\">" + text + "</a>"]
return result.join('');
}
}
//
{
//
field: '',
//
title: '操作',
//
formatter: function (value, row, index) {
//
var text = row.delFlag == 1 ? '撤销删除' : '删除';
//
var result = ["<a href='javascript:void(0);' onclick=\"removeRow(" + index + ", '" + row.id + "', '" + row.delFlag + "')\">" + text + "</a>"]
//
return result.join('');
//
}
//
}
]
});
}
...
...
@@ -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}}"
title="品名代码" url="/warehouse/materialtype/materialType/treeData" cssClass="form-control " disabled="disabled" allowClear="true"/>//-->
</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">
<input id="outboundInfoList{{idx}}_ledgerInfoModel"
name="outboundInfoList[{{idx}}].ledgerInfo.model" type="text" class="form-control" readonly
...
...
@@ -294,7 +335,19 @@
name="outboundInfoList[{{idx}}].ledgerInfo.amount" type="text" readonly class="form-control"
value="{{row.ledgerInfo.amount}}"/>
</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">
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="2"
onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
...
...
src/main/webapp/webpage/modules/warehouse/outbound/outboundList.js
View file @
115b9d23
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
$
(
document
).
ready
(
function
()
{
<
script
>
$
(
document
).
ready
(
function
()
{
$
(
'#outboundTable'
).
bootstrapTable
({
//请求方法
...
...
@@ -214,13 +214,13 @@ $(document).ready(function() {
});
function
getIdSelections
()
{
function
getIdSelections
()
{
return
$
.
map
(
$
(
"#outboundTable"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
.
id
});
}
}
function
deleteAll
(){
function
deleteAll
(){
jp
.
confirm
(
'确认要删除该出库信息记录吗?'
,
function
(){
jp
.
loading
();
...
...
@@ -234,35 +234,35 @@ $(document).ready(function() {
})
})
}
}
//刷新列表
function
refresh
(){
//刷新列表
function
refresh
(){
$
(
'#outboundTable'
).
bootstrapTable
(
'refresh'
);
}
function
add
(){
}
function
add
(){
jp
.
openSaveDialog
(
"新增出库单"
,
"${ctx}/warehouse/outbound/outbound/form/add"
,
'1200'
,
'800'
);
}
}
function
edit
(
id
){
function
edit
(
id
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
openSaveDialog
(
"编辑出库单"
,
"${ctx}/warehouse/outbound/outbound/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
}
function
view
(
id
){
//没有权限时,不显示确定按钮
function
view
(
id
){
//没有权限时,不显示确定按钮
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
openViewDialog
(
"查看出库单"
,
"${ctx}/warehouse/outbound/outbound/form/view?id="
+
id
,
'1200'
,
'800'
);
}
}
function
detailFormatter
(
index
,
row
)
{
function
detailFormatter
(
index
,
row
)
{
var
htmltpl
=
$
(
"#outboundChildrenTpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
html
=
Mustache
.
render
(
htmltpl
,
{
idx
:
row
.
id
...
...
@@ -280,13 +280,13 @@ $(document).ready(function() {
})
return
html
;
}
}
function
addRow
(
list
,
idx
,
tpl
,
row
){
function
addRow
(
list
,
idx
,
tpl
,
row
){
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
}));
}
}
<
/script
>
<
script
type
=
"text/template"
id
=
"outboundChildrenTpl"
>
//<!--
...
...
@@ -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
>
...
...
@@ -318,8 +318,8 @@ $(document).ready(function() {
<
/table
>
<
/div
>
<
/div>/
/-->
<
/script
>
<
script
type
=
"text/template"
id
=
"outboundChild1Tpl"
>
//<!--
<
/script
>
<
script
type
=
"text/template"
id
=
"outboundChild1Tpl"
>
//<!--
<
tr
>
<
td
>
{{
row
.
ledgerInfo
.
code
}}
...
...
@@ -330,9 +330,7 @@ $(document).ready(function() {
<
td
>
{{
row
.
ledgerInfo
.
type
.
code
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
num
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
type
.
unit
}}
<
/td
>
...
...
@@ -342,9 +340,7 @@ $(document).ready(function() {
<
td
>
{{
row
.
ledgerInfo
.
amount
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
infoSum
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
batchNum
}}
<
/td
>
...
...
@@ -361,4 +357,4 @@ $(document).ready(function() {
{{
row
.
remarks
}}
<
/td
>
<
/tr>/
/-->
<
/script
>
<
/script
>
src/main/webapp/webpage/modules/warehouse/outbound/outboundList.jsp
View file @
115b9d23
src/main/webapp/webpage/modules/warehouse/storage/storageDetail.jsp
View file @
115b9d23
...
...
@@ -432,6 +432,11 @@
* 点击扫码显示扫码窗口
*/
function addScan(){
// 选择该批次号下的货品明细
if(!$("#batchNum").val()){
jp.warning('请选择批次号!');
return;
}
layer.open({
type: 1,
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