diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index b838257a9..7bebcf677 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -346,7 +346,6 @@ class StatementMangementController extends ThinkController ') ->where($map) ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select(); - if ($list) { $record = []; foreach ($list as $item) { @@ -529,12 +528,14 @@ class StatementMangementController extends ThinkController $this->success('保存成功', U('StatementMangement/rewardManageList')); } } else { + $data['create_time'] = time(); $data['creater_id'] = is_login(); $ins = M('reward_record', 'tab_')->add($data); + $record_id = M('reward_record', 'tab_')->getLastInsID(); foreach ($settlmentSet as $item) { - $item['record_id'] = M('reward_record', 'tab_')->getLastInsID(); + $item['record_id'] = $record_id; M('reward_detail', 'tab_')->add($item); } diff --git a/Application/Admin/View/StatementMangement/rewardManageList.html b/Application/Admin/View/StatementMangement/rewardManageList.html index 52785a868..229298338 100644 --- a/Application/Admin/View/StatementMangement/rewardManageList.html +++ b/Application/Admin/View/StatementMangement/rewardManageList.html @@ -125,7 +125,7 @@