|
|
@@ -0,0 +1,43 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace ghs\controllers;
|
|
|
+
|
|
|
+use bizGhs\custom\classes\CustomClass;
|
|
|
+use bizGhs\custom\classes\CustomDebtChangeClass;
|
|
|
+use bizGhs\ghs\classes\GhsDebtRecordClass;
|
|
|
+use common\components\dict;
|
|
|
+use common\components\util;
|
|
|
+use Yii;
|
|
|
+
|
|
|
+class GhsDebtRecordController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ public $guestAccess = [];
|
|
|
+
|
|
|
+ //欠款变动记录 ssh 20240628
|
|
|
+ public function actionList()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $customId = $get['customId'] ?? 0;
|
|
|
+ $endTime = $get['endTime']??'';
|
|
|
+ if(empty($customId)){
|
|
|
+ util::fail('请选择客户');
|
|
|
+ }
|
|
|
+ $custom = CustomClass::getById($customId);
|
|
|
+ if(empty($custom)){
|
|
|
+ util::fail('请选择客户哈');
|
|
|
+ }
|
|
|
+ CustomClass::valid($custom, $this->shopId);
|
|
|
+ $where = [];
|
|
|
+ $where['customId'] = $customId;
|
|
|
+ if(!empty($endTime)){
|
|
|
+ $time = bcadd(strtotime($endTime),86400);
|
|
|
+ $endDate = date("Y-m-d 00:00:00",$time);
|
|
|
+ $where['addTime<']=$endDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ $list = GhsDebtRecordClass::getRecordList($where);
|
|
|
+ util::success($list);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|