| | |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | boolean signUserId = false; |
| | | boolean signDeptId = false; |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().equals("dept_id")){ |
| | | signDeptId = true; |
| | | } |
| | | } |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else if (entry.getKey().equals("dept_id")){ |
| | | if (!val.equals("19")){ |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } else if (entry.getKey().equals("user_id") && !signDeptId){ |
| | | signUserId = true; |
| | | wrapper.eq(entry.getKey(), val); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | //创建人员 |
| | | priQuoteBudget.setUserId(getUserId()); |
| | | priQuoteBudget.setDeptId(getDeptId()); |
| | | //更新人员 |
| | | priQuoteBudget.setUpdateUserId(getUserId()); |
| | | //更新时间 |
| | |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | boolean signUserId = false; |
| | | boolean signDeptId = false; |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().equals("dept_id")){ |
| | | signDeptId = true; |
| | | } |
| | | } |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else if (entry.getKey().equals("dept_id")){ |
| | | if (!val.equals("19")){ |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } else if (entry.getKey().equals("user_id") && !signDeptId){ |
| | | signUserId = true; |
| | | wrapper.eq(entry.getKey(), val); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | |
| | |
| | | priSales.setUpdateUserId(getUserId()); |
| | | //更新时间 |
| | | priSales.setUpdateTime(new Date()); |
| | | priSales.setDeptId(getDeptId()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priSales.getItemId()); |
| | |
| | | @TableField("member_id") |
| | | private Long memberId; |
| | | |
| | | @ApiModelProperty(value= "创建部门") |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | |
| | | public PriQuoteBudget() {} |
| | | |
| | | public PriQuoteBudget(String title,String sheetData,Date createTime,String filepath) { |
| | |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value= "创建部门") |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | |
| | | @ApiModelProperty(value= "更新人员") |
| | | @TableField("update_user_id") |
| | | private Long updateUserId; |
| | |
| | | <result column="title" property="title" /> |
| | | <result column="sheet_data" property="sheetData" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | <result column="title" property="title" /> |
| | | <result column="sheet_data" property="sheetData" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | var tree = layui.tree; |
| | | var dropdown = layui.dropdown; |
| | | |
| | | $('#organization').html(localStorage.getItem('nickname') + ' <i class="layui-icon"></i>'); |
| | | |
| | | // 部门人员 筛选 |
| | | dropdown.render({ |
| | | elem: '#organization' |
| | | ,content: ['<div id="organizationTree" style="height: calc(100vh - 525px);border: none"></div>'].join('') |
| | | ,style: 'width: 370px; height: 350px; padding: 0 15px; box-shadow: 1px 1px 30px rgb(0 0 0 / 12%);' |
| | | ,ready: function(){ |
| | | loadTree(); |
| | | } |
| | | }); |
| | | |
| | | // 树形图 |
| | | var organizationTree; |
| | | window.loadTree = function(condition){ |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/dept/user/tree/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | 'condition': condition |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | organizationTree = tree.render({ |
| | | elem: '#organizationTree', |
| | | id: 'organizationTree', |
| | | onlyIconControl: true, |
| | | data: res.data, |
| | | click: function (obj) { |
| | | treeCond = { |
| | | key: obj.data.key, |
| | | val: obj.data.id |
| | | } |
| | | $('#organization').html(obj.data.title + ' <i class="layui-icon"></i>'); |
| | | $('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click'); |
| | | $(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click'); |
| | | clearFormVal($('#search-box')); |
| | | tableIns.reload({ |
| | | where: {[obj.data.key]: obj.data.id}, |
| | | page: {curr: 1} |
| | | }); |
| | | } |
| | | }); |
| | | treeData = res.data; |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | var tree = layui.tree; |
| | | var dropdown = layui.dropdown; |
| | | |
| | | $('#organization').html(localStorage.getItem('nickname') + ' <i class="layui-icon"></i>'); |
| | | |
| | | // 部门人员 筛选 |
| | | dropdown.render({ |
| | | elem: '#organization' |
| | | ,content: ['<div id="organizationTree" style="height: calc(100vh - 525px);border: none"></div>'].join('') |
| | | ,style: 'width: 370px; height: 350px; padding: 0 15px; box-shadow: 1px 1px 30px rgb(0 0 0 / 12%);' |
| | | ,ready: function(){ |
| | | loadTree(); |
| | | } |
| | | }); |
| | | |
| | | // 树形图 |
| | | var organizationTree; |
| | | window.loadTree = function(condition){ |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/dept/user/tree/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | 'condition': condition |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | organizationTree = tree.render({ |
| | | elem: '#organizationTree', |
| | | id: 'organizationTree', |
| | | onlyIconControl: true, |
| | | data: res.data, |
| | | click: function (obj) { |
| | | treeCond = { |
| | | key: obj.data.key, |
| | | val: obj.data.id |
| | | } |
| | | $('#organization').html(obj.data.title + ' <i class="layui-icon"></i>'); |
| | | $('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click'); |
| | | $(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click'); |
| | | clearFormVal($('#search-box')); |
| | | tableIns.reload({ |
| | | where: {[obj.data.key]: obj.data.id}, |
| | | page: {curr: 1} |
| | | }); |
| | | } |
| | | }); |
| | | treeData = res.data; |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <style> |
| | | .nav-box { |
| | | position: absolute; |
| | | top: 1px; |
| | | left: 5px; |
| | | } |
| | | .nav-box-item { |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .layui-dropdown.layui-border-box.layui-panel.layui-anim.layui-anim-downbit,.layui-dropdown.layui-border-box.layui-panel.layui-anim.layui-anim-downbit * { |
| | | box-sizing:inherit; |
| | | } |
| | | |
| | | .layui-menu li { |
| | | width: inherit; |
| | | } |
| | | .layui-tree-icon { |
| | | height: 16px; |
| | | line-height: 15px; |
| | | width: 15px; |
| | | text-align: center; |
| | | border: 1px solid #c0c4cc; |
| | | } |
| | | |
| | | .site-dropdown-demo, |
| | | .site-dropdown-demo .layui-menu{background: #32363F;border-color: #484e58;} |
| | | .site-dropdown-demo .layui-menu li{color: #a1a8b8;} |
| | | .site-dropdown-demo .layui-menu li:hover{background-color: #32363F;} |
| | | .layui-menu-body-title>.layui-icon { |
| | | position: relative; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .layui-form-radio { |
| | | display: block; |
| | | } |
| | | .layui-unselect.layui-form-radio { |
| | | display: inline-block; |
| | | } |
| | | .layui-form-radio:hover *, .layui-form-radioed, .layui-form-radioed>i { |
| | | color: #2d8cf0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div id="search-box" class="layui-form toolbar" style="display: flex;justify-content: flex-end;position: relative"> |
| | | <div class="nav-box"> |
| | | <div class="nav-box-item"> |
| | | <i class="layui-icon" style="color: #1890ff;font-weight: bold"></i> |
| | | </div> |
| | | <div class="nav-box-item"> |
| | | <button id="organization" style="border: none;padding-right: 35px;" class="layui-btn layui-btn-primary icon-btn"> |
| | | 未知 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <style> |
| | | .nav-box { |
| | | position: absolute; |
| | | top: 1px; |
| | | left: 5px; |
| | | } |
| | | .nav-box-item { |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .layui-dropdown.layui-border-box.layui-panel.layui-anim.layui-anim-downbit,.layui-dropdown.layui-border-box.layui-panel.layui-anim.layui-anim-downbit * { |
| | | box-sizing:inherit; |
| | | } |
| | | |
| | | .layui-menu li { |
| | | width: inherit; |
| | | } |
| | | .layui-tree-icon { |
| | | height: 16px; |
| | | line-height: 15px; |
| | | width: 15px; |
| | | text-align: center; |
| | | border: 1px solid #c0c4cc; |
| | | } |
| | | |
| | | .site-dropdown-demo, |
| | | .site-dropdown-demo .layui-menu{background: #32363F;border-color: #484e58;} |
| | | .site-dropdown-demo .layui-menu li{color: #a1a8b8;} |
| | | .site-dropdown-demo .layui-menu li:hover{background-color: #32363F;} |
| | | .layui-menu-body-title>.layui-icon { |
| | | position: relative; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .layui-form-radio { |
| | | display: block; |
| | | } |
| | | .layui-unselect.layui-form-radio { |
| | | display: inline-block; |
| | | } |
| | | .layui-form-radio:hover *, .layui-form-radioed, .layui-form-radioed>i { |
| | | color: #2d8cf0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div id="search-box" class="layui-form toolbar" style="display: flex;justify-content: flex-end;position: relative"> |
| | | <div class="nav-box"> |
| | | <div class="nav-box-item"> |
| | | <i class="layui-icon" style="color: #1890ff;font-weight: bold"></i> |
| | | </div> |
| | | <div class="nav-box-item"> |
| | | <button id="organization" style="border: none;padding-right: 35px;" class="layui-btn layui-btn-primary icon-btn"> |
| | | 未知 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |