linwu 1 день назад
Родитель
Сommit
683baa5cd3
40 измененных файлов с 1001 добавлено и 121 удалено
  1. 1 1
      api/common/Sms.php
  2. 72 0
      api/crontab/controller/TalentController.php
  3. 41 20
      api/talent/controller/AdminController.php
  4. 85 9
      api/talent/controller/AppointmentController.php
  5. 5 0
      app/talent/model/TalentAppointmentLogModel.php
  6. 2 1
      applet/app.js
  7. 5 2
      applet/app.json
  8. BIN
      applet/common/images/tabbar/route.png
  9. BIN
      applet/common/images/tabbar/route_cur.png
  10. BIN
      applet/common/images/talent/icon_star.png
  11. BIN
      applet/common/images/talent/icon_star_full.png
  12. 14 7
      applet/pages/talent/admin/index.js
  13. 32 14
      applet/pages/talent/admin/index.wxml
  14. 7 2
      applet/pages/talent/admin/index.wxss
  15. 84 0
      applet/pages/talent/admin/scheduling.js
  16. 3 0
      applet/pages/talent/admin/scheduling.json
  17. 60 0
      applet/pages/talent/admin/scheduling.wxml
  18. 44 0
      applet/pages/talent/admin/scheduling.wxss
  19. 10 2
      applet/pages/talent/appointment/evaluate.js
  20. 6 7
      applet/pages/talent/appointment/evaluate.wxml
  21. 9 1
      applet/pages/talent/appointment/evaluate.wxss
  22. 32 3
      applet/pages/talent/appointment/index.js
  23. 54 28
      applet/pages/talent/appointment/index.wxml
  24. 8 0
      applet/pages/talent/appointment/index.wxss
  25. 10 0
      applet/pages/talent/appointment/list.js
  26. 13 1
      applet/pages/talent/appointment/list.wxml
  27. 117 0
      applet/pages/talent/appointment/my.js
  28. 3 0
      applet/pages/talent/appointment/my.json
  29. 73 0
      applet/pages/talent/appointment/my.wxml
  30. 6 0
      applet/pages/talent/appointment/my.wxss
  31. 46 0
      applet/pages/talent/appointment/route.js
  32. 3 0
      applet/pages/talent/appointment/route.json
  33. 33 0
      applet/pages/talent/appointment/route.wxml
  34. 7 0
      applet/pages/talent/appointment/route.wxss
  35. 60 4
      applet/pages/talent/home/home.js
  36. 18 6
      applet/pages/talent/home/home.wxml
  37. 7 1
      public/themes/admin_simpleboot3/talent/admin_appointment/index.html
  38. 5 5
      public/themes/admin_simpleboot3/talent/admin_talent/add.html
  39. 5 5
      public/themes/admin_simpleboot3/talent/admin_talent/edit.html
  40. 21 2
      public/themes/admin_simpleboot3/talent/admin_talent/setting.html

+ 1 - 1
api/common/Sms.php

@@ -8,7 +8,7 @@ use think\facade\Log;
 
 class Sms
 {
-    public function send($mobile, $code, $type = '人才便捷出行', $content_param = [])
+    public function send($mobile, $code, $content_param = [], $type = '人才便捷出行')
     {
         $url   = "https://lw_test.jinjianghc.com/api/sms/send";
         $token = "L1mq09OB68be4b4526092";

+ 72 - 0
api/crontab/controller/TalentController.php

@@ -0,0 +1,72 @@
+<?php
+// +----------------------------------------------------------------------
+// | 文件说明:幻灯片
+// +----------------------------------------------------------------------
+// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Author: wuwu <15093565100@163.com>
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Date: 2017-5-25
+// +----------------------------------------------------------------------
+namespace api\crontab\controller;
+
+use api\common\Sms;
+use app\talent\model\TalentAppointmentLogModel;
+use app\talent\model\TalentAppointmentModel;
+
+class TalentController
+{
+    /**
+     * 主方法
+     */
+    public function index()
+    {
+        $this->_dealRateMsg();
+//        $this->_test();
+    }
+
+    /**
+     * 发送短信
+     */
+    public function _dealRateMsg()
+    {
+        $yesterday = date('Y-m-d', strtotime('-1 day'));
+        $list      = TalentAppointmentLogModel::with(['appointment.talent'])
+            ->where(function($query){
+                $query->where('content', '通过手机号接站,接到了人才')->whereOr('content','通过扫码接站,接到了人才');
+            })
+            ->whereBetween('create_time', [$yesterday . ' 00:00:00', $yesterday . ' 23:59:59'])
+            ->select();
+
+        //短信
+        $sms = new Sms();
+        if (!$list->isEmpty()) {
+            foreach ($list as $v) {
+                $sms->send($v['appointment']['talent']['mobile'],'talent_appointment_end');
+            }
+        }
+    }
+
+    public function _test()
+    {
+        $today = date('Y-m-d');
+        $list = TalentAppointmentModel::where('out_time','between',[$today.' 00:00:00',$today.' 23:59:59'])->order('out_time asc')->select();
+
+        $res = [];
+        foreach ($list as $v) {
+            $hour = date('H:00',strtotime($v['out_time']));
+            if (empty($res)) {
+                $res[$hour] = [
+                    'hour' => $hour,
+                    'list' => [],
+                ];
+            }
+
+            $res[$hour]['list'][] = $v->toArray();
+        }
+
+        halt(array_values($res));
+    }
+}

+ 41 - 20
api/talent/controller/AdminController.php

@@ -56,25 +56,21 @@ class AdminController extends RestUserBaseController
 
         $talent = TalentModel::get($appointment['talent_id']);
 
-        //短信
-        $sms = new Sms();
-        $sms->send($talent['mobile'],'talent_appointment_end');
-
         $this->success('成功', ['talent' => $talent, 'appointment' => $appointment]);
     }
 
     public function lists()
     {
-        $data = $this->request->param();
-        $page = empty($param['page']) ? 1 : $param['page'];
-        $size = empty($param['size']) ? 10 : $param['size'];
+        $data  = $this->request->param();
+        $page  = empty($param['page']) ? 1 : $param['page'];
+        $size  = empty($param['size']) ? 10 : $param['size'];
         $where = [['status', '=', $data['status']]];
         if (!empty($data['keyword'])) {
-            $where[] = ['shift','like',"%{$data['keyword']}%"];
+            $where[] = ['shift', 'like', "%{$data['keyword']}%"];
         }
 
         //搜索条件
-        $list  = TalentAppointmentModel::with(['talent'])
+        $list = TalentAppointmentModel::with(['talent'])
             ->where($where)
             ->order('start_time desc')
             ->page($page, $size)
@@ -86,9 +82,9 @@ class AdminController extends RestUserBaseController
 
     public function confirm()
     {
-        $data = $this->request->param();
-        $talent_appointment = TalentAppointmentModel::get($data['id']);
-        $talent_appointment->status = 2;
+        $data                           = $this->request->param();
+        $talent_appointment             = TalentAppointmentModel::get($data['id']);
+        $talent_appointment->status     = 2;
         $talent_appointment->apply_code = uniqid();
         $talent_appointment->save();
 
@@ -102,20 +98,20 @@ class AdminController extends RestUserBaseController
         ]);
 
         //人才信息
-        $talent = TalentModel::where('id',$talent_appointment['talent_id'])->find();
+        $talent = TalentModel::where('id', $talent_appointment['talent_id'])->find();
 
         //短信
         $sms = new Sms();
-        $sms->send($talent['mobile'],'talent_appointment_confirm');
+        $sms->send($talent['mobile'], 'talent_appointment_confirm');
 
         $this->success();
     }
 
     public function applyByMobile()
     {
-        $mobile     = $this->request->param('mobile', '');
+        $mobile   = $this->request->param('mobile', '');
         $admin_id = $this->request->param('admin_id', 0);
-        $id = $this->request->param('id',0);
+        $id       = $this->request->param('id', 0);
         if (empty($admin_id)) {
             $this->error('暂无权限');
         }
@@ -146,10 +142,35 @@ class AdminController extends RestUserBaseController
             'create_time'    => date('Y-m-d H:i:s'),
         ]);
 
