Просмотр исходного кода

助利宝添加导出、提现结果导入、提交代付平台相关功能
盟主提现修改功能,去掉顶端的驳回功能按钮

“DuGuYang” 3 лет назад
Родитель
Сommit
0eab04d7c9

+ 1 - 1
Areas/Admin/Controllers/MainServer/UserCashRecordController.cs

@@ -814,7 +814,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("CashOrderNo", "1"); //提现单号
             Fields.Add("CreateDate", "3"); //创建时间
 
-            string condition = " and Status>-1 and TradeType=3";
+            string condition = " and Status>-1 and TradeType=4";
             //创客编号
             if (!string.IsNullOrEmpty(MakerCode))
             {

+ 5 - 0
Areas/Admin/Views/MainServer/UserCashRecord/HelpProfitIndex.cshtml

@@ -102,6 +102,11 @@
                             <button class="layui-btn" data-type="ImportData"><i
                                 class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>提现结果导入</button>
                         }
+                        @if (RightInfo.Contains("," + right + "_cash,"))
+                        {
+                            <button class="layui-btn" data-type="Cash"><i
+                                class="layui-icon layui-icon-up layuiadmin-button-btn"></i>提交到代付平台</button>
+                        }
                     </div>
                 </div>
             </div>

+ 2 - 2
Areas/Admin/Views/MainServer/UserCashRecord/LeaderIndex.cshtml

@@ -87,11 +87,11 @@
                         <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
                             <i class="layui-icon layui-icon-list layuiadmin-button-btn"></i>全部
                         </button>
