544782275@qq.com il y a 3 ans
Parent
commit
44eb5f184c

+ 555 - 0
application/store/controller/Order.php

@@ -0,0 +1,555 @@
+<?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 app\api\controller\Alipay;
+use EasyWeChat\Factory;
+use library\Controller;
+use think\Db;
+use app\api\controller\Area;
+use app\api\controller\Crontab;
+use function GuzzleHttp\Psr7\_caseless_remove;
+
+/**
+ * 订单记录管理
+ * Class Order
+ * @package app\store\controller
+ */
+class Order extends Controller
+{
+    /**
+     * 绑定数据表
+     * @var string
+     */
+    protected $table = 'store_order';
+
+    /**
+     * 订单记录管理
+     * @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->root = $this->request->root(true);
+        $this->title = '订单记录管理';
+        $array = $this->statistical_order_info();
+        $this->assign('a', $array);
+        $this->byWhere(1)->field('a.*,b.name,b.headimg')->order('a.id desc')->page();
+    }
+
+    protected  function statistical_order_info()
+    {
+        $array = array();
+        $array['all_order'] = $this->byWhere(2)->count();
+        $array['all_price'] = $this->byWhere(2)->where('a.status', 'in', array('2','3','4','5'))->sum('a.price_total');
+        $array['weixin_all_price'] = $this->byWhere(2)->where('a.status', 'in', array('2','3','4','5'))->where('a.pay_type', '1')->where('refund_price','=',0)->sum('a.price_total');
+        $array['zfb_all_price'] = $this->byWhere(2)->where('a.status', 'in', array('2','3','4','5'))->where('a.pay_type', '2')->where('refund_price','=',0)->sum('a.price_total');
+        return $array;
+    }
+
+    /**
+     * 搜索条件
+     * @return \library\helper\QueryHelper
+     */
+    protected  function byWhere($type)
+    {
+        if ($type == 1) {
+            $query = $this->_query($this->table);
+        } elseif ($type == 2) {
+            $query = Db::name($this->table);
+        }
+        $query = $query->alias('a')->join('store_member b', 'a.user_id=b.id');
+        $query->where('status','>',0);
+        if (isset($_GET['order_no']) && $_GET['order_no']) {
+            $query->where('a.order_no', 'like','%'.$_GET['order_no'].'%');
+        }
+        if (isset($_GET['status']) && $_GET['status'] != '') {
+            $query->where('a.status', $_GET['status']);
+        }
+
+        if (isset($_GET['pay_status']) && $_GET['pay_status'] != '') {
+            $query->where('a.pay_status', $_GET['pay_status']);
+        }
+        if (isset($_GET['pay_type']) && $_GET['pay_type']) {
+            $query->where('a.pay_type', $_GET['pay_type']);
+        }
+        if (isset($_GET['create_at']) && $_GET['create_at']) {
+            $time = explode(' - ', $_GET['create_at']);
+            $start_date_time = $time[0] . ' 00:00:00';
+            $end_date_time = $time[1] . ' 23:59:59';
+            $query->whereBetweenTime('a.create_at', $start_date_time, $end_date_time);
+        }
+        if (isset($_GET['pay_at']) && $_GET['pay_at']) {
+            $time = explode(' - ', $_GET['pay_at']);
+            $start_date_time = $time[0] . ' 00:00:00';
+            $end_date_time = $time[1] . ' 23:59:59';
+            $query->whereBetweenTime('a.pay_at', $start_date_time, $end_date_time);
+        }
+        if (isset($_GET['user_info']) && $_GET['user_info']) {
+            $query->where('b.name|b.phone', '=', $_GET['user_info'] );
+        }
+        if (isset($_GET['worker_info']) && $_GET['worker_info']) {
+            $worker_id = Db::name('store_engineer')->where('name|phone', '=', $_GET['worker_info'] )->value('id');
+            $query->where('worker_id',$worker_id);
+        }
+        return $query;
+    }
+
+    /**
+     * 订单列表处理
+     * @param array $data
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    protected function _index_page_filter(array &$data)
+    {
+        $mids = array_unique(array_merge(array_column($data, 'user_id'), array_column($data, 'user_id')));
+        $memberList = Db::name('StoreMember')->whereIn('id', $mids)->select();
+
+        $wids = array_unique(array_merge(array_column($data, 'worker_id'), array_column($data, 'worker_id')));
+        $workerList = Db::name('StoreWorker')->whereIn('id', $wids)->select();
+        foreach ($data as &$vo) {
+            list($vo['member'], $vo['worker']) = [[],[]];
+
+            foreach ($memberList as $member) if ($member['id'] === $vo['user_id']) {
+                $vo['member'] = $member;
+            }
+
+            foreach ($workerList as $worker) if ($worker['id'] === $vo['worker_id']) {
+                $vo['worker'] = $worker;
+            }
+
+            if($vo['refund_state'] > 0){
+                $vo['refund'] = Db::table('store_order_refund')->where('order_no',$vo['order_no'])->find();
+            }
+            $vo['cate_id'] = serve_cate_arr()[$vo['cate_id']];
+            $vo['type'] = serve_type_arr()[$vo['type']];
+            //获取货物信息
+            $goods_info = json_decode($vo['goods_info'],true);
+            foreach ($goods_info as &$value){
+                if($value['image']){
+                    $value['image'] = image_path($value['image']);
+                }
+            }
+            $vo['goods_info'] = $goods_info;
+            //接单人员服务佣金
+            $vo['worker_serve_amount'] = '';
+            if(in_array($vo['status'],[2,3,4,5])){
+                $vo['worker_serve_amount'] = Db::name('store_balance_list')->where('user_id','>',0)->where('order_id',$vo['id'])->where('user_type',2)->value('amount');
+            }
+            //查看是否有介入小二的没处理的投诉
+            $vo['complain_id'] = 0;
+            $complain_id = Db::name('store_complain')->where('order_no',$vo['order_no'])->where('is_dispose',0)->where('is_intervene',1)->value('id');
+            if($complain_id){
+                $vo['complain_id'] = $complain_id;
+            }
+        }
+    }
+
+
+    /**
+     * 表单数据处理
+     * @param array $data
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    protected function _form_filter(array &$data)
+    {
+        if ($this->request->isGet()) {
+            if($data['refund_state'] > 0){
+                $data['refund']=Db::table('store_order_refund')->where('order_no',$data['order_no'])->find();
+                $data['refund']['user_images'] = image_path($data['refund']['user_images']);
+                $data['refund']['worker_images'] = image_path($data['refund']['worker_images']);
+            }
+            //投诉信息
+            $complain_id = Db::name('store_complain')->where('order_no',$data['order_no'])->where('is_intervene',1)->value('id');
+            if($complain_id){
+                $data['complain'] = Db::name('store_complain')->field('user_question,user_images,worker_question,worker_images,result_info,dispose_status,dispose_at,cate_id')->where('order_no',$data['order_no'])->where('is_intervene',1)->find();
+                $data['complain']['user_images'] = image_path($data['complain']['user_images']);
+                $data['complain']['worker_images'] = image_path($data['complain']['worker_images']);
+                //投诉类型
+                $data['complain']['cate'] = Db::name('store_complain_cate')->where('id',$data['complain']['cate_id'])->value('title');
+            }
+            $area_obj = new area();
+            //发货仓地址
+            $data['deliver_address'] = '';
+            if($data['deliver_address_id']){
+                $member_address = Db::name('store_member_address')->where('id',$data['deliver_address_id'])->find();
+                $data['deliver_address'] = $area_obj->get_area($member_address['province'],$member_address['city'],$member_address['county']).$member_address['address'];
+            }
+            //客户地址
+            $data['client_address'] = $area_obj->get_area($data['client_province'],$data['client_city'],$data['client_county']).$data['client_address'];
+            //是否有电梯
+            $is_elevator_arr = array('0'=>'没电梯','1'=>'有电梯');
+            $data['is_elevator'] = $is_elevator_arr[$data['is_elevator']];
+            //物流地址
+            if($data['logistics_province']){
+                $data['logistics_address'] = $area_obj->get_area($data['logistics_province'],$data['logistics_city'],$data['logistics_county']).$data['logistics_address'];
+            }
+
+            $data['cate_id'] = serve_cate_arr()[$data['cate_id']];
+            $data['type'] = serve_type_arr()[$data['type']];
+            //获取货物信息
+            $goods_info = json_decode($data['goods_info'],true);
+            foreach ($goods_info as &$value){
+                if($value['image']){
+                    $value['image'] = image_path($value['image']);
+                }
+            }
+            $data['goods_info'] = $goods_info;
+            //接单人员服务佣金
+            $data['worker_serve_amount'] = '';
+            if(in_array($data['status'],[2,3,4,5])){
+                $data['worker_serve_amount'] = Db::name('store_balance_list')->where('user_id','>',0)->where('order_id',$data['id'])->where('user_type',2)->value('amount');
+            }
+
+            //接单人员信息
+            if($data['worker_id']){
+                $data['worker_info'] = Db::name('store_worker')->field('name,phone')->where('id',$data['worker_id'])->find();
+                //收货仓地址
+                if($data['receive_address_id']){
+                    $worker_address = Db::name('store_worker_address')->where('id',$data['receive_address_id'])->find();
+                    $data['receive_address'] = $area_obj->get_area($worker_address['province'],$worker_address['city'],$worker_address['county']).$worker_address['address'];
+                }
+                //发起验收图片
+                if($data['check_image']){
+                    $data['check_image'] = image_path($data['check_image']);
+                }
+            }
+
+            //报价信息
+            $offer_list = Db::name('store_offer_list')->field('worker_id,money,ys_money,az_money,create_at')->where('order_id',$data['id'])->select();
+            if(empty($offer_list)){
+                $offer_list = Db::name('store_offer_list')->field('worker_id,money,ys_money,az_money,create_at')->where('old_order_id',$data['id'])->select();
+            }
+            foreach ($offer_list as &$value){
+                $offer_worker = Db::name('store_worker')->field('name,phone')->where('id',$value['worker_id'])->find();
+                $value['name'] = $offer_worker['name'];
+                $value['phone'] = $offer_worker['phone'];
+            }
+            $data['offer_list'] = $offer_list;
+            $this->data = $data;
+        }
+    }
+
+    /**
+     * 订单备注
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function order_remark()
+    {
+        $id = $this->app->request->get('id');
+        $this->assign('id', $id);
+        $post = $this->app->request->post();
+        if (isset($post['id']) && $post['id']) {
+            Db::name($this->table)->where('id', $post['id'])->update(['mark' => $post['remark']]);
+            $this->success('编辑成功!');
+        } else {
+            $this->_form($this->table, 'order_remark');
+        }
+
+    }
+
+    /**
+     * 订单详情页
+     */
+    public function order_detail()
+    {
+        $this->_form($this->table);
+    }
+
+    /**
+     * 订单记录
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function order_status()
+    {
+        $id = $this->app->request->get('id');
+        $this->assign('id', $id);
+        $post = $this->app->request->post();
+        if (isset($post['id']) && $post['id']) {
+            Db::name($this->table)->where('id', $post['id'])->update(['remark' => $post['remark']]);
+            $this->success('编辑成功!');
+        } else {
+            $this->_form($this->table);
+        }
+
+    }
+
+    /**
+     * 立即退款
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function order_refund()
+    {
+        $id = $this->app->request->get('id');
+        $this->assign('id', $id);
+        $post = $this->app->request->post();
+        if (isset($post['id']) && $post['id']) {
+            $order_info = Db::name($this->table)->where('id', $post['id'])->find();
+            if($post['amount'] < 0 || $post['amount'] > $order_info['price_total']){
+                $this->error('退款金额错误');
+            }
+            $refund_success = 0;
+            $refund_info = Db::name('store_order_refund')->where('order_no', $order_info['order_no'])->find();
+            if($order_info['pay_type'] == 1){    //微信退款
+                $app = Factory::payment(config('app.wx_pay'));
+                $result = $app->refund->byOutTradeNumber($order_info['pay_no'], $refund_info['refund_no'],$order_info['price_total']*100, $post['amount']*100, [
+                    // 可在此处传入其他参数,详细参数见微信支付文档
+                    'refund_desc' => $refund_info['reason'],
+                ]);
+                if($result['return_code']=='SUCCESS' && $result['result_code']=='SUCCESS'){
+                    $refund_success = 1;
+                }
+            }elseif($order_info['pay_type'] == 2){
+                $result = Alipay::ali_refund($order_info['pay_no'],$post['amount']);
+                if($result){
+                    $refund_success = 1;
+                }
+            }else{    //余额退款
+                $balance_data = array(
+                    'amount' => $post['amount'],
+                    'user_id' => $order_info['user_id'],
+                    'user_type' => 1,
+                    'get_type' => 4,
+                    'order_id' => $order_info['id'],
+                    'status' => 1
+                );
+                Db::name('store_balance_list')->insert($balance_data);
+                Db::name('store_member')->where('id',$order_info['user_id'])->setInc('balance',$refund_info['amount']);
+                $refund_success = 1;
+            }
+            if($refund_success == 1){
+                Db::name('store_order_refund')->where('order_no',$order_info['order_no'])->update(array('status'=>1,'intervene_remark'=>$post['intervene_remark'],'dispose_at'=>date('Y-m-d H:i:s'),'amount'=>$post['amount']));
+                //更改退款状态
+                Db::name('store_order')->where('id',$id)->update(array('refund_state'=>2,'status'=>7,'refund_intervene'=>2,'refund_price'=>$post['amount']));
+                //部分退款的剩下的给工人
+                $residue_amount = $order_info['price_total'] - $post['amount'];
+                if($residue_amount){
+                    //给接单端发送余额
+                    $balance_info = Db::name('store_balance_list')->where('user_id','>',0)->where('order_id',$id)->where('user_type',2)->where('status',0)->find();
+                    if($balance_info){
+                        //更改服务人员可拿的余额
+                        $balance_amount = sprintf("%.2f",$residue_amount * $order_info['worker_ratio'] / 100);
+                        Db::name('store_balance_list')->where('id',$balance_info['id'])->update(array('status'=>1,'amount'=>$balance_amount));
+                        Db::name('store_worker')->where('id',$balance_info['user_id'])->setInc('balance',$balance_amount);
+                        Db::name('store_worker')->where('id',$balance_info['user_id'])->setInc('balance_all',$balance_amount);
+                    }
+                }
+                $this->success('退款成功');
+            }else{
+                $this->error('退款失败');
+            }
+        } else {
+            $this->_form($this->table, 'order_rufund');
+        }
+
+    }
+
+    /**
+     * 不退款
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function order_no_refund()
+    {
+        $id = $this->app->request->get('id');
+        $this->assign('id', $id);
+        $post = $this->app->request->post();
+        if (isset($post['id']) && $post['id']) {
+
+            $order=Db::table('store_order')->where('id',$post['id'])->find();
+
+            Db::name('store_order')->where('id', $post['id'])->update(['refund_state' => 3,'refund_intervene'=>2]);
+            Db::name('store_order_refund')->where('order_no', $order['order_no'])
+                ->update(['status' => 2,'intervene_remark'=>$post['intervene_remark'],'dispose_at'=>date('Y-m-d H:i:s')]);
+
+            $this->success('拒绝成功!');
+        } else {
+            $this->_form($this->table, 'order_no_rufund');
+        }
+
+    }
+    /**
+     * 处理投诉
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function dispose_complain()
+    {
+        $id = $this->app->request->get('id');
+        $dispose_status = $this->app->request->get('dispose_status');
+        $this->assign('id', $id);
+        $this->assign('dispose_status', $dispose_status);
+        $post = $this->app->request->post();
+        if (isset($post['id']) && $post['id']) {
+            $order_no = Db::name('store_order')->where('id',$id)->value('order_no');
+            Db::name('store_complain')->where('order_no',$order_no)->update(array('result_info'=>$post['result_info'],'is_dispose'=>1,'dispose_at'=>date('Y-m-d H:i:s'),'dispose_status'=>$dispose_status));
+            Db::name('store_order')->where('id',$id)->update(array('complain_status'=>2));
+            $this->success('提交成功');
+        }else{
+            $this->_form($this->table, 'dispose_complain');
+        }
+    }
+    /**
+     * 修改时间
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function update_time()
+    {
+        $id = $this->app->request->get('id');
+        $this->assign('id', $id);
+        $post = $this->app->request->post();
+        if (isset($post['id']) && $post['id']) {
+            $order_info = Db::name('store_order')->field('id,order_no,appoint_time')->where('id',$id)->where('status',1)->where('work_status','in',[0,1])->find();
+            if(empty($order_info)){
+                $this->error('订单信息有误');
+            }
+            $post['appoint_time'] = date('Y-m-d H:00:00',strtotime($post['appoint_time']));
+            if($post['appoint_time'] == $order_info['appoint_time']){
+                $this->error('修改后的时间与服务时间一致,无需修改');
+            }
+            $res = update_appoint_time($order_info['order_no'],1,$post['appoint_time']);
+            if($res['code']){
+                $this->success('修改成功');
+            }else{
+                $this->error($res['msg']);
+            }
+        } else {
+            $this->_form($this->table, 'update_time');
+        }
+
+    }
+    /**
+     * 挂起订单
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\exception\PDOException
+     */
+    public function hang_up()
+    {
+        //给用户发短信通知
+        $id = $_POST['id'];
+        $user_id = Db::name($this->table)->where('id',$id)->value('user_id');
+        $phone = Db::name('store_member')->where('id',$user_id)->value('phone');
+        short_note($phone);
+        $this->_save($this->table, ['is_hang_up' => '1','apply_hang_up'=>0]);
+    }
+    public function export(){
+        $data = $this->byWhere(2)->field('a.*,b.name,b.phone')->order('id desc')->select();
+        foreach ($data as &$vo){
+            //服务标题
+            $vo['serve_title'] = Db::name('store_serve')->where('id',$vo['serve_id'])->value('title');
+            //配件
+            $vo['parts_title'] = '--';
+            if($vo['parts_id']){
+                $vo['parts_title'] = Db::name('store_serve_parts')->where('id',$vo['parts_id'])->value('title');
+            }
+            //分成信息
+            $vo['worker_serve_amount'] = 0;
+            $vo['worker_parts_amount'] = 0;
+            $vo['agency_amount'] = 0;
+            $vo['agency_parts_amount'] = 0;
+            $vo['extend_amount'] = 0;
+            if($vo['status'] > 0){
+                $vo['worker_serve_amount'] = sprintf("%.2f",($vo['price_total'] - $vo['price_parts']) * $vo['worker_ratio']/100);
+                $vo['worker_parts_amount'] = sprintf("%.2f",$vo['price_parts'] * $vo['worker_parts_ratio']/100);
+                $vo['agency_amount'] = sprintf("%.2f",($vo['price_total'] - $vo['price_parts']) * $vo['agency_ratio']/100);
+                $vo['agency_parts_amount'] = sprintf("%.2f",$vo['price_parts'] * $vo['agency_parts_ratio']/100);
+                if($vo['puser_id']){
+                    $vo['extend_amount'] = sprintf("%.2f",($vo['price_total'] - $vo['price_parts'])  * $vo['extend_ratio']/100);
+                }
+            }
+        }
+        $field=array(
+            'A' => array('name', '下单人姓名'),
+            'B' => array('phone', '下单人手机号'),
+            'C' => array('order_no', '订单编号'),
+            'D' => array('price_goods', '订单金额(元)'),
+            'E' => array('price_total', '支付金额(元)'),
+            'F' => array('serve_title', '服务名称'),
+            'G' => array('parts_title', '配件名称'),
+            'H' => array('worker_serve_amount', '工程师服务佣金(元)'),
+            'I' => array('worker_parts_amount', '工程师配件佣金(元)'),
+            'J' => array('agency_amount', '代理服务佣金(元)'),
+            'K' => array('agency_parts_amount', '代理配件佣金(元)'),
+            'L' => array('extend_amount', '推广员佣金(元)'),
+            'M' => array('create_at', '下单时间'),
+        );
+        $this->phpExcelList($field,$data,'订单列表');
+    }
+
+    public function phpExcelList($field=[],$list=[],$title='文件'){
+        $PHPExcel=new \PHPExcel();
+        $PHPSheet=$PHPExcel->getActiveSheet();
+        $PHPSheet->setTitle('demo'); //给当前活动sheet设置名称
+        foreach($list as $key=>$value)
+        {
+            foreach($field as $k=>$v){
+                if($key == 0){
+                    $PHPSheet= $PHPExcel->getActiveSheet()->setCellValue($k.'1',$v[1]);
+                }
+                $i=$key+2;
+                $PHPExcel->getActiveSheet()->setCellValue($k . $i, $value[$v[0]]);
+
+            }
+        }
+        $PHPWriter = \PHPExcel_IOFactory::createWriter($PHPExcel,'Excel2007'); //按照指定格式生成Excel文件,
+        // Redirect output to a client’s web browser (Excel5)
+        header('Content-Type: application/vnd.ms-excel'); // 告诉浏览器生成一个excel05版的表格
+        header("Content-Disposition: attachment;filename={$title}.xls"); //告诉浏览器输出文件的名称
+        header('Cache-Control: max-age=0'); //禁止缓存
+        $PHPWriter->save("php://output"); //输出到浏览器
+    }
+
+}

