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
7a92d4fc
authored
Jul 18, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
代购类型
parent
5817e308
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
34 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Services/SupplierContactService.php
app/Http/Transformers/SupplierTransformer.php
config/field.php
config/validate.php
resources/views/web/AddSupplier.blade.php
resources/views/web/supplier/SupplierBase.blade.php
vendor/_laravel_idea/_ide_helper_facades.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
7a92d4fc
...
@@ -97,6 +97,7 @@ class SupplierApiController extends Controller
...
@@ -97,6 +97,7 @@ class SupplierApiController extends Controller
'is_business_abnormal'
,
'is_business_abnormal'
,
'has_legal_ID_card'
,
'has_legal_ID_card'
,
'agency_brands'
,
'agency_brands'
,
'purchase_type'
,
];
];
public
function
Entrance
(
Request
$request
,
$id
)
public
function
Entrance
(
Request
$request
,
$id
)
...
@@ -147,7 +148,6 @@ class SupplierApiController extends Controller
...
@@ -147,7 +148,6 @@ class SupplierApiController extends Controller
'account_adderss'
,
'account_adderss'
,
'certificate'
,
'certificate'
,
'swift_code'
,
'swift_code'
,
]);
]);
$channel
=
$request
->
only
(
$channelMap
);
$channel
=
$request
->
only
(
$channelMap
);
//如果是有直接新增权限的(绕过天眼查等校验)
//如果是有直接新增权限的(绕过天眼查等校验)
...
...
app/Http/Services/SupplierContactService.php
View file @
7a92d4fc
...
@@ -88,15 +88,6 @@ class SupplierContactService
...
@@ -88,15 +88,6 @@ class SupplierContactService
$newContact
=
$model
->
where
(
'contact_id'
,
$contactId
)
->
first
()
->
toArray
();
$newContact
=
$model
->
where
(
'contact_id'
,
$contactId
)
->
first
()
->
toArray
();
if
(
$result
)
{
if
(
$result
)
{
// $needAudit = $this->checkNeedAudit($oldContact, $newContact);
// if ($needAudit) {
// //修改供应商为审核状态
// $supplierModel->where('supplier_id', $contact['supplier_id'])->update([
// 'update_time' => time(),
// 'status' => SupplierChannelModel::STATUS_PENDING,
// ]);
// }
$logService
=
new
LogService
();
$logService
=
new
LogService
();
$content
=
!
empty
(
$contact
[
'contact_id'
])
?
'修改联系人'
:
'添加联系人'
;
$content
=
!
empty
(
$contact
[
'contact_id'
])
?
'修改联系人'
:
'添加联系人'
;
$remark
=
json_encode
([
$remark
=
json_encode
([
...
...
app/Http/Transformers/SupplierTransformer.php
View file @
7a92d4fc
...
@@ -209,6 +209,7 @@ class SupplierTransformer
...
@@ -209,6 +209,7 @@ class SupplierTransformer
array_get
(
$supplier
,
'has_certification'
,
''
),
''
);
array_get
(
$supplier
,
'has_certification'
,
''
),
''
);
$supplier
[
'sku_tag_name'
]
=
array_get
(
config
(
'field.SkuTag'
),
array_get
(
$supplier
,
'sku_tag'
,
''
),
'无'
);
$supplier
[
'sku_tag_name'
]
=
array_get
(
config
(
'field.SkuTag'
),
array_get
(
$supplier
,
'sku_tag'
,
''
),
'无'
);
$supplier
[
'sku_mode_name'
]
=
array_get
(
config
(
'field.SkuMode'
),
array_get
(
$supplier
,
'sku_mode'
,
''
),
'无'
);
$supplier
[
'sku_mode_name'
]
=
array_get
(
config
(
'field.SkuMode'
),
array_get
(
$supplier
,
'sku_mode'
,
''
),
'无'
);
$supplier
[
'purchase_type'
]
=
array_get
(
config
(
'field.PurchaseType'
),
array_get
(
$supplier
,
'purchase_type'
,
''
),
'无'
);
return
$supplier
;
return
$supplier
;
}
}
...
...
config/field.php
View file @
7a92d4fc
...
@@ -269,4 +269,11 @@ return [
...
@@ -269,4 +269,11 @@ return [
1
=>
'小于'
,
1
=>
'小于'
,
2
=>
'大于等于'
2
=>
'大于等于'
],
],
//代购类型
'PurchaseType'
=>
[
1
=>
'国内代购'
,
2
=>
'海外代购'
,
3
=>
'非代购'
,
]
];
];
\ No newline at end of file
config/validate.php
View file @
7a92d4fc
...
@@ -56,5 +56,6 @@ return [
...
@@ -56,5 +56,6 @@ return [
'ticket_time'
=>
'到票时间'
,
'ticket_time'
=>
'到票时间'
,
'billing_period_detail'
=>
'账期详情'
,
'billing_period_detail'
=>
'账期详情'
,
'registered_capital'
=>
'注册资金(万)'
,
'registered_capital'
=>
'注册资金(万)'
,
'purchase_type'
=>
'代购类型'
,
]
]
];
];
\ No newline at end of file
resources/views/web/AddSupplier.blade.php
View file @
7a92d4fc
...
@@ -220,7 +220,8 @@
...
@@ -220,7 +220,8 @@
id=
"main_brands"
>
id=
"main_brands"
>
</div>
</div>
<a
style=
"color: #009688;"
id=
"batchAddMainBrands"
>
+批量增加主营品牌
</a>
<a
style=
"color: #009688;"
id=
"batchAddMainBrands"
>
+批量增加主营品牌
</a>
<div
id=
"batchAddMainBrandsDiv"
style=
"padding-left: 30px;padding-top: 30px;padding-right: 30px;display: none"
>
<div
id=
"batchAddMainBrandsDiv"
style=
"padding-left: 30px;padding-top: 30px;padding-right: 30px;display: none"
>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-col-md12"
>
<textarea
rows=
"7"
placeholder=
"标准品牌名称,多个用英文逗号隔开"
class=
"layui-textarea"
<textarea
rows=
"7"
placeholder=
"标准品牌名称,多个用英文逗号隔开"
class=
"layui-textarea"
id=
"batchAddMainBrandsTextarea"
></textarea>
id=
"batchAddMainBrandsTextarea"
></textarea>
...
@@ -228,8 +229,12 @@
...
@@ -228,8 +229,12 @@
<span
style=
"color: red"
id=
"invalid_${name}_name_list"
></span>
<span
style=
"color: red"
id=
"invalid_${name}_name_list"
></span>
</div>
</div>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-col-md12"
>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"confirmBatchAddMainBrands"
>
验证并且添加
</button>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"confirmBatchAddMainBrands"
>
<button
class=
"layui-btn layui-btn-sm layui-btn-primary"
type=
"button"
id=
"closeBatchAddMainBrands"
>
关闭
</button>
验证并且添加
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-primary"
type=
"button"
id=
"closeBatchAddMainBrands"
>
关闭
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -246,16 +251,24 @@
...
@@ -246,16 +251,24 @@
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
合作类型
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-block"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
合作类型
</label>
<input
type=
"hidden"
name=
"stockup_type"
<div
class=
"layui-input-block"
>
value=
"{{$supplier['stockup_type'] or ''}}"
>
<input
type=
"hidden"
name=
"stockup_type"
@foreach(config('fixed.StockupType') as $k=>$type)
value=
"{{$supplier['stockup_type'] or ''}}"
>
<input
type=
"checkbox"
name=
"stockup_type[{{$k}}]"
lay-filter=
"stockup_type_filter"
@foreach(config('fixed.StockupType') as $k=>$type)
lay-skin=
"primary"
<input
type=
"checkbox"
name=
"stockup_type[{{$k}}]"
lay-filter=
"stockup_type_filter"
title=
"{{$type}}"
>
lay-skin=
"primary"
@endforeach
title=
"{{$type}}"
>
@endforeach
</div>
</div>
</div>
<div
class=
"layui-col-md6"
>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型 : ',!empty($supplier)?$supplier['purchase_type']:'',config('field.PurchaseType')) !!}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
resources/views/web/supplier/SupplierBase.blade.php
View file @
7a92d4fc
...
@@ -256,17 +256,25 @@
...
@@ -256,17 +256,25 @@
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
合作类型
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-block"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
合作类型
</label>
@foreach(config('fixed.StockupType') as $k=>$type)
<div
class=
"layui-input-block"
>
<input
type=
"checkbox"
lay-filter=
"stockup_type_filter"
name=
"stockup_type[{{$k}}]"
@foreach(config('fixed.StockupType') as $k=>$type)
lay-skin=
"primary"
<input
type=
"checkbox"
lay-filter=
"stockup_type_filter"
name=
"stockup_type[{{$k}}]"
@
if
(!
empty
($
supplier
['
stockup_type_data
'])&&
in_array
($
k
,$
supplier
['
stockup_type_data
']))
lay-skin=
"primary"
checked
@
if
(!
empty
($
supplier
['
stockup_type_data
'])&&
in_array
($
k
,$
supplier
['
stockup_type_data
']))
@
endif
checked
title=
"{{$type}}"
>
@
endif
@endforeach
title=
"{{$type}}"
>
@endforeach
</div>
</div>
</div>
<div
class=
"layui-col-md6"
>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型 : ',!empty($supplier)?$supplier['purchase_type']:'',config('field.PurchaseType')) !!}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
vendor/_laravel_idea/_ide_helper_facades.php
View file @
7a92d4fc
This diff is collapsed.
Click to expand it.
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