Commit c9e2e736 by 杨树贤

批量修改内部编码采购员判断

parent 29ae6936
Showing with 7 additions and 0 deletions
...@@ -10,6 +10,7 @@ use App\Http\Transformers\SupplierContactTransformer; ...@@ -10,6 +10,7 @@ use App\Http\Transformers\SupplierContactTransformer;
use App\Http\Validators\SupplierContactValidator; use App\Http\Validators\SupplierContactValidator;
use App\Model\RedisModel; use App\Model\RedisModel;
use App\Model\SkuUploadLogModel; use App\Model\SkuUploadLogModel;
use App\Model\SupplierChannelModel;
use App\Model\SupplierContactModel; use App\Model\SupplierContactModel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
...@@ -98,6 +99,12 @@ class SkuApiController extends Controller ...@@ -98,6 +99,12 @@ class SkuApiController extends Controller
if (empty($encoded)) { if (empty($encoded)) {
$this->response(-1, '请选择供内部编码(采购员)'); $this->response(-1, '请选择供内部编码(采购员)');
} }
//判断采购员是否属于该供应商
$flag = SupplierChannelModel::where('supplier_code', $canal)->
where('channel_uid', 'like', "%$encoded%")->exists();
if (!$flag) {
$this->response(-1, '选择的采购员不属于该供应商,请重新选择');
}
$data = [ $data = [
'canal' => $canal, 'canal' => $canal,
"encoded" => $encoded, "encoded" => $encoded,
......
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