-        //短信
-        $sms = new Sms();
-        $sms->send($appointment['talent']['mobile'],'talent_appointment_end');
-
         $this->success('成功');
     }
+
+    public function getScheduling()
+    {
+        $today = date('Y-m-d');
+        $list  = TalentAppointmentModel::with(['talent'])
+            ->where('out_time', 'between', [$today . ' 00:00:00', $today . ' 23:59:59'])
+            ->order('out_time asc')
+            ->append(['status_text'])
+            ->select();
+
+        if ($list->isEmpty()) {
+            $this->success('', []);
+        }
+
+        $res = [];
+        foreach ($list as $v) {
+            $hour = date('H:00', strtotime($v['out_time']));
+            if (empty($res[$hour])) {
+                $res[$hour] = [
+                    'hour' => $hour,
+                    'list' => [],
+                ];
+            }
+
+            $res[$hour]['list'][] = $v->toArray();
+        }
+
+        $this->success('成功', array_values($res));
+    }
 }

+ 85 - 9
api/talent/controller/AppointmentController.php

@@ -9,12 +9,22 @@ use app\talent\model\TalentAppointmentLogModel;
 use app\talent\model\TalentAppointmentModel;
 use app\talent\model\TalentModel;
 use cmf\controller\RestUserBaseController;
+use think\facade\Cache;
 
 class AppointmentController extends RestUserBaseController
 {
     public function bind()
     {
-        $data   = $this->request->param();
+        $data = $this->request->param();
+
+        $verify = Cache::get('verify' . $this->userId);
+        if (empty($verify)) {
+            $this->error('验证码已过期,请重新获取');
+        }
+        if ($verify != $data['verify']) {
+            $this->error('验证码错误');
+        }
+
         $talent = TalentModel::where('name', $data['name'])->where('card_no', $data['card_no'])->find();
         if (empty($talent)) {
             $this->error('未找到人才信息,请重新信息是否输入有误');
@@ -25,8 +35,13 @@ class AppointmentController extends RestUserBaseController
             $this->error('该人才信息已被绑定,请联系管理员确认');
         }
 
+        //手机号绑定
+        $talent->mobile = $data['mobile'];
+        $talent->save();
+
         $userId = $this->getUserId();
         UserModel::update(['talent_id' => $talent['id']], ['id' => $userId]);
+        Cache::rm('verify' . $this->userId);
         $this->success();
     }
 
@@ -50,21 +65,39 @@ class AppointmentController extends RestUserBaseController
     public function book()
     {
         $data       = $this->request->param();
+
+        //时间
         $date       = $data['date'] . ' ' . $data['time'] . ':00';
+        $out_date   = $data['date'] . ' ' . $data['out_time'] . ':00';
         $start_time = strtotime($date);
+        $out_time   = strtotime($out_date);
         $time       = time();
         if ($start_time - $time < 3600) {
             $this->error('只能预约一小时后的班次');
         }
+        if ($out_time - $start_time > 0) {
+            $this->error('到站时间必须早于出发时间');
+        }
+
+        //班次
+        if (!empty($data['shift'])) {
+            $shift_check = TalentAppointmentModel::where('talent_id',$this->user['talent_id'])->where('shift',$data['shift'])->find();
+            if (!empty($shift_check)) {
+                $this->error('您已预约过该班次,请勿重复预约');
+            }
+        }
 
+        //预约成功和日志
         $appointment = TalentAppointmentModel::create([
-            'talent_id'   => $this->user['talent_id'],
-            'shift'       => $data['shift'],
-            'start_time'  => $date,
-            'image'       => $data['image'],
-            'create_time' => date('Y-m-d H:i:s'),
+            'talent_id'     => $this->user['talent_id'],
+            'shift'         => $data['shift'],
+            'start_time'    => $date,
+            'image'         => $data['image'],
+            'create_time'   => date('Y-m-d H:i:s'),
+            'out_time'      => $out_date,
+            'companion_num' => $data['companion_num'],
+            'comment'       => $data['comment'],
         ]);
-
         TalentAppointmentLogModel::create([
             'appointment_id' => $appointment['id'],
             'name'           => '人才',
@@ -73,9 +106,9 @@ class AppointmentController extends RestUserBaseController
         ]);
 
         //短信
-        $sms = new Sms();
+        $sms    = new Sms();
         $option = cmf_get_option('talent_setting');
-        $sms->send($option['mobile'],'talent_appointment_submit');
+        $sms->send($option['mobile'], 'talent_appointment_submit');
 
         $this->success();
     }
@@ -116,4 +149,47 @@ class AppointmentController extends RestUserBaseController
 
         $this->success('成功');
     }
+
+    public function getVerify()
+    {
+        $data   = $this->request->param();
+        $verify = mt_rand(100000, 999999);
+        Cache::set('verify' . $this->userId, $verify, 600);
+
+        //短信
+        $sms = new Sms();
+        $sms->send($data['mobile'], 'verification_code', ['code' => $verify]);
+
+        $this->success();
+    }
+
+    public function route()
+    {
+        $setting = cmf_get_option('talent_setting');
+        $this->success('成功',['route_image'=>cmf_get_image_preview_url($setting['route_image'])]);
+    }
+
+    public function talentInfo()
+    {
+        $talent = TalentModel::where('id',$this->user['talent_id'])->find();
+        $this->success('成功',$talent);
+    }
+
+    public function changeMobile()
+    {
+        $data   = $this->request->param();
+
+        $verify = Cache::get('verify' . $this->userId);
+        if (empty($verify)) {
+            $this->error('验证码已过期,请重新获取');
+        }
+        if ($verify != $data['verify']) {
+            $this->error('验证码错误');
+        }
+
+        TalentModel::update(['mobile'=>$data['mobile']],['id'=>$this->user['talent_id']]);
+        Cache::rm('verify' . $this->userId);
+        $this->success();
+    }
+
 }

