username@email.com
2022-08-29 19bc2e140fbef74cf87f8e0edfb2d173b1f52d40
提交
4个文件已修改
47 ■■■■ 已修改文件
zhengcaioa/Services/ProjectService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/PltUserRoleController.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/PltUserRole/Index.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/ProjectService.cs
@@ -27,7 +27,7 @@
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                var checkUserSn = _context.Projects.Where(x => x.Name == projectDTO.Name && x.RecStatus == "A" && x.Id != projectDTO.Id).FirstOrDefault();
                var checkUserSn = _context.Projects.Where(x => x.Name == projectDTO.Name.Trim() && x.RecStatus == "A" && x.Id != projectDTO.Id).FirstOrDefault();
                if (checkUserSn != null && (string.IsNullOrWhiteSpace(projectDTO.Id) || (!string.IsNullOrWhiteSpace(projectDTO.Id) && checkUserSn.Id != projectDTO.Id)))
                {
                    resultEntity.Result = false;
zhengcaioa/zhengcaioa/Controllers/PltUserRoleController.cs
@@ -19,15 +19,17 @@
        private readonly IPltRoleService _pltRoleService;
        private readonly IUserService _userService;
        private readonly ISysCodeService _sysCodeService;
        private readonly IHrDeptService _hrDeptService;
        
        public PltUserRoleController(ILogger<PltUserRoleController> logger, IPltRoleService pltRoleService, IUserService userService, ISysCodeService sysCodeService)
        public PltUserRoleController(ILogger<PltUserRoleController> logger, IPltRoleService pltRoleService, IUserService userService, ISysCodeService sysCodeService
            , IHrDeptService hrDeptService)
        {
            _logger = logger;
            _pltRoleService = pltRoleService;
            _userService = userService;
            _sysCodeService = sysCodeService;
            _hrDeptService = hrDeptService;
        }
        [CheckLogin]
@@ -39,12 +41,23 @@
            #endregion
            #region 获取所有人员
            var listUser = _userService.GetList();
            var listType = _sysCodeService.GetCodeDataAll().Where(a=>a.CodeTable == "plt_user" && a.CodeField == "user_type").ToList();
            var deptDTOs = _hrDeptService.GetList().ToList();
            var listType = new List<CodeDataEntity>();
            foreach (var dept in deptDTOs)
            {
                var codeDataEntity = new CodeDataEntity();
                codeDataEntity.CodeSn = dept.Id;
                codeDataEntity.Comments = dept.DeptName;
                listType.Add(codeDataEntity);
            }
            //var listType = _sysCodeService.GetCodeDataAll().Where(a=>a.CodeTable == "plt_user" && a.CodeField == "user_type").ToList();
            var dicTypeUser = new Dictionary<string, List<PltUserDTO>>();
            if (listType.Count > 0)
            {
                listType.ForEach(t => {
                    dicTypeUser[t.CodeSn] = listUser.Where(u => u.UserType == t.CodeSn).ToList();
                    dicTypeUser[t.CodeSn] = listUser.Where(u => u.DeptId == t.CodeSn).ToList();// u.UserType
                });
            }
zhengcaioa/zhengcaioa/Views/PltUserRole/Index.cshtml
@@ -95,7 +95,7 @@
                        <div class="col-sm-3 col-md-3">
                            <div class="checkbox i-checks user">
                                <label>
                                    <div class="icheckbox_square-green" data-pageid="@mUser.Id" data-parentid="@mUser.UserType" style="position: relative;">
                                    <div class="icheckbox_square-green" data-pageid="@mUser.Id" data-parentid="@mUser.DeptId" style="position: relative;">
                                        <input style="position: absolute; opacity: 0;" type="checkbox" value="">
                                        <ins class="iCheck-helper" style="background: rgb(255, 255, 255); margin: 0px; padding: 0px; border: 0px; border-image: none; left: 0%; top: 0%; width: 100%; height: 100%; display: block; position: absolute; opacity: 0;"></ins>
                                    </div> <i></i><span class="uname">@mUser.UserName</span>
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml
@@ -23,18 +23,24 @@
            {
                label: '公告时间', name: 'StartTime', labtype: 'txt', hidden: false, width: 90 ,
                formatter: function (v) {
                    return $.trim(v) == '' ? '' : $.trim(v).replace("T"," ") //.substring(0,10);
                    return $.trim(v) == '' ? '' : $.trim(v).substring(0, 10); //$.trim(v).replace("T"," ")
                }
            },
            { label: '项目区域', name: 'Sheng', labtype: 'txt', hidden: false, width: 100  },
            { label: '项目区域', name: 'Sheng', labtype: 'txt', hidden: false, width: 160  },
            {
                label: '项目名称', name: 'Name', labtype: 'txt', hidden: false, width: 400 ,
                label: '项目名称', name: 'Name', labtype: 'txt', hidden: false, width: 500 ,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/Project/Add?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
                    var color = "";
                    if (rowObject.Fblx != null && rowObject.Fblx != '') {
                        color = "red";
                }
            }, { label: '项目编号', name: 'Number', labtype: 'txt', hidden: false, width: 100 },
                    return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/Project/Add?id=" + rowObject.Id + "')\"  ><span style='color:" + color + ";'>" + cellvalue + "</span></a>";
                }
            }, { label: '项目编号', name: 'Number', labtype: 'txt', hidden: false, width: 140 },
            {
                label: '中标供应商', name: 'Toubiaocishu', labtype: 'txt', hidden: false, width: 400,
                label: '中标供应商', name: 'Toubiaocishu', labtype: 'txt', hidden: false, width: 200,
                formatter: function (cellvalue, options, rowObject) {
                    if (cellvalue != null && cellvalue != "null" && cellvalue != "") {
                        var ss = cellvalue.split('、');
@@ -50,7 +56,7 @@
                }
            },
            {
                label: '第二候选', name: 'Drhx', labtype: 'txt', hidden: false, width: 400,
                label: '第二候选', name: 'Drhx', labtype: 'txt', hidden: false, width: 200,
                formatter: function (cellvalue, options, rowObject) {
                    if (cellvalue != null && cellvalue != "null" && cellvalue != "") {
                        var ss = cellvalue.split('、');
@@ -67,7 +73,7 @@
                }
            },
            {
                label: '第三候选', name: 'Dshx', labtype: 'txt', hidden: false, width: 400,
                label: '第三候选', name: 'Dshx', labtype: 'txt', hidden: false, width: 200,
                formatter: function (cellvalue, options, rowObject) {
                    if (cellvalue != null && cellvalue != "null" && cellvalue != "") {
                        var ss = cellvalue.split('、');