|
@@ -0,0 +1,61 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App\Admin\Controllers;
|
|
|
+
|
|
|
+use App\Services\SalesmenChangeRecordService;
|
|
|
+use Slowlyo\OwlAdmin\Controllers\AdminController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 业务员变更记录
|
|
|
+ *
|
|
|
+ * @property SalesmenChangeRecordService $service
|
|
|
+ */
|
|
|
+class SalesmenChangeRecordController extends AdminController
|
|
|
+{
|
|
|
+ protected string $serviceName = SalesmenChangeRecordService::class;
|
|
|
+
|
|
|
+ public function list()
|
|
|
+ {
|
|
|
+ $crud = $this->baseCRUD()
|
|
|
+ ->filterTogglable(false)
|
|
|
+ ->headerToolbar([
|
|
|
+ $this->createButton('dialog'),
|
|
|
+ ...$this->baseHeaderToolBar()
|
|
|
+ ])
|
|
|
+ ->columns([
|
|
|
+ amis()->TableColumn('id', 'ID')->sortable(),
|
|
|
+ amis()->TableColumn('salesman_id', '业务员编号'),
|
|
|
+ amis()->TableColumn('change_before', '变更前'),
|
|
|
+ amis()->TableColumn('change_after', '变更后'),
|
|
|
+ amis()->TableColumn('changer', '变更人'),
|
|
|
+ amis()->TableColumn('created_at', admin_trans('admin.created_at'))->type('datetime')->sortable(),
|
|
|
+ amis()->TableColumn('updated_at', admin_trans('admin.updated_at'))->type('datetime')->sortable(),
|
|
|
+ $this->rowActions('dialog')
|
|
|
+ ]);
|
|
|
+
|
|
|
+ return $this->baseList($crud);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function form($isEdit = false)
|
|
|
+ {
|
|
|
+ return $this->baseForm()->body([
|
|
|
+ amis()->TextControl('salesman_id', '业务员编号'),
|
|
|
+ amis()->TextControl('change_before', '变更前'),
|
|
|
+ amis()->TextControl('change_after', '变更后'),
|
|
|
+ amis()->TextControl('changer', '变更人'),
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function detail()
|
|
|
+ {
|
|
|
+ return $this->baseDetail()->body([
|
|
|
+ amis()->TextControl('id', 'ID')->static(),
|
|
|
+ amis()->TextControl('salesman_id', '业务员编号')->static(),
|
|
|
+ amis()->TextControl('change_before', '变更前')->static(),
|
|
|
+ amis()->TextControl('change_after', '变更后')->static(),
|
|
|
+ amis()->TextControl('changer', '变更人')->static(),
|
|
|
+ amis()->TextControl('created_at', admin_trans('admin.created_at'))->static(),
|
|
|
+ amis()->TextControl('updated_at', admin_trans('admin.updated_at'))->static(),
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+}
|