<!DOCTYPE html>
|
<html lang="en">
|
<head>
|
<meta charset="utf-8">
|
<title></title>
|
<meta name="renderer" content="webkit">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../static/css/cool.css" media="all">
|
<link rel="stylesheet" href="../../static/css/common.css" media="all">
|
<style>
|
.layui-table-body.layui-table-main{
|
overflow: auto; !important;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="layui-inline" style="width:100%;margin-top: 20px">
|
<label class="layui-form-label" style="margin-left: 20px" for="locNo" data-i18n="location_no">库 位 号:</label>
|
<div class="layui-input-inline">
|
<input id="locNo" class="layui-input" type="text" style="margin-left: 20px" disabled="disabled">
|
</div>
|
</div>
|
<table class="layui-hide" id="locDetlByMap" lay-filter="locDetlByMap"></table>
|
</body>
|
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
|
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
|
<script src="../../static/js/i18n/i18n-helper.js"></script>
|
<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script>
|
<script>
|
layui.use(['table', 'form'], function () {
|
var table = layui.table;
|
var form = layui.form;
|
var $ = layui.jquery;
|
var locNo = parent.locNo;
|
$('#locNo').val(locNo);
|
|
// Define getDetlCols locally since it's not exported from locMast.js
|
function getDetlCols() {
|
var i18n = (typeof I18n !== 'undefined' && I18n.isReady());
|
return [[
|
{field: 'locNo$', align: 'center',title: i18n ? I18n.t('location_no') : '库位号'}
|
,{field: 'matnr', align: 'center',title: i18n ? I18n.t('material') : '物料'}
|
,{field: 'lgnum', align: 'center',title: i18n ? I18n.t('warehouse_no') : '仓库号'}
|
,{field: 'tbnum', align: 'center',title: i18n ? I18n.t('transfer_req_no') : '搬运凭证'}
|
,{field: 'zmatid', align: 'center',title: i18n ? I18n.t('material_label_id') : '物料标签ID'}
|
,{field: 'maktx', align: 'center',title: i18n ? I18n.t('material_desc') : '物料描述'}
|
,{field: 'werks', align: 'center',title: i18n ? I18n.t('factory') : '工厂'}
|
,{field: 'anfme', align: 'center',title: i18n ? I18n.t('quantity') : '数量'}
|
,{field: 'altme', align: 'center',title: i18n ? I18n.t('unit') : '单位'}
|
,{field: 'zpallet', align: 'center',title: i18n ? I18n.t('pallet_barcode') : '托盘条码'}
|
,{field: 'bname', align: 'center',title: i18n ? I18n.t('user_id') : '用户ID'}
|
]];
|
}
|
|
// 数据渲染
|
var tableIns = table.render({
|
elem: '#locDetlByMap',
|
headers: {token: localStorage.getItem('token')},
|
url: baseUrl+'/locDetl/list/auth',
|
page: true,
|
limit: 5,
|
skin: 'line',
|
where: {loc_no: locNo},
|
even: true,
|
cellMinWidth: 50,
|
cols: getDetlCols(),
|
text: {
|
none: (typeof I18n !== 'undefined' && I18n.isReady()) ? I18n.t('no_data') : '无数据'
|
},
|
request: {
|
pageName: 'curr',
|
pageSize: 'limit'
|
},
|
parseData: function (res) {
|
return {
|
'code': res.code,
|
'msg': res.msg,
|
'count': res.data.total,
|
'data': res.data.records
|
}
|
},
|
response: {
|
statusCode: 200
|
},
|
done: function(res, curr, count) {
|
if (res.code === 403) {
|
top.location.href = baseUrl+"/";
|
}
|
pageCur=curr;
|
form.on('checkbox(tableCheckbox)', function (data) {
|
var _index = $(data.elem).attr('table-index')||0;
|
if(data.elem.checked){
|
res.data[_index][data.value] = 'Y';
|
}else{
|
res.data[_index][data.value] = 'N';
|
}
|
});
|
|
if (typeof I18n !== 'undefined') {
|
I18n.updateLayuiPagination();
|
}
|
}
|
});
|
|
// Listen for language changes
|
$(document).on('i18n:languageChanged', function() {
|
tableIns.reload({
|
cols: getDetlCols(),
|
text: {
|
none: I18n.t('no_data')
|
},
|
done: function(res, curr, count) {
|
if (typeof I18n !== 'undefined') {
|
setTimeout(function() {
|
I18n.updateLayuiPagination();
|
}, 50);
|
}
|
}
|
});
|
});
|
|
// Initial translation check
|
if (!(typeof I18n !== 'undefined' && I18n.isReady())) {
|
$(document).on('i18n:ready', function() {
|
tableIns.reload({
|
cols: getDetlCols(),
|
text: {
|
none: I18n.t('no_data')
|
}
|
});
|
});
|
}
|
});
|
</script>
|
|
</html>
|