Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jwhx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
jwhx
Commits
48eec898
Commit
48eec898
authored
Dec 21, 2024
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品编号
parent
6fc57b2f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
1 deletion
+5
-1
modules/Goods/app/Models/Goods.php
modules/Goods/app/Models/Goods.php
+1
-1
modules/Goods/app/Services/GoodsService.php
modules/Goods/app/Services/GoodsService.php
+2
-0
modules/Goods/database/migrations/2024_07_31_044039_goods_base.php
...oods/database/migrations/2024_07_31_044039_goods_base.php
+1
-0
resources/admin/src/pages/goods/lists/index.vue
resources/admin/src/pages/goods/lists/index.vue
+1
-0
No files found.
modules/Goods/app/Models/Goods.php
View file @
48eec898
...
@@ -19,7 +19,7 @@ class Goods extends BaseModel {
...
@@ -19,7 +19,7 @@ class Goods extends BaseModel {
protected
$table
=
'goods'
;
protected
$table
=
'goods'
;
protected
$fillable
=
[
protected
$fillable
=
[
'title'
,
'user_id'
,
'brand_id'
,
'description'
,
'tags'
,
'goods_type'
,
'cover'
,
'images'
,
'price'
,
'original_price'
,
'title'
,
'user_id'
,
'brand_id'
,
'description'
,
'tags'
,
'goods_type'
,
'cover'
,
'images'
,
'price'
,
'original_price'
,
'service_amount'
,
'master_amount'
,
'partner_amount'
,
'is_partner'
,
'operate'
,
'content'
,
'status'
'service_amount'
,
'master_amount'
,
'partner_amount'
,
'is_partner'
,
'operate'
,
'content'
,
'status'
,
'goods_sn'
];
];
// protected $hidden = ['deleted_at'];
// protected $hidden = ['deleted_at'];
...
...
modules/Goods/app/Services/GoodsService.php
View file @
48eec898
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
namespace
Modules\Goods\Services
;
namespace
Modules\Goods\Services
;
use
Illuminate\Support\Arr
;
use
Illuminate\Support\Arr
;
use
Illuminate\Support\Str
;
use
Modules\Goods\Models\Goods
;
use
Modules\Goods\Models\Goods
;
use
App\Support\Tree
;
use
App\Support\Tree
;
...
@@ -118,6 +119,7 @@ class GoodsService {
...
@@ -118,6 +119,7 @@ class GoodsService {
foreach
(
$goods
->
setFilterFields
(
$request
->
all
())
as
$key
=>
$value
)
{
foreach
(
$goods
->
setFilterFields
(
$request
->
all
())
as
$key
=>
$value
)
{
$goods
->
$key
=
$value
;
$goods
->
$key
=
$value
;
}
}
$goods
->
goods_sn
=
date
(
'YmdHis'
)
;
$goods
->
save
();
$goods
->
save
();
//更新栏目
//更新栏目
...
...
modules/Goods/database/migrations/2024_07_31_044039_goods_base.php
View file @
48eec898
...
@@ -46,6 +46,7 @@ return new class extends Migration
...
@@ -46,6 +46,7 @@ return new class extends Migration
$table
->
tinyInteger
(
'status'
)
->
default
(
1
)
->
comment
(
'状态 1上架 0下架'
);
$table
->
tinyInteger
(
'status'
)
->
default
(
1
)
->
comment
(
'状态 1上架 0下架'
);
$table
->
timestamp
(
'created_at'
)
->
nullable
()
->
comment
(
'创建时间'
);
$table
->
timestamp
(
'created_at'
)
->
nullable
()
->
comment
(
'创建时间'
);
$table
->
timestamp
(
'updated_at'
)
->
nullable
()
->
comment
(
'更新时间'
);
$table
->
timestamp
(
'updated_at'
)
->
nullable
()
->
comment
(
'更新时间'
);
$table
->
string
(
'goods_sn'
)
->
nullable
()
->
comment
(
'商品编号'
);
$table
->
engine
=
'InnoDB'
;
$table
->
engine
=
'InnoDB'
;
$table
->
charset
=
'utf8mb4'
;
$table
->
charset
=
'utf8mb4'
;
...
...
resources/admin/src/pages/goods/lists/index.vue
View file @
48eec898
...
@@ -60,6 +60,7 @@ export default{
...
@@ -60,6 +60,7 @@ export default{
apiObj
:
this
.
$API
.
goods
.
lists
.
list
,
apiObj
:
this
.
$API
.
goods
.
lists
.
list
,
column
:
[
column
:
[
{
prop
:
'
id
'
,
label
:
'
ID
'
,
width
:
80
},
{
prop
:
'
id
'
,
label
:
'
ID
'
,
width
:
80
},
{
prop
:
'
goods_sn
'
,
label
:
'
商品编号
'
},
{
prop
:
'
title
'
,
label
:
'
商品名称
'
},
{
prop
:
'
title
'
,
label
:
'
商品名称
'
},
{
prop
:
'
cover
'
,
label
:
'
封面图
'
,
width
:
120
},
{
prop
:
'
cover
'
,
label
:
'
封面图
'
,
width
:
120
},
{
prop
:
'
price
'
,
label
:
'
售价
'
,
width
:
120
},
{
prop
:
'
price
'
,
label
:
'
售价
'
,
width
:
120
},
...
...
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