|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
+use bizGhs\merchant\classes\SupplierClass;
|
|
|
use bizGhs\merchant\services\SupplierService;
|
|
|
use common\components\stringUtil;
|
|
|
use Yii;
|
|
|
@@ -9,23 +10,25 @@ use common\components\util;
|
|
|
|
|
|
class SupplierController extends BaseController
|
|
|
{
|
|
|
-
|
|
|
- //供货商列表 shish 2021.1.18
|
|
|
- public function actionList()
|
|
|
- {
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $type = isset($get['type']) ? $get['type'] : 0;
|
|
|
- $name = isset($get['name']) ? $get['name'] : '';
|
|
|
- $where = ['ghsId' => $this->ghsId];
|
|
|
- if (!empty($name)) {
|
|
|
- if (stringUtil::isLetter($name)) {
|
|
|
- $where['py'] = $name;
|
|
|
- } else {
|
|
|
- $where['upName'] = ['like', $name];
|
|
|
- }
|
|
|
- }
|
|
|
- $list = SupplierService::getSupplierList($where);
|
|
|
- util::success($list);
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ //供货商列表 shish 2021.1.18
|
|
|
+ public function actionList()
|
|
|
+ {
|
|
|
+
|
|
|
+ $r = SupplierClass::getSupplierByIds([1]);dd($r);
|
|
|
+
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $name = isset($get['name']) ? $get['name'] : '';
|
|
|
+ $where = ['ghsId' => $this->ghsId];
|
|
|
+ if (!empty($name)) {
|
|
|
+ if (stringUtil::isLetter($name)) {
|
|
|
+ $where['py'] = ['like', $name];
|
|
|
+ } else {
|
|
|
+ $where['upName'] = ['like', $name];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $list = SupplierService::getSupplierList($where);
|
|
|
+ util::success($list);
|
|
|
+ }
|
|
|
+
|
|
|
}
|