Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5416b4a1
authored
Nov 19, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.imohe.com/zhaozengyu/tzt-admin
parents
65f19ac3
cee3d9ae
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
163 additions
and
1 deletions
+163
-1
app/Admin/Controllers/PharmacyConfigController.php
+18
-0
app/Admin/Extensions/Form/PharmacyConfigForm.php
+36
-0
app/Admin/Extensions/Form/SiteConfigForm.php
+0
-1
app/Admin/routes.php
+2
-0
app/Models/DoctorModel.php
+11
-0
app/Models/PharmacistModel.php
+11
-0
app/Models/PharmacyModel.php
+56
-0
app/Models/PrescriptionModel.php
+29
-0
No files found.
app/Admin/Controllers/PharmacyConfigController.php
0 → 100644
View file @
5416b4a1
<?php
namespace
App\Admin\Controllers
;
use
App\Admin\Extensions\Form\PharmacyConfigForm
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Layout\Content
;
// 药店配置
class
PharmacyConfigController
extends
AdminController
{
public
function
index
(
Content
$content
)
:
Content
{
return
$content
->
header
(
'药店配置'
)
->
description
(
''
)
->
body
(
new
PharmacyConfigForm
());
}
}
app/Admin/Extensions/Form/PharmacyConfigForm.php
0 → 100644
View file @
5416b4a1
<?php
namespace
App\Admin\Extensions\Form
;
use
Dcat\Admin\Widgets\Form
;
// 全局设置
class
PharmacyConfigForm
extends
Form
{
public
function
handle
(
array
$input
)
{
$data
=
[
'site_config'
=>
$input
,
];
admin_setting
(
$data
);
return
$this
->
response
()
->
location
(
'site-config'
)
->
success
(
'设置成功'
);
}
/**
* Build a form here.
*/
public
function
form
()
{
$data
=
admin_setting
(
'site_config'
);
$data
=
json_decode
(
$data
,
true
);
$this
->
switch
(
'prescription_auto'
,
'医师自动开方'
);
$this
->
disableResetButton
();
}
}
app/Admin/Extensions/Form/SiteConfigForm.php
View file @
5416b4a1
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
use
Dcat\Admin\Widgets\Form
;
use
Dcat\Admin\Widgets\Form
;
// use Dcat\Admin\Widgets\Form;
// 全局设置
// 全局设置
class
SiteConfigForm
extends
Form
class
SiteConfigForm
extends
Form
{
{
...
...
app/Admin/routes.php
View file @
5416b4a1
...
@@ -68,6 +68,8 @@
...
@@ -68,6 +68,8 @@
$router
->
post
(
'prescription-search'
,
'PrescriptionPrintController@search'
);
$router
->
post
(
'prescription-search'
,
'PrescriptionPrintController@search'
);
// 打印处方单
// 打印处方单
$router
->
get
(
'/print'
,
'PrintController@print'
);
$router
->
get
(
'/print'
,
'PrintController@print'
);
// 药店-设置
$router
->
resource
(
'pharmacy-config'
,
'PharmacyConfigController'
);
});
});
$router
->
get
(
'/auth/smscode'
,
'AuthController@getLoginSmsCode'
);
$router
->
get
(
'/auth/smscode'
,
'AuthController@getLoginSmsCode'
);
/** 药店菜单-end **/
/** 药店菜单-end **/
...
...
app/Models/DoctorModel.php
View file @
5416b4a1
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
class
DoctorModel
extends
Model
class
DoctorModel
extends
Model
{
{
...
@@ -18,4 +20,13 @@ public function user()
...
@@ -18,4 +20,13 @@ public function user()
{
{
return
$this
->
belongsTo
(
User
::
class
,
'user_id'
,
'id'
);
return
$this
->
belongsTo
(
User
::
class
,
'user_id'
,
'id'
);
}
}
public
function
getSignedPicAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
}
}
app/Models/PharmacistModel.php
View file @
5416b4a1
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
class
PharmacistModel
extends
Model
class
PharmacistModel
extends
Model
{
{
...
@@ -18,4 +20,13 @@ public function pharmacy()
...
@@ -18,4 +20,13 @@ public function pharmacy()
{
{
return
$this
->
belongsTo
(
PharmacyModel
::
class
,
'pharmacy_id'
,
'id'
);
return
$this
->
belongsTo
(
PharmacyModel
::
class
,
'pharmacy_id'
,
'id'
);
}
}
public
function
getSignedPicAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
}
}
app/Models/PharmacyModel.php
View file @
5416b4a1
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
// 药店
// 药店
class
PharmacyModel
extends
Model
class
PharmacyModel
extends
Model
...
@@ -31,4 +33,58 @@ public function patient()
...
@@ -31,4 +33,58 @@ public function patient()
{
{
return
$this
->
hasMany
(
PatientModel
::
class
,
'patient_id'
,
'id'
);
return
$this
->
hasMany
(
PatientModel
::
class
,
'patient_id'
,
'id'
);
}
}
public
function
getDrugBizLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getBusinessLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getFoodBizLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getMedDeviceBizLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getDrugInfoServiceCertAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getPrePackagedFoodAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
}
}
app/Models/PrescriptionModel.php
View file @
5416b4a1
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
class
PrescriptionModel
extends
Model
class
PrescriptionModel
extends
Model
{
{
...
@@ -37,4 +39,31 @@ class PrescriptionModel extends Model
...
@@ -37,4 +39,31 @@ class PrescriptionModel extends Model
self
::
OPEN_SOURCE_CUSTOMER
=>
'客开'
,
self
::
OPEN_SOURCE_CUSTOMER
=>
'客开'
,
self
::
OPEN_SOURCE_PHARMACY
=>
'店开'
,
self
::
OPEN_SOURCE_PHARMACY
=>
'店开'
,
];
];
public
function
getDoctorSignedPicAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getPharmacistSignedPicAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getPrescriptionPicAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment