diff --git a/admin-assistant/src/main/resources/template/js/assetReportManage/assetReportUnUseChoose.js b/admin-assistant/src/main/resources/template/js/assetReportManage/assetReportUnUseChoose.js index a7fc472c561b12fd3d07a3dd0508f0628c63563f..9342886cedef1de6763a249a9662902bc375e3f6 100644 --- a/admin-assistant/src/main/resources/template/js/assetReportManage/assetReportUnUseChoose.js +++ b/admin-assistant/src/main/resources/template/js/assetReportManage/assetReportUnUseChoose.js @@ -51,6 +51,7 @@ layui.config({ { field: 'name', title: '资产名称', width: 120, templet: function(d) { return getNotUndefinedVal(d.assetMation?.name); }}, + { field: 'assetNum', title: '资产编号', width: 200 }, { field: 'specifications', title: '资产规格', width: 120, templet: function(d) { return getNotUndefinedVal(d.assetMation?.specifications); }}, @@ -60,7 +61,6 @@ layui.config({ { field: 'typeId', title: '资产类型', width: 120, templet: function(d) { return sysDictDataUtil.getDictDataNameByCodeAndKey("ADM_ASSET_TYPE", d.assetMation?.typeId); }}, - { field: 'assetNum', title: '资产编号', width: 160 }, { field: 'storageArea', title: '存放区域', width: 200 }, { field: 'assetAdminMation', title: '管理员', width: 120, templet: function(d) { return getNotUndefinedVal(d.assetAdminMation?.name); @@ -69,7 +69,7 @@ layui.config({ done: function(res) { matchingLanguage(); - initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入资产名称,资产编号", function () { + initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入资产编号", function () { table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); }); if (assetReportCheckType) { diff --git a/erp/src/main/resources/template/js/depotOut/list.js b/erp/src/main/resources/template/js/depotOut/list.js index fe64601a00a874d7d6b3e8b2c57a043f23ddfc0a..27919c52ca7966a5657e28c989a8898b1650a1d5 100644 --- a/erp/src/main/resources/template/js/depotOut/list.js +++ b/erp/src/main/resources/template/js/depotOut/list.js @@ -41,8 +41,8 @@ layui.config({ { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name'); }}, - { field: 'otherState', title: '出库状态', width: 90, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotOutState", 'id', d.otherState, 'name'); + { field: 'otherState', title: '确认状态', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotOutOtherState", 'id', d.otherState, 'name'); }}, { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} ]], diff --git a/erp/src/main/resources/template/js/turnIocatorManage/addWarehouseLevelValue.js b/erp/src/main/resources/template/js/turnIocatorManage/addWarehouseLevelValue.js index 48fd3bc1568c4ab6929038e2478dd6b052aeb0ea..54eea7dce893c5afbb088d395d6898c311d908ad 100644 --- a/erp/src/main/resources/template/js/turnIocatorManage/addWarehouseLevelValue.js +++ b/erp/src/main/resources/template/js/turnIocatorManage/addWarehouseLevelValue.js @@ -1,6 +1,7 @@ // 以下两个参数开启团队权限时有值 var objectId = '', objectKey = ''; +var objectParams = {}; // 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 var serviceClassName; @@ -11,39 +12,34 @@ layui.config({ window: 'js/winui.window' }).define(['window', 'table', 'jquery'], function (exports) { winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; var id = GetUrlParam("id"); + var depotId = GetUrlParam("depotId"); + var parentId = GetUrlParam("parentId"); - // 根据仓库id获取仓库级别信息 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryDepotLevelValById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { - let data = json.bean; - // 仓库级别的值的【编辑布局】 - dsFormUtil.initEditPageForStatic('content', 'FP2024071200008', data, { - + if (isNull(id)) { + dsFormUtil.initAddPageForStatic('content', 'FP2024071200007', { savePreParams: function (params) { - params.parentId=data.parentId - params.depotId=data.depotId - }, - - saveData: function (params) { - // 保存数据 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "writeDepotLevelVal", params: params, type: 'json', method: "POST", callback: function(json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - }, - // loadComponentCallback: function () { - // // $("div[controlType='assetPurchasePutFromType']").remove(); - // }, - tableAddRowCallback: function (tableId) { - $("#addRow" + tableId).remove(); - // $("div[controlType='simpleTable']").find(".assetId").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".fromId").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".chooseAssetBtn").prop('disabled', true); + params.depotId = depotId; + params.parentId = parentId; + } + }); + }else{ + AjaxPostUtil.request({ + url: sysMainMation.erpBasePath + "queryDepotLevelValById", + params: {id: id}, + type: 'json', + method: 'GET', + callback: function (json) { + let data = json.bean; + dsFormUtil.initEditPageForStatic('content', 'FP2024071200008', data, { + savePreParams: function (params) { + params.parentId = parentId; + params.depotId = depotId; + } + }); } }); - }}); + } }); \ No newline at end of file diff --git a/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js b/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js new file mode 100644 index 0000000000000000000000000000000000000000..a8c3f61d7bc0821dde43852d58d52661eb74cf85 --- /dev/null +++ b/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js @@ -0,0 +1,48 @@ + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'form', 'textool'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + textool = layui.textool, + form = layui.form; + var parentId = getNotUndefinedVal(GetUrlParam("parentId")); + var depotId = getNotUndefinedVal(GetUrlParam("depotId")); + + skyeyeClassEnumUtil.showEnumDataListByClassName("generateDepotLevelValType", 'radio', "type", '', form); + + textool.init({ + eleId: 'barCode', + tools: ['copy', 'reset', 'clear'] + }); + + matchingLanguage(); + form.render(); + form.on('submit(getBean)', function (data) { + if (winui.verifyForm(data.elem)) { + let params = { + parentId: parentId, + depotId: depotId, + // type: $("#type").val(), + type: $("#type input:radio:checked").val(), + number:$("#number").val(), + } + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "batchGenerateDepotLevelVal", 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); + }); +}); + + + diff --git a/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js b/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js index cf7c2add33033b9c0c0395aa7c06a19388621b88..0f4dfe1b96c7d3d22aebbdd1061c13f208206e77 100644 --- a/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js +++ b/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js @@ -1,10 +1,8 @@ - var rowId = ""; var parentNode = null; - layui.config({ base: basePath, version: skyeyeVersion @@ -15,12 +13,12 @@ layui.config({ var $ = layui.$, fsTree = layui.fsTree, form = layui.form, - // table = layui.table; tableTree = layui.tableTreeDj; var ztree; var id = GetUrlParam("id"); - var objectKey = GetUrlParam("objectKey") - var objectId = GetUrlParam("objectId") + var parentId = GetUrlParam("parentId"); + var depotId = GetUrlParam("id"); + var depotLevelId = GetUrlParam("depotLevelId"); // 下拉按钮 var dropdown = new Dropdown(); @@ -49,9 +47,9 @@ layui.config({ //异步加载的方法 function onClickTree(event, treeId, treeNode) { if(treeNode == undefined) { - dictTypeId = ""; + depotLevelId = ""; } else { - dictTypeId = treeNode.id; + depotLevelId = treeNode.id; } loadTable(); } @@ -68,44 +66,51 @@ layui.config({ limits: getLimits(), limit: getLimit(), cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, - { field: 'number', title: '编号', rowspan: '2', align: 'left', width: 350 }, - { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', align: 'left', width: 120 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 }, - { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 }, - { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150 }, + {field: 'number', title: '编号', rowspan: '2', align: 'left', width: 200}, + { field: 'name', title: '级别', width: 200, templet: function (d) { + return getNotUndefinedVal(d.depotLevelMation?.name); + }}, + {field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType],rowspan: '2', align: 'left', width: 120}, + {field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150}, + {field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120}, + {field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150}, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 350, toolbar: '#tableBar' } ]], - done: function(json) { + done: function (json) { matchingLanguage(); initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入编号", function () { tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); }); } - } - // , { - // keyId: 'id', - // keyPid: 'parentId', - // title: 'dictName', - // } - ); - - tableTree.getTable().on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'details'){ //详情 - details(data); - } else if (layEvent === 'del') { //删除 - del(data); - } + }, { + keyId: 'id', + keyPid: 'parentId', + title: 'number', + showCache: "turnIocatorManageStatus" }); } + tableTree.getTable().on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'edit') { //编辑 + edit(data); + } else if (layEvent === 'batchAddChildNodes') { //批量新增子节点 + batchAddChildNodes(data); + } else if (layEvent === 'del') { //删除 + del(data); + } else if(layEvent ==='add') { //新增子节点 + parentId = data.id; + addChildNodes(data) + } + }); + // 添加 $("body").on("click", "#addBean", function() { + parentId = 0; _openNewWindows({ - url: "../../tpl/turnIocatorManage/addWarehouseLevelValue.html?id=" + id, + url: "../../tpl/turnIocatorManage/addWarehouseLevelValue.html?depotId=" + id + + "&parentId=" + parentId, title: "新增仓库级别的值", pageId: "warehouseLevelValueAdd", area: ['90vw', '90vh'], @@ -113,27 +118,15 @@ layui.config({ winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadTable(); }}); - - - - // _openNewWindows({ - // url: "../../tpl/turnIocatorManage/writeWarehouseLevel.html?id=" + id, - // title: "新增仓库级别", - // pageId: "addWarehouseLevel", - // area: ['90vw', '90vh'], - // callBack: function (refreshCode) { - // winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - // // 刷新节点 - // var nownode = ztree.getNodesByParam("id", "0", null); - // ztree.reAsyncChildNodes(nownode[0], "refresh"); - // }}); }); // 编辑 function edit(data) { + console.log('11',data) _openNewWindows({ - url: systemCommonUtil.getUrl('FP2024071200008&id=' + data.id, null), - title: systemLanguage["com.skyeye.editPageTitle"][languageType], + url: "../../tpl/turnIocatorManage/addWarehouseLevelValue.html?id=" + data.id + + "&parentId=" + data.parentId +"&depotId=" + data.depotId, + title: "编辑仓库级别的值", pageId: "warehouseLevelValueEdit", area: ['90vw', '90vh'], callBack: function (refreshCode) { @@ -142,18 +135,6 @@ layui.config({ }}); } - // 详情 - function details(data) { - _openNewWindows({ - url: systemCommonUtil.getUrl('FP2024071200009&id=' + data.id, null), - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "warehouseLevelValueDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - // 删除 function del(data) { layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { @@ -165,6 +146,47 @@ layui.config({ }); } + function addChildNodes(data){ + _openNewWindows({ + url: "../../tpl/turnIocatorManage/addWarehouseLevelValue.html?depotId=" + data.depotId + + "&parentId=" + data.id, + title: "新增子节点仓库级别的值", + pageId: "warehouseLevelValueAdd", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + //批量新增子节点 + function batchAddChildNodes(data){ + _openNewWindows({ + url: "../../tpl/turnIocatorManage/batchAdd.html?depotId=" + data.depotId + "&parentId=" + data.id, + title: '批量新增', + pageId: "warehouseLevelValueBatchAdd", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + + // 批量新增 + $("body").on("click", "#batchAdd", function() { + parentId = 0 + _openNewWindows({ + url: "../../tpl/turnIocatorManage/batchAdd.html?depotId=" + depotId + "&parentId=" + parentId, + title: '批量新增', + pageId: "warehouseLevelValueBatchAdd", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + }); + // 树节点右键 function onRightClick(event, treeId, treeNode) { @@ -207,6 +229,7 @@ layui.config({ function chooseNodeSelect(nodeId){ var selNode = ztree.getNodeByParam("id", nodeId, null); ztree.selectNode(selNode); + depotLevelId = nodeId; } // 树操作--文件夹或者文件删除 @@ -228,7 +251,6 @@ layui.config({ // 重置folderid folderId = selNode.getParentNode().id; ztree.removeNode(selNode);// 移除节点 - // showListById();// 获取文件夹和笔记列表 }}); } @@ -250,18 +272,21 @@ layui.config({ }}); }); - form.render(); $("body").on("click", "#reloadTable", function() { loadTable(); }); function loadTable() { - table.reload("messageTable", {where: getTableParams()}); + tableTree.reload("messageTable", {where: getTableParams()}); } function getTableParams() { - return $.extend(true, {objectKey:objectKey,objectId:objectId}, initTableSearchUtil.getSearchValue("messageTable")); + var params = { + objectId: depotId, + holderId: isNull(depotLevelId) || depotLevelId == 0 ? "" : depotLevelId + }; + return $.extend(true, params, initTableSearchUtil.getSearchValue("messageTable")); } exports('turnIocatorManage', {}); diff --git a/erp/src/main/resources/template/js/turnIocatorManage/writeWarehouseLevel.js b/erp/src/main/resources/template/js/turnIocatorManage/writeWarehouseLevel.js index f68d1ad239bc795529111d55fe517426373d9ad7..23aaf5874b5a647c77ca193218f44f497426287d 100644 --- a/erp/src/main/resources/template/js/turnIocatorManage/writeWarehouseLevel.js +++ b/erp/src/main/resources/template/js/turnIocatorManage/writeWarehouseLevel.js @@ -43,9 +43,6 @@ layui.config({ parent.refreshCode = '0'; }}); }, - // loadComponentCallback: function () { - // // $("div[controlType='assetPurchasePutFromType']").remove(); - // }, tableAddRowCallback: function (tableId) { $("#addRow" + tableId).remove(); } diff --git a/erp/src/main/resources/template/tpl/turnIocatorManage/addWarehouseLevelValue.html b/erp/src/main/resources/template/tpl/turnIocatorManage/addWarehouseLevelValue.html index 1a44d29dfea7cc3c422cf0ac37397ea9362c54e7..e6fce5d7d2f6ed8d58578d3a9de10360fc1076a3 100644 --- a/erp/src/main/resources/template/tpl/turnIocatorManage/addWarehouseLevelValue.html +++ b/erp/src/main/resources/template/tpl/turnIocatorManage/addWarehouseLevelValue.html @@ -13,7 +13,6 @@
-
@@ -23,7 +22,7 @@ \ No newline at end of file diff --git a/erp/src/main/resources/template/tpl/turnIocatorManage/batchAdd.html b/erp/src/main/resources/template/tpl/turnIocatorManage/batchAdd.html new file mode 100644 index 0000000000000000000000000000000000000000..739c7c756a5448ca188c249f6c6fbf1d6d8d1565 --- /dev/null +++ b/erp/src/main/resources/template/tpl/turnIocatorManage/batchAdd.html @@ -0,0 +1,42 @@ + + + + + + + + +
+
+
+ 基本信息
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+
+ + +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/erp/src/main/resources/template/tpl/turnIocatorManage/turnIocatorManage.html b/erp/src/main/resources/template/tpl/turnIocatorManage/turnIocatorManage.html index c76af3a2e11ed5228dae4165ddadd12c5a2b4c18..e48db0d90505bb1d26a30c18aae83e1483a75035 100644 --- a/erp/src/main/resources/template/tpl/turnIocatorManage/turnIocatorManage.html +++ b/erp/src/main/resources/template/tpl/turnIocatorManage/turnIocatorManage.html @@ -14,6 +14,7 @@
+
@@ -31,6 +32,8 @@ diff --git a/erp/src/main/resources/template/tpl/turnIocatorManage/writeWarehouseLevel.html b/erp/src/main/resources/template/tpl/turnIocatorManage/writeWarehouseLevel.html index b5b74a98017de5f349b751791f917921b3c5782e..6296b9dfe5396795d141faa263a37b44373a1ffe 100644 --- a/erp/src/main/resources/template/tpl/turnIocatorManage/writeWarehouseLevel.html +++ b/erp/src/main/resources/template/tpl/turnIocatorManage/writeWarehouseLevel.html @@ -13,7 +13,6 @@
-
diff --git a/web/src/main/resources/template/json/skyeyeClassEnum.json b/web/src/main/resources/template/json/skyeyeClassEnum.json index 70ddfaf6961ac8b091dd001799a7adec1fc4e71a..6ca84485dfcecd3e2ab016dd59053106854dfc0a 100644 --- a/web/src/main/resources/template/json/skyeyeClassEnum.json +++ b/web/src/main/resources/template/json/skyeyeClassEnum.json @@ -87,6 +87,7 @@ "depotOutState": {"name": "仓库出库单出库状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotOutState"}, "depotPutFromType": {"name": "仓库入库单来源单据类型", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotPutFromType"}, "depotPutState": {"name": "仓库入库单入库状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotPutState"}, + "generateDepotLevelValType": {"name": "ERP-批量生成仓库级别的值的类型", "className": "skyeye-erp#com.skyeye.depot.classenum.GenerateDepotLevelValType"}, "productionChildFromType": {"name": "生产计划单子单据生产类型", "className": "skyeye-erp#com.skyeye.production.classenum.ProductionChildType"}, "skyeyeView": {"name": "视图类型", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},