|
@@ -67,18 +67,18 @@ class refill_evidenceControl extends SystemControl
|
|
|
->select();
|
|
|
$success_amount = $send_amount = $cancel_amount = $mch_amount = $system_amount = $system_edit_amount = 0;
|
|
|
foreach ($counts as $count) {
|
|
|
- if($count['status'] == 1) {
|
|
|
+ if($count['status'] == merchantModel::status_applying) {
|
|
|
$send_amount += $count['amounts'];
|
|
|
- }elseif ($count['status'] == 2) {
|
|
|
+ }elseif ($count['status'] == merchantModel::status_passed) {
|
|
|
$success_amount += $count['amounts'];
|
|
|
- if($count['add_type'] == 1) {
|
|
|
+ if($count['add_type'] == merchantModel::type_mch_deposit) {
|
|
|
$mch_amount += $count['amounts'];
|
|
|
- }elseif ($count['add_type'] == 2) {
|
|
|
+ }elseif ($count['add_type'] == merchantModel::type_adm_deposit) {
|
|
|
$system_amount += $count['amounts'];
|
|
|
- }elseif ($count['add_type'] == 3) {
|
|
|
+ }elseif ($count['add_type'] == merchantModel::type_adm_adjust) {
|
|
|
$system_edit_amount += $count['amounts'];
|
|
|
}
|
|
|
- }elseif ($count['status'] == 3) {
|
|
|
+ }elseif ($count['status'] == merchantModel::status_denied) {
|
|
|
$cancel_amount += $count['amounts'];
|
|
|
}
|
|
|
}
|
|
@@ -107,9 +107,12 @@ class refill_evidenceControl extends SystemControl
|
|
|
|
|
|
public function formatData($data, $merchant_list)
|
|
|
{
|
|
|
- $status_text = ['申请中', '已通过', '已驳回'];
|
|
|
- $operation_text = ['未预存', '已预存'];
|
|
|
- $add_type_text = ['商户预存', '后台手动预存', '后台手动调款', '余额找平', '平台转款'];
|
|
|
+ $status_text = [merchantModel::status_applying =>'申请中', merchantModel::status_passed => '已通过', merchantModel::status_denied => '已驳回'];
|
|
|
+ $operation_text = [merchantModel::oper_undeposited => '未预存', merchantModel::oper_deposited => '已预存'];
|
|
|
+ $add_type_text = [
|
|
|
+ merchantModel::type_mch_deposit => '商户预存', merchantModel::type_adm_deposit => '后台手动预存', merchantModel::type_adm_adjust => '后台手动调款',
|
|
|
+ merchantModel::type_adm_finpos => '余额找平', merchantModel::type_mch_transfer => '平台转款', merchantModel::type_refund_back => '订单返销'
|
|
|
+ ];
|
|
|
$is_bank_text = ['否','是'];
|
|
|
|
|
|
$merchants = [];
|
|
@@ -119,9 +122,9 @@ class refill_evidenceControl extends SystemControl
|
|
|
foreach ($data as $key => $value) {
|
|
|
$data[$key]['add_time'] = date('Y-m-d H:i', $value['add_time']);
|
|
|
$data[$key]['check_time'] = !empty($value['check_time']) ? date('Y-m-d H:i', $value['check_time']) : '/';
|
|
|
- $data[$key]['status_text'] = $status_text[$value['status']-1];
|
|
|
- $data[$key]['operation_text'] = $operation_text[$value['is_operation']-1];
|
|
|
- $data[$key]['add_type_text'] = $add_type_text[$value['add_type']-1];
|
|
|
+ $data[$key]['status_text'] = $status_text[$value['status']];
|
|
|
+ $data[$key]['operation_text'] = $operation_text[$value['is_operation']];
|
|
|
+ $data[$key]['add_type_text'] = $add_type_text[$value['add_type']];
|
|
|
$data[$key]['is_bank_text'] = $is_bank_text[$value['is_bank']];
|
|
|
$data[$key]['company_name'] = $merchants[$value['mchid']]['company_name'] ?? $merchants[$value['mchid']]['name'];
|
|
|
}
|