chuweiqiang 1 yıl önce
ebeveyn
işleme
ecae24226f

+ 10 - 20
app/admin/controller/Recruitment.php

@@ -143,28 +143,18 @@ class Recruitment extends Controller
     }
 
     public function collection(){
-
-//        if(AdminService::getUserId()==10000){
-//            $admin_id = [];
-//        }
-//        else{
-//            $admin_id['uid']=AdminService::getUserId();
-//        }
+        $where = [];
+        $data = input();
+        if(isset($data['link_id'])){
+            $where['a.link_id'] = $data['link_id'];
+        }
         $this->title='感兴趣用户列表';
         $name=input('title');
-        DataCollectionLog::where('type',3)->where()->order('id','desc')
-            ->layTable();
-//        DataRecruitment::mQuery()
-//            ->when($name,function (Query $query) use ($name) {
-//                $query->hasWhere('shipyard',function (Query $query) use ($name) {
-//                    $query->whereLike('name',"%{$name}%");
-//                });
-//            })
-//            ->where($admin_id)
-//            ->where('is_del',1)
-//            ->with(['datauser','shipyard'])
-//            ->order('id','desc')
-//            ->layTable();
+        DataCollectionLog::mQuery()->alias('a')
+            ->field('a.*,b.id uid,b.nickname,b.phone,b.base_sex')
+            ->join('data_user b','b.id=a.uuid')
+            ->where('a.type',3)->where($where)->order('a.id','desc')
+            ->page();
     }
 
 }

+ 90 - 46
app/admin/view/recruitment/collection.html

@@ -1,73 +1,117 @@
 {extend name='table'}
 {block name="button"}
 {if auth("add")}
-<button data-open='{:url("add")}' class='layui-btn layui-btn-sm layui-btn-primary'>添加招聘</button>
+
 {/if}
 {/block}
 {block name="content"}
