Explorar el Código

完成,待测试

DuGuYang hace 3 años
padre
commit
1605ae8ac9

+ 55 - 16
Areas/Admin/Controllers/MainServer/LeaderReserveRecordController.cs

@@ -219,20 +219,25 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导出Excel
         /// </summary>
         /// <returns></returns>
-        public JsonResult ExportExcel(LeaderReserveRecord data, string UserIdMakerCode, string CreateDateData, string LeaderLevelSelect)
+        public JsonResult ExportExcel(LeaderReserveRecord data, string UserIdMakerCode, string SourceMakerCode, string RemarkSelect, string CreateDateData, string SeoKeyword)
         {
             Dictionary<string, string> Fields = new Dictionary<string, string>();
 
             string condition = " and Status>-1";
-            //创客创客编号
+            //创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
                 condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
-            //盟主等级
-            if (!string.IsNullOrEmpty(LeaderLevelSelect))
+            //购券创客
+            if (!string.IsNullOrEmpty(SourceMakerCode))
+            {
+                condition += " and SourceUserId in (select UserId from UserForMakerCode where MakerCode='" + SourceMakerCode + "')";
+            }
+            //变动类型
+            if (!string.IsNullOrEmpty(RemarkSelect))
             {
-                condition += " and LeaderLevel=" + LeaderLevelSelect;
+                condition += " and Remark='" + RemarkSelect + "'";
             }
             //创建时间
             if (!string.IsNullOrEmpty(CreateDateData))
@@ -242,35 +247,69 @@ namespace MySystem.Areas.Admin.Controllers
                 string end = datelist[1];
                 condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
             }
+            //订单编号
+            if (!string.IsNullOrEmpty(SeoKeyword))
+            {
+                condition += " and SeoKeyword='" + SeoKeyword + "'";
+            }
 
-
-            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Leaders", Fields, "Id desc", "0", 1, 20000, condition, "UserId,LeaderLevel,CreateDate", false);
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("LeaderReserveRecord", Fields, "Id desc", "0", 1, 20000, condition, "UserId,SeoTitle,CreateDate,Remark,BeforeAmt,AfterAmt", false);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
             foreach (Dictionary<string, object> dic in diclist)
             {
                 //创客
                 int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
                 Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == UserId) ?? new UserAccount();
                 dic["UserIdMakerCode"] = userid_Users.MakerCode;
                 dic["UserIdRealName"] = userid_Users.RealName;
+                dic["LeaderBalanceAmount"] = userAccount.LeaderBalanceAmount;
                 dic.Remove("UserId");
-                //盟主等级
-                int LeaderLevel = int.Parse(dic["LeaderLevel"].ToString());
-                if (LeaderLevel == 1) dic["LeaderLevel"] = "小盟主";
-                if (LeaderLevel == 2) dic["LeaderLevel"] = "大盟主";
-                if (LeaderLevel == 0) dic["LeaderLevel"] = "";
 
-            }
+                // //盟主等级
+                // int LeaderLevel = userid_Users.LeaderLevel;
+                // if (LeaderLevel == 1) dic["LeaderLevel"] = "小盟主";
+                // if (LeaderLevel == 2) dic["LeaderLevel"] = "大盟主";
+                // if (LeaderLevel == 0) dic["LeaderLevel"] = "";
 
+                //订单信息
+                JsonData ApplyList = JsonMapper.ToObject(dic["SeoTitle"].ToString());//申请数据
+                dic["dPosCoupons"] = "";
+                dic["bPosCoupons"] = "";
+                if (!string.IsNullOrEmpty(dic["SeoTitle"].ToString()))
+                {
+                    for (int i = 0; i < ApplyList.Count; i++)
+                    {
+                        int num = Convert.ToInt32(ApplyList[i]["Num"].ToString());
+                        int type = Convert.ToInt32(ApplyList[i]["Type"].ToString());
+                        if (type == 1)
+                        {
+                            dic["dPosCoupons"] = num + "张";
+                        }
+                        else
+                        {
+                            dic["bPosCoupons"] = num + "张";
+                        }
+                    }
+                }
+                dic.Remove("SeoTitle");
+            }
+            // 导出表格包含创客姓名、创客编号、创建时间、变动类型、电签兑换券张数、大POS兑换券张数、可提现余额、使用前剩余额度、使用后剩余额度
             Dictionary<string, object> result = new Dictionary<string, object>();
             result.Add("Status", "1");
             result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
             result.Add("Obj", diclist);
             Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