+ 165 - 0
application/store/view/order/index.html

@@ -0,0 +1,165 @@
+{extend name='admin@main'}
+
+{block name="content"}
+<div class="think-box-shadow">
+    {include file='order/index_search'}
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md2" style="width: 15.7%">
+            <div class="layui-card">
+                <div class="layui-card-header">订单数量</div>
+                <div class="layui-card-body">
+                    <h2>{$a.all_order}&nbsp;个</h2>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md2" style="width: 15.7%">
+            <div class="layui-card">
+                <div class="layui-card-header">支付总金额</div>
+                <div class="layui-card-body">
+                    <h2>{$a.all_price}&nbsp;元</h2>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md2" style="width: 15.7%">
+            <div class="layui-card">
+                <div class="layui-card-header">微信支付金额</div>
+                <div class="layui-card-body">
+                    <h2>{$a.weixin_all_price}&nbsp;元</h2>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md2" style="width: 15.7%">
+            <div class="layui-card">
+                <div class="layui-card-header">支付宝支付金额</div>
+                <div class="layui-card-body">
+                    <h2>{$a.zfb_all_price}&nbsp;元</h2>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md2" style="width: 15.7%">
+            <div class="layui-card">
+                <div class="layui-card-header">余额支付金额</div>
+                <div class="layui-card-body">
+                    <h2>{$a.balance_all_price}&nbsp;元</h2>
+                </div>
+            </div>
+        </div>
+
+        <div class="layui-col-md4" style="width: 20.5%">
+            <div class="layui-card">
+                <div class="layui-card-header">退款金额:{$a.all_refund_price}</div>
+                <div class="layui-card-body">
+                    <h4>微信:{$a.weixin_refund_price}&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;支付宝:{$a.zfb_refund_price}&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;余额:{$a.balance_refund_price}&nbsp;元</h4>
+                </div>
+            </div>
+        </div>
+    </div>
+    <table class="layui-table margin-top-10" lay-skin="line">
+        {notempty name='list'}
+        <thead>
+        <tr>
+            <th class="text-left nowrap">货主信息</th>
+            <th class='text-left nowrap'>接单人员信息</th>
+            <th class='text-left nowrap'>服务类型</th>
+            <th class='text-left nowrap'>订单信息</th>
+            <th class='text-left nowrap'>货物信息</th>
+            <th class='text-left nowrap'>分成信息</th>
+            <th class='text-center nowrap'>操作</th>
+        </tr>
+        </thead>
+        {/notempty}
+        <tbody>
+        {foreach $list as $key=>$vo}
+        <tr>
+            <td class="text-left nowrap relative">
+                <img data-tips-image style="width:80px;height:80px" src="{$vo.member.headimg|default='/static/avatar.jpg'}" class="margin-right-5 text-top">
+                <div class="inline-block" style="line-height: 40px;">
+                    货主姓名:{$vo.member.name|default='--'}
+                    <br>
+                    会员手机:{$vo.member.phone|default='--'}<br>
+                </div>
+            </td>
+            <td class="text-left nowrap relative">
+                <div class="inline-block">
+                    接单人员姓名:{$vo.worker.name|default='--'}<br>
+                    接单人员手机:{$vo.worker.phone|default='--'}<br>
+                </div>
+            </td>
+            <td class="text-left nowrap relative">
+                服务类目:{$vo.type|default='--'}<br>
+                服务类型:{$vo.cate_id|default='--'}
+            </td>
+            <td class='text-left nowrap'>
+                订单单号:<span class="color-blue">{$vo.order_no|default=''}</span>
+                {eq name='vo.status' value='0'}<span class="layui-badge layui-bg-orange margin-left-5">竞标中</span>{/eq}
+                {eq name='vo.status' value='1'}<span class="layui-badge layui-bg-black margin-left-5">待付款</span>{/eq}
+                {eq name='vo.status' value='2'}<span class="layui-badge layui-bg-green margin-left-5">服务中</span>{/eq}
+                {eq name='vo.status' value='3'}
+                    <span class="layui-badge layui-bg-blue margin-left-5">待验收</span>
+                    {eq name='vo.refund_state' value='1'}
+                        (申请退款中)
+                    {/eq}
+                    {eq name='vo.refund_state' value='3'}
+                        (退款失败)
+                    {/eq}
+                {/eq}
+                {eq name='vo.status' value='4'}<span class="layui-badge layui-bg-blue margin-left-5">已完成(待评价)</span>{/eq}
+                {eq name='vo.status' value='5'}<span class="layui-badge layui-bg-blue margin-left-5">交易成功</span>{/eq}
+                {eq name='vo.status' value='6'}<span class="layui-badge layui-bg-blue margin-left-5">交易关闭</span>{/eq}
+                {eq name='vo.status' value='7'}<span class="layui-badge layui-bg-blue margin-left-5">已退款</span>{/eq}
+                <br>
+                订单金额:<strong class="color-blue">{$vo.price_amount}</strong> 元
+                支付金额 <strong class="color-blue">{$vo.price_total}</strong> 元<br>
+                支付方式:{if $vo.pay_type==1}<span class="layui-bg-green layui-badge">微信</span>{elseif $vo.pay_type==2}<span class="layui-bg-red layui-badge">支付宝</span>{else}余额{/if}<br>
+                下单时间:{$vo.create_at|format_datetime}<br>
+                支付时间:{$vo.pay_at|format_datetime|default='--'}<br>
+            </td>
+
+            <td class="text-left nowrap relative">
+                <div class="inline-block">
+                    {if $vo.goods_info}
+                        {foreach $vo.goods_info as $v}
+                            图片:
+                            {foreach $v['image'] as $v_image}
+                            <img data-tips-image style="width:20px;height:20px" src="{$v_image|default=''}" class="margin-right-5 text-top">
+                            {/foreach}
+                            型号:{$v['cate']}
+                            数量:{$v['num']}
+                            <br>
+                        {/foreach}
+                    {else}
+                        暂无
+                    {/if}
+                </div>
+            </td>
+            <td class="text-left nowrap relative">
+                <div class="inline-block">
+                    接单人员服务佣金:{$vo.worker_serve_amount|default='--'}
+                </div>
+            </td>
+            <td class="text-center nowrap">
+                {if auth("store/order/order_detail")}
+                <a data-title="订单详情" class="layui-btn layui-btn-sm" data-modal='{:url("order_detail")}?id={$vo.id}'>订单详情</a>
+                {/if}
+
+                {if $vo.refund_state > 0}
+                {if $vo.refund.status==0 && $vo.refund.is_intervene==1}
+                <a data-title="立即退款" class="layui-btn layui-btn-sm layui-bg-orange" data-modal='{:url("order_refund")}?id={$vo.id}'>立即退款</a>
+                <a data-title="拒绝退款" class="layui-btn layui-btn-sm layui-bg-red" data-modal='{:url("order_no_refund")}?id={$vo.id}'>拒绝退款</a>
+                {/if}
+                {/if}
+
+                {if $vo.complain_id}
+                <a data-title="投诉成立" class="layui-btn layui-btn-sm layui-bg-orange" data-modal='{:url("dispose_complain")}?id={$vo.id}&dispose_status=1'>投诉成立</a>
+                <a data-title="投诉不成立" class="layui-btn layui-btn-sm layui-bg-red" data-modal='{:url("dispose_complain")}?id={$vo.id}&dispose_status=2'>投诉不成立</a>
+                {/if}
+            </td>
+        </tr>
+        {/foreach}
+        </tbody>
+    </table>
+
+    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
+
+</div>
+{/block}

