Browse Source

报备记录

linwu 1 year ago
parent
commit
2a620ec24a

+ 10 - 8
app/mobile/controller/Worker.php

@@ -138,7 +138,7 @@ class Worker extends MobileBaseController
         $data['createtime'] = time();
         OutRecruitReport::create($data);
 
-        ajax_return(0, '报名成功,经纪人:' . $broker['title'] . '(<a href="tel:' . $broker['mobile'] . '">' . $broker['mobile'] . '</a>)','/mobile/worker/index');
+        ajax_return(0, '报名成功,经纪人:' . $broker['title'] . '(<a href="tel:' . $broker['mobile'] . '">' . $broker['mobile'] . '</a>)', '/mobile/worker/index');
     }
 
     /**
@@ -146,14 +146,15 @@ class Worker extends MobileBaseController
      */
     public function broker()
     {
-        return view();
+        return view('worker/broker');
     }
 
     public function listBroker()
     {
         $agent = $this->get_agent();
 
-        $list = OutRecruitModel::where('agentid',$agent['id'])
+        $list = BrokerModel::where('agentid', $agent['id'])
+            ->where('status', 1)
             ->limit(input('limit', 10))
             ->page(input('page', 1))
             ->select();
@@ -168,10 +169,10 @@ class Worker extends MobileBaseController
     {
         $mobile = input('mobile');
         if (empty($mobile)) {
-            return view();
+            return view('worker/report_find');
         }
 
-        $report = OutRecruitReport::where('mobile',$mobile)->find();
+        $report = OutRecruitReport::where('mobile', $mobile)->find();
         if (empty($report)) {
             ajax_return(1, '暂无信息');
         }
@@ -182,10 +183,11 @@ class Worker extends MobileBaseController
 
     public function listReport()
     {
-        $map   = $this->dealEqualInput(['mobile']);
+        $map = $this->dealEqualInput(['mobile']);
 
-        $list = OutRecruitReport::where($map)
-            ->order([ 'id' => 'desc'])
+        $list = OutRecruitReport::with(['recruit'])
+            ->where($map)
+            ->order(['id' => 'desc'])
             ->limit(input('limit', 10))
             ->page(input('page', 1))
             ->select();

+ 38 - 0
app/mobile/view/worker/broker.html

@@ -0,0 +1,38 @@
+{extend name="public/base"/}
+{block name="css"}
+<style>
+
+</style>
+{/block}
+{block name="body"}
+<van-nav-bar
+        class="nav-theme"
+        :fixed="true"
+        :placeholder="true"
+>
+    <template #title>
+        <span class="text-white">经纪人</span>
+    </template>
+</van-nav-bar>
+
+{include file="public/list_load" list="<broker-list :list='list'></broker-list>" /}
+
+<van-tabbar v-model="active" :placeholder="true">
+    <van-tabbar-item icon="newspaper-o" url="{:url('worker/index')}">招聘信息</van-tabbar-item>
+    <van-tabbar-item icon="user-o" url="{:url('worker/broker')}">经纪人</van-tabbar-item>
+    <van-tabbar-item icon="search" url="{:url('worker/reportFind')}">报备查询</van-tabbar-item>
+</van-tabbar>
+{/block}
+{block name="script"}
+<script>
+    function v_setup() {
+        let base = list_load('worker/listBroker');
+        base.active = 1;
+
+        return base;
+    }
+</script>
+{/block}
+{block name="vue"}
+    <script src="__COMPONENTS__/brokerList.js"></script>
+{/block}

+ 139 - 0
app/mobile/view/worker/report_find.html

@@ -0,0 +1,139 @@
+{extend name="public/base"/}
+{block name="css"}
+<style>
+    .broker {background:white;margin-top:10px;padding:10px 20px;}
+    .broker .header {padding-bottom:10px;border-bottom:1px solid #eee;color:#000;font-weight:bold;text-align:center;}
+    .broker .content {padding-top:10px;display:flex;justify-content:space-between;align-items:center;}
+    .broker .content .region,.broker .content .phone {display:flex;align-items:center;}
+    .broker .content .region .region-name {margin-left:5px;}
+    .detail-header {padding:10px;border-bottom:1px solid #eee;text-align:center;}
+    .detail-content {padding:0 10px 20px 10px;}
+    .detail-content .item {margin-top:10px;}
+    .detail-content .title{color:#999;}
+</style>
+{/block}
+{block name="body"}
+<van-nav-bar
+        class="nav-theme"
+        :fixed="true"
+        :placeholder="true"
+>
+    <template #title>
+        <span class="text-white">报备查询</span>
+    </template>
+</van-nav-bar>
+<van-search
+        v-model="form.mobile"
+        placeholder="请输入手机号"
+        @search="onSearch"
+        @cancel="onCancel"
+        show-action
+>
+    <template #action>
+        <div @click="onCancel">重置</div>
+    </template>
+</van-search>
+<van-empty  v-if="!broker.title" image="search" description="暂无信息"></van-empty>
+
+<div v-if="broker.title">
+    <div class="broker">
+        <div class="header">经纪人信息</div>
+        <div class="content">
+            <div class="region">
+                <van-image
+                        width="14px"
+                        src="/static/images/applet/index/cardA.png"
+                ></van-image>
+                <span class="region-name">{{broker.title}}</span>
+            </div>
+        </div>
+        <div class="content">
+            <div class="region">
+                <van-image
+                        width="14px"
+                        src="/static/images/applet/index/cardD.png"
+                ></van-image>
+                <span class="region-name">{{broker.region}}</span>
+            </div>
+            <a class="phone" :href="'tel:' + broker.mobile">
+                <van-image
+                        height="20px"
+                        src="/static/images/applet/broker/contact.png"
+                ></van-image>
+            </a>
+        </div>
+    </div>
+
+    {include file="public/list_load" list="<worker-report-list @detail='onDetail' :list='list'></worker-report-list>" /}
+</div>
+
+<van-popup
+        v-model:show="showDetail"
+        position="bottom"
+>
+    <div class="detail-header">报备详情</div>
+    <div class="detail-content">
+        <div class="item"><span class="title">招聘标题:</span>{{detail.recruit.title}}</div>
+        <div class="item"><span class="title">报备姓名:</span>{{detail.realname}}</div>
+        <div class="item"><span class="title">报备电话:</span>{{detail.mobile}}</div>
+        <div class="item"><span class="title">身份证号:</span>{{detail.idcard}}</div>
+        <div class="item"><span class="title">预到时间:</span>{{detail.arrivetime}}</div>
+        <div class="item"><span class="title">报备时间:</span>{{detail.createtime}}</div>
+        <div class="item"><span class="title">报备备注:</span>{{detail.remark}}</div>
+        <div class="item"><span class="title">反馈备注:</span>{{detail.retremark}}</div>
+    </div>
+</van-popup>
+
+<van-tabbar v-model="active" :placeholder="true">
+    <van-tabbar-item icon="newspaper-o" url="{:url('worker/index')}">招聘信息</van-tabbar-item>
+    <van-tabbar-item icon="user-o" url="{:url('worker/broker')}">经纪人</van-tabbar-item>
+    <van-tabbar-item icon="search" url="{:url('worker/reportFind')}">报备查询</van-tabbar-item>
+</van-tabbar>
+{/block}
+{block name="script"}
+<script>
+    function v_setup() {
+        let base = list_load('worker/listReport',{mobile:''});
+        base.active = 2;
+        base.form = Vue.reactive({mobile:''});
+
+        //经济人信息
+        base.broker = Vue.reactive({});
+
+        //搜索
+        base.onSearch = () => {
+            postJson("{:url('worker/reportFind')}", base.form).then(({data}) => {
+                for (let i in data) {
+                    base.broker[i] = data[i];
+                }
+                base.onRefresh();
+            });
+        };
+        base.onCancel = () => {
+            base.form.mobile = "";
+            base.broker.title = '';
+        };
+
+        //选择简历库
+        base.onDeal = (info) => {
+            base.form.realname = info.name;
+            base.form.mobile = info.mobile;
+            base.form.idcard = info.idcard;
+            base.active.value = 0;
+        };
+
+        //详情
+        base.detail = Vue.reactive({});
+        base.showDetail = Vue.ref(false);
+        base.onDetail = (item) => {
+            base.detail = item;
+            base.showDetail.value = true;
+        };
+
+        return base;
+    }
+</script>
+{/block}
+{block name="vue"}
+<script src="__COMPONENTS__/workerReportList.js"></script>
+{/block}

+ 7 - 1
public/static/mobile/css/style.css

@@ -72,4 +72,10 @@ html {
 .report-list .report-item .user-info {color:var(--red);font-size:16px;}
 .report-list .report-item .other-info {color:#999;margin-top:2px;}
 .report-list .report-item .tool {display: flex;padding:10px 0;border-bottom:1px solid #eee;justify-content: flex-end;font-size:14px;}
-.report-list .report-item .tool .van-tag {margin-left:10px;}
+.report-list .report-item .tool .van-tag {margin-left:10px;}
+
+.broker-list .broker-item {background:white;margin-top:10px;padding:10px 20px;}
+.broker-list .broker-item .header {padding-bottom:10px;border-bottom:1px solid #eee;color:#000;font-weight:bold;}
+.broker-list .broker-item .content {padding-top:10px;display:flex;justify-content:space-between;align-items:center;}
+.broker-list .broker-item .content .region,.broker-list .broker-item .content .phone {display:flex;align-items:center;}
+.broker-list .broker-item .content .region .region-name {margin-left:5px;}

+ 36 - 0
public/static/mobile/js/components/brokerList.js

@@ -0,0 +1,36 @@
+app.component('broker-list', {
+    template: `
+    <div class="broker-list">
+        <div class="broker-item" v-for="item in list">
+            <div class="header">{{item.title}}</div>
+            <div class="content">
+                <div class="region">
+                    <van-image
+                        width="14px"
+                        src="/static/images/applet/index/cardD.png"
+                    ></van-image>
+                    <span class="region-name">{{item.region}}</span>
+                </div>
+                <a class="phone" :href="'tel:' + item.mobile">
+                    <van-image
+                            height="20px"
+                            src="/static/images/applet/broker/contact.png"
+                    ></van-image>
+                </a>
+            </div>
+        </div>
+    </div>
+    `,
+    data() {
+        return {}
+    },
+    props: {
+        list: {
+            type: Array,
+            default: [],
+        },
+    },
+    methods: {
+
+    },
+});

+ 38 - 0
public/static/mobile/js/components/workerReportList.js

@@ -0,0 +1,38 @@
+app.component('worker-report-list', {
+    template: `
+    <div class="report-list">
+        <div class="report-item" v-for="item in list">
+            <div class="header">
+                <div class="title">{{item.recruit.title}}</div>
+                <div class="status">{{item.status_text}}</div>
+            </div>
+            <div class="content">
+                <div class="user-info">{{item.realname}} - {{item.mobile}}</div>
+                <div class="other-info">预计到达日期:{{item.arrivetime}}</div>
+                <div class="other-info">报名时间:{{item.createtime}}</div>
+            </div>
+            <div class="tool">
+                <van-tag type="success" plain size="large" @click="onDetail(item)">详情</van-tag>
+            </div>
+        </div>
+    </div>
+    `,
+    data() {
+        return {}
+    },
+    props: {
+        list: {
+            type: Array,
+            default: [],
+        },
+        is_select: {
+            type: Boolean,
+            default: false,
+        },
+    },
+    methods: {
+        onDetail(item) {
+            this.$emit('detail',item);
+        },
+    },
+});