|
|
@@ -464,6 +464,21 @@ class ConfigController extends BaseController {
|
|
|
return static::notice($data);
|
|
|
}
|
|
|
|
|
|
+ public function actionMonthLimit() {
|
|
|
+ if (Yii::$app->request->isPost) {
|
|
|
+ $postData = Yii::$app->request->post();
|
|
|
+ $month = $postData['month'];
|
|
|
+ $ret = Config::updateAll(['VALUE' => $month, 'UPDATED_AT' => Date::nowTime()], "CONFIG_NAME=:CONFIG_NAME", [':CONFIG_NAME' => 'observePeriodLimit']);
|
|
|
+ if ($ret) {
|
|
|
+ return static::notice('更新观察期成功');
|
|
|
+ } else {
|
|
|
+ return static::notice('更新观察期失败,请重试');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $data = Config::find()->where("CONFIG_NAME='observePeriodLimit'")->asArray()->one();
|
|
|
+ return static::notice($data);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查看报单中心级别
|
|
|
* @return mixed
|