+ 5 - 0
app/talent/model/TalentAppointmentLogModel.php

@@ -15,4 +15,9 @@ use think\Model;
 class TalentAppointmentLogModel extends Model
 {
 
+    public function appointment()
+    {
+        return $this->hasOne(TalentAppointmentModel::class,'id','appointment_id');
+    }
+
 }

+ 2 - 1
applet/app.js

@@ -234,10 +234,11 @@ App({
       mask: true
     })
   },
-  confirm: function (content,success) {
+  confirm: function (content,success,showCancel=true) {
     wx.showModal({
       title: '提示',
       content: content,
+      showCancel: showCancel,
       success(res) {
         if (res.confirm) {
           wx.hideToast();

+ 5 - 2
applet/app.json

@@ -41,7 +41,10 @@
     "pages/talent/appointment/list",
     "pages/talent/appointment/evaluate",
     "pages/talent/admin/index",
-    "pages/talent/admin/login"
+    "pages/talent/admin/login",
+    "pages/talent/appointment/route",
+    "pages/talent/admin/scheduling",
+    "pages/talent/appointment/my"
   ],
   "window": {
     "navigationStyle": "custom",
@@ -73,7 +76,7 @@
         "pagePath": "pages/talent/home/home",
         "iconPath": "common/images/tabbar/train.png",
         "selectedIconPath": "common/images/tabbar/train_cur.png",
-        "text": "人才便捷出行"
+        "text": "晋才畅行"
       },
       {
         "pagePath": "pages/my/home/home",

BIN
applet/common/images/tabbar/route.png


BIN
applet/common/images/tabbar/route_cur.png


BIN
applet/common/images/talent/icon_star.png


BIN
applet/common/images/talent/icon_star_full.png


+ 14 - 7
applet/pages/talent/admin/index.js

@@ -186,7 +186,7 @@ Page({
           app.confirm(`接站成功,姓名:${res.talent.name},班次:${res.appointment.shift},出行时间:${res.appointment.start_time}`, function () {
             self.resetParam();
             self.getList();
-          });
+          },false);
         });
       },
       fail(res) {
@@ -204,9 +204,10 @@ Page({
         id: id,
         admin_id: self.data.admin_id
       }, function () {
-        app.msg('操作成功');
-        self.resetParam();
-        self.getList();
+        app.msg('操作成功',function(){
+          self.resetParam();
+          self.getList();
+        });
       });
     })
   },
@@ -223,9 +224,10 @@ Page({
           admin_id: self.data.admin_id,
           mobile: res.content
         }, function () {
-          app.msg('操作成功');
-          self.resetParam();
-          self.getList();
+          app.msg('操作成功',function(){
+            self.resetParam();
+            self.getList();
+          });
         });
       }
     })
@@ -246,4 +248,9 @@ Page({
       urls: [e.currentTarget.dataset.url],
     });
   },
+  toScheduling() {
+    wx.redirectTo({
+      url: '/pages/talent/admin/scheduling',
+    })
+  }
 })

+ 32 - 14
applet/pages/talent/admin/index.wxml

@@ -4,13 +4,13 @@
 
 <!-- 头部 -->
 <view class="cu-bar bg-red search">
-	<view class="search-form radius">
-		<text class="cuIcon-search"></text>
-		<input type="text" value="{{keyword[tab]}}" placeholder="请输入车次" confirm-type="search" bindconfirm="bindSearch" bindinput="bindInput"></input>
-	</view>
-	<view class="action" bindtap="bindSearch">
-		<text>搜索</text>
-	</view>
+  <view class="search-form radius">
+    <text class="cuIcon-search"></text>
+    <input type="text" value="{{keyword[tab]}}" placeholder="请输入车次" confirm-type="search" bindconfirm="bindSearch" bindinput="bindInput"></input>
+  </view>
+  <view class="action" bindtap="bindSearch">
+    <text>搜索</text>
+  </view>
 </view>
 
 <!-- tab导航 -->
@@ -36,17 +36,18 @@
     <view class="cu-item shadow" wx:for="{{list[tab]}}" wx:key="key">
       <view class="padding">
         <view class="flex align-center justify-between">
-          <view>
-            <text class="text-bold text-black">{{item.shift}}</text>
+          <view class="text-bold text-black" bind:tap="callMobile" data-mobile="{{item.talent.mobile}}">
+            {{item.talent.name}}
+            <text class="margin-left-sm text-lg text-blue cuIcon-dianhua"></text>
           </view>
           <view class="cu-tag line-blue radius">{{item.status_text}}</view>
         </view>
-        <view class="text-sm margin-top-xs">姓名:{{item.talent.name}}</view>
-        <view class="text-sm margin-top-xs" bind:tap="callMobile" data-mobile="{{item.talent.mobile}}" wx:if="{{item.status != 4}}">
-        拨打电话<text class="margin-left-sm text-lg text-blue cuIcon-dianhua"></text>
-        </view>
+        <view class="text-sm margin-top-xs" wx:if="{{item.shift}}">班次:{{item.shift}}</view>
+        <view class="text-sm margin-top-xs">到站时间:{{item.out_time}}</view>
         <view class="text-sm margin-top-xs">出发时间:{{item.start_time}}</view>
-        <view class="text-sm margin-top-xs" wx:if="{{item.status == 4}}">满意度:{{item.rate}}</view>
+        <view class="text-sm margin-top-xs" wx:if="{{item.companion_num}}">同行人数:{{item.companion_num}}</view>
+        <view class="text-sm margin-top-xs" wx:if="{{item.comment}}">其他需求:{{item.comment}}</view>
+        <view class="text-sm margin-top-xs" wx:if="{{item.status == 4}}">满意度:{{item.rate}}星</view>
         <view class="text-sm margin-top-xs" wx:if="{{item.status == 4}}">评价内容:{{item.rate_comment}}</view>
         <view class="grid col-4 grid-square flex-sub margin-top">
           <view class="bg-img" bindtap="ViewImage" data-url="{{item.image}}" wx:if="{{item.image}}">
@@ -71,4 +72,21 @@
 <view class="scan" bind:tap="scan">
   <view class="text">扫码</view>
   <view class="text">接待</view>
+</view>
+
+
+<view class="footer"></view>
+<view class="cu-bar tabbar bg-white foot">
+  <view class="action" bind:tap="toScheduling">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/index.png"></image>
+    </view>
+    <view class="text-gray">今日班次</view>
+  </view>
+  <view class="action">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/my_cur.png"></image>
+    </view>
+    <view class="text-gray">预约记录</view>
+  </view>
 </view>