-<!--<div class="layui-tab layui-tab-card">-->
-<!--    <div class="layui-tab-content">-->
-<!--        <form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">-->
-<!--            <div class="layui-form-item layui-inline">-->
-<!--                <label class="layui-form-label">申请船厂</label>-->
-<!--                <label class="layui-input-inline">-->
-<!--                    <input name="title" value="{$get.title|default=''}" placeholder="申请船厂" class="layui-input">-->
-<!--                </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>-->
-<!--        </form>-->
-<!--        <table id="Table" data-url="{:sysuri()}" data-target-search="form.form-search"></table>-->
-<!--    </div>-->
-<!--</div>-->
-<script>
+<div class="layui-tab layui-tab-card">
+    <div class="layui-tab-content">
+        <div class="layui-tab-content">
+
+            <table class="layui-table margin-top-10" lay-skin="line" >
+                {notempty name='list'}
+                <thead>
+                <tr>
+                    <th>用户id</th>
+                    <th>用户名称</th>
+                    <th>联系方式</th>
+                    <th>用户性别</th>
+                    <th>感兴趣时间</th>
+                </tr>
+                </thead>
+                {/notempty}
+                <tbody>
+                {foreach $list as $key=>$vo}
+                <tr>
+                    <!--                <td class='list-table-check-td think-checkbox'>-->
+                    <!--                    <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>-->
+                    <!--                </td>-->
+                    <!--                    <td class="nowrap">-->
+                    <!--                        {$vo.id}-->
+                    <!--                    </td>-->
+                    <td class="nowrap">
+                        {$vo.uid}
+                    </td>
+                    <td class="nowrap">
+                        {$vo.nickname}
+                    </td>
+                    <td class="nowrap">
+                        {$vo.phone}
+                    </td>
+                    <td class="nowrap">
+                        {$vo.base_sex}
+                    </td>
+                    <td class="nowrap">
+                        {$vo.create_at}
+                    </td>
+<!--                    <td class="nowrap">-->
+<!--                        <div>-->
+<!--                            <button class="layui-btn layui-btn-sm" data-title="查看" data-modal='{:url("audit")}?id={$vo.id}'>查看</button>-->
+<!--                            <button class="layui-btn layui-btn-sm" data-title="接单记录" data-width="1100px" data-modal='{:url("offer")}?repair_id={$vo.id}'>接单记录</button>-->
+<!--                        </div>-->
+<!--                    </td>-->
+                </tr>
+                {/foreach}
+                </tbody>
+            </table>
+            {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
+
+        </div>
+    </div>
+</div>
+<!--<script>
     $(function () {
         $('#Table').layTable({
             even: true, height: 'full',
             sort: {field: 'id', type: 'desc'},
             where: {},
             cols: [[
-                {field: 'shipyardname', title: '船厂', align: 'center', templet: function (d) {
-                        return d.shipyard?d.shipyard.name:'平台发布'
+                {field: 'shipyardname', title: '用户', align: 'center', templet: function (d) {
+                        return  d.user.nickname
+                    }},
+                {field: 'order_no', title: '订单号', align: 'center'},
+                {field: 'imgs', title: '图片',  align: 'center', templet:function (d) {
+                        if (d.imgs.length<1){
+                            return '无图片'
+                        }else {
+                            let b = ''
+                            for (var a=0;a<d.imgs.length;a++){
+                                b = b + '<div class="headimg headimg-no headimg-ss margin-0" data-tips-hover data-tips-image='+ d.imgs[a] +' style="background-image:url('+ d.imgs[a] +')"></div>&nbsp;'
+                            }
+                            return laytpl(b).render(d)
+                        }
+                    }},
+                {field: 'start_time', title: '维修开始时间', align: 'center'},
+                {field: 'end_time', title: '维修结束时间', align: 'center'},
+                {field: 'success_price', title: '匹配成功价格', align: 'center',templet:function (d) {
+                        if (d.success_price==0.00){
+                            return '未匹配'
+                        }else {
+                            return d.success_price
+                        }
                     }},
-                {field: 'title', title: '岗位名称', align: 'center'},
-                {field: 'number_person', title: '需要人数', align: 'center'},
-                {field: 'sex', title: '性别', align: 'center'},
-                {field: 'age', title: '年龄需求', align: 'center'},
-                {field: 'schooling', title: '学历', align: 'center'},
                 {field: 'province', title: '地址', align: 'center',templet:function (d) {
                         return d.province+d.city+d.area+d.address
                     }},
-                {field: 'experience', title: '经验', align: 'center'},
-                {field: 'working_time', title: '用工时长', align: 'center'},
-                {field: 'work_nature', title: '工作性质', align: 'center'},
-                {field: 'necessary_skills', title: '必备技能', align: 'center'},
-                {field: 'certificate', title: '证书', align: 'center'},
-                {field: 'remark', title: '备注', align: 'center'},
-                {field: 'state', title: '状态', align: 'center',templet(d){
-                        if(d.state===1){
-                            return `<span class="layui-badge layui-bg-green">正常</span>`
-                        }else{
-                            return `<span class="layui-badge layui-bg-red">下线</span>`
-                        }
+                {field: 'describe', title: '故障描述', align: 'center'},
+                {field: 'quick', title: '是否快修', align: 'center',templet:function (d) {
+                    if (d.quick==1){
+                        return '否'
+                    }else {
+                        return '是'
+                    }
                     }},
 
+
                 {field: 'create_at', title: '创建时间', align: 'center'},
+                {toolbar: '#toolbar', title: '操作', align: 'center', fixed: 'right'}
             ]]
         });
     });
-</script>
+</script>-->
 
 
 <!-- 列表排序权重模板 -->
-<script type="text/html" id="toolbar">
-    {if auth('audit')}
-    <button class="layui-btn layui-btn-sm" data-title="查看" data-modal='{:url("audit")}?id={{d.id}}'>查看</button>
-    <button class="layui-btn layui-btn-sm" data-title="编辑" data-open="{:url("edit")}?id={{d.id}}" style="{{-d.uid ?'display: none':''}}"  >编辑</button>
-    {/if}
-    <!--    <input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="已激活|已禁用" lay-filter="StatusSwitch" {{-d.uid=0?'checked':''}}>-->
 
-</script>
 {/block}

+ 2 - 1
app/admin/view/recruitment/index.html

@@ -55,7 +55,7 @@
                     }},
 
                 {field: 'create_at', title: '创建时间', align: 'center'},
-                {toolbar: '#toolbar', title: '操作', align: 'center',minWidth: 200, fixed: 'right'}
+                {toolbar: '#toolbar', title: '操作', align: 'center',minWidth: 300, fixed: 'right'}
             ]]
         });
     });
@@ -67,6 +67,7 @@
     {if auth('audit')}
     <button class="layui-btn layui-btn-sm" data-title="查看" data-modal='{:url("audit")}?id={{d.id}}'>查看</button>
     <button class="layui-btn layui-btn-sm" data-title="编辑" data-open="{:url("edit")}?id={{d.id}}" style="{{-d.uid ?'display: none':''}}"  >编辑</button>
+    <button class="layui-btn layui-btn-sm" data-title="感兴趣列表" data-width="1100px" data-modal='{:url("collection")}?link_id={{d.id}}'>感兴趣列表</button>
     {/if}
 <!--    <input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="已激活|已禁用" lay-filter="StatusSwitch" {{-d.uid=0?'checked':''}}>-->
 

+ 5 - 1
app/data/model/DataCollectionLog.php

@@ -2,6 +2,7 @@
 
 namespace app\data\model;
 
+use app\data\controller\api\User;
 use think\admin\Model;
 use think\db\Query;
 use think\facade\Db;
@@ -44,6 +45,9 @@ class DataCollectionLog extends Model
             DataShipyard::where('id',Db::raw("{$this->getTable()}.link_id"))->buildSql()
         );
     }
+    public function user(){
+        return $this->belongsTo(DataUser::class,'uuid');
+    }
     public static function isFav($uuid,$type,$id,$cate=1){
         return (bool)self::where('uuid',$uuid)
             ->where('cate',$cate)
@@ -69,4 +73,4 @@ class DataCollectionLog extends Model
             'cate'=>$cate,
         ]);
     }
-}
+}