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
8ad7d0d8
Commit
8ad7d0d8
authored
Feb 23, 2023
by
zhanglt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yqdchina.com/huyi/warehouse
into zlt
parents
afc02f47
6134ed62
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
530 additions
and
198 deletions
+530
-198
LedgerInfoMapper.xml
.../modules/warehouse/ledger/mapper/xml/LedgerInfoMapper.xml
+3
-0
LedgerService.java
...eplus/modules/warehouse/ledger/service/LedgerService.java
+19
-1
LedgerController.java
...eeplus/modules/warehouse/ledger/web/LedgerController.java
+47
-1
CountStorageInfo.java
...eplus/modules/warehouse/storage/dto/CountStorageInfo.java
+10
-1
StorageInfoMapper.xml
...odules/warehouse/storage/mapper/xml/StorageInfoMapper.xml
+3
-1
StorageService.java
...lus/modules/warehouse/storage/service/StorageService.java
+1
-0
ledgerDetail.jsp
.../webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
+5
-1
ledgerList.js
...ain/webapp/webpage/modules/warehouse/ledger/ledgerList.js
+14
-24
materialRequisitionDetail.jsp
...rehouse/materialrequisition/materialRequisitionDetail.jsp
+283
-0
materialRequisitionForm.jsp
...warehouse/materialrequisition/materialRequisitionForm.jsp
+134
-163
materialRequisitionList.js
.../warehouse/materialrequisition/materialRequisitionList.js
+3
-3
storageList.js
...n/webapp/webpage/modules/warehouse/storage/storageList.js
+8
-3
UserController.class
.../classes/com/jeeplus/modules/sys/web/UserController.class
+0
-0
No files found.
src/main/java/com/jeeplus/modules/warehouse/ledger/mapper/xml/LedgerInfoMapper.xml
View file @
8ad7d0d8
...
@@ -90,6 +90,9 @@
...
@@ -90,6 +90,9 @@
<if
test=
"dbName == 'mssql'"
>
'%'+#{code}+'%'
</if>
<if
test=
"dbName == 'mssql'"
>
'%'+#{code}+'%'
</if>
<if
test=
"dbName == 'mysql'"
>
concat('%',#{code},'%')
</if>
<if
test=
"dbName == 'mysql'"
>
concat('%',#{code},'%')
</if>
</if>
</if>
<if
test=
"qr != null and qr.id != null and qr.id != ''"
>
AND a.qr_id = #{qr.id}
</if>
</where>
</where>
<choose>
<choose>
<when
test=
"page !=null and page.orderBy != null and page.orderBy != ''"
>
<when
test=
"page !=null and page.orderBy != null and page.orderBy != ''"
>
...
...
src/main/java/com/jeeplus/modules/warehouse/ledger/service/LedgerService.java
View file @
8ad7d0d8
...
@@ -105,7 +105,14 @@ public class LedgerService extends CrudService<LedgerMapper, Ledger> {
...
@@ -105,7 +105,14 @@ public class LedgerService extends CrudService<LedgerMapper, Ledger> {
public
Page
<
Ledger
>
findPage
(
Page
<
Ledger
>
page
,
Ledger
ledger
)
{
public
Page
<
Ledger
>
findPage
(
Page
<
Ledger
>
page
,
Ledger
ledger
)
{
return
super
.
findPage
(
page
,
ledger
);
return
super
.
findPage
(
page
,
ledger
);
}
}
public
Page
<
LedgerInfo
>
findInfoPage
(
Page
<
LedgerInfo
>
page
,
LedgerInfo
ledgerInfo
)
{
dataRuleFilter
(
ledgerInfo
);
ledgerInfo
.
setPage
(
page
);
page
.
setList
(
ledgerInfoMapper
.
findList
(
ledgerInfo
));
return
page
;
}
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
void
save
(
Ledger
ledger
)
{
public
void
save
(
Ledger
ledger
)
{
Ledger
oldLeger
=
mapper
.
findByTypeAndModel
(
ledger
);
Ledger
oldLeger
=
mapper
.
findByTypeAndModel
(
ledger
);
...
@@ -173,5 +180,15 @@ public class LedgerService extends CrudService<LedgerMapper, Ledger> {
...
@@ -173,5 +180,15 @@ public class LedgerService extends CrudService<LedgerMapper, Ledger> {
super
.
delete
(
ledger
);
super
.
delete
(
ledger
);
ledgerInfoMapper
.
delete
(
new
LedgerInfo
(
ledger
));
ledgerInfoMapper
.
delete
(
new
LedgerInfo
(
ledger
));
}
}
@Transactional
(
readOnly
=
false
)
public
LedgerInfo
findByQrOrCode
(
LedgerInfo
ledgerInfo
)
{
List
<
LedgerInfo
>
ledgerInfoList
=
ledgerInfoMapper
.
findList
(
ledgerInfo
);
if
(
null
!=
ledgerInfoList
&&
ledgerInfoList
.
size
()
>
0
)
{
return
ledgerInfoList
.
get
(
0
);
}
else
{
return
null
;
}
}
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/ledger/web/LedgerController.java
View file @
8ad7d0d8
...
@@ -12,6 +12,8 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -12,6 +12,8 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.ConstraintViolationException
;
import
javax.validation.ConstraintViolationException
;
import
com.jeeplus.modules.warehouse.ledger.entity.LedgerInfo
;
import
com.jeeplus.modules.warehouse.qrcode.entity.QrCode
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -174,6 +176,8 @@ public class LedgerController extends BaseController {
...
@@ -174,6 +176,8 @@ public class LedgerController extends BaseController {
return
ledgerService
.
get
(
id
);
return
ledgerService
.
get
(
id
);
}
}
@ResponseBody
@RequestMapping
(
value
=
"countLedger"
)
public
Ledger
countLedger
(
String
id
)
{
public
Ledger
countLedger
(
String
id
)
{
return
ledgerService
.
countLedger
(
id
);
return
ledgerService
.
countLedger
(
id
);
}
}
...
@@ -233,6 +237,47 @@ public class LedgerController extends BaseController {
...
@@ -233,6 +237,47 @@ public class LedgerController extends BaseController {
}
}
return
j
;
return
j
;
}
}
@ResponseBody
@RequestMapping
(
value
=
"infoDate"
)
public
Map
<
String
,
Object
>
infoDate
(
LedgerInfo
ledgerInfo
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
Page
<
LedgerInfo
>
page
=
ledgerService
.
findInfoPage
(
new
Page
<
LedgerInfo
>(
request
,
response
),
ledgerInfo
);
return
getBootstrapData
(
page
);
}
/**
* 根据二维码id或者物资编码返货台账明细信息
* @param qrId
* @param code
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"findByQrOrCode"
)
public
AjaxJson
findByQrOrCode
(
String
qrId
,
String
code
)
{
AjaxJson
j
=
new
AjaxJson
();
boolean
b
=
false
;
if
(
StringUtils
.
isNotBlank
(
qrId
))
{
b
=
true
;
}
if
(
StringUtils
.
isNotBlank
(
code
))
{
b
=
true
;
}
if
(
b
)
{
LedgerInfo
temLi
=
new
LedgerInfo
();
QrCode
qrCode
=
new
QrCode
();
qrCode
.
setId
(
qrId
);
temLi
.
setQr
(
qrCode
);
temLi
.
setCode
(
code
);
LedgerInfo
ledgerInfo
=
ledgerService
.
findByQrOrCode
(
temLi
);
j
.
put
(
"ledgerInfo"
,
ledgerInfo
);
j
.
setSuccess
(
true
);
j
.
setMsg
(
"查询成功"
);
}
else
{
j
.
setSuccess
(
false
);
j
.
setMsg
(
"查询失败"
);
}
return
j
;
}
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/storage/dto/CountStorageInfo.java
View file @
8ad7d0d8
...
@@ -22,7 +22,8 @@ public class CountStorageInfo extends DataEntity<StorageInfo> {
...
@@ -22,7 +22,8 @@ public class CountStorageInfo extends DataEntity<StorageInfo> {
private
GoodsInfo
goodsInfo
;
// 货品明细id
private
GoodsInfo
goodsInfo
;
// 货品明细id
private
Shelves
shelves
;
// 货架id
private
Shelves
shelves
;
// 货架id
private
Warehouse
warehouse
;
// 仓库外键
private
Warehouse
warehouse
;
// 仓库外键
private
BigDecimal
sum
;
// 单价
private
BigDecimal
sum
;
// 总价
private
BigDecimal
amount
;
// 单价
private
int
num
;
// 数量
private
int
num
;
// 数量
private
String
state
;
// 入库状态
private
String
state
;
// 入库状态
...
@@ -132,4 +133,12 @@ public class CountStorageInfo extends DataEntity<StorageInfo> {
...
@@ -132,4 +133,12 @@ public class CountStorageInfo extends DataEntity<StorageInfo> {
public
void
setState
(
String
state
)
{
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
}
}
src/main/java/com/jeeplus/modules/warehouse/storage/mapper/xml/StorageInfoMapper.xml
View file @
8ad7d0d8
...
@@ -202,6 +202,7 @@
...
@@ -202,6 +202,7 @@
type.name AS "type.name",
type.name AS "type.name",
a.model AS "model",
a.model AS "model",
sum(a.amount) AS "sum",
sum(a.amount) AS "sum",
a.amount AS "amount",
a.goods_info_id AS "goodsInfo.id",
a.goods_info_id AS "goodsInfo.id",
a.shelves_id AS "shelves.id",
a.shelves_id AS "shelves.id",
s.name AS "shelves.name",
s.name AS "shelves.name",
...
@@ -221,7 +222,7 @@
...
@@ -221,7 +222,7 @@
AND a.storage_id = #{storage.id}
AND a.storage_id = #{storage.id}
</if>
</if>
</where>
</where>
GROUP BY a.goods_info_id,a.shelves_id,qr.state
GROUP BY a.goods_info_id,a.shelves_id,qr.state
,a.amount
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/storage/service/StorageService.java
View file @
8ad7d0d8
...
@@ -90,6 +90,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
...
@@ -90,6 +90,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
csi
.
setName
(
c
.
getName
());
csi
.
setName
(
c
.
getName
());
csi
.
setType
(
c
.
getType
());
csi
.
setType
(
c
.
getType
());
csi
.
setState
(
c
.
getState
());
csi
.
setState
(
c
.
getState
());
csi
.
setAmount
(
c
.
getAmount
());
}
}
if
(
i
!=
list
.
size
()
-
1
)
{
if
(
i
!=
list
.
size
()
-
1
)
{
shelvesNames
=
shelvesNames
+
c
.
getShelves
().
getName
()
+
","
;
shelvesNames
=
shelvesNames
+
c
.
getShelves
().
getName
()
+
","
;
...
...
src/main/webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
View file @
8ad7d0d8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
var data = ${fns:toJson(ledger.ledgerInfoList)};
var data = ${fns:toJson(ledger.ledgerInfoList)};
$(selector).bootstrapTable({
$(selector).bootstrapTable({
data: data,
data: data,
columns:[
{checkbox: true},
columns:[
{
{
field: 'no',
field: 'no',
title: '序号',
title: '序号',
...
@@ -183,6 +183,10 @@
...
@@ -183,6 +183,10 @@
<input id="ledgerInfoList{{idx}}_batchNum" name="ledgerInfoList[{{idx}}].batchNum" type="text" value="{{row.batchNum}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/>
<input id="ledgerInfoList{{idx}}_batchNum" name="ledgerInfoList[{{idx}}].batchNum" type="text" value="{{row.batchNum}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/>
</script>
</script>
<script id="shelvesTpl" type="text/html">
<input id="ledgerInfoList{{idx}}_shelvesName" name="ledgerInfoList[{{idx}}].shelves.name" type="text" value="{{row.shelves.name}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/>
</script>
<script id="codeTpl" type="text/html">
<script id="codeTpl" type="text/html">
<input id="ledgerInfoList{{idx}}_code" name="ledgerInfoList[{{idx}}].code" type="text" value="{{row.code}}" readonly class="form-control" />
<input id="ledgerInfoList{{idx}}_code" name="ledgerInfoList[{{idx}}].code" type="text" value="{{row.code}}" readonly class="form-control" />
</script>
</script>
src/main/webapp/webpage/modules/warehouse/ledger/ledgerList.js
View file @
8ad7d0d8
...
@@ -124,10 +124,10 @@ $(document).ready(function() {
...
@@ -124,10 +124,10 @@ $(document).ready(function() {
}
}
,{
,{
field
:
's
helvesIds
'
,
field
:
's
um
'
,
title
:
'
货架id集合
'
,
title
:
'
总价
'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
's
helvesIds
'
sortName
:
's
um
'
}
}
,{
,{
...
@@ -138,10 +138,10 @@ $(document).ready(function() {
...
@@ -138,10 +138,10 @@ $(document).ready(function() {
}
}
,{
,{
field
:
'
remarks
'
,
field
:
'
createDate
'
,
title
:
'
备注信息
'
,
title
:
'
创建时间
'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'
remarks
'
sortName
:
'
createDate
'
}
}
]
]
...
@@ -275,9 +275,9 @@ $(document).ready(function() {
...
@@ -275,9 +275,9 @@ $(document).ready(function() {
var
html
=
Mustache
.
render
(
htmltpl
,
{
var
html
=
Mustache
.
render
(
htmltpl
,
{
idx
:
row
.
id
idx
:
row
.
id
});
});
$
.
get
(
"${ctx}/warehouse/ledger/ledger/
detail
?id="
+
row
.
id
,
function
(
ledger
){
$
.
get
(
"${ctx}/warehouse/ledger/ledger/
countLedger
?id="
+
row
.
id
,
function
(
ledger
){
var
ledgerChild1RowIdx
=
0
,
ledgerChild1Tpl
=
$
(
"#ledgerChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
ledgerChild1RowIdx
=
0
,
ledgerChild1Tpl
=
$
(
"#ledgerChild1Tpl"
).
html
().
replace
(
/
(\/\/\<
!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
data1
=
ledger
.
l
edgerInfoList
;
var
data1
=
ledger
.
countL
edgerInfoList
;
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
data1
[
i
].
dict
=
{};
data1
[
i
].
dict
=
{};
addRow
(
'#ledgerChild-'
+
row
.
id
+
'-1-List'
,
ledgerChild1RowIdx
,
ledgerChild1Tpl
,
data1
[
i
]);
addRow
(
'#ledgerChild-'
+
row
.
id
+
'-1-List'
,
ledgerChild1RowIdx
,
ledgerChild1Tpl
,
data1
[
i
]);
...
@@ -312,7 +312,7 @@ $(document).ready(function() {
...
@@ -312,7 +312,7 @@ $(document).ready(function() {
<
th
>
型号
<
/th
>
<
th
>
型号
<
/th
>
<
th
>
批次号
<
/th
>
<
th
>
批次号
<
/th
>
<
th
>
货架
<
/th
>
<
th
>
货架
<
/th
>
<
th
>
物资编码
<
/th
>
<
th
>
仓库
<
/th
>
<
/tr
>
<
/tr
>
<
/thead
>
<
/thead
>
<
tbody
id
=
"ledgerChild-{{idx}}-1-List"
>
<
tbody
id
=
"ledgerChild-{{idx}}-1-List"
>
...
@@ -327,7 +327,7 @@ $(document).ready(function() {
...
@@ -327,7 +327,7 @@ $(document).ready(function() {
{{
row
.
name
}}
{{
row
.
name
}}
<
/td
>
<
/td
>
<
td
>
<
td
>
{{
row
.
type
.
cod
e
}}
{{
row
.
type
.
nam
e
}}
<
/td
>
<
/td
>
<
td
>
<
td
>
{{
row
.
model
}}
{{
row
.
model
}}
...
@@ -336,22 +336,12 @@ $(document).ready(function() {
...
@@ -336,22 +336,12 @@ $(document).ready(function() {
{{
row
.
batchNum
}}
{{
row
.
batchNum
}}
<
/td
>
<
/td
>
<
td
>
<
td
>
{{
row
.
ledger
.
id
}}
{{
row
.
shelvesNames
}}
<
/td
>
<
/td
>
<
td
>
<
td
>
{{
row
.
goodsInfo
.
id
}}
{{
row
.
warehouseNames
}}
<
/td
>
<
td
>
{{
row
.
qr
.
id
}}
<
/td
>
<
td
>
{{
row
.
shelves
.
name
}}
<
/td
>
<
td
>
{{
row
.
code
}}
<
/td
>
<
td
>
{{
row
.
remarks
}}
<
/td
>
<
/td
>
<
/tr>/
/-->
<
/tr>/
/-->
<
/script
>
<
/script
>
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionDetail.jsp
0 → 100644
View file @
8ad7d0d8
<%--
Created by IntelliJ IDEA.
User: yangzi
Date: 2023/2/21
Time: 10:29
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 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>
var selector = "#detail_table";
function initTable(){
var data = ${fns:toJson(materialRequisition.materialRequisitionInfoList)};
$(selector).bootstrapTable({
data: data,
columns:[{checkbox: true},
{
field: 'no',
title: '序号',
align: 'center',
width: 60,
formatter: function (value, row, index){
var tpl = $("#hideTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
var html = Mustache.render(tpl, {
idx: index,
row: row
})
return html + '<span>'+(index+1)+'</span>'
}
},
{
field: 'name',
title: '名称',
formatter: function (value,row,index){
return Mustache.render($("#nameTpl").html(),{
row: row,
idx: index
})
}
},
{
field: 'type.name',
title: '类型',
formatter: function (value,row,index){
return Mustache.render($("#typeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'remarks',
title: '备注',
formatter: function (value,row,index){
return Mustache.render($("#remarksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
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('');
}
}
]
});
$(selector).on('check.bs.table uncheck.bs.table load-success.bs.table ' +
'check-all.bs.table uncheck-all.bs.table', function () {
$('#editAll').prop('disabled', !getSelections().length);
});
}
function getSelections(){
return $(selector).bootstrapTable('getSelections');
}
/**
* 手动添加明细
* @param selector
*/
function addDetail(selector){
// 选择该批次号下的货品明细
if(!$("#batchNum").val()){
jp.warning('请选择批次号!');
return;
}
jp.openStorageSelectDialog({batchNum:$("#batchNum").val(),state: 0, isMultiSelect: true },function (items){
if(Array.isArray(items)){
var data = items.map(function (item){
if(item.goodsInfo && !item.goodsInfo.amount){
item.goodsInfo.amount = 0;
}
return {
id: '',
delFlag: 0,
remarks: '',
...item
}
})
$(selector).bootstrapTable('append', data)
}
})
}
function removeRow(index, rowId, rowDelFlag){
if(rowId){
var delFlag = rowDelFlag === 1 ? 0 : 1
updateRow(index, {
delFlag: delFlag
})
}else{
$(selector).bootstrapTable("remove", {
field: '$index',
values: [index]
})
}
}
function updateRow(index, row){
$(selector).bootstrapTable('updateRow', {
index: index,
row: row
})
}
function onInputChange(rowIndex, elem , field){
var obj = {};
obj[field] = $(elem).val()
var timer = null;
clearTimeout(timer);
timer = setTimeout(function (){
updateRow(rowIndex, obj)
}, 0)
}
function onSelectType(nodes, rowIndex){
if(Array.isArray(nodes) && nodes.length === 1){
var node = nodes[0];
var obj = {
type: {
id: node.id,
name: node.text
}
};
updateRow(rowIndex, obj)
}
}
/**
* 获取所有明细数据
* @returns {*|jQuery}
*/
function getTableData(){
return $(selector).bootstrapTable('getData');
}
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: Shelve.id,
name: Shelve.name
},
warehouse: Shelve.warehouse
})
})
})
}
/**
* 点击扫码显示扫码窗口
*/
function addScan(){
layer.open({
type: 1,
title: '扫码',
auto: true,
area: ['500','300'],
content: $("#scanResultTpl").html(),
success: function (){
$("#scanResult").focus();
},
btn:['关闭']
})
}
/**
* 扫码
* 一、获取扫码结果
* 二、请求后台接口获取结果
* 三、增一条明细数据
* 四、清空扫码结果
* @param elem
*/
function onScanChange(elem){
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;
$(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">
<input id="materialRequisitionInfoList{{idx}}_id" name="materialRequisitionInfoList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
<input id="materialRequisitionInfoList{{idx}}_delFlag" name="materialRequisitionInfoList[{{idx}}].delFlag" type="hidden" value="{{row.delFlag}}"/>
<input id="materialRequisitionInfoList{{idx}}_materialRequisition" name="materialRequisitionInfoList[{{idx}}].materialRequisition.id" type="hidden" value="{{row.materialRequisition.id}}"/>
</script>
<script id="ledgerInfoTpl" type="text/html">//<!--
<sys:gridselect url="${ctx}/warehouse/ledger/ledger/data" id="materialRequisitionInfoList{{idx}}_ledgerInfo" name="materialRequisitionInfoList[{{idx}}].ledgerInfo.id" value="{{row.ledgerInfo.id}}" labelName="materialRequisitionInfoList[{{idx}}].ledgerInfo.name" labelValue="{{row.ledgerInfo.name}}"
title="选择物资" cssClass="form-control required" fieldLabels="物资名称|物资编号" fieldKeys="name|code" searchLabels="仓库名称|仓库编号" searchKeys="name|code" ></sys:gridselect>//-->
</script>
<script id="typeTpl" type="text/html">//<!--
<sys:treeselect id="storageInfoList{{idx}}_type" name="storageInfoList[{{idx}}].type.id" value="{{row.type.id}}" labelName="storageInfoList{{idx}}.type.name" labelValue="{{row.type.name}}"
title="类型" url="/warehouse/materialtype/materialType/treeData" cssClass="form-control " disabled="disabled" allowClear="true" allowSearch="true" callback="onSelectType" />//-->
</script>
<script id="modelTpl" type="text/html">
<input id="storageInfoList{{idx}}_model" name="storageInfoList[{{idx}}].model" type="text" value="{{row.model}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/>
</script>
<script id="shelvesTpl" type="text/html">
<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="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
</script>
<script id="scanResultTpl" type="text/html">
<br>
<div class="container-fluid">
<div class="row">
<div class="col-xs-2 text-right">
<label>扫码结果:</label>
</div>
<div class="col-xs-10">
<input type="text" id="scanResult" class="form-control" onchange="onScanChange(this)">
<span class="text-danger">请切换英文输入法</span>
</div>
</div>
</div>
<br>
</script>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionForm.jsp
View file @
8ad7d0d8
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<html>
<head>
<head>
<title>
物资领用管理
</title>
<title>
物资领用管理
</title>
<meta
name=
"decorator"
content=
"ani"
/>
<meta
name=
"decorator"
content=
"ani"
/>
<script
type=
"text/javascript"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/common/css/form.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.css"
>
$
(
document
).
ready
(
function
()
{
<script
type=
"text/javascript"
src=
"${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.js"
></script>
jp
.
ajaxForm
(
"#inputForm"
,
function
(
data
){
<script
type=
"text/javascript"
src=
"${ctxStatic}/plugin/bootstrapTable/bootstrap-table-zh-CN.js"
></script>
if
(
data
.
success
){
jp
.
success
(
data
.
msg
);
jp
.
go
(
"${ctx}/warehouse/materialrequisition/materialRequisition"
);
}
else
{
jp
.
error
(
data
.
msg
);
$
(
"#inputForm"
).
find
(
"button:submit"
).
button
(
"reset"
);
}
});
$
(
'#time'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
function
addRow
(
list
,
idx
,
tpl
,
row
){
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
}));
$
(
list
+
idx
).
find
(
"select"
).
each
(
function
(){
$
(
this
).
val
(
$
(
this
).
attr
(
"data-value"
));
});
$
(
list
+
idx
).
find
(
"input[type='checkbox'], input[type='radio']"
).
each
(
function
(){
var
ss
=
$
(
this
).
attr
(
"data-value"
).
split
(
','
);
for
(
var
i
=
0
;
i
<
ss
.
length
;
i
++
){
if
(
$
(
this
).
val
()
==
ss
[
i
]){
$
(
this
).
attr
(
"checked"
,
"checked"
);
}
}
});
$
(
list
+
idx
).
find
(
".form_datetime"
).
each
(
function
(){
$
(
this
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
}
function
delRow
(
obj
,
prefix
){
var
id
=
$
(
prefix
+
"_id"
);
var
delFlag
=
$
(
prefix
+
"_delFlag"
);
if
(
id
.
val
()
==
""
){
$
(
obj
).
parent
().
parent
().
remove
();
}
else
if
(
delFlag
.
val
()
==
"0"
){
delFlag
.
val
(
"1"
);
$
(
obj
).
html
(
"÷"
).
attr
(
"title"
,
"撤销删除"
);
$
(
obj
).
parent
().
parent
().
addClass
(
"error"
);
}
else
if
(
delFlag
.
val
()
==
"1"
){
delFlag
.
val
(
"0"
);
$
(
obj
).
html
(
"×"
).
attr
(
"title"
,
"删除"
);
$
(
obj
).
parent
().
parent
().
removeClass
(
"error"
);
}
}
</script>
</head>
</head>
<body>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading
"
>
<div
class=
"panel-body
"
>
<h3
class=
"panel-title"
>
<form:form
id=
"inputForm"
modelAttribute=
"materialRequisition"
<a
class=
"panelButton"
href=
"${ctx}/warehouse/materialrequisition/materialRequisition"
><i
class=
"ti-angle-left"
></i>
返回
</a>
action=
"${ctx}/warehouse/materialrequisition/materialRequisition/save"
method=
"post"
</h3
>
class=
"form-horizontal"
>
</div
>
<form:hidden
path=
"id"
/
>
<div
class=
"panel-body"
>
<h3
class=
"物资领用表"
></h3
>
<form:form
id=
"inputForm"
modelAttribute=
"materialRequisition"
action=
"${ctx}/warehouse/materialrequisition/materialRequisition/save"
method=
"post"
class=
"form-horizontal
"
>
<table
class=
"table table-bordered main-table
"
>
<form:hidden
path=
"id"
/
>
<tr
>
<div
class=
"form-group"
>
<td>
<font
color=
"red"
>
*
</font>
领用单号
</td
>
<label
class=
"col-sm-2 control-label"
>
领用单号:
</label
>
<td
>
<div
class=
"col-sm-10"
>
<form:input
path=
"number"
htmlEscape=
"false"
readonly=
"true"
class=
"form-control required"
/
>
<form:input
path=
"number"
htmlEscape=
"false"
class=
"form-control "
/
>
</td
>
</div
>
<td><font
color=
"red"
>
*
</font>
操作人
</td
>
</div
>
<td
>
<div
class=
"form-group"
>
<sys:userselect
id=
"operator"
name=
"operator.id"
<label
class=
"col-sm-2 control-label"
>
操作人:
</label>
value=
"${materialRequisition.operator.id}"
labelName=
"operator.name"
<div
class=
"col-sm-10"
>
labelValue=
"${materialRequisition.operator.name}"
disabled=
"disabled"
<div
class=
"col-sm-10"
>
cssClass=
"form-control required"
/
>
<sys:userselect
id=
"operator"
name=
"operator.id"
value=
"${materialRequisition.operator.id}"
labelName=
"operator.name"
labelValue=
"${materialRequisition.operator.name}"
</td>
cssClass=
"form-control "
/
>
</tr
>
</div
>
<tr
>
<
%
--
<
form:input
path=
"operator"
htmlEscape=
"false"
class=
"form-control "
/>
--%
>
<td><font
color=
"red"
>
*
</font>
领用机构
</td
>
</div
>
<td
>
</div>
<sys:treeselect
id=
"office"
name=
"office.id"
value=
"${materialRequisition.office.id}"
labelName=
""
labelValue=
"${materialRequisition.office.name}"
<div
class=
"form-group"
>
title=
"部门"
url=
"/sys/office/treeData?type=2"
cssClass=
"form-control required"
<label
class=
"col-sm-2 control-label"
>
领用机构:
</label
>
allowClear=
"true"
notAllowSelectParent=
"true"
/
>
<div
class=
"col-sm-10"
>
</td
>
<sys:treeselect
id=
"office"
name=
"office.id"
value=
"${materialRequisition.office.id}"
labelName=
""
labelValue=
"${materialRequisition.office.name}"
<td><font
color=
"red"
>
*
</font>
领用时间
</td>
title=
"部门"
url=
"/sys/office/treeData?type=2"
cssClass=
"form-control "
allowClear=
"true"
notAllowSelectParent=
"true"
/
>
<td
>
</div
>
<div
class=
'input-group form_datetime'
id=
'time'
>
</div>
<input
type=
'text'
name=
"time"
class=
"form-control "
<div
class=
"form-group"
>
value=
"<fmt:formatDate value="
${
materialRequisition
.
time
}"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
"/
>
<label
class=
"col-sm-2 control-label"
>
领用时间:
</label
>
<span
class=
"input-group-addon"
>
<div
class=
"col-sm-10"
>
<span
class=
"glyphicon glyphicon-calendar"
></span
>
<div
class=
'input-group form_datetime'
id=
'time'
>
</span
>
<input
type=
'text'
name=
"time"
class=
"form-control "
value=
"<fmt:formatDate value="
${
materialRequisition
.
time
}"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
"/
>
</div
>
<span
class=
"input-group-addon"
>
</td
>
<span
class=
"glyphicon glyphicon-calendar"
></span
>
</tr
>
</span
>
<tr
>
</div
>
<td>
备注
</td
>
</div
>
<td
>
</div
>
<form:textarea
path=
"remarks"
htmlEscape=
"false"
rows=
"4"
class=
"form-control "
/
>
<div
class=
"form-group"
>
</td
>
<label
class=
"col-sm-2 control-label"
>
备注信息:
</label
>
</tr
>
<div
class=
"col-sm-10"
>
</table
>
<form:textarea
path=
"remarks"
htmlEscape=
"false"
rows=
"4"
class=
"form-control "
/
>
<div
class=
"tabs-container"
>
</div
>
<ul
class=
"nav nav-tabs"
>
</div>
<li
class=
"active"
><a
data-toggle=
"tab"
href=
"#tab-1"
<div
class=
"tabs-container"
>
aria-expanded=
"true"
>
领用明细表:
</a
>
<ul
class=
"nav nav-tabs"
>
</li
>
<li
class=
"active"
><a
data-toggle=
"tab"
href=
"#tab-1"
aria-expanded=
"true"
>
领用明细表:
</a
>
</ul
>
</li
>
<div
class=
"tab-content"
>
</ul
>
<div
id=
"tab-1"
class=
"tab-pane fade in active"
>
<div
class=
"tab-content"
>
<a
class=
"btn btn-white btn-sm"
<div
id=
"tab-1"
class=
"tab-pane fade in active"
>
onclick=
"addRow('#materialRequisitionInfoList', materialRequisitionInfoRowIdx, materialRequisitionInfoTpl);materialRequisitionInfoRowIdx = materialRequisitionInfoRowIdx + 1;"
<a
class=
"btn btn-white btn-sm"
onclick=
"addRow('#materialRequisitionInfoList', materialRequisitionInfoRowIdx, materialRequisitionInfoTpl);materialRequisitionInfoRowIdx = materialRequisitionInfoRowIdx + 1;"
title=
"新增"
><i
class=
"fa fa-plus"
></i>
新增
</a>
title=
"新增"
><i
class=
"fa fa-plus"
></i>
新增
</a>
<table
class=
"table table-striped table-bordered table-condensed"
>
<table
class=
"table table-striped table-bordered table-condensed"
>
<thead>
<thead>
<tr>
<tr>
<th
class=
"hide"
></th>
<th
class=
"hide"
></th>
<th>
物资领用主表ID
</th>
<th>
物资领用主表ID
</th>
<th>
物资台账明细ID
</th>
<th>
物资台账明细ID
</th>
<th>
领用人
</th>
<th>
领用人
</th>
<th>
备注信息
</th>
<th>
备注信息
</th>
<th
width=
"10"
>
</th>
<th
width=
"10"
>
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
id=
"materialRequisitionInfoList"
>
<tbody
id=
"materialRequisitionInfoList"
>
</tbody>
</tbody>
</table>
</table>
<script
type=
"text/template"
id=
"materialRequisitionInfoTpl"
>
//
<!--
<script
type=
"text/template"
id=
"materialRequisitionInfoTpl"
>
//
<!--
<
tr
id
=
"materialRequisitionInfoList{{idx}}"
>
<
tr
id
=
"materialRequisitionInfoList{{idx}}"
>
<
td
class
=
"hide"
>
<
td
class
=
"hide"
>
<
input
id
=
"materialRequisitionInfoList{{idx}}_id"
name
=
"materialRequisitionInfoList[{{idx}}].id"
type
=
"hidden"
value
=
"{{row.id}}"
/>
<
input
id
=
"materialRequisitionInfoList{{idx}}_id"
name
=
"materialRequisitionInfoList[{{idx}}].id"
type
=
"hidden"
value
=
"{{row.id}}"
/>
...
@@ -164,35 +113,56 @@
...
@@ -164,35 +113,56 @@
{{
#
delBtn
}}
<
span
class
=
"close"
onclick
=
"delRow(this, '#materialRequisitionInfoList{{idx}}')"
title
=
"删除"
>&
times
;
<
/span>{{/
delBtn
}}
{{
#
delBtn
}}
<
span
class
=
"close"
onclick
=
"delRow(this, '#materialRequisitionInfoList{{idx}}')"
title
=
"删除"
>&
times
;
<
/span>{{/
delBtn
}}
<
/td
>
<
/td
>
<
/tr>/
/-->
<
/tr>/
/-->
</script>
</script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
materialRequisitionInfoRowIdx
=
0
,
materialRequisitionInfoTpl
=
$
(
"#materialRequisitionInfoTpl"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
materialRequisitionInfoRowIdx
=
0
,
$
(
document
).
ready
(
function
()
{
materialRequisitionInfoTpl
=
$
(
"#materialRequisitionInfoTpl"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
var
data
=
$
{
fns
:
toJson
(
materialRequisition
.
materialRequisitionInfoList
)};
$
(
document
).
ready
(
function
()
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
var
data
=
$
{
fns
:
toJson
(
materialRequisition
.
materialRequisitionInfoList
)};
addRow
(
'#materialRequisitionInfoList'
,
materialRequisitionInfoRowIdx
,
materialRequisitionInfoTpl
,
data
[
i
]);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
materialRequisitionInfoRowIdx
=
materialRequisitionInfoRowIdx
+
1
;
addRow
(
'#materialRequisitionInfoList'
,
materialRequisitionInfoRowIdx
,
materialRequisitionInfoTpl
,
data
[
i
]);
}
materialRequisitionInfoRowIdx
=
materialRequisitionInfoRowIdx
+
1
;
});
}
</script>
});
</div>
</script>
</div>
</div>
</div>
</div>
<c:if
test=
"${mode == 'add' || mode=='edit'}"
>
</div>
<div
class=
"col-lg-3"
></div>
<c:if
test=
"${mode == 'add' || mode=='edit'}"
>
<div
class=
"col-lg-6"
>
<div
class=
"col-lg-3"
></div>
<div
class=
"form-group text-center"
>
<div
class=
"col-lg-6"
>
<div>
<div
class=
"form-group text-center"
>
<button
class=
"btn btn-primary btn-block btn-lg btn-parsley"
data-loading-text=
"正在提交..."
>
提 交
</button>
<div>
</div>
<button
class=
"btn btn-primary btn-block btn-lg btn-parsley"
</div>
data-loading-text=
"正在提交..."
>
提 交
</div>
</button>
</c:if>
</div>
</form:form>
</div>
</div>
</div>
</div>
</c:if>
</div>
</form:form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
jp
.
ajaxForm
(
"#inputForm"
,
function
(
data
){
if
(
data
.
success
){
jp
.
success
(
data
.
msg
);
jp
.
go
(
"${ctx}/warehouse/materialrequisition/materialRequisition"
);
}
else
{
jp
.
error
(
data
.
msg
);
$
(
"#inputForm"
).
find
(
"button:submit"
).
button
(
"reset"
);
}
});
$
(
'#time'
).
datetimepicker
({
format
:
"YYYY-MM-DD HH:mm:ss"
});
});
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionList.js
View file @
8ad7d0d8
...
@@ -242,21 +242,21 @@ $(document).ready(function() {
...
@@ -242,21 +242,21 @@ $(document).ready(function() {
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'refresh'
);
$
(
'#materialRequisitionTable'
).
bootstrapTable
(
'refresh'
);
}
}
function
add
(){
function
add
(){
jp
.
go
(
"${ctx}/warehouse/materialrequisition/materialRequisition/form/add"
);
jp
.
openSaveDialog
(
"新增物资领用"
,
"${ctx}/warehouse/materialrequisition/materialRequisition/form/add"
,
'1200'
,
'800'
);
}
}
function
edit
(
id
){
function
edit
(
id
){
if
(
id
==
undefined
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
id
=
getIdSelections
();
}
}
jp
.
go
(
"${ctx}/warehouse/materialrequisition/materialRequisition/form/edit?id="
+
id
);
jp
.
openSaveDialog
(
"编辑物资领用"
,
"${ctx}/warehouse/materialrequisition/materialRequisition/form/edit?id="
+
id
,
'1200'
,
'800'
);
}
}
function
view
(
id
){
//没有权限时,不显示确定按钮
function
view
(
id
){
//没有权限时,不显示确定按钮
if
(
id
==
undefined
){
if
(
id
==
undefined
){
id
=
getIdSelections
();
id
=
getIdSelections
();
}
}
jp
.
go
(
"${ctx}/warehouse/materialrequisition/materialRequisition/form/view?id="
+
id
);
jp
.
openViewDialog
(
"查看物资领用"
,
"${ctx}/warehouse/materialrequisition/materialRequisition/form/view?id="
+
id
,
'1200'
,
'800'
);
}
}
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageList.js
View file @
8ad7d0d8
...
@@ -284,6 +284,7 @@ $(document).ready(function() {
...
@@ -284,6 +284,7 @@ $(document).ready(function() {
data1
[
i
].
jsonStr
=
JSON
.
stringify
(
data1
[
i
]);
data1
[
i
].
jsonStr
=
JSON
.
stringify
(
data1
[
i
]);
data1
[
i
].
isNotStorage
=
data1
[
i
].
state
===
'1'
;
data1
[
i
].
isNotStorage
=
data1
[
i
].
state
===
'1'
;
data1
[
i
].
isStorage
=
data1
[
i
].
state
===
'2'
;
data1
[
i
].
isStorage
=
data1
[
i
].
state
===
'2'
;
data1
[
i
].
mainRowIndex
=
index
;
addRow
(
'#storageChild-'
+
row
.
id
+
'-1-List'
,
storageChild1RowIdx
,
storageChild1Tpl
,
data1
[
i
]);
addRow
(
'#storageChild-'
+
row
.
id
+
'-1-List'
,
storageChild1RowIdx
,
storageChild1Tpl
,
data1
[
i
]);
storageChild1RowIdx
=
storageChild1RowIdx
+
1
;
storageChild1RowIdx
=
storageChild1RowIdx
+
1
;
}
}
...
@@ -300,7 +301,7 @@ $(document).ready(function() {
...
@@ -300,7 +301,7 @@ $(document).ready(function() {
}));
}));
}
}
function
onStorage
(
countStorage
,
goodsInfoId
){
function
onStorage
(
countStorage
,
goodsInfoId
,
rowIndex
){
var
main
=
JSON
.
parse
(
countStorage
);
var
main
=
JSON
.
parse
(
countStorage
);
jp
.
get
(
"${ctx}/warehouse/storage/storage/findInfoBycountStorage?goodsInfo.id="
+
goodsInfoId
+
"&storage="
+
main
.
storageId
,
function
(
res
){
jp
.
get
(
"${ctx}/warehouse/storage/storage/findInfoBycountStorage?goodsInfo.id="
+
goodsInfoId
+
"&storage="
+
main
.
storageId
,
function
(
res
){
var
data
=
res
.
body
.
storageInfoList
;
var
data
=
res
.
body
.
storageInfoList
;
...
@@ -330,12 +331,16 @@ $(document).ready(function() {
...
@@ -330,12 +331,16 @@ $(document).ready(function() {
var
qrId$
=
$
(
"<input type='hidden' name='ledgerInfoList["
+
index
+
"].qr.id' value='"
+
item
.
qrCode
.
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
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
+
"' />"
);
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$
);
$
(
"#ledgerForm"
).
append
(
id$
).
append
(
delFlag$
).
append
(
name$
).
append
(
typeId$
).
append
(
batchNum$
).
append
(
model$
).
append
(
goodsInfoId$
).
append
(
qrId$
).
append
(
shelvesId$
).
append
(
code$
);
})
})
jp
.
loading
(
'入库中...'
);
jp
.
loading
(
'入库中...'
);
jp
.
post
(
"${ctx}/warehouse/ledger/ledger/save"
,
$
(
"#ledgerForm"
).
serialize
(),
function
(
res
){
jp
.
post
(
"${ctx}/warehouse/ledger/ledger/save"
,
$
(
"#ledgerForm"
).
serialize
(),
function
(
res
){
if
(
res
.
success
){
if
(
res
.
success
){
jp
.
success
(
'入库成功!'
);
jp
.
success
(
'入库成功!'
);
$
(
'#storageTable'
).
bootstrapTable
(
'collapseRow'
,
rowIndex
);
setTimeout
(
function
(){
$
(
'#storageTable'
).
bootstrapTable
(
'expandRow'
,
rowIndex
);
},
0
)
}
else
{
}
else
{
jp
.
error
(
'入库失败!'
);
jp
.
error
(
'入库失败!'
);
}
}
...
@@ -396,7 +401,7 @@ $(document).ready(function() {
...
@@ -396,7 +401,7 @@ $(document).ready(function() {
<
/td
>
<
/td
>
{{
#
row
.
isNotStorage
}}
{{
#
row
.
isNotStorage
}}
<
td
>
<
td
>
<
a
href
=
"javascript:void(0);"
onclick
=
"onStorage('{{row.jsonStr}}','{{row.goodsInfo.id}}')"
>
入库
<
/a
>
<
a
href
=
"javascript:void(0);"
onclick
=
"onStorage('{{row.jsonStr}}','{{row.goodsInfo.id}}'
,{{row.mainRowIndex}}
)"
>
入库
<
/a
>
<
/td
>
<
/td
>
{{
/
row
.
isNotStorage
}}
{{
/
row
.
isNotStorage
}}
{{
#
row
.
isStorage
}}
{{
#
row
.
isStorage
}}
...
...
target/classes/com/jeeplus/modules/sys/web/UserController.class
View file @
8ad7d0d8
No preview for this file type
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