-            ReturnFields.Add("UserIdMakerCode", "创客创客编号");
-            ReturnFields.Add("UserIdRealName", "创客真实姓名");
-            ReturnFields.Add("LeaderLevel", "盟主等级");
+            ReturnFields.Add("UserIdMakerCode", "创客编号");
+            ReturnFields.Add("UserIdRealName", "创客姓名");
             ReturnFields.Add("CreateDate", "创建时间");
+            // ReturnFields.Add("LeaderLevel", "盟主等级");
+            ReturnFields.Add("Remark", "变动类型");
+            ReturnFields.Add("dPosCoupons", "电签兑换券张数");
+            ReturnFields.Add("bPosCoupons", "大POS兑换券张数");
+            ReturnFields.Add("LeaderBalanceAmount", "可提现余额");
+            ReturnFields.Add("BeforeAmt", "使用前剩余额度");
+            ReturnFields.Add("AfterAmt", "使用后剩余额度");
 
             result.Add("Fields", ReturnFields);
             AddSysLog("0", "Leaders", "ExportExcel");

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

@@ -4594,5 +4594,62 @@ namespace MySystem.Areas.Admin.Controllers
         #endregion
 
 
+        #region 服务费返现注册查询
+
+        public IActionResult SeeMerchantAuthInfo(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string SeeMerchantAuthInfoDo(string RealName, string Mobile, string CertId)
+        {
+            if (string.IsNullOrEmpty(RealName))
+            {
+                return "请输入商户姓名";
+            }
+            if (string.IsNullOrEmpty(Mobile))
+            {
+                return "请输入手机号";
+            }
+            if (string.IsNullOrEmpty(CertId))
+            {
+                return "请输入身份证号";
+            }
+            var result = "";
+            result += "商户姓名:" + RealName + "\n";
+            result += "商户手机号:" + Mobile + "\n";
+            result += "商户身份证号:" + CertId + "\n";
+
+            var check = db.UserFamilyMember.FirstOrDefault(m => m.Mobile == Mobile) ?? new UserFamilyMember();
+            if (check.Id > 0)
+            {
+                result += "已注册" + "\n";
+                if (check.Status == 1)
+                {
+                    result += "已认证" + "\n";
+                }
+                else
+                {
+                    result += "未认证" + "\n";
+                }
+            }
+            else
+            {
+                result += "未注册" + "\n";
+                result += "未认证" + "\n";
+            }
+            var linkCount = 0;//已关联机具数
+            linkCount = db.PosMerchantInfo.Count(m => m.MerchantName == RealName && m.MerchantMobile == Mobile && m.MerIdcardNo == CertId);
+            result += "已关联机具数:" + linkCount + "台" + "\n";
+            return result;
+        }
+
+        #endregion
+
+
     }
 }

+ 245 - 0
Areas/Admin/Views/MainServer/SysTools/SeeMerchantAuthInfo.cshtml

@@ -0,0 +1,245 @@
+@{
+    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="RealName"
+                                            name="RealName" 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 class="layui-form-item">
+                                    <label class="layui-form-label">商户身份证号</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="CertId"
+                                            name="CertId" 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/SeeMerchantAuthInfoDo?r=" + Math.random(1),
+                data: userdata,
+                dataType: "text",
+                success: function (data) {
+                    layer.close(index);
+                    layer.alert(data.replace(/\n/g, '<br />'), {area:['300px','450px']});
+                }
+            });
+        }
+        
+                    
+        //编辑器
+        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>