Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
25d1abd1
authored
Nov 07, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
用户地址表名
parents
f9b52750
176260cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
36 deletions
app/Admin/Controllers/OrderController.php
app/Models/User.php
app/Models/UserAddress.php
app/Admin/Controllers/OrderController.php
View file @
25d1abd1
...
...
@@ -13,7 +13,8 @@ use Dcat\Admin\Layout\Content;
use
Dcat\Admin\Layout\Column
;
use
Dcat\Admin\Layout\Row
;
use
Dcat\Admin\Admin
;
use
App\Admin\Renderable\UserTable
;
use
Dcat\Admin\Models\Administrator
;
class
OrderController
extends
AdminController
...
...
@@ -95,8 +96,11 @@ class OrderController extends AdminController
})
->
datetime
()
->
width
(
3
);
$filter
->
startWith
(
'company_name'
)
->
width
(
3
);
$filter
->
startWith
(
'scmUser.user_sn'
,
admin_trans
(
'scm-user.fields.user_sn'
))
->
width
(
3
);
$filter
->
equal
(
'status'
)
->
select
(
admin_trans
(
'order.options.status'
))
->
width
(
3
);
$filter
->
equal
(
'sales_id'
,
trans
(
'inquiry.fields.sales_name'
))
->
select
(
CmsUser
::
pluck
(
'name'
,
'userId'
)
->
toArray
())
->
width
(
3
);
$filter
->
equal
(
'status'
)
->
select
([
"1"
=>
"待审核"
,
"2"
=>
"待付款"
,
"4"
=>
"待发货"
,
"8"
=>
"待收货"
,
"10"
=>
"交易成功"
,
"-1"
=>
"已取消"
])
->
width
(
3
);
$filter
->
equal
(
'sales_id'
,
trans
(
'inquiry.fields.sales_name'
))
->
select
(
CmsUser
::
pluck
(
'name'
,
'userId'
)
->
where
(
"status"
,
0
)
->
toArray
())
->
width
(
3
);
});
});
}
...
...
app/Models/User.php
View file @
25d1abd1
...
...
@@ -2,38 +2,30 @@
namespace
App\Models
;
use
Illuminate\Contracts\Auth\MustVerifyEmail
;
use
Illuminate\Foundation\Auth\User
as
Authenticatable
;
use
Illuminate\Notifications\Notifiable
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
class
User
extends
Authenticatable
/**
* @property $id 主键ID
* @property $user_sn 客户编码
* @property $name 用户名
* @property $email 邮箱
* @property $email_verified_at 邮箱校验时间
* @property $password 密码
* @property $phone 手机号码
* @property $remember_token 记住登陆token
* @property $account_properties 账号属性,1是个人,2是企业
* @property $status 状态,1是正常,-1是禁用
* @property $company_name 公司名称
* @property $first_name 名字
* @property $sale_id 业务员
* @property $sale_name 业务员名字
* @property $last_name 姓氏
* @property $created_time 创建时间
* @property $update_time 更新时间
*/
class
User
extends
Model
{
use
Notifiable
;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected
$fillable
=
[
'name'
,
'email'
,
'password'
,
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected
$hidden
=
[
'password'
,
'remember_token'
,
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected
$casts
=
[
'email_verified_at'
=>
'datetime'
,
];
use
HasDateTimeFormatter
;
protected
$table
=
'users'
;
}
app/Models/UserAddress.php
View file @
25d1abd1
...
...
@@ -6,10 +6,25 @@ use Dcat\Admin\Traits\HasDateTimeFormatter;
use
Illuminate\Database\Eloquent\Model
;
/**
* @property $address_id 用户用户地址ID
* @property $user_id 会员ID
* @property $address_type 地址类型;0:个人,1:公司
* @property $consignee 收货人/收货公司
* @property $email 邮箱
* @property $zipcode 邮政编码
* @property $phone 手机/电话
* @property $country 国家
* @property $province 省份
* @property $city 城市
* @property $detail_address 详细地址
* @property $is_default 是否默认(1=是|0=否)
* @property $create_time 创建时间
* @property $update_time 修改时间
*/
class
UserAddress
extends
Model
{
use
HasDateTimeFormatter
;
protected
$table
=
'user_address'
;
public
$timestamps
=
false
;
}
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