DuGuYang 2 anos atrás
pai
commit
0c8949d12f

+ 38 - 0
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -5677,5 +5677,43 @@ namespace MySystem.Areas.Admin.Controllers
         }
         #endregion
 
+
+        #region 注销30天内恢复创客信息
+
+        public IActionResult RestoreUserInfo(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string RestoreUserInfoDo(string MakerCode)
+        {
+            var user = db.Users.FirstOrDefault(m => m.Status == -1 && m.MakerCode == MakerCode) ?? new Users();
+            if (user.Id == 0)
+            {
+                return "创客" + MakerCode + "不存在或不满足恢复条件";
+            }
+            else
+            {
+                user.Status = 0;
+                db.UserForMobile.Add(new UserForMobile()
+                {
+                    Mobile = user.Mobile,
+                    UserId = user.Id,
+                });
+                db.UserForMakerCode.Add(new UserForMakerCode()
+                {
+                    MakerCode = user.MakerCode,
+                    UserId = user.Id,
+                });
+                db.SaveChanges();
+            }
+            return "success";
+        }
+        #endregion
+
     }
 }

+ 247 - 0
Areas/Admin/Views/MainServer/SysTools/RestoreUserInfo.cshtml

@@ -0,0 +1,247 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>恢复创客信息</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <form class="layui-form" id="confirmFrm">
+            <div class="layui-card">
+                <div class="layui-card-body">
+                    <div class="layui-tab" lay-filter="mytabbar">
+                        <ul class="layui-tab-title">
+                            <li class="layui-this" lay-id="1">基本信息</li>
+                        </ul>
+                        <div class="layui-tab-content mt20">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">创客编码</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="MakerCode"
+                                            name="MakerCode" maxlength="50" lay-verify="required|"
+                                            autocomplete="off" placeholder="请输入创客编码">
+                                    </div>
+                                </div>
+                            </div>
+
+                        </div>
+                    </div>
+                    <div class="layui-form-item ml10">
+                        <div class="layui-input-block">
+                            <button type="button" class="layui-btn" onclick="save()">查询</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        function save() {
+            var OrderNo = $('#MakerCode').val();
+            if (OrderNo == '') {
+                layer.msg('请输入创客编码');
+            }
+            else {
+                var index = layer.confirm('确定要还原该创客的App帐号吗?', function (index) {
+                    var indexs = layer.load(1, {
+                        shade: [0.5, '#000']
+                    });
+                    var userdata = $("#confirmFrm").serialize();
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/SysTools/RestoreUserInfoDo?r=" + Math.random(1),
+                        data: userdata,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index); //关闭弹层}
+                            if (data == "success") {
+                                layer.close(indexs); //关闭弹层
+                                layer.msg('还原成功', {
+                                    time: 1000
+                                }, function () {
+                                    window.location.reload();
+                                });
+                            } else {
+                                layer.close(indexs); //关闭弹层
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+
+        var ids = "";
+        function getChildren(obj) {
+            $.each(obj, function (index, value) {
+                var id = obj[index].id;
+                ids += id + ",";
+                var children = obj[index].children;
+                if (children) {
+                    getChildren(children);
+                }
+            });
+        }
+
+        function AreasProvinceInit(tagId, areasVal, form) {
+            for (var i = 0; i < provs_data.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(provs_data[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
+            }
+            form.render();
+        }
+
+        function AreasProvinceSelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "City").html('<option value="">市</option>');
+            var list = citys_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasCitySelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            var list = dists_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasAreaSelected(tagId, form) {
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+        function movePrev(obj, tagId) {
+            $(obj).parent().prev().insertAfter($(obj).parent());
+            checkPics(tagId);
+        }
+        function moveNext(obj, tagId) {
+            $(obj).parent().next().insertBefore($(obj).parent());
+            checkPics(tagId);
+        }
+        function deletePic(obj, tagId) {
+            $(obj).parent().remove();
+            checkPics(tagId);
+        }
+        function checkPics(tagId) {
+            var pics = "";
+            var texts = "";
+            $("#" + tagId + "Image div img").each(function (i) {
+                pics += $(this).attr("src").replace(osshost, '') + "|";
+            });
+            $("#" + tagId + "Image div input").each(function (i) {
+                texts += $(this).val() + "|";
+            });
+            if (pics == "") {
+                $("#" + tagId).val("");
+            } else {
+                pics = pics.substring(0, pics.length - 1);
+                texts = texts.substring(0, pics.length - 1);
+                $("#" + tagId).val(pics + "#cut#" + texts);
+            }
+        }
+        function checkBox(tagId) {
+            var text = "";
+            $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
+                text += $(this).val() + ",";
+            });
+            $("#" + tagId).val(text);
+        }
+        function showBigPic(picpath) {
+            parent.layer.open({
+                type: 1,
+                title: false,
+                closeBtn: 0,
+                shadeClose: true,
+                area: ['auto', 'auto'],
+                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
+            });
+        }
+
+        
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            
+
+            //穿梭框
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+            
+        })
+
+    </script>
+</body>
+</html>

+ 26 - 0
Models/LeaderCompAddTrade.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class LeaderCompAddTrade
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal AddTradeAmount { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 26 - 0
Models/LeaderCompAddTradeBak.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class LeaderCompAddTradeBak
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal AddTradeAmount { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 1 - 0
Models/MachineApply.cs

@@ -56,5 +56,6 @@ namespace MySystem.Models
         public int UserId { get; set; }
         public string ApplyNo { get; set; }
         public int OperateId { get; set; }
+        public string OutBatchNo { get; set; }
     }
 }

+ 1 - 0
Models/PosMachinesTwo.cs

@@ -59,5 +59,6 @@ namespace MySystem.Models
         public DateTime? RecycStartDate { get; set; }
         public string SourcePosSn { get; set; }
         public int RecycStatus { get; set; }
+        public string OutBatchNo { get; set; }
     }
 }

