Your Name há 3 anos atrás
pai
commit
cdf4916f7c

+ 2 - 0
tool/clue/database/follow.php

@@ -10,6 +10,7 @@ $status = array
 (
     1 => '显示',
     2 => '不显示',
+    3 => '不显示算次数'
 );
 return array
 (
@@ -193,6 +194,7 @@ return array
                 'info_id' => 'yes',
                 'status' => 1,
                 'state' => 1,
+                'status' => array('yes','in'),
             ),
             'type' => 'count',
             // 'order' => array('id' => 'asc'),

+ 11 - 0
tool/clue/database/info.php

@@ -99,6 +99,12 @@ $excel[] = array('数据导出','线索列表数据导出', 'clue/lib/manage.out
 $button = array();
 $button['线索导入'] = array('fast','','import&project=clue&call=clue/lib/manage.import');
 $col = Dever::input('col');
+$mul = false;
+// if (Dever::load('manage/auth')->checkFunc('menu_61.menu_85', 'piliangfafang', '批量收货')) {
+    // $mul = '({type} < 4 || {type} > 5)';
+// } elseif (Dever::load('manage/auth')->checkFunc('menu_61.menu_218', 'piliangfafang', '批量收货')) {
+//     $mul = '({status} == 4 || {status} == 2) && {shop_type} == 2';
+// }
 return array
 (
     # 表名
@@ -112,12 +118,14 @@ return array
     'start' => array
     (
     	'insert' => 'clue/lib/info.insertInfo',
+    	// 'updatemul' => 'clue/lib/info.setInfoFollow',
     	// 'update' => 'clue/lib/info.insertInfo',
     ),
     'end' => array
     (
         'insert' => 'clue/lib/info.updateInfo',
         'update' => 'clue/lib/info.updateInfo',
+        // 'updatemul' => 'clue/lib/info.setInfoFollow',
     ),
     'config_type' => $type,
     'config_sex'  => $sex,
@@ -406,6 +414,8 @@ return array
             // $salepeople,
             'list_name' => '跟进人',
             'list'      => 'Dever::load("clue/lib/info.getNum#people",{id})',
+            // 'mul'   => true,
+            // 'mul_option' => Dever::url('lib/salepeople.get?level_total=2', 'clue'),
         ),
 
 
@@ -572,6 +582,7 @@ return array
         // 'data' => $data,
         'button' => $button,
         'excel'  => $excel,
+        'mul' =>$mul,
         # 设置公司权限
         'company' => 'company_id',
     ),

+ 20 - 9
tool/clue/lib/Info.php

@@ -29,7 +29,7 @@ Class Info
 		$html['area'] = $area;
 		$html['time'] = date('Y.m.d H:i',$info['cdate']).$info['gdate'];
 		$html['user'] = $info['name'].'<br/>'.$info['mobile'];
-		$data= Dever::db('clue/follow')->getCount(array('info_id'=>$id));
+		$data= Dever::db('clue/follow')->getCount(array('info_id'=>$id,'status'=>'1,3'));
 		$follow = Dever::db('clue/follow')->find(array('info_id'=>$id,'status'=>1));
 		if ($follow){
 			if ($follow['xdate']) {
@@ -149,18 +149,29 @@ Class Info
 						} 
 					}
 				}
-
-				
-				$w['admin_id'] = $where['follow'];
+				// $w['admin_id'] = $where['follow'];
+				// $w['info_id'] = $id;
+				// if ($where['type'] == 3) {
+				// 	$w['status'] = 3;
+				// } else {
+				// 	$w['status'] = 2;
+				// }
+				// $ids = Dever::db('clue/follow')->insert($w);
+				// if ($ids) {
+				// 	$where['follow_id'] = $ids;
+				// } 
+			}
+			$w['admin_id'] = $where['follow'];
 				$w['info_id'] = $id;
-				$w['status'] = 2;
+				if ($where['type'] == 3) {
+					$w['status'] = 3;
+				} else {
+					$w['status'] = 2;
+				}
 				$ids = Dever::db('clue/follow')->insert($w);
 				if ($ids) {
 					$where['follow_id'] = $ids;
 				} 
-			}
-			
-			
 			if (!$info['clue_num']) {
 				$where['clue_num'] = $this->getClueNum();
 			}
@@ -298,7 +309,7 @@ Class Info
 		$data['info']['people'] = $this->group_admin($data['info']['company_id'],$branch[0],$branch[1]);
 		
 		$follow = 0;
-		$follow = Dever::db('clue/follow')->getCount(array('info_id'=>$id));
+		$follow = Dever::db('clue/follow')->getCount(array('info_id'=>$id,'status'=>'1,3'));
 		if ($data['info']['num'] && $data['info']['num']>0) {
 			$data['info']['cishu'] = $data['info']['num'].'次'; 
 		} else {

+ 1 - 1
tool/clue/lib/Manage.php

@@ -34,7 +34,7 @@ Class Manage
 			if ($v['num'] && $v['num'] > 0) {
 				$num = $v['num'];
 			} else {
-				$num = Dever::db('clue/follow')->getCount(array('info_id'=>$v['id']));
+				$num = Dever::db('clue/follow')->getCount(array('info_id'=>$v['id'],'status'=>'1,3'));
 			}
 			$area = '';
 			if ($v['area']) {