| | |
| | | // } |
| | | // } |
| | | excludeTrash(param); |
| | | applyBeBatchFilter(param, wrapper); |
| | | convert(param, wrapper); |
| | | allLike(LocDetl.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private <T> void applyBeBatchFilter(Map<String, Object> map, EntityWrapper<T> wrapper) { |
| | | Object beBatchObj = map.remove("beBatch"); |
| | | if (beBatchObj == null) { |
| | | beBatchObj = map.remove("be_batch"); |
| | | } |
| | | if (beBatchObj == null) { |
| | | return; |
| | | } |
| | | String beBatch = String.valueOf(beBatchObj).trim(); |
| | | if (Cools.isEmpty(beBatch)) { |
| | | return; |
| | | } |
| | | if ("1".equals(beBatch)) { |
| | | wrapper.eq("be_batch", 1); |
| | | return; |
| | | } |
| | | if ("0".equals(beBatch)) { |
| | | wrapper.andNew().isNull("be_batch").or().eq("be_batch", 0); |
| | | return; |
| | | } |
| | | wrapper.eq("be_batch", beBatch); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/add/auth") |
| | |
| | | map.remove("row"); |
| | | } |
| | | } |
| | | applyBeBatchFilter(map, wrapper); |
| | | convert(map, wrapper); |
| | | if (!row.equals("")) { |
| | | wrapper.and() |
| | |
| | | var pageCurr; |
| | | |
| | | function formatBeBatch(beBatch) { |
| | | return beBatch === 1 ? '强制入库' : '正常入库'; |
| | | } |
| | | |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox'}, |
| | |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'batch', align: 'center',title: '批号', sort:true} |
| | | ,{field: 'beBatch', align: 'center',title: '入库类型', templet: function(d) { |
| | | return formatBeBatch(d.beBatch); |
| | | }} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: 'SN'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | form.render('select'); |
| | | tableReload(false); |
| | | }); |
| | | |
| | |
| | | top.location.href = "login.html?license=invalid"; |
| | | } |
| | | |
| | | function clearLicensePromptState() { |
| | | sessionStorage.removeItem("licensePanelAutoOpen"); |
| | | sessionStorage.removeItem("licenseInvalidReason"); |
| | | } |
| | | |
| | | $(function () { |
| | | if ("" === localStorage.getItem('token')) { |
| | | top.location.href = baseUrl + "/login"; |
| | |
| | | redirectToLicensePage('系统当前未检测到可用许可证,请重新导入新的许可证。'); |
| | | return; |
| | | } |
| | | clearLicensePromptState(); |
| | | if (days <= 30) { |
| | | $("#licenseShow").show() |
| | | $("#licenseDays").html(days) |
| | | } else { |
| | | $("#licenseShow").hide() |
| | | } |
| | | }else { |
| | | redirectToLicensePage(res.msg || '许可证校验失败,请重新导入新的许可证。'); |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="beBatch" class="layui-input" autocomplete="off"> |
| | | <option value="">入库类型</option> |
| | | <option value="1">强制入库</option> |
| | | <option value="0">正常入库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="frozen" class="layui-input" type="text" autocomplete="off"> |
| | | <!-- <option style="display: none"></option>--> |
| | | <option value="">冻结否</option> |
| | |
| | | if (!needOpen) { |
| | | return; |
| | | } |
| | | var message = sessionStorage.getItem("licenseInvalidReason") || "系统当前未检测到可用许可证,请先导入新的许可证。"; |
| | | showLicenseEntry(message); |
| | | openLicenseTool(message); |
| | | verifyLicenseAvailability(function (isValid) { |
| | | if (isValid) { |
| | | clearLicensePromptState(); |
| | | hideLicenseEntry(); |
| | | clearLicenseQueryFlag(); |
| | | return; |
| | | } |
| | | var message = sessionStorage.getItem("licenseInvalidReason") || "系统当前未检测到可用许可证,请先导入新的许可证。"; |
| | | showLicenseEntry(message); |
| | | openLicenseTool(message); |
| | | }); |
| | | } |
| | | |
| | | function showLicenseEntry(message) { |
| | |
| | | if (message) { |
| | | $("#licenseEntryMessage").text(message); |
| | | } |
| | | } |
| | | |
| | | function hideLicenseEntry() { |
| | | $("#updateLicense").hide(); |
| | | } |
| | | |
| | | function clearLicensePromptState() { |
| | | sessionStorage.removeItem("licensePanelAutoOpen"); |
| | | sessionStorage.removeItem("licenseInvalidReason"); |
| | | } |
| | | |
| | | function clearLicenseQueryFlag() { |
| | | if (window.history && window.history.replaceState && getQueryValue("license") === "invalid") { |
| | | window.history.replaceState(null, document.title, window.location.pathname); |
| | | } |
| | | } |
| | | |
| | | function verifyLicenseAvailability(callback) { |
| | | $.ajax({ |
| | | url: baseUrl + "/license/getLicenseDays", |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | var days = Number(getResponseValue(res)); |
| | | callback(!isNaN(days) && days >= 0); |
| | | return; |
| | | } |
| | | callback(false); |
| | | }, |
| | | error: function () { |
| | | callback(false); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function escapeHtml(text) { |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | sessionStorage.removeItem("licensePanelAutoOpen"); |
| | | sessionStorage.removeItem("licenseInvalidReason"); |
| | | clearLicensePromptState(); |
| | | clearLicenseQueryFlag(); |
| | | if (licenseToolState.uploadLayerIndex !== null) { |
| | | layer.close(licenseToolState.uploadLayerIndex); |
| | | } |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | clearLicensePromptState(); |
| | | clearLicenseQueryFlag(); |
| | | localStorage.setItem("token", res.data.token); |
| | | localStorage.setItem("username", res.data.username); |
| | | window.location.href = "index.html"; |