提交 0c485fd3 编写于 作者: W WJ-202301081617\Wlos

feat:修改资产领用、归还、我的资产 中的bug

上级 51fcfc09
......@@ -45,7 +45,7 @@ layui.config({
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号,标题", function () {
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
......
......@@ -21,7 +21,7 @@
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">状态<i class="red">*</i></label>
<div class="layui-input-block">
<select id="state" name="state" lay-filter="state" lay-search="">
<select id="state" name="state" lay-filter="state" lay-search="" win-verify="required|state">
<option value="">请选择</option>
<option value="unUse">未使用</option>
<option value="unPut">未入库</option>
......
......@@ -17,33 +17,33 @@ layui.config({
// 根据仓库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, {
let data = json.bean;
// 仓库级别的值的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024071200008', data, {
savePreParams: function (params) {
params.parentId=data.parentId
params.depotId=data.depotId
},
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);
}
});
}});
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);
}
});
}});
});
\ No newline at end of file
......@@ -24,7 +24,7 @@ layui.config({
/********* tree 处理 start *************/
fsTree.render({
id: "treeDemo",
url: sysMainMation.erpBasePath + "queryDepotLevelById?id=" + id,
url: sysMainMation.erpBasePath + "queryDepotLevelByDepotId?depotId=" + id,
checkEnable: false,
showLine: false,
showIcon: true,
......@@ -50,16 +50,6 @@ layui.config({
loadTable();
}
//
// function loadTable(id) {
// AjaxPostUtil.request({url: admBasePath + "queryDepotLevelById", params: {id: id}, type: 'json', method: "GET", callback: function (json) {
// initLoadTable();
// }});
// };
function initLoadTable() {
table.render({
id: 'messageTable',
......@@ -103,14 +93,28 @@ layui.config({
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071200007', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
url: "../../tpl/turnIocatorManage/addWarehouseLevelValue.html?id=" + id,
title: "新增仓库级别的值",
pageId: "warehouseLevelValueAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
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");
// }});
});
// 编辑
......@@ -160,18 +164,15 @@ layui.config({
name: treeNode.name
};
$("#treeRight").html(getDataUseHandlebars($("#treeRightTemplate").html(), {bean: par}));
showRMenu('root', event.clientX, event.clientY);
// showRMenu(event.clientX, event.clientY);
showRMenu(folderId == 0 ? 'root' : '', event.clientX, event.clientY);
}
// 展示树节点右键菜单
function showRMenu(type, x, y) {
$("#treeRight .is-file").show();
if(type == 'root'){
$("#treeRight .add").hide();
$("#treeRight .edit").hide();
$("#treeRight .remove").hide();
if (type == 'root') {
$("#treeRight .treedeleteFolderAndChild").hide();
}
$("#treeRight").show();
$("#treeRight").css({top: y + "px", left: x + "px", visibility: "visible", position: "absolute"});
......@@ -222,15 +223,18 @@ layui.config({
// 树操作--新建
$("body").on("click", ".treecreateNewFolder", function (e) {
hideRMenu();
var parentId = $(this).attr("folderId");
// 打开一个新建布局
_openNewWindows({
url: "../../tpl/turnIocatorManage/addWarehouseLevel.html?id=" + id,
url: "../../tpl/turnIocatorManage/writeWarehouseLevel.html?depotId=" + id + "&parentId=" + parentId,
title: "新增仓库级别",
pageId: "addWarehouseLevel",
pageId: "writeWarehouseLevel",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
// 刷新节点
var nownode = ztree.getNodesByParam("id", "0", null);
ztree.reAsyncChildNodes(nownode[0], "refresh");
}});
});
......
......@@ -14,16 +14,26 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var id = GetUrlParam("id");
var parentId = GetUrlParam("parentId");
var depotId = GetUrlParam("depotId");
// 根据仓库id获取仓库级别信息
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryDepotLevelByDepotId", params: {depotId: id}, type: 'json', method: 'GET', callback: function (json) {
if (isNull(id)) {
dsFormUtil.initAddPageForStatic('content', 'FP2024071100005', {
savePreParams: function (params) {
params.parentId = isNull(parentId) ? '0' : parentId;
params.depotId = depotId;
}
});
} else {
// 根据仓库id获取仓库级别信息
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryDepotLevelByDepotId", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// 仓库级别的值的【编辑布局】
// 仓库级别的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024071100006', data, {
savePreParams: function (params) {
params.parentId = data.parentId
params.depotId = id
params.parentId = isNull(parentId) ? '0' : parentId;
params.depotId = depotId;
},
saveData: function (params) {
......@@ -41,5 +51,6 @@ layui.config({
}
});
}});
}
});
\ No newline at end of file
......@@ -21,7 +21,7 @@
<div style="width: 240px; float: left; height: 100%; overflow: auto; padding: 5px;">
<input type="text" id="name" name="name" placeholder="请输入要搜索的节点" class="layui-input" />
<ul id="treeDemo" class="ztree fsTree" method="get" isRoot="1"
treeIdKey="id" inputs="parentId" treePIdKey="pId" clickCallbackInputs="parentId:$id" treeName="name"></ul>
treeIdKey="id" inputs="parentId" treePIdKey="parentId" clickCallbackInputs="parentId:$id" treeName="name"></ul>
</div>
<div style="width: calc(100% - 250px); float: left;">
<div style="margin:auto 10px;">
......@@ -40,14 +40,14 @@
<script type="text/x-handlebars-template" id="treeRightTemplate">
{{#bean}}
<li class="is-file treedeleteFolderAndChild">
<li class="is-file treedeleteFolderAndChild" folderId="{{id}}">
<a href="javascript:;">
<img alt="" src="../../assets/images/icon/delete-icon.png" />
<span>删除</span>
</a>
</li>
<li class="divider"></li>
<li class="is-file treecreateNewFolder">
<li class="is-file treecreateNewFolder" folderId="{{id}}">
<a href="javascript:;">
<img alt="" src="../../assets/images/icon/create-folder-icon.png" />
<span>新建</span>
......
......@@ -23,7 +23,7 @@
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/turnIocatorManage/'}).use('addWarehouseLevel');
layui.config({base: '../../js/turnIocatorManage/'}).use('writeWarehouseLevel');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册