+ 7 - 2
applet/pages/talent/admin/index.wxss

@@ -13,7 +13,7 @@
   background-color: var(--red);
   color: white;
   position: fixed;
-  bottom: 100rpx;
+  bottom: 150rpx;
   right: 50rpx;
 }
 
@@ -29,6 +29,11 @@
   background-color: var(--blue);
   color: white;
   position: fixed;
-  bottom: 250rpx;
+  bottom: 300rpx;
   right: 50rpx;
+}
+
+.footer {
+  width: 100%;
+  height: 100rpx;
 }

+ 84 - 0
applet/pages/talent/admin/scheduling.js

@@ -0,0 +1,84 @@
+const app = getApp();
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    CustomBar: app.globalData.CustomBar,
+    list: [],
+    tabCur: 0,
+    mainCur: 0,
+    verticalNavTop: 0,
+    load: true
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.getList();
+  },
+  getList(){
+    const self = this;
+    app.get('talent/admin/getScheduling',function(res){
+      self.setData({list:res});
+    })
+  },
+  TabSelect(e) {
+    this.setData({
+      tabCur: e.currentTarget.dataset.id,
+      mainCur:e.currentTarget.dataset.id,
+      verticalNavTop:(e.currentTarget.dataset.id - 1) * 50
+    });
+  },
+  VerticalMain(e) {
+    let that = this;
+    let tabHeight = 0;
+    if (that.data.load) {
+      for (let i = 0; i < that.data.list.length; i++) {
+        let view = wx.createSelectorQuery().select("#main-" + i);
+        view.fields({
+          size: true
+        }, data => {
+          if (!data) {
+            data = {height:0};
+          }
+          let list = that.data.list;
+          list[i].top = tabHeight;
+          tabHeight = tabHeight + +data?.height;
+          list[i].bottom = tabHeight;
+          that.setData({list:list});
+        }).exec();
+      }
+      that.setData({load:false});
+    }
+    let scrollTop = e.detail.scrollTop + 10;
+    for (let i = 0; i < that.data.list.length; i++) {
+      if (scrollTop > that.data.list[i].top && scrollTop < that.data.list[i].bottom) {
+        that.setData({
+          verticalNavTop:i * 50,
+          tabCur: i
+        });
+        return false
+      }
+    }
+  },
+  toIndex() {
+    wx.redirectTo({
+      url: '/pages/talent/admin/index',
+    })
+  },
+  //拔打电话
+  callMobile(e){
+    let mobile = e.currentTarget.dataset.mobile;
+    if (mobile == '') {
+      app.msg('暂无联系方式!');
+      return false;
+    }
+    wx.makePhoneCall({
+      phoneNumber: mobile
+    })
+  },
+})

+ 3 - 0
applet/pages/talent/admin/scheduling.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 60 - 0
applet/pages/talent/admin/scheduling.wxml

@@ -0,0 +1,60 @@
+<cu-custom bgColor="bg-lw-header" isCustom="{{true}}">
+  <view slot="content">今日班次</view>
+</cu-custom>
+
+<view class="VerticalBox">
+  <scroll-view class="VerticalNav nav" scroll-y scroll-with-animation scroll-top="{{verticalNavTop}}" style="height:calc(100vh - 100rpx - {{CustomBar}}px - (env(safe-area-inset-bottom) / 2))">
+    <view class="cu-item {{index==tabCur?'text-green cur':''}}" wx:for="{{list}}" wx:key="index" bind:tap="TabSelect" data-id="{{index}}">
+      <view class="cu-tag badge" style="top:0;right:0;">{{item.list.length}}</view>
+      <view>{{item.hour}}</view>
+    </view>
+  </scroll-view>
+  <scroll-view class="VerticalMain" scroll-y scroll-with-animation style="height:calc(100vh - 100rpx - {{CustomBar}}px - (env(safe-area-inset-bottom) / 2))" scroll-into-view="{{'main-'+mainCur}}" bindscroll="VerticalMain">
+    <view class="padding-top padding-lr" wx:for="{{list}}" wx:key="index" id="{{'main-'+index}}">
+      <view class="cu-bar solid-bottom bg-white">
+        <view class="action">
+          <text class="cuIcon-title text-green"></text> {{item.hour}}
+        </view>
+      </view>
+      <view class="cu-list bg-white">
+        <view class="cu-item solid-bottom" wx:for="{{item.list}}" wx:for-item="listItem" wx:key="id">
+          <view class="padding">
+            <view class="flex align-center justify-between">
+              <view class="text-bold text-black" bind:tap="callMobile" data-mobile="{{listItem.talent.mobile}}">
+                {{listItem.talent.name}}
+                <text class="margin-left-sm text-lg text-blue cuIcon-dianhua"></text>
+              </view>
+              <view class="cu-tag line-blue radius">{{listItem.status_text}}</view>
+            </view>
+            <view class="text-sm margin-top-xs" wx:if="{{listItem.shift}}">班次:{{listItem.shift}}</view>
+            <view class="text-sm margin-top-xs">到站时间:{{listItem.out_time}}</view>
+            <view class="text-sm margin-top-xs">出发时间:{{listItem.start_time}}</view>
+            <view class="text-sm margin-top-xs" wx:if="{{listItem.companion_num}}">同行人数:{{listItem.companion_num}}</view>
+            <view class="text-sm margin-top-xs" wx:if="{{listItem.comment}}">其他需求:{{listItem.comment}}</view>
+            <view class="grid col-4 grid-square flex-sub margin-top">
+              <view class="bg-img" bindtap="ViewImage" data-url="{{listItem.image}}" wx:if="{{listItem.image}}">
+                <image src="{{listItem.image}}" mode="aspectFill"></image>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+</view>
+
+<view class="footer"></view>
+<view class="cu-bar tabbar bg-white foot">
+  <view class="action">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/index_cur.png"></image>
+    </view>
+    <view class="text-gray">今日班次</view>
+  </view>
+  <view class="action" bind:tap="toIndex">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/my.png"></image>
+    </view>
+    <view class="text-gray">预约记录</view>
+  </view>
+</view>

+ 44 - 0
applet/pages/talent/admin/scheduling.wxss

@@ -0,0 +1,44 @@
+.footer {
+  width: 100%;
+  height: 100rpx;
+}
+.VerticalNav.nav {
+  width: 200rpx;
+  white-space: initial;
+}
+
+.VerticalNav.nav .cu-item {
+  width: 100%;
+  text-align: center;
+  background-color: #fff;
+  margin: 0;
+  border: none;
+  height: 50px;
+  position: relative;
+}
+
+.VerticalNav.nav .cu-item.cur {
+  background-color: #f1f1f1;
+}
+
+.VerticalNav.nav .cu-item.cur::after {
+  content: "";
+  width: 8rpx;
+  height: 30rpx;
+  border-radius: 10rpx 0 0 10rpx;
+  position: absolute;
+  background-color: currentColor;
+  top: 0;
+  right: 0rpx;
+  bottom: 0;
+  margin: auto;
+}
+
+.VerticalBox {
+  display: flex;
+}
+
+.VerticalMain {
+  background-color: #f1f1f1;
+  flex: 1;
+}

