Browse Source

商家审核、人才审核、船厂审核、维修工审核等页面上面分组显示: 待审核、已审核

qifengquan 1 year ago
parent
commit
037cd8fcf1

+ 2 - 0
app/admin/controller/Maintenance.php

@@ -40,6 +40,7 @@ class Maintenance extends Controller
      * @menu true
      */
     public function index(){
+        $this->assign('audit',DataMaintenance::$audit);
         $this->title='维修工列表';
         $name=input('name');
         DataMaintenance::mQuery()
@@ -48,6 +49,7 @@ class Maintenance extends Controller
                     $query->whereLike('nickname',"%{$name}%");
                 });
             })
+            ->equal('audit')
             ->like('title')
             ->with(['user'])
             ->order('id','desc')

+ 12 - 0
app/admin/controller/Merchant.php

@@ -23,9 +23,21 @@ class Merchant extends Controller
      */
     public function index(){
         $this->title='商家审核管理';
+
+        // 列表选项卡状态
+//        if (is_numeric($this->type = trim(input('type', '0'), 't'))) {
+//          $where = [];
+//          $this->type==0?$where[]=['audit','in',[1,3]]:$where[]=['audit','in',[2]];
+        $this->assign('audit',DataMerchants::getAudit());
+
+//        $this->type = trim(input('type', '0'), 't');
+//          print_r($this->type);
+//        }
+//        print_r($where);
         DataMerchants::mQuery()
             ->like('name')
             ->dateBetween('create_at')
+            ->equal('audit')
             ->layTable();
     }
     /**

+ 2 - 0
app/admin/controller/PoolTalent.php

@@ -77,9 +77,11 @@ class PoolTalent extends Controller
      * @menu true
      */
     public function index(){
+        $this->assign('audit',DataPoolTalent::$audit);
         $this->title='人才申请管理';
         $name=input('name');
         DataPoolTalent::mQuery()
+            ->equal('audit')
             ->when($name,function (Query $query) use ($name) {
                 $query->hasWhere('user',function (Query $query) use ($name) {
                     $query->whereLike('nickname',"%{$name}%");

+ 11 - 0
app/admin/view/maintenance/index.html

@@ -15,6 +15,17 @@
                 </label>
             </div>
             <div class="layui-form-item layui-inline">
+                <label class="layui-form-label">状态</label>
+                <label class="layui-input-inline">
+                    <select name="audit">
+                        <option value="">全部</option>
+                        {foreach $audit as $k=>$a}
+                        <option value="{$k}">{$a}</option>
+                        {/foreach}
+                    </select>
+                </label>
+            </div>
+            <div class="layui-form-item layui-inline">
                 <input type="hidden" name="type" value="{$type|default='index'}">
                 <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
             </div>

+ 12 - 0
app/admin/view/merchant/index.html

@@ -23,6 +23,18 @@
             </div>
 
             <div class="layui-form-item layui-inline">
+                <label class="layui-form-label">状态</label>
+                <label class="layui-input-inline">
+                    <select name="audit">
+                        <option value="">全部</option>
+                        {foreach $audit as $k=>$a}
+                        <option value="{$k}">{$a}</option>
+                        {/foreach}
+                    </select>
+                </label>
+            </div>
+
+            <div class="layui-form-item layui-inline">
                 <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
             </div>
         </form>

+ 11 - 0
app/admin/view/pool_talent/index.html

@@ -13,6 +13,17 @@
                 </label>
             </div>
             <div class="layui-form-item layui-inline">
+                <label class="layui-form-label">状态</label>
+                <label class="layui-input-inline">
+                    <select name="audit">
+                        <option value="">全部</option>
+                        {foreach $audit as $k=>$a}
+                        <option value="{$k}">{$a}</option>
+                        {/foreach}
+                    </select>
+                </label>
+            </div>
+            <div class="layui-form-item layui-inline">
                 <input type="hidden" name="type" value="{$type|default='index'}">
                 <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
             </div>

+ 14 - 0
app/data/model/DataMaintenance.php

@@ -25,4 +25,18 @@ class DataMaintenance extends Model
         return $this->belongsTo(DataUser::class,'uuid');
     }
 
+    public static $audit=[
+        1=>'待审核',
+        2=>'审核通过',
+        3=>'审核不通过',
+    ];
+
+    /**
+     * @return array
+     */
+    public static function getAudit(): array
+    {
+        return self::$audit;
+    }
+
 }

+ 13 - 0
app/data/model/DataMerchants.php

@@ -51,4 +51,17 @@ class DataMerchants extends Model
     public static function getByAdmin($adminId){
         return self::where('admin_id',$adminId)->find();
     }
+    public static $audit=[
+        1=>'待审核',
+        2=>'审核通过',
+        3=>'审核不通过',
+    ];
+
+    /**
+     * @return string[]
+     */
+    public static function getAudit(): array
+    {
+        return self::$audit;
+    }
 }

+ 14 - 0
app/data/model/DataPoolTalent.php

@@ -50,4 +50,18 @@ class DataPoolTalent extends Model
         $model['download_url_code'] = sysconf('android.download_url_code');
     }
 
+    public static $audit=[
+        1=>'待审核',
+        2=>'审核通过',
+        3=>'审核不通过',
+    ];
+
+    /**
+     * @return array
+     */
+    public static function getAudit(): array
+    {
+        return self::$audit;
+    }
+
 }