| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace ghs\controllers;
- use bizGhs\merchant\classes\SupplierClass;
- use bizGhs\merchant\services\SupplierService;
- use common\components\stringUtil;
- use Yii;
- use common\components\util;
- class SupplierController extends BaseController
- {
- //供货商列表 shish 2021.1.18
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $name = isset($get['name']) ? $get['name'] : '';
- $where = ['merchantId' => $this->sjId];
- if (!empty($name)) {
- if (stringUtil::isLetter($name)) {
- $where['py'] = ['like', $name];
- } else {
- $where['name'] = ['like', $name];
- }
- }
- $list = SupplierService::getSupplierList($where);
- util::success($list);
- }
- }
|