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
afc155c5
Commit
afc155c5
authored
Feb 22, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'hy' and 'master' of gitlab.yqdchina.com:huyi/warehouse into hy
parents
2b5f3ffb
51fb0938
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
143 additions
and
30 deletions
+143
-30
jeeplus.js
src/main/webapp/static/common/js/jeeplus.js
+3
-5
shelvesSelect.jsp
src/main/webapp/webpage/modules/common/shelvesSelect.jsp
+1
-3
goodsList.js
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
+3
-5
storageDetail.jsp
...ebapp/webpage/modules/warehouse/storage/storageDetail.jsp
+41
-8
storageForm.jsp
.../webapp/webpage/modules/warehouse/storage/storageForm.jsp
+38
-0
storageList.js
...n/webapp/webpage/modules/warehouse/storage/storageList.js
+15
-7
storageStatistic.jsp
...pp/webpage/modules/warehouse/storage/storageStatistic.jsp
+39
-0
warehouseList.js
...bapp/webpage/modules/warehouse/warehouse/warehouseList.js
+3
-2
No files found.
src/main/webapp/static/common/js/jeeplus.js
View file @
afc155c5
...
...
@@ -273,15 +273,13 @@ function delRow(obj, prefix){
content
:
ctx
+
"/warehouse/shelves/shelves/shelvesSelect"
,
btn
:
[
'确定'
,
'关闭'
],
yes
:
function
(
index
,
layero
){
var
ids
=
layero
.
find
(
"iframe"
)[
0
].
contentWindow
.
getIdSelections
();
var
names
=
layero
.
find
(
"iframe"
)[
0
].
contentWindow
.
getNameSelections
();
if
(
ids
.
length
==
0
){
var
items
=
layero
.
find
(
"iframe"
)[
0
].
contentWindow
.
getSelections
();
if
(
Array
.
isArray
(
items
)
&&
items
.
length
==
0
){
jp
.
warning
(
"请选择至少一个货架!"
);
return
;
}
// 执行保存
yesFuc
(
ids
.
join
(
","
),
names
.
join
(
","
));
yesFuc
(
items
);
top
.
layer
.
close
(
index
);
},
cancel
:
function
(
index
){
...
...
src/main/webapp/webpage/modules/common/shelvesSelect.jsp
View file @
afc155c5
...
...
@@ -159,9 +159,7 @@
});
}
function
getSelections
()
{
return
$
.
map
(
$
(
"#table"
).
bootstrapTable
(
'getSelections'
),
function
(
row
)
{
return
row
});
return
$
(
"#table"
).
bootstrapTable
(
'getSelections'
)
}
</script>
...
...
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
View file @
afc155c5
...
...
@@ -249,14 +249,14 @@ $(document).ready(function() {
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/goods/goods/form/edit?id="
+
id
);
jp
.
openSaveDialog
(
"编辑货品"
,
"${ctx}/warehouse/goods/goods/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
function
view
(
id
){
//没有权限时,不显示确定按钮
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/goods/goods/form/view?id="
+
id
);
jp
.
openViewDialog
(
"查看货品"
,
"${ctx}/warehouse/goods/goods/form/view?id="
+
id
,
'1200'
,
'800'
);
}
...
...
@@ -301,8 +301,6 @@ $(document).ready(function() {
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
SET_PRINT_PAGESIZE
(
1
,
400
,
600
,
0
)
LODOP
.
SET_PRINT_MODE
(
"FULL_HEIGHT_FOR_OVERFLOW"
,
true
);
LODOP
.
SET_PRINT_MODE
(
"FULL_HEIGHT_FOR_OVERFLOW"
,
true
);
createAllPage
(
list
);
LODOP
.
PREVIEW
();
jp
.
close
();
...
...
@@ -317,7 +315,7 @@ $(document).ready(function() {
list
.
forEach
(
function
(
item
){
LODOP
.
NewPage
();
var
imgUrl
=
"${ctxPath}/"
+
item
.
url
;
LODOP
.
ADD_PRINT_IMAGE
(
'0%'
,
"0%"
,
"100%"
,
"100%"
,
"<img border='0' src='"
+
imgUrl
+
"' />"
);
LODOP
.
ADD_PRINT_IMAGE
(
'0%'
,
"0%"
,
"100%"
,
"100%"
,
"<img
width='150'
border='0' src='"
+
imgUrl
+
"' />"
);
})
}
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageDetail.jsp
View file @
afc155c5
...
...
@@ -8,9 +8,11 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<div id="toolbar" class="text-left">
<c:if test="${mode == 'add' || mode == 'edit'}">
<a class="btn btn-primary btn-sm" onclick="addDetail('#detail_table')" title="新增"><i class="fa fa-plus"></i> 手动添加</a>
<a class="btn btn-primary btn-sm" onclick="addScan('#detail_table')" title="新增"><i class="fa fa-plus"></i> 扫码添加</a>
<a id="editAll" class="btn btn-primary btn-sm" onclick="addShelve('#detail_table')" title="新增"><i class="fa fa-plus"></i> 批量编辑货架</a>
</c:if>
</div>
<table id="detail_table" data-toolbar="#toolbar"></table>
<script>
...
...
@@ -126,7 +128,6 @@
...item
}
})
debugger
$(selector).bootstrapTable('append', data)
}
})
...
...
@@ -175,21 +176,37 @@
}
}
function addShelve(){
jp.openShelvesSelectDialog(function (id,name){
/**
* 获取所有明细数据
* @returns {*|jQuery}
*/
function getTableData(){
return $(selector).bootstrapTable('getData');
}
getSelections().forEach(function (item,index){
function addShelve(){
jp.openShelvesSelectDialog(function (items){
var Shelve = items[0];
// TODO: 获取选中的明细下标
getSelections().forEach(function (item){
var index = getTableData().findIndex(function (current){
return current.qrCode.id === item.qrCode.id;
})
updateRow(index,{
shelves: {
id: id,
name: name
}
id: Shelve.id,
name: Shelve.name
},
warehouse: Shelve.warehouse
})
})
})
}
/**
* 点击扫码显示扫码窗口
*/
function addScan(){
layer.open({
type: 1,
...
...
@@ -217,6 +234,21 @@
var json = JSON.parse($(elem).val());
var qrCodeId = json.code;
var goodsInfoId = json.infoId;
jp.get('${ctx}/warehouse/goods/goods/getGIAndQCByTwoId?goodsInfoId='+goodsInfoId+"&qrCodeId="+qrCodeId, function (res){
var qrCode = res.body.qrCode;
$(selector).bootstrapTable('append',[
{
qrCode: qrCode,
goodsInfo: qrCode.goodsInfo,
...qrCode.goodsInfo,
id: '',
delFlag: 0,
remarks: ''
}
]);
$(elem).val('').focus();
})
}catch (e){
console.log(e);
}
...
...
@@ -230,6 +262,7 @@
<input id="storageInfoList{{idx}}_goodsInfoName" name="storageInfoList[{{idx}}].goodsInfo.name" type="hidden" value="{{row.goodsInfo.name}}"/>
<input id="storageInfoList{{idx}}_goodsInfoAmount" name="storageInfoList[{{idx}}].goodsInfo.amount" type="hidden" value="{{row.goodsInfo.amount}}"/>
<input id="storageInfoList{{idx}}_shelvesId" name="storageInfoList[{{idx}}].shelves.id" type="hidden" value="{{row.shelves.id}}" readonly class="form-control" />
<input id="storageInfoList{{idx}}_warehouseId" name="storageInfoList[{{idx}}].warehouse.id" type="hidden" value="{{row.warehouse.id}}" readonly class="form-control" />
<input id="storageInfoList{{idx}}_amount" name="storageInfoList[{{idx}}].amount" type="hidden" value="{{row.amount}}" readonly class="form-control" />
<input id="storageInfoList{{idx}}_qrCodeId" name="storageInfoList[{{idx}}].qrCode.id" type="hidden" value="{{row.qrCode.id}}" readonly class="form-control" />
...
...
@@ -251,7 +284,7 @@
<input id="storageInfoList{{idx}}_shelvesName" name="storageInfoList[{{idx}}].shelves.name" type="text" value="{{row.shelves.name}}" readonly class="form-control" />
</script>
<script id="remarksTpl" type="text/html">
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="
4
" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="
2
" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
</script>
<script id="scanResultTpl" type="text/html">
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageForm.jsp
View file @
afc155c5
...
...
@@ -6,6 +6,33 @@
<meta
name=
"decorator"
content=
"ani"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/common/css/form.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.css"
>
<style>
.statistic-container
{
position
:
relative
;
padding
:
45px
15px
15px
;
margin
:
0
-15px
15px
;
border-style
:
solid
;
margin-right
:
0
;
margin-left
:
0
;
background-color
:
#fff
;
border-color
:
#ddd
;
border-width
:
1px
;
border-radius
:
4px
4px
0
0
;
-webkit-box-shadow
:
none
;
box-shadow
:
none
;
}
.statistic-container
:after
{
position
:
absolute
;
top
:
15px
;
left
:
15px
;
font-size
:
12px
;
font-weight
:
700
;
color
:
#959595
;
text-transform
:
uppercase
;
letter-spacing
:
1px
;
content
:
"统计信息"
;
}
</style>
<script
type=
"text/javascript"
src=
"${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/plugin/bootstrapTable/bootstrap-table-zh-CN.js"
></script>
</head>
...
...
@@ -63,6 +90,11 @@
<
%@
include
file=
"storageDetail.jsp"
%
>
</td>
</tr>
<tr>
<td
colspan=
"4"
>
<
%@
include
file=
"storageStatistic.jsp"
%
>
</td>
</tr>
</table>
</form:form>
</div>
...
...
@@ -74,6 +106,12 @@
$
(
document
).
ready
(
function
()
{
initTable
();
if
(
'${mode}'
==
'view'
){
getDetail
();
initStatisticTable
();
}
jp
.
ajaxForm
(
"#inputForm"
,
function
(
data
)
{
if
(
data
.
success
)
{
jp
.
success
(
data
.
msg
);
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageList.js
View file @
afc155c5
...
...
@@ -255,14 +255,14 @@ $(document).ready(function() {
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/storage/storage/form/edit?id="
+
id
);
jp
.
openSaveDialog
(
"编辑入库单"
,
"${ctx}/warehouse/storage/storage/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
function
view
(
id
){
//没有权限时,不显示确定按钮
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/storage/storage/form/view?id="
+
id
);
jp
.
openViewDialog
(
"查看入库单"
,
"${ctx}/warehouse/storage/storage/form/view?id="
+
id
,
'1200'
,
'800'
);
}
...
...
@@ -274,9 +274,9 @@ $(document).ready(function() {
var
html
=
Mustache
.
render
(
htmltpl
,
{
idx
:
row
.
id
});
$
.
get
(
"${ctx}/warehouse/storage/storage/
detail
?id="
+
row
.
id
,
function
(
storage
){
$
.
get
(
"${ctx}/warehouse/storage/storage/
countStorage
?id="
+
row
.
id
,
function
(
storage
){
var
storageChild1RowIdx
=
0
,
storageChild1Tpl
=
$
(
"#storageChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
data1
=
storage
.
s
torageInfoList
;
var
data1
=
storage
.
countS
torageInfoList
;
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
data1
[
i
].
dict
=
{};
addRow
(
'#storageChild-'
+
row
.
id
+
'-1-List'
,
storageChild1RowIdx
,
storageChild1Tpl
,
data1
[
i
]);
...
...
@@ -309,8 +309,10 @@ $(document).ready(function() {
<
th
>
名称
<
/th
>
<
th
>
类型
<
/th
>
<
th
>
型号
<
/th
>
<
th
>
仓库
<
/th
>
<
th
>
货架
<
/th
>
<
th
>
备注信息
<
/th
>
<
th
>
总价
<
/th
>
<
th
>
数量
<
/th
>
<
/tr
>
<
/thead
>
<
tbody
id
=
"storageChild-{{idx}}-1-List"
>
...
...
@@ -331,10 +333,16 @@ $(document).ready(function() {
{{
row
.
model
}}
<
/td
>
<
td
>
{{
row
.
shelves
.
name
}}
{{
row
.
warehouseNames
}}
<
/td
>
<
td
>
{{
row
.
remarks
}}
{{
row
.
shelvesNames
}}
<
/td
>
<
td
>
{{
row
.
sum
}}
<
/td
>
<
td
>
{{
row
.
num
}}
<
/td
>
<
/tr>/
/-->
<
/script
>
src/main/webapp/webpage/modules/warehouse/storage/storageStatistic.jsp
0 → 100644
View file @
afc155c5
<%--
Created by IntelliJ IDEA.
User: dell
Date: 2023/2/22
Time: 15:27
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<div class="statistic-container">
<table id="statisticTable" class="detail-table"></table>
</div>
<script>
function initStatisticTable(){
$("#statisticTable").bootstrapTable({
data: [],
columns:[
{field: 'name', title: '名称', align: 'center'},
{field: 'type.name', title: '类型',align: 'center'},
{field: 'model', title: '型号',align: 'center'},
{field: 'warehouseNames', title: '仓库',align: 'center'},
{field: 'shelvesNames', title: '货架',align: 'center'},
{field: 'sum', title: '总价',align: 'center'},
{field: 'num', title: '数量',align: 'center'}
]
})
}
function getDetail(){
$.get("${ctx}/warehouse/storage/storage/countStorage?id=${storage.id}", function(storage){
var data = storage.countStorageInfoList;
$("#statisticTable").bootstrapTable('append', data);
})
}
</script>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/warehouse/warehouseList.js
View file @
afc155c5
...
...
@@ -233,14 +233,14 @@ $(document).ready(function() {
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/warehouse/warehouse/form/edit?id="
+
id
);
jp
.
openSaveDialog
(
"编辑仓库"
,
"${ctx}/warehouse/warehouse/warehouse/form/edit?id="
+
id
,
'800'
,
'600'
);
}
function
view
(
id
)
{
if
(
id
==
undefined
){
id
=
getIdSelections
();
}
jp
.
go
(
"${ctx}/warehouse/warehouse/warehouse/form/view?id="
+
id
);
jp
.
openViewDialog
(
"查看仓库"
,
"${ctx}/warehouse/warehouse/warehouse/form/view?id="
+
id
,
'800'
,
'600'
);
}
<
/script>
\ 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