-                        @if (RightInfo.Contains("," + right + "_reduce,"))
+                        @* @if (RightInfo.Contains("," + right + "_reduce,"))
                         {
                             <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reduce"><i
                                 class="layui-icon layui-icon-edit"></i>驳回</button>
-                        }
+                        } *@
                         @if (RightInfo.Contains("," + right + "_export,"))
                         {
                             <button class="layui-btn" data-type="ExportExcel"><i

+ 70 - 70
wwwroot/layuiadmin/modules_main/HelpProfitAccountRecord_Admin.js

@@ -1,4 +1,4 @@
-var ExcelData,ExcelKind;
+var ExcelData, ExcelKind;
 function ConfirmImport() {
     $.ajax({
         type: "POST",
@@ -31,49 +31,49 @@ layui.config({
     //- 筛选条件-日期
     var laydate = layui.laydate;
     var layCreateDate = laydate.render({
-elem: '#CreateDate',
-type: 'datetime',
-range: true,
-trigger: 'click',
-change: function (value, date, endDate) {
-var op = true;
-if (date.year == endDate.year && endDate.month - date.month <= 1) {
-if (endDate.month - date.month == 1 && endDate.date > date.date) {
-op = false;
-layCreateDate.hint('日期范围请不要超过1个月');
-setTimeout(function () {
-$(".laydate-btns-confirm").addClass("laydate-disabled");
-}, 1);
-}
-} else {
-op = false;
-layCreateDate.hint('日期范围请不要超过1个月');
-setTimeout(function () {
-$(".laydate-btns-confirm").addClass("laydate-disabled");
-}, 1);
-}
-if (op) {
-$('#CreateDate').val(value);
-}
-}
-});
+        elem: '#CreateDate',
+        type: 'datetime',
+        range: true,
+        trigger: 'click',
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#CreateDate').val(value);
+            }
+        }
+    });
 
 
     //excel导入
-    excel = layui.excel;        
+    excel = layui.excel;
     $('#ExcelFile').change(function (e) {
         var files = e.target.files;
-        excel.importExcel(files, { }, function (data) {
+        excel.importExcel(files, {}, function (data) {
             ExcelData = data[0].sheet1;
         });
     });
 
     //监听单元格编辑
-    table.on('edit(LAY-list-manage)', function(obj){
+    table.on('edit(LAY-list-manage)', function (obj) {
         var value = obj.value //得到修改后的值
-        ,data = obj.data //得到所在行所有键值
-        ,field = obj.field; //得到字段
-        if(field == "Sort"){
+            , data = obj.data //得到所在行所有键值
+            , field = obj.field; //得到字段
+        if (field == "Sort") {
             $.ajax({
                 type: "POST",
                 url: "/Admin/HelpProfitAccountRecord/Sort?r=" + Math.random(1),
@@ -84,33 +84,33 @@ $('#CreateDate').val(value);
             });
         }
     });
-    
+
     //列表数据
     table.render({
         elem: '#LAY-list-manage'
         , url: '/Admin/HelpProfitAccountRecord/IndexData' //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
-    		, {field:'Id', fixed: 'left', title:'ID', width:80, sort: true, unresize: true}
-            ,{field:'UserId', width: 200, title:'创客', sort: true}
-,{field:'CreateDate', width: 200, title:'创建时间', sort: true}
-,{field:'ChangeType', width: 200, title:'变动类型', sort: true}
-,{field:'ProductType', width: 200, title:'产品类型', sort: true}
-,{field:'ChangeAmount', width: 200, title:'变更金额', sort: true}
-,{field:'BeforeTotalAmount', width: 200, title:'变更前总金额', sort: true}
-,{field:'AfterTotalAmount', width: 200, title:'变更后总金额', sort: true}
-,{field:'BeforeFreezeAmount', width: 200, title:'变更前冻结金额', sort: true}
-,{field:'AfterFreezeAmount', width: 200, title:'变更后冻结金额', sort: true}
-,{field:'BeforeBalanceAmount', width: 200, title:'变更前余额', sort: true}
-,{field:'AfterBalanceAmount', width: 200, title:'变更后余额', sort: true}
-,{field:'Remark', width: 200, title:'账户变动明细备注信息', sort: true}
-,{field:'TransRecordNo', width: 200, title:'交易流水编号', sort: true}
-
-            , {field:'Sort', fixed: 'right', title:'排序', width:80, edit: 'text'}
+            , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
+            , { field: 'UserId', width: 200, title: '创客', sort: true }
+            , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'ChangeType', width: 200, title: '变动类型', sort: true }
+            , { field: 'ProductType', width: 200, title: '产品类型', sort: true }
+            , { field: 'ChangeAmount', width: 200, title: '变更金额', sort: true }
+            , { field: 'BeforeTotalAmount', width: 200, title: '变更前总金额', sort: true }
+            , { field: 'AfterTotalAmount', width: 200, title: '变更后总金额', sort: true }
+            , { field: 'BeforeFreezeAmount', width: 200, title: '变更前冻结金额', sort: true }
+            , { field: 'AfterFreezeAmount', width: 200, title: '变更后冻结金额', sort: true }
+            , { field: 'BeforeBalanceAmount', width: 200, title: '变更前余额', sort: true }
+            , { field: 'AfterBalanceAmount', width: 200, title: '变更后余额', sort: true }
+            , { field: 'Remark', width: 200, title: '账户变动明细备注信息', sort: true }
+            , { field: 'TransRecordNo', width: 200, title: '交易流水编号', sort: true }
+
+            , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
             , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
-            
+
         }
         , page: true
         , limit: 30
@@ -132,7 +132,7 @@ $('#CreateDate').val(value);
                     data: "Id=" + data.Id,
                     dataType: "text",
                     success: function (data) {
-                        if (data == "success") {                            
+                        if (data == "success") {
                             obj.del();
                             layer.close(index);
                         } else {
@@ -155,20 +155,20 @@ $('#CreateDate').val(value);
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -179,7 +179,7 @@ $('#CreateDate').val(value);
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/HelpProfitAccountRecord/Edit?r=" + Math.random(1),
@@ -272,20 +272,20 @@ $('#CreateDate').val(value);
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -296,7 +296,7 @@ $('#CreateDate').val(value);
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/HelpProfitAccountRecord/Add?r=" + Math.random(1),
@@ -353,9 +353,9 @@ $('#CreateDate').val(value);
         , Open: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要开启的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";
@@ -382,9 +382,9 @@ $('#CreateDate').val(value);
         , Close: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要关闭的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";

+ 31 - 1
wwwroot/layuiadmin/modules_main/UserCashHelpRecord_Admin.js

@@ -542,7 +542,7 @@ layui.config({
             });
             $.ajax({
                 type: "GET",
-                url: "/Admin/UserCashRecord/LeaderExportExcel?r=" + Math.random(1),
+                url: "/Admin/UserCashRecord/HelpProfitExportExcel?r=" + Math.random(1),
                 data: userdata,
                 dataType: "json",
                 success: function (data) {
@@ -609,6 +609,36 @@ layui.config({
                 });
             }
         },
+        Cash: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要提交代付的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要提交到代付平台申请出款吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/UserCashRecord/Cash?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                layer.msg('提交成功,请等待代付平台处理');
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        },
     };
 
     $('.layui-btn').on('click', function () {