Browse Source

分支合并

lianbingjie 5 years ago
parent
commit
6554fba564

+ 3 - 2
core/src/qfw/filter/sessfilter.go

@@ -7,10 +7,11 @@ session过滤器
 package filter
 
 import (
-	"github.com/go-xweb/xweb"
 	"net/http"
 	"qfw/util"
 	"regexp"
+
+	"github.com/go-xweb/xweb"
 )
 
 //session过滤器
@@ -36,7 +37,7 @@ func (s *sessfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 			ut := util.IntAllDef(userType, -1)
 
 			if cr.String() == "/manage/" {
-				if ut == 0 {
+				if ut <= 0 {
 					b = true
 				}
 			} else {

+ 9 - 9
core/src/qfw/manage/auditing.go

@@ -292,15 +292,15 @@ func (s *SystemManage) Systemsetting() error {
 	if s.GetSession("loginName") == nil {
 		return s.Redirect("/")
 	} else {
-		var userid = s.GetSession("userId").(string)
-		u := FindOne("user", "{'_id':'"+userid+"'}")
-		log.Println("userid:", (*u)["i_type"])
-		u_type := (*u)["i_type"]
-		if u_type == 0 {
-			return s.Render("/manage/systemsetting.html")
-		} else {
-			return s.Redirect("/")
-		}
+		//		var userid = s.GetSession("userId").(string)
+		//		u := FindOne("user", "{'_id':'"+userid+"'}")
+		//		log.Println("userid:", (*u)["i_type"])
+		//		u_type := (*u)["i_type"]
+		//		if u_type == 0 {
+		return s.Render("/manage/systemsetting.html")
+		//		} else {
+		//			return s.Redirect("/")
+		//		}
 
 	}
 }

+ 1 - 1
core/src/qfw/manage/feedback.go

@@ -100,7 +100,7 @@ func (s *SystemManage) Feedbackcontent(_id string) error {
 		if u_type == 0 {
 			r := FindById("interaction", _id, `{"i_type":1,"l_submitdate":1,"s_submitid":1,"s_submitname":1,"s_remark":1,
 					  "s_pic":1,"s_enterprisetype":1,"_id":1,"s_link":1,"i_status":1,"s_title":1,
-					"s_editorname":1,"s_opinion":1,"l_editordate":1,"s_record":1,"s_title_no":1,"s_source":1,"s_username":1,"s_from":1}`)
+					"s_editorname":1,"s_opinion":1,"l_editordate":1,"s_record":1,"s_title_no":1,"s_source":1,"s_username":1,"s_from":1,"s_fromName":1}`)
 			if nil != r {
 				if util.IntAll((*r)["i_status"]) == 0 {
 					s_editorname, _ := s.GetSession("nickName").(string)

+ 624 - 0
core/src/qfw/manage/loan.go

@@ -0,0 +1,624 @@
+package manage
+
+import (
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
+	mgo "qfw/util/mongodb"
+	"time"
+)
+
+
+type LoanAction struct {
+	*xweb.Action
+	validataPassword      xweb.Mapper `xweb:"/manage/jy_loan/validatapassword"`        //密码校验
+	telephone_interviews  xweb.Mapper `xweb:"/manage/jyloan/telephoneinterviews"`      //电话回访列表
+	return_visit_records  xweb.Mapper `xweb:"/manage/jy_loan/returnvisitrecords"`      //回访信息登记
+	evaluation            xweb.Mapper `xweb:"/manage/jy_loan/evaluation"`              //查询回访记录
+	evaluation_list       xweb.Mapper `xweb:"/manage/jy_loan/evaluationlist"`          //评估
+	evaluation_opinion    xweb.Mapper `xweb:"/manage/jy_loan/evaluationopinion"`       //评估意见
+	modify_password       xweb.Mapper `xweb:"/manage/jy_loan/modifypassword"`          //修改密码
+	clue_manage           xweb.Mapper `xweb:"/manage/jy_loan/cluelist"`                //线索管理列表
+	clue_save             xweb.Mapper `xweb:"/manage/jy_loan/cluesave"`                //线索保存
+	clue_show             xweb.Mapper `xweb:"/manage/jy_loan/clueshow"`                //线索展示
+	clue_detail           xweb.Mapper `xweb:"/manage/jy_loan/cluedetail"`              //分类详情
+	classification_list   xweb.Mapper `xweb:"/manage/jy_loan/classificationlist"`      //分类列表
+	show_classification   xweb.Mapper `xweb:"/manage/jy_loan/showclassification"`      //查看分类
+	save_classification   xweb.Mapper `xweb:"/manage/jy_loan/saveclassification"`      //保存分类
+	updata_classification xweb.Mapper `xweb:"/manage/jy_loan/updataclassification"`    //更新分类
+}
+
+type Front struct {
+	*xweb.Action
+	login                xweb.Mapper    `xweb:"/manage/jyloan/list"`
+	visitList            xweb.Mapper    `xweb:"/manage/loan/visitlist"`
+	evaluationlist       xweb.Mapper    `xweb:"/manage/loan/evaluationlist"`          //评估列表页面
+	evaluationdetail    xweb.Mapper    `xweb:"/manage/jy_loan/evaluationdetail"`        //评估详情页面
+	clasifylist          xweb.Mapper    `xweb:"/manage/loan/clasifylist"`
+	setting              xweb.Mapper    `xweb:"/manage/loan/setting"`
+	classset             xweb.Mapper    `xweb:"/manage/loan/classSet.html"`
+	passwordchange       xweb.Mapper    `xweb:"/loan/passwordChange.html"`
+	clue                 xweb.Mapper    `xweb:"/manage/loan/cluelist"`
+	show_clue            xweb.Mapper    `xweb:"/manage/jy_loan/show_clue"`
+}
+
+
+func init(){
+	xweb.AddAction(&Front{})
+	xweb.AddAction(&LoanAction{})
+}
+
+func (this *Front)Login()error{
+	return this.Render("/manage/loan/manage.html")
+}
+
+func (this *Front)VisitList()error{
+	return this.Render("/manage/loan/visit.html")
+}
+
+func (this *Front)Evaluationlist()error{
+	return this.Render("/manage/loan/evaluationlist.html")
+}
+
+func (this *Front)Evaluationdetail()error{
+	uid := this.GetString("uid")
+	this.T["uid"] = uid
+	return this.Render("/manage/loan/evaluationdetail.html",&this.T)
+}
+func (this *Front)Setting()error{
+	return this.Render("/manage/loan/classSet.html")
+}
+
+//func (this *Front)Classset()error{
+//	return this.Render("./classSet.html")
+//}
+
+func (this *Front)Passwordchange()error{
+	return this.Render("./passwordChange.html")
+}
+
+func (this *Front)Clue()error{
+	return this.Render("./manage/loan/cluelist.html")
+}
+
+func (this *Front)Clasifylist()error{
+	uid := this.GetString("uid")
+	this.T["uid"] = uid
+	return this.Render("./manage/loan/clue.html",&this.T)
+
+}
+func (this *Front)Show_clue()error{
+	uid := this.GetString("uid")
+	this.T["uid"] = uid
+	return this.Render("./manage/loan/show_clue.html")
+}
+
+
+//回访记录
+func (this *LoanAction)Evaluation(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		uid := this.GetString("uid")
+		query := make(map[string]interface{})
+		query["uid"] = uid
+		data :=*mgo.FindOne("jy_loan",query)
+		this.ServeJson(map[string][]interface{}{
+			"data":[]interface{}{
+				data,
+			},
+
+		})
+	}
+}
+
+//密码校验(业务密码,管理密码)
+func (this *LoanAction)ValidataPassword(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		pwd:=this.GetString("password")
+		pwd_type := this.GetString("type")
+		res:=valida(userId.(string),pwd,pwd_type)
+		data := make(map[string]interface{})
+		if res{
+			data["status"] = 1
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":data,
+			})
+		}else{
+			data["status"] = 0
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":data,
+			})
+		}
+
+	}
+}
+
+//电话回访列表
+func (this *LoanAction)Telephone_interviews(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		currentPage, _ := this.GetInteger("currentPage")
+		perPage, _ := this.GetInteger("perPage")
+		query := make(map[string]interface{})
+		query["visit_back"] = 0
+		ldata:=mgo.Find("jy_loan",query,`{"application_time":1}`,nil,false,(currentPage-1)*perPage, perPage)
+		count := mgo.Count("jy_loan", query)
+		data := make(map[string]interface{})
+		if len(*ldata)!=0{
+			this.ServeJson(map[string]interface{}{
+				"currentPage": currentPage,
+				"data":        ldata,
+				"totalRows":   count,
+			})
+		}else{
+			data["status"] = 0
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":data,
+			})
+		}
+	}
+}
+
+//回访记录登记
+func (this *LoanAction)Return_visit_records(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		data := make(map[string]int)
+		visit_msg := this.GetString("msg")
+		visit_person := this.GetString("person")
+		uid := this.GetString("uid")
+		if visit_msg!=""{
+			query := make(map[string]interface{})
+			query["uid"] = uid
+			info:= make(map[string]interface{})
+			set:= make(map[string]interface{})
+
+			if visit_person!=""{
+				info["visit_person"] = visit_person
+			}
+
+			info["visit_msg"] = visit_msg
+			info["visit_back"] = 1
+			info["visit_time"] = time.Now().Format("2006-01-02")
+			set["$set"] = info
+
+			res := mgo.Update("jy_loan",query,set,true,false)
+			if res{
+				data["status"] = 1
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":data,
+				})
+			}else{
+				data["status"] = 0
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":data,
+				})
+			}
+		}else{
+			data["status"] = 0
+			this.ServeJson(map[string]interface{}{
+				"error_code":"1002",
+				"data":data,
+			})
+		}
+	}
+
+}
+
+//贷款评估列表
+func (this *LoanAction)Evaluation_list(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		currentPage, _ := this.GetInteger("currentPage")
+		perPage, _ := this.GetInteger("perPage")
+		query :=make(map[string]interface{})
+		query["opinion"] = 0
+		ldata:=*mgo.Find("jy_loan",query,`{"application_time":1}`,nil,false,(currentPage-1)*perPage, perPage)
+		count := mgo.Count("jy_loan", query)
+		data := make(map[string]interface{})
+		if len(ldata)!=0{
+			this.ServeJson(map[string]interface{}{
+				"currentPage": currentPage,
+				"data":        ldata,
+				"totalRows":   count,
+			})
+
+		}else{
+			data["status"] = 0
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":data,
+			})
+		}
+	}
+
+}
+
+//线索管理
+func (this *LoanAction)Clue_manage(){
+	userId := this.GetSession("userId")
+	if userId == nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		currentPage, _ := this.GetInteger("currentPage")
+		perPage, _ := this.GetInteger("perPage")
+		data :=mgo.Find("jy_loan",nil,`{"application_time":1}`,`{"companyName":1,"registration":1,"visit_person":1,"visit_time":1,"account_manager":1,"opinion_time":1,"classify_type":1,"uid":1}`,false,(currentPage-1)*perPage, perPage)
+		count := mgo.Count("jy_loan",nil)
+		if (*data!=nil){
+			this.ServeJson(map[string]interface{}{
+				"currentPage": currentPage,
+				"data":        data,
+				"totalRows":   count,
+			})
+		}
+	}
+}
+//贷款评估意见
+func (this *LoanAction)Evaluation_opinion(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		data := make(map[string]int)
+		loan_msg := this.GetString("opinion_msg")
+		account_manager := this.GetString("account_manager")
+		uid := this.GetString("uid")
+		if loan_msg!=""{
+			query := make(map[string]interface{})
+			query["uid"] = uid
+			info:= make(map[string]interface{})
+			set:= make(map[string]interface{})
+
+			if account_manager!=""{
+				info["account_manager"] = account_manager
+			}
+
+			info["opinion_msg"] = loan_msg
+			info["opinion_time"] = time.Now().Format("2006-01-02")
+			info["opinion"] = 1
+			set["$set"] = info
+
+			res := mgo.Update("jy_loan",query,set,true,false)
+			if res{
+				data["status"] = 1
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":data,
+				})
+			}else{
+				data["status"] = 0
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":data,
+				})
+			}
+		}else{
+			data["status"] = 0
+			this.ServeJson(map[string]interface{}{
+				"error_code":"1002",
+				"data":data,
+			})
+		}
+	}
+
+}
+
+//修改密码
+func (this *LoanAction)Modify_password(){
+	userId := this.GetSession("userId")
+	if userId ==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		ptype := this.GetString("type")
+		pwd := this.GetString("password")
+		query:=make(map[string]interface{})
+		set := make(map[string]interface{})
+		t := make(map[string]string)
+		t["password"] = pwd
+		set["$set"] = t
+		query["uid"] = userId
+		query["mtype"] = ptype
+		res :=mgo.Update("loan_pwd",query,set,false,false)
+		if res{
+			this.ServeJson(map[string]interface{}{
+				"error_code":0,
+				"data":map[string]interface{}{
+					"status":1,
+				},
+			})
+		}else{
+			this.ServeJson(map[string]interface{}{
+				"error_code":0,
+				"data":map[string]interface{}{
+					"status":0,
+				},
+
+			})
+		}
+	}
+
+}
+
+//线索分类列表
+func (this *LoanAction)Classification_list(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		//per_page,_ := this.GetInteger("per_page")
+		//current_page,_ := this.GetInteger("page")
+		ldata:=*mgo.Find("jy_loan_classify",nil,nil,nil,false,0,10)
+		count := mgo.Count("jy_loan_classify", nil)
+		if len(ldata)!=0{
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":ldata,
+				"count":count,
+			})
+
+		}else{
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":"",
+			})
+		}
+	}
+}
+
+//线索分类详情
+func (this *LoanAction)Clue_detail(){
+	userId := this.GetSession("userId")
+	if userId == nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		uid := this.GetString("uid")
+		query := make(map[string]interface{})
+		query["uid"] = uid
+		data :=mgo.FindOne("jy_loan",query)
+		if data!=nil{
+			this.ServeJson(map[string][]interface{}{
+				"data":[]interface{}{
+					data,
+				},
+
+			})
+		}
+	}
+}
+
+//线索保存
+func (this *LoanAction)Clue_save(){
+	userId := this.GetSession("userId")
+	if userId == nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		uid := this.GetString("uid")
+		classify_msg := this.GetString("classify_msg")
+		classify_type := this.GetString("classify_type")
+		query := make(map[string]interface{})
+		query["uid"] = uid
+		set :=make(map[string]interface{})
+		info := make(map[string]interface{})
+		info["classify_msg"] = classify_msg
+		info["classify_type"] = classify_type
+		set["$set"] = info
+		res := mgo.Update("jy_loan",query,set,true,false)
+		if res{
+			this.ServeJson(map[string]interface{}{
+				"status":1,
+			})
+		}else{
+			this.ServeJson(map[string]interface{}{
+				"status":0,
+			})
+		}
+	}
+}
+
+//线索展示
+func (this *LoanAction)Clue_show(){
+	userId := this.GetSession("userId")
+	if userId == nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		uid := this.GetString("uid")
+		query := make(map[string]interface{})
+		query["uid"] = uid
+		res:=mgo.FindOne("jy_loan",query)
+		if res!=nil{
+			this.ServeJson(map[string][]interface{}{
+				"data":[]interface{}{
+					res,
+				},
+
+			})
+		}
+	}
+}
+
+//查看线索分类
+func(this *LoanAction)Show_classification(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		res := mgo.Find("jy_loan_classify",nil,false,nil,false,0,10)
+		if len(*res) != 0{
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":map[string]interface{}{
+					"status":"1",
+					"data":res,
+				},
+			})
+
+		}else{
+			this.ServeJson(map[string]interface{}{
+				"error_code":"0",
+				"data":map[string]interface{}{
+					"status":"0",
+				},
+			})
+		}
+
+
+	}
+}
+
+//保存分类
+func (this *LoanAction)Save_classification(){
+	userId := this.GetSession("userId")
+	if userId== nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else{
+		classify_type := this.GetString("type")
+		msg := this.GetString("msg")
+		uid := this.GetString("uid")
+		if msg == ""{
+			this.ServeJson(map[string]interface{}{
+				"error_code":"1002",
+			})
+		}else{
+			query := make(map[string]interface{})
+			query["uid"] = uid
+			t :=make(map[string]interface{})
+			t["msg"] = msg
+			t["mtype"] = classify_type
+			set := make(map[string]interface{})
+			set["$set"] = t
+			res :=mgo.Update("jy_loan_classify",query,set,false,false)
+			if res{
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":map[string]interface{}{
+						"status":"1",
+					},
+				})
+			}else{
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":map[string]interface{}{
+						"status":"0",
+					},
+				})
+			}
+		}
+	}
+
+}
+
+//增加分类设置
+func (this *LoanAction)Updata_classification(){
+	userId := this.GetSession("userId")
+	if userId==nil{
+		this.ServeJson(map[string]interface{}{
+			"error_code":"1004",
+		})
+	}else {
+		classify_type := this.GetString("type")
+		uid := this.GetString("uid")
+		if classify_type == "add"{
+			category:=this.GetString("category")
+			description:=this.GetString("description")
+			t := make(map[string]interface{})
+			t["classify_type"] = category
+			t["discribe"] = description
+			res:=mgo.Save("jy_loan_classify",t)
+			if res!=""{
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":map[string]interface{}{
+						"status":"1",
+					},
+				})
+			}else{
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":map[string]interface{}{
+						"status":"0",
+					},
+				})
+			}
+
+		}else{
+			m := make(map[string]interface{})
+			m["_id"] = bson.ObjectIdHex(uid)
+			err :=mgo.Del("jy_loan_classify",m)
+			if err{
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":map[string]interface{}{
+						"status":"1",
+					},
+				})
+			}else{
+				this.ServeJson(map[string]interface{}{
+					"error_code":"0",
+					"data":map[string]interface{}{
+						"status":"0",
+					},
+				})
+			}
+		}
+	}
+}
+
+
+func valida(uid,pwd,mtype string)bool{
+	query := make(map[string]interface{})
+	query["uid"] = uid
+	query["mtype"] = mtype
+	pdata:=*mgo.FindOneByField("loan_pwd",query,`{"password":1}`)
+	if pdata!=nil&&pdata["password"] == pwd{
+		return true
+	}else{
+		return false
+	}
+}
+
+
+
+

+ 312 - 0
core/src/qfw/manage/rbac.go

@@ -0,0 +1,312 @@
+package manage
+
+import (
+	"encoding/json"
+	"errors"
+	"log"
+	"qfw/util"
+	. "qfw/util/mongodb"
+	"qfw/util/redis"
+	"strings"
+	"time"
+
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
+)
+
+//后台管理
+type Rbac struct {
+	*xweb.Action
+	//目录管理
+	index       xweb.Mapper `xweb:"/manage/rbac/index"`       //后台目录首页
+	catalogList xweb.Mapper `xweb:"/manage/rbac/catalogList"` //获取后台目录列表
+	saveCL      xweb.Mapper `xweb:"/manage/rbac/saveCL"`      //更新目录
+	//管理员管理
+	mgIndex     xweb.Mapper `xweb:"/manage/rbac/mgIndex"`     //后台管理员管理首页
+	mgUsersList xweb.Mapper `xweb:"/manage/rbac/mgUsersList"` //获取管理员列表
+	saveMG      xweb.Mapper `xweb:"/manage/rbac/saveMG"`      //更新管理员目录
+	//获取各自管理员的目录
+	gEachCL xweb.Mapper `xweb:"/manage/rbac/gEachCL"`
+	//管理分转
+	toEachPage xweb.Mapper `xweb:"/manage/rbac/toEachPage"`
+}
+
+func init() {
+	xweb.AddAction(&Rbac{})
+}
+
+//
+func (this *Rbac) ToEachPage() error {
+	defer util.Catch()
+	if this.GetSession("userId") == nil {
+		return this.Redirect("/")
+	}
+	var resultMap *[]map[string]interface{}
+	userId := util.ObjToString(this.GetSession("userId"))
+	u := FindOne("user", "{'_id':'"+userId+"'}")
+	u_type := (*u)["i_type"]
+	if u_type == 0 {
+		firstUrl := "/"
+		if (*u)["s_power"] != nil {
+			pids := util.ObjToString((*u)["s_power"])
+			if len(strings.Split(pids, ",")) > 0 {
+				var ids []bson.ObjectId
+				for _, chid := range strings.Split(pids, ",") {
+					ids = append(ids, bson.ObjectIdHex(chid))
+				}
+				resultMap = Find("catalog", bson.M{"_id": bson.M{"$in": ids}}, nil, nil, false, -1, -1)
+			}
+			if len(*resultMap) > 0 {
+				firstUrl = util.ObjToString((*resultMap)[0]["s_url"])
+			}
+		}
+		return this.Redirect(firstUrl)
+	} else if u_type == -1 {
+		return this.Render("/manage/rbac/systemsetting.html")
+	}
+	return nil
+}
+
+//
+func (this *Rbac) GEachCL() {
+	defer util.Catch()
+	r := func() *FuncResult {
+		if this.GetSession("userId") == nil {
+			return &FuncResult{false, errors.New("未登录"), nil}
+		}
+		if this.Method() != "POST" {
+			return &FuncResult{false, errors.New("请求方式有误"), nil}
+		}
+		userId := util.ObjToString(this.GetSession("userId"))
+		var redisMap = map[string]interface{}{}
+		redisData, err := redis.GetBytes("other", "userP_"+userId)
+		if err != nil || len(*redisData) > 0 {
+			var resultMap *[]map[string]interface{}
+			rData := FindById("user", userId, `{"s_power":1}`)
+			if (*rData)["s_power"] != nil {
+				pids := util.ObjToString((*rData)["s_power"])
+				if len(strings.Split(pids, ",")) > 0 {
+					var ids []bson.ObjectId
+					for _, chid := range strings.Split(pids, ",") {
+						ids = append(ids, bson.ObjectIdHex(chid))
+					}
+					resultMap = Find("catalog", bson.M{"_id": bson.M{"$in": ids}}, nil, nil, false, -1, -1)
+				}
+			}
+			if len(*resultMap) > 0 {
+				redisMap = map[string]interface{}{
+					"data": *resultMap,
+				}
+				rM, _ := json.Marshal(redisMap)
+				redis.PutBytes("other", "userP_"+userId, &rM, 120*60)
+			}
+		} else {
+			json.Unmarshal(*redisData, &redisMap)
+		}
+		return &FuncResult{true, nil, redisMap}
+	}()
+
+	if r.Err != nil {
+		log.Printf(" EACHCL err:%v\n", r.Err.Error())
+	}
+	this.ServeJson(r.Format())
+}
+
+//管理员管理
+func (this *Rbac) MgIndex() error {
+	if this.GetSession("userId") == nil {
+		return this.Redirect("/")
+	}
+	return this.Render("/manage/rbac/mgIndex.html")
+}
+
+//
+func (this *Rbac) SaveMG() {
+	defer util.Catch()
+	r := func() *FuncResult {
+		if this.GetSession("userId") == nil {
+			return &FuncResult{false, errors.New("未登录"), nil}
+		}
+		if this.Method() != "POST" {
+			return &FuncResult{false, errors.New("请求方式有误"), nil}
+		}
+		_id := this.GetString("_id") //userid
+		if _id == "" {
+			return &FuncResult{false, errors.New("userid不能为空"), nil}
+		}
+		MGStr := this.GetString("MGStr") //目录id
+		if MGStr == "" {
+			return &FuncResult{false, errors.New("目录id不能为空"), nil}
+		}
+		i_type, _ := this.GetInteger("i_type")
+		//
+		mData := map[string]interface{}{
+			"s_power":     MGStr,
+			"i_type":      i_type,
+			"l_powerdate": time.Now().Unix(),
+		}
+		if !Update("user", &map[string]interface{}{
+			"_id": util.StringTOBsonId(_id),
+		}, &map[string]interface{}{
+			"$set": mData,
+		}, false, false) {
+			return &FuncResult{false, errors.New("更新管理员信息失败"), nil}
+		} else {
+			redis.Del("other", "userP_"+_id)
+			return &FuncResult{true, nil, nil}
+		}
+		return &FuncResult{false, errors.New("未知操作"), nil}
+	}()
+
+	if r.Err != nil {
+		log.Printf("MG err:%v\n", r.Err.Error())
+	}
+	this.ServeJson(r.Format())
+}
+
+//
+func (this *Rbac) MgUsersList() {
+	defer util.Catch()
+	if this.GetSession("userId") == nil {
+		this.ServeJson(map[string]interface{}{
+			"msg": "未登录",
+		})
+	}
+	if this.Method() != "POST" {
+		this.ServeJson(map[string]interface{}{
+			"msg": "请求方式有误",
+		})
+	}
+	size, _ := this.GetInteger("perPage")
+	if size > 100 {
+		this.ServeJson(map[string]interface{}{
+			"msg": "请求太多",
+		})
+	}
+	currentPage, _ := this.GetInteger("currentPage")
+	query := map[string]interface{}{}
+	if this.GetString("normal") != "" && this.GetString("openid") != "" {
+		query["s_m_openid"] = this.GetString("openid")
+	} else {
+		query["i_type"] = 0
+	}
+	res := map[string]interface{}{}
+	res["totalRows"] = Count("user", query)
+	data := *Find("user", query, `{"_id":-1}`, nil, false, (currentPage-1)*size, size)
+	for _, v := range data {
+		data_1 := v["l_registedate"]
+		v["l_registedate"] = util.FormatDateWithObj(&data_1, util.Date_Full_Layout)
+	}
+	res["data"] = data
+	res["currentPage"] = currentPage
+	this.ServeJson(res)
+}
+
+//目录管理
+func (this *Rbac) Index() error {
+	if this.GetSession("userId") == nil {
+		return this.Redirect("/")
+	}
+	return this.Render("/manage/rbac/systemsetting.html")
+}
+
+//
+func (this *Rbac) SaveCL() {
+	defer util.Catch()
+	Dotype := this.GetString("dotype") //删除 or 新增 or 修改
+	r := func() *FuncResult {
+		if this.GetSession("userId") == nil {
+			return &FuncResult{false, errors.New("未登录"), nil}
+		}
+		if this.Method() != "POST" {
+			return &FuncResult{false, errors.New("请求方式有误"), nil}
+		}
+		if Dotype == "D" {
+			cl_id := this.GetString("clid") //目录id
+			if cl_id == "" {
+				return &FuncResult{false, errors.New("目录id不能为空"), nil}
+			}
+			ok := DelById("catalog", cl_id)
+			if ok {
+				return &FuncResult{true, nil, nil}
+			}
+		} else {
+			cl_name := this.GetString("clname") //目录名称
+			if cl_name == "" {
+				return &FuncResult{false, errors.New("目录名称不能为空"), nil}
+			}
+			cl_url := this.GetString("clurl") //目录url
+			if cl_url == "" {
+				return &FuncResult{false, errors.New("目录地址不能为空"), nil}
+			}
+			//
+			mData := map[string]interface{}{
+				"s_name":       cl_name,
+				"s_url":        cl_url,
+				"s_remark":     this.GetString("clremark"), //目录说明
+				"s_icon":       this.GetString("cllcon"),   //目录图标
+				"l_createdate": time.Now().Unix(),
+			}
+			if Dotype == "S" {
+				if Save("catalog", mData) == "" {
+					return &FuncResult{false, errors.New("增加目录失败"), nil}
+				} else {
+					return &FuncResult{true, nil, nil}
+				}
+			} else if Dotype == "U" {
+				cl_id := this.GetString("clid")
+				if cl_id == "" {
+					return &FuncResult{false, errors.New("目录id不能为空"), nil}
+				}
+				mData["l_updatedate"] = time.Now().Unix()
+				if !Update("catalog", &map[string]interface{}{
+					"_id": util.StringTOBsonId(cl_id),
+				}, &map[string]interface{}{
+					"$set": mData,
+				}, false, false) {
+					return &FuncResult{false, errors.New("更新目录失败"), nil}
+				} else {
+					return &FuncResult{true, nil, nil}
+				}
+			}
+		}
+		return &FuncResult{false, errors.New("未知操作"), nil}
+	}()
+
+	if r.Err != nil {
+		log.Printf(" catalog%s err:%v\n", Dotype, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
+}
+
+//
+func (this *Rbac) CatalogList() {
+	defer util.Catch()
+	if this.GetSession("userId") == nil {
+		this.ServeJson(map[string]interface{}{
+			"msg": "未登录",
+		})
+	}
+	if this.Method() != "POST" {
+		this.ServeJson(map[string]interface{}{
+			"msg": "请求方式有误",
+		})
+	}
+	size, _ := this.GetInteger("perPage")
+	if size > 100 {
+		this.ServeJson(map[string]interface{}{
+			"msg": "请求太多",
+		})
+	}
+	currentPage, _ := this.GetInteger("currentPage")
+	res := map[string]interface{}{}
+	res["totalRows"] = Count("catalog", nil)
+	data := *Find("catalog", nil, []string{"-l_createdate"}, nil, false, (currentPage-1)*size, size)
+	for _, v := range data {
+		data_1 := v["l_createdate"]
+		v["l_createdate"] = util.FormatDateWithObj(&data_1, util.Date_Full_Layout)
+	}
+	res["data"] = data
+	res["currentPage"] = currentPage
+	this.ServeJson(res)
+}

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2020-01-16 16:17:23"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2020-01-16 16:17:23"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2020-02-27 13:19:16"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2020-02-27 13:19:21"}},"marketisstart":true,"marketrate":300}

+ 88 - 0
core/src/web/staticres/loan/css/style.css

@@ -0,0 +1,88 @@
+
+#classify{
+    width: 200px;
+    height: 50px;
+    text-align: center;
+    line-height: 50px;
+    position: absolute;
+    background-color:rgb(86, 119, 252);
+    border-color: rgba(255, 0, 0, 0);
+    border-width: 0px;
+    border-style: solid;
+    box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 8px 0px;
+    border-radius: 2px;
+    margin-top: 64px;
+    margin-left: 878px;
+
+
+}
+
+
+#visit{
+    width: 200px;
+    height: 50px;
+    background-color:rgb(86, 119, 252);
+    border-color: rgba(255, 0, 0, 0);
+    border-width: 0px;
+    border-style: solid;
+    box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 8px 0px;
+    border-radius: 2px;
+    text-align: center;
+    line-height: 50px;
+    position: relative;
+    float: left;
+    font-weight: normal;
+    font-style: normal;
+    margin-top: 64px;
+    margin-left: 291px;
+    opacity: 1;
+    z-index: 9;
+}
+
+
+#evaluation{
+    width: 200px;
+    height: 50px;
+    background-color:rgb(86, 119, 252);
+    border-color: rgba(255, 0, 0, 0);
+    border-width: 0px;
+    border-style: solid;
+    box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 8px 0px;
+    border-radius: 2px;
+    text-align: center;
+    line-height: 50px;
+    position: absolute;
+    margin-top: 64px;
+    margin-left: 584px;
+
+}
+
+#setting {
+    width: 200px;
+    height: 50px;
+    text-align: center;
+    line-height: 50px;
+    position: absolute;
+    background-color:rgb(86, 119, 252);
+    border-color: rgba(255, 0, 0, 0);
+    border-width: 0px;
+    border-style: solid;
+    box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 8px 0px;
+    border-radius: 2px;
+    margin-left: 584px;
+    margin-top: 157px;
+}
+#list div span{
+    font-family:Helvetica;
+    font-weight:400;
+    font-size:20px;
+    color:rgb(255, 255, 255);
+    font-style:normal;
+    letter-spacing:0.5px;
+    line-height:33px;
+    text-decoration:none;
+}
+
+#sidebar{
+    margin-top: 0px;
+}

+ 4 - 4
core/src/web/templates/common/login.html

@@ -147,8 +147,8 @@ $(function (){
 				clearInterval(t);
 				if(data.freeze == 2){
 				    window.location.href="/front/webhelpcontent/55c818d8af537440a700000d.html";
-				}else if (data.userType == 0){//后台管理员
-					window.location.href="/manage/system";
+				}else if (data.userType == 0||data.userType == -1){//管理员
+					window.location.href="/manage/rbac/toEachPage";
 				}else{
 					afterLoginSkip(data,true);
 				}
@@ -179,8 +179,8 @@ function afterLoginSkip(data,flag){
 		return;
 	}
 	if(flag){
-		if(data.userType == 0){
-			window.location.href="/manage/system";
+		if(data.userType == 0||data.userType == -1){
+			window.location.href="/manage/rbac/toEachPage";
 			return;
 		}
 		if(loginParam == -1){//登录完之后回调

+ 2 - 3
core/src/web/templates/manage/course/order_detail.html

@@ -240,7 +240,8 @@
 						if(res["order_status"]=="0"){
 							$(".status").text("待付款").css({"color":"#EAB62F"})
 						}else if(res["order_status"]=="1"){
-							$(".status").text("已支付").css({"color":"#4DB443"})
+							$(".status").text("已支付").css({"color":"#4DB443"})							
+							$(".zfdh").text(res["out_trade_no"]).parent().show();
 						}else if(res["order_status"]=="-2"){
 							$(".status").text("已取消").css({"color":"#F5585"})
 						}
@@ -267,8 +268,6 @@
 						}
 						if(res["course_status"]=="2"){
 							$("#chakanpz").parents(".nofloat").show();
-						}else{
-							$(".zfdh").text(res["out_trade_no"]).show();
 						}
 						$(".dj").text(parseInt(resCour["i_price"])/100)
 						$(".ddzj").text(filter["peoleNum"]*resCour["i_price"]/100)

+ 8 - 0
core/src/web/templates/manage/feedbackcontent.html

@@ -113,6 +113,14 @@ background-color:#FFFFFF;
 		<div class="col-sm-4">
 		</div>
 		</div>
+    <div class="form-group">
+      <label id="col-sm-2" class="col-sm-2 control-label" for="name">问题来源:</label>
+	    <div class="col-sm-3">
+        <span style="background-color:#f0f0f0;" class="form-control">{{.T.s_fromName}}</span>
+		  </div>
+  		<div class="col-sm-4">
+  		</div>
+		</div>
 		<div class="form-group">
         <label id="col-sm-2" class="col-sm-2 control-label" for="name">问题来源页面:</label>
 	    <div class="col-sm-6">

+ 163 - 0
core/src/web/templates/manage/loan/classSet.html

@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <script src="/js/jquery.js"></script>
+  <title>线索分类设置</title>
+  <style>
+    *{
+      margin: 0;
+      padding: 0;
+    }
+    html,body{
+      height: 100%;
+      width: 100%;
+    }
+    .set-content{
+      margin: 0 auto;
+      width: 1000px;
+      padding-top: 100px;
+    }
+    .title{
+      color: #1a1a1a;
+      font-size: 18px;
+    }
+    .table-content{
+      display: flex;
+      justify-content: center;
+      margin: 50px auto 0;
+      font-size: 14px;
+      color: #1a1a1a;
+    }
+    table tr{
+      height: 35px;
+      line-height: 35px;
+    }
+    .del{
+      color: #38f;
+      cursor: pointer;
+    }
+    table {
+      border-right:1px solid #999;
+      border-bottom:1px solid #999
+    } 
+    table td{
+      text-align: center;
+      border-left:1px solid #999;
+      border-top:1px solid #999
+    } 
+    tbody{
+      color: #666;
+    }
+    td input{
+      height: 25px;
+      width: 80%;
+    }
+    #return{
+      float: right;
+      margin-right: 27px;
+      margin-top: 10px;
+      font-weight: 400;
+      font-size: 16px;
+      color: rgba(94, 126, 240, 1);
+      font-style: normal;
+      letter-spacing: 0px;
+      text-decoration: none;
+    }
+  </style>
+</head>
+<body>
+  <div class="set-content">
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+      <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="title">线索分类设置:</div>
+    <div class="table-content">
+      <table cellspacing="0" id="table">
+        <thead>
+          <tr>
+            <td style="width: 100px;">操作</td>
+            <td style="width: 200px">显示类型</td>
+            <td style="width: 350px">说明</td>
+          </tr>
+        </thead>
+      </table>
+    </div>
+  </div>
+  <script> 
+      function add() {
+
+        var tbody = document.getElementsByTagName('tbody')[0];
+        totle_rows = tbody.rows.length;
+        if (totle_rows<=10){
+          var tr = document.createElement('tr')
+          var classify_type = $("#type").val();
+          var classify_discribe = $("#discribe").val()
+          if (classify_type!=""&&classify_discribe){
+            $.ajax({
+              url:"/manage/jy_loan/updataclassification",
+              dataType: "json",
+              method: "post",
+              data:{"type":"add","category":classify_type,"description":classify_discribe},
+              success:function (d) {
+                if (d.data.status == "1"){
+                  // window.location.href = "/manage/loan/setting"
+                }
+              }
+            })
+            // tr.innerHTML = '<td class="del add" onclick="add()">增加</td><td><input id="type" type="text" placeholder="新的线索类型" maxlength="10"></td><td><input id="discribe" type="text" placeholder="说明" maxlength="30"></td>'
+            // tbody.appendChild(tr)
+            window.location.reload();
+          }
+        }
+
+
+      }
+      function del(Object) {
+        var id = Object.parentElement.children[3].textContent;
+        $.ajax({
+          url:"/manage/jy_loan/updataclassification",
+          method:"post",
+          dataType:"json",
+          data:{"type":"del","uid":id},
+          success:function (d) {
+            if (d.data.status == "1"){
+              window.location.href = "/manage/loan/setting"
+            }
+
+          }
+        })
+        // var obj = document.getElementsByTagName('tr','data-index')[index]
+        // console.log("obj",obj)
+
+      }
+      var str = ''
+      var addStr = '<tr><td class="del add" onclick="add()">增加</td><td><input id="type" type="text" placeholder="新的线索类型" maxlength="10"></td><td><input id="discribe" type="text" placeholder="说明" maxlength="30"></td></tr>'
+      // 处理数据
+      function dealData() {
+        $.ajax({
+          url:"/manage/jy_loan/showclassification",
+          method:"get",
+          dataType:"json",
+          async:false,
+          success:function (d) {
+            if (d.data.status==1){
+              for (var i =1;i<d.data.data.length;i++){
+                str = str +  '<tr><td class="del" onclick="del(this)" data-index="'+i+'">删除</td><td>'+d.data.data[i].classify_type+'</td><td>'+d.data.data[i].discribe+'</td><td class="id" hidden>'+d.data.data[i]._id+'</td></tr>'
+              }
+              str = str + addStr;
+              var table = document.getElementById('table');
+              var tbody = document.createElement('tbody');
+              tbody.innerHTML = str;
+              table.appendChild(tbody)
+            }
+          }
+        })
+
+
+      }
+      dealData()
+  </script> 
+</body>
+</html> 

+ 369 - 0
core/src/web/templates/manage/loan/clue.html

@@ -0,0 +1,369 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    {{include "/common/inc.html"}}
+    <title>分类线索</title>
+    <script src="/js/qfwtable.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/js/kindeditor/themes/default/default.css"/>
+    <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kindeditor-all.js"></script>
+    <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kinditem.js"></script>
+    <style type="text/css">
+        #jyloan{
+            background-color: #f5f5f5;
+        }
+        .table-bordered{
+            border: 1px solid #ddd;
+            width: auto;
+            position: absolute;
+            left: 220px;
+            top: 120px;
+        }
+        .ke-container{
+            width: 425px;
+            margin-left: 100px;
+        }
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            display: none;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+        .table > tbody > tr > td:nth-child(8) {
+            display: none;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+        .yellowStyle {
+            background-color: rgb(202, 198, 133);
+            border-color: #EAB62F;
+        }
+        .ke-container{
+            width: 582px;
+            margin-left: 0px;
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="row" style="width:96%; margin:0 auto;">
+        {{include "/manage/slider.html"}}
+
+        <div id="content">
+            <div id="audit" style="margin-top: 20px"></div>
+        </div>
+        <div class="record" style="display: none">
+            <div style="float: left;
+    position: relative;
+    margin-left: 202px;
+    margin-top: -600px;
+    width: 200px;
+    height: 200px;
+overflow-y: auto;">
+               <span style="font-size: 24px;">1 回访记录:</span>
+                <div id="visit_record"></div>
+            </div>
+            <div style="
+    position: relative;
+    float: left;
+    margin-left: 419px;
+    margin-top: -600px;
+    width: 200px;
+    height: 200px;
+    overflow-y: auto;
+
+">
+                <span style=" font-size: 24px;">2 评估意见:</span>
+                <div id="evaluation"></div>
+            </div>
+            <div style="
+    position: relative;
+    float: left;
+    margin-left: 638px;
+    margin-top: -600px;
+    width: 200px;
+    height: 200px;
+    font-size: 24px;
+">
+                <span >3 分类意见:</span>
+                <textarea id="classify_msg" name="classify_msg" style="margin-left: 100px;"></textarea>
+                <div style="padding-left: 118px;
+    margin-top: 37px;">
+                    <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="提交" onclick="submit()">
+                </div>
+                <div style="padding-left: 415px;
+    margin-top: -33px;">
+                    <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="取消" onclick="cancle()">
+                </div>
+            </div>
+        </div>
+
+    </div>
+    {{include "/common/bottom.html"}}
+
+
+</div>
+
+
+
+</body>
+<script>
+    var uid = {{.T.uid}}
+    $(function () {
+        $("#audit").datatable({
+            perPage: 1
+            ,
+            showPagination: false
+            ,
+            checkbox: "" //check radio
+            ,
+            checkboxHeader: false
+            ,
+            idField: "_id"
+            ,
+            classname: "table-hover"
+            ,
+            css: {"height": "300px"}
+            //,post:{"name":"ee"}
+            ,
+            url: '/manage/jy_loan/cluedetail?uid='+uid
+            ,
+            columns: [
+
+                {
+                    title: "企业名称", field: "companyName",callback:function (d) {
+                        return d.companyName
+                    }
+                },
+                {
+                    title: "注册地", field: "registration", callback: function (d) {
+                        return d.registration
+                    }
+                },
+                {
+                    title: "回访人", field: "person",callback:function (d) {
+                        if (typeof(d.visit_person) != "undefined"){
+                            return d.visit_person
+                        }else{
+                            return ""
+                        }
+                    }
+                },
+                {
+                    title: "回访日期", field: "phonenum", callback: function (d) {
+                        if (typeof (d.visit_time) !="undefined"){
+                            return d.visit_time
+                        }else{
+                            return ""
+                        }
+                    }
+                },
+                {
+                    title: "客户经理", field: "price", callback: function (d) {
+                        return d.account_manager
+                    }
+                },
+                {
+                    title:"评估日期",field:"term",callback:function (d) {
+                        if(typeof (d.opinion_time)!="undefined"){
+                            return d.opinion_time
+                        }else{
+                            return ""
+                        }
+                    }
+                },
+                {
+                    title:"线索分类",field:"remark",callback:function (d) {
+                        var visit_msg,opinion_msg = "";
+                        visit_msg = format(d.visit_msg);
+                        opinion_msg = format(d.opinion_msg);
+                        $("#visit_record").html(visit_msg);
+                        $("#evaluation").html(opinion_msg);
+                        $(".record").show();
+                        var select = '<select id="classify" name=""  style="width: 70px;height: 25px" >'+'<option></option>'
+                        $.ajax({
+                            url:"/manage/jy_loan/classificationlist",
+                            method:"get",
+                            dataType:"json",
+                            async:false,
+                            success:function (r) {
+                                if (r.data.length>0){
+                                    var html = "";
+                                    for (var i =1;i<r.data.length;i++){
+                                        html += '<option>'+r.data[i].classify_type+'</option>';
+                                    }
+                                    select += html
+
+                                }
+                            }
+                        });
+                            return select + '</select>'
+
+                    }
+                },
+                {
+                    title:"uid",field:"remark",callback:function (d) {
+                        return d.uid
+
+                    }
+                }
+            ]
+        });
+
+    });
+    $(function(){
+        var kindEditInit=function(){
+            editor = KindEditor.create('textarea[name="classify_msg"]', {
+                id:"ke_editor",
+                allowFileManager : false,
+                filterMode:true,
+                width : '10px',
+                height:'20px',
+                items:items_simp,
+                allowImageRemoteImageRemote:false,
+                uploadJson : '/filemanage/upload',
+                afterCreate:function() {
+                    this.sync()
+                },
+                beforesubmit:function(){
+                    this.sync()
+                },
+                afterBlur: function(){
+                    this.sync()
+                }
+            });
+        };
+        kindEditInit()
+    });
+
+    function submit() {
+        var content = $("#classify_msg").val();
+        var classify = $("#classify option:selected").val();
+        if(content!=""&&classify!=""){
+            $.ajax({
+                url: "/manage/jy_loan/cluesave",
+                method: "post",
+                data: {
+                    "classify_msg":content,
+                    "uid":uid,
+                    "classify_type":classify
+                },
+                datatype: "json",
+                async:false,
+                success:function (r) {
+                    if (r.status==1){
+                        window.location.href = "/manage/loan/cluelist"
+                    }
+                }
+            })
+        }else{
+            alert("线索分类和提交意见不能为空")
+        }
+
+
+    }
+    //取消
+    function cancle(){
+        window.location.href = "/manage/loan/cluelist"
+    }
+    function format(d) {
+        if (typeof(d)!== "undefined"){
+            console.log(d)
+            var tt =d.replace(/&#60;/g,"<");
+            var t = tt.replace(/&#62;/g,">");
+            return t
+        }else{
+            return ""
+        }
+
+    }
+</script>
+</html>

+ 253 - 0
core/src/web/templates/manage/loan/cluelist.html

@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    {{include "/common/inc.html"}}
+    <title>分类线索</title>
+    <script src="/js/qfwtable.js"></script>
+    <style type="text/css">
+        #jyloan{
+            background-color: #f5f5f5;
+        }
+        .table-bordered{
+            border: 1px solid #ddd;
+            width: auto;
+            position: absolute;
+            left: 220px;
+            top: 120px;
+        }
+        .ke-container{
+            width: 425px;
+            margin-left: 100px;
+        }
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            display: none;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+        .table > tbody > tr > td:nth-child(8) {
+            display: none;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+        .yellowStyle {
+            background-color: rgb(202, 198, 133);
+            border-color: #EAB62F;
+        }
+        .ke-container ke-container-default{
+            width: 582px;
+            margin-left: 0px;
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="row" style="width:96%; margin:0 auto;">
+        {{include "/manage/slider.html"}}
+
+        <div id="content">
+            <div id="audit" style="margin-top: 20px"></div>
+        </div>
+        <div class="record" style="display: none">
+
+        </div>
+
+    </div>
+    {{include "/common/bottom.html"}}
+
+
+</div>
+
+
+
+</body>
+<script>
+    var uid = ""
+    $(function () {
+        $("#audit").datatable({
+            perPage: 5
+            ,
+            showPagination: true
+            ,
+            checkbox: "" //check radio
+            ,
+            checkboxHeader: false
+            ,
+            idField: "_id"
+            ,
+            classname: "table-hover"
+            ,
+            css: {"height": "300px"}
+            //,post:{"name":"ee"}
+            ,
+            url: '/manage/jy_loan/cluelist'
+            ,
+            columns: [
+
+                {
+                    title: "企业名称", field: "companyName",callback:function (d) {
+                        return d.companyName
+                    }
+                },
+                {
+                    title: "注册地", field: "registration", callback: function (d) {
+                        return d.registration
+                    }
+                },
+                {
+                    title: "回访人", field: "person",callback:function (d) {
+                        if (typeof(d.visit_person) != "undefined"){
+                            return d.visit_person
+                        }else{
+                            return ""
+                        }
+                    }
+                },
+                {
+                    title: "回访日期", field: "phonenum", callback: function (d) {
+                        if (typeof (d.visit_time) !="undefined"){
+                            return d.visit_time
+                        }else{
+                            return ""
+                        }
+                    }
+                },
+                {
+                    title: "客户经理", field: "price", callback: function (d) {
+                        return d.account_manager
+                    }
+                },
+                {
+                    title:"评估日期",field:"term",callback:function (d) {
+                        if(typeof (d.opinion_time)!="undefined"){
+                            return d.opinion_time
+                        }else{
+                            return ""
+                        }
+                    }
+                },
+                {
+                    title:"线索分类",field:"remark",callback:function (d) {
+                        if (typeof (d.classify_type)!= "undefined"){
+                            return "<a href=/manage/jy_loan/show_clue?uid="+d.uid+">"+   d.classify_type+"</a>"
+                            // return d.classify
+                        }else{
+                            var Html = "<div class='editBtn'><span class='yellowStyle' onclick='window.location.href=\"" + "/manage/loan/clasifylist?uid="+  d.uid + "\"'>去分类</span>"+"</div>"
+                            return Html
+                        }
+
+                    }
+                },
+                {
+                    title:"uid",field:"remark",callback:function (d) {
+                        return d.uid
+
+                    }
+                }
+            ]
+        });
+
+        $("select").change(function () {
+            var find = $("#audit").data("datatable");
+            if (!find.options.opost) find.options.opost = find.options.post || {};
+            find.options.post = $.extend(find.options.opost, {
+                strSel1: $("#select1").val(),
+                strSel2: $("#select2").val(),
+                strSel3: $("#select3").val()
+            });
+            find.options.currentPage = 1;
+            find.render();
+        });
+
+    });
+</script>
+</html>

+ 334 - 0
core/src/web/templates/manage/loan/evaluationdetail.html

@@ -0,0 +1,334 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    {{include "/common/inc.html"}}
+    <title>评估详情</title>
+    <script src="/js/qfwtable.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/js/kindeditor/themes/default/default.css"/>
+    <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kindeditor-all.js"></script>
+    <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kinditem.js"></script>
+    <style type="text/css">
+        #jyloan{
+            background-color: #f5f5f5;
+        }
+        .table-bordered{
+            border: 1px solid #ddd;
+            width: auto;
+            position: absolute;
+            left: 220px;
+            top: 120px;
+        }
+        .ke-container{
+            width: 425px;
+            margin-left: 100px;
+        }
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            display: none;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+        .table > tbody > tr > td:nth-child(8) {
+            display: none;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+        .ke-container{
+            width: 582px;
+            margin-left: 0px;
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="row" style="width:96%; margin:0 auto;">
+        {{include "/manage/slider.html"}}
+
+        <div id="content">
+            <div id="audit" style="margin-top: 20px"></div>
+            <div class="record" style="
+    margin-top: 390px;
+    position: relative;
+    float: left;
+    margin-left: -207px;
+">
+                <div style="position: relative;float: left;margin-left: 206px;margin-top: -366px;width: 280px;height: 300px;">
+                    <span style="font-size: 24px;">回访记录:</span>
+                    <span id="visit-person"></span>
+                    <span id="visit-time"></span>
+                    <div id="visit-record" style="overflow-y: auto;">
+
+                    </div>
+                </div>
+                <div style="position: relative;float: right;margin-left: 580px;margin-top: -366px;">
+                    <span style="font-size: 24px" >贷款评估意见:</span>
+                    <textarea id="evaluation" name="evaluation" style="width: 400px;height: 200px;" placeholder="多行输入"></textarea>
+                    <div>
+                        <div style="width: 210px;height: 0px;position: relative;margin-top: 15px">
+                            <span style="font-size: 24px;">客户经理:</span>
+                            <input id="manage" type="text" style="width: 80px" placeholder="单行输入">
+                        </div>
+                        <div style="padding-bottom: 20px;width: 100px;padding-left: 359px;">
+                            <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="提交" onclick="submit()">
+                        </div>
+                        <div style="width: 100px;padding-left: 359px">
+                            <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="取消" onclick="cancle()">
+                        </div>
+                    </div>
+
+                </div>
+
+            </div>
+        </div>
+
+
+
+    </div>
+    {{include "/common/bottom.html"}}
+
+
+</div>
+
+
+
+</body>
+<script>
+    var uid = {{.T.uid}}
+        $(function () {
+            $("#audit").datatable({
+                perPage: 1
+                ,
+                showPagination: false
+                ,
+                checkbox: "" //check radio
+                ,
+                checkboxHeader: false
+                ,
+                idField: "_id"
+                ,
+                classname: "table-hover"
+                ,
+                css: {"height": "100px"}
+                ,
+                url: '/manage/jy_loan/evaluation?uid='+uid
+                ,
+                columns: [
+
+                    {
+                        title: "企业名称", field: "companyName",callback:function (d) {
+                            return d.companyName
+                        }
+                    },
+                    {
+                        title: "注册地", field: "registration", callback: function (d) {
+                            return d.registration
+                        }
+                    },
+                    {
+                        title: "联系人", field: "person",callback:function (d) {
+                            return d.username
+                        }
+                    },
+                    {
+                        title: "手机号", field: "phonenum", callback: function (d) {
+                            return d.phoneNum
+                        }
+                    },
+                    {
+                        title: "贷款金额", field: "price", callback: function (d) {
+                            return d.price
+                        }
+                    },
+                    {
+                        title:"贷款期限",field:"term",callback:function (d) {
+                            return d.term
+                        }
+                    },
+                    {
+                        title:"贷款用途",field:"remark",callback:function (d) {
+                            return d.remark
+
+                        }
+                    },
+                    {
+                        title:"uid",field:"remark",callback:function (d) {
+                            return d.uid
+
+                        }
+                    }
+                ]
+            });
+
+        });
+    $(function(){
+        var kindEditInit=function(){
+            editor = KindEditor.create('textarea[name="evaluation"]', {
+                id:"ke_editor",
+                allowFileManager : false,
+                filterMode:true,
+                width : '10px',
+                height:'20px',
+                items:items_simp,
+                allowImageRemoteImageRemote:false,
+                uploadJson : '/filemanage/upload',
+                afterCreate:function() {
+                    this.sync()
+                },
+                beforesubmit:function(){
+                    this.sync()
+                },
+                afterBlur: function(){
+                    this.sync()
+                }
+            });
+        }
+        kindEditInit()
+    });
+    $(function () {
+        $.ajax({
+            url:"/manage/jy_loan/evaluation",
+            datatype: "json",
+            data: {"uid":uid},
+            async: false,
+            method: "POST",
+            success:function (d) {
+                var visit_record="";
+                visit_record = format(d.data[0].visit_msg);
+                $("#visit-person").html(d.data[0].visit_person);
+                $("#visit-record").html(visit_record);
+                $("#visit-time").html(d.data[0].visit_time);
+                $(".record").show();
+                $("#manage").focus();
+            }
+        })
+    });
+    function submit() {
+        var content = $("#evaluation").val();
+        var person = $("#manage").val();
+        if (content!=""&&person!=""){
+            $.ajax({
+                url: "/manage/jy_loan/evaluationopinion",
+                type: "POST",
+                data: {
+                    "opinion_msg":content,
+                    "account_manager":person,
+                    "uid":uid
+                },
+                async:false,
+                datatype: "json",
+                success:function (r) {
+                    if (r.data.status==1&&r.error_code=="0"){
+                        window.location.href = "/manage/loan/evaluationlist"
+                    }
+                }
+            })
+
+        }else{
+            alert("评估意见和客户经理不能为空")
+        }
+
+    }
+    function cancle() {
+        window.location.href = "/manage/loan/evaluationlist"
+    }
+    function format(d) {
+        if (typeof(d)!== "undefined"){
+            var tt =d.replace(/&#60;/g,"<");
+            var t = tt.replace(/&#62;/g,">");
+            return t
+        }else{
+            return ""
+        }
+
+    }
+</script>
+</html>

+ 293 - 0
core/src/web/templates/manage/loan/evaluationlist.html

@@ -0,0 +1,293 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
+    <meta charset="UTF-8">
+    {{include "/common/inc.html"}}
+    <title>企业评估</title>
+
+    <script src="/js/qfwtable.js"></script>
+    <style type="text/css">
+
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            display: none;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+        .table > tbody > tr > td:nth-child(8) {
+            display: none;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+        .ke-container ke-container-default{
+            margin-left: 0px;
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="row" style="width:96%; margin:0 auto;">
+        {{include "/manage/slider.html"}}
+
+        <div id="content">
+            <div id="audit" style="margin-top: 20px"></div>
+        </div>
+
+
+    </div>
+    {{include "/common/bottom.html"}}
+
+
+</div>
+
+
+
+</body>
+<script>
+    var uid = ""
+    $(function () {
+        $("#audit").datatable({
+            perPage: 5
+            ,
+            showPagination: true
+            ,
+            checkbox: "" //check radio
+            ,
+            checkboxHeader: false
+            ,
+            idField: "_id"
+            ,
+            classname: "table-hover"
+            ,
+            css: {"height": "300px"}
+            //,post:{"name":"ee"}
+            ,
+            url: '/manage/jy_loan/evaluationlist'
+            ,
+            columns: [
+
+                {
+                    title: "企业名称", field: "companyName",callback:function (d) {
+                        return d.companyName
+                    }
+                },
+                {
+                    title: "注册地", field: "registration", callback: function (d) {
+                        return d.registration
+                    }
+                },
+                {
+                    title: "联系人", field: "person",callback:function (d) {
+                        return d.username
+                    }
+                },
+                {
+                    title: "手机号", field: "phonenum", callback: function (d) {
+                        return d.phoneNum
+                    }
+                },
+                {
+                    title: "贷款金额", field: "price", callback: function (d) {
+                        return d.price
+                    }
+                },
+                {
+                    title:"贷款期限",field:"term",callback:function (d) {
+                        return d.term
+                    }
+                },
+                {
+                    title:"贷款用途",field:"remark",callback:function (d) {
+                        return d.remark
+
+                    }
+                },
+                {
+                    title:"uid",field:"remark",callback:function (d) {
+                        return d.uid
+
+                    }
+                }
+            ]
+        });
+
+        $("select").change(function () {
+            var find = $("#audit").data("datatable");
+            if (!find.options.opost) find.options.opost = find.options.post || {};
+            find.options.post = $.extend(find.options.opost, {
+                strSel1: $("#select1").val(),
+                strSel2: $("#select2").val(),
+                strSel3: $("#select3").val()
+            });
+            find.options.currentPage = 1;
+            find.render();
+        });
+
+    });
+
+    //双击事件
+    $("#content").on("dblclick","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
+        uid = $(this).find("td").eq(7).text();
+        $(this).css("background","rgb(202, 198, 133)");
+        $(this).siblings().css("background","rgb(255,255,255)");
+        $.ajax({
+            url:"/manage/jy_loan/evaluation",
+            datatype: "json",
+            data: {"uid":uid},
+            async: false,
+            method: "POST",
+            success:function (d) {
+                var visit_record="";
+                visit_record = format(d.data[0].visit_msg);
+                $("#visit-person").html(d.data[0].visit_person);
+                $("#visit-record").html(visit_record);
+                $("#visit-time").html(d.data[0].visit_time);
+                $(".record").show();
+                $("#manage").focus();
+            }
+        })
+    });
+    //单击事件
+    $("#content").on("click","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
+        var t = $(this).find("td").eq(7).text();
+        if ($(this).hasClass("selected")){
+            window.location.href = "/manage/jy_loan/evaluationdetail?uid="+t
+        }else{
+            $(this).addClass("selected");
+            $(this).css("background","rgb(202, 198, 133)");
+            $(this).siblings().css("background","rgb(255,255,255)");
+            $(this).siblings().removeClass("selected");
+            $("#visit-person").text("");
+            $("#visit-record").text("");
+            $("#visit-time").text("");
+            $(".record").hide();
+        }
+    });
+
+        document.onkeydown = function (event) {
+            var e = event || window.event || arguments.callee.caller.arguments[0];
+            var t = $("#audit>.dt-table-wrapper>.table>tbody>tr")
+            if (e && e.keyCode == 40) { //下
+                for(var i=0;i<t.length;i++){
+                    if ($(t[i]).hasClass("selected")){
+                        if (i + 1 >=t.length){
+                            break
+                        }else{
+                            $(t[i]).removeClass("selected");
+                            $(t[i]).css("background","#fff");
+                            $(t[i+1]).addClass("selected");
+                            $(t[i+1]).css("background","rgb(202, 198, 133)");
+                            break
+                        }
+                    }
+                }
+            }
+
+            if (e && e.keyCode == 38) { // 上
+                for(var i=0;i<t.length;i++){
+                    if ($(t[i]).hasClass("selected")){
+                        if (i <= 0){
+                            break
+                        }else{
+                            $(t[i]).removeClass("selected");
+                            $(t[i]).css("background","#fff");
+                            $(t[i-1]).addClass("selected");
+                            $(t[i-1]).css("background","rgb(202, 198, 133)");
+                            break
+                        }
+                    }
+                }
+            }
+
+        }
+
+</script>
+</html>

+ 118 - 0
core/src/web/templates/manage/loan/manage.html

@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html lang="en" >
+<head>
+    <meta charset="UTF-8">
+    <title>系统管理</title>
+    {{include "/common/inc.html"}}
+    <link type="text/css" rel="stylesheet" href="/loan/css/style.css">
+    <style>
+        #jyloan{
+            background-color: #f5f5f5;
+        }
+        #sidebar{
+            margin-left: 27px;
+        }
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+
+{{include "/manage/audithead.html"}}
+<body style="height: 1263px;">
+    {{include "/manage/slider.html"}}
+    <div id="list" style="height: 96%">
+        <div id="visit" onclick="show_modal(1)"><span >1 电话回访</span></div>
+        <div id="evaluation" onclick="show_modal(2)"><span >2 贷款评估</span></div>
+        <div id="classify" onclick="show_modal(3)"><span >3 线索分类</span></div>
+        <div id="setting" onclick="show_modal(4)"><span>4 分类设置</span></div>
+    </div>
+    <!-- modal -->
+
+    <div class="modal fade" id="password" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+        <div class="modal-dialog">
+            <div class="modal-content" style="width: 250px">
+                <div class="modal-header blue" id="model_title" style="text-align: center">
+
+                </div>
+                <div class="modal-body">
+                    <span id="hidden" style="display: none"> </span>
+                    <input id="input-pwd" type="password" width="100px" class="form-control" placeholder="Password"  />
+                        <span id="cancel" onclick="cancel()">取消</span>
+                        <span id="login" onclick="login()">登录</span>
+                </div>
+
+            </div>
+        </div>
+    </div>
+
+
+
+
+
+    {{include "/common/bottom.html"}}
+</body>
+<script>
+    //校验密码
+    function show_modal(index) {
+        if (index == 1){
+            window.location.href = "/manage/loan/visitlist"
+        }else if (index == 2){
+            window.location.href = "/manage/loan/evaluationlist"
+        }else if (index == 3){
+            window.location.href = "/manage/loan/cluelist"
+        }else{
+            window.location.href = "/manage/loan/setting"
+        }
+        // if (index == 4){
+        //     $("#model_title").text("请输入管理密码")
+        // }else{
+        //     $("#model_title").text("请输入业务密码")
+        // }
+        // $("#input-pwd").val("");
+        // $("#hidden").text(index);
+        //
+        // $("#password").modal({backdrop:'static'})
+
+    }
+    function cancel() {
+        $("#password").modal("hide")
+
+    }
+    function login() {
+        var pwd_type = ""
+        var t = $("#hidden").text();
+        var pwd = $("#input-pwd").val();
+        if (t == 1){
+            jump_address = "/manage/loan/visitlist";
+            pwd_type = "1"
+        }else if (t == 2){
+            jump_address = "/manage/jy_loan/evaluation_list";
+            pwd_type = "1"
+        }else if (t == 3){
+            jump_address = "/manage/jy_loan/classification_list";
+            pwd_type = "1"
+        }else{
+            jump_address = "/manage/loan/classSet.html";
+            pwd_type = "2"
+        }
+
+        if (pwd.length != 0){
+            $.ajax({
+                url:"/manage/jy_loan/validatapassword",
+                dataType:"json",
+                type:"POST",
+                async: "false",
+                data:{"password":pwd,"type":pwd_type},
+                success:function (r) {
+                    if ( r.error_code =="0"&&r.data.status==1){
+                        window.location.href=jump_address
+                    }
+
+                }
+
+            })
+        }
+
+    }
+    
+</script>
+</html>

+ 91 - 0
core/src/web/templates/manage/loan/passwordChange.html

@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>修改密码</title>
+  <style>
+    *{
+      margin: 0;
+      padding: 0;
+    }
+    html,body{
+      height: 100%;
+      width: 100%;
+    }
+    .password-content{
+      margin: 100px auto 0;
+      width: 600px;
+      padding-top: 100px;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      color: #1a1a1a;
+      font-size: 16px;
+    }
+    .li{
+      display: flex;
+      align-items: center;
+      margin-bottom: 20px;
+    }
+    .li .label {
+      width: 150px;
+      text-align: right;
+    }
+    .li input,.li select{
+      height: 30px;
+      width: 200px;
+    }
+    .li>span:last-child{
+      margin-left: 20px;
+    }
+    .btn{
+      padding-left: 160px;
+    }
+    .btn span{
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 100px;
+      height: 40px;
+      background: #cac68d;
+      color: #1a1a1a;
+      font-size: 16px;
+      border-radius: 3px;
+      cursor: pointer;
+    }
+  </style>
+</head>
+<body>
+  <div class="password-content">
+    <div class="li">
+      <span class="label">选择要修改的密码:</span>
+      <select>
+        <option value ="volvo">Volvo</option>
+        <option value ="saab">Saab</option>
+        <option value="opel">Opel</option>
+        <option value="audi">Audi</option>
+      </select>
+    </div>
+    <div class="li">
+      <span class="label">输入新密码:</span>
+      <input type="text">
+      <span>(8-12位字母和数字)</span>
+    </div>
+    <div class="li">
+      <span class="label">再次输入新密码:</span>
+      <input type="text">
+    </div>
+    <div class="btn">
+      <span onclick="password">修改密码</span>
+    </div>
+    
+  </div>
+  <script>
+    function password() {
+      console.log('点击')
+      var flag = confirm("确认要修改密码吗");
+    }
+  </script>
+</body>
+</html>

+ 279 - 0
core/src/web/templates/manage/loan/show_clue.html

@@ -0,0 +1,279 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    {{include "/common/inc.html"}}
+    <title>分类线索</title>
+    <link href="/css/bootstrap.min.css" rel="stylesheet" />
+    <style type="text/css">
+        #jyloan{
+            background-color: #f5f5f5;
+        }
+        .table-bordered{
+            border: 1px solid #ddd;
+            width: auto;
+            position: absolute;
+            left: 220px;
+            top: 120px;
+        }
+        .ke-container{
+            width: 425px;
+            margin-left: 100px;
+        }
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            display: none;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+        .table > tbody > tr > td:nth-child(8) {
+            display: none;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+        .ke-container{
+            width: 582px;
+            margin-left: 0px;
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="row" style="width:96%; margin:0 auto;">
+        {{include "/manage/slider.html"}}
+
+        <div id="content">
+            <div id="audit" style="margin-top: 20px"></div>
+            <div class="record" style="display: none">
+                <div style="height: 300px;width: 200px;overflow-y: auto;float: left;overflow-x: hidden">
+               <span style="font-size: 24px;">1 回访记录:</span>
+                    <div id="visit_record"></div>
+                </div>
+                <div style="float: left;margin-left: 100px;width: 200px;height: 300px;overflow-y: auto;overflow-x: hidden">
+                    <span style="font-size: 24px;">2 评估意见:</span>
+                    <div id="evaluation"></div>
+                </div>
+                <div style="width:200px;height: 300px;overflow-y: auto;float: left;margin-left: 100px;overflow-x: hidden">
+                    <span style="font-size: 24px;">3 分类意见:</span>
+                    <div id="classify"></div>
+                </div>
+            </div>
+            <div id="back">
+                <input  type="button" style="width: 90px; height: 33px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1; float: right;margin-right: 315px;margin-top: 10px" value="返回" onclick="backup()">
+            </div>
+        </div>
+
+
+    </div>
+    {{include "/common/bottom.html"}}
+
+
+</div>
+
+
+
+</body>
+<script>
+    var uid = {{.T.uid}}
+        $(function () {
+            $("#audit").datatable({
+                perPage: 1
+                ,
+                showPagination: false
+                ,
+                checkbox: "" //check radio
+                ,
+                checkboxHeader: false
+                ,
+                idField: "_id"
+                ,
+                classname: "table-hover"
+                ,
+                css: {"height": "100px"}
+                ,
+                url: '/manage/jy_loan/clueshow?uid='+uid
+                ,
+                columns: [
+
+                    {
+                        title: "企业名称", field: "companyName",callback:function (d) {
+                            return d.companyName
+                        }
+                    },
+                    {
+                        title: "注册地", field: "registration", callback: function (d) {
+                            return d.registration
+                        }
+                    },
+                    {
+                        title: "回访人", field: "person",callback:function (d) {
+                            if (typeof(d.visit_person) != "undefined"){
+                                return d.visit_person
+                            }else{
+                                return ""
+                            }
+                        }
+                    },
+                    {
+                        title: "回访日期", field: "phonenum", callback: function (d) {
+                            if (typeof (d.visit_time) !="undefined"){
+                                return d.visit_time
+                            }else{
+                                return ""
+                            }
+                        }
+                    },
+                    {
+                        title: "客户经理", field: "price", callback: function (d) {
+                            return d.account_manager
+                        }
+                    },
+                    {
+                        title:"评估日期",field:"term",callback:function (d) {
+                            if(typeof (d.opinion_time)!="undefined"){
+                                return d.opinion_time
+                            }else{
+                                return ""
+                            }
+                        }
+                    },
+                    {
+                        title:"线索分类",field:"remark",callback:function (d) {
+                            return d.classify_type
+
+                        }
+                    },
+                    {
+                        title:"uid",field:"remark",callback:function (d) {
+                            return d.uid
+
+                        }
+                    }
+                ]
+            });
+
+
+        });
+    $(function () {
+        $.ajax({
+            url: "/manage/jy_loan/clueshow",
+            method:"get",
+            dataType:"json",
+            data:{"uid":uid},
+            async:false,
+            success:function (d) {
+                var visit_record,evalaution,classify = "";
+                classify = format(d.data[0].classify_msg);
+                evalaution = format(d.data[0].opinion_msg);
+                visit_record = format(d.data[0].visit_msg);
+                $("#visit_record").append(visit_record);
+                $("#evaluation").append(evalaution);
+                $("#classify").append(classify);
+                $(".record").show();
+            }
+        })
+    });
+    function backup() {
+        window.location.href = "/manage/loan/cluelist"
+    }
+    function format(d) {
+        if (typeof(d)!== "undefined"){
+            console.log(d)
+            var tt =d.replace(/&#60;/g,"<");
+            var t = tt.replace(/&#62;/g,">");
+            return t
+        }else{
+            return ""
+        }
+
+    }
+</script>
+</html>

+ 51 - 0
core/src/web/templates/manage/loan/systemSet.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>系统设置</title>
+  <style>
+    *{
+      margin: 0;
+      padding: 0;
+    }
+    html,body{
+      height: 100%;
+      width: 100%;
+    }
+    .system-content{
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+      width: 100%;
+      height: 100%;
+    }
+    .btn{
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin-bottom: 20px;
+      width: 190px;
+      height: 65px;
+      background: #cac68d;
+      color: #1a1a1a;
+      font-size: 18px;
+      border-radius: 3px;
+      cursor: pointer;
+    }
+  </style>
+</head>
+<body>
+  <div class="system-content">
+    <span class="btn" onclick="jump(1)">线索分类设置</span>
+    <span class="btn" onclick="jump(2)">修改密码</span>
+  </div>
+</body>
+<script>
+  function jump(tag) {
+    var uri = tag === 1 ? './classSet.html' : './passwordChange.html';
+    window.location.href = uri
+  }
+</script>
+</html>

+ 355 - 0
core/src/web/templates/manage/loan/visit.html

@@ -0,0 +1,355 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    {{include "/common/inc.html"}}
+
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
+    <meta charset="UTF-8">
+    <title>电话回访</title>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/js/kindeditor/themes/default/default.css"/>
+    <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kindeditor-all.js"></script>
+    <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kinditem.js"></script>
+    <script src="/js/qfwtable.js"></script>
+    <style type="text/css">
+        #jyloan{
+            background-color: #f5f5f5;
+        }
+        .ke-container{
+            width: 425px;
+            margin-left: 100px;
+        }
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 10%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            display: none;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+        .table > tbody > tr > td:nth-child(8) {
+            display: none;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+        .ke-container ke-container-default{
+            width: 582px;
+            margin-left: 0px;
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+
+
+    </style>
+</head>
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 100px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    </div>
+    <div class="row" style="width:96%; margin:0 auto;">
+        {{include "/manage/slider.html"}}
+        <div id="content">
+            <div id="audit" style="margin-top: 20px"></div>
+        </div>
+        <div class="record" style="display: none;position: relative;margin-left: 206px;top: -467px;">
+            <div style="position: relative;float: left;margin-top: 160px;margin-left: -90px;;">
+                <span  style="font-size:24px;padding-left: 100px;">回访记录:</span>
+                <textarea id="visit-record" name="visit-record" style="width: 400px;height: 200px;margin-left: 100px;"></textarea>
+            </div>
+            <div style="position: relative;float: left;padding-top: 200px;padding-left: 50px;width: 200px">
+                <span style="font-size: 24px" >回访人:</span>
+                <input  id="person" type="text" style="width: 130px" placeholder="单行输入">
+                <div>
+                    <div style="padding-top: 20px;padding-bottom: 20px;padding-left: 36px;">
+                        <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="提交" onclick="submit()">
+                    </div>
+                    <div style="padding-left: 36px">
+                        <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="取消" onclick="cancle()">
+                    </div>
+                </div>
+
+            </div>
+
+        </div>
+    </div>
+
+    {{include "/common/bottom.html"}}
+
+</div>
+
+
+
+</body>
+<script type="text/javascript" src="/js/bootbox.js"></script>
+<script>
+    var uid = "";
+    $(function () {
+        $("#audit").datatable({
+            perPage: 5
+            ,
+            showPagination: true
+            ,
+            checkbox: "" //check radio
+            ,
+            checkboxHeader: false
+            ,
+            idField: "_id"
+            ,
+            classname: "table-hover"
+            ,
+            css: {"height": "300px"}
+            //,post:{"name":"ee"}
+            ,
+            url: '/manage/jyloan/telephoneinterviews'
+            ,
+            columns: [
+
+                {
+                    title: "企业名称", field: "companyName", callback: function (d) {
+                        return d.companyName
+                    }
+                },
+                {
+                    title: "注册地", field: "registration", callback: function (d) {
+                        return d.registration
+                    }
+                },
+                {
+                    title: "联系人", field: "person", callback: function (d) {
+                        return d.username
+                    }
+                },
+                {
+                    title: "手机号", field: "phonenum", callback: function (d) {
+                        return d.phoneNum
+                    }
+                },
+                {
+                    title: "贷款金额", field: "price", callback: function (d) {
+                        return d.price
+                    }
+                },
+                {
+                    title: "贷款期限", field: "term", callback: function (d) {
+                        return d.term
+                    }
+                },
+                {
+                    title: "贷款用途", field: "remark", callback: function (d) {
+                        return d.remark
+
+                    }
+                },
+                {
+                    title: "uid", field: "remark", callback: function (d) {
+                        return d.uid
+
+                    }
+                }
+            ]
+        });
+    });
+
+    $(function(){
+    var kindEditInit=function(){
+        editor = KindEditor.create('textarea[name="visit-record"]', {
+            id:"ke_editor",
+            allowFileManager : false,
+            filterMode:true,
+            width : '10px',
+            height:'20px',
+            items:items_simp,
+            allowImageRemoteImageRemote:false,
+            uploadJson : '/filemanage/upload',
+            afterCreate:function() {
+                this.sync()
+            },
+            beforesubmit:function(){
+                this.sync()
+            },
+            afterBlur: function(){
+                this.sync()
+            }
+        });
+    };
+    kindEditInit()
+});
+    var uid = "";
+    //双击事件
+    $("#content").on("dblclick","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
+        uid = $(this).find("td").eq(7).text();
+        $("#visit-record").val("");
+        $("#person").val("");
+        $(".record").show();
+        $("#person").focus();
+        $(this).css("background","rgb(202, 198, 133)")
+        $(this).siblings().css("background","rgb(255,255,255)");
+
+    });
+    //单击事件
+    $("#content").on("click","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
+        $(this).addClass("selected");
+        $(this).css("background","rgb(202, 198, 133)");
+        $(this).siblings().css("background","rgb(255,255,255)");
+        $(this).siblings().removeClass("selected");
+        $("#visit-record").val("");
+        $("#person").val("");
+        $(".record").hide()
+    });
+    function submit() {
+        var content = $("#visit-record").val();
+        var person = $("#person").val();
+        if (content!=""&&person!=""){
+            $.ajax({
+                url: "/manage/jy_loan/returnvisitrecords",
+                type: "POST",
+                data: {
+                    "msg":content,
+                    "person":person,
+                    "uid":uid
+                },
+                async:false,
+                datatype: "json",
+                success:function (r) {
+                    if (r.data.status==1&&r.error_code=="0"){
+                        window.location.href = "/manage/loan/visitlist"
+                    }
+                }
+            })
+        }else{
+            alert("回访记录和回访人不能为空")
+        }
+
+
+    }
+    //取消
+    function cancle(){
+        $("#visit-record").val("");
+        $("#person").val("");
+        $(".record").hide()
+
+    }
+    document.onkeydown = function (event) {
+        var e = event || window.event || arguments.callee.caller.arguments[0];
+        var t = $("#audit>.dt-table-wrapper>.table>tbody>tr")
+        if (e && e.keyCode == 40) { //下
+            $("#visit-record").val("");
+            $("#person").val("");
+            $(".record").hide()
+            for(var i=0;i<t.length;i++){
+                if ($(t[i]).hasClass("selected")){
+                    if (i + 1 >=t.length){
+                        break
+                    }else{
+                        $(t[i]).removeClass("selected");
+                        $(t[i]).css("background","#fff");
+                        $(t[i+1]).addClass("selected");
+                        $(t[i+1]).css("background","rgb(202, 198, 133)");
+                        break
+                    }
+                }
+            }
+        }
+
+        if (e && e.keyCode == 38) { // 上
+            $("#visit-record").val("");
+            $("#person").val("");
+            $(".record").hide()
+            for(var i=0;i<t.length;i++){
+                if ($(t[i]).hasClass("selected")){
+                    if (i <= 0){
+                        break
+                    }else{
+                        $(t[i]).removeClass("selected");
+                        $(t[i]).css("background","#fff");
+                        $(t[i-1]).addClass("selected");
+                        $(t[i-1]).css("background","rgb(202, 198, 133)");
+                        break
+                    }
+                }
+            }
+        }
+
+    }
+
+</script>
+</html>

+ 254 - 0
core/src/web/templates/manage/rbac/mgIndex.html

@@ -0,0 +1,254 @@
+<html>
+<head>
+<title>目录管理</title>
+{{include "/common/inc.html"}}
+<style type="text/css">
+
+#content table{
+table-layout: fixed;
+border:0px;
+font-size:14px;
+}
+.table>thead>tr>th:nth-child(1){
+width:10%;
+}
+.table>thead>tr>th:nth-child(2){
+width:25%;
+}
+.table>thead>tr>th:nth-child(3){
+width:15%;
+}
+.table>thead>tr>th:nth-child(4){
+width:50%;
+}
+.table>thead>tr>th:nth-last-child(1){
+width:0px;
+}
+.table>thead>tr>th{
+border:0px;
+font-size:14px;
+}
+.table>tbody>tr>td{
+white-space: nowrap;
+text-overflow: ellipsis;
+overflow: hidden;
+border:0px;
+border-bottom:1px dashed #999999;
+}
+#_Container_0{
+background-color:#FFFFFF;
+}
+.buttonStyle{width:64px;height:22px;line-height:22px;color:#369;text-align:center;background:url({{Msg "seo" "cdn"}}/images/buticon.gif) no-repeat left top;border:0;font-size:12px;}
+.buttonStyle:hover{background:url({{Msg "seo" "cdn"}}/images/buticon.gif) no-repeat left -23px;}
+.pagination>.active>a:hover,.pagination>.active>a:focus{
+background-color:#18CC7D;
+}
+#sidebar { margin-left:0px;}
+.hui{color:#999999;}
+#showCL .checkbox label:first-child{
+	margin-left: 10px !important;
+}
+#showCL .checkbox label{
+	margin-bottom: 15px;
+    margin-right: 20px;
+}
+</style>
+</head>
+<body>
+{{include "/manage/audithead.html"}}
+<div class="row" style="width:96%; margin:0 auto;">
+	<div  class="cont-one"  style="margin-top:10px;" >
+		{{include "/manage/rbac/slider.html"}}
+		<div id="content">
+		<!-- 中间 -->
+		<script>
+			$(function(){
+				$("#audit").datatable({
+				   perPage: 10
+				  ,showPagination:true
+				  ,checkbox:"" //check radio
+				  ,checkboxHeader:false
+				  ,idField:"_id"
+				  ,classname:"table-hover"
+				  ,css:{"height":"450px"}
+				  //,post:{"name":"ee"}
+				  ,buttons: ['<div style="width:50%;margin:5px" class="input-group pull-right" id="search"><input type="text" id="searchtext" value=""  data-original-title="Search" class="form-control" placeholder="请输入openid..."><span class="input-group-btn"><button class="btn btn-success" onclick="SearchContent()" data-original-title="Search" id="searchtip" type="button" style="height:38px;">检索</button></span></div>']
+				  , url: '/manage/rbac/mgUsersList'
+				  , columns: [
+				        {
+				            title: "用户昵称",field: "s_nickname", callback: function (data) {
+		                        return data.s_nickname
+		                    }
+				        }
+				      , {
+				            title: "openid", field: "s_m_openid", callback: function (data) {
+		                        return data.s_m_openid
+		                    }
+				        },
+						{
+							title:"注册时间",field:"l_registedate", callback: function (data) {
+		                        return data.l_registedate
+		                    }
+						},
+						{
+							title:"操作",field:"_id",callback:function(ct,cd,val,k,m){
+							 	var id = ct["_id"]
+								if(ct["i_type"]==0){
+							 		v="<button dataid='"+id+"' class='btn  btn-success btn-xs' onclick='change(this)' powerids='"+ct["s_power"]+"' style='opacity:1;margin-right: 10px;padding: 2px 5px;'>查看或修改权限</button><button class='btn  btn-warning btn-xs'  onclick=del(\'"+id+"\')  style='opacity:1;padding: 2px 5px;'>删除权限</button>"
+								}else{
+							 		v="<button dataid='"+id+"' class='btn  btn-success btn-xs' onclick='newMG(this)' style='opacity:1;margin-right: 10px;padding: 2px 5px;'>添加</button>"
+								}
+								return v
+							}
+							
+						}
+				    ]
+				});
+			})
+			</script>
+		<div id="audit"></div>
+		{{include "/manage/auditdetail.html"}}
+		</div>
+	</div>
+</div>
+<div class="modal fade" id="addModal" tabindex="-1" role="dialog">
+  <div class="modal-dialog" role="document">
+    <div class="modal-content">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4 class="modal-title">管理员操作</h4>
+      </div>
+      <div class="modal-body" id="showCL">
+      		
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+        <button type="button" class="btn btn-primary" onclick="saveData()">提交</button>
+      </div>
+    </div>
+  </div>
+</div>
+
+{{include "/common/bottom.html"}}
+<script src="/js/qfwtable.js"></script>
+<script type="text/javascript" src="/js/zDrag.js"></script>
+<script type="text/javascript" src="/js/zDialog.js"></script>
+<script type="text/javascript">
+	var CLOBJ = {};
+	var MGStr = "";
+	var _id = ""
+	var i_type = 1;
+	function SearchContent(){
+		var find=$("#audit").data("datatable")
+		console.log(find)
+		if(!find.options.opost) find.options.opost=find.options.post||{};
+		find.options.post=$.extend(find.options.opost,{normal:"Y",openid:$("#searchtext").val()});
+		find.options.currentPage=1
+		find.render();
+	}
+	//新增
+	function newMG(th){
+		i_type = 0;
+		_id = $(th).attr("dataid");
+		$("#addModal").modal("show");
+		showCL()
+	}
+	//删除
+	function del(id){
+		i_type = 3;
+		_id = id;
+		saveData("D")
+	}
+	//
+	function change(th){
+		i_type = 0;
+		var rdata = $(th).attr("powerids").split(",");
+		_id = $(th).attr("dataid");
+		console.log(rdata)
+		showCL(rdata)
+	}
+	//
+	function showCL(rdata){
+		if(CLOBJ){
+			var clHtml = '<div class="checkbox">';
+			for(var i in CLOBJ){
+				var checkFlag = "";
+				if(rdata!=undefined&&rdata.length>0){
+					for(var j in rdata){
+						if(i==rdata[j]){
+							checkFlag = "checked";
+							break;
+						}
+					}
+				}
+				clHtml +='<label class="checkbox-inline"><input type="checkbox" '+checkFlag+' value="'+i+'">'+CLOBJ[i]+'</label>'
+			}
+			clHtml += '</div>';
+			$("#showCL").html(clHtml);
+		}
+		$("#addModal").modal("show");
+	}
+  	$(function(){
+		getCL();
+  	})
+	//
+	function getCL(){
+		$.ajax({
+            type: "POST",
+            url: "/manage/rbac/catalogList",
+            data:{},
+            async:false,
+            dataType: "json",
+            success: function(r){
+				if(r.data.length>0){
+					for(var i=0;i<r.data.length;i++){
+						CLOBJ[r.data[i]._id]=r.data[i].s_name
+					}
+				}
+            },
+            error: function(){
+                alert("稍后再试!")
+            }
+        });
+	}
+	//
+	function saveData(t){
+		MGStr = '';
+		if(t!='D'){
+			$("#showCL").find("label").each(function(i,dom){
+				if($(dom).find("input").is(':checked')){
+					if(MGStr!=""){
+						MGStr +=','
+					}
+					MGStr += $(dom).find("input").val()
+				}
+			})
+		}else{
+			MGStr = '0';
+		}
+		var param = {
+			"MGStr":MGStr,
+			"_id":_id,
+			"i_type":i_type,
+		};
+        $.ajax({
+            type: "POST",
+            url: "/manage/rbac/saveMG",
+            data:param,
+            async:false,
+            dataType: "json",
+            success: function(r){
+				if(r.success){
+					document.location.reload();
+				}else{
+					alert("稍后再试!")
+				}
+            },
+            error: function(){
+                alert("稍后再试!")
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 62 - 0
core/src/web/templates/manage/rbac/slider.html

@@ -0,0 +1,62 @@
+<style>
+.liactive{background-color:#f5f5f5;}
+</style>
+<div id="sidebar">
+	<ul>
+		<li dataId="glyphicon-th-list" class="list-group-item" >
+			<a style=" font-weight:normal;" href="/manage/rbac/index">
+				<i class="glyphicon glyphicon-th-list"></i>
+				<span>目录管理</span>
+			</a>
+		</li>
+		<li dataId="glyphicon-user" class="list-group-item">
+			<a style=" font-weight:normal;" href="/manage/rbac/mgIndex">
+				<i class="glyphicon glyphicon-user"></i> 
+				<span>管理员管理</span>
+			</a>
+		</li>
+		<li id="pcUndate"  class="list-group-item">
+			<a style=" font-weight:normal;" onclick="pushVersion()">
+				<i class="glyphicon glyphicon-level-up"></i> 
+				<span>PC助手版本更新</span>
+			</a>
+		</li>
+	</ul>
+ <style type="text/css">.glyphicon{font-family:'Glyphicons Halflings';}</style>
+	 <script>
+		$(function(){
+			selectActive();
+		})
+		//
+		function selectActive(){
+			var liactive = sessionStorage.getItem("liactive");
+			var liflag = false;
+			$("#sidebar").find("li").each(function(i,dom){
+				if(liactive!=null&&liactive==$(dom).attr("dataId")){
+					$(dom).addClass("liactive");
+					liflag = true;
+				}
+				$(dom).click(function(){
+					sessionStorage.setItem("liactive",$(dom).attr("dataId"));
+				})
+			})
+			if (!liflag){
+				$("#sidebar").find("li").eq(0).addClass("liactive");
+			}
+		}
+		//
+		 function pushVersion() {
+		     var con = confirm("您确定要更新PC助手版本吗?");
+		     if(con){
+	                $.post("/manage/message/pushVersion",{},function(data){
+	                    console.log(data);
+	                    if (data.repl){
+	                        alert("版本号:"+data.version+",更新成功!");
+	                    }else{
+	                        alert("更新失败");
+	                    }
+	                })
+			 }
+	        }
+	 </script>
+</div>	

+ 250 - 0
core/src/web/templates/manage/rbac/systemsetting.html

@@ -0,0 +1,250 @@
+<html>
+<head>
+<title>目录管理</title>
+{{include "/common/inc.html"}}
+<style type="text/css">
+
+#content table{
+table-layout: fixed;
+border:0px;
+font-size:14px;
+}
+.table>thead>tr>th:nth-child(1){
+width:15%;
+}
+.table>thead>tr>th:nth-child(2){
+width:25%;
+}
+.table>thead>tr>th:nth-child(3){
+width:25%;
+}
+.table>thead>tr>th:nth-child(4){
+width:5%;
+}
+.table>thead>tr>th:nth-child(5){
+width:15%;
+}
+.table>thead>tr>th:nth-child(6){
+width:15%;
+}
+.table>thead>tr>th:nth-last-child(1){
+width:0px;
+}
+.table>thead>tr>th{
+border:0px;
+font-size:14px;
+}
+.table>tbody>tr>td{
+white-space: nowrap;
+text-overflow: ellipsis;
+overflow: hidden;
+border:0px;
+border-bottom:1px dashed #999999;
+}
+#_Container_0{
+background-color:#FFFFFF;
+}
+.buttonStyle{width:64px;height:22px;line-height:22px;color:#369;text-align:center;background:url({{Msg "seo" "cdn"}}/images/buticon.gif) no-repeat left top;border:0;font-size:12px;}
+.buttonStyle:hover{background:url({{Msg "seo" "cdn"}}/images/buticon.gif) no-repeat left -23px;}
+.pagination>.active>a:hover,.pagination>.active>a:focus{
+background-color:#18CC7D;
+}
+#sidebar { margin-left:0px;}
+.hui{color:#999999;}
+</style>
+</head>
+<body>
+{{include "/manage/audithead.html"}}
+<div class="row" style="width:96%; margin:0 auto;">
+	<div  class="cont-one"  style="margin-top:10px;" >
+		{{include "/manage/rbac/slider.html"}}
+		<div id="content">
+		<!-- 中间 -->
+		<script>
+			$(function(){
+				$("#audit").datatable({
+				   perPage: 10
+				  ,showPagination:true
+				  ,checkbox:"" //check radio
+				  ,checkboxHeader:false
+				  ,idField:"_id"
+				  ,classname:"table-hover"
+				  ,css:{"height":"450px"}
+				  //,post:{"name":"ee"}
+				  ,buttons: ['<div style="width:10%;margin:5px" class="input-group pull-right" id="search"><span class="input-group-btn"><button class="btn btn-success" onclick="newCL()" data-original-title="Search" id="searchtip" type="button" style="height:38px;border-radius: 4px;">新增目录</button></span></div>']
+				  , url: '/manage/rbac/catalogList'
+				  , columns: [
+				        {
+				            title: "名称",field: "s_name", callback: function (data) {
+		                        return data.s_name
+		                    }
+				        }
+				      , {
+				            title: "url地址", field: "s_url", callback: function (data) {
+		                        return data.s_url
+		                    }
+				        },
+						{
+				            title: "备注", field: "s_remark", callback: function (data) {
+		                        return data.s_remark
+		                    }
+				        },
+						{
+				            title: "图标", field: "s_icon",callback:function(ct,cd,val,k,m){
+								return '<i class="glyphicon '+ct["s_icon"]+'"></i>'
+							}	
+				        },
+						{
+							title:"创建时间",field:"l_createdate", callback: function (data) {
+		                        return data.l_createdate
+		                    }
+						},
+						{
+							title:"操作",field:"_id",callback:function(ct,cd,val,k,m){
+							 	var id = ct["_id"]
+							 	v="<button dataid='"+id+"' class='btn  btn-success btn-xs' onclick='change(this)' style='opacity:1;margin-right: 10px;'>修改</button><button class='btn  btn-warning btn-xs'  onclick=del(\'"+id+"\')  style='opacity:1;'>删除</button>"
+								return v
+							}
+							
+						}
+				    ]
+				});
+			})
+			</script>
+		<div id="audit"></div>
+		{{include "/manage/auditdetail.html"}}
+		</div>
+	</div>
+</div>
+<div class="modal fade" id="addModal" tabindex="-1" role="dialog">
+  <div class="modal-dialog" role="document">
+    <div class="modal-content">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4 class="modal-title">新增目录</h4>
+      </div>
+      <div class="modal-body">
+      	<form class="form-horizontal" role="form">
+		  <div class="form-group">
+		    <label for="firstname" class="col-sm-2 control-label">目录名称</label>
+		    <div class="col-sm-4">
+		      	<input type="text" style="display: inline;width: 90%;" class="form-control" id="clname" placeholder="请输入目录名称">
+				<em style="color: red;">*</em>
+		    </div>
+		  </div>
+		  <div class="form-group">
+		    <label for="lastname" class="col-sm-2 control-label">目录地址</label>
+		    <div class="col-sm-8">
+		      	<input type="text" style="display: inline;width: 90%;" class="form-control" id="clurl" placeholder="请输入目录地址">
+				<em style="color: red;">*</em>
+		    </div>
+		  </div>
+		  <div class="form-group">
+		    <label for="lastname" class="col-sm-2 control-label">目录图标</label>
+		    <div class="col-sm-6">
+		      <input type="text" class="form-control" id="cllcon" placeholder="请输入目录图标(不建议重复使用)">
+		    </div>
+			<div class="col-sm-4" style="text-align: center; padding-top: 9px;text-decoration: none;">
+				<a style="text-decoration: none;" target="_blank" href="https://v3.bootcss.com/components">点击选择图标</a>
+			</div>
+		  </div>
+		  <div class="form-group">
+		    <label for="lastname" class="col-sm-2 control-label">目录备注</label>
+		    <div class="col-sm-8">
+		      <input type="text" class="form-control" id="clremark" placeholder="请输入目录备注">
+		    </div>
+		  </div>
+		</form>
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+        <button type="button" class="btn btn-primary" onclick="saveData('S')">保存</button>
+      </div>
+    </div>
+  </div>
+</div>
+
+{{include "/common/bottom.html"}}
+<script src="/js/qfwtable.js"></script>
+<script type="text/javascript" src="/js/zDrag.js"></script>
+<script type="text/javascript" src="/js/zDialog.js"></script>
+<script type="text/javascript">
+	var dotype = "S";
+	var clid = "";
+	//新增
+	function newCL(){
+		dotype = "S";
+		$("#addModal").modal("show");
+	}
+	//更新
+	function change(th){
+		$("#clname").val($(th).parents("tr").find("td").eq("0").text());
+		$("#clurl").val($(th).parents("tr").find("td").eq("1").text());
+		$("#cllcon").val($(th).parents("tr").find("td").eq("3").find("i").attr("class").split(" ")[1]);
+		$("#clremark").val($(th).parents("tr").find("td").eq("2").text());
+		dotype = "U";
+		clid = $(th).attr("dataid");
+		$("#addModal").modal("show");
+	}
+	//删除
+	function del(id){
+		dotype = "D";
+		$.ajax({
+            type: "POST",
+            url: "/manage/rbac/saveCL",
+            data:{"clid":id,"dotype":dotype},
+            async:false,
+            dataType: "json",
+            success: function(r){
+				if(r.success){
+					document.location.reload();
+				}else{
+					alert("稍后再试!")
+				}
+            },
+            error: function(){
+                alert("稍后再试!")
+            }
+        });
+	}
+	function saveData(){
+		if($("#clname").val()==""){
+			alert("目录名称不能为空")
+			return false
+		}
+		if($("#clurl").val()==""){
+			alert("目录地址不能为空")
+			return false
+		}
+		var param = {
+			"clname":$("#clname").val(),
+			"clurl":$("#clurl").val(),
+			"cllcon":$("#cllcon").val(),
+			"clremark":$("#clremark").val(),
+			"dotype":dotype,
+			"clid":clid,
+		};
+        $.ajax({
+            type: "POST",
+            url: "/manage/rbac/saveCL",
+            data:param,
+            async:false,
+            dataType: "json",
+            success: function(r){
+				if(r.success){
+					document.location.reload();
+				}else{
+					alert("稍后再试!")
+				}
+            },
+            error: function(){
+                alert("稍后再试!")
+            }
+        });
+    }
+  	$(function(){
+		//$("#addModal").modal("show");
+  	})
+</script>
+</body>
+</html>

+ 56 - 65
core/src/web/templates/manage/slider.html

@@ -1,74 +1,65 @@
+<style>
+.liactive{background-color:#f5f5f5;}
+</style>
 <div id="sidebar">
 	<ul>
-		<li id="waitaudit" class="list-group-item" ><a style=" font-weight:normal;" href="/manage/system">
-		<i class="glyphicon glyphicon-list-alt"></i> <span>企业审核</span></a></li>
-		<li id="expess"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/articlelist"><i class="glyphicon glyphicon-facetime-video"></i> <span>信息发布</span></a></li>
-		<li id="feedback"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/feedback"><i class="glyphicon glyphicon-share"></i> <span>意见反馈</span></a></li>
-		<li id="course"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/course/index"><i class="glyphicon course-icon"></i> <span>招投标课程管理</span></a></li>
-		<li id="courseOrder"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/courseOrder/index"><i class="glyphicon course-icon"></i> <span>招投标订单管理</span></a></li>
-		<li id="seo"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/seo"><i class="glyphicon glyphicon-euro"></i> <span>SEO优化</span></a></li>
-		<li id="ad"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/ad"><i class="glyphicon glyphicon-th-large"></i> <span>广告管理</span></a></li>
-		<li id="count"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/count"><i class="glyphicon glyphicon-signal"></i> <span>数据统计</span></a></li>
-		<li id="cauditbar"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/caudit"><i class="glyphicon glyphicon-user"></i> <span>开发者认证</span></a></li>
-		<li id="message"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/message/index"><i class="glyphicon glyphicon-comment"></i> <span>消息管理</span></a></li>
-    	<li id="dataReportOrder"  class="list-group-item"><a style=" font-weight:normal;"  href="/manage/dataReportOrder/list"><i class="glyphicon glyphicon-download-alt"></i> <span>数据报告</span></a></li>
-		<li id="dataExportOrder"  class="list-group-item"><a style=" font-weight:normal;"  href="/manage/dataExportOrder/list"><i class="glyphicon glyphicon-download-alt"></i> <span>数据导出订单</span></a></li>
-		<li id="viporder"  class="list-group-item"><a style=" font-weight:normal;"  href="/manage/vipOrder/list"><i class="glyphicon glyphicon-download-alt"></i> <span>VIP订阅订单</span></a></li>
-		<li id="entnicheorder"  class="list-group-item"><a style=" font-weight:normal;"  href="/manage/entnicheOrder/list"><i class="glyphicon glyphicon-download-alt"></i> <span>企业商机管理</span></a></li>
-    	<li id="pcUndate"  class="list-group-item"><a style=" font-weight:normal;" onclick="pushVersion()"><i class="glyphicon glyphicon-level-up"></i> <span>PC助手版本更新</span></a></li>
-		<!-- <li id="jydata"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/data/index"><i class="glyphicon glyphicon-euro"></i> <span>剑鱼数据管理</span></a></li>
-		<li id="databack"  class="list-group-item"><a style=" font-weight:normal;" href="/manage/data/back"><i class="glyphicon glyphicon-euro"></i> <span>剑鱼备份数据</span></a></li> -->
-		<li id="sendMessage"  class="sendActive list-group-item" style="border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;"><a style="font-weight:normal;"  data-toggle="collapse" 
-    data-target="#collapseOne"><i class="glyphicon glyphicon-log-in"></i> <span>推送管理</span></a>
-		</li>
-		<div id="collapseOne"  class="sendActive collapse" style="border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom: 1px solid #ccc;background-color: rgb(255, 255, 255);border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;">
-			<a style="font-weight:normal;display: block;color: #999;text-decoration: none;height: 45px;line-height: 45px;  margin-left: 56px;"  href="/manage/orderMessage/list"><span>订阅消息</span></a>
-		</div>
-
 	</ul>
  <style type="text/css">.glyphicon{font-family:'Glyphicons Halflings';}</style>
 	 <script>
 		$(function(){
-			var sendfirst = true;
-			if(window.location.href.indexOf("orderMessage")>0){
-				sendfirst = false;
-			};
-			$("#sendMessage").mouseover(function(){
-				$("#collapseOne").css({"background-color":"#f5f5f5"});
-				$("#sendMessage").css({"background-color":"#f5f5f5"});
-			}).mouseout(function () {
-				$("#collapseOne").css({"background-color":"rgb(255, 255, 255)"});
-				$("#sendMessage").css({"background-color":"rgb(255, 255, 255)"});
-		    }).click(function(){
-				if (sendfirst){
-					$("#sendMessage").css({"border-bottom-left-radius":"0px","border-bottom-right-radius":"0px","border-bottom-color":"#ddd"});
-					sendfirst = false;
-				}else{
-					$("#sendMessage").css({"border-bottom-left-radius":"4px","border-bottom-right-radius":"4px","border-bottom-color":"#ccc"});
-					sendfirst = true;
-				}
-			});
-			
-			$("#collapseOne").mouseover(function(){
-				$("#sendMessage").css({"background-color":"#f5f5f5"});
-				$("#collapseOne").css({"background-color":"#eee"});
-			}).mouseout(function () {
-				$("#collapseOne").css({"background-color":"rgb(255, 255, 255)"});
-				$("#sendMessage").css({"background-color":"rgb(255, 255, 255)"});
-		    })
+			getEachCL();
 		})
-		 function pushVersion() {
-		     var con = confirm("您确定要更新PC助手版本吗?");
-		     if(con){
-                 $.post("/manage/message/pushVersion",{},function(data){
-                     console.log(data);
-                     if (data.repl){
-                         alert("版本号:"+data.version+",更新成功!");
-                     }else{
-                         alert("更新失败");
-                     }
-                 })
-			 }
-         }
+		function getEachCL(){
+			$.ajax({
+	            type: "POST",
+	            url: "/manage/rbac/gEachCL",
+	            data:{},
+	            async:false,
+	            dataType: "json",
+	            success: function(r){
+					if (r.success){
+						appendHtml(r.data.data)
+					}
+	            },
+	            error: function(){
+	                alert("稍后再试!")
+	            }
+	        });
+		}
+		//
+		function appendHtml(r){
+			if(r.length>0){
+				var labHtml = '';
+				for(var i=0;i<r.length;i++){
+					labHtml += '<li dataId="'+r[i].s_icon+'" class="list-group-item" >'
+							+'<a style=" font-weight:normal;" href="'+r[i].s_url+'">'
+							+'<i class="glyphicon '+r[i].s_icon+'"></i>'
+							+'<span>'+r[i].s_name+'</span>'
+							+'</a>'
+							+'</li>';
+				}
+				$("#sidebar ul").html(labHtml);
+				setTimeout(function(){
+					selectActive();
+				},500)
+			}
+		}
+		//
+		function selectActive(){
+			var liactive = sessionStorage.getItem("liactive");
+			var liflag = false;
+			$("#sidebar").find("li").each(function(i,dom){
+				if(liactive!=null&&liactive==$(dom).attr("dataId")){
+					$(dom).addClass("liactive");
+					liflag = true;
+				}
+				$(dom).click(function(){
+					sessionStorage.setItem("liactive",$(dom).attr("dataId"));
+				})
+			})
+			if (!liflag){
+				$("#sidebar").find("li").eq(0).addClass("liactive");
+			}
+		}
 	 </script>
 </div>	

+ 0 - 1
core/src/web/templates/manage/systemsetting.html

@@ -60,7 +60,6 @@ background-color:#18CC7D;
 
 <!-- 中间 -->
 <script>
-
 $(function(){
 	$("#audit").datatable({
    perPage: 10