|
|
@@ -112,52 +112,26 @@ class CustomController extends BaseController
|
|
|
//客户列表 ssh 2021.7.8
|
|
|
public function actionList()
|
|
|
{
|
|
|
- if ($this->shopAdminId == 125903) {
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $type = isset($get['type']) ? $get['type'] : 0;
|
|
|
- $name = isset($get['name']) ? $get['name'] : '';
|
|
|
- $where = ['ownShopId' => $this->shopId];
|
|
|
- //欠款客户
|
|
|
- if (!empty($type) && $type == 1) {
|
|
|
- $where['isDebt'] = 1;
|
|
|
- }
|
|
|
- if (!empty($name)) {
|
|
|
- if (stringUtil::isLetter($name)) {
|
|
|
- $where['py'] = ['like', $name];
|
|
|
- } else {
|
|
|
- $where['name'] = ['like', $name];
|
|
|
- }
|
|
|
- }
|
|
|
- $list = CustomService::getCustomList($where);
|
|
|
- $shop = $this->shop;
|
|
|
- $list['totalUser'] = $shop->totalUser ?? 0;
|
|
|
- $list['mayGatheringNum'] = $shop->mayGatheringNum ?? 0;
|
|
|
- util::success($list);
|
|
|
- } else {
|
|
|
- unset($_GET['page']);
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $type = isset($get['type']) ? $get['type'] : 0;
|
|
|
- $name = isset($get['name']) ? $get['name'] : '';
|
|
|
- $where = ['ownShopId' => $this->shopId];
|
|
|
- //欠款客户
|
|
|
- if (!empty($type) && $type == 1) {
|
|
|
- $where['isDebt'] = 1;
|
|
|
- }
|
|
|
- if (!empty($name) && strlen($name) >= 2) {
|
|
|
- if (stringUtil::isLetter($name)) {
|
|
|
- $where['py'] = ['like', $name];
|
|
|
- } else {
|
|
|
- $where['name'] = ['like', $name];
|
|
|
- }
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $type = isset($get['type']) ? $get['type'] : 0;
|
|
|
+ $name = isset($get['name']) ? $get['name'] : '';
|
|
|
+ $where = ['ownShopId' => $this->shopId];
|
|
|
+ //欠款客户
|
|
|
+ if (!empty($type) && $type == 1) {
|
|
|
+ $where['isDebt'] = 1;
|
|
|
+ }
|
|
|
+ if (!empty($name)) {
|
|
|
+ if (stringUtil::isLetter($name)) {
|
|
|
+ $where['py'] = ['like', $name];
|
|
|
} else {
|
|
|
- $where['name'] = 'shishaohua8879';
|
|
|
+ $where['name'] = ['like', $name];
|
|
|
}
|
|
|
- $list = CustomService::getCustomList($where);
|
|
|
- $shop = $this->shop;
|
|
|
- $list['totalUser'] = $shop->totalUser ?? 0;
|
|
|
- $list['mayGatheringNum'] = $shop->mayGatheringNum ?? 0;
|
|
|
- util::success($list);
|
|
|
}
|
|
|
+ $list = CustomService::getCustomList($where);
|
|
|
+ $shop = $this->shop;
|
|
|
+ $list['totalUser'] = $shop->totalUser ?? 0;
|
|
|
+ $list['mayGatheringNum'] = $shop->mayGatheringNum ?? 0;
|
|
|
+ util::success($list);
|
|
|
}
|
|
|
|
|
|
//客户详情 ssh 2021.1.8
|