|
@@ -125,11 +125,11 @@ class FinanceController extends BaseController {
|
|
|
'AUDIT_ADMIN_NAME' => 'ADMU.ADMIN_NAME',
|
|
'AUDIT_ADMIN_NAME' => 'ADMU.ADMIN_NAME',
|
|
|
]);
|
|
]);
|
|
|
$form = new FinanceExportForm();
|
|
$form = new FinanceExportForm();
|
|
|
- $result = $form->run($filter, 'Member_Ecoin_adjustment_list'); // 会员余额调整列表
|
|
|
|
|
|
|
+ $result = $form->run($filter, Yii::t('ctx', 'memberEcoinAdjustmentListFileName')); // 会员余额调整列表
|
|
|
if (!$result) {
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'startExporting')); // 导出开始,请到文件管理-导出文件查看
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -139,7 +139,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
public function actionChangeBalance() {
|
|
public function actionChangeBalance() {
|
|
|
if (Yii::$app->request->isPost) { // 申请变动会员余额成功
|
|
if (Yii::$app->request->isPost) { // 申请变动会员余额成功
|
|
|
- return static::edit(ChangeBalanceForm::class, 'Application for change of member balance succeeded', 'changeAdd', ['changeAdd'], null, function ($formModel, $result) {
|
|
|
|
|
|
|
+ return static::edit(ChangeBalanceForm::class, Yii::t('ctx', 'applicationChangeBalanceSucceeded'), 'changeAdd', ['changeAdd'], null, function ($formModel, $result) {
|
|
|
// $userInfo = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
// $userInfo = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// $type = BalanceAudit::TYPE[$result['TYPE']]['label'];
|
|
// $type = BalanceAudit::TYPE[$result['TYPE']]['label'];
|
|
|
// Log::adminHandle('申请调整会员' . $userInfo['USER_NAME'] . '的' . $type . '余额,金额:' . $result['AMOUNT'], 1, $userInfo['ID'], $userInfo['USER_NAME'], $result['CREATE_REMARK']);
|
|
// Log::adminHandle('申请调整会员' . $userInfo['USER_NAME'] . '的' . $type . '余额,金额:' . $result['AMOUNT'], 1, $userInfo['ID'], $userInfo['USER_NAME'], $result['CREATE_REMARK']);
|
|
@@ -168,7 +168,7 @@ class FinanceController extends BaseController {
|
|
|
$id = Yii::$app->request->get('id');
|
|
$id = Yii::$app->request->get('id');
|
|
|
$balanceAudit = BalanceAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
$balanceAudit = BalanceAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
|
if (!$balanceAudit) {
|
|
if (!$balanceAudit) {
|
|
|
- return static::notice('Data not exists', 400);
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'dataNotExists'), 400);
|
|
|
}
|
|
}
|
|
|
$balanceAudit['BASE_INFO'] = Info::baseInfoWithBalance($balanceAudit['USER_ID']);
|
|
$balanceAudit['BASE_INFO'] = Info::baseInfoWithBalance($balanceAudit['USER_ID']);
|
|
|
return static::notice(['id' => $balanceAudit['ID'], 'baseInfo' => $balanceAudit['BASE_INFO'], 'type' => $balanceAudit['TYPE'], 'dealType' => $balanceAudit['DEAL_TYPE'], 'amount' => Tool::formatPrice($balanceAudit['AMOUNT']), 'remark' => $balanceAudit['CREATE_REMARK'], 'isShow' => $balanceAudit['REMARK_IS_SHOW']]);
|
|
return static::notice(['id' => $balanceAudit['ID'], 'baseInfo' => $balanceAudit['BASE_INFO'], 'type' => $balanceAudit['TYPE'], 'dealType' => $balanceAudit['DEAL_TYPE'], 'amount' => Tool::formatPrice($balanceAudit['AMOUNT']), 'remark' => $balanceAudit['CREATE_REMARK'], 'isShow' => $balanceAudit['REMARK_IS_SHOW']]);
|
|
@@ -186,7 +186,7 @@ class FinanceController extends BaseController {
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
|
// $user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
// $user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('修改' . $user['USER_NAME'] . '调整会员余额录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('修改' . $user['USER_NAME'] . '调整会员余额录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('Modification and adjustment of member balance entry data completed'); // 修改调整会员余额录入数据完成
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'modificationAdjustmentMemberBalanceCompleted')); // 修改调整会员余额录入数据完成
|
|
|
}
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -203,7 +203,7 @@ class FinanceController extends BaseController {
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->pass()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->pass()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('审核通过' . $user['USER_NAME'] . '调整会员余额录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('审核通过' . $user['USER_NAME'] . '调整会员余额录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('The review is done through the member balance'); // 审核通过会员余额完成
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'reviewThroughMemberBalance')); // 审核通过会员余额完成
|
|
|
}
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -222,7 +222,7 @@ class FinanceController extends BaseController {
|
|
|
$userName = Info::getUserNameByUserId($value['userId']);
|
|
$userName = Info::getUserNameByUserId($value['userId']);
|
|
|
// Log::adminHandle('审核调整会员余额录入数据' . $userName . '发放' . $value['type'], 1, $value['userId'], $userName);
|
|
// Log::adminHandle('审核调整会员余额录入数据' . $userName . '发放' . $value['type'], 1, $value['userId'], $userName);
|
|
|
}*/
|
|
}*/
|
|
|
- return static::notice('Batch audit/audit reject member balance completed'); // 批量审核/审核拒绝会员余额完成
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'batchAuditMemberBalanceCompleted')); // 批量审核/审核拒绝会员余额完成
|
|
|
}
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -311,7 +311,7 @@ class FinanceController extends BaseController {
|
|
|
if (!$result) {
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'startExporting')); // 导出开始,请到文件管理-导出文件查看
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -364,7 +364,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
public function actionWithdrawAdd() {
|
|
public function actionWithdrawAdd() {
|
|
|
if (Yii::$app->request->isPost) {// 新增会员提现成功
|
|
if (Yii::$app->request->isPost) {// 新增会员提现成功
|
|
|
- return parent::edit(WithdrawForm::class, 'The newly added member successfully withdrew cash', 'addByAdmin', ['add'], null, function ($form, $result) {
|
|
|
|
|
|
|
+ return parent::edit(WithdrawForm::class, Yii::t('ctx', 'addedMemberSuccessfullyWithdrewCash'), 'addByAdmin', ['add'], null, function ($form, $result) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('申请为' . $user['USER_NAME'] . '提现' . $result['WITHDRAW_AMOUNT'], 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('申请为' . $user['USER_NAME'] . '提现' . $result['WITHDRAW_AMOUNT'], 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
});
|
|
});
|
|
@@ -384,7 +384,7 @@ class FinanceController extends BaseController {
|
|
|
$id = Yii::$app->request->get('id');
|
|
$id = Yii::$app->request->get('id');
|
|
|
$withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
$withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
|
if (!$withdraw) {
|
|
if (!$withdraw) {
|
|
|
- return static::notice('The data does not exist', 400); // 数据不存在
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'dataDoesNotExists'), 400); // 数据不存在
|
|
|
}
|
|
}
|
|
|
$withdraw['BASE_INFO'] = Info::baseInfoZh($withdraw['USER_ID']);
|
|
$withdraw['BASE_INFO'] = Info::baseInfoZh($withdraw['USER_ID']);
|
|
|
$withdraw['PLAN_PAID_AT'] = $withdraw['PLAN_PAID_AT'] ? Date::convert($withdraw['PLAN_PAID_AT']) : null;
|
|
$withdraw['PLAN_PAID_AT'] = $withdraw['PLAN_PAID_AT'] ? Date::convert($withdraw['PLAN_PAID_AT']) : null;
|
|
@@ -406,7 +406,7 @@ class FinanceController extends BaseController {
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->editByAdmin()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->editByAdmin()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('修改提现信息,ID为:' . $result['ID'], 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('修改提现信息,ID为:' . $result['ID'], 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('The withdrawal information is modified successfully.'); // 修改提现信息成功
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'withdrawalInformationModifiedSuccessfully')); // 修改提现信息成功
|
|
|
} else {
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -432,12 +432,12 @@ class FinanceController extends BaseController {
|
|
|
$userName = Info::getUserNameByUserId($k);
|
|
$userName = Info::getUserNameByUserId($k);
|
|
|
// Log::adminHandle('为会员' . $userName . '的提现流水号为' . $value . '改变提现状态至' . Withdraw::STATUS_NAME[$result['status']], 1, $k, $userName);
|
|
// Log::adminHandle('为会员' . $userName . '的提现流水号为' . $value . '改变提现状态至' . Withdraw::STATUS_NAME[$result['status']], 1, $k, $userName);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Status setting succeeded'); // 状态设置成功
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'statusSettingSucceeded')); // 状态设置成功
|
|
|
} else {
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return static::notice('Illegal request', 400); // 非法请求
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'illegalRequest'), 400); // 非法请求
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -475,11 +475,11 @@ class FinanceController extends BaseController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
$form = new FinanceExportForm();
|
|
$form = new FinanceExportForm();
|
|
|
- $result = $form->run($filter, 'Withdraw_Apply'); // 提现申请
|
|
|
|
|
|
|
+ $result = $form->run($filter, Yii::t('ctx', 'exportWithdrawApplyExcelName')); // 提现申请
|
|
|
if (!$result) {
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'startExporting')); // 导出开始,请到文件管理-导出文件查看
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -509,7 +509,7 @@ class FinanceController extends BaseController {
|
|
|
} elseif ($result === 0) {
|
|
} elseif ($result === 0) {
|
|
|
return static::notice(['finish' => true]);
|
|
return static::notice(['finish' => true]);
|
|
|
} else {
|
|
} else {
|
|
|
- return static::notice('Error:' . $errorMsg, 400);
|
|
|
|
|
|
|
+ return static::notice('Error:' . $errorMsg, 400);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -539,7 +539,7 @@ class FinanceController extends BaseController {
|
|
|
} elseif ($result === 0) {
|
|
} elseif ($result === 0) {
|
|
|
return static::notice(['finish' => true]);
|
|
return static::notice(['finish' => true]);
|
|
|
} else {
|
|
} else {
|
|
|
- return static::notice('error:' . $errorMsg, 400);
|
|
|
|
|
|
|
+ return static::notice('error:' . $errorMsg, 400);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -591,7 +591,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
public function actionInvoiceAuditAdd() {
|
|
public function actionInvoiceAuditAdd() {
|
|
|
if (Yii::$app->request->isPost) {
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(InvoiceAuditForm::class, '发票录入成功', 'addByAdmin', ['addByAdmin'], null, function ($form, $result) {
|
|
|
|
|
|
|
+ return parent::edit(InvoiceAuditForm::class, Yii::t('ctx', 'invoiceEnteredSuccessfully'), 'addByAdmin', ['addByAdmin'], null, function ($form, $result) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('申请为' . $user['USER_NAME'] . '发票录入', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('申请为' . $user['USER_NAME'] . '发票录入', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
});
|
|
});
|
|
@@ -631,7 +631,7 @@ class FinanceController extends BaseController {
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->editByAdmin()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->editByAdmin()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('修改' . $user['USER_NAME'] . '发票录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('修改' . $user['USER_NAME'] . '发票录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('修改发票录入数据完成');
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'modifyInvoiceEntryCompleted'));
|
|
|
}
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -648,7 +648,7 @@ class FinanceController extends BaseController {
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('审核' . $user['USER_NAME'] . '发票录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// Log::adminHandle('审核' . $user['USER_NAME'] . '发票录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('审核发票数据完成');
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'reviewInvoiceDataCompleted'));
|
|
|
}
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -741,11 +741,11 @@ class FinanceController extends BaseController {
|
|
|
'AUDIT_ADMIN_NAME' => 'ADMU.ADMIN_NAME',
|
|
'AUDIT_ADMIN_NAME' => 'ADMU.ADMIN_NAME',
|
|
|
]);
|
|
]);
|
|
|
$form = new FinanceExportForm();
|
|
$form = new FinanceExportForm();
|
|
|
- $result = $form->run($filter, '会员业绩调整列表');
|
|
|
|
|
|
|
+ $result = $form->run($filter, Yii::t('ctx', 'memberPerformanceAdjustmentList'));
|
|
|
if (!$result) {
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'startExporting')); // 导出开始,请到文件管理-导出文件查看
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -755,7 +755,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
public function actionPerfApply() {
|
|
public function actionPerfApply() {
|
|
|
if (\Yii::$app->request->isPost) { // 申请调整会员业绩成功
|
|
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);
|
|
// Log::adminHandle('申请调整会员' . $formModel->userName . '的' . $formModel->location . '区业绩,调整额度为:' . $formModel->amount);
|
|
|
});
|
|
});
|
|
@@ -773,11 +773,13 @@ class FinanceController extends BaseController {
|
|
|
$periodNum = Period::sentMaxPeriodNum();
|
|
$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) {
|
|
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('下一期【' . ($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');
|
|
$userName = \Yii::$app->request->get('userName');
|
|
|
if (!$userId = Info::getUserIdByUserName($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);
|
|
$perf = PerfAudit::getUserPerfAndPerfPeriod($userId, $periodNum);
|
|
|
return static::notice(array_merge(['REAL_NAME' => Info::getUserRealNameByUserId($userId)], $perf));
|
|
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');
|
|
$id = Yii::$app->request->get('id');
|
|
|
$perfAudit = PerfAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
$perfAudit = PerfAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
|
if (!$perfAudit) {
|
|
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']);
|
|
$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']]]);
|
|
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()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->pass()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('审核通过' . $user['USER_NAME'] . '调整会员业绩录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
// 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);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -829,7 +831,7 @@ class FinanceController extends BaseController {
|
|
|
$userName = Info::getUserNameByUserId($value['userId']);
|
|
$userName = Info::getUserNameByUserId($value['userId']);
|
|
|
// Log::adminHandle('审核调整会员业绩录入数据' . $userName, 1, $value['userId'], $userName);
|
|
// 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);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -877,7 +879,7 @@ class FinanceController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
public function actionDealTypeAdd() {
|
|
public function actionDealTypeAdd() {
|
|
|
if (Yii::$app->request->isPost) {
|
|
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('交易类型录入');
|
|
// Log::adminHandle('交易类型录入');
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -892,7 +894,7 @@ class FinanceController extends BaseController {
|
|
|
$id = Yii::$app->request->get('id');
|
|
$id = Yii::$app->request->get('id');
|
|
|
$dealType = DealType::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
$dealType = DealType::findOneAsArray('ID=:ID', [':ID' => $id]);
|
|
|
if (!$dealType) {
|
|
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']]);
|
|
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';
|
|
$formModel->scenario = 'edit';
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
|
// Log::adminHandle('修改交易类型');
|
|
// Log::adminHandle('修改交易类型');
|
|
|
- return static::notice('修改交易类型完成');
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'modifyTransactionTypeCompleted'));
|
|
|
}
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
}
|
|
@@ -920,7 +922,7 @@ class FinanceController extends BaseController {
|
|
|
* @throws \yii\web\HttpException
|
|
* @throws \yii\web\HttpException
|
|
|
*/
|
|
*/
|
|
|
public function actionDealTypeDelete() {
|
|
public function actionDealTypeDelete() {
|
|
|
- return static::notice('无法删除', 400);
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'unableDelete'), 400);
|
|
|
$result = static::delete(DealType::class, null, function ($selected) {
|
|
$result = static::delete(DealType::class, null, function ($selected) {
|
|
|
DealTypeForm::delete($selected);
|
|
DealTypeForm::delete($selected);
|
|
|
// Log::adminHandle('删除交易类型');
|
|
// Log::adminHandle('删除交易类型');
|
|
@@ -955,7 +957,7 @@ class FinanceController extends BaseController {
|
|
|
} elseif ($result === 0) {
|
|
} elseif ($result === 0) {
|
|
|
return static::notice(['finish' => true]);
|
|
return static::notice(['finish' => true]);
|
|
|
} else {
|
|
} else {
|
|
|
- return static::notice('发生错误:' . $errorMsg, 400);
|
|
|
|
|
|
|
+ return static::notice($errorMsg, 400);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -985,7 +987,7 @@ class FinanceController extends BaseController {
|
|
|
} elseif ($result === 0) {
|
|
} elseif ($result === 0) {
|
|
|
return static::notice(['finish' => true]);
|
|
return static::notice(['finish' => true]);
|
|
|
} else {
|
|
} else {
|
|
|
- return static::notice('发生错误:' . $errorMsg, 400);
|
|
|
|
|
|
|
+ return static::notice($errorMsg, 400);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1082,7 +1084,7 @@ class FinanceController extends BaseController {
|
|
|
if (!$result) {
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'startExporting')); // 导出开始,请到文件管理-导出文件查看
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1128,7 +1130,7 @@ class FinanceController extends BaseController {
|
|
|
if (!$result) {
|
|
if (!$result) {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
}
|
|
|
- return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
|
|
|
|
|
|
|
+ return static::notice(Yii::t('ctx', 'startExporting')); // 导出开始,请到文件管理-导出文件查看
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1149,13 +1151,16 @@ class FinanceController extends BaseController {
|
|
|
$userName = Info::getUserNameByUserId($k);
|
|
$userName = Info::getUserNameByUserId($k);
|
|
|
// Log::adminHandle('为会员' . $userName . '的充值流水号为' . $value . '改变充值状态至' . Recharge::STATUS_NAME[$result['status']], 1, $k, $userName);
|
|
// 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 {
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
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]);
|
|
return static::notice(['statusArray' => $statusArray]);
|
|
|
}
|
|
}
|
|
|
|
|
|