| | |
| | | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | |
| | | arrRemove(detlCols, "field", "anfme") |
| | | arrRemove(detlCols, "field", "zpallet") |
| | | cols.push.apply(cols, detlCols); |
| | | // cols.push({field: 'anfme', align: 'center',title: '数量', style: 'font-weight: bold'} |
| | | // ) |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150}); |
| | | return cols; |
| | | } |
| | | |
| | | function right(data){ |
| | | top.popupRight = top.layui.admin.popupRight({ |
| | | id: 'LAY_adminPopupLayer_LOCCHART' |
| | | , area: '550px' |
| | | , success: function(layero, index){ |
| | | var result = null; |
| | | $.ajax({ |
| | | url: baseUrl + "/locDetl/chart/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {matnr: data.matnr}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | result = res; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | top.layui.view(this.id).render('locChart', {res: result}); |
| | | } |
| | | , end: function () { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | right(data); |
| | | break; |
| | | |
| | | } |