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
75f8d9b9
Commit
75f8d9b9
authored
Aug 07, 2023
by
anxiaohe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成二维码刷新、入库单二维码扫描、出库信息添加货架信息
parent
03cc9f0e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
32 deletions
+145
-32
outboundList.js
...webapp/webpage/modules/warehouse/outbound/outboundList.js
+5
-2
profitWarehousingList.js
...ules/warehouse/profitwarehousing/profitWarehousingList.js
+7
-3
storageDetail.jsp
...ebapp/webpage/modules/warehouse/storage/storageDetail.jsp
+125
-27
storageForm.jsp
.../webapp/webpage/modules/warehouse/storage/storageForm.jsp
+8
-0
No files found.
src/main/webapp/webpage/modules/warehouse/outbound/outboundList.js
View file @
75f8d9b9
...
...
@@ -271,7 +271,10 @@ function detailFormatter(index, row) {
var
outboundChild1RowIdx
=
0
,
outboundChild1Tpl
=
$
(
"#outboundChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
data1
=
outbound
.
outboundInfoList
;
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
var
item
=
data1
[
i
];
data1
[
i
].
dict
=
{};
item
.
ledgerInfo
.
shelvesNames
=
item
.
ledgerInfo
.
shelvesList
?
item
.
ledgerInfo
.
shelvesList
.
map
(
function
(
e
)
{
return
e
.
name
}).
join
(
','
)
+
','
:
''
;
item
.
ledgerInfo
.
warehouseNames
=
item
.
ledgerInfo
.
warehouseList
?
item
.
ledgerInfo
.
warehouseList
.
map
(
function
(
e
)
{
return
e
.
name
}).
join
(
','
)
+
','
:
''
;
addRow
(
'#outboundChild-'
+
row
.
id
+
'-1-List'
,
outboundChild1RowIdx
,
outboundChild1Tpl
,
data1
[
i
]);
outboundChild1RowIdx
=
outboundChild1RowIdx
+
1
;
}
...
...
@@ -345,10 +348,10 @@ function addRow(list, idx, tpl, row){
{{
row
.
ledgerInfo
.
batchNum
}}
<
/td
>
<
td
>
{{
row
.
shelvesNames
}}
{{
row
.
ledgerInfo
.
shelvesNames
}}
<
/td
>
<
td
>
{{
row
.
warehouseNames
}}
{{
row
.
ledgerInfo
.
warehouseNames
}}
<
/td
>
<
td
>
<
img
src
=
"{{row.receiver}}"
width
=
"80"
/>
...
...
src/main/webapp/webpage/modules/warehouse/profitwarehousing/profitWarehousingList.js
View file @
75f8d9b9
...
...
@@ -329,7 +329,7 @@ function printQr_(id, qrCodeStr, rowIndex) {
}
}
function
printQr
(
id
)
{
function
printQr
(
id
,
qrCodeStr
,
rowIndex
)
{
jp
.
loading
(
'loading...'
);
jp
.
get
(
"${ctx}/warehouse/profitwarehousing/profitWarehousing/printQr?profitWarehousingInfoId="
+
id
,
function
(
res
)
{
if
(
res
.
success
)
{
...
...
@@ -337,6 +337,10 @@ function printQr (id) {
var
imgUrl
=
"${ctxPath}/"
+
row
.
url
;
// jp.showPic(imgUrl);
_thermal_Image_print_
(
imgUrl
);
$
(
'#profitWarehousingTable'
).
bootstrapTable
(
'collapseRow'
,
rowIndex
);
setTimeout
(
function
(){
$
(
'#profitWarehousingTable'
).
bootstrapTable
(
'expandRow'
,
rowIndex
);
},
0
)
}
jp
.
close
();
})
...
...
@@ -454,10 +458,10 @@ function inLedgerInfo(id, rowIndex ){
已出库
{{
/
row
.
status2
}}
{{
#
row
.
status3
}}
<
button
class
=
"btn btn-primary btn-sm"
onclick
=
"printQr('{{row.id}}', '{{row.qrCodeStr}}',{{row.mainRowIndex}})"
>
<
button
class
=
"btn btn-primary btn-sm"
onclick
=
"printQr('{{row.id}}', '{{row.qrCodeStr}}',{{row.mainRowIndex}}
, {{idx}}
)"
>
打印二维码
<
/button
>
<
button
class
=
"btn btn-danger btn-sm"
onclick
=
"cleanQr('{{row.id}}',{{row.mainRowIndex}})"
>
<
button
class
=
"btn btn-danger btn-sm"
onclick
=
"cleanQr('{{row.id}}',{{row.mainRowIndex}}
, {{idx}}
)"
>
清除二维码
<
/button
>
{{
#
row
.
hasQr
}}
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageDetail.jsp
View file @
75f8d9b9
...
...
@@ -442,31 +442,43 @@
type: 1,
title: '扫码',
auto: true,
area: ['500','300'],
content: $("#scanResultTpl").html(),
success: function (){
$("#scanResult").focus();
area: ['1200', '600'],
// content: $("#scanResultTpl").html(),
content: $("#scanTpl").html(),
success: function () {
// $("#scanResult").focus();
scanStart();
renderScanTable();
},
btn:['关闭']
yes: function (index, layero) {
var selectTableData = getSelectScanTable();
if (!selectTableData.length) {
jp.alert('至少选择一条数据');
return;
}
scanStop();
selectDetailHandle($(selector), selectTableData);
layer.close(index);
},
btn2: function () {
scanStop();
},
cancel: function () {
scanStop();
},
btn: ['确定', '关闭'],
})
}
/**
* 扫码
* 一、获取扫码结果
* 二、请求后台接口获取结果
* 三、增一条明细数据
* 四、清空扫码结果
* @param elem
*/
function onScanChange(elem){
// console.log($(elem).val());
try{
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;
function scanIptChangeCallback (val) {
var json = JSON.parse(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;
if (qrCode) {
var fined = getTableData().find(function(v){
return v.qrCode.id === qrCode.id
});
...
...
@@ -474,7 +486,15 @@
jp.warning('有物资重复不能入库!');
return;
}
$(selector).bootstrapTable('append',[
var scanTableData = getScanTable().bootstrapTable('getData');
var item = scanTableData.find(function (e) {
return e.qrCode.id === qrCode.id;
})
if (item) {
jp.warning('请勿添加重复数据');
return;
}
getScanTable().bootstrapTable('append',[
{
qrCode: qrCode,
goodsInfo: qrCode.goodsInfo,
...
...
@@ -484,13 +504,91 @@
remarks: ''
}
]);
$(elem).val('').focus();
})
} else {
jp.warning('未找到任何数据!');
}
}catch (e){
console.log(e);
}
// $(elem).val('').focus();
})
}
var addDetailColumns = {
label: '物资编码|品名|代码|单价|单位|数量|总价|型号',
key: 'qrCode.code|type.name|type.code|type.amount|type.unit|num|infoSum|model'
};
function getScanTable () {
return $("#scan_detail_table");
}
function getSelectScanTable () {
return getScanTable().bootstrapTable('getSelections');
}
function renderScanTable () {
var table = getScanTable();
var labelList = addDetailColumns.label.split('|');
var keyList = addDetailColumns.key.split('|');
table.bootstrapTable('destroy').bootstrapTable({
data: [],
columns: [
{ checkbox: true }
].concat(
labelList.map(function (el, index) {
var key = keyList[index];
return {
title: el,
field: keyList[index],
}
})
)
})
}
function selectDetailHandle (table, data) {
table.bootstrapTable('append', data);
}
/**
* 扫码
* 一、获取扫码结果
* 二、请求后台接口获取结果
* 三、增一条明细数据
* 四、清空扫码结果
* @param elem
*/
<%--function onScanChange(elem){--%>
<%-- // console.log($(elem).val());--%>
<%-- try{--%>
<%-- 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;--%>
<%-- var fined = getTableData().find(function(v){--%>
<%-- return v.qrCode.id === qrCode.id--%>
<%-- });--%>
<%-- if(fined){--%>
<%-- jp.warning('有物资重复不能入库!');--%>
<%-- return;--%>
<%-- }--%>
<%-- $(selector).bootstrapTable('append',[--%>
<%-- {--%>
<%-- qrCode: qrCode,--%>
<%-- goodsInfo: qrCode.goodsInfo,--%>
<%-- ...qrCode.goodsInfo,--%>
<%-- id: '',--%>
<%-- delFlag: 0,--%>
<%-- remarks: ''--%>
<%-- }--%>
<%-- ]);--%>
<%-- $(elem).val('').focus();--%>
<%-- })--%>
<%-- }catch (e){--%>
<%-- console.log(e);--%>
<%-- }--%>
<%--}--%>
</script>
<script id="hideTpl" type="text/html">
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageForm.jsp
View file @
75f8d9b9
...
...
@@ -41,6 +41,7 @@
-ms-ime-mode
:
inactive
;
}
</style>
<
%@
include
file=
"../../../include/scan.jsp"
%
>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
...
...
@@ -184,5 +185,12 @@
}
}
</script>
<script
type=
"text/template"
id=
"scanTpl"
>
<
div
class
=
"scan-content"
>
<
div
class
=
"scan-data-content"
style
=
"padding: 10px"
>
<
table
id
=
"scan_detail_table"
><
/table
>
<
/div
>
<
/div
>
</script>
</body>
</html>
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