Преглед на файлове

Merge branch 'DuGuYang' into develop

lichunlei преди 3 години
родител
ревизия
169baa51da

+ 48 - 48
Areas/Admin/Controllers/HomeController.cs

@@ -149,60 +149,60 @@ namespace MySystem.Areas.Admin.Controllers
         [HttpPost]
         public string Login(string UserName, string Pwd, string CheckCode)
         {
-            string result = "";
-            if (function.GetCookie(_accessor.HttpContext, "checkcode") != CheckCode)
-            {
-                result = "验证码错误!!";
-            }
-            else
-            {
-                Pwd = function.MD5_32(Pwd);
-                var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
-                if (user != null)
-                {
-                    user.LastLoginDate = DateTime.Now;
-                    db.SaveChanges();
-                    function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
-                    function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
-                    function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
-                    int RoleId = int.Parse(function.CheckInt(user.Role));
-                    BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
-                    string RightInfo = function.CheckNull(Role.RightInfo);
-                    function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
-                    string UserId = user.Id.ToString();
-                    function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
-                    function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
-                    result = "success";
-                }
-                else
-                {
-                    result = "用户名或密码错误";
-                }
-            }
-
             // string result = "";
-            // Pwd = function.MD5_32(Pwd);
-            // var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
-            // if (user != null)
+            // if (function.GetCookie(_accessor.HttpContext, "checkcode") != CheckCode)
             // {
-            //     user.LastLoginDate = DateTime.Now;
-            //     db.SaveChanges();
-            //     function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
-            //     function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
-            //     function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
-            //     int RoleId = int.Parse(function.CheckInt(user.Role));
-            //     BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
-            //     string RightInfo = function.CheckNull(Role.RightInfo);
-            //     function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
-            //     string UserId = user.Id.ToString();
-            //     function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
-            //     function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
-            //     result = "success";
+            //     result = "验证码错误!!";
             // }
             // else
             // {
-            //     result = "用户名或密码错误";
+            //     Pwd = function.MD5_32(Pwd);
+            //     var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
+            //     if (user != null)
+            //     {
+            //         user.LastLoginDate = DateTime.Now;
+            //         db.SaveChanges();
+            //         function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
+            //         function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
+            //         function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
+            //         int RoleId = int.Parse(function.CheckInt(user.Role));
+            //         BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
+            //         string RightInfo = function.CheckNull(Role.RightInfo);
+            //         function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
+            //         string UserId = user.Id.ToString();
+            //         function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
+            //         function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
+            //         result = "success";
+            //     }
+            //     else
+            //     {
+            //         result = "用户名或密码错误";
+            //     }
             // }
+
+            string result = "";
+            Pwd = function.MD5_32(Pwd);
+            var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
+            if (user != null)
+            {
+                user.LastLoginDate = DateTime.Now;
+                db.SaveChanges();
+                function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
+                function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
+                function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
+                int RoleId = int.Parse(function.CheckInt(user.Role));
+                BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
+                string RightInfo = function.CheckNull(Role.RightInfo);
+                function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
+                string UserId = user.Id.ToString();
+                function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
+                function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
+                result = "success";
+            }
+            else
+            {
+                result = "用户名或密码错误";
+            }
             return result;
         }
         #endregion

+ 78 - 1
Areas/Admin/Controllers/MainServer/StoreMachineApplyController.cs

@@ -460,6 +460,7 @@ namespace MySystem.Areas.Admin.Controllers
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             List<SendInfo> sendInfos = new List<SendInfo>();
+            List<CheckSendInfo> checksendInfos = new List<CheckSendInfo>();
             StoreMachineApply apply = db.StoreMachineApply.FirstOrDefault(m => m.Id == data.Id) ?? new StoreMachineApply();
             JsonData ApplyList = JsonMapper.ToObject(apply.SendSn);
             decimal ApplyAmount = 0;
