lvhao 1 deň pred
rodič
commit
aacee566bb

+ 14 - 0
core/CoreApp/controllers/Beihuogl.php

@@ -87,6 +87,8 @@ class Beihuogl extends Start_Controller {
             $this->_deldyapply();
         }elseif($arg == 'dcdjzrk'){
             $this->_dcdjzrk();
+        }elseif($arg == 'dyapplyyjsh'){
+            $this->_dyapplyyjsh();
         }
 		else
 		{
@@ -1776,4 +1778,16 @@ class Beihuogl extends Start_Controller {
         }
 
     }
+
+    private function _dyapplyyjsh(){
+        if($this->input->method() === 'post'){
+            $arr_id = $this->input->post('arr_id',true);
+            $this->db->where_in('id',$arr_id);
+            $this->db->where('sq_status',1);
+            $this->db->update('bhsq',['sq_status'=>2]);
+            echo json_encode(['success'=>true,'msg'=>'审核通过']);exit;
+        }else{
+            echo json_encode(['success'=>false,'msg'=>'请求方式错误']);exit;
+        }
+    }
 }

+ 34 - 0
template/erp/beihuogl_dyapply.html

@@ -47,6 +47,9 @@
 <a href="javascript:void(0);" class="window" data-h="/beihuogl/dyapplyadd/" data-t="添加">添 加</a>
 <a href="/data/excelmoban/dysqbh.xlsx" >导入模板下载</a>
 <a href="javascript:void(0);" class="excel_import">EXCEL导入</a>
+{if $vip_id == 1}
+<a href="javascript:void(0);"  style="background-color: #FF4500;" onclick="yjsh()">一键审核</a>
+{/if}
 </div>
 
 <table class="datatitle data" border="0" style="border-collapse:collapse;">
@@ -290,6 +293,37 @@ function del_bhsq(that){
     });
 
     
+}
+function yjsh(){
+    let arr_id = [];
+    $("input[name='check']:checked").each(function(){
+        arr_id.push($(this).val());
+    })
+    if(arr_id.length == 0){
+        layx.msg("请选择要审核的数据", {
+                dialogIcon: 'warn',
+                position: 'cc',
+                time: 1000
+        });
+        return ;
+    }
+    layx.load('loadId','审核中,请稍后',{shadable:0.6});
+    $.post("/beihuogl/dyapplyyjsh",{arr_id:arr_id},function(a){
+        
+        if(a.success){
+            layx.msg(a.msg, {
+                dialogIcon: a.success ? 'success' : 'error',
+                position: 'cc',
+            });
+            $(".search span").click();
+        }else{
+            layx.msg(a.msg, {
+                dialogIcon: a.success ? 'success' : 'error',
+                position: 'cc',
+                time: 1000
+            });
+        }
+    },'json')
 }
 </script>
 <script type="text/javascript" src="{$theme}js/laydate.js"></script>