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
4093e0bc
authored
Jun 29, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
页面调整
parent
4b5f88eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
3 deletions
app/Http/Services/DataService.php
app/Http/Validators/SupplierValidator.php
app/Http/routes.php
config/fixed.php
resources/views/web/PrintSupplier.blade.php
app/Http/Services/DataService.php
View file @
4093e0bc
...
...
@@ -493,6 +493,31 @@ class DataService
});
})
->
export
(
'csv'
);
}
public
function
exportSupplierJsonForUnited
()
{
$suppliers
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
pluck
(
'supplier_group'
,
'supplier_id'
)
->
toArray
();
$exportJson
=
[];
$items
=
array_map
(
function
(
$value
)
{
$value
=
array_get
(
config
(
'fixed.SupplierGroup'
),
$value
);
return
$value
;
},
$suppliers
);
$jsonItems
=
[];
foreach
(
$items
as
$key
=>
$item
)
{
$jsonItems
[]
=
[
'i'
=>
$key
,
'n'
=>
$item
];
}
$exportJson
=
[
'sysId'
=>
1
,
'cType'
=>
2
,
'list'
=>
$jsonItems
,
];
echo
json_encode
(
$exportJson
);
}
}
app/Http/Validators/SupplierValidator.php
View file @
4093e0bc
...
...
@@ -56,6 +56,7 @@ class SupplierValidator
'main_brands'
=>
'required'
,
'pay_type'
=>
'required'
,
'settlement_type'
=>
'required'
,
'established_time'
=>
'required'
,
'currency'
=>
'required'
,
'supplier_group'
=>
'required'
,
'main_customers'
=>
'max:100'
,
...
...
app/Http/routes.php
View file @
4093e0bc
...
...
@@ -54,5 +54,5 @@ Route::group(['middleware' => ['external'],'namespace' => 'Api'], function () {
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
exportSupplier
ForUnionData
();
(
new
\App\Http\Services\DataService
())
->
exportSupplier
JsonForUnited
();
});
config/fixed.php
View file @
4093e0bc
...
...
@@ -86,6 +86,7 @@ return [
//账期-定期结算
2
=>
'货到付款'
,
// 4 => '定金'
5
=>
'验货付款'
,
],
'SupplierApiType'
=>
[
...
...
resources/views/web/PrintSupplier.blade.php
View file @
4093e0bc
...
...
@@ -74,7 +74,7 @@
style=
"text-align: left;padding-left: 20px"
>
{{$printData['supplier_address']}}
</td>
</tr>
<tr>
<td
width=
"20%"
colspan=
"1"
>
供应商办公/发货地址
*
</td>
<td
width=
"20%"
colspan=
"1"
>
供应商办公/发货地址
</td>
<td
width=
"80%"
colspan=
"5"
style=
"text-align: left;padding-left: 20px"
>
{{$printData['shipping_address']}}
</td>
</tr>
...
...
@@ -132,7 +132,7 @@
<td
width=
"80%"
colspan=
"5"
style=
"text-align: left;padding-left: 20px"
></td>
</tr>
<tr>
<td
width=
"20%"
colspan=
"1"
>
供应商到票时间
*
</td>
<td
width=
"20%"
colspan=
"1"
>
供应商到票时间
</td>
<td
width=
"80%"
colspan=
"5"
style=
"text-align: left;padding-left: 20px"
>
{{$printData['ticket_time'] or ''}}
</td>
</tr>
...
...
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