Commit aa540163 by 胡懿

Merge branches 'hy' and 'master' of 47.92.228.5:huyi/warehouse into hy

parents f4d655dc d1e88404
......@@ -86,14 +86,14 @@
<i class="glyphicon glyphicon-remove"></i> 删除
</button>
</shiro:hasPermission>
<shiro:hasPermission name="warehouse:goods:goods:import">
<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
</shiro:hasPermission>
<shiro:hasPermission name="warehouse:goods:goods:export">
<button id="export" class="btn btn-warning">
<i class="fa fa-file-excel-o"></i> 导出
</button>
</shiro:hasPermission>
<%-- <shiro:hasPermission name="warehouse:goods:goods:import">--%>
<%-- <button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>--%>
<%-- </shiro:hasPermission>--%>
<%-- <shiro:hasPermission name="warehouse:goods:goods:export">--%>
<%-- <button id="export" class="btn btn-warning">--%>
<%-- <i class="fa fa-file-excel-o"></i> 导出--%>
<%-- </button>--%>
<%-- </shiro:hasPermission>--%>
<shiro:hasPermission name="warehouse:goods:goods:view">
<button id="view" class="btn btn-default" disabled onclick="view()">
<i class="fa fa-search-plus"></i> 查看
......
......@@ -64,10 +64,10 @@
title="部门" url="/sys/office/treeData?type=2" cssClass="form-control required"
allowClear="true" notAllowSelectParent="true"/>
</td>
<td>领用时间</td>
<td><font color="red">*</font>领用时间</td>
<td>
<div class='input-group form_datetime' id='time'>
<input type='text' name="time" class="form-control"
<input type='text' name="time" class="form-control required"
value="<fmt:formatDate value="${materialRequisition.time}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
......
......@@ -16,7 +16,7 @@
action="${ctx}/warehouse/materialtype/materialType/save" method="post"
class="form-horizontal">
<form:hidden path="id"/>
<h3 class="text-center">物资类型</h3>
<h3 class="text-center">物资品名代码</h3>
<table class="table table-bordered main-table">
<tr>
<td><font color="red">*</font>名称</td>
......@@ -31,12 +31,12 @@
</tr>
<tr>
<td><font color="red">*</font>物资类型编码</td>
<td><font color="red">*</font>编码</td>
<td>
<form:input path="code" htmlEscape="false"
class="form-control required"/>
</td>
<td><font color="red">*</font>父级编号</td>
<td><font color="red">*</font>上级</td>
<td>
<sys:treeselect id="parent" name="parent.id" value="${materialType.parent.id}"
labelName="parent.name" labelValue="${materialType.parent.name}"
......
......@@ -27,6 +27,15 @@
}
$(selector).bootstrapTable({
data: data,
//是否显示分页(*)
pagination: true,
//排序方式
sortOrder: "asc",
//初始化加载第一页,默认第一页
pageNumber:1,
//每页的记录行数(*)
pageSize: 10,
sidePagination: "client",
columns:[{checkbox: true},
{
field: 'no',
......@@ -74,7 +83,7 @@
}
},
{
field: 'num',
field: 'shelves',
title: '货架',
formatter: function (value,row,index){
return Mustache.render($("#shelvesTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
......@@ -260,21 +269,47 @@
*/
function addShelve(){
jp.openShelvesSelectDialog(function (items){
setTimeout(function(){
var Shelve = items[0]; // 货架对象
getSelections().forEach(function (item){
var index = getTableData().findIndex(function (current){
return current.qrCode.id === item.qrCode.id;
}); // 需更新的行的下标
updateTask(getSelections(), 10, function(index){
updateRow(index,{
shelves: {
id: Shelve.id,
name: Shelve.name
},
warehouse: Shelve.warehouse
});
});
},200)
// 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 updateTask(allList, count, updateCallback){
var list = allList.slice(0, count);
list.forEach(function (item){
var index = getTableData().findIndex(function (current){
return current.qrCode.id === item.qrCode.id;
}); // 需更新的行的下标
updateCallback(index);
});
setTimeout(function(){
var newList = allList.slice(count);
if(newList.length > 0){
updateTask(newList,count,updateCallback);
}
},300)
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment