Эх сурвалжийг харах

Merge branch 'release' into dev2.6.5.3

lianbingjie 5 жил өмнө
parent
commit
992b465297

+ 0 - 2
core/README.md

@@ -1,2 +0,0 @@
-v2.6.4.1
-商机洞察增加意见反馈

+ 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("/")
+		//		}
 
 	}
 }

+ 39 - 19
core/src/qfw/manage/loan.go

@@ -31,7 +31,8 @@ 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"`
+	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"`
@@ -55,9 +56,14 @@ func (this *Front)VisitList()error{
 }
 
 func (this *Front)Evaluationlist()error{
-	return this.Render("/manage/loan/evaluation.html")
+	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")
 }
@@ -98,9 +104,12 @@ func (this *LoanAction)Evaluation(){
 		uid := this.GetString("uid")
 		query := make(map[string]interface{})
 		query["uid"] = uid
-		data :=*mgo.Find("jy_loan",query,nil,`{"visit_msg":1,"visit_person":1,"visit_time":1}`,false,0,0)
-		this.ServeJson(map[string]interface{}{
-			"data":data,
+		data :=*mgo.FindOne("jy_loan",query)
+		this.ServeJson(map[string][]interface{}{
+			"data":[]interface{}{
+				data,
+			},
+
 		})
 	}
 }
@@ -146,9 +155,8 @@ func (this *LoanAction)Telephone_interviews(){
 		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)
+		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,
@@ -156,10 +164,10 @@ func (this *LoanAction)Telephone_interviews(){
 				"totalRows":   count,
 			})
 		}else{
-			data["status"] = 0
 			this.ServeJson(map[string]interface{}{
-				"error_code":"0",
-				"data":data,
+				"currentPage": currentPage,
+				"data":        []interface{}{},
+				"totalRows":   0,
 			})
 		}
 	}
