diff --git a/app/Gdoo/Model/views/template/create.blade.php b/app/Gdoo/Model/views/template/create.blade.php index 45abee92..b18c6b33 100644 --- a/app/Gdoo/Model/views/template/create.blade.php +++ b/app/Gdoo/Model/views/template/create.blade.php @@ -220,7 +220,6 @@ diff --git a/app/Gdoo/Order/Controllers/OrderController.php b/app/Gdoo/Order/Controllers/OrderController.php index 3aa4ac0e..e8edab76 100644 --- a/app/Gdoo/Order/Controllers/OrderController.php +++ b/app/Gdoo/Order/Controllers/OrderController.php @@ -738,27 +738,15 @@ class OrderController extends WorkflowController $print_type = $template['print_type']; $this->layout = 'layouts.print_'.$print_type; - if ($print_type == 'stiReport') { + $print_tpl = view()->exists(Request::controller().'.print.'.$template_id); + if ($print_tpl) { $data = OrderService::getPrintData($id); - $print_data = [ - 'master' => [$data['master']], - 'customer_order_data' => $data['rows'], - ]; - return $this->display([ - 'template' => $template, - 'print_data' => $print_data, - ]); + $data['template'] = $template; + $tpl = $this->display($data, 'print/'.$template_id); } else { - $print_tpl = view()->exists(Request::controller().'.print.'.$template_id); - if ($print_tpl) { - $data = OrderService::getPrintData($id); - $data['template'] = $template; - $tpl = $this->display($data, 'print/'.$template_id); - } else { - $tpl = $this->create('print'); - } - return $print_type == 'pdf' ? print_prince($tpl) : $tpl; + $tpl = $this->create('print'); } + return $print_type == 'pdf' ? print_prince($tpl) : $tpl; } public function dialog() diff --git a/app/Gdoo/Stock/Controllers/DeliveryController.php b/app/Gdoo/Stock/Controllers/DeliveryController.php index a5b821d6..ef3209f4 100644 --- a/app/Gdoo/Stock/Controllers/DeliveryController.php +++ b/app/Gdoo/Stock/Controllers/DeliveryController.php @@ -306,27 +306,15 @@ class DeliveryController extends WorkflowController $this->layout = 'layouts.print_'.$print_type; // 打印插件 - if ($print_type == 'stiReport') { + $print_tpl = view()->exists(Request::controller().'.print.'.$template_id); + if ($print_tpl) { $data = DeliveryService::getPrintData($id); - $print_data = [ - 'master' => [$data['master']], - 'stock_delivery_data' => $data['rows'], - ]; - return $this->display([ - 'template' => $template, - 'print_data' => $print_data, - ]); + $data['template'] = $template; + $tpl = $this->display($data, 'print/'.$template_id); } else { - $print_tpl = view()->exists(Request::controller().'.print.'.$template_id); - if ($print_tpl) { - $data = DeliveryService::getPrintData($id); - $data['template'] = $template; - $tpl = $this->display($data, 'print/'.$template_id); - } else { - $tpl = $this->create('print'); - } - return $print_type == 'pdf' ? print_prince($tpl) : $tpl; + $tpl = $this->create('print'); } + return $print_type == 'pdf' ? print_prince($tpl) : $tpl; } // 物流信息 diff --git a/resources/views/layouts/print_stiReport.blade.php b/resources/views/layouts/print_stiReport.blade.php deleted file mode 100644 index 2fc3aca0..00000000 --- a/resources/views/layouts/print_stiReport.blade.php +++ /dev/null @@ -1,210 +0,0 @@ - - - - -{{$setting['title']}} - - - - - - - - - - - - - - - -
-
-
- HTML打印 - 打印 - @if(auth()->user()->role_id == 1) - 设计 - 下载模板 - @endif - 下载服务 - 关闭 -
-
打印预览
-
-
- -
-
- -
-
-
- -
-
-
- - - - - - - - \ No newline at end of file