|
|
@@ -741,7 +741,7 @@ class FinanceController extends BaseController {
|
|
|
'AUDIT_ADMIN_NAME' => 'ADMU.ADMIN_NAME',
|
|
|
]);
|
|
|
$form = new FinanceExportForm();
|
|
|
- $result = $form->run($filter, '会员业绩调整列表');
|
|
|
+ $result = $form->run($filter, Yii::t('ctx', 'memberPerformanceAdjustmentList'));
|
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -755,7 +755,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
|
public function actionPerfApply() {
|
|
|
if (\Yii::$app->request->isPost) { // 申请调整会员业绩成功
|
|
|
- return static::edit(ChangePerfForm::class, 'The application to adjust the member performance was successful', 'add', ['add'], null, function ($formModel, $result) {
|
|
|
+ return static::edit(ChangePerfForm::class, Yii::t('ctx', 'applicationAdjustMemberPerfSuccess'), 'add', ['add'], null, function ($formModel, $result) {
|
|
|
// 添加操作日志
|
|
|
// Log::adminHandle('申请调整会员' . $formModel->userName . '的' . $formModel->location . '区业绩,调整额度为:' . $formModel->amount);
|
|
|
});
|
|
|
@@ -773,11 +773,13 @@ class FinanceController extends BaseController {
|
|
|
$periodNum = Period::sentMaxPeriodNum();
|
|
|
if (Period::find()->where('IS_SENT=:IS_SENT AND PERIOD_NUM>=:START_PERIOD_NUM AND PERIOD_NUM<=:END_PERIOD_NUM', [':IS_SENT' => Period::SEND_FINISH, ':START_PERIOD_NUM' => $periodNum + 1, ':END_PERIOD_NUM' => $periodNum + 1])->count() == 1) {
|
|
|
// return static::notice('下一期【' . ($periodNum + 1) . '】已挂网,该期无法调整', 400);
|
|
|
- return static::notice('The next period [' . ($periodNum + 1) . '] has been connected to the net, and this period cannot be adjusted', 400);
|
|
|
+ return static::notice(Yii::t('ctx', 'nextPeriodConnectedNetCannotAdjusted',[
|
|
|
+ 'periodNum' => $periodNum + 1
|
|
|
+ ]), 400);
|
|
|
}
|
|
|
$userName = \Yii::$app->request->get('userName');
|
|
|
if (!$userId = Info::getUserIdByUserName($userName)) {
|
|
|
- return static::notice('Member does not exist', 400); // 会员不存在
|
|
|
+ return static::notice(Yii::t('ctx', 'memberDoesNotExist'), 400); // 会员不存在
|
|
|
}
|
|
|
$perf = PerfAudit::getUserPerfAndPerfPeriod($userId, $periodNum);
|
|
|
return static::notice(array_merge(['REAL_NAME' => Info::getUserRealNameByUserId($userId)], $perf));
|
|
|
@@ -792,7 +794,7 @@ class FinanceController extends BaseController {
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
$perfAudit = PerfAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
|
if (!$perfAudit) {
|
|
|
- return static::notice('The data does not exist', 400); // 数据不存在
|
|
|
+ return static::notice(Yii::t('ctx', 'dataDoesNotExists'), 400); // 数据不存在
|
|
|
}
|
|
|
$perf = PerfAudit::getUserPerfAndPerfPeriod($perfAudit['USER_ID'], $perfAudit['PERIOD_NUM']);
|
|
|
return static::notice(['userInfo'=>array_merge(['USER_NAME' => Info::getUserNameByUserId($perfAudit['USER_ID']),'REAL_NAME' => Info::getUserRealNameByUserId($perfAudit['USER_ID'])], $perf),'perfAudit'=>['periodNum'=>$perfAudit['PERIOD_NUM'],'perfType'=>$perfAudit['PERF_TYPE'],'location'=>$perfAudit['PERF_LOCATION'],'amount'=>Tool::formatPrice($perfAudit['AMOUNT']),'remark'=>$perfAudit['REMARK'],'id'=>$perfAudit['ID']]]);
|
|
|
@@ -810,7 +812,7 @@ class FinanceController extends BaseController {
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->pass()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('审核通过' . $user['USER_NAME'] . '调整会员业绩录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('审核通过调整会员业绩成功');
|
|
|
+ return static::notice(Yii::t('ctx', 'passReviewAdjustPerfSuccess'));
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -829,7 +831,7 @@ class FinanceController extends BaseController {
|
|
|
$userName = Info::getUserNameByUserId($value['userId']);
|
|
|
// Log::adminHandle('审核调整会员业绩录入数据' . $userName, 1, $value['userId'], $userName);
|
|
|
}
|
|
|
- return static::notice('批量审核/审核拒绝会员业绩完成');
|
|
|
+ return static::notice(Yii::t('ctx', 'batchReviewMemberPerfCompletion'));
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -877,7 +879,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
|
public function actionDealTypeAdd() {
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(DealTypeForm::class, '交易类型添加成功', 'add', ['add'], null, function ($form, $result) {
|
|
|
+ return parent::edit(DealTypeForm::class, Yii::t('ctx', 'transactionTypeAddSuccess'), 'add', ['add'], null, function ($form, $result) {
|
|
|
// Log::adminHandle('交易类型录入');
|
|
|
});
|
|
|
}
|
|
|
@@ -892,7 +894,7 @@ class FinanceController extends BaseController {
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
$dealType = DealType::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
|
if (!$dealType) {
|
|
|
- return static::notice('The data does not exist', 400); // 数据不存在
|
|
|
+ return static::notice(Yii::t('ctx', 'dataDoesNotExists'), 400); // 数据不存在
|
|
|
}
|
|
|
return static::notice(['id' => $dealType['ID'], 'typeName' => $dealType['TYPE_NAME'], 'isEnable' => $dealType['IS_ENABLE'] ? true : false, 'isPreset' => $dealType['IS_PRESET'] ? true : false, 'createRemark' => $dealType['CREATE_REMARK'], 'sort' => $dealType['SORT_ORDER']]);
|
|
|
}
|
|
|
@@ -908,7 +910,7 @@ class FinanceController extends BaseController {
|
|
|
$formModel->scenario = 'edit';
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
|
// Log::adminHandle('修改交易类型');
|
|
|
- return static::notice('修改交易类型完成');
|
|
|
+ return static::notice(Yii::t('ctx', 'modifyTransactionTypeCompleted'));
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -920,7 +922,7 @@ class FinanceController extends BaseController {
|
|
|
* @throws \yii\web\HttpException
|
|
|
*/
|
|
|
public function actionDealTypeDelete() {
|
|
|
- return static::notice('无法删除', 400);
|
|
|
+ return static::notice(Yii::t('ctx', 'unableDelete'), 400);
|
|
|
$result = static::delete(DealType::class, null, function ($selected) {
|
|
|
DealTypeForm::delete($selected);
|
|
|
// Log::adminHandle('删除交易类型');
|
|
|
@@ -955,7 +957,7 @@ class FinanceController extends BaseController {
|
|
|
} elseif ($result === 0) {
|
|
|
return static::notice(['finish' => true]);
|
|
|
} else {
|
|
|
- return static::notice('发生错误:' . $errorMsg, 400);
|
|
|
+ return static::notice($errorMsg, 400);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -985,7 +987,7 @@ class FinanceController extends BaseController {
|
|
|
} elseif ($result === 0) {
|
|
|
return static::notice(['finish' => true]);
|
|
|
} else {
|
|
|
- return static::notice('发生错误:' . $errorMsg, 400);
|
|
|
+ return static::notice($errorMsg, 400);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1149,13 +1151,16 @@ class FinanceController extends BaseController {
|
|
|
$userName = Info::getUserNameByUserId($k);
|
|
|
// Log::adminHandle('为会员' . $userName . '的充值流水号为' . $value . '改变充值状态至' . Recharge::STATUS_NAME[$result['status']], 1, $k, $userName);
|
|
|
}
|
|
|
- return static::notice('Status setting succeeded'); // 状态设置成功
|
|
|
+ return static::notice(Yii::t('ctx', 'statusSettingSucceeded')); // 状态设置成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
}
|
|
|
// 所有开户行
|
|
|
- $statusArray = [2=>'Approve',3=>'Reject']; // 2=>'审核通过',3=>'审核拒绝'
|
|
|
+ $statusArray = [
|
|
|
+ 2=>Yii::t('ctx', 'backendApiControllersFinaceRechargeStatusApprove'),
|
|
|
+ 3=>Yii::t('ctx', 'backendApiControllersFinaceRechargeStatusReject'),
|
|
|
+ ]; // 2=>'审核通过',3=>'审核拒绝'
|
|
|
return static::notice(['statusArray' => $statusArray]);
|
|
|
}
|
|
|
|