@@ -228,11 +236,11 @@ func (this *LoanAction)Evaluation_list(){
 		currentPage, _ := this.GetInteger("currentPage")
 		perPage, _ := this.GetInteger("perPage")
 		query :=make(map[string]interface{})
+		query["visit_back"] = 1
 		query["opinion"] = 0
-		ldata:=*mgo.Find("jy_loan",query,nil,nil,false,(currentPage-1)*perPage, perPage)
+		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{
+		if len(*ldata)!=0{
 			this.ServeJson(map[string]interface{}{
 				"currentPage": currentPage,
 				"data":        ldata,
@@ -240,10 +248,10 @@ func (this *LoanAction)Evaluation_list(){
 			})
 
 		}else{
-			data["status"] = 0
 			this.ServeJson(map[string]interface{}{
-				"error_code":"0",
-				"data":data,
+				"currentPage": currentPage,
+				"data":        []interface{}{},
+				"totalRows":   0,
 			})
 		}
 	}
@@ -258,16 +266,28 @@ func (this *LoanAction)Clue_manage(){
 			"error_code":"1004",
 		})
 	}else{
+		query := make(map[string]interface{})
+		query["opinion"] = 1
+		query["visit_back"] = 1
+		query["companyName"] = map[string]interface{}{
+			"$exists":true,
+		}
 		currentPage, _ := this.GetInteger("currentPage")
 		perPage, _ := this.GetInteger("perPage")
-		data :=mgo.Find("jy_loan",nil,`{"application":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){
+		data :=mgo.Find("jy_loan",query,`{"application_time":1}`,`{"companyName":1,"registration":1,"visit_person":1,"visit_time":1,"account_manager":1,"opinion_time":1,"classify_type":1,"uid":1,"application_time":1}`,false,(currentPage-1)*perPage, perPage)
+		count := mgo.Count("jy_loan",query)
+		if len(*data)!=0{
 			this.ServeJson(map[string]interface{}{
 				"currentPage": currentPage,
 				"data":        data,
 				"totalRows":   count,
 			})
+		}else{
+			this.ServeJson(map[string]interface{}{
+				"currentPage": currentPage,
+				"data":        []interface{}{},
+				"totalRows":   0,
+			})
 		}
 	}
 }

+ 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}

+ 12 - 0
core/src/web/staticres/loan/js/common.js

@@ -0,0 +1,12 @@
+function timestampToTime(timestamp) {
+    if (typeof(timestamp) == "undefined"){
+        return ""
+    }else{
+        var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+        var Y = date.getFullYear() + '-';
+        var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
+        var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
+        return Y+M+D;
+    }
+
+}

+ 659 - 0
core/src/web/staticres/loan/js/qfwtable.js

@@ -0,0 +1,659 @@
+
+!function($){
+	var tipmsg="没有找到相关内容";
+	var _nilHtml='<div class="text-center" style="margin:-80px auto;"><img src="/images/findnull.png" class="b-findnull"><h4><span  class="glyphicon glyphicon-question-sign text-primary"></span >&nbsp;<strong class="text-muted">$tipmsg</strong></h4></div>';
+	var DataTable = function ( element, options ) {
+    this.$element = $(element);
+    this.options = options;
+	tipmsg=this.options.tipmsg||tipmsg
+	this.options.nilHtml=this.options.nilHtml||_nilHtml.replace("$tipmsg",tipmsg)
+    this.enabled = true;
+    this.columns = [];
+    this.rows = [];
+    // this needs to be handled better
+    //this.localStorageId = "datatable_" + (options.id || options.url.replace(/\W/ig, '_'));
+    this.$default = this.$element.children().length ?this.$element.children():$("<div/>")
+        .addClass("alert alert-error").html(this.options.nilHtml);
+    this.$element.addClass("clearfix");
+    // clear out the localStorage for this entry
+   // if(localStorage) {
+     // localStorage[this.localStorageId] = 'false';
+   // }
+	//在渲染之前事件
+    if(this.options.tablePreRender && typeof this.options.tablePreRender === 'function')
+      this.options.tablePreRender.call(this)
+    // initialize the toolbar	
+    this.render();
+	this.toolbar();
+  };
+DataTable.prototype = {
+     render: function () {
+        var o = this.options, $e = this.$element;
+        // show loading
+        this.loading( true );
+        // reset the columns and rows
+        this.columns = [];
+        this.rows    = [];
+        this.buttons = [];
+        this.$wrapper    = undefined;
+        this.$table      = undefined;
+        this.$header     = undefined;
+        this.$body       = undefined;
+        this.$pagination = undefined;
+		this.$pages = $("<div/>").css("background-color",this.options.pagebg);
+        //if(this.$toolbar) this.$toolbar.remove();
+		
+        // localize the object
+        var that = this;
+		
+        // pull in the data from the ajax call
+        if(o.url !== "") {		
+          $.ajax({
+              url: o.url
+            , type: "POST"
+            , dataType: "json"
+			, async: o.isAsync
+            , data: $.extend({}, o.post, {
+                  currentPage: o.currentPage
+                , perPage: o.perPage
+              })
+            , success: function( res ) {
+				if(o.ajaxSuccess && typeof o.ajaxSuccess === 'function')
+                  o.ajaxSuccess.call(that,res,o);
+				if(o.continueBody){
+					//var res={totalRows:20,data:[{"s_name":"张三","l_registedate":"555"},{"s_name":"gggggg","l_registedate":"555"},{"s_name":"ttttt","l_registedate":"555"}]}
+	                that.resultset = res;
+	                if(!res || res === undefined || !res.data || res.data.length == 0) {
+                      $("#audit").append(that.table());
+                        that.header();
+	                    showError.call(that);
+	                  return;
+	                }
+	                // clear out the current elements in the container
+	                $e.empty();
+	                // set the sort and filter configuration
+	                o.totalRows = res.totalRows;
+	                // set the current page if we're forcing it from the server
+	                if(res.currentPage) o.currentPage = parseInt(res.currentPage);
+	         
+	                // append the table
+	                $e.append(that.table());
+					//显示分页
+					if(o.showPagination){
+						$e.append(that.$pages.append(that.pagination()))
+					}
+	                // render the rest of the table
+	                if(o.showHeader) that.header();
+	
+	                // fill in the table body
+	                that.body();
+	                // render the pagination
+	                //if(o.showPagination && that.pagination())
+	                  
+	                // initialize the toolbar
+	                
+	                // nearly complete... let the user apply any final adjustments
+	                if(o.tableCallback && typeof o.tableCallback === 'function')
+	                  o.tableCallback.call(that);
+				}
+				that.loading( false );				
+              }
+            , error: function( e ) {
+                if(o.ajaxError && typeof o.ajaxError === 'function')
+                  o.ajaxError.call(that);
+                showError.call(that);
+                that.loading( false );
+              }
+          });
+        }
+      }
+    , loading: function ( show) {
+		if(this.options.showLoading){
+	        var $e = this.$element;
+			var loadp
+	        if(!this.$loading) {
+			  loadp=$("<div/>").addClass("progress-bar");
+	          this.$loading = $("<div/>")
+	            .css({
+	                position: 'absolute'
+	              , top: parseInt($e.position().top) + 5
+	              , left: parseInt($e.position().left) + parseInt($e.css("marginLeft")) + Math.floor($e.width() / 4)
+	              , width: Math.floor($e.width() / 2) + "px"
+	            })
+	            .append(
+	              $("<div/>")
+	                .addClass("progress progress-striped active")
+	                .append(
+	                  loadp
+	                )
+	            )
+	            .appendTo(document.body)
+	        }
+	        if(show) {
+	          $e.css({ opacity: 0.2 });
+			  window._n=100;
+			  var n=1;
+			  this.LL=setInterval(function(){
+				n++
+				if(n<4){
+					$(".progress-bar").css("width",window._n+"%")
+				}
+			  },100)
+			 
+	        }else {
+	          $e.css({ opacity: 1 });
+	          this.$loading.remove();
+	          this.$loading = undefined;
+			  clearInterval(this.LL)
+	        }
+	      }
+	}
+
+    , toolbar: function () {
+		if(this.$toolbar) return ;
+		this.buttons=[]
+		if(!this.options.buttons||!this.options.buttons.length) return;
+        var o = this.options
+          , $e = this.$element
+          , that = this;
+		
+		
+        this.$toolbar = $("<div/>").addClass("btn-group-fat");
+		if(o.toolbarCss){
+			this.$toolbar.css(o.toolbarCss)
+		}
+        this.$button_group = $("<div/>").addClass("btn-group").appendTo(this.$toolbar);
+
+        // add all the custom buttons
+		
+        for(var i = 0; i < o.buttons.length; i++) {
+          that.buttons.push(o.buttons[i]);
+        }
+
+        // attach all buttons to the toolbar
+        $.each(this.buttons, function() {
+          that.$button_group.append(this);
+        });
+
+        // attach the toolbar to the section header
+       $e.before(this.$toolbar);
+        return this.$toolbar;
+      }
+
+    , table: function () {
+        var $e = this.$element
+          , o = this.options;
+        if(!this.$table_wrapper) {
+          this.$wrapper = $("<div/>")
+            .addClass("dt-table-wrapper").css(o.css);
+        }
+        if (!this.$table) {
+          this.$table = $('<table/>')
+            .addClass(o.tableClass).addClass(o.classname);
+        }
+        this.$wrapper.append(this.$table);
+        return this.$wrapper;
+      },
+	checkAll:function(checked){
+		this.$body.find("input[name=_tableCheck]").prop('checked',(checked?true:false));
+		this.$body.find("tr").css("background-color",checked?"#EEF3F9":"")
+    },
+	getSelect:function(){
+		var val=this.$body.find("input[name=_tableCheck]:checked"),res=[];
+		if(val&&val.length>0){
+			val.each(function(i,ad){
+				res.push($(this).val());
+			})
+		}
+		return res;
+	}
+	, selectAll:function(){
+		var c=this.options.checkbox;
+		that=this;
+		if(c&&c=="check"){
+			this.$header.off('click', '[name="btSelectAll"]')
+            .on('click', '[name="btSelectAll"]', function () {
+                var checked = $(this).prop('checked');
+                that.checkAll(checked);
+            });
+		}	
+	}
+    , header: function () {
+        var o = this.options
+          , res = this.resultset;
+        if(!this.$header) {
+          this.$header = $('<thead/>');
+          var row = $('<tr/>').css("background","#f2f2f2").css("background-image",
+			  "-webkit-gradient(linear,left 0,left 100%,from(#f8f8f8),to(#ececec))");
+			
+          // loop through the columns
+		  if(o.checkbox){
+			if(o.checkbox=="check"&&o.checkboxHeader){
+				row.append($('<th><input name="btSelectAll" type="checkbox" /><small>全选</small></th>'))
+				this.selectAll();
+			}
+		  }
+          for(var column in o.columns) {
+            var $cell = this.column(column)
+              , colprop = $cell.data("column_properties");
+
+            // attach the sort click event
+            row.append($cell);
+            this.$header.append(row);
+            this.columns.push($cell);
+          }
+
+          // any final user adjustments to the header
+          if(o.headerCallback && typeof o.headerCallback === 'function')
+            o.headerCallback.call(this);
+          this.$table.append(this.$header);
+        }
+        return this.$header;
+      }
+    , body: function () {
+        var res = this.resultset
+          , o = this.options;
+        if(!this.$body) {
+          this.$body = $('<tbody></tbody>');
+
+          // loop through the results
+          for(var i = 0; i < res.data.length; i++) {
+            var row = this.row(res.data[i]);
+            this.$body.append(row);
+            this.rows.push(row);
+          }
+		  this.selectone();
+          if(o.showFilterRow) this.$body.prepend(this.filter());
+          this.$table.append(this.$body);
+        }
+        return this.$body;
+      },
+	  selectone:function(){
+		that=this;
+		if(that.$header){
+			var cb=that.$body.find('input[name="_tableCheck"]');
+			this.$body.off('click','input[name="_tableCheck"]').on("click",'input[name="_tableCheck"]',function(){
+				$(this).closest("tr").css("background-color",$(this).prop("checked")?"#EEF3F9":"")
+				var cb2=that.$body.find('input[name="_tableCheck"]:checked');
+				that.$header.find('[name="btSelectAll"]').prop("checked",cb.length==cb2.length)
+			})
+		}
+	  }
+    , row: function ( rowdata ) {
+        var $row = $("<tr/>")
+          , o = this.options;
+		 if(o.columns&&o.columns.length){
+			  if(o.checkbox){
+				if(o.checkbox=="check"&&o.idField){
+					$row.append($('<td><input value="'+rowdata[o.idField]+'" name="_tableCheck" type="checkbox" /></td>'))
+				}
+			  }
+			// loop through the columns
+			for(var column in o.columns) {
+			  var cell = this.cell( rowdata, column );
+			  $row.append(cell);
+			}
+		}
+        // callback for postprocessing on the row
+        if(o.rowCallback && typeof o.rowCallback === "function")
+          $row = o.rowCallback( $row, rowdata );
+        return $row;
+      }
+
+    , cell: function ( data, column ) {
+		
+        var celldata = data[this.options.columns[column].field] || this.options.columns[column].custom
+          , $cell = $('<td/>')
+          , o = this.options;
+        // preprocess on the cell data for a column
+        if(o.columns[column].callback && typeof o.columns[column].callback === "function")
+          celldata = o.columns[column].callback.call( $cell, data,celldata,o.columns[column],column )
+		  
+        $cell.data("cell_properties", o.columns[column])
+          .addClass(o.columns[column].classname)
+          .append(celldata || "&nbsp;")
+
+        if(o.columns[column].css) $cell.css(o.columns[column].css);
+        if(o.columns[column].hidden) $cell.hide();
+        return $cell;
+      }
+
+    , column: function ( column ) {
+        var $cell = $('<th></th>')
+          , o = this.options
+          , classname = "dt-column_" + column + Math.floor((Math.random()*1000)+1);
+		var tempClass=o.columns[column].classname;
+        o.columns[column].classname  = (tempClass?(tempClass+" "):"")+classname;
+
+        $cell
+          .data("column_properties", o.columns[column])
+          .addClass(classname)
+          .text(o.columns[column].title);
+        if(o.columns[column].css) $cell.css(o.columns[column].css);
+        if(o.columns[column].hidden) $cell.hide();
+        return $cell;
+      }
+    , pagination: function () {
+		//获取当前地址url 如果是订阅消息页面  执行方法 removeChecked() 
+		//该方法再orderlist.html页面 用于翻页取消全选状态
+		var orderMessage_list = window.location.pathname;
+		if(orderMessage_list=="/manage/orderMessage/list"){
+			removeChecked();
+		}
+        var $e = this.$element
+          , that = this
+          , o = this.options
+          , res = this.resultset;
+        // no paging needed
+        //if(o.perPage >= res.totalRows) return;
+        if(!this.$pagination) {
+          this.$pagination = $("<div/>").addClass("text-center").css("margin-top","-20px");
+          if(o.pageclass) this.$pagination.addClass(o.pageclass)
+		  // how many pages?
+          o.pageCount = Math.ceil(res.totalRows / o.perPage);
+
+          // setup the pager container and the quick page buttons
+          var $pager = $("<ul></ul>").addClass("pagination")
+            , $first = $("<li></li>").append(
+                $("<a></a>")
+                  .attr("href", "#")
+                  .data("page", 1)
+                  .html("&laquo;")
+                  .click(function() {
+					if ($(this).closest("li").attr("class")=="disabled"){
+						return false
+					}
+                    o.currentPage = 1
+                    that.render();
+                    return false;
+                  })
+              )
+            , $previous = $("<li></li>").append(
+                $("<a></a>")
+                  .attr("href", "#")
+                  .data("page", o.currentPage - 1)
+                  .html("&lt;")
+                  .click(function() {
+					if ($(this).closest("li").attr("class")=="disabled"){
+						return false
+					}
+                    o.currentPage -= 1
+                    o.currentPage = o.currentPage >= 1 ? o.currentPage : 1
+                    that.render();
+                    return false;
+                  })
+              )
+            , $next = $("<li></li>").append(
+                $("<a></a>")
+                  .attr("href", "#")
+                  .data("page", o.currentPage + 1)
+                  .html("&gt;")
+                  .click(function() {
+					if ($(this).closest("li").attr("class")=="disabled"){
+						return false
+					}
+                    o.currentPage += 1
+                    o.currentPage = o.currentPage <= o.pageCount? o.currentPage : o.pageCount
+                    that.render();
+                    return false;
+                  })
+              )
+            , $last = $("<li></li>").append(
+                $("<a></a>")
+                  .attr("href", "#")
+                  .data("page", o.pageCount)
+                  .html("&raquo;")
+                  .click(function() {
+					if ($(this).closest("li").attr("class")=="disabled"){
+						return false
+					}
+                    o.currentPage = o.pageCount
+                    that.render();
+                    return false;
+                  })
+              );
+          var totalPages = o.pagePadding * 2
+            , start
+            , end;
+          if(totalPages >= o.pageCount) {
+            start = 1;
+            end = o.pageCount;
+          }
+          else {
+            start = o.currentPage - o.pagePadding;
+            if(start <= 0) start = 1;
+
+            end = start + totalPages;
+            if(end > o.pageCount) {
+              end = o.pageCount;
+              start = end - totalPages;
+            }
+          }
+          // append the pagination links
+          for(var i = start; i <= end; i++) {
+            var $link = $("<li></li>")
+              .append(
+                $("<a></a>")
+                  .attr("href", "#")
+                  .data("page", i)
+                  .text(i)
+                  .click(function() {
+                    o.currentPage = $(this).data('page')
+                    that.render();
+                    return false;
+                  })
+              );
+              if(i == o.currentPage) $link.addClass("active");
+              $pager.append($link);
+          }
+
+          // append quick jump buttons
+          if(o.currentPage == 1) {
+            $first.addClass("disabled");
+            $previous.addClass("disabled");
+          }
+          if(o.currentPage == o.pageCount) {
+            $next.addClass("disabled");
+            $last.addClass("disabled");
+          }
+          $pager.prepend($first, $previous);
+          $pager.append($next, $last);
+
+          this.$pagination.append($pager);
+        }
+        return this.$pagination;
+      }
+    , remove: function() {
+        var $e = this.$element
+        if(this.$section_header) this.$section_header.remove();
+        $e.data("datatable", null);
+        $e.empty();
+      }
+  };
+
+  
+  function _updatePerPage(that) {
+    var o = that.options;
+    // update the perpage value
+    o.perPage = $(this).data("value");
+    // the offset
+    var offset = o.currentPage * o.perPage;
+    while(offset > o.totalRows) {
+      o.currentPage--;
+      offset = o.currentPage * o.perPage;
+    }
+    if(o.currentPage < 1) o.currentPage = 1;
+    if($(this).popover) $(this).popover('hide');
+    // update the table
+    that.render();
+    return false;
+  }
+
+  function _initPerPage() {
+    var o = this.options
+      , $e = this.$element
+      , that = this;
+
+    // per page options and current filter/sorting
+    var $perpage_select = $("<a></a>")
+      .addClass("btn dropdown-toggle")
+      .data("content", "Change the number of rows per page.")
+      .attr("data-toggle", "dropdown")
+      .html(o.perPage + "&nbsp;")
+      .css({ fontWeight: 'normal' })
+      .append(
+        $("<span></span>")
+          .addClass("caret")
+      )
+      .popover({
+        "trigger": 'hover',
+        "placement":'top'
+      });
+    this.buttons.push($perpage_select);
+
+    var $perpage_values = $("<ul></ul>")
+      .addClass("dropdown-menu")
+      .css({ fontSize: 'initial', fontWeight: 'normal' })
+      .append(
+          $('<li data-value="10"><a href="#">10</a></li>')
+            .click(function() { _updatePerPage.call(this, that); return false; })
+        , $('<li data-value="20"><a href="#">20</a></li>')
+            .click(function() { _updatePerPage.call(this, that); return false; })
+        , $('<li data-value="50"><a href="#">50</a></li>')
+            .click(function() { _updatePerPage.call(this, that); return false; })
+        , $('<li data-value="100"><a href="#">100</a></li>')
+            .click(function() { _updatePerPage.call(this, that); return false; })
+        , $('<li data-value="150"><a href="#">200</a></li>')
+            .click(function() { _updatePerPage.call(this, that); return false; })
+      );
+    this.buttons.push($perpage_values);
+  }
+
+  function _initTableInfo() {
+    var o = this.options
+      , $e = this.$element
+      , $info = $("<a></a>");
+
+    // render the display modal button
+    $info
+      .addClass("btn")
+      .attr("href", "#")
+      .append(
+        $("<span></span>")
+          .addClass("glyphicon glyphicon-info-sign")
+      )
+      .click(function() {
+        return false;
+      });
+
+    var $page_sort = []
+      , $page_filter = [];
+
+    // sort
+    $.each(o.sort, function(i, v){
+      if(!v.length) return;
+      var heading;
+      for(var column in o.columns) {
+        if(o.columns[column].field == v[0]) heading = o.columns[column].title;
+      }
+      $page_sort.push( heading + " " + v[1].toUpperCase() );
+    });
+
+    // filter
+    $.each(o.filter, function(k, v) {
+      var heading;
+      for(var column in o.columns) {
+        if(o.columns[column].field == k) heading = o.columns[column].title;
+      }
+      $page_filter.push( (heading || k) + " = '" + v + "'" );
+    });
+    $($info)
+      .data("content",
+        $('<dl></dl>').append(
+          $page_sort.length > 0 ? '<dt><i class="icon-th-list"></i> Sort:</dt><dd>' + $page_sort.join(", ") + '</dd>' : ''
+          ,
+          $page_filter.length > 0 ? '<dt><i class="icon-filter"></i> Filter:</dt><dd>' + $page_filter.join(", ") + '</dd>' : ''
+        ))
+      .popover({
+        placement: "bottom"
+      });
+
+    this.buttons.unshift($info);
+  }
+    function showError() {
+        var o = this.options
+            , $e = this.$element;
+        // $e.empty();
+        // initialize the toolbar
+        this.toolbar();
+        // nearly complete... let the user apply any final adjustments
+        if(o.tableCallback && typeof o.tableCallback === 'function')
+            o.tableCallback.call(this);
+        this.loading( false );
+        if(this.$default) $e.append(this.$default);
+    }
+
+  $.fn.datatable = function ( options,_relatedTarget,flag ) {
+	    var value;
+			var data = this.data("datatable");
+            if (typeof options === 'string') {
+                if (!data) {
+                    return;
+                }
+                value = data[options]&&data[options](_relatedTarget);
+                if (options === 'destroy') {
+                    this.removeData('bootstrap.table');
+                }
+            }
+            if (!data||flag) {
+               $.fn.datatable.init.call(this,options,"datatable",flag)
+            }
+        return typeof value === 'undefined' ? this : value;
+  };
+  $.fn.datatable.init = function (options,name,flag) {
+      options = $.extend({}, $.fn.datatable.defaults, options);
+      var datatable = $(this).data(name);
+      if (!datatable||flag) {
+        datatable = new DataTable(this, options);
+        $(this).data(name, datatable);
+      }
+      return datatable;
+  };
+
+  $.fn.datatable.defaults = {
+    debug: true,
+    id: undefined,
+    tableClass: 'table',
+	css:{},
+    perPage: 10,
+    pagePadding: 2,
+    post: {},
+    buttons: [],
+    pageclass:'',
+	classname:'table-hover',
+	showHeader:true
+   ,checkbox:"" //check radio
+   ,idField:""
+   ,checkboxHeader:true,
+    sectionHeader: undefined,
+    totalRows: 0,
+    currentPage: 1,
+    showPagination: true,
+    showTopPagination: false,
+    allowExport: false,
+    allowOverflow: true,
+    url: '',
+    columns: [],
+    rowCallback: undefined,
+    tableCallback: undefined,
+    headerCallback: undefined,
+    tablePreRender: undefined,
+	ajaxSuccess:undefined,
+	continueBody:true,//继续解析主体
+	ajaxError:undefined,
+	pagebg:"",//分页条背景色
+	showLoading:false, //显示进度条
+	isAsync: false
+	//,toolbarCss:{"background-color":""} //工具条颜色
+  };
+}(jQuery)

+ 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)

+ 17 - 9
core/src/web/templates/manage/loan/classSet.html

@@ -69,8 +69,8 @@
 </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 style="width: 120px;height: 40px;position: relative;float: right;">
+      <a id="return" href="/manage/jyloan/list"> 返回上一级</a>
     </div>
     <div class="title">线索分类设置:</div>
     <div class="table-content">
@@ -92,8 +92,8 @@
         totle_rows = tbody.rows.length;
         if (totle_rows<=10){
           var tr = document.createElement('tr')
-          var classify_type = $("#type").val();
-          var classify_discribe = $("#discribe").val()
+          var classify_type = document.getElementById("type").value;
+          var classify_discribe = document.getElementById("discribe").value;
           if (classify_type!=""&&classify_discribe){
             $.ajax({
               url:"/manage/jy_loan/updataclassification",
@@ -102,13 +102,13 @@
               data:{"type":"add","category":classify_type,"description":classify_discribe},
               success:function (d) {
                 if (d.data.status == "1"){
-                  // window.location.href = "/manage/loan/setting"
+                  window.location.reload();
                 }
               }
             })
             // 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();
+            // window.location.reload();
           }
         }
 
@@ -123,7 +123,7 @@
           data:{"type":"del","uid":id},
           success:function (d) {
             if (d.data.status == "1"){
-              window.location.href = "/manage/loan/setting"
+              window.location.reload();
             }
 
           }
@@ -142,8 +142,8 @@
           dataType:"json",
           async:false,
           success:function (d) {
-            if (d.data.status==1){
-              for (var i =1;i<d.data.data.length;i++){
+            if (d.data.status==1&&d.error_code == 0){
+              for (var i =0;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;
@@ -151,6 +151,14 @@
               var tbody = document.createElement('tbody');
               tbody.innerHTML = str;
               table.appendChild(tbody)
+              return
+            }else if (d.error_code == 0 &&d.data.status == 0){
+              var table = document.getElementById('table');
+              var tbody = document.createElement('tbody');
+              tbody.innerHTML = addStr;
+              table.appendChild(tbody);
+              return
+
             }
           }
         })

+ 37 - 46
core/src/web/templates/manage/loan/clue.html

@@ -4,13 +4,11 @@
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
     <title>分类线索</title>
-    <link href="/css/bootstrap.min.css" rel="stylesheet" />
-    <script src="/js/jquery.js"></script>
-    <script src="/js/bootstrap.min.js"></script>
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/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>
+    <script src="/loan/js/common.js"></script>
     <style type="text/css">
         #jyloan{
             background-color: #f5f5f5;
@@ -22,10 +20,6 @@
             left: 220px;
             top: 120px;
         }
-        .ke-container{
-            width: 425px;
-            margin-left: 100px;
-        }
 
         #content table {
             table-layout: fixed;
@@ -38,34 +32,38 @@
         }
 
         .table > thead > tr > th:nth-child(1) {
-            width: 7%;
+            width: 13%;
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 10%;
+            width: 4%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 10%;
+            width: 8%;
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 10%;
+            width: 4%;
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 10%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 4%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
-            width: 10%;
+            width: 5%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(9) {
             width: 5%;
             display: none;
             /*text-align: center;*/
@@ -84,7 +82,7 @@
             border: 0px;
             border-bottom: 1px dashed #999999;
         }
-        .table > tbody > tr > td:nth-child(8) {
+        .table > tbody > tr > td:nth-child(9) {
             display: none;
         }
 
@@ -111,10 +109,6 @@
             background-color: rgb(202, 198, 133);
             border-color: #EAB62F;
         }
-        .ke-container{
-            width: 582px;
-            margin-left: 0px;
-        }
         #return{
             float: right;
             margin-right: 27px;
@@ -126,6 +120,9 @@
             letter-spacing: 0px;
             text-decoration: none;
         }
+        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+            vertical-align:middle;
+        }
 
     </style>
 </head>
@@ -134,8 +131,8 @@
 
 <div>
     {{include "/manage/audithead.html"}}
-    <div style="width: 100px;height: 40px;position: relative;float: right;">
-        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    <div style="width: 120px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/loan/cluelist"> 返回上一级</a>
     </div>
     <div class="row" style="width:96%; margin:0 auto;">
         {{include "/manage/slider.html"}}
@@ -146,7 +143,7 @@
         <div class="record" style="display: none">
             <div style="float: left;
     position: relative;
-    margin-left: 202px;
+    margin-left: 214px;
     margin-top: -600px;
     width: 200px;
     height: 200px;
@@ -169,21 +166,21 @@ overflow-y: auto;">
             </div>
             <div style="
     position: relative;
-    float: left;
-    margin-left: 638px;
+    float: right;
+    margin-right: 10px;
     margin-top: -600px;
-    width: 200px;
+    width: 580px;
     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;">
+                <div style="padding-left: 97px;
+    margin-top: 30px;">
                     <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;">
+                <div style="padding-left: 357px;
+    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="cancle()">
                 </div>
             </div>
@@ -223,7 +220,8 @@ overflow-y: auto;">
 
                 {
                     title: "企业名称", field: "companyName",callback:function (d) {
-                        return d.companyName
+                        var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.companyName+'</div>'
+                        return html
                     }
                 },
                 {
@@ -231,6 +229,12 @@ overflow-y: auto;">
                         return d.registration
                     }
                 },
+                {
+                    title: "申请日期", field: "price", callback: function (d) {
+                        return timestampToTime(d.application_time)
+
+                    }
+                },
                 {
                     title: "回访人", field: "person",callback:function (d) {
                         if (typeof(d.visit_person) != "undefined"){
@@ -280,7 +284,7 @@ overflow-y: auto;">
                             success:function (r) {
                                 if (r.data.length>0){
                                     var html = "";
-                                    for (var i =1;i<r.data.length;i++){
+                                    for (var i =0;i<r.data.length;i++){
                                         html += '<option>'+r.data[i].classify_type+'</option>';
                                     }
                                     select += html
@@ -301,18 +305,6 @@ overflow-y: auto;">
             ]
         });
 
-        $("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();
-        });
-
     });
     $(function(){
         var kindEditInit=function(){
@@ -320,7 +312,7 @@ overflow-y: auto;">
                 id:"ke_editor",
                 allowFileManager : false,
                 filterMode:true,
-                width : '10px',
+                width : '100%',
                 height:'20px',
                 items:items_simp,
                 allowImageRemoteImageRemote:false,
@@ -371,7 +363,6 @@ overflow-y: auto;">
     }
     function format(d) {
         if (typeof(d)!== "undefined"){
-            console.log(d)
             var tt =d.replace(/&#60;/g,"<");
             var t = tt.replace(/&#62;/g,">");
             return t

+ 28 - 17
core/src/web/templates/manage/loan/cluelist.html

@@ -4,10 +4,8 @@
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
     <title>分类线索</title>
-    <link href="/css/bootstrap.min.css" rel="stylesheet" />
-    <script src="/js/jquery.js"></script>
-    <script src="/js/bootstrap.min.js"></script>
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/js/qfwtable.js"></script>
+    <script src="/loan/js/common.js"></script>
     <style type="text/css">
         #jyloan{
             background-color: #f5f5f5;
@@ -35,34 +33,38 @@
         }
 
         .table > thead > tr > th:nth-child(1) {
-            width: 7%;
+            width: 13%;
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 10%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 10%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 10%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 10%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 5%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
-            width: 10%;
+            width: 5%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(9) {
             width: 5%;
             display: none;
             /*text-align: center;*/
@@ -81,7 +83,7 @@
             border: 0px;
             border-bottom: 1px dashed #999999;
         }
-        .table > tbody > tr > td:nth-child(8) {
+        .table > tbody > tr > td:nth-child(9) {
             display: none;
         }
 
@@ -123,7 +125,9 @@
             letter-spacing: 0px;
             text-decoration: none;
         }
-
+        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+            vertical-align:middle;
+        }
     </style>
 </head>
 {{include "/common/baiducc.html"}}
@@ -131,8 +135,8 @@
 
 <div>
     {{include "/manage/audithead.html"}}
-    <div style="width: 100px;height: 40px;position: relative;float: right;">
-        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    <div style="width: 120px;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"}}
@@ -169,7 +173,7 @@
             ,
             classname: "table-hover"
             ,
-            css: {"height": "300px"}
+            css: {"height": "450px"}
             //,post:{"name":"ee"}
             ,
             url: '/manage/jy_loan/cluelist'
@@ -178,7 +182,8 @@
 
                 {
                     title: "企业名称", field: "companyName",callback:function (d) {
-                        return d.companyName
+                        var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.companyName+'</div>'
+                        return html
                     }
                 },
                 {
@@ -186,6 +191,12 @@
                         return d.registration
                     }
                 },
+                {
+                    title: "申请日期", field: "price", callback: function (d) {
+                        return timestampToTime(d.application_time)
+
+                    }
+                },
                 {
                     title: "回访人", field: "person",callback:function (d) {
                         if (typeof(d.visit_person) != "undefined"){

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

@@ -1,350 +0,0 @@
-<!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>
-
-    <link href="/css/bootstrap.min.css" rel="stylesheet" />
-    <script src="/js/jquery.js"></script>
-    <script src="/js/bootstrap.min.js"></script>
-    <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">
-
-
-        #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 class="record" style="display: none">
-            <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>
-    {{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();
-        });
-
-    });
-    $(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()
-    });
-
-    //双击事件
-    $("#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(){
-        $(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();
-        // if ($(this).hasClass("select")){
-        //     window.location.href = ""
-        // }
-    });
-    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"){
-            console.log(d)
-            var tt =d.replace(/&#60;/g,"<");
-            var t = tt.replace(/&#62;/g,">");
-            return t
-        }else{
-            return ""
-        }
-
-    }
-</script>
-</html>

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

@@ -0,0 +1,349 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    {{include "/common/inc.html"}}
+    <title>评估详情</title>
+    <script src="/loan/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>
+    <script src="/loan/js/common.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: 13%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 5%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 5%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 6%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 8%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 15%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(9) {
+            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(9) {
+            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;
+        }
+        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+            vertical-align:middle;
+        }
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 120px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/loan/evaluationlist"> 返回上一级</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: 220px;margin-top: -366px;width: 350px;height: 300px;overflow-y: auto;overflow-x: hidden">
+                    <span style="font-size: 24px;">回访记录:</span>
+                    <span id="visit-person" style=" font-weight:400; font-size:22px; color:rgba(94, 126, 240, 1); font-style:normal; letter-spacing:0px; line-height:42px; text-decoration:none;"></span>
+                    <span id="visit-time" style=" font-weight:400; font-size:22px; color:rgba(94, 126, 240, 1); font-style:normal; letter-spacing:0px; line-height:42px; text-decoration:none;"></span>
+                    <div id="visit-record" style="overflow-y: auto;">
+
+                    </div>
+                </div>
+                <div style="position: relative;float: right;margin-left: 605px;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) {
+                            var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.companyName+'</div>'
+                            return html
+                        }
+                    },
+                    {
+                        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: "price", callback: function (d) {
+                            return timestampToTime(d.application_time)
+
+                        }
+                    },
+                    {
+                        title:"贷款期限",field:"term",callback:function (d) {
+                            return d.term
+                        }
+                    },
+                    {
+                        title:"贷款用途",field:"remark",callback:function (d) {
+                            var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.remark+'</div>'
+                            return html
+
+                        }
+                    },
+                    {
+                        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 : '87%',
+                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>

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

@@ -0,0 +1,303 @@
+<!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="/loan/js/qfwtable.js"></script>
+    <script src="/loan/js/common.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: 13%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 5%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 5%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 7%;
+        }
+
+        .table > thead > tr > th:nth-child(6) {
+            width: 6%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(7) {
+            width: 8%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(8) {
+            width: 15%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(9) {
+            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(9) {
+            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;
+        }
+        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+            vertical-align:middle;
+        }
+    </style>
+</head>
+{{include "/common/baiducc.html"}}
+<body>
+
+<div>
+    {{include "/manage/audithead.html"}}
+    <div style="width: 120px;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": "450px"}
+            //,post:{"name":"ee"}
+            ,
+            url: '/manage/jy_loan/evaluationlist'
+            ,
+            columns: [
+
+                {
+                    title: "企业名称", field: "companyName",callback:function (d) {
+                        var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.companyName+'</div>'
+                        return html
+                    }
+                },
+                {
+                    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: "price", callback: function (d) {
+                        return timestampToTime(d.application_time)
+
+                    }
+                },
+                {
+                    title:"贷款期限",field:"term",callback:function (d) {
+                        return d.term
+                    }
+                },
+                {
+                    title:"贷款用途",field:"remark",callback:function (d) {
+                        if (typeof (d.remark)!=="undefined"){
+                            var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.remark+'</div>'
+                            return html
+                        }else{
+                            return ""
+                        }
+
+
+                    }
+                },
+                {
+                    title:"uid",field:"uid",callback:function (d) {
+                        return d.uid
+
+                    }
+                }
+            ]
+        });
+
+
+
+    });
+
+    //双击事件
+    $("#content").on("dblclick","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
+        uid = $(this).find("td").eq(8).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(8).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>

+ 22 - 3
core/src/web/templates/manage/loan/manage.html

@@ -5,13 +5,28 @@
     <title>系统管理</title>
     {{include "/common/inc.html"}}
     <link type="text/css" rel="stylesheet" href="/loan/css/style.css">
-    <link href="/css/bootstrap.min.css" rel="stylesheet" />
-    <script src="/js/jquery.js"></script>
-    <script src="/js/bootstrap.min.js"></script>
     <style>
         #jyloan{
             background-color: #f5f5f5;
         }
+        #sidebar{
+            margin-left: 27px;
+        }
+        .horizontalline{
+            height: 2px;
+            background-color: #0aa0f5;
+            position: relative;
+            width: 74px;
+            margin-top: 87px;
+            float: left;
+        }
+        .arrow{
+            position: relative;
+            float: left;
+            margin-top: 73px;
+            margin-left: -3px
+        }
+
     </style>
 </head>
 {{include "/common/baiducc.html"}}
@@ -21,7 +36,11 @@
     {{include "/manage/slider.html"}}
     <div id="list" style="height: 96%">
         <div id="visit" onclick="show_modal(1)"><span >1 电话回访</span></div>
+        <hr class="horizontalline">
+        <div class="arrow"><span style="color: #0aa0f5">></span></div>
         <div id="evaluation" onclick="show_modal(2)"><span >2 贷款评估</span></div>
+        <hr class="horizontalline" style="margin-left: 210px">
+        <div class="arrow"><span style="color: #0aa0f5">></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>

+ 31 - 30
core/src/web/templates/manage/loan/show_clue.html

@@ -3,11 +3,10 @@
 <head>
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
+    <script src="/loan/js/qfwtable.js"></script>
     <title>分类线索</title>
     <link href="/css/bootstrap.min.css" rel="stylesheet" />
-    <script src="/js/jquery.js"></script>
-    <script src="/js/bootstrap.min.js"></script>
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/js/common.js"></script>
     <style type="text/css">
         #jyloan{
             background-color: #f5f5f5;
@@ -35,34 +34,38 @@
         }
 
         .table > thead > tr > th:nth-child(1) {
-            width: 7%;
+            width: 13%;
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 10%;
+            width: 4%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 10%;
+            width: 8%;
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 10%;
+            width: 4%;
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 10%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 4%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
-            width: 10%;
+            width: 5%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
+            width: 5%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(9) {
             width: 5%;
             display: none;
             /*text-align: center;*/
@@ -81,7 +84,7 @@
             border: 0px;
             border-bottom: 1px dashed #999999;
         }
-        .table > tbody > tr > td:nth-child(8) {
+        .table > tbody > tr > td:nth-child(9) {
             display: none;
         }
 
@@ -119,6 +122,9 @@
             letter-spacing: 0px;
             text-decoration: none;
         }
+        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+            vertical-align:middle;
+        }
 
     </style>
 </head>
@@ -127,8 +133,8 @@
 
 <div>
     {{include "/manage/audithead.html"}}
-    <div style="width: 100px;height: 40px;position: relative;float: right;">
-        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    <div style="width: 120px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/loan/cluelist"> 返回上一级</a>
     </div>
     <div class="row" style="width:96%; margin:0 auto;">
         {{include "/manage/slider.html"}}
@@ -136,21 +142,21 @@
         <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">
+                <div style="height: 300px;width: 200px;overflow-y: auto;float: left;overflow-x: hidden;margin-top: 10px">
                <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">
+                <div style="float: left;margin-left: 100px;width: 200px;height: 300px;overflow-y: auto;overflow-x: hidden;margin-top: 10px">
                     <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">
+                <div style="width:200px;height: 300px;overflow-y: auto;float: left;margin-left: 100px;overflow-x: hidden;margin-top: 10px">
                     <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()">
+                <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: 200px;margin-top: 10px" value="返回" onclick="backup()">
             </div>
         </div>
 
@@ -188,7 +194,8 @@
 
                     {
                         title: "企业名称", field: "companyName",callback:function (d) {
-                            return d.companyName
+                            var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.companyName+'</div>'
+                            return html
                         }
                     },
                     {
@@ -196,6 +203,12 @@
                             return d.registration
                         }
                     },
+                    {
+                        title: "申请日期", field: "price", callback: function (d) {
+                            return timestampToTime(d.application_time)
+
+                        }
+                    },
                     {
                         title: "回访人", field: "person",callback:function (d) {
                             if (typeof(d.visit_person) != "undefined"){
@@ -243,17 +256,6 @@
                 ]
             });
 
-            $("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();
-            });
 
         });
     $(function () {
@@ -280,7 +282,6 @@
     }
     function format(d) {
         if (typeof(d)!== "undefined"){
-            console.log(d)
             var tt =d.replace(/&#60;/g,"<");
             var t = tt.replace(/&#62;/g,">");
             return t

+ 113 - 51
core/src/web/templates/manage/loan/visit.html

@@ -9,10 +9,8 @@
     <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>
-    <link href="/css/bootstrap.min.css" rel="stylesheet" />
-    <script src="/js/jquery.js"></script>
-    <script src="/js/bootstrap.min.js"></script>
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/js/qfwtable.js"></script>
+    <script src="/loan/js/common.js"></script>
     <style type="text/css">
         #jyloan{
             background-color: #f5f5f5;
@@ -33,35 +31,38 @@
         }
 
         .table > thead > tr > th:nth-child(1) {
-            width: 7%;
+            width: 13%;
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 10%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 10%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 10%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 10%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 6%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
-            width: 10%;
+            width: 8%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
-            width: 5%;
+            width: 15%;
+            /*text-align: center;*/
+        }
+        .table > thead > tr > th:nth-child(9) {
             display: none;
             /*text-align: center;*/
         }
@@ -79,7 +80,7 @@
             border: 0px;
             border-bottom: 1px dashed #999999;
         }
-        .table > tbody > tr > td:nth-child(8) {
+        .table > tbody > tr > td:nth-child(9) {
             display: none;
         }
 
@@ -117,6 +118,9 @@
             letter-spacing: 0px;
             text-decoration: none;
         }
+        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+            vertical-align:middle;
+        }
 
 
     </style>
@@ -125,20 +129,20 @@
 
 <div>
     {{include "/manage/audithead.html"}}
-    <div style="width: 100px;height: 40px;position: relative;float: right;">
-        <a id="return" href="/manage/jyloan/list"> 退出系统</a>
+    <div style="width: 120px;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;;">
+        <div class="record" style="display: none;position: relative;margin-left: 206px;top: -340px;">
+            <div style="float: left;margin-top: 100px;margin-left: -90px;width: 600px">
                 <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">
+            <div style="position: relative;float: left;margin-top: 127px;padding-left: 50px;width: 200px;">
                 <span style="font-size: 24px" >回访人:</span>
                 <input  id="person" type="text" style="width: 130px" placeholder="单行输入">
                 <div>
@@ -165,6 +169,30 @@
 <script type="text/javascript" src="/js/bootbox.js"></script>
 <script>
     var uid = "";
+    $(function(){
+        var kindEditInit=function(){
+            editor = KindEditor.create('textarea[name="visit-record"]', {
+                id:"ke_editor",
+                allowFileManager : false,
+                filterMode:true,
+                width : '75%',
+                height:'20px',
+                items:items_simp,
+                allowImageRemoteImageRemote:false,
+                uploadJson : '/filemanage/upload',
+                afterCreate:function() {
+                    this.sync()
+                },
+                beforesubmit:function(){
+                    this.sync()
+                },
+                afterBlur: function(){
+                    this.sync()
+                }
+            });
+        };
+        kindEditInit()
+    });
     $(function () {
         $("#audit").datatable({
             perPage: 5
@@ -179,7 +207,7 @@
             ,
             classname: "table-hover"
             ,
-            css: {"height": "300px"}
+            css: {"height": "450px"}
             //,post:{"name":"ee"}
             ,
             url: '/manage/jyloan/telephoneinterviews'
@@ -188,7 +216,11 @@
 
                 {
                     title: "企业名称", field: "companyName", callback: function (d) {
-                        return d.companyName
+                        editor.html("");
+                        $("#person").val("");
+                        $(".record").hide();
+                        var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.companyName+'</div>'
+                        return html
                     }
                 },
                 {
@@ -211,6 +243,12 @@
                         return d.price
                     }
                 },
+                {
+                    title: "申请日期", field: "price", callback: function (d) {
+                        return timestampToTime(d.application_time)
+
+                    }
+                },
                 {
                     title: "贷款期限", field: "term", callback: function (d) {
                         return d.term
@@ -218,12 +256,13 @@
                 },
                 {
                     title: "贷款用途", field: "remark", callback: function (d) {
-                        return d.remark
+                        var html = '<div style="width: 145px;height: auto;overflow-x: auto;text-align: left;line-height: 37px">'+ d.remark+'</div>'
+                        return html
 
                     }
                 },
                 {
-                    title: "uid", field: "remark", callback: function (d) {
+                    title: "uid", field: "uid", callback: function (d) {
                         return d.uid
 
                     }
@@ -232,45 +271,26 @@
         });
     });
 
-    $(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("");
+        uid = $(this).find("td").eq(8).text();
+
+        editor.html("");
         $("#person").val("");
         $(".record").show();
         $("#person").focus();
-        $(this).css("background","rgb(202, 198, 133)")
+        $(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(){
-        $("#visit-record").val("");
+        $(this).addClass("selected");
+        $(this).css("background","rgb(202, 198, 133)");
+        $(this).siblings().css("background","rgb(255,255,255)");
+        $(this).siblings().removeClass("selected");
+        editor.html("");
         $("#person").val("");
         $(".record").hide()
     });
@@ -302,10 +322,52 @@
     }
     //取消
     function cancle(){
-        $("#visit-record").val("");
+        editor.html("");
         $("#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) { //下
+            editor.html("");
+            $("#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) { // 上
+            editor.html("");
+            $("#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 - 66
core/src/web/templates/manage/slider.html

@@ -1,75 +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="jyloan"  class="list-group-item"><a style=" font-weight:normal;"  href="/manage/jyloan/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