diff --git a/app/Forms/OrderAgreementForm.php b/app/Forms/OrderAgreementForm.php new file mode 100644 index 0000000..9a1c7c0 --- /dev/null +++ b/app/Forms/OrderAgreementForm.php @@ -0,0 +1,60 @@ +add("id", Field::HIDDEN); + + $this->add("order_id", Field::NUMBER, [ + "label" => "订单ID", + "rules" => "required", + "attr" => ["placeholder" => "请输入订单ID"] + ]); + + $this->add("paramedic_id", Field::NUMBER, [ + "label" => "护工ID", + "attr" => ["placeholder" => "请输入护工ID(选填)"] + ]); + + $this->add("customer_id", Field::NUMBER, [ + "label" => "客户ID", + "attr" => ["placeholder" => "请输入客户ID(选填)"] + ]); + + $this->add("paramedic_sign_id", Field::TEXT, [ + "label" => "护工签名图片ID", + "attr" => ["placeholder" => "请输入护工签名图片ID(选填)"] + ]); + + $this->add("customer_sign_id", Field::TEXT, [ + "label" => "客户签名图片ID", + "attr" => ["placeholder" => "请输入客户签名图片ID(选填)"] + ]); + + $this->add("company_sign_id", Field::TEXT, [ + "label" => "公司签名图片ID", + "attr" => ["placeholder" => "请输入公司签名图片ID(选填)"] + ]); + + $this->add("file_id", Field::NUMBER, [ + "label" => "文件ID", + "attr" => ["placeholder" => "请输入文件ID(选填)"] + ]); + + $this->add('buttons', 'buttongroup', [ + "splitted" => true, + "buttons" => [ + ["label" => "保存", "attr" => ["class" => "btn btn-primary mr-1", "type" => "submit"]], + ["label" => "返回", "attr" => ["class" => "btn btn-light btn-back", "type" => "button"]] + ] + ]); + } +} + + diff --git a/app/Http/Controllers/Admin/OrderAgreementController.php b/app/Http/Controllers/Admin/OrderAgreementController.php new file mode 100644 index 0000000..407400b --- /dev/null +++ b/app/Http/Controllers/Admin/OrderAgreementController.php @@ -0,0 +1,45 @@ +model->with(['order', 'paramedicSign', 'customerSign', 'companySign', 'file']); + + // 搜索功能 + if ($request->order_id) { + $query->where('order_id', $request->order_id); + } + + if ($request->customer_id) { + $query->where('customer_id', $request->customer_id); + } + + if ($request->paramedic_id) { + $query->where('paramedic_id', $request->paramedic_id); + } + + $data = $query->orderBy('id', 'desc')->paginate(10); + return view($this->bladePath . ".index", compact("data")); + } +} + + diff --git a/app/Models/OrderAgreement.php b/app/Models/OrderAgreement.php index 2b1c660..2e64944 100755 --- a/app/Models/OrderAgreement.php +++ b/app/Models/OrderAgreement.php @@ -26,4 +26,9 @@ class OrderAgreement extends SoftDeletesModel return $this->hasOne(Uploads::class, 'id', 'file_id'); } + public function order() + { + return $this->hasOne(Orders::class, 'id', 'order_id'); + } + } diff --git a/resources/views/admin/order-agreement/create.blade.php b/resources/views/admin/order-agreement/create.blade.php new file mode 100644 index 0000000..9888d14 --- /dev/null +++ b/resources/views/admin/order-agreement/create.blade.php @@ -0,0 +1,17 @@ +@extends("admin.layouts.layout") + +@php + $pageTitle = __("actions." . last(explode("/", request()->url()))) . $modelName; +@endphp + +@section("content") +
+
+
+
+ @include("public._form") +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/admin/order-agreement/index.blade.php b/resources/views/admin/order-agreement/index.blade.php new file mode 100644 index 0000000..c543694 --- /dev/null +++ b/resources/views/admin/order-agreement/index.blade.php @@ -0,0 +1,120 @@ +@extends("admin.layouts.layout") + +@section("content") +
+
+
+
+ + + +
+
+
+ +
+
+ +
+
+ +
+ + 重置 +
+
+ + + + + + + + + + + + + + + + + + @foreach ($data as $row) + + + + + + + + + + + + + @endforeach + +
ID订单ID护工ID客户ID护工签名客户签名公司签名文件创建时间操作
{{ $row->id }} + @if($row->order) + {{ $row->order_id }} + @else + {{ $row->order_id ?: '-' }} + @endif + {{ $row->paramedic_id ?: '-' }}{{ $row->customer_id ?: '-' }} + @if($row->paramedicSign) + 查看 + @else + - + @endif + + @if($row->customerSign) + 查看 + @else + - + @endif + + @if($row->companySign) + 查看 + @else + - + @endif + + @if($row->file) + 下载 + @else + - + @endif + {{ $row->created_at->format('Y-m-d H:i:s') }} + @lang("icons.action_edit") + @lang("actions.edit") + @lang("icons.action_delete") @lang("actions.delete") +
+ @include("public._pages") +
+ +
+
+
+ + @include("public._delete") +@endsection + +@push("footer") + +@endpush \ No newline at end of file diff --git a/resources/views/admin/orders/index.blade.php b/resources/views/admin/orders/index.blade.php index b8801e0..184a8fc 100755 --- a/resources/views/admin/orders/index.blade.php +++ b/resources/views/admin/orders/index.blade.php @@ -8,27 +8,25 @@
- @foreach($projects as $pp) - + @endforeach - @foreach($areas as $pp) - + @endforeach + placeholder="订单编号/联系人/联系电话"> @if(\App\Models\CommonModel::checkExport()) @endif @@ -60,92 +56,99 @@
- - - + + + - - - - {{-- --}} - - - - - - - - + + + + {{-- --}} + + + + + + + + - @if (empty($hushizhang) && empty($yuanfang)) - - @endif - + @if (empty($hushizhang) && empty($yuanfang)) + + @endif + - @foreach ($data as $row) - - - - - - - - {{-- --}} - - - - - - - - - @if (empty($hushizhang) && empty($yuanfang)) + @foreach ($data as $row) + + - @endif - - - - - @endforeach + + + + {{-- --}} + + + + + + + + + @if (empty($hushizhang) && empty($yuanfang)) + + @endif + + + + + + @endforeach
订单编号协议
订单编号协议所属项目/医院所在楼栋所在病区客户科室客户姓名客户余额联系电话被护理人开始服务日期结束日期状态总计所属项目/医院所在楼栋所在病区客户科室客户姓名客户余额联系电话被护理人开始服务日期结束日期状态总计操作
操作
- {{ $row->serial }} - {!! isset($row->orderAgreementByLast)?"":"" !!}{{ $row->project->name }}{{ $row->bed->building->name }}{{ $row->bed->area->name }}{{ $row->department }}{{ $row->customer->name ?: $row->patient->name }}{{ $row->customer->balance }}{{ $row->customer->mobile }}{{ $row->patient->name }}{{ $row->from_date }}{!! $row->status == \App\Models\Orders::STATUS_FINISHED ? $row->to_date : " {$row->to_date}" !!}{!! $row->getStatusLabelAttribute() !!} {!! $row->status == \App\Models\Orders::STATUS_FINISHED ? "" : "" !!} {{ $row->total }}
- 查看 + {{ $row->serial }} + {!! isset($row->orderAgreementByLast) ? "" : "" !!}
- - - - - - - - - - - - - @foreach($row->orderItems as $item) - - - - - - - - - @endforeach - -
所在床位护理日期护工单价扣款时间操作
{{ $item->building->name }}-{{ $item->room->name }} - -{{ $item->bed->name }}床 - {{ $item->service_date }}{{ $item->paramedic ? $item->paramedic->name : "" }}{{ $item->total }}{{ $item->paid_at }} - -
-
{{ $row->project->name }}{{ $row->bed->building->name }}{{ $row->bed->area->name }}{{ $row->department }}{{ $row->customer->name ?: $row->patient->name }}{{ $row->customer->balance }}{{ $row->customer->mobile }}{{ $row->patient->name }}{{ $row->from_date }}{!! $row->status == \App\Models\Orders::STATUS_FINISHED ? $row->to_date : " {$row->to_date}" !!} + {!! $row->getStatusLabelAttribute() !!} {!! $row->status == \App\Models\Orders::STATUS_FINISHED ? "" : "" !!} + {{ $row->total }} + 查看 + id}")}}" target="_blank" + title="查看该订单的所有协议"> + 查看协议 + +
+ + + + + + + + + + + + + @foreach($row->orderItems as $item) + + + + + + + + + @endforeach + +
所在床位护理日期护工单价扣款时间操作
{{ $item->building->name }}-{{ $item->room->name }} + -{{ $item->bed->name }}床 + {{ $item->service_date }}{{ $item->paramedic ? $item->paramedic->name : "" }}{{ $item->total }}{{ $item->paid_at }} + +
+
@include("public._pages") @@ -173,8 +176,7 @@
- +
@@ -303,4 +305,4 @@ window.open(url); } -@endpush +@endpush \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 6825791..2204e51 100644 --- a/routes/web.php +++ b/routes/web.php @@ -69,6 +69,7 @@ Route::group(["namespace" => "Admin", "prefix" => "admin"], function () { \App\Models\CommonModel::generateCurdRouter("AlipayAccountController", "alipay-account"); \App\Models\CommonModel::generateCurdRouter("AdverseController", "adverse"); Route::post("adverse/order-search", 'AdverseController@orderSearch'); + \App\Models\CommonModel::generateCurdRouter("OrderAgreementController", "order-agreement"); Route::get("product", 'ProductController@index'); Route::get("product/create", 'ProductController@create');