+ 121 - 0
application/store/view/order/index_search.html

@@ -0,0 +1,121 @@
+<fieldset>
+    <legend>条件搜索</legend>
+    <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">订单单号</label>
+            <div class="layui-input-inline">
+                <input name="order_no" value="{$Think.get.order_no|default=''}" placeholder="请输入订单单号" class="layui-input">
+            </div>
+        </div>
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">订单状态</label>
+            <div class="layui-input-inline">
+                <select class="layui-select" name="status">
+                    {foreach [''=>'- 全部订单 -','0'=>'竞标中','1'=>'待付款','2'=>'服务中','3'=>'待验收','4'=>'已完成(待评价)','5'=>'交易成功','6'=>'交易关闭','7'=>'退款成功'] as $k=>$v}
+                    <!--{eq name='Think.get.status' value='$k.""'}-->
+                    <option selected value="{$k}">{$v}</option>
+                    <!--{else}-->
+                    <option value="{$k}">{$v}</option>
+                    <!--{/eq}-->
+                    {/foreach}
+                </select>
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">退款介入小二</label>
+            <div class="layui-input-inline">
+                <select class="layui-select" name="refund_intervene">
+                    {foreach [''=>'- 全部订单 -','0'=>'未介入','1'=>'介入中','2'=>'已处理'] as $k=>$v}
+                    <!--{eq name='Think.get.refund_intervene' value='$k.""'}-->
+                    <option selected value="{$k}">{$v}</option>
+                    <!--{else}-->
+                    <option value="{$k}">{$v}</option>
+                    <!--{/eq}-->
+                    {/foreach}
+                </select>
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">投诉介入小二</label>
+            <div class="layui-input-inline">
+                <select class="layui-select" name="complain_status">
+                    {foreach [''=>'- 全部订单 -','0'=>'未投诉','1'=>'投诉中','2'=>'已处理'] as $k=>$v}
+                    <!--{eq name='Think.get.complain_status' value='$k.""'}-->
+                    <option selected value="{$k}">{$v}</option>
+                    <!--{else}-->
+                    <option value="{$k}">{$v}</option>
+                    <!--{/eq}-->
+                    {/foreach}
+                </select>
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">付款状态</label>
+            <div class="layui-input-inline">
+                <select class="layui-select" name="pay_status">
+                    {foreach [''=>'- 全部订单 -','0'=>'未支付的订单','1'=>'已支付的订单'] as $k=>$v}
+                    <!--{eq name='Think.get.pay_status' value='$k.""'}-->
+                    <option selected value="{$k}">{$v}</option>
+                    <!--{else}-->
+                    <option value="{$k}">{$v}</option>
+                    <!--{/eq}-->
+                    {/foreach}
+                </select>
+            </div>
+        </div>
+
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">支付方式</label>
+            <div class="layui-input-inline">
+                <select class="layui-select" name="pay_type">
+                    {foreach [''=>'- 全部方式 -','1'=>'微信','2'=>'余额'] as $k=>$v}
+                    <!--{eq name='Think.get.pay_type' value='$k.""'}-->
+                    <option selected value="{$k}">{$v}</option>
+                    <!--{else}-->
+                    <option value="{$k}">{$v}</option>
+                    <!--{/eq}-->
+                    {/foreach}
+                </select>
+            </div>
+        </div>
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">下单时间</label>
+            <div class="layui-input-inline">
+                <input data-date-range name="create_at" value="{$Think.get.create_at|default=''}" placeholder="请选择下单时间" class="layui-input">
+            </div>
+        </div>
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">支付时间</label>
+            <div class="layui-input-inline">
+                <input data-date-range name="pay_at" value="{$Think.get.pay_at|default=''}" placeholder="请选择支付时间" class="layui-input">
+            </div>
+        </div>
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">货主信息</label>
+            <div class="layui-input-inline">
+                <input name="user_info" value="{$Think.get.user_info|default=''}" placeholder="请输入货主姓名、手机号" class="layui-input">
+            </div>
+        </div>
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">接单人员信息</label>
+            <div class="layui-input-inline">
+                <input name="worker_info" value="{$Think.get.worker_info|default=''}" placeholder="请输入接单人员姓名、手机号" class="layui-input">
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
+            <button type="button" data-export-list class="layui-btn layui-btn-primary layui-hide" id="download"><i class="layui-icon layui-icon-export"></i> 导 出</button>
+        </div>
+    </form>
+    <script>
+        window.form.render();
+        $('#download').click(function () {
+            window.location.href = "{:url('export')}?" + $(this).parents('form').serialize();
+        });
+    </script>
+</fieldset>

