diff --git a/czl-web/js/common_methon.js b/czl-web/js/common_methon.js index 6496d73..528b740 100644 --- a/czl-web/js/common_methon.js +++ b/czl-web/js/common_methon.js @@ -489,6 +489,86 @@ function layerOpenFormForSencond(title, contentUrl) { }); } +function layerOpenFormForSencondSeventyFive(title, contentUrl) { + var index = layer.open({ + title: [title, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], + type: 2, + content: contentUrl, + area: ['75%', '75%'], + maxmin: false, + btn: ['确定'], + success: function (layero, index) { + }, + yes: function (index, layero) { + //提交子页面时执行 + // 获取弹出层中的form表单元素 + var formSubmit = layer.getChildFrame('form', index); + // 查找class样式为submitBtn的按钮 + let submited = formSubmit.find('button.subBtn'); + // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息 + submited.click(); + } + ,end:function (){ + reloadTable(contentUrl, title, index) + } + , cancel: function (index, layero) { + var t = changeProTeam(contentUrl, title, index); + if (!t) { + return false; + } + var tf = changSubTeam(contentUrl, title, index); + if (!tf) { + return false; + } + var tff = changOwnTeam(contentUrl, title, index); + if (!tff) { + return false; + } + return true; + } + }); +} + +function layerOpenFormForSencondThirty(title, contentUrl) { + var index = layer.open({ + title: [title, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], + type: 2, + content: contentUrl, + area: ['30%', '30%'], + maxmin: false, + btn: ['确定'], + success: function (layero, index) { + }, + yes: function (index, layero) { + //提交子页面时执行 + // 获取弹出层中的form表单元素 + var formSubmit = layer.getChildFrame('form', index); + // 查找class样式为submitBtn的按钮 + let submited = formSubmit.find('button.subBtn'); + // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息 + submited.click(); + } + ,end:function (){ + reloadTable(contentUrl, title, index) + } + , cancel: function (index, layero) { + var t = changeProTeam(contentUrl, title, index); + if (!t) { + return false; + } + var tf = changSubTeam(contentUrl, title, index); + if (!tf) { + return false; + } + var tff = changOwnTeam(contentUrl, title, index); + if (!tff) { + return false; + } + return true; + } + }); +} + function toLeadInto(title, contentUrl) { var index = layer.open({ title: [title, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], diff --git a/czl-web/js/corporateOrg/CorporateGovernance.js b/czl-web/js/corporateOrg/CorporateGovernance.js index 967f412..ba2a4c3 100644 --- a/czl-web/js/corporateOrg/CorporateGovernance.js +++ b/czl-web/js/corporateOrg/CorporateGovernance.js @@ -128,7 +128,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { */ function openForm(id, title) { localStorage.setItem("id", id); - layerOpenForm(title, "./addGovernanceFrom.html", "97.5%", "97.5%") + layerOpenForm(title, "./addGovernanceFrom.html", "75%", "75%") } /** diff --git a/czl-web/js/corporateOrg/ProjectDepartment.js b/czl-web/js/corporateOrg/ProjectDepartment.js index 668c070..23ae879 100644 --- a/czl-web/js/corporateOrg/ProjectDepartment.js +++ b/czl-web/js/corporateOrg/ProjectDepartment.js @@ -152,7 +152,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { */ function openForm(id,title){ localStorage.setItem("id",id); - layerOpenForm(title,"./addProjectFrom.html","97.5%","97.5%") + layerOpenForm(title,"./addProjectFrom.html","75%","75%") } /** diff --git a/czl-web/js/corporateOrg/branch.js b/czl-web/js/corporateOrg/branch.js index 4388f8d..9f743f3 100644 --- a/czl-web/js/corporateOrg/branch.js +++ b/czl-web/js/corporateOrg/branch.js @@ -139,7 +139,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { */ function openForm(id,title){ localStorage.setItem("id",id); - layerOpenForm(title,"./addBranchFrom.html","97.5%","97.5%") + layerOpenForm(title,"./addBranchFrom.html","75%","75%") } /** diff --git a/czl-web/js/machineTool/MachineToolLibrary.js b/czl-web/js/machineTool/MachineToolLibrary.js index 3869a95..daa8314 100644 --- a/czl-web/js/machineTool/MachineToolLibrary.js +++ b/czl-web/js/machineTool/MachineToolLibrary.js @@ -53,7 +53,7 @@ $("#searchBt").click(function(){ }) $("#addBt").click(function(){ localStorage.setItem("id","") - layerOpenFormForSencond("新增","./MachineToolForm.html"); + layerOpenFormForSencondSeventyFive("新增","./MachineToolForm.html"); }) $("#exportBt").click(function(){ keyWord = $("#keyWord").val(); @@ -159,7 +159,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { } if (layEvent === 'update') { localStorage.setItem('id',data.id); - layerOpenFormForSencond("修改","./MachineToolForm.html"); + layerOpenFormForSencondSeventyFive("修改","./MachineToolForm.html"); } if (layEvent === 'del') { layer.confirm('确定要删除吗?', { diff --git a/czl-web/js/personnelPool/branchStaffList.js b/czl-web/js/personnelPool/branchStaffList.js index 97b91df..f1fefd3 100644 --- a/czl-web/js/personnelPool/branchStaffList.js +++ b/czl-web/js/personnelPool/branchStaffList.js @@ -46,7 +46,7 @@ $("#addBt").click(function(){ localStorage.setItem('sex',""); localStorage.setItem('certificate',""); localStorage.setItem('level',""); - layerOpenFormForSencond("新增","./branchStaffForm.html"); + layerOpenFormForSencondSeventyFive("新增","./branchStaffForm.html"); }) $("#exportBt").click(function(){ keyWord = $("#keyWord").val(); @@ -215,7 +215,7 @@ layui.use(['table', 'form','notice', 'layNotify','element','upload'], function ( localStorage.setItem("certificate",data.certificate) localStorage.setItem("level",data.level) localStorage.setItem("nation",data.nation) - layerOpenFormForSencond("修改","./branchStaffForm.html"); + layerOpenFormForSencondSeventyFive("修改","./branchStaffForm.html"); }else if (layEvent === 'del') { layer.confirm('确定要删除吗?', { btn : [ '确定', '取消' ] diff --git a/czl-web/js/project/rnProjectBind.js b/czl-web/js/project/rnProjectBind.js index a70c4a7..d78c390 100644 --- a/czl-web/js/project/rnProjectBind.js +++ b/czl-web/js/project/rnProjectBind.js @@ -188,7 +188,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { } if (layEvent === 'match') { localStorage.setItem('id',data.id); - layerOpenFormForSencond("匹配","./RnProjectBindForm.html"); + layerOpenFormForSencondSeventyFive("匹配","./RnProjectBindForm.html"); } }); diff --git a/czl-web/js/project/towerProjectList.js b/czl-web/js/project/towerProjectList.js index 688b4b8..538993d 100644 --- a/czl-web/js/project/towerProjectList.js +++ b/czl-web/js/project/towerProjectList.js @@ -55,7 +55,7 @@ $("#searchBt").click(function(){ }) $("#addBt").click(function(){ localStorage.setItem("id","") - layerOpenFormForSencond("新增","./towerProjectForm.html"); + layerOpenFormForSencondSeventyFive("新增","./towerProjectForm.html"); }) $("#del").click(function(){ var checkStatus = table.checkStatus('menuTable'); @@ -157,7 +157,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { var layEvent = obj.event; //当前点击的事件名 if (layEvent === 'update') { localStorage.setItem('id',data.id); - layerOpenFormForSencond("修改","./towerProjectForm.html"); + layerOpenFormForSencondSeventyFive("修改","./towerProjectForm.html"); } if (layEvent === 'del') { layer.confirm('确定要删除吗?', { diff --git a/czl-web/js/roleList/roleList.js b/czl-web/js/roleList/roleList.js index be7a85e..6b26ef6 100644 --- a/czl-web/js/roleList/roleList.js +++ b/czl-web/js/roleList/roleList.js @@ -1,8 +1,9 @@ var oldKeyWord; +var table,laydate,form; layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { - var table = layui.table; - var laydate = layui.laydate; - let form = layui.form; + table = layui.table; + laydate = layui.laydate; + form = layui.form; //渲染table table.render({ elem: '#demo' @@ -113,7 +114,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { function openForm(id,title){ localStorage.setItem("id",id); console.log(id); - layerOpenForms(title,"./addRole.html","60%","80%") + layerOpenForms(title,"./addRole.html","97.5%","97.5%") } /** @@ -126,4 +127,24 @@ function delHospital(id) { ajaxCommonMethods('/roles/delById',{'id': id},"删除成功","删除失败","1"); layer.close(1); }); -} \ No newline at end of file +} + + + +$("#searchBt").click(function () { + oldKeyWord = $("#keyWord").val(); + table.reload('menuTable', { + url: czl_ht_url + '/roles/getMsgContent' + , method: 'post' //方式默认是get + , page: true + , where: { + keyWord: oldKeyWord, + } //设定异步数据接口的额外参数 + }); + /**二次赋值-- 点击搜索按钮之后会进行一次刷新操作*/ + $("#keyWord").val(oldKeyWord); +}); + +$("#addBtn").click(function () { + openForm("",'新增角色'); +}); diff --git a/czl-web/js/subTeamResource/SubcontractaList.js b/czl-web/js/subTeamResource/SubcontractaList.js index 13aa46c..95c07e8 100644 --- a/czl-web/js/subTeamResource/SubcontractaList.js +++ b/czl-web/js/subTeamResource/SubcontractaList.js @@ -40,7 +40,7 @@ $("#searchBt").click(function(){ }) $("#addBt").click(function(){ localStorage.setItem("id","") - layerOpenFormForSencond("新增","./SubcontractaFrom.html"); + layerOpenFormForSencondSeventyFive("新增","./SubcontractaFrom.html"); }) $("#exportBt").click(function(){ keyWord = $("#keyWord").val(); @@ -133,7 +133,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { localStorage.setItem('shortName',data.shortName); localStorage.setItem('legalRepre',data.legalRepre); localStorage.setItem('businessAddress',data.businessAddress); - layerOpenFormForSencond("修改","./SubcontractaFrom.html"); + layerOpenFormForSencondSeventyFive("修改","./SubcontractaFrom.html"); } if (layEvent === 'del') { layer.confirm('确定要删除吗?', { diff --git a/czl-web/js/teamset/ownTeamSetList.js b/czl-web/js/teamset/ownTeamSetList.js index 37ced62..dfd2920 100644 --- a/czl-web/js/teamset/ownTeamSetList.js +++ b/czl-web/js/teamset/ownTeamSetList.js @@ -16,7 +16,7 @@ $("#addBt").click(function(){ type: 2, title: '新增', content: 'ownTeamOpen.html', - area: ['97.5%', '97.5%'], + area: ['75%', '75%'], maxmin: false, closeBtn: true, btn: ['确定', '取消'], @@ -156,7 +156,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { type: 2, title: '修改', content: './ownTeamModify.html', - area: ['97.5%', '97.5%'], + area: ['75%', '75%'], maxmin: false, closeBtn: true, btn: ['确定', '取消'], diff --git a/czl-web/js/teamset/subTeamSetList.js b/czl-web/js/teamset/subTeamSetList.js index 45992a6..e18c4a8 100644 --- a/czl-web/js/teamset/subTeamSetList.js +++ b/czl-web/js/teamset/subTeamSetList.js @@ -16,7 +16,7 @@ $("#addBt").click(function(){ type: 2, title: '新增', content: 'subTeamOpen.html', - area: ['97.5%', '97.5%'], + area: ['75%', '75%'], maxmin: false, closeBtn: true, btn: ['确定', '取消'], @@ -156,7 +156,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { type: 2, title: '修改', content: './subTeamModify.html', - area: ['97.5%', '97.5%'], + area: ['75%', '75%'], maxmin: false, closeBtn: true, btn: ['确定', '取消'], diff --git a/czl-web/js/teamset/untiTeamSetList.js b/czl-web/js/teamset/untiTeamSetList.js index 11dc946..59a52eb 100644 --- a/czl-web/js/teamset/untiTeamSetList.js +++ b/czl-web/js/teamset/untiTeamSetList.js @@ -16,7 +16,7 @@ $("#addBt").click(function(){ type: 2, title: '新增', content: 'untiTeamOpen.html', - area: ['97.5%', '97.5%'], + area: ['75%', '75%'], maxmin: false, closeBtn: true, btn: ['确定', '取消'], @@ -154,7 +154,7 @@ layui.use(['table', 'form','notice', 'layNotify'], function () { type: 2, title: '修改', content: './untiTeamModify.html', - area: ['97.5%', '97.5%'], + area: ['75%', '75%'], maxmin: false, closeBtn: true, btn: ['确定', '取消'], diff --git a/czl-web/js/work/user/UserManagementList.js b/czl-web/js/work/user/UserManagementList.js index 0b9ee75..a9d1019 100644 --- a/czl-web/js/work/user/UserManagementList.js +++ b/czl-web/js/work/user/UserManagementList.js @@ -1,10 +1,11 @@ var oldKeyWord; var oldDepartment; var oldDepartmentId; +var table,laydate,form; layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { - var table = layui.table; - var laydate = layui.laydate; - let form = layui.form; + table = layui.table; + laydate = layui.laydate; + form = layui.form; //渲染table table.render({ elem: '#demo' @@ -168,7 +169,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () { function openForm(id,title){ localStorage.setItem("id",id); localStorage.setItem("inType","personAdd") - layerOpenForm(title,"./addUserForm.html","70%","85%") + layerOpenForm(title,"./addUserForm.html","75%","75%") } @@ -286,4 +287,53 @@ function clickRole(e, treeId, treeNode) { } // } } -/**树的方法结束*/ \ No newline at end of file +/**树的方法结束*/ + + +$("#searchBt").click(function () { + oldKeyWord = $("#keyWord").val(); + oldDepartment = $("#department").val(); + oldDepartmentId = $("#departmentId").val(); + table.reload('menuTable', { + url: czl_ht_url + '/users/getMsgContent' + , method: 'post' //方式默认是get + , page: true + , where: { + keyWord: oldKeyWord, + department: oldDepartment, + departmentId: oldDepartmentId + } //设定异步数据接口的额外参数 + }); + /**二次赋值-- 点击搜索按钮之后会进行一次刷新操作*/ + loadOrgTree(); + $("#keyWord").val(oldKeyWord); + $("#department").val(oldDepartment); + $("#departmentId").val(oldDepartmentId); + loadOrgTree(); +}); + +$("#resetBt").click(function () { + oldKeyWord = ""; + oldDepartment = "点击进行部门选择"; + oldDepartmentId = ""; + $("#keyWord").val(""); + $("#department").val("点击进行部门选择"); + $("#departmentId").val(""); + table.reload('menuTable', { + url: czl_ht_url + '/users/getMsgContent' + , method: 'post' //方式默认是get + , page: true + , where: { + username: "", + idCard: "", + keyWord: "", + department: "", + departmentId: "" + } //设定异步数据接口的额外参数 + }); + loadOrgTree(); +}); + +$("#addBtn").click(function () { + openForm("",'新增用户'); +}); diff --git a/czl-web/layui-v2.8.18/layui/css/layui.css b/czl-web/layui-v2.8.18/layui/css/layui.css index f782f38..dc01bf4 100644 --- a/czl-web/layui-v2.8.18/layui/css/layui.css +++ b/czl-web/layui-v2.8.18/layui/css/layui.css @@ -8033,7 +8033,7 @@ html #layuicss-layer { .layui-layer-btn .layui-layer-btn0 { border-color: transparent; - background-color: #1e9fff; + background-color: #1ABBAB; color: #fff } @@ -8625,4 +8625,4 @@ html #layuicss-layer { } /* Firefox 浏览器 */ -/* 注意:Firefox 目前还不支持自定义滚动条样式 */ \ No newline at end of file +/* 注意:Firefox 目前还不支持自定义滚动条样式 */ diff --git a/czl-web/pages/announcement/AnnouncementForm.html b/czl-web/pages/announcement/AnnouncementForm.html index b502345..0e6981b 100644 --- a/czl-web/pages/announcement/AnnouncementForm.html +++ b/czl-web/pages/announcement/AnnouncementForm.html @@ -85,7 +85,7 @@ }
-