<?php
/**
 * Created by PhpStorm.
 * User: chouchou
 * Date: 2019-6-26
 * Time: 22:16
 */

namespace app\admin\controller;

class Process extends Base
{
    //查询订单状态
    public function index(){
        //检查是否已经有抄表记录
        $order = OrderModel::get(['em_id'=>$eid]);
        //订单信息不完整 补充信息
        if($order == true  && $order->status == 0){
            //判断需要补充哪一部分
            if(empty($order->statement_id)){ //缺少第二步 则跳转第二步进行添加
                $url = '/statement_add/'.$order->cp_id;
            } elseif (empty($order->payment_id)){ //缺少第三步
                $url = '/payment_add/'.$order->cp_id;
            } elseif (empty($order->settle_id)){ //第四步
                $url = '/settle_add/'.$order->cp_id;
            }
            $this->redirect($url);

        }
    }
}