推广员日志记录添加

master
zhengyongxing 5 years ago
parent 3c628fa1c6
commit 5e794bd785

@ -139,6 +139,9 @@ class PresidentDepositController extends ThinkController
'status_text' => '押金状态',
'pay_confirm_time' => '押金确认时间',
];
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出会长押金记录','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-奖罚记录管理-导出会长押金记录']);
data2csv($records, '会长押金记录', $field);
exit;
}
@ -199,7 +202,9 @@ class PresidentDepositController extends ThinkController
$payer = I('payer', '');
$record = M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->find();
$promoteData = M('promote', 'tab_')->field('account')->where(['id' => $promoteId])->find();
if (!$record) {
if ($payType == 0) {
@ -230,6 +235,9 @@ class PresidentDepositController extends ThinkController
$data['create_time'] = time();
$data['update_time'] = time();
M('president_deposit', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']);
return $this->success('保存成功', U('PresidentDeposit/records'));
}
@ -262,6 +270,9 @@ class PresidentDepositController extends ThinkController
$data['payer'] = $payer;
$data['update_time'] = time();
M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->save($data);
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']);
return $this->success('保存成功');
}
@ -291,6 +302,11 @@ class PresidentDepositController extends ThinkController
$data['create_time'] = time();
$data['update_time'] = time();
M('president_deposit', 'tab_')->add($data);
$promoteData = M('promote', 'tab_')->field('account')->where(['id' => $promoteId])->find();
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'],'op_name'=>'编辑无需押金','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-无需押金']);
}
$this->ajaxReturn([
'status' => 1,
@ -323,6 +339,20 @@ class PresidentDepositController extends ThinkController
]);
}
$promoteData = M('promote','tab_')
->field('account,amount')
->join('left join tab_president_deposit on tab_president_deposit.promote_id=tab_promote.id')
->where(['tab_promote.id'=>['in', $promoteIds]])
->select();
// dump($promoteData);die();
foreach ($promoteData as $key => $value) {
if ($value['amount']) {
addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']);
}
}
M('president_deposit', 'tab_')->where(['promote_id' => ['in', $promoteIds]])->save([
'status' => 2,
@ -358,6 +388,22 @@ class PresidentDepositController extends ThinkController
'message' => '含有非待确认状态记录,不可批量操作'
]);
}
$promoteData = M('promote','tab_')
->field('account,amount')
->join('left join tab_president_deposit on tab_president_deposit.promote_id=tab_promote.id')
->where(['tab_promote.id'=>['in', $promoteIds]])
->select();
// dump($promoteData);die();
foreach ($promoteData as $key => $value) {
if ($value['amount']) {
addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']);
}
}
M('president_deposit', 'tab_')->where(['promote_id' => ['in', $promoteIds]])->save([
'status' => 1,
'pay_confirm_time' => time(),

@ -192,6 +192,9 @@ class QueryController extends ThinkController
'selle_ratio' => '分成比例',
'settlement_amount' => '结算金额',
];
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广结算单','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-推广结算']);
data2csv($data,"推广结算", $field);
exit;
}
@ -296,6 +299,9 @@ class QueryController extends ThinkController
'status_text' => '提现状态',
'respond' => '说明',
];
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广结算记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-推广结算']);
data2csv($data,"推广结算", $field);
exit;
}
@ -1832,6 +1838,21 @@ class QueryController extends ThinkController
if ($result === false) {
$this->error('操作失败');
} else {
$promoteAccount = M('promote','tab_')->field('account')->where($map)->select();
foreach($promoteAccount as $key => $value) {
if ($autoStatus == 1) {
$text = '开启自动审核';
} else {
$text = '关闭自动审核';
}
addOperationLog(['op_type'=>1,'key'=>$value['account'],'op_name'=>$text,'url'=>U('Query/autoReview'),'menu'=>'推广员-结算单管理-推广提现-'.$text]);
}
$this->success('操作成功');
}
} else {

@ -323,12 +323,18 @@ class StatementMangementController extends ThinkController
if ($upt === false) {
$this->error('保存失败');
} else {
addOperationLog(['op_type'=>1,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$this->success('保存成功', U('StatementMangement/rewardManageList'));
}
} else {
$data['create_time'] = time();
$data['creater_id'] = is_login();
$ins = M('reward_record', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
return $ins ? $this->success('新增成功', U('StatementMangement/rewardManageList')) : $this->error('新增失败');
}
} else {
@ -336,7 +342,13 @@ class StatementMangementController extends ThinkController
$this->assign('games', $games);
if ($id) {
if (I('delete')) {
$rewardRecordData = M('reward_record', 'tab_')->where(['id'=>$id])->find();
$upt = M('reward_record', 'tab_')->where(['id'=>$id])->delete();
addOperationLog(['op_type'=>2,'key'=>$rewardRecordData['reward_type'].$rewardRecordData['company_type'].$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
return $upt ? $this->success('删除成功') : $this->error('删除失败');
} else {
$data = M('reward_record', 'tab_')->where(['id'=>$id])->find();

@ -88,7 +88,7 @@
<th >操作IP地址</th>
<th >操作</th>
<!-- <th >操作</th>-->
</tr>
</thead>
<!-- 列表 -->
@ -112,7 +112,7 @@
<td >{$data.account}</td>
<td >{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td >{$data.ip}</td>
<td ><a class="confirm del" data-id="{$data.id}">删除</a></td>
<!-- <td ><a class="confirm del" data-id="{$data.id}">删除</a></td>-->
</tr>
</volist>
</notemtpy>

@ -89,7 +89,7 @@
<th >操作IP地址</th>
<th >操作</th>
<!-- <th >操作</th>-->
</tr>
</thead>
<!-- 列表 -->
@ -113,7 +113,7 @@
<td >{$data.admin_account}</td>
<td >{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td >{$data.op_ip}</td>
<td ><a class="confirm del" data-id="{$data.id}">删除</a></td>
<!-- <td ><a class="confirm del" data-id="{$data.id}">删除</a></td>-->
</tr>
</volist>
</notemtpy>

Loading…
Cancel
Save