diff --git a/app/admin/view/merchant/system/merchant/intention/lst.html b/app/admin/view/merchant/system/merchant/intention/lst.html index 149356f..0bb3754 100644 --- a/app/admin/view/merchant/system/merchant/intention/lst.html +++ b/app/admin/view/merchant/system/merchant/intention/lst.html @@ -25,7 +25,7 @@
- + @@ -347,8 +347,12 @@ }else if(name == 'year'){ var year = (new Date()).getFullYear();//获取当前年份 start_date = year+'-01-01' + }else{ + end_date = ''; } + switchClass(this) + switchDateForm(false); $('#chonse_start_date').val(start_date); $('#chonse_end_date').val(end_date); @@ -358,24 +362,7 @@ return false; }) - // 两个时间表单是互斥的,只能提交一个 - function switchDateForm(chonse=false) - { - let range = chonse?false:true; - $('#start-date').attr("disabled",range); - $('#end-date').attr("disabled",range); - - $('#chonse_start_date').attr("disabled",chonse); - $('#chonse_end_date').attr("disabled",chonse); - - if (chonse) { - $('#chonse_start_date').val(""); - $('#chonse_end_date').val(""); - }else{ - $('#start-date').val(""); - $('#end-date').val(""); - } - } + // 商户审核 form.on('submit(statusform)', function(data) { @@ -394,7 +381,7 @@ }else{ $('#status').attr('disabled', false); } - + switchClass(this) $('#status').val(status); active['reload'] ? active['reload'].call(this) : ''; return false; @@ -409,6 +396,30 @@ }); + // 切换button选中样式 + function switchClass(e) + { + $(e).removeClass('layui-btn-primary') + $(e).siblings().addClass('layui-btn-primary') + } + + // 两个时间表单是互斥的,只能提交一个 + function switchDateForm(chonse=false) + { + let range = chonse?false:true; + $('#start-date').attr("disabled",range); + $('#end-date').attr("disabled",range); + + $('#chonse_start_date').attr("disabled",chonse); + $('#chonse_end_date').attr("disabled",chonse); + if (chonse) { + $('#chonse_start_date').val(""); + $('#chonse_end_date').val(""); + }else{ + $('#start-date').val(""); + $('#end-date').val(""); + } + } //获取n天以前日期 function getDaysAgo(n=0) {