@@ -492,6 +493,76 @@ namespace MySystem.Areas.Admin.Controllers
             }
             ExcelData = HttpUtility.UrlDecode(ExcelData);
             JsonData list = JsonMapper.ToObject(ExcelData);
+
+            //判断各品牌发货数量是否符合
+            if (list.Count - 1 > apply.ApplyNum)
+            {
+                return "Warning|" + "机具发货数量过多!";
+            }
+            if (list.Count - 1 < apply.ApplyNum)
+            {
+                return "Warning|" + "机具发货数量不足!";
+            }
+            for (int index = 1; index < list.Count; index++)
+            {
+                JsonData dr = list[index];
+                string itemJson = dr.ToJson();
+                string SnNo = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
+                string Brand = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
+                string BatchNo = itemJson.Contains("\"C\"") ? dr["C"].ToString() : "";
+                string OutNote = itemJson.Contains("\"D\"") ? dr["D"].ToString() : "";
+
+                BrandId = Convert.ToInt32(Brand);
+
+                if (BrandId == 1) FromStoreId = 7;
+                if (BrandId == 2) FromStoreId = 721;
+                if (BrandId == 3) FromStoreId = 697;
+                if (BrandId == 4) FromStoreId = 774;
+                if (BrandId == 5) FromStoreId = 775;
+                if (BrandId == 6) FromStoreId = 871;
+                if (BrandId == 7) FromStoreId = 1047;
+                if (BrandId == 8) FromStoreId = 4831;
+                if (BrandId == 9) FromStoreId = 4832;
+                CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
+                if (items == null)
+                {
+                    CheckSendInfo rows = new CheckSendInfo()
+                    {
+                        BrandId = BrandId,
+                        Num = 1
+                    };
+                    checksendInfos.Add(rows);
+                }
+                else
+                {
+                    items.Num += 1;
+                }
+            }
+            for (int i = 0; i < ApplyList.Count; i++)
+            {
+                int num = Convert.ToInt32(ApplyList[i]["ApplyNum"].ToString());
+                int BrandIds = Convert.ToInt32(ApplyList[i]["BrandId"].ToString());
+                if (BrandIds == 1) FromStoreId = 7;
+                if (BrandIds == 2) FromStoreId = 721;
+                if (BrandIds == 3) FromStoreId = 697;
+                if (BrandIds == 4) FromStoreId = 774;
+                if (BrandIds == 5) FromStoreId = 775;
+                if (BrandIds == 6) FromStoreId = 871;
+                if (BrandIds == 7) FromStoreId = 1047;
+                if (BrandIds == 8) FromStoreId = 4831;
+                if (BrandIds == 9) FromStoreId = 4832;
+                var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
+                CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
+                if (items.Num > num)
+                {
+                    return "Warning|" + "该条发货记录的" + brandInfo.Name + "发货数量过多!";
+                }
+                if (items.Num < num)
+                {
+                    return "Warning|" + "该条发货记录的" + brandInfo.Name + "发货数量不足!";
+                }
+            }
+
             List<string> PosSnList = new List<string>();
             for (int index = 1; index < list.Count; index++)
             {
@@ -658,7 +729,6 @@ namespace MySystem.Areas.Admin.Controllers
                 {
                     return "总仓无该机具";
                 }
-
             }
 
             foreach (var item in sendInfos)
@@ -743,5 +813,12 @@ namespace MySystem.Areas.Admin.Controllers
             public int Num { get; set; }
         }
 
+         //检查发货信息实体类
+        private class CheckSendInfo
+        {
+            public int BrandId { get; set; }
+            public int Num { get; set; }
+        }
+
     }
 }

+ 194 - 2
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -18,8 +18,11 @@ using LitJson;
 using MySystemLib;
 using System.Text.RegularExpressions;
 using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
 using System.Text;
