|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace pt\controllers;
|
|
|
|
|
|
+use bizGhs\apply\classes\ApplyClass;
|
|
|
use bizHd\saas\services\ApplyService;
|
|
|
use common\components\dict;
|
|
|
use common\components\sms;
|
|
|
@@ -12,6 +13,24 @@ use Yii;
|
|
|
class ApplyController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //修改全品和单品 ssh 20240416
|
|
|
+ public function actionChangeAll()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $apply = ApplyClass::getById($id, true);
|
|
|
+ if (empty($apply)) {
|
|
|
+ util::fail('没有找到申请记录');
|
|
|
+ }
|
|
|
+ if ($apply->status != 1) {
|
|
|
+ util::fail('不是审核状态');
|
|
|
+ }
|
|
|
+ $new = $apply->all == 1 ? 0 : 1;
|
|
|
+ $apply->all = $new;
|
|
|
+ $apply->save();
|
|
|
+ util::complete();
|
|
|
+ }
|
|
|
+
|
|
|
//申请列表
|
|
|
public function actionList()
|
|
|
{
|