+ 244 - 0
application/store/view/order/order_detail.html

@@ -0,0 +1,244 @@
+<div style="padding: 20px; background-color: #F2F2F2;">
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">订单信息</div>
+                <div class="layui-card-body">
+                    <div class="layui-col-md6">订单号:{$data.order_no}</div>
+                    <div class="layui-col-md6">订单状态:
+
+                        {eq name='vo.status' value='0'}<span class="layui-badge layui-bg-orange margin-left-5">竞标中</span>{/eq}
+                        {eq name='vo.status' value='1'}<span class="layui-badge layui-bg-black margin-left-5">待付款</span>{/eq}
+                        {eq name='vo.status' value='2'}<span class="layui-badge layui-bg-green margin-left-5">服务中</span>{/eq}
+                        {eq name='vo.status' value='3'}
+                        <span class="layui-badge layui-bg-blue margin-left-5">待验收</span>
+                        {eq name='vo.refund_state' value='1'}
+                        (申请退款中)
+                        {/eq}
+                        {eq name='vo.refund_state' value='3'}
+                        (退款失败)
+                        {/eq}
+                        {/eq}
+                        {eq name='vo.status' value='4'}<span class="layui-badge layui-bg-blue margin-left-5">已完成(待评价)</span>{/eq}
+                        {eq name='vo.status' value='5'}<span class="layui-badge layui-bg-blue margin-left-5">交易成功</span>{/eq}
+                        {eq name='vo.status' value='6'}<span class="layui-badge layui-bg-blue margin-left-5">交易关闭</span>{/eq}
+                        {eq name='vo.status' value='7'}<span class="layui-badge layui-bg-blue margin-left-5">已退款</span>{/eq}
+                    </div>
+                    <hr />
+                    <div class="layui-col-md6">服务类目:{$data.type|default='0'} </div>
+                    <div class="layui-col-md6">配件类型:{$data.cate_id|default='0'}</div>
+                    <hr />
+                    <div class="layui-col-md6">需支付金额:{$data.price_amount|default='0'}</div>
+                    <div class="layui-col-md6">实际支付金额:{$data.price_total|default='0'}</div>
+                    <hr />
+                    <div class="layui-col-md6">优惠券抵扣金额:{$data.coupon_amount|default='0'}</div>
+                    <div class="layui-col-md6">确认雇佣时间:{$data.hire_time|default='0'}</div>
+                    <hr />
+                    <div class="layui-col-md6">接单人员佣金:{$data.worker_serve_amount|default='0'}</div>
+                    <div class="layui-col-md6">支付方式:
+                        {eq name='vo.pay_type' value='1'}<span class="layui-badge layui-bg-green margin-left-5">微信</span>{/eq}
+                        {eq name='vo.pay_type' value='2'}<span class="layui-badge layui-bg-blue margin-left-5">支付宝</span>{/eq}
+                        {eq name='vo.pay_type' value='3'}<span class="layui-badge layui-bg-blue margin-left-5">余额</span>{/eq}
+                    </div><hr />
+                    <div class="layui-col-md6">下单时间:{$data.create_at|format_datetime}</div>
+                    <div class="layui-col-md6">支付时间:{$data.pay_at|format_datetime|default='--'}</div>
+                    <hr />
+                    <div class="layui-col-md6">确认雇佣时间:{$data.hire_time|format_datetime}</div>
+                    <div class="layui-col-md6">预约时间:{$data.appoint_time}</div>
+                    <hr />
+                    {if $data.status == 7}<div class="layui-col-md6">退款金额:{$data.refund.amount|default='0'}</div>
+                    <div class="layui-col-md6">退款原因:{$data.refund.reason}</div><hr />
+                    {/if}
+                </div>
+            </div>
+        </div>
+        {if $data.offer_list}
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">报价列表</div>
+                <div class="layui-card-body">
+                    {foreach $data.offer_list as $value}
+                    <div class="layui-col-md4">报价人员:{$value.name|default='--'}({$value.phone|default='--'})</div>
+                    <div class="layui-col-md4">报价时间:{$value.create_at|default='--'}</div>
+                    <div class="layui-col-md4">
+                        {if $value.ys_money > 0}
+                        运输报价:{$value.ys_money}&nbsp;&nbsp;安装报价:{$value.az_money}<br/>合计报价:{$value.money}
+                        {else}
+                        报价金额:{$value.money|default='--'}
+                        {/if}</div><hr />
+                    {/foreach}
+                </div>
+            </div>
+        </div>
+        {/if}
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">客户信息</div>
+                <div class="layui-card-body">
+                    <div class="layui-col-md6">姓名:{$data.client_name|default='--'}</div>
+                    <div class="layui-col-md6">手机:{$data.client_tel|default='--'}</div><hr />
+                    <div class="layui-col-md6" style="width: 25%">是否有电梯:{$data.is_elevator|default='--'}</div>
+                    <div class="layui-col-md6" style="width: 25%">楼层:{$data.floor_num|default='--'}</div>
+                    <div class="layui-col-md6" style="width: 50%">客户所在地址:{$data.client_address|default='--'}</div><hr />
+                </div>
+            </div>
+        </div>
+        {if $data.logistics_tel}
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">物流信息</div>
+                <div class="layui-card-body">
+                    <div class="layui-col-md6">物流人员姓名:{$data.logistics_name|default='--'}</div>
+                    <div class="layui-col-md6">物流人员手机:{$data.logistics_tel|default='--'}</div><hr />
+                    <div class="layui-col-md6">货物数量:{$data.logistics_goods_num|default='--'}</div>
+                    <div class="layui-col-md6">物流地址:{$data.logistics_address|default='--'}</div><hr />
+                    <div class="layui-col-md6">物流公司名称:{$data.logistics_title|default='--'}</div>
+                    <div class="layui-col-md6">物流单号:{$data.logistics_no|default='--'}</div><hr />
+                </div>
+            </div>
+        </div>
+        {/if}
+
+        {if $data.worker_id}
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                    <div class="layui-card-header">雇佣的接单人员信息</div>
+                    <div class="layui-card-body">
+                        <div class="layui-col-md6">雇佣人员姓名:{$data.worker_info.name|default='--'}</div>
+                        <div class="layui-col-md6">雇佣人员手机:{$data.worker_info.phone|default='--'}</div><hr/>
+                        {if $data.receive_address_id}
+                        <div class="layui-col-md6">收货仓地址:{$data.receive_address|default='--'}</div><hr />
+                        {/if}
+                        {if $data.check_image}
+                        <div class="layui-col-md6">验收图片:
+                            {foreach $data.check_image as $v_image}
+                            <img data-tips-image style="width:20px;height:20px" src="{$v_image|default=''}" class="margin-right-5 text-top">
+                            {/foreach}
+                        </div>
+                        <div class="layui-col-md6">验收备注:{$data.check_describe|default='--'}</div><hr>
+                        {/if}
+                        {if $data.check_time}
+                        <div class="layui-col-md6">验收时间:{$data.check_time|default='--'}</div><hr>
+                        {/if}
+                    </div>
+                </div>
+            </div>
+        {/if}
+        {if $data.refund_intervene}
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">退款介入小二</div>
+                <div class="layui-card-body">
+                    {if $data.refund.user_images}
+                    <div class="layui-col-md6">雇主端举证图片:
+                        {foreach $data.refund.user_images as $v}
+                        <img data-tips-image style="width:20px;height:20px" src="{$v|default=''}" class="margin-right-5 text-top">
+                        {/foreach}
+                    </div>
+                    <div class="layui-col-md6">雇主端举证文字:{$data.refund.user_wordage}</div><hr />
+                    {/if}
+                    {if $data.refund.worker_images}
+                    <div class="layui-col-md6">服务商举证图片:
+                        {foreach $data.refund.worker_images as $v}
+                        <img data-tips-image style="width:20px;height:20px" src="{$v|default=''}" class="margin-right-5 text-top">
+                        {/foreach}
+                    </div>
+                    <div class="layui-col-md6">服务商举证文字:{$data.refund.worker_wordage}</div><hr />
+                    {/if}
+                    {if $data.refund.intervene_remark}
+                    <div class="layui-col-md6">小二处理结果:{$data.refund.intervene_remark}</div>
+                    <div class="layui-col-md6">小二处理时间:{$data.refund.dispose_at}</div><hr />
+                    {/if}
+                </div>
+            </div>
+        </div>
+        {/if}
+        {if $data.complain_status}
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">投诉介入小二</div>
+                <div class="layui-card-body">
+                    {if $data.complain.user_images}
+                    <div class="layui-col-md6">雇主端举证图片:
+                        {foreach $data.complain.user_images as $v}
+                        <img data-tips-image style="width:20px;height:20px" src="{$v|default=''}" class="margin-right-5 text-top">
+                        {/foreach}
+                    </div>
+                    <div class="layui-col-md6">雇主端举证文字:{$data.complain.user_question}</div><hr />
+                    {/if}
+                    {if $data.complain.worker_images}
+                    <div class="layui-col-md6">服务商举证图片:
+                        {foreach $data.complain.worker_images as $v}
+                        <img data-tips-image style="width:20px;height:20px" src="{$v|default=''}" class="margin-right-5 text-top">
+                        {/foreach}
+                    </div>
+                    <div class="layui-col-md6">服务商举证文字:{$data.complain.worker_question}</div><hr />
+                    {/if}
+                    {if $data.complain.result_info}
+                    <div class="layui-col-md6">小二处理状态:{if $data.complain.dispose_status == 1}投诉成立{else}投诉不成立{/if}</div>
+                    <div class="layui-col-md6">小二处理时间:{$data.complain.dispose_at}</div><hr />
+                    <div class="layui-col-md6" style="width: 100%;height: 410px;">小二处理结果:<textarea name="result_info">{$data.complain.result_info}</textarea></div><hr />
+                    {/if}
+                    <div class="layui-col-md6">投诉类型:{$data.complain.cate}</div><hr />
+                </div>
+            </div>
+        </div>
+        {/if}
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">商品信息</div>
+                <div class="layui-card-body">
+                    <table class="layui-table margin-top-10" lay-skin="line">
+                        <thead>
+                        <tr>
+                            <th class='text-left nowrap'>商品图片</th>
+                            <th class='text-left nowrap'>商品型号</th>
+                            <th class='text-left nowrap'>商品数量</th>
+                            <th class='text-left nowrap'>商品名称</th>
+                            <th class='text-left nowrap'>备注信息</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        {if $data.goods_info}
+                            {foreach $data.goods_info as $v}
+                                <tr>
+                                    <td class='text-left nowrap'>
+                                        <div class="inline-block" style="max-width: 210px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
+                                            {foreach $v['image'] as $v_image}
+                                            <img data-tips-image style="width:20px;height:20px" src="{$v_image|default=''}" class="margin-right-5 text-top">
+                                            {/foreach}
+                                        </div>
+                                    </td>
+                                    <td class='text-left nowrap' style="max-width: 210px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
+                                        {$v.cate|default='-'}
+                                    </td>
+                                    <td class='text-left'>
+                                        {$v.num|default='0'}
+                                    </td>
+                                    <td class='text-left'>
+                                        <div class="inline-block" style="max-width: 210px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
+                                            {$v.type|default='0'}
+                                        </div>
+                                    </td>
+                                    <td class='text-left'>
+                                        {$v.remark|default='--'}
+                                    </td>
+                                </tr>
+                            {/foreach}
+                        {else}
+                            暂无
+                        {/if}
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    window.form.render();
+
+    require(['ckeditor', 'angular'], function () {
+        window.createEditor('[name="result_info"]', {height: 280});
+    })
+</script>