From 50d6fdef3b9a2f30b25314f134be9d822e539080 Mon Sep 17 00:00:00 2001 From: liuxiaoquan Date: Mon, 13 Mar 2023 18:55:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E5=85=A5=E9=A9=BB=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/route/merchant.php | 2 +- .../system/merchant/intention/lst.html | 89 +++++++++++-------- .../system/merchant/intention/status.html | 4 +- 3 files changed, 57 insertions(+), 38 deletions(-) diff --git a/app/admin/route/merchant.php b/app/admin/route/merchant.php index b1d61e3..9a13da9 100644 --- a/app/admin/route/merchant.php +++ b/app/admin/route/merchant.php @@ -53,7 +53,7 @@ Route::group(function(){ Route::get('lst', '/lst')->name('systemMerchantIntentionLst')->option([ '_alias' => '列表', ]); - Route::get('status', '/switchStatus')->name('systemMerchantIntentionStatus')->option([ + Route::post('status', '/switchStatus')->name('systemMerchantIntentionStatus')->option([ '_alias' => '审核', ]); Route::delete('delete', '/delete')->name('systemMerchantIntentionDelete')->option([ diff --git a/app/admin/view/merchant/system/merchant/intention/lst.html b/app/admin/view/merchant/system/merchant/intention/lst.html index f89cc4d..a8cb3b1 100644 --- a/app/admin/view/merchant/system/merchant/intention/lst.html +++ b/app/admin/view/merchant/system/merchant/intention/lst.html @@ -18,14 +18,14 @@
- - + + - - - - + + + +
@@ -53,11 +53,11 @@
- - - - - + + + + +
@@ -83,7 +83,6 @@
-
@@ -292,7 +291,7 @@ // var $ = layui.$, active = { reload: function(){ - let dataRload = getformdata();; + let dataRload = getformdata(); console.log(dataRload) //执行重载 table.reload('intention_list', { @@ -320,20 +319,41 @@ return false; }); + //选择时间 form.on('submit(chonse_date)', function(data){ - console.log(data.elem.name); - $('#chonse_date').val(data.elem.name); - layui.pageTable.reload({ - where: { - ...data.field - }, - page: { - curr: 1 - } - }); + var now = new Date().getTime(); //获取毫秒数 + + let value = ''; + let name = data.elem.name; + if (name =='today') { + value = now; + }else if(name == 'yeserday'){ + value = new Date(now - 1 * 86400 * 1000).getTime(); + }else if(name == 'week'){ + value = new Date(now - 7 * 86400 * 1000).getTime()+'-'+now; + }else if(name == '30day'){ + value = new Date(now - 30 * 86400 * 1000).getTime()+'-'+now; + }else if(name == 'month'){ + var day = now.getDate();//当前天份 + console.log(day); + var day = (new Date()).getMonth()+1;//当前月份 + value = new Date(now - day * 86400 * 1000).getTime() + }else if(name == 'year'){ + value = now.getFullYear();//获取当前年份 + } + $('#chonse_date').val(value); + active['reload'] ? active['reload'].call(this) : ''; + return false; }) + // 商户审核 + form.on('submit(statusform)', function(data) { + $('#status').val(data.elem.name); + active['reload'] ? active['reload'].call(this) : ''; + return false; + }); + //监听select提交 form.on('select(seleform)', function(data) { active['reload'] ? active['reload'].call(this) : ''; @@ -341,19 +361,18 @@ return false; }); - - - // 获取表单所有参数 - function getformdata() { - var form = $('#filterform').serializeArray(); - var data = new Array(); - for(let i=0;i {/block} diff --git a/app/admin/view/merchant/system/merchant/intention/status.html b/app/admin/view/merchant/system/merchant/intention/status.html index 7e2092d..0a8a71b 100644 --- a/app/admin/view/merchant/system/merchant/intention/status.html +++ b/app/admin/view/merchant/system/merchant/intention/status.html @@ -53,11 +53,11 @@ layer.msg(e.msg); if (e.code == 0) { setTimeout(function () { - // parent.location.reload(); + parent.location.reload(); }, 1000); } } - tool.get('/admin/merchant/intention/status', data.field, callback); + tool.post('/admin/merchant/intention/status', data.field, callback); return false; }); }