| | |
| | | var pageCurr; |
| | | var printMatCodeNos = []; |
| | | var admin; |
| | | |
| | | // Local translation helper |
| | | function t(key, params) { |
| | | if (typeof I18n !== 'undefined' && typeof I18n.t === 'function') { |
| | | return I18n.t(key, params); |
| | | } |
| | | return key; |
| | | } |
| | | |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'tagId$', align: 'center',title: I18n.t('classification'), templet: '#tagTpl'} |
| | | ,{field: 'store_max', align: 'center',title: I18n.t('stock_upper_limit')} |
| | | ,{field: 'store_min', align: 'center',title: I18n.t('stock_lower_limit')} |
| | | ,{field: 'store_max_date', align: 'center',title: I18n.t('stock_age_upper_limit_days')} |
| | | ,{field: 'areaId$', align: 'center',title: I18n.t('area'), templet: '#areaTpl'} |
| | | ,{field: 'tagId$', align: 'center',title: t('classification'), templet: '#tagTpl'} |
| | | // ,{field: 'store_max', align: 'center',title: t('stock_upper_limit')} |
| | | // ,{field: 'store_min', align: 'center',title: t('stock_lower_limit')} |
| | | // ,{field: 'store_max_date', align: 'center',title: t('stock_age_upper_limit_days')} |
| | | ,{field: 'areaId$', align: 'center',title: t('area'), templet: '#areaTpl'} |
| | | |
| | | ]; |
| | | cols.push.apply(cols, getMatCols()); |
| | | cols.push( |
| | | {fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width:150} |
| | | {fixed: 'right', title: t('operation'), align: 'center', toolbar: '#operate', width:150} |
| | | ) |
| | | return cols; |
| | | } |
| | |
| | | success: function(layero, index){ |
| | | layer.iframeAuto(index); |
| | | printMatCodeNos.push(data.matnr); |
| | | if (typeof I18n !== 'undefined' && I18n.updatePage) { |
| | | I18n.updatePage($(layero)); |
| | | form.render(); |
| | | } |
| | | }, |
| | | end: function () { |
| | | } |
| | |
| | | $(layero).find('#matnr').val(res.data); |
| | | }) |
| | | } |
| | | |
| | | if (typeof I18n !== 'undefined') { |
| | | setTimeout(function() { |
| | | I18n.updatePage($(layero)); |
| | | }, 50); |
| | | } |
| | | |
| | | // 表单提交事件 |
| | | form.on('submit(editSubmit)', function (data) { |
| | | console.log(data) |
| | |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | layer.msg(t('response.operation_success'), {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |