Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
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
437917e8
authored
Jul 18, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
展示上传时间的 逻辑修改
parent
7a92d4fc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Transformers/SupplierTransformer.php
resources/views/script/SupplierListScript.blade.php
resources/views/web/SupplierDetail.blade.php
resources/views/web/supplier/SupplierListFilter.blade.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
437917e8
...
@@ -103,6 +103,9 @@ class SupplierFilter
...
@@ -103,6 +103,9 @@ class SupplierFilter
$query
->
where
(
'sku_tag'
,
$map
[
'sku_tag'
]);
$query
->
where
(
'sku_tag'
,
$map
[
'sku_tag'
]);
}
}
if
((
isset
(
$map
[
'purchase_type'
])
&&
$map
[
'purchase_type'
]
===
"0"
)
||
!
empty
(
$map
[
'purchase_type'
]))
{
$query
->
where
(
'purchase_type'
,
$map
[
'purchase_type'
]);
}
if
(
!
empty
(
$map
[
'outside_contact_type'
]))
{
if
(
!
empty
(
$map
[
'outside_contact_type'
]))
{
$query
->
where
(
'outside_contact_type'
,
$map
[
'outside_contact_type'
]);
$query
->
where
(
'outside_contact_type'
,
$map
[
'outside_contact_type'
]);
}
}
...
...
app/Http/Transformers/SupplierTransformer.php
View file @
437917e8
...
@@ -30,18 +30,17 @@ class SupplierTransformer
...
@@ -30,18 +30,17 @@ class SupplierTransformer
$viewData
=
$viewCheckService
->
checkSupplierView
(
$supplierIds
);
$viewData
=
$viewCheckService
->
checkSupplierView
(
$supplierIds
);
$adminUserService
=
new
AdminUserService
();
$adminUserService
=
new
AdminUserService
();
//获取基石上传记录情况,展示第一次上传时间和最后一次上传时间
$firstUploadSkuTimes
=
SkuService
::
getUploadTimeBySupplierCodes
(
array_column
(
$list
,
'supplier_code'
),
'first'
);
$lastUploadSkuTimes
=
SkuService
::
getUploadTimeBySupplierCodes
(
array_column
(
$list
,
'supplier_code'
),
'last'
);
foreach
(
$list
as
&
$supplier
)
{
foreach
(
$list
as
&
$supplier
)
{
$supplier
[
'viewed'
]
=
array_get
(
$viewData
,
$supplier
[
'supplier_id'
],
false
);
$supplier
[
'viewed'
]
=
array_get
(
$viewData
,
$supplier
[
'supplier_id'
],
false
);
$supplier
=
$this
->
getStockupType
(
$supplier
);
$supplier
=
$this
->
getStockupType
(
$supplier
);
$supplier
[
'supplier_group'
]
=
array_get
(
config
(
'fixed.SupplierGroup'
),
$supplier
[
'supplier_group'
],
'未设置'
);
$supplier
[
'supplier_group'
]
=
array_get
(
config
(
'fixed.SupplierGroup'
),
$supplier
[
'supplier_group'
],
'未设置'
);
$supplier
[
'purchase_type'
]
=
array_get
(
config
(
'field.PurchaseType'
),
$supplier
[
'purchase_type'
],
'无'
);
$supplier
[
'region_name'
]
=
array_get
(
config
(
'fixed.Region'
),
$supplier
[
'region'
]);
$supplier
[
'region_name'
]
=
array_get
(
config
(
'fixed.Region'
),
$supplier
[
'region'
]);
$supplier
[
'create_time'
]
=
$supplier
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'create_time'
])
:
''
;
$supplier
[
'create_time'
]
=
$supplier
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'create_time'
])
:
''
;
$supplier
[
'audit_time'
]
=
$supplier
[
'audit_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'audit_time'
])
:
''
;
$supplier
[
'audit_time'
]
=
$supplier
[
'audit_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'audit_time'
])
:
''
;
$supplier
[
'update_time'
]
=
$supplier
[
'update_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'update_time'
])
:
''
;
$supplier
[
'update_time'
]
=
$supplier
[
'update_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'update_time'
])
:
''
;
$supplier
[
'sku_create_time'
]
=
$supplier
[
'sku_create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'sku_create_time'
])
:
''
;
$supplier
[
'sku_update_time'
]
=
$supplier
[
'sku_update_time'
]
?
date
(
'Y-m-d H:i:s'
,
$supplier
[
'sku_update_time'
])
:
''
;
$supplier
[
'channel_username'
]
=
$this
->
getChannelUserNames
(
$supplier
[
'channel_uid'
]);
$supplier
[
'channel_username'
]
=
$this
->
getChannelUserNames
(
$supplier
[
'channel_uid'
]);
$supplier
[
'purchase_username'
]
=
array_get
(
$users
,
$supplier
[
'purchase_uid'
]);
$supplier
[
'purchase_username'
]
=
array_get
(
$users
,
$supplier
[
'purchase_uid'
]);
$supplier
[
'yunxin_channel_username'
]
=
array_get
(
$users
,
$supplier
[
'yunxin_channel_uid'
]);
$supplier
[
'yunxin_channel_username'
]
=
array_get
(
$users
,
$supplier
[
'yunxin_channel_uid'
]);
...
@@ -63,10 +62,6 @@ class SupplierTransformer
...
@@ -63,10 +62,6 @@ class SupplierTransformer
$userInfo
=
$adminUserService
->
getAdminUserInfo
(
$supplier
[
'create_uid'
]);
$userInfo
=
$adminUserService
->
getAdminUserInfo
(
$supplier
[
'create_uid'
]);
$supplier
[
'create_name'
]
=
array_get
(
$userInfo
,
'name'
);
$supplier
[
'create_name'
]
=
array_get
(
$userInfo
,
'name'
);
}
}
$supplier
[
'first_upload_sku_time'
]
=
array_get
(
$firstUploadSkuTimes
,
$supplier
[
'supplier_code'
])
?
date
(
'Y-m-d H:i:s'
,
$firstUploadSkuTimes
[
$supplier
[
'supplier_code'
]])
:
''
;
$supplier
[
'last_upload_sku_time'
]
=
array_get
(
$lastUploadSkuTimes
,
$supplier
[
'supplier_code'
])
?
date
(
'Y-m-d H:i:s'
,
$lastUploadSkuTimes
[
$supplier
[
'supplier_code'
]])
:
''
;
//获取最新修改人以及下级审核员
//获取最新修改人以及下级审核员
$log
=
LogModel
::
getLastLog
(
$supplier
[
'supplier_id'
]);
$log
=
LogModel
::
getLastLog
(
$supplier
[
'supplier_id'
]);
...
...
resources/views/script/SupplierListScript.blade.php
View file @
437917e8
...
@@ -120,6 +120,7 @@
...
@@ -120,6 +120,7 @@
return
"
<
span
title
=
'" + data.stockup_type + "'
>
" + data.stockup_type + "
<
/span>
"
return
"
<
span
title
=
'" + data.stockup_type + "'
>
" + data.stockup_type + "
<
/span>
"
}
}
},
},
{
field
:
'purchase_type'
,
title
:
'代购类型'
,
align
:
'center'
,
width
:
80
},
{
{
field
:
'has_quality_assurance_agreement'
,
field
:
'has_quality_assurance_agreement'
,
title
:
'品质协议'
,
title
:
'品质协议'
,
...
@@ -183,8 +184,8 @@
...
@@ -183,8 +184,8 @@
{
field
:
'update_time'
,
title
:
'最近修改时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'update_time'
,
title
:
'最近修改时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'supplier_type_name'
,
title
:
'供应商类别'
,
align
:
'center'
,
width
:
110
},
{
field
:
'supplier_type_name'
,
title
:
'供应商类别'
,
align
:
'center'
,
width
:
110
},
{
field
:
'create_time'
,
title
:
'创建时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'create_time'
,
title
:
'创建时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'
first_upload_sku
_time'
,
title
:
'首次上传sku时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'
sku_create
_time'
,
title
:
'首次上传sku时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'
last_upload_sku
_time'
,
title
:
'最新上传sku时间'
,
align
:
'center'
,
width
:
145
},
{
field
:
'
sku_update
_time'
,
title
:
'最新上传sku时间'
,
align
:
'center'
,
width
:
145
},
];
];
cols
.
push
(
cols
.
push
(
);
);
...
...
resources/views/web/SupplierDetail.blade.php
View file @
437917e8
...
@@ -48,7 +48,9 @@
...
@@ -48,7 +48,9 @@
@else
@else
{{$supplier['stockup_type_name']}}
{{$supplier['stockup_type_name']}}
@endif
@endif
</div>
<div
class=
"layui-col-md2"
>
代购类型 : {{$supplier['purchase_type']}}
</div>
</div>
<div
class=
"layui-col-md2"
>
<div
class=
"layui-col-md2"
>
线上采购员 : {{$supplier['yunxin_channel_username']}}
线上采购员 : {{$supplier['yunxin_channel_username']}}
...
...
resources/views/web/supplier/SupplierListFilter.blade.php
View file @
437917e8
...
@@ -257,12 +257,17 @@
...
@@ -257,12 +257,17 @@
{!! $multiTransformableSelectPresenter->render(['has_cooperation_agreement'=>'平台合作协议'],
{!! $multiTransformableSelectPresenter->render(['has_cooperation_agreement'=>'平台合作协议'],
['has_cooperation_agreement'=>[1=>'是',-1=>'否']]) !!}
['has_cooperation_agreement'=>[1=>'是',-1=>'否']]) !!}
</div>
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型','',config('field.PurchaseType')) !!}
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-inline"
style=
"width: 600px"
>
<div
class=
"layui-inline"
style=
"width: 600px"
>
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间']) !!}
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间']) !!}
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
style=
"margin-top:10px;margin-bottom: 10px;margin-left: 20px;"
>
<div
class=
"layui-row"
style=
"margin-top:10px;margin-bottom: 10px;margin-left: 20px;"
>
...
...
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