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")
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ 订单ID
+ 护工ID
+ 客户ID
+ 护工签名
+ 客户签名
+ 公司签名
+ 文件
+ 创建时间
+ 操作
+
+
+
+ @foreach ($data as $row)
+
+ {{ $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")
+
+
+ @endforeach
+
+
+ @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 @@
-
- 订单编号
- 协议
+
+ 订单编号
+ 协议
- 所属项目/医院
- 所在楼栋
- 所在病区
- {{-- 客户科室 --}}
- 客户姓名
- 客户余额
- 联系电话
- 被护理人
- 开始服务日期
- 结束日期
- 状态
- 总计
+ 所属项目/医院
+ 所在楼栋
+ 所在病区
+ {{-- 客户科室 --}}
+ 客户姓名
+ 客户余额
+ 联系电话
+ 被护理人
+ 开始服务日期
+ 结束日期
+ 状态
+ 总计
- @if (empty($hushizhang) && empty($yuanfang))
- 操作
- @endif
-
+ @if (empty($hushizhang) && empty($yuanfang))
+ 操作
+ @endif
+
- @foreach ($data as $row)
-
-
- {{ $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 }}
- @if (empty($hushizhang) && empty($yuanfang))
+ @foreach ($data as $row)
+
- 查看
+ {{ $row->serial }}
+
+ {!! isset($row->orderAgreementByLast) ? " " : "" !!}
- @endif
-
-
-
-
-
-
- 所在床位
- 护理日期
- 护工
- 单价
- 扣款时间
- 操作
-
-
-
- @foreach($row->orderItems as $item)
-
- {{ $item->building->name }}-{{ $item->room->name }}
- -{{ $item->bed->name }}床
-
- {{ $item->service_date }}
- {{ $item->paramedic ? $item->paramedic->name : "" }}
- {{ $item->total }}
- {{ $item->paid_at }}
-
- 修改
-
-
-
- @endforeach
-
-
-
-
- @endforeach
+ {{ $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 }}
+ @if (empty($hushizhang) && empty($yuanfang))
+
+ 查看
+ id}")}}" target="_blank"
+ title="查看该订单的所有协议">
+ 查看协议
+
+
+ @endif
+
+
+
+
+
+
+
+ 所在床位
+ 护理日期
+ 护工
+ 单价
+ 扣款时间
+ 操作
+
+
+
+ @foreach($row->orderItems as $item)
+
+ {{ $item->building->name }}-{{ $item->room->name }}
+ -{{ $item->bed->name }}床
+
+ {{ $item->service_date }}
+ {{ $item->paramedic ? $item->paramedic->name : "" }}
+ {{ $item->total }}
+ {{ $item->paid_at }}
+
+ 修改
+
+
+
+ @endforeach
+
+
+
+
+ @endforeach
@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');