+ 10 - 2
applet/pages/talent/appointment/evaluate.js

@@ -9,7 +9,7 @@ Page({
   data: {
     form: {
       id: 0,
-      rate: '',
+      rate: 0,
       rate_comment: '',
     }
   },
@@ -26,6 +26,12 @@ Page({
   textareaAInput(e) {
     this.setData({["form.rate_comment"]:e.detail.value});
   },
+  changePic: function (e) {
+    const index = e.currentTarget.dataset.index
+    this.setData({
+      ["form.rate"]: index
+    })
+  },
   submit() {
     let form = this.data.form;
     if (verify.isEmpty(form.rate)) {
@@ -33,7 +39,9 @@ Page({
       return false;
     }
     app.post('talent/appointment/rate', form, function (res) {
-      wx.navigateBack()
+      app.msg('评价成功',function(){
+        wx.navigateBack();
+      });
     });
   }
 })

+ 6 - 7
applet/pages/talent/appointment/evaluate.wxml

@@ -6,13 +6,12 @@
   <radio-group class="block" bind:change="RadioChange">
     <view class="cu-form-group">
       <view class="title">满意度</view>
-      <view>
-        <radio class='blue' value="满意"></radio>
-        <text class="margin-left-sm">满意</text>
-        <radio class='blue margin-left-xl' value="一般"></radio>
-        <text class="margin-left-sm">一般</text>
-        <radio class='blue margin-left-xl' value="不满意"></radio>
-        <text class="margin-left-sm">不满意</text>
+      <view class="brightStarts">
+      <image class="image-item" src="{{1<=form.rate? '../../../common/images/talent/icon_star_full.png' : '../../../common/images/talent/icon_star.png'}}" data-index="1" bindtap="changePic"></image>
+      <image class="image-item" src="{{2<=form.rate? '../../../common/images/talent/icon_star_full.png' : '../../../common/images/talent/icon_star.png'}}" data-index="2" bindtap="changePic"></image>
+      <image class="image-item" src="{{3<=form.rate? '../../../common/images/talent/icon_star_full.png' : '../../../common/images/talent/icon_star.png'}}" data-index="3" bindtap="changePic"></image>
+      <image class="image-item" src="{{4<=form.rate? '../../../common/images/talent/icon_star_full.png' : '../../../common/images/talent/icon_star.png'}}" data-index="4" bindtap="changePic"></image>
+      <image class="image-item" src="{{5<=form.rate? '../../../common/images/talent/icon_star_full.png' : '../../../common/images/talent/icon_star.png'}}" data-index="5" bindtap="changePic"></image>
       </view>
     </view>
   </radio-group>

+ 9 - 1
applet/pages/talent/appointment/evaluate.wxss

@@ -1 +1,9 @@
-/* pages/talent/appointment/eval.wxss */
+.brightStars{
+  display: flex;
+  flex-direction: row;
+}
+
+.image-item{
+  width: 50px;
+  height: 50px;
+}

+ 32 - 3
applet/pages/talent/appointment/index.js

@@ -12,6 +12,9 @@ Page({
     date: '',
     startDate: '',
     image: '',
+    companionNum: 0,
+    outTime: '00:00',
+    comment: '',
   },
 
   /**
@@ -26,6 +29,11 @@ Page({
     });
   },
 
+  outTimeChange(e) {
+    this.setData({
+      outTime: e.detail.value
+    });
+  },
   TimeChange(e) {
     this.setData({
       time: e.detail.value
@@ -66,21 +74,42 @@ Page({
   submit() {
     let self = this;
     if (verify.isEmpty(this.data.shift) && verify.isEmpty(this.data.image)) {
-      app.msg('班次/出发时间和车票图片至少要填一样');
+      app.msg('方式一和方式二任选其一');
       return false;
     }
+
+    if (this.data.companionNum > 3) {
+      app.msg('同行人数不超过3人');
+      return false;
+    }
+
     app.post('talent/appointment/book', {
       shift: this.data.shift,
       date: this.data.date,
       time: this.data.time,
-      image: this.data.image
+      image: this.data.image,
+      out_time: this.data.outTime,
+      companion_num: this.data.companionNum,
+      comment: this.data.comment,
     }, function (res) {
-      self.toList();
+      app.msg('预约成功',function(){
+        self.toList();
+      });
     });
   },
   toList() {
     wx.redirectTo({
       url: '/pages/talent/appointment/list',
     })
+  },
+  toRoute() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/route',
+    })
+  },
+  toMy() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/my',
+    })
   }
 })

+ 54 - 28
applet/pages/talent/appointment/index.wxml

@@ -1,27 +1,15 @@
 <cu-custom bgColor="bg-lw-header" isCustom="{{true}}">
   <view slot="content">预约</view>
 </cu-custom>
-<view class="solids-bottom padding-xs flex align-center">
-  <view class="flex-sub text-center">
-    <view class="solid-bottom text-lg padding-lr">
-      <text class="text-black text-bold">至少要提前一小时预约</text>
-    </view>
-    <view class="solid-bottom text-lg padding-lr">
-      <text class="text-black text-bold">只能预约早上9点到晚上20点</text>
-    </view>
-    <view class="solid-bottom text-lg padding-lr">
-      <text class="text-black text-bold">班次/出发时间和车票图片至少要填一样</text>
-    </view>
-  </view>
-</view>
 <form>
+  <view class="padding text-bold">方式一</view>
   <view class="cu-form-group">
     <view class="title">班次</view>
-    <input placeholder="请输入班次" value="" bindinput="vmodel" data-value="shift"></input>
+    <input placeholder="请输入班次" bindinput="vmodel" data-value="shift"></input>
   </view>
   <view class="cu-form-group">
     <view class="title">出发日期</view>
-    <picker mode="date" :value="date" start="{{startDate}}" bind:change="DateChange">
+    <picker mode="date" start="{{startDate}}" bind:change="DateChange">
       <view class="picker">
         {{date}}
       </view>
@@ -35,7 +23,9 @@
       </view>
     </picker>
   </view>
-  <view class="cu-bar bg-white solids-top">
+
+  <view class="padding text-bold">方式二</view>
+  <view class="cu-bar bg-white">
     <view class="action text-black">
       车票图片
     </view>
@@ -53,21 +43,57 @@
       </view>
     </view>
   </view>
+  <view class="text-red padding-left text-sm padding-top-xs">
+    <view>方式一和方式二任选其一</view>
+  </view>
+  <view class="padding text-bold">其他信息</view>
+  <view class="cu-form-group">
+    <view class="title"><text class="text-red">*</text> 到站时间</view>
+    <picker mode="time" start="09:00" end="20:00"  bind:change="outTimeChange">
+      <view class="picker">
+        {{outTime}}
+      </view>
+    </picker>
+  </view>
+  <view class="cu-form-group">
+    <view class="title"><text class="text-red">*</text> 同行人数</view>
+    <input placeholder="不含本人,不超过3人" bindinput="vmodel" data-value="companionNum" type="number"></input>
+  </view>
+  <view class="cu-form-group align-start">
+				<view class="title">其他需求</view>
+				<textarea maxlength="-1" bindinput="vmodel" data-value="comment" placeholder="请填写其他需求"></textarea>
+			</view>
+  <view class="text-gray padding-left text-sm padding-top-xs">
+    <view>备注:1.至少要提前一小时预约;2.只能预约早上9点到晚上20点。</view>
+  </view>
   <view class="padding flex flex-direction">
     <button class="cu-btn lw-red margin-tb-sm lg" style="width:600rpx;" bindtap="submit">提交</button>
   </view>
-  <view class="cu-bar tabbar bg-white foot">
-    <view class="action">
-      <view class="cuIcon-cu-image">
-        <image src="/common/images/tabbar/index_cur.png"></image>
-      </view>
-      <view class="text-gray">预约</view>
+</form>
+<view class="footer"></view>
+<view class="cu-bar tabbar bg-white foot">
+  <view class="action">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/index_cur.png"></image>
     </view>
-    <view class="action" bind:tap="toList">
-      <view class="cuIcon-cu-image">
-        <image src="/common/images/tabbar/my.png"></image>
-      </view>
-      <view class="text-gray">预约记录</view>
+    <view class="text-gray">预约</view>
+  </view>
+  <view class="action" bind:tap="toRoute">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/route.png"></image>
+    </view>
+    <view class="text-gray">路线指引</view>
+  </view>
+  <view class="action" bind:tap="toList">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/business.png"></image>
+    </view>
+    <view class="text-gray">预约记录</view>
+  </view>
+  <view class="action" bind:tap="toMy">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/my.png"></image>
     </view>
+    <view class="text-gray">个人信息</view>
   </view>
-</form>
+</view>

+ 8 - 0
applet/pages/talent/appointment/index.wxss

@@ -3,4 +3,12 @@
 }
 .placeholder-input{
 	color:#999;
+}
+input {
+  text-align: right;
+}
+
+.footer {
+  width: 100%;
+  height: 100rpx;
 }

+ 10 - 0
applet/pages/talent/appointment/list.js

@@ -106,5 +106,15 @@ Page({
     wx.navigateTo({
       url: '/pages/talent/appointment/evaluate?id=' + id,
     })
+  },
+  toRoute() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/route',
+    })
+  },
+  toMy() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/my',
+    })
   }
 })

+ 13 - 1
applet/pages/talent/appointment/list.wxml

@@ -37,10 +37,22 @@
     </view>
     <view class="text-gray">预约</view>
   </view>
+  <view class="action" bind:tap="toRoute">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/route.png"></image>
+    </view>
+    <view class="text-gray">路线指引</view>
+  </view>
   <view class="action">
     <view class="cuIcon-cu-image">
-      <image src="/common/images/tabbar/my_cur.png"></image>
+      <image src="/common/images/tabbar/business_cur.png"></image>
     </view>
     <view class="text-gray">预约记录</view>
   </view>
+  <view class="action" bind:tap="toMy">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/my.png"></image>
+    </view>
+    <view class="text-gray">个人信息</view>
+  </view>
 </view>

+ 117 - 0
applet/pages/talent/appointment/my.js

@@ -0,0 +1,117 @@
+const app = getApp();
+const verify = require("../../../common/js/verify.js");
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    form: {},
+    btnText: '获取验证码',
+    btnSecond: 0,
+    btnClass: 'bg-green',
+    intel: null,
+    mobile: '',
+    verify: '',
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.getInfo();
+  },
+  
+  onUnload() {
+    clearInterval(this.data.intel);
+  },
+
+  getInfo() {
+    const self = this;
+    app.get('talent/appointment/talentInfo', function (res) {
+      self.setData({
+        form: res
+      });
+    });
+  },
+  vmodel(e) {
+    this.setData({
+      [e.currentTarget.dataset.value]: e.detail.value
+    })
+  },
+  getVerify() {
+    if (this.data.btnSecond > 0) {
+      return false;
+    }
+
+    const self = this;
+    if (!verify.isMobile(this.data.mobile)) {
+      app.msg('手机号格式错误');
+      return false;
+    }
+
+    app.post('talent/Appointment/getVerify', {mobile:this.data.mobile}, function (res) {
+      app.msg('发送成功');
+      self.setData({
+        btnSecond: 60,
+        btnClass: 'bg-grey',
+        btnText: "60秒后重试",
+      });
+      self.data.intel = setInterval(function () {
+        let second = self.data.btnSecond;
+        second--;
+        if (second == 0) {
+          self.setData({
+            btnSecond: 0,
+            btnClass: 'bg-green',
+            btnText: "获取验证码",
+          });
+          clearInterval(self.data.intel);
+        } else {
+          self.setData({
+            btnSecond: second,
+            btnClass: 'bg-grey',
+            btnText: `${second}秒后重试`,
+          });
+        }
+      }, 1000);
+    });
+  },
+  submit() {
+    let self = this;
+    if (!verify.isMobile(this.data.mobile)) {
+      app.msg('新手机号格式错误');
+      return false;
+    }
+
+    if (verify.isEmpty(this.data.verify)) {
+      app.msg('请输入手机验证码');
+      return false;
+    }
+
+    app.post('talent/appointment/changeMobile', {mobile:this.data.mobile,verify:this.data.verify}, function (res) {
+      self.setData({
+        ["form.mobile"]: self.data.mobile,
+        mobile: '',
+        verify: '',
+      });
+      app.msg('修改成功');
+    });
+  },
+  toIndex() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/index',
+    })
+  },
+  toRoute() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/route',
+    })
+  },
+  toList() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/list',
+    })
+  },
+})

+ 3 - 0
applet/pages/talent/appointment/my.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 73 - 0
applet/pages/talent/appointment/my.wxml

@@ -0,0 +1,73 @@
+<cu-custom bgColor="bg-lw-header" isCustom="{{true}}">
+  <view slot="content">个人信息</view>
+</cu-custom>
+
+<form>
+    <view class="cu-form-group">
+      <view class="title">姓名</view>
+      <input class="text-right" disabled value="{{form.name}}"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title">证件类型</view>
+      <input class="text-right" disabled value="{{form.card_type}}"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title">证件号</view>
+      <input class="text-right" disabled value="{{form.card_no}}"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title">人才证开始时间</view>
+      <input class="text-right" disabled value="{{form.start_time}}"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title">人才证结束时间</view>
+      <input class="text-right" disabled value="{{form.end_time}}"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title">手机号</view>
+      <input class="text-right" disabled value="{{form.mobile}}"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title"><text class="text-red">*</text> 新手机号</view>
+      <input value="{{mobile}}" placeholder="请输入手机号" bindinput="vmodel" data-value="mobile"></input>
+      <view class='cu-btn shadow {{btnClass}}' bind:tap="getVerify">{{btnText}}</view>
+    </view>
+    <view class="cu-form-group">
+      <view class="title"><text class="text-red">*</text> 验证码</view>
+      <input value="{{verify}}" placeholder="请输入手机验证码" bindinput="vmodel" data-value="verify"></input>
+    </view>
+    <view class="text-gray padding-left text-sm padding-top-xs">
+      <view>备注:仅支持修改手机号,其他信息有误请联系人才办。</view>
+    </view>
+    <view class="padding flex flex-direction">
+      <button class="cu-btn lw-red margin-tb-sm lg" style="width:600rpx;" bindtap="submit">修改手机号</button>
+    </view>
+  </form>
+
+<view class="footer"></view>
+<view class="cu-bar tabbar bg-white foot">
+  <view class="action" bind:tap="toIndex">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/index.png"></image>
+    </view>
+    <view class="text-gray">预约</view>
+  </view>
+  <view class="action" bind:tap="toRoute">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/route.png"></image>
+    </view>
+    <view class="text-gray">路线指引</view>
+  </view>
+  <view class="action" bind:tap="toList">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/business.png"></image>
+    </view>
+    <view class="text-gray">预约记录</view>
+  </view>
+  <view class="action">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/my_cur.png"></image>
+    </view>
+    <view class="text-gray">个人信息</view>
+  </view>
+</view>

+ 6 - 0
applet/pages/talent/appointment/my.wxss

@@ -0,0 +1,6 @@
+.cu-form-group .title {
+  min-width: calc(4em + 30rpx);
+}
+.placeholder-input{
+	color:#999;
+}

+ 46 - 0
applet/pages/talent/appointment/route.js

@@ -0,0 +1,46 @@
+const app = getApp();
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    image: '',
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.getImage();
+  },
+  
+  getImage(){
+    const self = this;
+    app.get('talent/appointment/route',function(res){
+      self.setData({image:res.route_image});
+    });
+  },
+  ViewImage(e) {
+    wx.previewImage({
+      urls: [this.data.image],
+    });
+  },
+  
+  toIndex() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/index',
+    })
+  },
+  toList() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/list',
+    })
+  },
+  toMy() {
+    wx.redirectTo({
+      url: '/pages/talent/appointment/my',
+    })
+  },
+})

+ 3 - 0
applet/pages/talent/appointment/route.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 33 - 0
applet/pages/talent/appointment/route.wxml

@@ -0,0 +1,33 @@
+<cu-custom bgColor="bg-lw-header" isCustom="{{true}}">
+  <view slot="content">路线指引</view>
+</cu-custom>
+<view>
+  <image class="bg-img" src="{{image}}" bindtap="ViewImage" data-url="{{image}}" wx:if="{{image}}" mode="widthFix"></image>
+</view>
+<view class="footer"></view>
+<view class="cu-bar tabbar bg-white foot">
+  <view class="action" bind:tap="toIndex">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/index.png"></image>
+    </view>
+    <view class="text-gray">预约</view>
+  </view>
+  <view class="action">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/route_cur.png"></image>
+    </view>
+    <view class="text-gray">路线指引</view>
+  </view>
+  <view class="action" bind:tap="toList">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/business.png"></image>
+    </view>
+    <view class="text-gray">预约记录</view>
+  </view>
+  <view class="action" bind:tap="toMy">
+    <view class="cuIcon-cu-image">
+      <image src="/common/images/tabbar/my.png"></image>
+    </view>
+    <view class="text-gray">个人信息</view>
+  </view>
+</view>

+ 7 - 0
applet/pages/talent/appointment/route.wxss

@@ -0,0 +1,7 @@
+.footer {
+  width: 100%;
+  height: 100rpx;
+}
+.bg-img {
+  width: 750rpx;
+}

+ 60 - 4
applet/pages/talent/home/home.js

@@ -9,6 +9,10 @@ Page({
   data: {
     userInfo:{},
     form: {},
+    btnText: '获取验证码',
+    btnSecond: 0,
+    btnClass: 'bg-green',
+    intel: null,
   },
 
   /**
@@ -18,13 +22,17 @@ Page({
     
   },
 
+  onUnload() {
+    clearInterval(this.data.intel);
+  },
+
   onShow() {
     let self = this;
     app.get('user/profile/userInfo',function(res){
       app.globalData.userInfo = res;
       if (res.talent_id > 0) {
         wx.navigateTo({
-          url: '/pages/talent/appointment/index',
+          url: '/pages/talent/appointment/list',
         })
       }
       self.setData({userInfo:res});
@@ -37,6 +45,46 @@ Page({
     })
   },
 
+  getVerify() {
+    if (this.data.btnSecond > 0) {
+      return false;
+    }
+
+    const self = this;
+    const form = this.data.form;
+    if (!verify.isMobile(form.mobile)) {
+      app.msg('手机号格式错误');
+      return false;
+    }
+
+    app.post('talent/Appointment/getVerify',form,function(res){
+      app.msg('发送成功');
+      self.setData({
+        btnSecond: 60,
+        btnClass: 'bg-grey',
+        btnText: "60秒后重试",
+      });
+      self.data.intel = setInterval(function(){
+        let second = self.data.btnSecond;
+        second--;
+        if (second == 0) {
+          self.setData({
+            btnSecond: 0,
+            btnClass: 'bg-green',
+            btnText: "获取验证码",
+          });
+          clearInterval(self.data.intel);
+        } else {
+          self.setData({
+            btnSecond: second,
+            btnClass: 'bg-grey',
+            btnText: `${second}秒后重试`,
+          });
+        }
+      },1000);
+    });
+  },
+
   submit() {
     let self = this;
     let form = this.data.form;
@@ -50,11 +98,19 @@ Page({
       return false;
     }
 
+    if (!verify.isMobile(form.mobile)) {
+      app.msg('手机号格式错误');
+      return false;
+    }
+
+    if (verify.isEmpty(form.verify)) {
+      app.msg('请输入手机验证码');
+      return false;
+    }
+
     app.post('talent/Appointment/bind',form,function(res){
       self.setData({userInfo:res});
-      wx.navigateTo({
-        url: '/pages/talent/appointment/index',
-      });
+      app.msg('绑定成功','/pages/talent/appointment/index');
     });
   }
 })

+ 18 - 6
applet/pages/talent/home/home.wxml

@@ -1,22 +1,34 @@
 <cu-custom bgColor="bg-lw-header">
-	<view slot="content">人才便捷出行</view>
+  <view slot="content">人才便捷出行</view>
 </cu-custom>
 <view wx:if="{{userInfo.talent_id == 0}}">
-  <view class="solids-bottom padding-xs flex align-center">
+  <view class="padding-xs flex align-center">
     <view class="flex-sub text-center">
-      <view class="solid-bottom text-xl padding">
+      <view class="text-xl padding">
         <text class="text-black text-bold">请验证人才身份</text>
       </view>
     </view>
   </view>
   <form>
-    <view class="cu-form-group margin-top">
+    <view class="cu-form-group">
       <view class="title"><text class="text-red">*</text> 姓名</view>
-      <input placeholder="请输入姓名" value="" bindinput="vmodel" data-value="name"></input>
+      <input placeholder="请输入姓名" bindinput="vmodel" data-value="name"></input>
     </view>
     <view class="cu-form-group">
       <view class="title"><text class="text-red">*</text> 证件号</view>
-      <input placeholder="请输入身份证/护照/通行证" value="" bindinput="vmodel" data-value="card_no"></input>
+      <input placeholder="请输入身份证/护照/通行证" bindinput="vmodel" data-value="card_no"></input>
+    </view>
+    <view class="cu-form-group">
+      <view class="title"><text class="text-red">*</text> 手机号</view>
+      <input placeholder="请输入手机号" bindinput="vmodel" data-value="mobile"></input>
+      <view class='cu-btn shadow {{btnClass}}' bind:tap="getVerify">{{btnText}}</view>
+    </view>
+    <view class="cu-form-group">
+      <view class="title"><text class="text-red">*</text> 验证码</view>
+      <input placeholder="请输入手机验证码" bindinput="vmodel" data-value="verify"></input>
+    </view>
+    <view class="text-gray padding-left text-sm padding-top-xs">
+      <view>备注:1.身份证等个人信息保密;2.仅需首次登录填写。</view>
     </view>
     <view class="padding flex flex-direction">
       <button class="cu-btn lw-red margin-tb-sm lg" style="width:600rpx;" bindtap="submit">提交</button>

+ 7 - 1
public/themes/admin_simpleboot3/talent/admin_appointment/index.html

@@ -27,9 +27,12 @@
                 <th width="120">班次</th>
                 <th width="120">出发时间</th>
                 <th width="120">车票图片</th>
+                <th width="120">到站时间</th>
+                <th width="100">同行人数</th>
+                <th width="120">其他需求</th>
                 <th width="120">预约提交时间</th>
                 <th width="120">状态</th>
-                <th width="120">满意度</th>
+                <th width="120">满意度(星数)</th>
                 <th>评价内容</th>
                 <th width="150">操作</th>
             </tr>
@@ -47,6 +50,9 @@
                         </div>
                         </notempty>
                     </td>
+                    <td>{$vo.out_time}</td>
+                    <td>{$vo.companion_num}</td>
+                    <td>{$vo.comment}</td>
                     <td>{$vo.create_time}</td>
                     <td>{$vo.status_text}</td>
                     <td>{$vo.rate}</td>

+ 5 - 5
public/themes/admin_simpleboot3/talent/admin_talent/add.html

@@ -80,17 +80,17 @@
                         <th>人才层次<span class="form-required">*</span></th>
                         <td>
                             <select name="level" class="form-control">
-                                <option value="护照">第一层次</option>
-                                <option value="身份证">第二层次</option>
-                                <option value="通行证">第三层次</option>
+                                <option value="第一层次">第一层次</option>
+                                <option value="第二层次">第二层次</option>
+                                <option value="第三层次">第三层次</option>
                             </select>
                         </td>
                     </tr>
                     <tr>
-                        <th>手机号<span class="form-required">*</span></th>
+                        <th>手机号</th>
                         <td>
                             <input class="form-control" type="text" name="mobile"
-                                   required value="" placeholder="请输入手机号"/>
+                                   value="" placeholder="请输入手机号"/>
                         </td>
                     </tr>
                 </table>

+ 5 - 5
public/themes/admin_simpleboot3/talent/admin_talent/edit.html

@@ -82,17 +82,17 @@
                         <th>人才层次<span class="form-required">*</span></th>
                         <td>
                             <select name="level" class="form-control">
-                                <option value="护照" {$info.level==='护照'?'selected':''}>第一层次</option>
-                                <option value="身份证" {$info.level==='身份证'?'selected':''}>第二层次</option>
-                                <option value="通行证" {$info.level==='通行证'?'selected':''}>第三层次</option>
+                                <option value="第一层次" {$info.level==='第一层次'?'selected':''}>第一层次</option>
+                                <option value="第二层次" {$info.level==='第二层次'?'selected':''}>第二层次</option>
+                                <option value="第三层次" {$info.level==='第三层次'?'selected':''}>第三层次</option>
                             </select>
                         </td>
                     </tr>
                     <tr>
-                        <th>手机号<span class="form-required">*</span></th>
+                        <th>手机号</th>
                         <td>
                             <input class="form-control" type="text" name="mobile"
-                                   required value="{$info.mobile}" placeholder="请输入手机号"/>
+                                   value="{$info.mobile}" placeholder="请输入手机号"/>
                         </td>
                     </tr>
                 </table>

+ 21 - 2
public/themes/admin_simpleboot3/talent/admin_talent/setting.html

@@ -3,18 +3,37 @@
 <body>
 <div class="wrap">
     <ul class="nav nav-tabs">
-        <li class="active"><a href="javascript:;">工作人员电话</a></li>
+        <li class="active"><a href="javascript:;">网站设置</a></li>
     </ul>
     <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('talent/admin_talent/settingPost')}">
         <div class="form-group">
             <label for="mobile" class="col-sm-2 control-label">
-                <span class="form-required">*</span>手机号
+                <span class="form-required">*</span>工作人员电话
             </label>
             <div class="col-md-6 col-sm-10">
                 <input type="text" class="form-control" id="mobile" name="mobile" value="{$mobile|default=''}">
 <!--                <p class="help-block" style="color: red;">若工作人员的电话为多个,请用英文的逗号隔开</p>-->
             </div>
         </div>
+        <div class="form-group">
+            <label for="mobile" class="col-sm-2 control-label">
+                <span class="form-required">*</span>缩略图
+            </label>
+            <div class="col-md-6 col-sm-10">
+                <input type="hidden" name="route_image" id="thumbnail" value="{$route_image|default=''}">
+                <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
+                    <if condition="empty($route_image)">
+                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
+                             id="thumbnail-preview"
+                             width="135" style="cursor: pointer"/>
+                        <else/>
+                        <img src="{:cmf_get_image_preview_url($route_image)}"
+                             id="thumbnail-preview"
+                             width="135" style="cursor: pointer"/>
+                    </if>
+                </a>
+            </div>
+        </div>
         <div class="form-group">
             <div class="col-sm-offset-2 col-sm-10">
                 <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>