Commit 6b790653 by 杨树贤

待转正供应商类型的处理

parent 876aa1ce
...@@ -104,7 +104,7 @@ class SupplierFilter ...@@ -104,7 +104,7 @@ class SupplierFilter
} }
//默认过滤带有-1字符串的供应商名称的数据 //默认过滤带有-1字符串的供应商名称的数据
$query->whereRaw('supplier_name NOT LIKE "%-1"'); $query->whereRaw('supplier_name NOT LIKE "%-1"');
if (config('website.domain') == 'liexin.net') { if (config('website.domain') == 'liexin.net' && request()->user->userId != 1000) {
$query->where('supplier_id', '>', 12211); $query->where('supplier_id', '>', 12211);
} }
return $query; return $query;
......
...@@ -499,6 +499,14 @@ class DataService ...@@ -499,6 +499,14 @@ class DataService
} }
SupplierPayTypeModel::insert($payTypeData); SupplierPayTypeModel::insert($payTypeData);
} }
//将未转正的供应商的供应商类型改成未转正
public function changeSupplierTypeFromIsType()
{
SupplierChannelModel::where('is_type', 1)->update([
'supplier_type' => 3,
]);
}
} }
...@@ -50,5 +50,5 @@ Route::group(['middleware' => ['external'],'namespace' => 'Api'], function () { ...@@ -50,5 +50,5 @@ Route::group(['middleware' => ['external'],'namespace' => 'Api'], function () {
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
$service = new \App\Http\Services\DataService(); $service = new \App\Http\Services\DataService();
$service->makeSupplierSystemTagAbnormal(); $service->changeSupplierTypeFromIsType();
}); });
...@@ -114,5 +114,6 @@ return [ ...@@ -114,5 +114,6 @@ return [
'SupplierType' => [ 'SupplierType' => [
1 => '正式', 1 => '正式',
2 => '临时', 2 => '临时',
3 => '待转正',
] ]
]; ];
\ No newline at end of file
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
{field: 'supplier_type_name', title: '供应商类别', align: 'center', width: 110}, {field: 'supplier_type_name', title: '供应商类别', align: 'center', width: 110},
]; ];
@if(checkPerm('ViewFakeSupplier')) @if(checkPerm('ViewFakeSupplier') && request()->user->userId == 1000)
cols.push({ cols.push({
field: 'is_type', title: '正式供应商', align: 'center', width: 110, templet: function (data) { field: 'is_type', title: '正式供应商', align: 'center', width: 110, templet: function (data) {
return data.is_type === 0 ? '正式' : '<span style="color: red">待转正</span>'; return data.is_type === 0 ? '正式' : '<span style="color: red">待转正</span>';
......
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