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
b09e60f3
authored
Nov 21, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加医药
parent
4e7ae425
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/Admin/Controllers/DrugController.php
+0
-1
app/Models/DrugModel.php
+3
-1
No files found.
app/Admin/Controllers/DrugController.php
View file @
b09e60f3
...
...
@@ -74,7 +74,6 @@ protected function grid()
$grid
->
disableViewButton
();
// 禁用详情按钮
// 工具栏按钮控制
$grid
->
disableCreateButton
();
// 禁用创建按钮
$grid
->
disableBatchDelete
();
// 禁用批量删除
// 导出按钮
...
...
app/Models/DrugModel.php
View file @
b09e60f3
...
...
@@ -36,8 +36,10 @@ class DrugModel extends Model
self
::
RX_FALSE
=>
'否'
,
];
public
function
set
Cod
eAttribute
(
$value
)
public
function
set
Nam
eAttribute
(
$value
)
{
$this
->
attributes
[
'name'
]
=
$value
;
$pinyin
=
new
Pinyin
();
$abbr
=
$pinyin
->
abbr
(
$this
->
name
)
->
join
(
''
);
// 获取拼音首字母
$this
->
attributes
[
'code'
]
=
strtoupper
(
$abbr
);
...
...
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