zouyuxuan 5 жил өмнө
parent
commit
06fb065096

+ 15 - 11
core/src/qfw/manage/loan.go

@@ -157,7 +157,6 @@ func (this *LoanAction)Telephone_interviews(){
 		query["visit_back"] = 0
 		ldata:=mgo.Find("jy_loan",query,`{"application_time":1}`,nil,false,(currentPage-1)*perPage, perPage)
 		count := mgo.Count("jy_loan", query)
-		data := make(map[string]interface{})
 		if len(*ldata)!=0{
 			this.ServeJson(map[string]interface{}{
 				"currentPage": currentPage,
@@ -165,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,
 			})
 		}
 	}
@@ -239,10 +238,9 @@ func (this *LoanAction)Evaluation_list(){
 		query :=make(map[string]interface{})
 		query["visit_back"] = 1
 		query["opinion"] = 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{
+		if len(*ldata)!=0{
 			this.ServeJson(map[string]interface{}{
 				"currentPage": currentPage,
 				"data":        ldata,
@@ -250,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,
 			})
 		}
 	}
@@ -278,12 +276,18 @@ func (this *LoanAction)Clue_manage(){
 		perPage, _ := this.GetInteger("perPage")
 		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 (*data!=nil){
+		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,
+			})
 		}
 	}
 }

+ 1 - 4
core/src/web/staticres/loan/js/common.js

@@ -6,10 +6,7 @@ function timestampToTime(timestamp) {
         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()) + ' ';
-        var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
-        var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':';
-        var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
-        return Y+M+D+h+m+s;
+        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)

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

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
     <title>分类线索</title>
-    <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>

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

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
     <title>分类线索</title>
-    <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{
@@ -37,11 +37,11 @@
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 10%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(4) {
@@ -49,7 +49,7 @@
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 4%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(6) {

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

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
     <title>评估详情</title>
-    <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>
@@ -40,11 +40,11 @@
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(4) {
@@ -52,11 +52,11 @@
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 5%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 6%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
@@ -148,7 +148,7 @@
     float: left;
     margin-left: -207px;
 ">
-                <div style="position: relative;float: left;margin-left: 220px;margin-top: -366px;width: 305px;height: 300px;">
+                <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>

+ 13 - 19
core/src/web/templates/manage/loan/evaluationlist.html

@@ -5,8 +5,7 @@
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
     <title>企业评估</title>
-
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/js/qfwtable.js"></script>
     <script src="/loan/js/common.js"></script>
     <style type="text/css">
 
@@ -26,11 +25,11 @@
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(4) {
@@ -38,11 +37,11 @@
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 5%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 6%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
@@ -201,8 +200,13 @@
                 },
                 {
                     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
+                        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 ""
+                        }
+
 
                     }
                 },
@@ -215,17 +219,7 @@
             ]
         });
 
-        $("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();
-        });
+
 
     });
 

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

@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8">
     {{include "/common/inc.html"}}
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/js/qfwtable.js"></script>
     <title>分类线索</title>
     <link href="/css/bootstrap.min.css" rel="stylesheet" />
     <script src="/loan/js/common.js"></script>

+ 37 - 36
core/src/web/templates/manage/loan/visit.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/js/kindeditor/themes/default/default.css"/>
     <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kindeditor-all.js"></script>
     <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/kindeditor/kinditem.js"></script>
-    <script src="/js/qfwtable.js"></script>
+    <script src="/loan/js/qfwtable.js"></script>
     <script src="/loan/js/common.js"></script>
     <style type="text/css">
         #jyloan{
@@ -35,11 +35,11 @@
         }
 
         .table > thead > tr > th:nth-child(2) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(3) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(4) {
@@ -47,11 +47,11 @@
         }
 
         .table > thead > tr > th:nth-child(5) {
-            width: 5%;
+            width: 7%;
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 10%;
+            width: 6%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
@@ -169,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
@@ -192,7 +216,7 @@
 
                 {
                     title: "企业名称", field: "companyName", callback: function (d) {
-                        $("#visit-record").val("");
+                        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>'
@@ -247,35 +271,12 @@
         });
     });
 
-    $(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()
-});
     var uid = "";
     //双击事件
     $("#content").on("dblclick","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
         uid = $(this).find("td").eq(8).text();
-        $("#visit-record").val("");
+
+        editor.html("");
         $("#person").val("");
         $(".record").show();
         $("#person").focus();
@@ -289,7 +290,7 @@
         $(this).css("background","rgb(202, 198, 133)");
         $(this).siblings().css("background","rgb(255,255,255)");
         $(this).siblings().removeClass("selected");
-        $("#visit-record").val("");
+        editor.html("");
         $("#person").val("");
         $(".record").hide()
     });
@@ -321,7 +322,7 @@
     }
     //取消
     function cancle(){
-        $("#visit-record").val("");
+        editor.html("");
         $("#person").val("");
         $(".record").hide()
 
@@ -330,7 +331,7 @@
         var e = event || window.event || arguments.callee.caller.arguments[0];
         var t = $("#audit>.dt-table-wrapper>.table>tbody>tr")
         if (e && e.keyCode == 40) { //下
-            $("#visit-record").val("");
+            editor.html("");
             $("#person").val("");
             $(".record").hide()
             for(var i=0;i<t.length;i++){
@@ -349,9 +350,9 @@
         }
 
         if (e && e.keyCode == 38) { // 上
-            $("#visit-record").val("");
+            editor.html("");
             $("#person").val("");
-            $(".record").hide()
+            $(".record").hide();
             for(var i=0;i<t.length;i++){
                 if ($(t[i]).hasClass("selected")){
                     if (i <= 0){