|
|
@ -139,6 +139,9 @@ class PresidentDepositController extends ThinkController
|
|
|
|
'status_text' => '押金状态',
|
|
|
|
'status_text' => '押金状态',
|
|
|
|
'pay_confirm_time' => '押金确认时间',
|
|
|
|
'pay_confirm_time' => '押金确认时间',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出会长押金记录','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-奖罚记录管理-导出会长押金记录']);
|
|
|
|
|
|
|
|
|
|
|
|
data2csv($records, '会长押金记录', $field);
|
|
|
|
data2csv($records, '会长押金记录', $field);
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -200,6 +203,8 @@ class PresidentDepositController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
$record = M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->find();
|
|
|
|
$record = M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->find();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$promoteData = M('promote', 'tab_')->field('account')->where(['id' => $promoteId])->find();
|
|
|
|
|
|
|
|
|
|
|
|
if (!$record) {
|
|
|
|
if (!$record) {
|
|
|
|
|
|
|
|
|
|
|
|
if ($payType == 0) {
|
|
|
|
if ($payType == 0) {
|
|
|
@ -230,6 +235,9 @@ class PresidentDepositController extends ThinkController
|
|
|
|
$data['create_time'] = time();
|
|
|
|
$data['create_time'] = time();
|
|
|
|
$data['update_time'] = time();
|
|
|
|
$data['update_time'] = time();
|
|
|
|
M('president_deposit', 'tab_')->add($data);
|
|
|
|
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'));
|
|
|
|
return $this->success('保存成功', U('PresidentDeposit/records'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -262,6 +270,9 @@ class PresidentDepositController extends ThinkController
|
|
|
|
$data['payer'] = $payer;
|
|
|
|
$data['payer'] = $payer;
|
|
|
|
$data['update_time'] = time();
|
|
|
|
$data['update_time'] = time();
|
|
|
|
M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->save($data);
|
|
|
|
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('保存成功');
|
|
|
|
return $this->success('保存成功');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -291,6 +302,11 @@ class PresidentDepositController extends ThinkController
|
|
|
|
$data['create_time'] = time();
|
|
|
|
$data['create_time'] = time();
|
|
|
|
$data['update_time'] = time();
|
|
|
|
$data['update_time'] = time();
|
|
|
|
M('president_deposit', 'tab_')->add($data);
|
|
|
|
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([
|
|
|
|
$this->ajaxReturn([
|
|
|
|
'status' => 1,
|
|
|
|
'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([
|
|
|
|
M('president_deposit', 'tab_')->where(['promote_id' => ['in', $promoteIds]])->save([
|
|
|
|
'status' => 2,
|
|
|
|
'status' => 2,
|
|
|
@ -358,6 +388,22 @@ class PresidentDepositController extends ThinkController
|
|
|
|
'message' => '含有非待确认状态记录,不可批量操作'
|
|
|
|
'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([
|
|
|
|
M('president_deposit', 'tab_')->where(['promote_id' => ['in', $promoteIds]])->save([
|
|
|
|
'status' => 1,
|
|
|
|
'status' => 1,
|
|
|
|
'pay_confirm_time' => time(),
|
|
|
|
'pay_confirm_time' => time(),
|
|
|
|