diff --git a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionAdd.js b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionAdd.js index 2158c3a59905f11e303f8640d5388b044a279df0..f74b4ff72c6e9405993842b83df4fdc42a5edaf0 100644 --- a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionAdd.js +++ b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionAdd.js @@ -66,8 +66,8 @@ layui.config({ loadBomChildProList(thisRowValue); }); - //加载bom方案下的子件列表 - function loadBomChildProList(bomId){ + // 加载bom方案下的子件列表 + function loadBomChildProList(bomId) { AjaxPostUtil.request({url: flowableBasePath + "erpbom008", params: {id: bomId}, type: 'json', method: 'GET', callback: function (json) { childProList = [].concat(json.rows); $("#tBody").html(getDataUseHandlebars($("#tableBody").html(), {rows: childProList})); diff --git a/erp/src/main/resources/template/js/erpstatistics/incomingallstatistics.js b/erp/src/main/resources/template/js/erpstatistics/incomingallstatistics.js index d88c0e0885909dbfd238efeb0db70cf75b1a6007..73c1c8d88b34d05abbc417ee9b6051d7bbc7d286 100644 --- a/erp/src/main/resources/template/js/erpstatistics/incomingallstatistics.js +++ b/erp/src/main/resources/template/js/erpstatistics/incomingallstatistics.js @@ -45,12 +45,14 @@ layui.config({ limit: 8, cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'materialName', title: '商品名称', align: 'left', width: 250}, - { field: 'model', title: '型号', align: 'left', width: 100}, - { field: 'typeName', title: '分类', align: 'left', width: 100}, - { field: 'unitName', title: '单位', align: 'left', width: 80}, - { field: 'currentTock', title: '入库数量', align: 'left', width: 100}, - { field: 'currentTockMoney', title: '入库金额', align: 'left', width: 120} + { field: 'materialName', title: '商品名称', align: 'left', width: 250 }, + { field: 'model', title: '型号', align: 'left', width: 100 }, + { field: 'typeName', title: '分类', align: 'left', width: 100 }, + { field: 'normMation', title: '规格', align: 'left', width: 80, templet: function (d) { + return d.normMation.name; + }}, + { field: 'currentTock', title: '入库数量', align: 'left', width: 100 }, + { field: 'currentTockMoney', title: '入库金额', align: 'left', width: 120 } ]], done: function(json) { matchingLanguage(); diff --git a/erp/src/main/resources/template/js/erpstatistics/salesallstatistics.js b/erp/src/main/resources/template/js/erpstatistics/salesallstatistics.js index 7a13271c79aaf1734d829f89ac9f8a96a78e3338..0c367cd8a11d28b9b1c689b17769b4864b0f7bdd 100644 --- a/erp/src/main/resources/template/js/erpstatistics/salesallstatistics.js +++ b/erp/src/main/resources/template/js/erpstatistics/salesallstatistics.js @@ -44,12 +44,14 @@ layui.config({ limit: 8, cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'materialName', title: '商品名称', align: 'left', width: 250}, - { field: 'model', title: '型号', align: 'left', width: 100}, - { field: 'typeName', title: '分类', align: 'left', width: 100}, - { field: 'unitName', title: '单位', align: 'left', width: 80}, - { field: 'currentTock', title: '出库数量', align: 'left', width: 100}, - { field: 'currentTockMoney', title: '出库金额', align: 'left', width: 120} + { field: 'materialName', title: '商品名称', align: 'left', width: 250 }, + { field: 'model', title: '型号', align: 'left', width: 100 }, + { field: 'typeName', title: '分类', align: 'left', width: 100 }, + { field: 'normMation', title: '规格', align: 'left', width: 80, templet: function (d) { + return d.normMation.name; + }}, + { field: 'currentTock', title: '出库数量', align: 'left', width: 100 }, + { field: 'currentTockMoney', title: '出库金额', align: 'left', width: 120 } ]], done: function(json) { matchingLanguage(); diff --git a/erp/src/main/resources/template/js/material/materialInventoryWarningList.js b/erp/src/main/resources/template/js/material/materialInventoryWarningList.js index 456e3d88edaeb46639ceb568efeb9ef1b7c800da..3a4890d41d1aa3e39b799e895ac81439a2b13627 100644 --- a/erp/src/main/resources/template/js/material/materialInventoryWarningList.js +++ b/erp/src/main/resources/template/js/material/materialInventoryWarningList.js @@ -6,13 +6,12 @@ layui.config({ version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'eleTree', 'soulTable'], function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'form', 'soulTable'], function (exports) { winui.renderColor(); var $ = layui.$, form = layui.form, table = layui.table, - soulTable = layui.soulTable, - eleTree = layui.eleTree; + soulTable = layui.soulTable; var selOption = getFileContent('tpl/template/select-option.tpl'); // 加载仓库数据 @@ -49,14 +48,11 @@ layui.config({ { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 } ],[ { field: 'safetyTock', title: '安全存量', align: 'center', width: 80}, - { field: 'allTock', title: '当前库存', align: 'center', width: 120} + { field: 'allStock', title: '当前库存', align: 'center', width: 120} ]], done: function(json) { matchingLanguage(); soulTable.render(this); - if(!loadFirstType){ - initFirstType(); - } } }); @@ -69,34 +65,6 @@ layui.config({ }); form.render(); - - var loadFirstType = false; - //初始化商品类型 - function initFirstType(){ - loadFirstType = true; - var el5; - el5 = eleTree.render({ - elem: '.ele5', - url: flowableBasePath + "materialcategory009", - defaultExpandAll: true, - expandOnClickNode: false, - highlightCurrent: true - }); - $(".ele5").hide(); - $("#categoryId").on("click",function (e) { - e.stopPropagation(); - $(".ele5").toggle(); - }); - eleTree.on("nodeClick(data5)",function(d) { - $("#categoryId").val(d.data.currentData.name); - $("#categoryId").attr("categoryId", d.data.currentData.id); - $(".ele5").hide(); - }) - $(document).on("click",function() { - $(".ele5").hide(); - }) - } - form.on('submit(formSearch)', function (data) { if (winui.verifyForm(data.elem)) { refreshloadTable(); @@ -133,7 +101,6 @@ layui.config({ return { materialName: $("#materialName").val(), model: $("#model").val(), - categoryId: isNull($("#categoryId").val()) ? "" : $("#categoryId").attr("categoryId"), typeNum: $("#typeNum").val() }; } diff --git a/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js b/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js deleted file mode 100644 index 1d9db1d907dbb709f7607891785a7e88529ff21f..0000000000000000000000000000000000000000 --- a/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js +++ /dev/null @@ -1,60 +0,0 @@ -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'fsCommon', 'fsTree', 'element', 'textool'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - fsTree = layui.fsTree, - fsCommon = layui.fsCommon, - element = layui.element, - textool = layui.textool; - - var materialCategoryType; - - textool.init({eleId: 'remark', maxlength: 200}); - - fsTree.render({ - id: "materialCategoryType", - url: flowableBasePath + "materialcategory008", - checkEnable: true, - loadEnable: false,//异步加载 - chkStyle: "radio", - showLine: false, - showIcon: true, - expandSpeed: 'fast' - }, function(id){ - materialCategoryType = $.fn.zTree.getZTreeObj(id); - fuzzySearch(id, '#name', null, true); //初始化模糊搜索方法 - }); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var checkNodes = materialCategoryType.getCheckedNodes(true); - if(checkNodes.length == 0){ - winui.window.msg('请选择所属类型', {icon: 2, time: 2000}); - return false; - } - var params = { - name: $("#typeName").val(), - remark: $("#remark").val(), - parentId: checkNodes[0].id - }; - AjaxPostUtil.request({url: flowableBasePath + "writeMaterialCategoryMation", params: params, type: 'json', method: "POST", callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js b/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js deleted file mode 100644 index 8966fbf19a46fb8047a9ab5e03777463705c5c19..0000000000000000000000000000000000000000 --- a/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js +++ /dev/null @@ -1,49 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'textool'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - textool = layui.textool; - - showGrid({ - id: "showForm", - url: flowableBasePath + "materialcategory004", - params: {id: parent.rowId}, - pagination: false, - method: "GET", - template: $("#beanTemplate").html(), - ajaxSendAfter:function (json) { - - textool.init({eleId: 'remark', maxlength: 200}); - - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - id: parent.rowId, - name: $("#typeName").val(), - remark: $("#remark").val(), - parentId: json.bean.parentId - }; - AjaxPostUtil.request({url: flowableBasePath + "writeMaterialCategoryMation", params: params, type: 'json', method: "POST", callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - } - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js b/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js deleted file mode 100644 index 62f98ecfe4ba600cb2afb507d285934f397753a8..0000000000000000000000000000000000000000 --- a/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js +++ /dev/null @@ -1,131 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'tableTreeDj', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - tableTree = layui.tableTreeDj; - - authBtn('1568558491168'); - tableTree.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'materialcategory001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { field: 'name', title: '名称', align: 'left', width: 200 }, - { field: 'sort', title: systemLanguage["com.skyeye.serialNumber"][languageType], align: 'center', width: 80 }, - { field: 'remark', title: '备注', align: 'left', width: 200 }, - { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' } - ]], - done: function(json) { - matchingLanguage(); - initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入名称", function () { - tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); - }); - } - }, { - keyId: 'id', - keyPid: 'parentId', - title: 'name', - }); - - tableTree.getTable().on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'delet') { //删除 - delet(data); - } else if (layEvent === 'upMove') { //上移 - upMove(data); - } else if (layEvent === 'downMove') { //下移 - downMove(data); - } - }); - - // 添加 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/materialCategory/materialCategoryAdd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "materialCategoryAdd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - // 删除 - function delet(data) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "materialcategory003", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 编辑 - function edit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/materialCategory/materialCategoryEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "materialCategoryEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - } - }); - } - - // 上移 - function upMove(data) { - AjaxPostUtil.request({url: flowableBasePath + "materialcategory006", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - // 下移 - function downMove(data) { - AjaxPostUtil.request({url: flowableBasePath + "materialcategory007", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - form.render(); - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - tableTree.reload("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('materialCategoryList', {}); -}); diff --git a/erp/src/main/resources/template/js/storeHouseInventory/storeHouseInventoryList.js b/erp/src/main/resources/template/js/storeHouseInventory/storeHouseInventoryList.js index 16c0c5e8d53b130a0bf027a7463e1b078c45de68..864e5ee12430b1d72eb6d125a2c88fa29de7f005 100644 --- a/erp/src/main/resources/template/js/storeHouseInventory/storeHouseInventoryList.js +++ b/erp/src/main/resources/template/js/storeHouseInventory/storeHouseInventoryList.js @@ -10,13 +10,12 @@ layui.config({ version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'eleTree', 'soulTable'], function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'form', 'soulTable'], function (exports) { winui.renderColor(); var $ = layui.$, form = layui.form, table = layui.table, - soulTable = layui.soulTable, - eleTree = layui.eleTree; + soulTable = layui.soulTable; var selOption = getFileContent('tpl/template/select-option-must.tpl'); @@ -80,9 +79,6 @@ layui.config({ done: function(json) { matchingLanguage(); soulTable.render(this); - if(!loadFirstType){ - initFirstType(); - } } }); @@ -119,32 +115,6 @@ layui.config({ }); } - var loadFirstType = false; - //初始化商品类型 - function initFirstType(){ - loadFirstType = true; - var el5 = eleTree.render({ - elem: '.ele5', - url: flowableBasePath + "materialcategory009", - defaultExpandAll: true, - expandOnClickNode: false, - highlightCurrent: true - }); - $(".ele5").hide(); - $("#categoryId").on("click",function (e) { - e.stopPropagation(); - $(".ele5").toggle(); - }); - eleTree.on("nodeClick(data5)",function(d) { - $("#categoryId").val(d.data.currentData.name); - $("#categoryId").attr("categoryId", d.data.currentData.id); - $(".ele5").hide(); - }) - $(document).on("click",function() { - $(".ele5").hide(); - }) - } - form.render(); form.on('submit(formSearch)', function (data) { if (winui.verifyForm(data.elem)) { @@ -193,7 +163,6 @@ layui.config({ function getTableParams() { return { - categoryId: isNull($("#categoryId").val()) ? "" : $("#categoryId").attr("categoryId"), typeFrom: $("#typeFrom").val(), enabled: $("#enabled").val(), depotId: $("#depotId").val() diff --git a/erp/src/main/resources/template/tpl/material/materialInventoryWarningList.html b/erp/src/main/resources/template/tpl/material/materialInventoryWarningList.html index 13bd74e4f29589f8ad3694a56b33b3a701d53ed4..b7490b54c4fe26f37bdeeb513733b6e1e63c4399 100644 --- a/erp/src/main/resources/template/tpl/material/materialInventoryWarningList.html +++ b/erp/src/main/resources/template/tpl/material/materialInventoryWarningList.html @@ -28,11 +28,6 @@