Commit eb01a724 by anxiaohe

入库信息表单

parent 154651c3
...@@ -75,6 +75,7 @@ public class TagController extends BaseController { ...@@ -75,6 +75,7 @@ public class TagController extends BaseController {
model.addAttribute("url", url); model.addAttribute("url", url);
model.addAttribute("searchLabels", searchLabels.split("\\|")); model.addAttribute("searchLabels", searchLabels.split("\\|"));
model.addAttribute("searchKeys", searchKeys.split("\\|")); model.addAttribute("searchKeys", searchKeys.split("\\|"));
model.addAttribute("gridSelectTableDataHandle", request.getParameter("gridSelectTableDataHandle"));
return "modules/common/gridselect"; return "modules/common/gridselect";
} }
......
...@@ -234,10 +234,10 @@ public class ShelvesController extends BaseController { ...@@ -234,10 +234,10 @@ public class ShelvesController extends BaseController {
/** /**
* 货架信息列表页面 * 货架信息列表页面
*/ */
@RequestMapping(value = "shelvesSelect") @RequestMapping(value = "shelvesSelect")
public String shelvesSelect(Shelves shelves, Model model) { public String shelvesSelect(HttpServletRequest request, Shelves shelves, Model model) {
model.addAttribute("shelves", shelves); model.addAttribute("shelves", shelves);
model.addAttribute("isMultiSelect", request.getParameter("isMultiSelected"));
return "modules/common/shelvesSelect"; return "modules/common/shelvesSelect";
} }
} }
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
} }
</c:if> </c:if>
} }
}) }, "${isMultiSelected}")
}); });
...@@ -60,4 +60,4 @@ ...@@ -60,4 +60,4 @@
$("#${id}Name").focus(); $("#${id}Name").focus();
}); });
</script> </script>
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
} }
</c:if> </c:if>
} }
}) }, "${isMultiSelected}")
}); });
...@@ -60,4 +60,4 @@ ...@@ -60,4 +60,4 @@
$("#${id}Name").focus(); $("#${id}Name").focus();
}); });
</script> </script>
\ No newline at end of file
...@@ -263,14 +263,15 @@ function delRow(obj, prefix){ ...@@ -263,14 +263,15 @@ function delRow(obj, prefix){
}); });
}, },
/**货架选择框**/ /**货架选择框**/
openShelvesSelectDialog:function(yesFuc){ openShelvesSelectDialog:function(yesFuc, isMultiSelected){
isMultiSelected = isMultiSelected ? isMultiSelected.toString() : '';
top.layer.open({ top.layer.open({
type: 2, type: 2,
area: ['900px', '560px'], area: ['900px', '560px'],
title:"选择货架", title:"选择货架",
auto:true, auto:true,
maxmin: true, //开启最大化最小化按钮 maxmin: true, //开启最大化最小化按钮
content: ctx+"/warehouse/shelves/shelves/shelvesSelect", content: ctx+"/warehouse/shelves/shelves/shelvesSelect?isMultiSelected=" + isMultiSelected,
btn: ['确定', '关闭'], btn: ['确定', '关闭'],
yes: function(index, layero){ yes: function(index, layero){
var items = layero.find("iframe")[0].contentWindow.getSelections(); var items = layero.find("iframe")[0].contentWindow.getSelections();
...@@ -324,17 +325,17 @@ function delRow(obj, prefix){ ...@@ -324,17 +325,17 @@ function delRow(obj, prefix){
}, },
openStorageSelectDialog:function(params, yesFuc){ openStorageSelectDialog:function(params, yesFuc){
var url = ctx+"/warehouse/storage/storage/findByPcTypeModel?goodsInfo.goods.batchNum="+params.batchNum+"&qrCode.state="+params.state; var url = ctx+"/warehouse/storage/storage/findByPcTypeModel?goodsInfo.goods.batchNum="+params.batchNum+"&qrCode.state="+params.state;
var fieldLabels = "物资编码|名称|品名代码|型号"; var fieldLabels = "物资编码|品名|代码|单价|单位|数量|总价|型号";
var fieldKeys = "qrCode.code|name|type.name|model"; var fieldKeys = "qrCode.code|type.name|type.code|type.amount|type.unit|num|infoSum|model";
var searchLabels = "品名代码|型号"; var searchLabels = "品名代码|型号";
var searchKeys = "goodsInfo.type|goodsInfo.model"; var searchKeys = "goodsInfo.type|goodsInfo.model";
top.layer.open({ top.layer.open({
type: 2, type: 2,
area: ['800px', '500px'], area: ['1100px', '600px'],
title:"选择入库明细", title:"选择入库明细",
auto:true, auto:true,
name:'friend', name:'friend',
content: ctx+"/tag/gridselect?url="+encodeURIComponent(url)+"&fieldLabels="+encodeURIComponent(fieldLabels)+"&fieldKeys="+encodeURIComponent(fieldKeys)+"&searchLabels="+encodeURIComponent(searchLabels)+"&searchKeys="+encodeURIComponent(searchKeys)+"&isMultiSelected="+params.isMultiSelect, content: ctx+"/tag/gridselect?url="+encodeURIComponent(url)+"&fieldLabels="+encodeURIComponent(fieldLabels)+"&fieldKeys="+encodeURIComponent(fieldKeys)+"&searchLabels="+encodeURIComponent(searchLabels)+"&searchKeys="+encodeURIComponent(searchKeys)+"&isMultiSelected="+params.isMultiSelect+"&gridSelectTableDataHandle="+params.gridSelectTableDataHandleName,
btn: ['确定', '关闭'], btn: ['确定', '关闭'],
yes: function(index, layero){ yes: function(index, layero){
var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
......
...@@ -35,7 +35,11 @@ $(document).ready(function() { ...@@ -35,7 +35,11 @@ $(document).ready(function() {
return item !== null && typeof item !== "undefined" && item !== ""; return item !== null && typeof item !== "undefined" && item !== "";
}) })
} }
return res; var list = res;
if ("${gridSelectTableDataHandle}" && top["${gridSelectTableDataHandle}"] && typeof top["${gridSelectTableDataHandle}"] === 'function') {
list = top["${gridSelectTableDataHandle}"](res);
}
return list;
}, },
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'', //queryParamsType:'',
...@@ -141,4 +145,4 @@ $(document).ready(function() { ...@@ -141,4 +145,4 @@ $(document).ready(function() {
<table id="table"></table> <table id="table"></table>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
}).on('loaded.jstree', function() { }).on('loaded.jstree', function() {
$("#jstree").jstree('open_all'); $("#jstree").jstree('open_all');
}); });
console.log("${isMultiSelect}")
//初始化表格 //初始化表格
$('#table').bootstrapTable({ $('#table').bootstrapTable({
...@@ -201,4 +202,4 @@ ...@@ -201,4 +202,4 @@
</div> </div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -73,40 +73,40 @@ ...@@ -73,40 +73,40 @@
} }
}, },
{ {
field: 'model', field: 'amount',
title: '型号', title: '单价',
formatter: function (value,row,index){ formatter: function (value,row,index){
return Mustache.render($("#modelTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{ return Mustache.render($("#amountTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row, row: row,
idx: index idx: index
}) })
} }
}, },
{ {
field: 'num', field: 'type.unit',
title: '数量', title: '单位',
formatter: function (value,row,index){ formatter: function (value,row,index){
return Mustache.render($("#numTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{ return Mustache.render($("#unitTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row, row: row,
idx: index idx: index
}) })
} }
}, },
{ {
field: 'amount', field: 'model',
title: '单价', title: '型号',
formatter: function (value,row,index){ formatter: function (value,row,index){
return Mustache.render($("#amountTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{ return Mustache.render($("#modelTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row, row: row,
idx: index idx: index
}) })
} }
}, },
{ {
field: 'unit', field: 'num',
title: '单位', title: '数量',
formatter: function (value,row,index){ formatter: function (value,row,index){
return Mustache.render($("#unitTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{ return Mustache.render($("#numTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row, row: row,
idx: index idx: index
}) })
...@@ -161,12 +161,15 @@ ...@@ -161,12 +161,15 @@
name: '', name: '',
type: { type: {
id: '', id: '',
name: '' name: '',
unit: '',
code: ''
}, },
model: '', model: '',
num: null, num: null,
amount: null, amount: null,
remarks: '' remarks: '',
infoSum: ''
} }
$(selector).bootstrapTable('append', [ $(selector).bootstrapTable('append', [
...@@ -260,10 +263,10 @@ ...@@ -260,10 +263,10 @@
type: { type: {
id: node.id, id: node.id,
name: node.text, name: node.text,
code: node.original.code code: node.original.code,
unit: node.original.unit
}, },
amount: node.original.amount, amount: node.original.amount,
unit: node.original.unit
}; };
if ($("#goodsInfoList" + rowIndex + "_num").val()) { if ($("#goodsInfoList" + rowIndex + "_num").val()) {
obj.infoSum = new Big($("#goodsInfoList" + rowIndex + "_num").val()).times(obj.amount).toNumber(); obj.infoSum = new Big($("#goodsInfoList" + rowIndex + "_num").val()).times(obj.amount).toNumber();
...@@ -288,10 +291,10 @@ ...@@ -288,10 +291,10 @@
type: { type: {
id: '', id: '',
name: '', name: '',
code: '' code: '',
unit: ''
}, },
amount: '', amount: '',
unit: '',
infoSum: '' infoSum: ''
}; };
updateRow(num, obj); updateRow(num, obj);
...@@ -315,6 +318,12 @@ ...@@ -315,6 +318,12 @@
<script id="typeCodeTpl" type="text/html"> <script id="typeCodeTpl" type="text/html">
<input id="goodsInfoList{{idx}}_typeCode" name="goodsInfoList[{{idx}}].type.code" type="text" value="{{row.type.code}}" readonly class="form-control required"/> <input id="goodsInfoList{{idx}}_typeCode" name="goodsInfoList[{{idx}}].type.code" type="text" value="{{row.type.code}}" readonly class="form-control required"/>
</script> </script>
<script id="amountTpl" type="text/html">
<input id="goodsInfoList{{idx}}_amount" name="goodsInfoList[{{idx}}].amount" type="text" value="{{row.amount}}" readonly onchange="onInputChange('{{idx}}', this, 'amount')" class="form-control required"/>
</script>
<script id="unitTpl" type="text/html">
<input id="goodsInfoList{{idx}}_unit" name="goodsInfoList[{{idx}}].type.unit" type="text" value="{{row.type.unit}}" readonly onchange="onInputChange('{{idx}}', this, 'type.unit')" class="form-control required"/>
</script>
<script id="modelTpl" type="text/html"> <script id="modelTpl" type="text/html">
<input id="goodsInfoList{{idx}}_model" name="goodsInfoList[{{idx}}].model" type="text" value="{{row.model}}" onchange="onInputChange('{{idx}}', this, 'model')" class="form-control required"/> <input id="goodsInfoList{{idx}}_model" name="goodsInfoList[{{idx}}].model" type="text" value="{{row.model}}" onchange="onInputChange('{{idx}}', this, 'model')" class="form-control required"/>
</script> </script>
...@@ -323,12 +332,6 @@ ...@@ -323,12 +332,6 @@
<input id="goodsInfoList{{idx}}_num" name="goodsInfoList[{{idx}}].num" type="text" value="{{row.num}}" onchange="onInputChange('{{idx}}', this, 'num')" class="form-control required"/> <input id="goodsInfoList{{idx}}_num" name="goodsInfoList[{{idx}}].num" type="text" value="{{row.num}}" onchange="onInputChange('{{idx}}', this, 'num')" class="form-control required"/>
</script> </script>
<script id="amountTpl" type="text/html">
<input id="goodsInfoList{{idx}}_amount" name="goodsInfoList[{{idx}}].amount" type="text" value="{{row.amount}}" readonly onchange="onInputChange('{{idx}}', this, 'amount')" class="form-control required"/>
</script>
<script id="unitTpl" type="text/html">
<input id="goodsInfoList{{idx}}_unit" name="goodsInfoList[{{idx}}].unit" type="text" value="{{row.unit}}" readonly onchange="onInputChange('{{idx}}', this, 'unit')" class="form-control required"/>
</script>
<script id="infoSumTpl" type="text/html"> <script id="infoSumTpl" type="text/html">
<input id="goodsInfoList{{idx}}_infoSum" name="goodsInfoList[{{idx}}].infoSum" type="text" value="{{row.infoSum}}" readonly onchange="onInputChange('{{idx}}', this, 'infoSum')" class="form-control required"/> <input id="goodsInfoList{{idx}}_infoSum" name="goodsInfoList[{{idx}}].infoSum" type="text" value="{{row.infoSum}}" readonly onchange="onInputChange('{{idx}}', this, 'infoSum')" class="form-control required"/>
</script> </script>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<tr> <tr>
<td><font color="red">*</font>批次号</td> <td><font color="red">*</font>批次号</td>
<td> <td>
<form:input path="batchNum" htmlEscape="false" readonly="true" class="form-control required"/> <form:input path="batchNum" htmlEscape="false" class="form-control required"/>
</td> </td>
<td><font color="red">*</font>时间</td> <td><font color="red">*</font>时间</td>
<td> <td>
...@@ -121,4 +121,4 @@ ...@@ -121,4 +121,4 @@
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -295,10 +295,10 @@ $(document).ready(function() { ...@@ -295,10 +295,10 @@ $(document).ready(function() {
if(LODOP){ if(LODOP){
jp.loading('loading...'); jp.loading('loading...');
jp.get("${ctx}/warehouse/goods/goods/printQr?goodsInfoId="+id, function (res) { jp.get("${ctx}/warehouse/goods/goods/printQr?goodsInfoId="+id, function (res) {
var list = res.body.goodsInfo.qrCodeList; var row = res.body.goodsInfo.qrCode;
LODOP.PRINT_INIT("打印货品"); LODOP.PRINT_INIT("打印货品");
LODOP.SET_PRINT_PAGESIZE(1,400,600,0) LODOP.SET_PRINT_PAGESIZE(1,800,600,0)
createAllPage(list); createAllPage(row);
LODOP.PREVIEW(); LODOP.PREVIEW();
jp.close(); jp.close();
}) })
...@@ -311,16 +311,20 @@ $(document).ready(function() { ...@@ -311,16 +311,20 @@ $(document).ready(function() {
} }
} }
function createAllPage(list){ function createAllPage(item){
if(!list){ // if(!list){
return; // return;
} // }
list.forEach(function(item){ // list.forEach(function(item){
LODOP.NewPage(); // LODOP.NewPage();
var imgUrl = "${ctxPath}/" + item.url; // var imgUrl = "${ctxPath}/" + item.url;
LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />"); // LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />");
}) // })
debugger
LODOP.NewPage();
var imgUrl = "${ctxPath}/" + item.url;
LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='300' border='0' src='"+imgUrl+"' />");
} }
function cleanQr(id) { function cleanQr(id) {
...@@ -377,7 +381,7 @@ $(document).ready(function() { ...@@ -377,7 +381,7 @@ $(document).ready(function() {
{{row.amount}} {{row.amount}}
</td> </td>
<td> <td>
{{row.unit}} {{row.type.unit}}
</td> </td>
<td> <td>
{{row.infoSum}} {{row.infoSum}}
......
...@@ -8,448 +8,546 @@ ...@@ -8,448 +8,546 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/webpage/include/taglib.jsp" %> <%@ include file="/webpage/include/taglib.jsp" %>
<div id="toolbar" class="text-left"> <div id="toolbar" class="text-left">
<c:if test="${mode == 'add' || mode == 'edit'}"> <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="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 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> <a id="editAll" class="btn btn-primary btn-sm" onclick="addShelve('#detail_table')" title="新增"><i class="fa fa-plus"></i> 批量编辑货架</a>
</c:if> </c:if>
</div> </div>
<table id="detail_table" data-toolbar="#toolbar"></table> <table id="detail_table" data-toolbar="#toolbar"></table>
<script> <script>
var selector = "#detail_table"; var selector = "#detail_table";
function initTable(){ function initTable(){
var data = ${fns:toJson(storage.storageInfoList)}; var data = ${fns:toJson(storage.storageInfoList)};
if(data.length){ if(data.length){
data = data.map(function(item){ data = data.map(function(item){
item.delFlag = 0; item.delFlag = 0;
item.readonly = item.qrCode && item.qrCode.state === '2' item.readonly = item.qrCode && item.qrCode.state === '2'
return item; return item;
})
}
$(selector).bootstrapTable({
data: data,
//是否显示分页(*)
pagination: true,
//排序方式
sortOrder: "asc",
//初始化加载第一页,默认第一页
pageNumber:1,
//每页的记录行数(*)
pageSize: 10,
sidePagination: "client",
columns:[{checkbox: true, formatter: function(vlaue,row){return {disabled: row.qrCode && row.qrCode.state === '2' }}},
{
field: 'no',
title: '序号',
align: 'center',
width: 60,
formatter: function (value, row, index){
return '<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: 'model',
title: '型号',
formatter: function (value,row,index){
return Mustache.render($("#modelTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'shelves',
title: '货架',
formatter: function (value,row,index){
return Mustache.render($("#shelvesTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'warehouse.name',
title: '仓库',
formatter: function (value,row,index){
return Mustache.render($("#warehouseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'qrCode.state',
title: '&nbsp;&nbsp;状态&nbsp;&nbsp;',
formatter: function (value,row,index){
if(value === '1'){
return '已入库未入账'
}else if(value === '2'){
return '已入账未下账'
} else if(value === '3'){
return '已下账'
} else {
return '未入库'
}
}
},
{
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){
if(row.qrCode && row.qrCode.state === '2') return ' ';
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).bootstrapTable({
}); data: data,
$(selector).on('check.bs.table uncheck.bs.table load-success.bs.table ' + //是否显示分页(*)
pagination: true,
//排序方式
sortOrder: "asc",
//初始化加载第一页,默认第一页
pageNumber:1,
//每页的记录行数(*)
pageSize: 10,
sidePagination: "client",
columns:[{checkbox: true, formatter: function(vlaue,row){return {disabled: row.qrCode && row.qrCode.state === '2' }}},
{
field: 'no',
title: '序号',
align: 'center',
width: 60,
formatter: function (value, row, index){
return '<span>'+(index+1)+'</span>'
}
},
{
field: 'type.name',
title: '品名',
formatter: function (value,row,index){
return Mustache.render($("#typeNameTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'type.code',
title: '代码',
formatter: function (value,row,index){
return Mustache.render($("#typeCodeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'amount',
title: '单价',
formatter: function (value,row,index){
return Mustache.render($("#amountTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'type.unit',
title: '单位',
formatter: function (value,row,index){
return Mustache.render($("#unitTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'model',
title: '型号',
formatter: function (value,row,index){
return Mustache.render($("#modelTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'num',
title: '数量',
formatter: function (value,row,index){
return Mustache.render($("#numTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'infoSum',
title: '总价',
formatter: function (value,row,index){
return Mustache.render($("#infoSumTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'shelves',
title: '货架',
formatter: function (value,row,index){
return Mustache.render($("#shelvesTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'warehouse.name',
title: '仓库',
formatter: function (value,row,index){
return Mustache.render($("#warehouseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'qrCode.state',
title: '&nbsp;&nbsp;状态&nbsp;&nbsp;',
formatter: function (value,row,index){
if(value === '1'){
return '已入库未入账'
}else if(value === '2'){
return '已入账未下账'
} else if(value === '3'){
return '已下账'
} else {
return '未入库'
}
}
},
{
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){
if(row.qrCode && row.qrCode.state === '2') return ' ';
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 () { 'check-all.bs.table uncheck-all.bs.table', function () {
$('#editAll').prop('disabled', !getSelections().length); $('#editAll').prop('disabled', !getSelections().length);
}); });
} }
function getSelections(){
return $(selector).bootstrapTable('getSelections');
}
/** 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)){ top.selectStorageData = function (res) {
/*** res.rows = res.rows.map(function (e) {
* 重复的物资编码去重
*/
var newItems = [];
items.forEach(function(item){
var fined = getTableData().find(function(v){
return v.qrCode.id === item.qrCode.id
});
if(!fined){
newItems.push(item)
}else{
jp.warning('有物资重复不能入库!');
}
})
var data = newItems.map(function (item){
item[0] = false;
if(item.goodsInfo && !item.goodsInfo.amount){
item.goodsInfo.amount = 0;
}
return { return {
id: '', ...e,
delFlag: 0, infoSum: new Big(e.num).times(e.amount).toNumber()
remarks: '',
...item
} }
}); })
$(selector).bootstrapTable('append', data) return res;
}
/**
* 手动添加明细
* @param selector
*/
function addDetail(selector){
// 选择该批次号下的货品明细
if(!$("#batchNum").val()){
jp.warning('请选择批次号!');
return;
} }
}) jp.openStorageSelectDialog({batchNum:$("#batchNum").val(),state: 0, isMultiSelect: true, gridSelectTableDataHandleName: 'selectStorageData' },function (items){
} if(Array.isArray(items)){
/***
* 重复的物资编码去重
*/
var newItems = [];
items.forEach(function(item){
var fined = getTableData().find(function(v){
return v.qrCode.id === item.qrCode.id
});
if(!fined){
newItems.push(item)
}else{
jp.warning('有物资重复不能入库!');
}
})
var data = newItems.map(function (item){
item[0] = false;
if(item.goodsInfo && !item.goodsInfo.amount){
item.goodsInfo.amount = 0;
}
return {
id: '',
delFlag: 0,
remarks: '',
...item,
infoSum: new Big(item.num).times(item.amount).toNumber()
}
});
$(selector).bootstrapTable('append', data)
}
})
}
/** /**
* 删除明细 * 删除明细
* @param index * @param index
* @param rowId * @param rowId
* @param rowDelFlag * @param rowDelFlag
*/ */
function removeRow(index, rowId, rowDelFlag){ function removeRow(index, rowId, rowDelFlag){
if(rowId){ if(rowId){
var delFlag = rowDelFlag == 1 ? 0 : 1 var delFlag = rowDelFlag == 1 ? 0 : 1
updateRow(index, { updateRow(index, {
delFlag: delFlag delFlag: delFlag
}) })
}else{ }else{
$(selector).bootstrapTable("remove", { $(selector).bootstrapTable("remove", {
field: '$index', field: '$index',
values: [index] values: [index]
}) })
}
} }
}
/** /**
* 更新行 * 更新行
* @param index 下标 * @param index 下标
* @param row 更新对象 * @param row 更新对象
*/ */
function updateRow(index, row){ function updateRow(index, row){
$(selector).bootstrapTable('updateRow', { $(selector).bootstrapTable('updateRow', {
index: index, index: index,
row: row row: row
}) })
} }
/** /**
* 监听input值,并更新行 * 监听input值,并更新行
* @param rowIndex 更新行的下标 * @param rowIndex 更新行的下标
* @param elem 元素 * @param elem 元素
* @param field 属性 * @param field 属性
*/ */
function onInputChange(rowIndex, elem , field){ function onInputChange(rowIndex, elem , field){
var obj = {}; var obj = {};
obj[field] = $(elem).val() obj[field] = $(elem).val()
var timer = null; var timer = null;
clearTimeout(timer); clearTimeout(timer);
timer = setTimeout(function (){ timer = setTimeout(function (){
updateRow(rowIndex, obj) updateRow(rowIndex, obj)
}, 0) }, 0)
} }
/** /**
* 监听类型选择回调并更新行 * 监听类型选择回调并更新行
* @param nodes 选中数据 * @param nodes 选中数据
* @param rowIndex 行下标 * @param rowIndex 行下标
*/ */
function onSelectType(nodes, rowIndex){ function onSelectType(nodes, rowIndex){
if(Array.isArray(nodes) && nodes.length === 1){ if(Array.isArray(nodes) && nodes.length === 1){
var node = nodes[0]; var node = nodes[0];
var obj = { var obj = {
type: { type: {
id: node.id, id: node.id,
name: node.text name: node.text
}
};
updateRow(rowIndex, obj)
} }
};
updateRow(rowIndex, obj)
} }
}
function onSelectShelves(nodes, rowIndex){ function onSelectShelves(nodes, rowIndex){
if(Array.isArray(nodes) && nodes.length === 1){ if(Array.isArray(nodes)){
var node = nodes[0]; var obj = {
var obj = { shelvesIds: '',
shelves: { warehouseIds: '',
id: node.id, shelvesNames: '',
name: node.name warehouseNames: ''
}, };
warehouse: node.warehouse nodes.forEach(function (item) {
}; obj.shelvesIds += item.id + ',';
updateRow(rowIndex, obj) obj.shelvesNames += item.name + ',';
obj.warehouseIds += item.warehouse.id + ',';
obj.warehouseNames += item.warehouse.name + ','
})
// var node = nodes[0];
// var obj = {
// shelves: {
// id: node.id,
// name: node.name
// },
// warehouse: node.warehouse
// };
updateRow(rowIndex, obj)
}
} }
}
/** /**
* 获取所有明细数据 * 获取所有明细数据
* @returns {*|jQuery} * @returns {*|jQuery}
*/ */
function getTableData(useCurrentPage){ function getTableData(useCurrentPage){
return $(selector).bootstrapTable('getData',{ return $(selector).bootstrapTable('getData',{
useCurrentPage: useCurrentPage useCurrentPage: useCurrentPage
}); });
} }
/** /**
* 批量添加货架 * 批量添加货架
*/ */
function addShelve(){ function addShelve(){
jp.openShelvesSelectDialog(function (items){ jp.openShelvesSelectDialog(function (items){
setTimeout(function(){ setTimeout(function(){
var Shelve = items[0]; // 货架对象 // var Shelve = items[0]; // 货架对象
var realSelections = []; // 保存真实选中的数据
var allSelections = getSelections(); // 保存所有选中的数据(含分页)
var currentPageData = getTableData(true); // 保存当前分页数据
allSelections.forEach(function(item){
var finded = currentPageData.find(function(value){
return value.qrCode.id === item.qrCode.id
});
if(finded){
realSelections.push(item);
}
});
realSelections.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
})
})
},200)
}) var obj = {
} shelvesIds: '',
warehouseIds: '',
shelvesNames: '',
warehouseNames: ''
};
items.forEach(function (item) {
obj.shelvesIds += item.id + ',';
obj.shelvesNames += item.name + ',';
obj.warehouseIds += item.warehouse.id + ',';
obj.warehouseNames += item.warehouse.name + ','
})
function updateTask(allList, count, updateCallback){ var realSelections = []; // 保存真实选中的数据
var list = allList.slice(0, count); var allSelections = getSelections(); // 保存所有选中的数据(含分页)
list.forEach(function (item){ var currentPageData = getTableData(true); // 保存当前分页数据
var index = getTableData().findIndex(function (current){ allSelections.forEach(function(item){
return current.qrCode.id === item.qrCode.id; var finded = currentPageData.find(function(value){
}); // 需更新的行的下标 return value.qrCode.id === item.qrCode.id
updateCallback(index); });
}); if(finded){
setTimeout(function(){ realSelections.push(item);
var newList = allList.slice(count); }
if(newList.length > 0){ });
updateTask(newList,count,updateCallback); realSelections.forEach(function (item){
} var index = getTableData().findIndex(function (current){
},300) return current.qrCode.id === item.qrCode.id;
} }); // 需更新的行的下标
// updateRow(index,{
// shelves: {
// id: Shelve.id,
// name: Shelve.name
// },
// warehouse: Shelve.warehouse
// })
updateRow(index, Object.assign({}, obj));
})
},200)
/** }, true);
* 点击扫码显示扫码窗口 }
*/
function addScan(){
layer.open({
type: 1,
title: '扫码',
auto: true,
area: ['500','300'],
content: $("#scanResultTpl").html(),
success: function (){
$("#scanResult").focus();
},
btn:['关闭']
})
}
/** 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;
* 四、清空扫码结果 }); // 需更新的行的下标
* @param elem updateCallback(index);
*/ });
function onScanChange(elem){ setTimeout(function(){
try{ var newList = allList.slice(count);
var json = JSON.parse($(elem).val()); if(newList.length > 0){
var qrCodeId = json.code; updateTask(newList,count,updateCallback);
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',[ },300)
{ }
qrCode: qrCode,
goodsInfo: qrCode.goodsInfo, /**
...qrCode.goodsInfo, * 点击扫码显示扫码窗口
id: '', */
delFlag: 0, function addScan(){
remarks: '' layer.open({
} type: 1,
]); title: '扫码',
$(elem).val('').focus(); 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;
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){ }catch (e){
console.log(e); console.log(e);
} }
} }
</script> </script>
<script id="hideTpl" type="text/html"> <script id="hideTpl" type="text/html">
<input name="storageInfoList[{{idx}}].id" type="hidden" value="{{row.id}}"/> <input name="storageInfoList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
<input name="storageInfoList[{{idx}}].delFlag" type="hidden" value="{{row.delFlag}}"/> <input name="storageInfoList[{{idx}}].delFlag" type="hidden" value="{{row.delFlag}}"/>
<input name="storageInfoList[{{idx}}].goodsInfo.id" type="hidden" value="{{row.goodsInfo.id}}"/> <input name="storageInfoList[{{idx}}].goodsInfo.id" type="hidden" value="{{row.goodsInfo.id}}"/>
<input name="storageInfoList[{{idx}}].goodsInfo.name" type="hidden" value="{{row.goodsInfo.name}}"/> <input name="storageInfoList[{{idx}}].goodsInfo.name" type="hidden" value="{{row.goodsInfo.name}}"/>
<input name="storageInfoList[{{idx}}].goodsInfo.amount" type="hidden" value="{{row.goodsInfo.amount}}"/> <input name="storageInfoList[{{idx}}].goodsInfo.amount" type="hidden" value="{{row.goodsInfo.amount}}"/>
<input name="storageInfoList[{{idx}}].warehouse.id" type="hidden" value="{{row.warehouse.id}}" readonly class="form-control" /> <input name="storageInfoList[{{idx}}].warehouse.id" type="hidden" value="{{row.warehouse.id}}" readonly class="form-control" />
<input name="storageInfoList[{{idx}}].warehouse.name" type="hidden" value="{{row.warehouse.name}}" readonly class="form-control" /> <input name="storageInfoList[{{idx}}].warehouse.name" type="hidden" value="{{row.warehouse.name}}" readonly class="form-control" />
<input name="storageInfoList[{{idx}}].amount" type="hidden" value="{{row.amount}}" readonly class="form-control" /> <input name="storageInfoList[{{idx}}].amount" type="hidden" value="{{row.amount}}" readonly class="form-control" />
<input name="storageInfoList[{{idx}}].qrCode.id" type="hidden" value="{{row.qrCode.id}}" readonly class="form-control" /> <input name="storageInfoList[{{idx}}].qrCode.id" type="hidden" value="{{row.qrCode.id}}" readonly class="form-control" />
<input name="storageInfoList[{{idx}}].name" type="hidden" readonly value="{{row.name}}" class="form-control "/> <input name="storageInfoList[{{idx}}].name" type="hidden" readonly value="{{row.name}}" class="form-control "/>
<input name="storageInfoList[{{idx}}].type.id" type="hidden" readonly value="{{row.type.id}}" class="form-control "/> <input name="storageInfoList[{{idx}}].type.id" type="hidden" readonly value="{{row.type.id}}" class="form-control "/>
<input name="storageInfoList[{{idx}}].type.name" type="hidden" readonly value="{{row.type.name}}" class="form-control "/> <input name="storageInfoList[{{idx}}].type.name" type="hidden" readonly value="{{row.type.name}}" class="form-control "/>
<input name="storageInfoList[{{idx}}].model" type="hidden" readonly value="{{row.model}}" class="form-control "/> <input name="storageInfoList[{{idx}}].model" type="hidden" readonly value="{{row.model}}" class="form-control "/>
<input name="storageInfoList[{{idx}}].shelves.id" type="hidden" readonly value="{{row.shelves.id}}" class="form-control "/> <input name="storageInfoList[{{idx}}].shelves.id" type="hidden" readonly value="{{row.shelves.id}}" class="form-control "/>
<input name="storageInfoList[{{idx}}].shelves.name" type="hidden" readonly value="{{row.shelves.name}}" class="form-control "/> <input name="storageInfoList[{{idx}}].shelves.name" type="hidden" readonly value="{{row.shelves.name}}" class="form-control "/>
<input name="storageInfoList[{{idx}}].remarks" type="hidden" readonly value="{{row.remarks}}" class="form-control "/> <input name="storageInfoList[{{idx}}].remarks" type="hidden" readonly value="{{row.remarks}}" class="form-control "/>
</script> </script>
<script id="nameTpl" type="text/html"> <script id="nameTpl" type="text/html">
<input type="text" readonly value="{{row.name}}" class="form-control "/> <input type="text" readonly value="{{row.name}}" class="form-control "/>
</script>
<script id="typeNameTpl" type="text/html">//<!--
<sys:treeselectNotNameProperty id="storageInfoList{{idx}}_typeName" name="storageInfoList[{{idx}}].type.id" value="{{row.type.id}}" labelName="storageInfoList[{{idx}}].type.name" labelValue="{{row.type.name}}"
title="品名代码" url="/warehouse/materialtype/materialType/treeData" notAllowSelectParent="true" cssClass="form-control required" allowClear="false" allowSearch="true" callback="onSelectType" />//-->
</script>
<script id="typeCodeTpl" type="text/html">
<input id="storageInfoList{{idx}}_typeCode" name="storageInfoList[{{idx}}].type.code" type="text" value="{{row.type.code}}" readonly class="form-control required"/>
</script> </script>
<script id="typeTpl" type="text/html">//<!-- <script id="typeTpl" type="text/html">//<!--
<sys:treeselectNotNameProperty id="storageInfoList{{idx}}_type" name="storageInfoList[{{idx}}].type.id" value="{{row.type.id}}" labelName="storageInfoList{{idx}}.type.name" labelValue="{{row.type.name}}" <sys:treeselectNotNameProperty 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" />//--> title="品名代码" url="/warehouse/materialtype/materialType/treeData" cssClass="form-control " disabled="disabled" allowClear="true" allowSearch="true" callback="onSelectType" />//-->
</script> </script>
<script id="amountTpl" type="text/html">
<input id="storageInfoList{{idx}}_amount" name="storageInfoList[{{idx}}].amount" type="text" value="{{row.amount}}" readonly onchange="onInputChange('{{idx}}', this, 'amount')" class="form-control required"/>
</script>
<script id="unitTpl" type="text/html">
<input id="storageInfoList{{idx}}_unit" name="storageInfoList[{{idx}}].type.unit" type="text" value="{{row.type.unit}}" readonly onchange="onInputChange('{{idx}}', this, 'type.unit')" class="form-control required"/>
</script>
<script id="modelTpl" type="text/html"> <script id="modelTpl" type="text/html">
<input id="storageInfoList{{idx}}_model" type="text" value="{{row.model}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/> <input id="storageInfoList{{idx}}_model" type="text" value="{{row.model}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/>
</script>
<script id="numTpl" type="text/html">
<input id="storageInfoList{{idx}}_num" name="storageInfoList[{{idx}}].num" readonly type="text" value="{{row.num}}" onchange="onInputChange('{{idx}}', this, 'num')" class="form-control required"/>
</script>
<script id="infoSumTpl" type="text/html">
<input id="storageInfoList{{idx}}_infoSum" name="storageInfoList[{{idx}}].infoSum" type="text" value="{{row.infoSum}}" readonly onchange="onInputChange('{{idx}}', this, 'infoSum')" class="form-control required"/>
</script> </script>
<script id="shelvesTpl" type="text/html">//<!-- <script id="shelvesTpl" type="text/html">//<!--
{{#row.readonly}} {{#row.readonly}}
<sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="storageInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}" <sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}" labelName="storageInfoList[{{idx}}].shelvesNames" labelValue="{{row.shelvesNames}}"
cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" disabled="disabled"></sys:shelvesselectNotName> cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" disabled="disabled" isMultiSelected="true" />
{{/row.readonly}} {{/row.readonly}}
{{^row.readonly}} {{^row.readonly}}
<sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="storageInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}" <sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}" labelName="storageInfoList[{{idx}}].shelvesNames" labelValue="{{row.shelvesNames}}"
cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" callback="onSelectShelves"></sys:shelvesselectNotName>//--> cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" callback="onSelectShelves" isMultiSelected="true" />//-->
{{/row.readonly}} {{/row.readonly}}
</script> </script>
<script id="remarksTpl" type="text/html"> <script id="remarksTpl" type="text/html">
{{#row.readonly}} {{#row.readonly}}
<textarea id="storageInfoList{{idx}}_remarks" rows="2" readonly class="form-control ">{{row.remarks}}</textarea> <textarea id="storageInfoList{{idx}}_remarks" rows="2" readonly class="form-control ">{{row.remarks}}</textarea>
{{/row.readonly}} {{/row.readonly}}
{{^row.readonly}} {{^row.readonly}}
<textarea id="storageInfoList{{idx}}_remarks" rows="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea> <textarea id="storageInfoList{{idx}}_remarks" rows="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
{{/row.readonly}} {{/row.readonly}}
</script> </script>
<script id="warehouseTpl" type="text/html"> <script id="warehouseTpl" type="text/html">
<input id="storageInfoList{{idx}}_warehouseName" type="text" value="{{row.warehouse.name}}" readonly class="form-control "/> <input id="storageInfoList{{idx}}_warehouseName" type="text" value="{{row.warehouseNames}}" readonly class="form-control "/>
<input id="storageInfoList{{idx}}_warehouseIds" name="storageInfoList[{{idx}}].warehouseIds" type="hidden" value="{{row.warehouseIds}}" readonly class="form-control "/>
<input type="hidden" id="storageInfoList{{idx}}_shelvesIds" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}">
</script> </script>
<script id="scanResultTpl" type="text/html"> <script id="scanResultTpl" type="text/html">
<br> <br>
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-xs-2 text-right"> <div class="col-xs-2 text-right">
<label>扫码结果:</label> <label>扫码结果:</label>
</div> </div>
<div class="col-xs-10"> <div class="col-xs-10">
<input type="text" id="scanResult" class="form-control" onchange="onScanChange(this)"> <input type="text" id="scanResult" class="form-control" onchange="onScanChange(this)">
<span class="text-danger">请切换英文输入法</span> <span class="text-danger">请切换英文输入法</span>
</div> </div>
</div>
</div> </div>
</div> <br>
<br> </script>
</script>
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<meta name="decorator" content="ani"/> <meta name="decorator" content="ani"/>
<link rel="stylesheet" href="${ctxStatic}/common/css/form.css"> <link rel="stylesheet" href="${ctxStatic}/common/css/form.css">
<link rel="stylesheet" href="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.css"> <link rel="stylesheet" href="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.css">
<script type="text/javascript" src="${ctxStatic}/common/js/big.js"></script>
<style> <style>
.statistic-container{ .statistic-container{
position: relative; position: relative;
...@@ -171,4 +172,4 @@ ...@@ -171,4 +172,4 @@
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -238,21 +238,21 @@ $(document).ready(function() { ...@@ -238,21 +238,21 @@ $(document).ready(function() {
$('#storageTable').bootstrapTable('refresh'); $('#storageTable').bootstrapTable('refresh');
} }
function add(){ function add(){
jp.openSaveDialog("新增入库单","${ctx}/warehouse/storage/storage/form/add", '1200', '800'); jp.openSaveDialog("新增入库单","${ctx}/warehouse/storage/storage/form/add", '1400', '800');
} }
function edit(id){ function edit(id){
if(id == undefined){ if(id == undefined){
id = getIdSelections(); id = getIdSelections();
} }
jp.openSaveDialog("编辑入库单","${ctx}/warehouse/storage/storage/form/edit?id=" + id, '1200', '800'); jp.openSaveDialog("编辑入库单","${ctx}/warehouse/storage/storage/form/edit?id=" + id, '1400', '800');
} }
function view(id){//没有权限时,不显示确定按钮 function view(id){//没有权限时,不显示确定按钮
if(id == undefined){ if(id == undefined){
id = getIdSelections(); id = getIdSelections();
} }
jp.openViewDialog("查看入库单","${ctx}/warehouse/storage/storage/form/view?id=" + id, '1200', '800'); jp.openViewDialog("查看入库单","${ctx}/warehouse/storage/storage/form/view?id=" + id, '1400', '800');
} }
......
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