-
+using System.Net;
+using System.Net.Security;
+using System.IO;
 namespace MySystem.Areas.Admin.Controllers
 {
     [Area("Admin")]
@@ -1681,7 +1684,7 @@ namespace MySystem.Areas.Admin.Controllers
                     oldpos.Status = -1;
 
                     PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == newpos.BindMerchantId);
-                    if(merchant != null)
+                    if (merchant != null)
                     {
                         merchant.KqSnNo = newpos.PosSn;
                         merchant.ActiveStatus = newpos.ActivationState;
@@ -3194,5 +3197,194 @@ namespace MySystem.Areas.Admin.Controllers
 
         #endregion
 
+
+        #region 三要素验证
+
+        public IActionResult CheckThreeElements(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string CheckThreeElementsDo(string bankcard, string idcard, string name)
+        {
+            var host = "https://bankcard3c.shumaidata.com";
+            var path = "/bankcard3c";
+            var method = "GET";
+            var appcode = "8e5704921ca3422f80f0deb935a7ddc6";
+
+            if (string.IsNullOrEmpty(bankcard))
+            {
+                return "结算银行卡号";
+            }
+            if (string.IsNullOrEmpty(idcard))
+            {
+                return "身份证号";
+            }
+            if (string.IsNullOrEmpty(name))
+            {
+                return "真实姓名";
+            }
+            WebCMSEntities maindb = new WebCMSEntities();
+            bool checkCertId = maindb.Users.Any(m => m.CertId == idcard);
+            if (checkCertId)
+            {
+                return "您输入的身份证号已经认证过了,请更换身份证";
+            }
+            String querys = "bankcard=" + bankcard + "&idcard=" + idcard + "&name=" + name;
+            function.WriteLog(DateTime.Now.ToString(), "验证三要素日志");
+            function.WriteLog(querys, "验证三要素日志");
+            String bodys = "";
+            String url = host + path;
+            HttpWebRequest httpRequest = null;
+            HttpWebResponse httpResponse = null;
+
+            if (0 < querys.Length)
+            {
+                url = url + "?" + querys;
+            }
+
+            if (host.Contains("https://"))
+            {
+                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
+                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
+            }
+            else
+            {
+                httpRequest = (HttpWebRequest)WebRequest.Create(url);
+            }
+            httpRequest.Method = method;
+            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
+            if (0 < bodys.Length)
+            {
+                byte[] data = Encoding.UTF8.GetBytes(bodys);
+                using (Stream stream = httpRequest.GetRequestStream())
+                {
+                    stream.Write(data, 0, data.Length);
+                }
+            }
+            try
+            {
+                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
+            }
+            catch (WebException ex)
+            {
+                httpResponse = (HttpWebResponse)ex.Response;
+            }
+
+            Stream st = httpResponse.GetResponseStream();
+            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
+            string result = reader.ReadToEnd();
+            JsonData jsonObj = JsonMapper.ToObject(result);
+            result = jsonObj["data"]["desc"].ToString();
+            function.WriteLog(result, "验证三要素日志");
+            function.WriteLog("\n\n", "验证三要素日志");
+            return result;
+        }
+        #endregion
+
+
+        #region 四要素验证
+
+        public IActionResult CheckFourElements(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string CheckFourElementsDo(string bankcard, string idcard, string mobile, string name)
+        {
+            var host = "https://bankcard4c.shumaidata.com";
+            var path = "/bankcard4c";
+            var method = "GET";
+            var appcode = "8e5704921ca3422f80f0deb935a7ddc6";
+
+            if (string.IsNullOrEmpty(bankcard))
+            {
+                return "请输入结算银行卡号";
+            }
+            if (string.IsNullOrEmpty(idcard))
+            {
+                return "请输入身份证号";
+            }
+            if (string.IsNullOrEmpty(mobile))
+            {
+                return "请输入银行预留手机号";
+            }
+            if (string.IsNullOrEmpty(name))
+            {
+                return "请输入真实姓名";
+            }
+            WebCMSEntities maindb = new WebCMSEntities();
+            bool checkCertId = maindb.Users.Any(m => m.CertId == idcard);
+            if (checkCertId)
+            {
+                return "您输入的身份证号已经认证过了,请更换身份证";
+            }
+            String querys = "bankcard=" + bankcard + "&idcard=" + idcard + "&mobile=" + mobile + "&name=" + name;
+            function.WriteLog(DateTime.Now.ToString(), "验证四要素日志");
+            function.WriteLog(querys, "验证四要素日志");
+            String bodys = "";
+            String url = host + path;
+            HttpWebRequest httpRequest = null;
+            HttpWebResponse httpResponse = null;
+
+            if (0 < querys.Length)
+            {
+                url = url + "?" + querys;
+            }
+
+            if (host.Contains("https://"))
+            {
+                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
+                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
+            }
+            else
+            {
+                httpRequest = (HttpWebRequest)WebRequest.Create(url);
+            }
+            httpRequest.Method = method;
+            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
+            if (0 < bodys.Length)
+            {
+                byte[] data = Encoding.UTF8.GetBytes(bodys);
+                using (Stream stream = httpRequest.GetRequestStream())
+                {
+                    stream.Write(data, 0, data.Length);
+                }
+            }
+            try
+            {
+                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
+            }
+            catch (WebException ex)
+            {
+                httpResponse = (HttpWebResponse)ex.Response;
+            }
+
+            Stream st = httpResponse.GetResponseStream();
+            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
+            string result = reader.ReadToEnd();
+            JsonData jsonObj = JsonMapper.ToObject(result);
+            result = jsonObj["data"]["desc"].ToString();
+            function.WriteLog(result, "验证四要素日志");
+            function.WriteLog("\n\n", "验证四要素日志");
+            return  result;
+
+        }
+        #endregion
+
+
+        public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
+        {
+            return true;
+        }
+
     }
 }

+ 2 - 2
Areas/Admin/Views/Home/Login.cshtml

@@ -26,11 +26,11 @@
                     <label for="password">密码 / Password</label>
                     <input class="form-input" type="password" name="Pwd" id="Pwd" onKeyUp="if(event.keyCode==13){$('#CheckCode').focus();}" placeholder="请填写密码">
                 </div>
-                <div class="form-group pb10">
+                @* <div class="form-group pb10">
                     <label for="password">验证码 / Verification</label>
                     <input class="form-input" type="text" name="CheckCode" id="CheckCode" onkeyup="if(event.keyCode==13){syslogin();}" placeholder="请填写验证码" style="width: 70%; display: inline-block; margin-right: 2%">
                     <img src="/Api/PublicMethod/CheckCode" onclick="$(this).attr('src','/Api/PublicMethod/CheckCode?r='+Math.random())" style="width: 26%; height:38px;" />
-                </div>
+                </div> *@
                 @*<div class="form-group pb10 cf">
                         <label class="remembermetext fl" for="rememberme">
                             <input type="checkbox" checked name="rememberme">&nbsp;记住我的登录

+ 260 - 0
Areas/Admin/Views/MainServer/SysTools/CheckFourElements.cshtml

@@ -0,0 +1,260 @@
+@{
+    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="bankcard" name="bankcard"
+                                            maxlength="50" lay-verify="required|" autocomplete="off"
+                                            placeholder="请输入结算银行卡号">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">身份证号</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="idcard" name="idcard"
+                                            maxlength="50" lay-verify="required|" autocomplete="off"
+                                            placeholder="请输入身份证号">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">真实姓名</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="name" name="name"
+                                            maxlength="50" lay-verify="required|" autocomplete="off"
+                                            placeholder="请输入真实姓名">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">银行预留手机号</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="mobile" name="mobile"
+                                            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 index = layer.load(1, {
+                shade: [0.5, '#000']
+            });
+            var userdata = $("#confirmFrm").serialize();
+            $.ajax({
+                type: "POST",
+                url: "/Admin/SysTools/CheckFourElementsDo?r=" + Math.random(1),
+                data: userdata,
+                dataType: "text",
+                success: function (data) {
+                    layer.close(index); //关闭弹层
+                    if (data == "success") {
+                        layer.msg("验证成功");
+                    } else {
+                        layer.alert(data.replace(/\n/g, '<br />'), {area:['400px','260px']});
+                    }
+                }
+            });
+        }
+
+
+        //编辑器
+        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>

+ 253 - 0
Areas/Admin/Views/MainServer/SysTools/CheckThreeElements.cshtml

@@ -0,0 +1,253 @@
+@{
+    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="bankcard" name="bankcard"
+                                            maxlength="50" lay-verify="required|" autocomplete="off"
+                                            placeholder="请输入结算银行卡号">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">身份证号</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="idcard" name="idcard"
+                                            maxlength="50" lay-verify="required|" autocomplete="off"
+                                            placeholder="请输入身份证号">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">真实姓名</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="name" name="name"
+                                            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 index = layer.load(1, {
+                shade: [0.5, '#000']
+            });
+            var userdata = $("#confirmFrm").serialize();
+            $.ajax({
+                type: "POST",
+                url: "/Admin/SysTools/CheckThreeElementsDo?r=" + Math.random(1),
+                data: userdata,
+                dataType: "text",
+                success: function (data) {
+                    layer.close(index); //关闭弹层
+                    if (data == "success") {
+                        layer.msg("验证成功");
+                    } else {
+                        layer.alert(data.replace(/\n/g, '<br />'), {area:['400px','260px']});
+                    }
+                }
+            });
+        }
+
+
+        //编辑器
+        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>

+ 2 - 2
Startup.cs

@@ -154,11 +154,11 @@ namespace MySystem
         {
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
-            System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer'");
+            System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer2'");
             foreach (System.Data.DataRow subtable in tablecollection.Rows)
             {
                 Dictionary<string, string> Columns = new Dictionary<string, string>();
-                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
+                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer2' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
                 foreach (System.Data.DataRow column in columncollection.Rows)
                 {
                     string datatype = column["DATA_TYPE"].ToString();

+ 11 - 5
wwwroot/layuiadmin/modules_main/StoreHouse_Admin.js

@@ -290,8 +290,7 @@ layui.config({
                 width: 150,
                 title: '可用小分仓额度',
                 sort: true
-            }
-            , {
+            }, {
                 title: '操作',
                 width: 300,
                 align: 'center',
@@ -500,9 +499,16 @@ layui.config({
     form.on('submit(LAY-list-front-searchall)', function (data) {
         var field = data.field;
         field.ShowFlag = 1;
-        field.StoreNo="";
-        field.StoreNo="";
-        field.StoreNo="";
+        field.StoreNo = "";
+        field.StoreName = "";
+        field.ManagerEmail = "";
+        field.UserIdMakerCode = "";
+        field.UserIdRealName = "";
+        field.ManageUserIdRealName = "";
+        field.ManageUserIdMobile = "";
+        field.ManageUserIdMakerCode = "";
+        field.StoreStatusSelect = "";
+        field.CreateDateData = "";
         table.reload('LAY-list-manage', {
             where: field,
             page: {

+ 1 - 1
wwwroot/layuiadmin/modules_main/StoreMachineApply_Admin.js

@@ -170,7 +170,7 @@ layui.config({
                     layero.find('iframe').contents().find('.productlist input[type=hidden][name=BrandId]').each(function (i) {
                         var BrandId = $(this).val();
                         var ApplyNum = ApplyNums.eq(i).val();
-                        SendSn += '{"BrandId":' + BrandId + ',"ApplyNum":' + ApplyNum + '}';
+                        SendSn += '{"ApplyNum":' + ApplyNum + ',"BrandId":' + BrandId + '}';
                         if (i < ApplyNums.length - 1) {
                             SendSn += ',';
                         }