getList($dataType, $this->request->param()); // 自提门店列表 $shopList = ShopModel::getAllList(); return $this->fetch('index', compact('dataType', 'list', 'shopList')); } /** * 订单详情 * @param $order_id * @return mixed * @throws \think\exception\DbException */ public function detail($order_id) { // 订单详情 $detail = OrderModel::detail($order_id); // 物流公司列表 $expressList = ExpressModel::getAll(); // 门店店员列表 $shopClerkList = (new ShopClerkModel)->getList(true); return $this->fetch('detail', compact( 'detail', 'expressList', 'shopClerkList' )); } /** * 确认发货 * @param $order_id * @return array * @throws \app\common\exception\BaseException * @throws \think\Exception * @throws \think\exception\DbException */ public function delivery($order_id) { $model = OrderModel::detail($order_id); if ($model->delivery($this->postData('order'))) { return $this->renderSuccess('发货成功'); } return $this->renderError($model->getError() ?: '发货失败'); } /** * 修改订单价格 * @param $order_id * @return array * @throws \think\exception\DbException */ public function updatePrice($order_id) { $model = OrderModel::detail($order_id); if ($model->updatePrice($this->postData('order'))) { return $this->renderSuccess('修改成功'); } return $this->renderError($model->getError() ?: '修改失败'); } }