12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: http://demo.thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\store\controller;
- use library\Controller;
- use library\tools\Data;
- use think\Db;
- /**
- * 指派记录
- * Class GoodsCate
- * @package app\store\controller
- */
- class SendLog extends Controller
- {
- /**
- * 绑定数据表
- * @var string
- */
- protected $table = 'store_send_log';
- /**
- * 指派记录管理
- * @auth true
- * @menu true
- * @throws \think\Exception
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- * @throws \think\exception\PDOException
- */
- public function index()
- {
- $this->title = '指派记录管理';
- $query = $this->_query($this->table);
- $where[] = ['a.id','>',0];
- if($this->request->request('order_no')){
- $where[]=['a.order_no','like','%'.$this->request->request('order_no').'%'];
- }
- $query
- ->alias('a')
- ->field('a.*,m.phone,m.name')
- ->join('store_engineer m','a.worker_id = m.id')
- ->where($where)
- ->order('a.id desc')
- ->page();
- }
- /**需求列表处理
- * @param array $data
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- */
- protected function _index_page_filter(array &$data)
- {
- foreach ($data as &$vo) {
- $vo['worker'] = Db::name('store_engineer')->field('headimg,name,phone')->where('id',$vo['worker_id'])->find();
- $vo['send_worker'] = Db::name('store_engineer')->field('headimg,name,phone')->where('id',$vo['send_worker_id'])->find();
- }
- }
- }
|