|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace hd\controllers;
|
|
|
|
|
|
+use bizHd\custom\classes\CustomClass;
|
|
|
use bizHd\custom\classes\CustomDebtRecordClass;
|
|
|
use common\components\dict;
|
|
|
use common\components\util;
|
|
|
@@ -16,8 +17,17 @@ class CustomDebtRecordController extends BaseController
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
$ptStyle = dict::getDict('ptStyle', 'hd');
|
|
|
+ $customId = $get['customId'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有找到客户');
|
|
|
+ }
|
|
|
+ if ($custom->shopId != $this->shopId) {
|
|
|
+ util::fail('不是你的客户');
|
|
|
+ }
|
|
|
$where = [];
|
|
|
$where['shopId'] = $this->shopId;
|
|
|
+ $where['customId'] = $customId;
|
|
|
$where['ptStyle'] = $ptStyle;
|
|
|
$list = CustomDebtRecordClass::getChangeList($where);
|
|
|
util::success($list);
|