diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index a6a473368..2f96fe607 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -155,8 +155,11 @@ class PartnerController extends ThinkController $value['settlement_type'] = '月结'; } $value['company_type'] = $value['company_type'] == 2 ? '个人' : '公司'; - $value['contract_time'] = time_format($value['contract_start_time'], 'Y/m/d') . '-' . - time_format($value['contract_end_time'], 'Y/m/d'); + $contract_start_time = $value['contract_start_time'] ? + time_format($value['contract_start_time'], 'Y/m/d') : '-'; + $contract_end_time = $value['contract_end_time'] ? + time_format($value['contract_end_time'], 'Y/m/d') : '-'; + $value['contract_time'] = $contract_start_time . '-' . $contract_end_time; $row2 = array_sum(array_column($value['game'], 'row')) ; $value['row'] = empty($row2) ? 1: $row2; $parseData[$value['partner_id']][] = $value; @@ -374,8 +377,12 @@ class PartnerController extends ThinkController if (empty($data)) { $this->error('数据异常', U('lists')); } - $data['contract_start_time'] = date('Y-m-d', $data['contract_start_time']); - $data['contract_end_time'] = date('Y-m-d', $data['contract_end_time']); + if ($data['contract_start_time']) { + $data['contract_start_time'] = date('Y-m-d', $data['contract_start_time']); + } + if ($data['contract_end_time']) { + $data['contract_end_time'] = date('Y-m-d', $data['contract_end_time']); + } $data['channel_rate'] *= 100;//存的是小数,显示百分比 $data['invoice_rate'] *= 100;//存的是小数,显示百分比 // dd($data); diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 4714782a8..6ad7ab8af 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -259,7 +259,7 @@ class StatementMangementController extends ThinkController $item['reward_type_desc'] = $item['reward_type'] == 1 ? "奖励" : "惩罚"; $item['company_type_desc'] = $item['company_type'] == 1 ? "上游公司" : "下游公司"; $item['relation_game_name'] = $games[$item['relation_game_id']]; - $item['reward_time'] = date('Y-m-d H:i:s', $item['reward_time']); + $item['reward_time'] = $item['reward_time'] ? date('Y-m-d H:i:s', $item['reward_time']) : '-'; // if ($item['company_type'] == 1) { // } else { diff --git a/Application/Admin/View/StatementMangement/rewardManageList.html b/Application/Admin/View/StatementMangement/rewardManageList.html index 8ac38dd30..43eebf417 100644 --- a/Application/Admin/View/StatementMangement/rewardManageList.html +++ b/Application/Admin/View/StatementMangement/rewardManageList.html @@ -153,7 +153,7 @@ {$data.content} {$data.money} {$data.remark} - {:date('Y-m-d H:i:s',$data['reward_time'])} + {$data['reward_time']} {:get_admin_nickname($data['creater_id'])} 编辑 diff --git a/Application/Admin/View/StatementMangement/rewardManageSave.html b/Application/Admin/View/StatementMangement/rewardManageSave.html index 885bb6c85..f36b33eff 100644 --- a/Application/Admin/View/StatementMangement/rewardManageSave.html +++ b/Application/Admin/View/StatementMangement/rewardManageSave.html @@ -63,7 +63,7 @@
-
奖惩编辑
+
奖惩编辑 新增