|
|
|
@ -154,7 +154,11 @@ class StatementMangementController extends ThinkController
|
|
|
|
|
$insert['second_party_info'] = json_encode($second_party_info);
|
|
|
|
|
$insert['statement_info'] = json_encode($statement_info);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!(M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->find())) {
|
|
|
|
|
|
|
|
|
|
addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
|
|
|
|
|
|
|
|
|
|
M('statement','tab_')->add($insert);
|
|
|
|
|
$this->ajaxReturn(['code'=>1, 'msg'=>'生成结算单成功']);
|
|
|
|
|
} else {
|
|
|
|
@ -211,6 +215,9 @@ class StatementMangementController extends ThinkController
|
|
|
|
|
$insert['statement_info'] = json_encode($statement_info);
|
|
|
|
|
|
|
|
|
|
if ((M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->save($insert))) {
|
|
|
|
|
|
|
|
|
|
addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
|
|
|
|
|
|
|
|
|
|
$this->ajaxReturn(['code'=>1, 'msg'=>'结算单编辑成功']);
|
|
|
|
|
} else {
|
|
|
|
|
$this->ajaxReturn(['code'=>0, 'msg'=>'结算单编辑失败']);
|
|
|
|
|