Эх сурвалжийг харах

Merge branch 'feature-dgy-后台优化' into DuGuYang

DuGuYang 3 жил өмнө
parent
commit
4ad326525e

+ 57 - 12
Areas/Admin/Controllers/MainServer/LeaderReserveRecordController.cs

@@ -51,7 +51,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 根据条件查询盟主兑换机具券列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(LeaderReserveRecord data, string UserIdMakerCode, string LeaderLevelSelect, string CreateDateData, int page = 1, int limit = 30)
+        public JsonResult IndexData(LeaderReserveRecord data, string UserIdMakerCode, string SourceMakerCode, string RemarkSelect, string CreateDateData, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -59,12 +59,22 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("SeoKeyword", "1"); //订单编号
 
 
-            string condition = " and Status>-1 and QueryCount=1";
+            string condition = " and Status>-1";
             //创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
                 condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
+            //购券创客
+            if (!string.IsNullOrEmpty(SourceMakerCode))
+            {
+                condition += " and SourceUserId in (select UserId from UserForMakerCode where MakerCode='" + SourceMakerCode + "')";
+            }
+            //变动类型
+            if (!string.IsNullOrEmpty(RemarkSelect))
+            {
+                condition += " and Remark='" + RemarkSelect + "'";
+            }
             //创建时间
             if (!string.IsNullOrEmpty(CreateDateData))
             {
@@ -82,25 +92,60 @@ namespace MySystem.Areas.Admin.Controllers
                 //创客
                 int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
                 Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                UserAccount userAccount = db.UserAccount.FirstOrDefault(m => m.Id == UserId) ?? new UserAccount();
+                dic["LeaderBalanceAmount"] = userAccount.LeaderBalanceAmount;
                 dic["UserIdMakerCode"] = userid_Users.MakerCode;
                 dic["UserIdRealName"] = userid_Users.RealName;
                 dic.Remove("UserId");
 
+                //购券创客
+                int SourceUserId = int.Parse(function.CheckInt(dic["SourceUserId"].ToString()));
+                if (SourceUserId > 0)
+                {
+                    Users sourceUser = db.Users.FirstOrDefault(m => m.Id == SourceUserId) ?? new Users();
+                    dic["SourceMakerCode"] = sourceUser.MakerCode;
+                    dic.Remove("SourceUserId");
+                }
+                // else
+                // {
+                //     int OrderId = int.Parse(function.CheckInt(dic["OrderId"].ToString()));
+                //     var order = db.Orders.FirstOrDefault(m => m.Id == OrderId) ?? new Orders();
+                //     Users sourceUser = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
+                //     dic["SourceMakerCode"] = sourceUser.MakerCode;
+                //     dic.Remove("OrderId");
+                // }
+
+                // //购券创客
+                // int SourceUserId = int.Parse(function.CheckInt(dic["SourceUserId"].ToString()));
+                // Users sourceUser = db.Users.FirstOrDefault(m => m.Id == SourceUserId) ?? new Users();
+                // dic["SourceMakerCode"] = sourceUser.MakerCode;
+                // dic.Remove("SourceUserId");
+
+                // //订单来源创客
+                // int OrderId = int.Parse(function.CheckInt(dic["OrderId"].ToString()));
+                // var order = db.Orders.FirstOrDefault(m => m.Id == OrderId) ?? new Orders();
+                // Users sourceOrderUser = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
+                // dic["SourceOrderMakerCode"] = sourceOrderUser.MakerCode;
+                // dic.Remove("OrderId");
+
                 //订单信息
                 JsonData ApplyList = JsonMapper.ToObject(dic["SeoTitle"].ToString());//申请数据
                 dic["dPosCoupons"] = "";
-                dic["dPosCoupons"] = "";
-                for (int i = 0; i < ApplyList.Count; i++)
+                dic["bPosCoupons"] = "";
+                if (!string.IsNullOrEmpty(dic["SeoTitle"].ToString()))
                 {
-                    int num = Convert.ToInt32(ApplyList[i]["Num"].ToString());
-                    int type = Convert.ToInt32(ApplyList[i]["Type"].ToString());
-                    if (type == 1)
-                    {
-                        dic["dPosCoupons"] = num + "张";
-                    }
-                    else
+                    for (int i = 0; i < ApplyList.Count; i++)
                     {
-                        dic["bPosCoupons"] = num + "张";
+                        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 + "张";
+                        }
                     }
                 }
 

+ 28 - 2
Areas/Admin/Controllers/MainServer/MerchantDepositReturnsController.cs

@@ -52,7 +52,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 首台商户退押金申请记录列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(MerchantDepositReturns data, string CreateDateData, string UpdateDateData, string MerchantName, string PosSn, string PayKindSelect, string BankNameSelect, string StatusSelect = "0", int page = 1, int limit = 30)
+        public JsonResult IndexData(MerchantDepositReturns data, string CreateDateData, string UpdateDateData, string MerchantName, string PosSn, string PayKindSelect, string BankNameSelect, string BrandId, string StatusSelect = "0", int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -78,6 +78,19 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and BankName='" + BankNameSelect + "'";
             }
+            //品牌
+            if (!string.IsNullOrEmpty(BrandId))
+            {
+                int brandId = int.Parse(BrandId);
+                var merchantIds = "";
+                var posMerchantInfo = db.PosMerchantInfo.Where(m => m.Status > -1 && m.BrandId == brandId && m.StandardMonths == 10).ToList();
+                foreach (var item in posMerchantInfo)
+                {
+                    merchantIds += item.Id + ",";
+                }
+                merchantIds = merchantIds.TrimEnd(',');
+                condition += " and MerchantId In(" + merchantIds + ")";
+            }
             //创建时间
             if (!string.IsNullOrEmpty(CreateDateData))
             {
@@ -193,7 +206,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 非首台商户退押金申请记录列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexsData(MerchantDepositReturns data, string CreateDateData, string UpdateDateData, string MerchantName, string PosSn, string PayKindSelect, string BankNameSelect, string StatusSelect = "0", int page = 1, int limit = 30)
+        public JsonResult IndexsData(MerchantDepositReturns data, string CreateDateData, string UpdateDateData, string MerchantName, string PosSn, string PayKindSelect, string BankNameSelect, string BrandId, string StatusSelect = "0", int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -219,6 +232,19 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and BankName='" + BankNameSelect + "'";
             }
+            //品牌
+            if (!string.IsNullOrEmpty(BrandId))
+            {
+                int brandId = int.Parse(BrandId);
+                var merchantIds = "";
+                var posMerchantInfo = db.PosMerchantInfo.Where(m => m.Status > -1 && m.BrandId == brandId && m.StandardMonths == 10).ToList();
+                foreach (var item in posMerchantInfo)
+                {
+                    merchantIds += item.Id + ",";
+                }
+                merchantIds = merchantIds.TrimEnd(',');
+                condition += " and MerchantId In(" + merchantIds + ")";
+            }
             //创建时间
             if (!string.IsNullOrEmpty(CreateDateData))
             {

+ 5 - 0
Areas/Admin/Controllers/MainServer/OrdersController.cs

@@ -511,9 +511,14 @@ namespace MySystem.Areas.Admin.Controllers
             string[] Ids = IdList.TrimEnd('#').Split('#');
             string[] StoreIds = StoreIdList.TrimEnd('#').Split('#');
             string[] SnNoss = SnNosList.TrimEnd('#').Split('#');
+            int[] pIds = new int[] { 42, 41, 21, 20, 19, 18, 17, 16, 14, 13, 12, 9, 8, 7 };
             for (int i = 0; i < Ids.Length; i++)
             {
                 int Id = int.Parse(Ids[i]);
+                if (pIds.Contains(Id))
+                {
+                    Fields.Add("Status", 3);
+                }
                 int StoreId = int.Parse(StoreIds[i]);
                 string SnNos = SnNoss[i];
                 OrderProduct pro = db.OrderProduct.FirstOrDefault(m => m.Id == Id);

+ 20 - 0
Areas/Admin/Views/MainServer/LeaderReserveRecord/Index.cshtml

@@ -50,6 +50,26 @@
                             <input class="layui-input" type="text" name="UserIdMakerCode" autocomplete="off">
                         </div>
                     </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">购券创客</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" name="SourceMakerCode" autocomplete="off">
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">变动类型</label>
+                        <div class="layui-input-inline">
+                            <select id="RemarkSelect" name="RemarkSelect" lay-search="">
+                                <option value="">全部...</option>
+                                <option value="储备金购买">储备金购买</option>
+                                <option value="兑换机具券">兑换机具券</option>
+                                <option value="商城购机">商城购机</option>
+                                <option value="推荐小盟主">推荐小盟主</option>
+                                <option value="机具券兑换">机具券兑换</option>
+                                <option value="系统增加(盟主储蓄金)">系统增加(盟主储蓄金)</option>
+                                <option value="购机奖励">购机奖励</option>
+                            </select>
+                        </div>
                     <div class="layui-inline">
                         <label class="layui-form-label">订单编号</label>
                         <div class="layui-input-inline">

+ 17 - 2
Areas/Admin/Views/MainServer/MerchantDepositReturns/Index.cshtml

@@ -122,6 +122,21 @@
                             </select>
                         </div>
                     </div>
+                    @{
+                        Dictionary<string, string> ProfitObjectsActivesDic = new MySystem.DictionaryClass().getKqProductBrandDic();
+                    }
+                    <div class="layui-inline">
+                        <label class="layui-form-label">品牌</label>
+                        <div class="layui-input-inline">
+                            <select id="BrandId" name="BrandId" lay-search="">
+                                <option value="">全部...</option>
+                                @foreach (string key in ProfitObjectsActivesDic.Keys)
+                                {
+                                    <option value="@key">@ProfitObjectsActivesDic[key]</option>
+                                }
+                            </select>
+                        </div>
+                    </div>
                     <div class="layui-inline">
                         <label class="layui-form-label">商户姓名</label>
                         <div class="layui-input-inline">
@@ -175,7 +190,7 @@
                     @if (RightInfo.Contains("," + right + "_import,"))
                     {
                         <button class="layui-btn" data-type="ImportData"><i
-                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>退押结果导入</button>
+                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>领取达标奖结果导入</button>
                     }
                     @* @if (RightInfo.Contains("," + right + "_cash,"))
                         {
@@ -184,7 +199,7 @@
                         } *@
                 </div>
                 <blockquote class="layui-elem-quote layui-text">
-                    退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;"
+                    服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;"
                         id="fReturnAmount">0.00</span>
                 </blockquote>
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>

+ 17 - 2
Areas/Admin/Views/MainServer/MerchantDepositReturns/Indexs.cshtml

@@ -124,6 +124,21 @@
                             </select>
                         </div>
                     </div>
+                    @{
+                        Dictionary<string, string> ProfitObjectsActivesDic = new MySystem.DictionaryClass().getKqProductBrandDic();
+                    }
+                    <div class="layui-inline">
+                        <label class="layui-form-label">品牌</label>
+                        <div class="layui-input-inline">
+                            <select id="BrandId" name="BrandId" lay-search="">
+                                <option value="">全部...</option>
+                                @foreach (string key in ProfitObjectsActivesDic.Keys)
+                                {
+                                    <option value="@key">@ProfitObjectsActivesDic[key]</option>
+                                }
+                            </select>
+                        </div>
+                    </div>
                     <div class="layui-inline">
                         <label class="layui-form-label">商户姓名</label>
                         <div class="layui-input-inline">
@@ -177,7 +192,7 @@
                     @if (RightInfo.Contains("," + right + "_import,"))
                     {
                         <button class="layui-btn" data-type="ImportData"><i
-                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>退押结果导入</button>
+                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>领取达标奖结果导入</button>
                     }
                     @* @if (RightInfo.Contains("," + right + "_cash,"))
                         {
@@ -186,7 +201,7 @@
                         } *@
                 </div>
                 <blockquote class="layui-elem-quote layui-text">
-                    退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;"
+                    服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;"
                         id="fReturnAmount">0.00</span>
                 </blockquote>
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>

+ 1 - 1
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexfs.cshtml

@@ -87,7 +87,7 @@
                 </div>
             </div>
             <blockquote class="layui-elem-quote layui-text">
-                退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
+                服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
             </blockquote>
             <div class="layui-card-body">
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>

+ 1 - 1
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexnfs.cshtml

@@ -87,7 +87,7 @@
                 </div>
             </div>
             <blockquote class="layui-elem-quote layui-text">
-                退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
+                服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
             </blockquote>
             <div class="layui-card-body">
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>

+ 1 - 1
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexrg.cshtml

@@ -93,7 +93,7 @@
                         }
                     </div>
                     <blockquote class="layui-elem-quote layui-text">
-                        退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;" id="ReturnAmounts">0.00</span>
+                        服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;" id="ReturnAmounts">0.00</span>
                     </blockquote>
                 </div>
             </div>

+ 3 - 0
wwwroot/layuiadmin/modules_main/LeaderReserveRecord_Admin.js

@@ -95,9 +95,12 @@ layui.config({
             , { field: 'UserIdMakerCode', width: 200, title: '创客编号', sort: true }
             , { field: 'UserIdRealName', width: 200, title: '真实姓名', sort: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'Remark', width: 200, title: '变动类型', sort: true }
+            , { field: 'SourceMakerCode', width: 200, title: '购券创客', sort: true }
             , { field: 'SeoKeyword', width: 200, title: '订单编号', sort: true }
             , { field: 'dPosCoupons', width: 200, title: '电签兑换券', sort: true }
             , { field: 'bPosCoupons', width: 200, title: '大POS兑换券', sort: true }
+            , { field: 'LeaderBalanceAmount', width: 200, title: '可提现余额', sort: true }
             , { field: 'ChangeAmt', width: 200, title: '使用额度', sort: true }
             , { field: 'BeforeAmt', width: 200, title: '使用前剩余额度', sort: true }
             , { field: 'AfterAmt', width: 200, title: '使用后剩余额度', sort: true }

+ 4 - 4
wwwroot/layuiadmin/modules_main/MerchantDepositReturns_Admin.js

@@ -134,13 +134,13 @@ layui.config({
             , { field: 'MerchantIdKqSnNo', width: 200, title: '机具Sn', sort: true }
             , { field: 'MerchantIdMerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'MerchantIdMerRealName', width: 200, title: '商户姓名', sort: true }
-            , { field: 'SeoKeyword', width: 200, title: '退押订单号', sort: true }
+            , { field: 'SeoKeyword', width: 200, title: '申请订单号', sort: true }
             , { field: 'AlipayAccountNo', width: 200, title: '支付宝账号', sort: true }
             , { field: 'BankCardNo', width: 200, title: '银行卡号', sort: true }
             , { field: 'BankName', width: 200, title: '开户行', sort: true }
             , { field: 'PayKindName', width: 200, title: '退款类型', sort: true }
-            , { field: 'ReturnAmount', width: 200, title: '返还金额', sort: true }
-            , { field: 'ReturnAmounts', width: 200, title: '实际返还金额', sort: true }
+            , { field: 'ReturnAmount', width: 200, title: '服务费金额', sort: true }
+            , { field: 'ReturnAmounts', width: 200, title: '达标奖金额', sort: true }
             , { field: 'SeoTitle', width: 200, title: '操作人', sort: true }
 
             // , { title: '操作', align: 'center', width: 400, fixed: 'right', toolbar: '#table-list-tools' }
@@ -367,7 +367,7 @@ layui.config({
                 cancel: function () {
                 }
             });
-            $("#excelTemp").html('<a href="/users/退押结果模版.xlsx">点击下载退押结果模版</a>');
+            $("#excelTemp").html('<a href="/users/达标奖领取结果模版.xlsx">点击下载达标奖领取结果模版</a>');
         }
         , ExportExcel: function () {
             var userdata = '';

+ 4 - 4
wwwroot/layuiadmin/modules_main/MerchantDepositReturnsn_Admin.js

@@ -134,13 +134,13 @@ layui.config({
             , { field: 'MerchantIdKqSnNo', width: 200, title: '机具Sn', sort: true }
             , { field: 'MerchantIdMerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'MerchantIdMerRealName', width: 200, title: '商户姓名', sort: true }
-            , { field: 'SeoKeyword', width: 200, title: '退押订单号', sort: true }
+            , { field: 'SeoKeyword', width: 200, title: '申请订单号', sort: true }
             , { field: 'AlipayAccountNo', width: 200, title: '支付宝账号', sort: true }
             , { field: 'BankCardNo', width: 200, title: '银行卡号', sort: true }
             , { field: 'BankName', width: 200, title: '开户行', sort: true }
             , { field: 'PayKindName', width: 200, title: '退款类型', sort: true }
-            , { field: 'ReturnAmount', width: 200, title: '返还金额', sort: true }
-            , { field: 'ReturnAmounts', width: 200, title: '实际返还金额', sort: true }
+            , { field: 'ReturnAmount', width: 200, title: '服务费金额', sort: true }
+            , { field: 'ReturnAmounts', width: 200, title: '达标奖金额', sort: true }
             , { field: 'SeoTitle', width: 200, title: '操作人', sort: true }
 
             // , { title: '操作', align: 'center', width: 400, fixed: 'right', toolbar: '#table-list-tools' }
@@ -367,7 +367,7 @@ layui.config({
                 cancel: function () {
                 }
             });
-            $("#excelTemp").html('<a href="/users/退押结果模版.xlsx">点击下载退押结果模版</a>');
+            $("#excelTemp").html('<a href="/users/达标奖领取结果模版.xlsx">点击下载达标奖领取结果模版</a>');
         }
         , ExportExcel: function () {
             var userdata = '';

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

@@ -125,7 +125,7 @@ layui.config({
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'PosSn', width: 220, title: '机具SN号', sort: true }
-            , { field: 'SeoKeyword', width: 220, title: '押金', sort: true }
+            , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
         ]]
         , where: {
         }

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

@@ -125,7 +125,7 @@ layui.config({
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'PosSn', width: 220, title: '机具SN号', sort: true }
-            , { field: 'SeoKeyword', width: 220, title: '押金', sort: true }
+            , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
         ]]
         , where: {
         }

+ 2 - 2
wwwroot/layuiadmin/modules_main/PosMerchantInforgList_Admin.js

@@ -124,9 +124,9 @@ layui.config({
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'KqSnNo', width: 220, title: '机具SN号', sort: true }
-            , { field: 'SeoKeyword', width: 220, title: '实际押金', sort: true }
+            , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
             // , { field: 'PrizeParams', width: 220, title: '设置押金', sort: true }
-            , { field: 'Remark', width: 220, title: '已退金额', sort: true }
+            , { field: 'Remark', width: 220, title: '达标奖', sort: true }
         ]]
         , where: {
         }

BIN
wwwroot/users/达标奖领取结果模版.xlsx


BIN
wwwroot/users/退押结果模版.xlsx