Browse Source

增加后台查看用户申请贷款记录的列表

suntg 8 years ago
parent
commit
6832d6d47c

+ 6 - 2
src/main/java/com/uas/platform/b2c/fa/factoring/service/impl/LoanApplyServiceImpl.java

@@ -3,11 +3,12 @@ package com.uas.platform.b2c.fa.factoring.service.impl;
 import com.uas.platform.b2c.fa.factoring.dao.LoanApplyDao;
 import com.uas.platform.b2c.fa.factoring.model.LoanApply;
 import com.uas.platform.b2c.fa.factoring.service.LoanApplyService;
+import com.uas.platform.b2c.fa.payment.utils.StringUtils;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
 import org.springframework.stereotype.Service;
 
 /**
@@ -23,7 +24,10 @@ public class LoanApplyServiceImpl implements LoanApplyService {
 
     @Override
     public Page<LoanApply> getByPage(PageParams params) {
-        Pageable pageable = new PageInfo(params);
+        PageInfo pageable = new PageInfo(params);
+        if (pageable.getSort() == null) {
+            pageable.sorting("date", Sort.Direction.DESC);
+        }
         return loanApplyDao.findAll(pageable);
     }
 

+ 4 - 2
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -124,9 +124,11 @@
 			<li class="nav-node"><a href="#billInfo/admin"><i
 					class="fa fa-fire"></i><span> 平台发票信息管理</span></a></li>
 			<li class="nav-node"><a href="#pay/available"><i
-					class="icon-fire"></i><span> 买家付款有效时间</span></a></li>
+					class="fa fa-fire"></i><span> 买家付款有效时间</span></a></li>
 			<li class="nav-node"><a href="#pay/exchangerate"><i
-					class="icon-fire"></i><span>汇率设置</span></a></li>
+					class="fa fa-fire"></i><span> 汇率设置</span></a></li>
+			<li class="nav-node"><a href="#fa/loanApply"><i
+					class="fa fa-fire"></i><span> 贷款申请列表</span></a></li>
 
 			<li class="nav-header">审批</li>
 			<li class="nav-node"><a href="#audit/brand"><i

+ 43 - 36
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer','common/query/loanApply'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices', 'loanApplyService']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -395,12 +395,12 @@
 			controller: 'AuditBankInfoCtrl',
 			controllerUrl: 'app/controllers/bankInfo/AuditBankInfoCtrl'
 		})).state('audit_realAuth', angularAMD.route({
-      // 实名认证审核
-      url: '/audit/realAuth',
-      templateUrl: 'static/view/admin/audit_realAuth.html',
-      controller: 'AuditRealAuthCtrl',
-      controllerUrl: 'app/controllers/AuditRealAuthCtrl'
-    })).state('uploadComponentCrawl', angularAMD.route({
+			// 实名认证审核
+			url: '/audit/realAuth',
+			templateUrl: 'static/view/admin/audit_realAuth.html',
+			controller: 'AuditRealAuthCtrl',
+			controllerUrl: 'app/controllers/AuditRealAuthCtrl'
+		})).state('uploadComponentCrawl', angularAMD.route({
 			// 上传爬取数据页面
 			url: '/product/componentCrawl/upload',
 			templateUrl : 'static/view/admin/product/uploadComponentCrawl.html',
@@ -597,26 +597,26 @@
 			controllerUrl: 'app/controllers/product/KindAdviceCtrl',
 			title: '轮播图片管理'
 		})).state('logUsage', angularAMD.route({
-      //用户操作日志
-      url: '/logUsage',
-      templateUrl: 'static/view/admin/logUsage.html',
-      controller: 'LogUsageCtrl',
-      controllerUrl: 'app/controllers/LogUsageCtrl',
-      title: '用户操作日志'
-    })).state('seekQualityBuyer', angularAMD.route({
-      //用户操作日志
-      url: '/seekQualityBuyer',
-      templateUrl: 'static/view/admin/seekQualityBuyer.html',
-      controller: 'SeekQualityBuyerCtrl',
-      controllerUrl: 'app/controllers/SeekQualityBuyerCtrl',
-      title: '用户操作日志'
-    })).state('keyWord', angularAMD.route({
-      url: '/keyWord',
-      templateUrl: 'static/view/admin/keyword.html',
-      controller: 'KeyWordCtrl',
-      controllerUrl: 'app/controllers/KeyWordCtrl',
-      title: '非法关键词维护'
-    })).state('slideImage', angularAMD.route({
+			//用户操作日志
+			url: '/logUsage',
+			templateUrl: 'static/view/admin/logUsage.html',
+			controller: 'LogUsageCtrl',
+			controllerUrl: 'app/controllers/LogUsageCtrl',
+			title: '用户操作日志'
+		})).state('seekQualityBuyer', angularAMD.route({
+			//用户操作日志
+			url: '/seekQualityBuyer',
+			templateUrl: 'static/view/admin/seekQualityBuyer.html',
+			controller: 'SeekQualityBuyerCtrl',
+			controllerUrl: 'app/controllers/SeekQualityBuyerCtrl',
+			title: '用户操作日志'
+    	})).state('keyWord', angularAMD.route({
+			url: '/keyWord',
+			templateUrl: 'static/view/admin/keyword.html',
+			controller: 'KeyWordCtrl',
+			controllerUrl: 'app/controllers/KeyWordCtrl',
+			title: '非法关键词维护'
+    	})).state('slideImage', angularAMD.route({
 			// 首页展示(轮播图片管理)
 			url: '/operation/slideImage',
 			templateUrl: 'static/view/admin/operation/slideImage.html',
@@ -624,13 +624,13 @@
 			controllerUrl: 'app/controllers/operation/SlideImageCtrl',
 			title: '轮播图片管理'
 		})).state('secQuestion', angularAMD.route({
-      // 密保问题维护
-      url: '/secQuestion',
-      templateUrl: 'static/view/admin/sec_question.html',
-      controller: 'SecQuestionCtrl',
-      controllerUrl: 'app/controllers/SecQuestionCtrl',
-      title: '密保问题维护'
-    })).state('logisticsCompany', angularAMD.route({
+			// 密保问题维护
+			url: '/secQuestion',
+			templateUrl: 'static/view/admin/sec_question.html',
+			controller: 'SecQuestionCtrl',
+			controllerUrl: 'app/controllers/SecQuestionCtrl',
+			title: '密保问题维护'
+    	})).state('logisticsCompany', angularAMD.route({
 			// 首页展示(快递公司管理)
 			url: '/logistics/company',
 			templateUrl: 'static/view/admin/logistics/logistics_company.html',
@@ -762,7 +762,14 @@
 			controller: 'internalMessageListCtrl',
 			controllerUrl: 'app/controllers/common/message/internalMessageListCtrl',
 			title: '消息列表'
-		}));
+		})).state('loanApplyList', angularAMD.route({
+            // 消息列表
+            url: '/fa/loanApply',
+            templateUrl: 'static/view/admin/fa/loanApplyList.html',
+            controller: 'LoanApplyListCtrl',
+            controllerUrl: 'app/controllers/fa/LoanApplyListCtrl',
+            title: '贷款申请列表'
+        }));
 		
 		$httpProvider.interceptors.push(['Loading', '$q', function(Loading, $q) {
 			return {

+ 24 - 0
src/main/webapp/resources/js/admin/controllers/fa/LoanApplyListCtrl.js

@@ -0,0 +1,24 @@
+define(['app/app'], function (app) {
+  'use strict';
+  app.register.controller('LoanApplyListCtrl', ['$scope', 'ngTableParams', 'LoanApply', 'toaster', 'BaseService', function ($scope, ngTableParams, LoanApply, toaster, BaseService) {
+    //table设置
+    $scope.logUsageTableParams = new ngTableParams({
+      page : 1,
+      count : 20
+    }, {
+      total : 0,
+      getData : function ($defer, params) {
+        $scope.paginationParams = params;
+        const param = BaseService.parseParams(params.url());
+          LoanApply.getAllByPage(param, function (data) {
+          params.total(data.totalElements);
+          $defer.resolve(data.content);
+        }, function (response) {
+          toaster.pop('error', '获取用户贷款申请列表失败');
+        });
+      }
+    });
+
+
+  }]);
+});

+ 9 - 0
src/main/webapp/resources/js/common/query/loanApply.js

@@ -0,0 +1,9 @@
+define([ 'ngResource' ], function() {
+	angular.module('loanApplyService', [ 'ngResource' ]).factory('LoanApply', ['$resource', function($resource) {
+		return $resource('api/fa/loanApply', {}, {
+      		getAllByPage:{
+				method:'GET'
+			}
+		});
+	}])
+});

+ 58 - 0
src/main/webapp/resources/view/admin/fa/loanApplyList.html

@@ -0,0 +1,58 @@
+<style>
+.row {
+	margin-bottom: 10px;
+}
+</style>
+<div>
+	<div class="box-header well">
+		用户贷款申请记录
+	</div>
+	<div  class="box-content">
+		<div class="row">
+			<div class="col-xs-1">
+				<p style="margin-top: 8px; font-weight: bold;">
+					共<span class="totalNum">{{paginationParams.total()}}</span>条
+				</p>
+			</div>
+			<!--<div class="col-xs-offset-4 col-xs-7">
+				<div class="input-group">
+					<select ng-model="search" style="width:20%;" class="form-control">
+						<option value="">请选择查询条件</option>
+						<option value="1">UU号</option>
+						<option value="2">用户名</option>
+					</select>
+					<input type="search" style="width:80%;" class="form-control" ng-model="searchContent"
+						ng-search="onSearch()" placeholder="请输入搜索内容">
+					<span class="input-group-btn">
+						<button ng-click="onSearch()" class="btn btn-primary" type="button">搜索</button>
+					</span>
+				</div>
+			</div>-->
+		</div>
+
+		<p ng-model="test"></p>
+		<table ng-table="logUsageTableParams"
+			class="table table-bordered table-striped table-hover" style="word-break:break-all; word-wrap:break-all;">
+			<thead>
+				<tr class="tr-default">
+					<th width="10%;" class="text-center">申请时间</th>
+					<th width="7%;" class="text-center">客户称呼</th>
+					<th width="30%" class="text-center">联系方式</th>
+					<th width="20%" class="text-center">申请金额</th>
+				</tr>
+			</thead>
+			<tbody ng-repeat="apply in $data">
+				<tr class="text-center">
+					<td><span ng-bind="apply.date | date:'yyyy-MM-dd HH:mm:ss'"></span></td>
+					<td><span ng-bind="apply.name"></span></td>
+					<td>
+						<span ng-if="apply.tel">手机号:<span ng-bind="apply.tel"></span>;</span>
+						<span ng-if="apply.email">邮箱:<span ng-bind="apply.email"></span>;</span>
+						<span ng-if="apply.qq">QQ:<span ng-bind="apply.qq"></span>;</span>
+					</td>
+					<td><span ng-bind="apply.amount || '未知'"></span></td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+</div>