Commit 68347186 by 杨树贤

供应商类型强制校验

parent 35fb5f02
Showing with 3 additions and 0 deletions
...@@ -147,6 +147,9 @@ class SupplierValidator ...@@ -147,6 +147,9 @@ class SupplierValidator
$errorMessageList = []; $errorMessageList = [];
//判断供应商类型,如果类型为临时,而且名字属于不能修改为临时的代购供应商列表里面,就要报错 //判断供应商类型,如果类型为临时,而且名字属于不能修改为临时的代购供应商列表里面,就要报错
if (empty($validateData['supplier_type'])) {
return '请选择供应商类型';
}
if ($validateData['supplier_type'] == 2 && in_array($validateData['supplier_name'], if ($validateData['supplier_type'] == 2 && in_array($validateData['supplier_name'],
config('field.SkipChangeSupplierTypeNames'))) { config('field.SkipChangeSupplierTypeNames'))) {
$errorMessageList[] = '该供应商是代购供应商,不能修改为临时供应商'; $errorMessageList[] = '该供应商是代购供应商,不能修改为临时供应商';
......
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