Your Name 3 năm trước cách đây
mục cha
commit
dc0980e64f
2 tập tin đã thay đổi với 26 bổ sung14 xóa
  1. 1 1
      tool/clue/assets/pc/html/index.html
  2. 25 13
      tool/clue/lib/Info.php

+ 1 - 1
tool/clue/assets/pc/html/index.html

@@ -237,7 +237,7 @@ body{
 			<button class="btn btn-default layui-btn layuiadmin-btn-list"  " type="button" style="vertical-align: middle;margin-bottom: 2px;" onclick="fastEdit($(this),'<{$jichu}>')">修改基础信息</button>
             <{endif}>
             <button class="btn btn-default layui-btn layuiadmin-btn-list" id="quxiao" style="vertical-align: middle;margin-bottom: 2px;" onclick="fastEdit($(this),'<{$ke}>')">客户等级调整</button>
-            <{if($info['status_id']<5):}>
+            <{if($info['status_id']<5 || $info['status_id'] ==7):}>
 			<button class="btn btn-default layui-btn layuiadmin-btn-list" id="quxiao" style="vertical-align: middle;margin-bottom: 2px;" onclick="fastEdit($(this),'<{$gen}>')">跟进线索</button>
 		    <button class="btn btn-default layui-btn layuiadmin-btn-list" id="quxiao" style="vertical-align: middle;margin-bottom: 2px;" onclick="fastEdit($(this),'<{$pai}>')">转派跟进人</button>
              <button class="btn btn-default layui-btn layuiadmin-btn-list" id="huifu" style="vertical-align: middle;margin-bottom: 2px;" onclick="fastEdit($(this),'<{$status}>')">线索状态调整</button>

+ 25 - 13
tool/clue/lib/Info.php

@@ -64,7 +64,29 @@ Class Info
 		$where['userset_id'] = Dever::param('userset_id',$data);
 		$info = Dever::db('clue/info')->find($id);
 		$where['where_id'] = $id;
+
+		if ($where['status_id'] == 1) {
+				$where['type'] = 1;
+			} elseif ($where['status_id'] == 2) {
+				$where['type'] = 2;
+			} elseif ($where['status_id'] > 2 && $where['status_id'] <= 4) {
+				$where['type'] = 3;
+			} else if ($where['status_id'] == 5) {
+				$where['type'] = 4;
+			} else if ($where['status_id'] == 6) {
+				$where['type'] = 5;
+			} else if ($where['status_id'] == 7) {
+				$where['type'] = 6;
+			}
+
 		if ($follow && $follow[0]>0 ) {
+			$fgroup_admin = implode(',',$follow);
+			$follow_info = Dever::db('clue/follow')->find(array('info_id'=>$id,'follow_admin_id'=>$fgroup_admin));
+			if ($follow_info) {
+				$where['type'] = 3;
+			} else {
+				$where['type'] = 2;
+			}
 			$where['follow'] = $follow;
 			if ($info['follow_group_id'] && $info['follow_group_id']!=$follow[0]) {
 				$where['follow_group_id'] = $follow[0];
@@ -89,6 +111,7 @@ Class Info
 		}
 		if ($info) {
 			if ($follow && $follow[0]<0) {
+				$where['type'] = 2;
 				$auth = Dever::load("manage/auth.info");
 				$admin_group = Dever::db('manage/admin_group')->all(array('admin_id'=>$auth['id']));
 				foreach ($admin_group as $k => $v) {
@@ -127,19 +150,7 @@ Class Info
 				} 
 			}
 			
-			if ($where['status_id'] == 1) {
-				$where['type'] = 1;
-			} elseif ($where['status_id'] == 2) {
-				$where['type'] = 2;
-			} elseif ($where['status_id'] > 2 && $where['status_id'] <= 4) {
-				$where['type'] = 3;
-			} else if ($where['status_id'] == 5) {
-				$where['type'] = 4;
-			} else if ($where['status_id'] == 6) {
-				$where['type'] = 5;
-			} else if ($where['status_id'] == 7) {
-				$where['type'] = 6;
-			}
+			
 			if (!$info['clue_num']) {
 				$where['clue_num'] = $this->getClueNum();
 			}
@@ -169,6 +180,7 @@ Class Info
 			$where['gdate'] = time();
 			$where['day']= $follow['xdate'];
 			$where['num'] = $info['num']+1;
+			$where['type'] = 3;
 			Dever::db('clue/info')->update($where);
 			$w['where_id'] = $id;
 			$w['follow_admin_id'] = $info['follow'];