Commit 4093e0bc by 杨树贤

页面调整

parent 4b5f88eb
......@@ -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);
}
}
......@@ -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',
......
......@@ -54,5 +54,5 @@ Route::group(['middleware' => ['external'],'namespace' => 'Api'], function () {
});
Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\DataService())->exportSupplierForUnionData();
(new \App\Http\Services\DataService())->exportSupplierJsonForUnited();
});
......@@ -86,6 +86,7 @@ return [
//账期-定期结算
2 => '货到付款',
// 4 => '定金'
5 => '验货付款',
],
'SupplierApiType' => [
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment