diff --git a/mes/src/main/resources/static/js/layuimodule/sp/spLayui.js b/mes/src/main/resources/static/js/layuimodule/sp/spLayui.js index 4c6e1a7..6ac851d 100644 --- a/mes/src/main/resources/static/js/layuimodule/sp/spLayui.js +++ b/mes/src/main/resources/static/js/layuimodule/sp/spLayui.js @@ -416,6 +416,7 @@ layui.define(["element", "jquery"], function (exports) { * @param tabId **/ this.checkTab = function (tabId, isIframe) { + console.log('this'+tabId); // 判断选项卡上是否有 var checkTab = false; if (isIframe == undefined || isIframe == false) { @@ -428,6 +429,7 @@ layui.define(["element", "jquery"], function (exports) { } else { parent.layui.$(".layui-tab-title li").each(function () { checkTabId = $(this).attr('lay-id'); + console.log('search'+checkTabId); if (checkTabId != null && checkTabId == tabId) { checkTab = true; } @@ -656,6 +658,31 @@ layui.define(["element", "jquery"], function (exports) { } }).resize(); }; + /** + * 手动新增一个选项卡 + * @author wangziyang + * @param url + */ + this.createTableItem = function (tabId, title, icon) { + title = ' ' + title + ''; + // 判断该窗口是否已经打开过 + var checkTab = spLayui.checkTab(tabId,true); + if (!checkTab) { + var splayuiTabInfo = JSON.parse(sessionStorage.getItem("splayuiTabInfo")); + if (splayuiTabInfo == null) { + splayuiTabInfo = {}; + } + splayuiTabInfo[tabId] = {href: tabId, title: title} + sessionStorage.setItem("splayuiTabInfo", JSON.stringify(splayuiTabInfo)); + parent.layui.element.tabAdd('splayuiTab', { + title: title + '' //用于演示 + , content: '' + , id: tabId + }); + } + parent.layui.element.tabChange('splayuiTab', tabId); + spLayui.tabRoll(); + }; }; /** @@ -676,6 +703,7 @@ layui.define(["element", "jquery"], function (exports) { * 打开新窗口 */ $('body').on('click', '[data-tab]', function () { + console.log('打开新窗口'); var loading = layer.load(0, {shade: false, time: 2 * 1000}); var tabId = $(this).attr('data-tab'), href = $(this).attr('data-tab'), @@ -722,6 +750,7 @@ layui.define(["element", "jquery"], function (exports) { * 在iframe子菜单上打开新窗口 */ $('body').on('click', '[data-iframe-tab]', function () { + console.log('在iframe子菜单上打开新窗口'); var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); var tabId = $(this).attr('data-iframe-tab'), href = $(this).attr('data-iframe-tab'), @@ -757,6 +786,7 @@ layui.define(["element", "jquery"], function (exports) { parent.layer.close(loading); }); + /** * 左侧菜单的切换 */ diff --git a/mes/src/main/resources/templates/technology/bom/addOrUpdate.ftl b/mes/src/main/resources/templates/technology/bom/addOrUpdate.ftl index fd7b426..73150db 100644 --- a/mes/src/main/resources/templates/technology/bom/addOrUpdate.ftl +++ b/mes/src/main/resources/templates/technology/bom/addOrUpdate.ftl @@ -66,7 +66,18 @@ - +
+ +
+ checked> + checked> + checked> +
+
@@ -81,58 +92,18 @@
- - -
-
+
- -
-
639537
-
-
-
- -
-
3000 元(保险箱:1000,现金:2000)
-
-
-
- -
-
- 1800 元 -
-
-
-
- -
-
保险箱
-
-
-
- -
-
人工入款
-
-
-
- -
-
备注说明
-
-
- -
-
-
+
+
+ +
@@ -144,18 +115,61 @@ - + + + + +