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
830ae006
Commit
830ae006
authored
Feb 22, 2023
by
yyq1988
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接入库功能
parent
216cf482
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
11 deletions
+68
-11
storageList.js
...n/webapp/webpage/modules/warehouse/storage/storageList.js
+50
-0
storageList.jsp
.../webapp/webpage/modules/warehouse/storage/storageList.jsp
+18
-11
No files found.
src/main/webapp/webpage/modules/warehouse/storage/storageList.js
View file @
830ae006
...
...
@@ -279,6 +279,9 @@ $(document).ready(function() {
var
data1
=
storage
.
countStorageInfoList
;
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
data1
[
i
].
dict
=
{};
data1
[
i
].
storageId
=
row
.
id
;
data1
[
i
].
batchNum
=
row
.
batchNum
;
data1
[
i
].
jsonStr
=
JSON
.
stringify
(
data1
[
i
]);
addRow
(
'#storageChild-'
+
row
.
id
+
'-1-List'
,
storageChild1RowIdx
,
storageChild1Tpl
,
data1
[
i
]);
storageChild1RowIdx
=
storageChild1RowIdx
+
1
;
}
...
...
@@ -295,6 +298,49 @@ $(document).ready(function() {
}));
}
function
onStorage
(
countStorage
,
goodsInfoId
){
var
main
=
JSON
.
parse
(
countStorage
);
jp
.
get
(
"${ctx}/warehouse/storage/storage/findInfoBycountStorage?goodsInfo.id="
+
goodsInfoId
+
"&storage="
+
main
.
storageId
,
function
(
res
){
var
data
=
res
.
body
.
storageInfoList
;
if
(
Array
.
isArray
(
data
)){
var
shelvesIds
=
data
.
map
(
function
(
item
){
return
item
.
shelves
.
id
}).
join
(
','
);
// 构建台账主表
var
name$
=
$
(
"<input type='hidden' name='name' value='"
+
main
.
name
+
"' />"
);
var
typeId$
=
$
(
"<input type='hidden' name='type.id' value='"
+
main
.
type
.
id
+
"' />"
);
var
typeName$
=
$
(
"<input type='hidden' name='type.name' value='"
+
main
.
type
.
name
+
"' />"
);
var
model$
=
$
(
"<input type='hidden' name='model' value='"
+
main
.
model
+
"' />"
);
var
shelvesIds$
=
$
(
"<input type='hidden' name='shelvesIds' value='"
+
shelvesIds
+
"' />"
);
var
num$
=
$
(
"<input type='hidden' name='num' value="
+
main
.
num
+
" />"
);
var
sum$
=
$
(
"<input type='hidden' name='sum' value="
+
main
.
sum
+
" />"
);
$
(
"#ledgerForm"
).
empty
();
$
(
"#ledgerForm"
).
append
(
name$
).
append
(
typeId$
).
append
(
typeName$
).
append
(
model$
).
append
(
shelvesIds$
).
append
(
num$
).
append
(
sum$
);
data
.
forEach
(
function
(
item
,
index
){
// 构建台账附表
var
delFlag$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].delFlag' value='0' />"
);
var
name$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].name' value='"
+
item
.
name
+
"' />"
);
var
typeId$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].type.id' value='"
+
item
.
type
.
id
+
"' />"
);
var
batchNum$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].batchNum' value='"
+
main
.
batchNum
+
"' />"
);
var
model$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].model' value='"
+
item
.
model
+
"' />"
);
var
goodsInfoId$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].goodsInfo.id' value='"
+
item
.
goodsInfo
.
id
+
"' />"
);
var
qrId$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].qr.id' value='"
+
item
.
qrCode
.
id
+
"' />"
);
var
shelvesId$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].shelves.id' value='"
+
item
.
shelves
.
id
+
"' />"
);
var
code$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].code' value='"
+
item
.
qrCode
.
code
+
"' />"
);
$
(
"#ledgerForm"
).
append
(
delFlag$
).
append
(
name$
).
append
(
typeId$
).
append
(
batchNum$
).
append
(
model$
).
append
(
goodsInfoId$
).
append
(
qrId$
).
append
(
shelvesId$
).
append
(
code$
);
})
jp
.
loading
(
'入库中...'
);
jp
.
post
(
"${ctx}/warehouse/ledger/ledger/save"
,
$
(
"#ledgerForm"
).
serialize
(),
function
(
res
){
if
(
res
.
success
){
jp
.
success
(
res
.
msg
);
}
else
{
jp
.
error
(
res
.
msg
);
}
})
}
})
}
<
/script
>
<
script
type
=
"text/template"
id
=
"storageChildrenTpl"
>
//<!--
<
div
class
=
"tabs-container"
>
...
...
@@ -313,6 +359,7 @@ $(document).ready(function() {
<
th
>
货架
<
/th
>
<
th
>
总价
<
/th
>
<
th
>
数量
<
/th
>
<
th
>
操作
<
/th
>
<
/tr
>
<
/thead
>
<
tbody
id
=
"storageChild-{{idx}}-1-List"
>
...
...
@@ -344,5 +391,8 @@ $(document).ready(function() {
<
td
>
{{
row
.
num
}}
<
/td
>
<
td
>
<
a
href
=
"javascript:void(0);"
onclick
=
"onStorage('{{row.jsonStr}}','{{row.goodsInfo.id}}')"
>
入库
<
/a
>
<
/td
>
<
/tr>/
/-->
<
/script
>
src/main/webapp/webpage/modules/warehouse/storage/storageList.jsp
View file @
830ae006
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<head>
<title>
入库信息管理
</title>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"storageList.js"
%
>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
入库信息列表
</h3>
...
...
@@ -27,7 +27,8 @@
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<label
class=
"label-item single-overflow pull-left"
title=
"操作人:"
>
操作人:
</label>
<sys:userselect
id=
"operator"
name=
"operator.id"
value=
"${storage.operator.id}"
labelName=
"operator.name"
labelValue=
"${storage.operator.name}"
<sys:userselect
id=
"operator"
name=
"operator.id"
value=
"${storage.operator.id}"
labelName=
"operator.name"
labelValue=
"${storage.operator.name}"
cssClass=
"form-control "
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
...
...
@@ -35,8 +36,8 @@
<label
class=
"label-item single-overflow pull-left"
title=
"时间:"
>
时间:
</label>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-12 col-sm-5"
>
<div
class=
'input-group date'
id=
'beginTime'
style=
"left: -10px;"
>
<input
type=
'text'
name=
"beginTime"
class=
"form-control"
/>
<div
class=
'input-group date'
id=
'beginTime'
style=
"left: -10px;"
>
<input
type=
'text'
name=
"beginTime"
class=
"form-control"
/>
<span
class=
"input-group-addon"
>
<span
class=
"glyphicon glyphicon-calendar"
></span>
</span>
...
...
@@ -46,8 +47,8 @@
~
</div>
<div
class=
"col-xs-12 col-sm-5"
>
<div
class=
'input-group date'
id=
'endTime'
style=
"left: -10px;"
>
<input
type=
'text'
name=
"endTime"
class=
"form-control"
/>
<div
class=
'input-group date'
id=
'endTime'
style=
"left: -10px;"
>
<input
type=
'text'
name=
"endTime"
class=
"form-control"
/>
<span
class=
"input-group-addon"
>
<span
class=
"glyphicon glyphicon-calendar"
></span>
</span>
...
...
@@ -62,8 +63,10 @@
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<div
style=
"margin-top:26px"
>
<a
id=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-search"
></i>
查询
</a>
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
<a
id=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-search"
></i>
查询
</a>
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</div>
</div>
</form:form>
...
...
@@ -120,6 +123,9 @@
</ul>
</div>
</div>
</div>
</div>
<div
class=
"hide"
>
<form
id=
"ledgerForm"
></form>
</div>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment