|
@@ -419,10 +419,13 @@ class Member
|
|
|
);
|
|
|
}
|
|
|
// if (Dever::load('manage/auth')->checkFunc('agent.member','setmessage','发送短信')) {
|
|
|
+ // $table = 'template';
|
|
|
+ // $res = Dever::load('sms/api')->getTable($table);
|
|
|
// $button[2]['btn'][] = array
|
|
|
// (
|
|
|
// 'type' => 'edit',
|
|
|
- // 'link' => Dever::url('project/database/update?project=sms&table=template&search_option_state=1&search_option_type=daili_reg_yes,daili_reg_no,daili_goods_no,daili_tixian_yes,daili_tixian_no,daili_hetong_no&search_option_name='.$member['name'].'&search_option_mobile='.$member['mobile'], 'manage'),
|
|
|
+
|
|
|
+ // 'link' => Dever::url($res.'&search_option_state=1&search_option_type=daili_reg_yes,daili_reg_no,daili_goods_no,daili_tixian_yes,daili_tixian_no,daili_hetong_no&search_option_name='.$member['name'].'&search_option_mobile='.$member['mobile'], 'manage'),
|
|
|
// 'name' => '发送短信',
|
|
|
// );
|
|
|
// }
|
|
@@ -668,7 +671,18 @@ class Member
|
|
|
}
|
|
|
#新增业绩(去掉直推最大一组市场,其他小组市场新增业绩之和)
|
|
|
public function new_money_api($id){
|
|
|
- $info = Dever::db('agent/member')->getNewParent(array('parent_mid'=>$id,'state'=>1));
|
|
|
+ $start = Dever::input('search_option_start_dever_time');
|
|
|
+ $end = Dever::input('search_option_end_dever_time');
|
|
|
+ $where = array();
|
|
|
+ if($start){
|
|
|
+ $where['start'] = $start;
|
|
|
+ }
|
|
|
+ if($end){
|
|
|
+ $where['end'] = $end;
|
|
|
+ }
|
|
|
+ $where['parent_mid'] = $id;
|
|
|
+ $where['state'] = 1;
|
|
|
+ $info = Dever::db('agent/member')->getNewParent($where);
|
|
|
$temp = array();
|
|
|
$sell = 0;
|
|
|
foreach ($info as $key => $val) {
|
|
@@ -676,13 +690,79 @@ class Member
|
|
|
$sell += $val['group_sell'];
|
|
|
}
|
|
|
if($temp && isset($info['title_id'])){
|
|
|
- if($info['title_id'] == 4 || $info['title_id'] == 5){
|
|
|
+ // if($info['title_id'] == 4 || $info['title_id'] == 5){
|
|
|
$total = sprintf ('%01.2f',$sell - max($temp));
|
|
|
- }
|
|
|
+ // }
|
|
|
|
|
|
}else{
|
|
|
$total = sprintf ('%01.2f',$sell);
|
|
|
}
|
|
|
return $total;
|
|
|
}
|
|
|
+ #新增正常业绩
|
|
|
+ public function new_zmoney_api($id){
|
|
|
+ $start = Dever::input('search_option_start_dever_time');
|
|
|
+ $end = Dever::input('search_option_end_dever_time');
|
|
|
+ $where = array();
|
|
|
+ if($start){
|
|
|
+ $where['start'] = $start;
|
|
|
+ }
|
|
|
+ if($end){
|
|
|
+ $where['end'] = $end;
|
|
|
+ }
|
|
|
+ $where['parent_mid'] = $id;
|
|
|
+ $where['state'] = 1;
|
|
|
+ $info = Dever::db('agent/member')->getNewParent($where);
|
|
|
+ $sell = 0;
|
|
|
+ foreach ($info as $key => $val) {
|
|
|
+ $sell += $val['group_sell'];
|
|
|
+ }
|
|
|
+ $total = sprintf ('%01.2f',$sell);
|
|
|
+ return $total;
|
|
|
+ }
|
|
|
+ #直推业绩
|
|
|
+ public function new_sell($id){
|
|
|
+ $start = Dever::input('search_option_start_dever_time');
|
|
|
+ $end = Dever::input('search_option_end_dever_time');
|
|
|
+ // print_R($start);die;
|
|
|
+ $where = array();
|
|
|
+ if($start){
|
|
|
+ $where['start'] = $start;
|
|
|
+ }
|
|
|
+ if($end){
|
|
|
+ $where['end'] = $end;
|
|
|
+ }
|
|
|
+ $where['parent_mid'] = $id;
|
|
|
+ $where['state'] = 1;
|
|
|
+ // print_R($where);die;
|
|
|
+ $info = Dever::db('agent/member')->getNewParent($where);
|
|
|
+ $sell = 0;
|
|
|
+ foreach ($info as $key => $val) {
|
|
|
+ $sell += $val['sell'];
|
|
|
+ }
|
|
|
+ $total = sprintf ('%01.2f',$sell);
|
|
|
+ return $total;
|
|
|
+ }
|
|
|
+ #团队业绩
|
|
|
+ public function new_groupsell($id){
|
|
|
+ $start = Dever::input('search_option_start_dever_time');
|
|
|
+ $end = Dever::input('search_option_end_dever_time');
|
|
|
+ $where = array();
|
|
|
+ #agent/order;
|
|
|
+ if($start){
|
|
|
+ $where['start'] = $start;
|
|
|
+ }
|
|
|
+ if($end){
|
|
|
+ $where['end'] = $end;
|
|
|
+ }
|
|
|
+ $where['parent_mid'] = $id;
|
|
|
+ $where['state'] = 1;
|
|
|
+ $info = Dever::db('agent/member')->getNewParent($where);
|
|
|
+ $sell = 0;
|
|
|
+ foreach ($info as $key => $val) {
|
|
|
+ $sell += $val['group_sell'];
|
|
|
+ }
|
|
|
+ $total = sprintf ('%01.2f',$sell);
|
|
|
+ return $total;
|
|
|
+ }
|
|
|
}
|