+ 1 - 0
Models/Users.cs

@@ -96,5 +96,6 @@ namespace MySystem.Models
         public int ThisMonthSend { get; set; }
         public string BusinessLogo { get; set; }
         public string BusinessName { get; set; }
+        public DateTime? LogOutDate { get; set; }
     }
 }

+ 182 - 0
Models/WebCMSEntities.cs

@@ -70,6 +70,8 @@ namespace MySystem.Models
         public virtual DbSet<KqProductRuleSet> KqProductRuleSet { get; set; }
         public virtual DbSet<KqProducts> KqProducts { get; set; }
         public virtual DbSet<LeaderAccountRecord> LeaderAccountRecord { get; set; }
+        public virtual DbSet<LeaderCompAddTrade> LeaderCompAddTrade { get; set; }
+        public virtual DbSet<LeaderCompAddTradeBak> LeaderCompAddTradeBak { get; set; }
         public virtual DbSet<LeaderCompPrize> LeaderCompPrize { get; set; }
         public virtual DbSet<LeaderCompPrizeBak> LeaderCompPrizeBak { get; set; }
         public virtual DbSet<LeaderCompTmp> LeaderCompTmp { get; set; }
@@ -4195,6 +4197,170 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<LeaderCompAddTrade>(entity =>
+            {
+                entity.HasComment("领导人达标奖增量");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AddTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("增量");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("上级创客集合")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentUserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("上级创客");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.StatMonth)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("统计月份")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<LeaderCompAddTradeBak>(entity =>
+            {
+                entity.HasComment("领导人达标奖增量bak");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AddTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("增量");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("上级创客集合")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentUserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("上级创客");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.StatMonth)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("统计月份")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<LeaderCompPrize>(entity =>
             {
                 entity.HasComment("领导人达标奖");
@@ -4899,6 +5065,12 @@ namespace MySystem.Models
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.OutBatchNo)
+                    .HasColumnType("varchar(2000)")
+                    .HasComment("出库批次号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.ProductName)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")
@@ -9546,6 +9718,12 @@ namespace MySystem.Models
 
                 entity.Property(e => e.OrderId).HasColumnType("int(11)");
 
+                entity.Property(e => e.OutBatchNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("出库批次号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.PosSn)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
@@ -18969,6 +19147,10 @@ namespace MySystem.Models
                     .HasColumnType("bit(1)")
                     .HasDefaultValueSql("b'0'");
 
+                entity.Property(e => e.LogOutDate)
+                    .HasColumnType("datetime")
+                    .HasComment("注销时间");
+
                 entity.Property(e => e.LoginPwd)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")