upgrade 官网卡支付/贷款申请

master
PeiYY 4 years ago
parent 7e73daaa00
commit 0c37b5139c

@ -37,8 +37,18 @@ public class LoanApplicationDescriptor {
*/
private String status;
/**
*
*/
private String statusDescription;
/**
*
*/
private String remark;
/**
*
*/
private Integer source;
}

@ -60,6 +60,11 @@ public class LoanApplication {
*/
private String remark;
/**
*
*/
private Integer source;
public LoanApplicationDescriptor describe() {
return new LoanApplicationDescriptor()
.setId(this.id)
@ -70,7 +75,9 @@ public class LoanApplication {
.setEmail(this.email)
.setBusinessName(this.businessName)
.setIndustry(this.industry)
.setStatus(this.status.description())
.setRemark(this.remark);
.setStatus(this.status.value())
.setStatusDescription(this.status.description())
.setRemark(this.remark)
.setSource(this.source);
}
}

@ -60,6 +60,7 @@ public class PartnerApplyServiceImpl implements PartnerApplyService, Application
result.put("industry", apply.getIndustry());
result.put("business_name", apply.getBusinessName());
result.put("status", LoanApplicationStatus.READY.code());
result.put("source", 0);
return result;
}
@ -71,6 +72,7 @@ public class PartnerApplyServiceImpl implements PartnerApplyService, Application
result.put("contact_phone", apply.getPhoneNumber());
result.put("contact_email", apply.getEmailAddress());
result.put("company_name", apply.getBusinessName());
result.put("short_name", apply.getBusinessName());
result.put("industry", apply.getIndustry());
result.put("type", 1);
return result;

@ -16,12 +16,19 @@
<result column="business_name" property="businessName"/>
<result column="industry" property="industry"/>
<result column="remark" property="remark"/>
<result column="source" property="source"/>
<result column="status" property="status" typeHandler="org.apache.ibatis.type.EnumOrdinalTypeHandler"/>
</resultMap>
<select id="listPagedLoanApplication"
resultMap="loanApplicationMap">
SELECT * FROM sys_clients_loans_apply scla
<where>
<if test="businessName!=null">
<bind name="business_name_pattern" value="'%'+businessName+'%'"/>
and scla.business_name like #{business_name_pattern}
</if>
</where>
ORDER BY scla.create_time DESC
</select>
<select id="findById"

@ -19,15 +19,28 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
return $http.get('/partners/application/' + $stateParams.client_apply_id);
}]
}
}).state('partner_apply.loans_application', {
url: '/loans/application',
templateUrl: '/static/payment/partner/templates/partner_loans_application.html',
controller: 'partnerLoansApplicationListCtrl'
}).state('partner_apply.loans_application_detail', {
url: '/loans/application/{id}',
templateUrl: '/static/payment/partner/templates/partner_loans_application_detail.html',
controller: 'partnerLoansApplicationDetailCtrl',
resolve: {
partner: ['$http', '$stateParams', function ($http, $stateParams) {
return $http.get('/partners/loanApplications/' + $stateParams.id);
}]
}
})
}]);
app.controller('partnerApplyCtrl', ['$rootScope','$state', function ($rootScope,$state) {
if ($state.is('partner_apply')){
app.controller('partnerApplyCtrl', ['$rootScope', '$state', function ($rootScope, $state) {
if ($state.is('partner_apply')) {
$state.go('.partner_application');
}
}]);
app.controller('partnerApplicationListCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', 'industryMap', 'stateMap','countryMap',
function ($scope, $state, $http, $uibModal, commonDialog, industryMap, stateMap,countryMap) {
app.controller('partnerApplicationListCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', 'industryMap', 'stateMap', 'countryMap',
function ($scope, $state, $http, $uibModal, commonDialog, industryMap, stateMap, countryMap) {
$scope.pagination = {};
$scope.industries = industryMap.configs()
$scope.states = stateMap.configs();
@ -206,6 +219,67 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}]);
app.controller('partnerLoansApplicationListCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', 'industryMap', 'stateMap', 'countryMap',
function ($scope, $state, $http, $uibModal, commonDialog, industryMap, stateMap, countryMap) {
$scope.pagination = {};
$scope.industries = industryMap.configs()
$scope.states = stateMap.configs();
$scope.countries = countryMap.configs();
$scope.params = {};
$scope.loadPartners = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/partners/loanApplications', {params: params}).then(function (resp) {
$scope.partners = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadPartners(1);
$scope.handleButton = function (obj) {
var partner = angular.copy(obj);
partner.link = true;
$uibModal.open({
templateUrl: '/static/payment/partner/templates/partner_loans_application_edit.html',
controller: 'partnerApplicationEditCtrl',
resolve: {
partner: partner
}
}).result.then(function () {
commonDialog.alert({title: 'Success', content: '修改成功!', type: 'success'});
$state.reload();
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
})
};
}]);
app.controller('partnerApplicationEditCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) {
$scope.partner = angular.copy(partner);
$scope.submit = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') <= 0) {
item.$dirty = true;
}
});
return;
}
$scope.errmsg = null;
$http.put('/partners/loanApplications/' + partner.id, $scope.partner).then(function (resp) {
$scope.$close();
}, function (resp) {
$scope.errmsg = resp.data.message;
});
};
}]);
app.filter('cut', function () {
return function (value, wordwise, max, tail) {
if (!value) return '';

@ -53,7 +53,7 @@
<!--<td ng-bind="partner.industry"></td>-->
<td ng-bind="partner.suburb"></td>
<td>
<span ng-if="partner.source==0">PC</span>
<span ng-if="partner.source==0">PC<span ng-if="partner.type==1">(卡支付)</span></span>
<span ng-if="partner.source==1">公众号菜单</span>
<span ng-if="partner.source==2">公众号推送</span>
<span ng-if="partner.source==3">小程序申请</span>
@ -108,4 +108,4 @@
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,90 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="form-inline">
<div class="form-group">
<label class="control-label" for="short-name-search">Company Name</label>
<input type="text" class="form-control" id="short-name-search"
ng-model="params.businessName">
</div>
<div class="form-group">
<button class="btn btn-primary" type="button" ng-click="loadPartners(1)"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">Application List</h3>
</div>
<div class="box-body no-padding table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Application Time</th>
<th>Company Name</th>
<th>Source</th>
<th>Approve Status</th>
<th>Remark</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="partner in partners">
<td ng-bind="partner.createTime"></td>
<td ng-bind="partner.businessName"></td>
<td>
<span ng-if="partner.source==0">PC</span>
<span ng-if="partner.source==1">公众号菜单</span>
<span ng-if="partner.source==2">公众号推送</span>
<span ng-if="partner.source==3">小程序申请</span>
<span ng-if="partner.source==4">App申请</span>
</td>
<td>
<span>{{partner.statusDescription}}</span>
</td>
<td ng-bind="partner.remark|limitTo:10" title="{{partner.remark}}"></td>
<td>
<a class="text-primary" role="button" ng-click="handleButton(partner)">
<i class="fa fa-cog"></i> handle
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="box-footer" ng-if="partners.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadPartners()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
Pages:{{pagination.totalPages}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,33 @@
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<form name="partnerForm" novalidate>
<div class="form-group" style="display:flex;margin-top: 26px;">
<label class="control-label col-xs-4 col-sm-3">Status</label>
<div class="col-xs-8">
<select class="form-control" ng-model="partner.status">
<option value="READY">READY</option>
<option value="PROCESSING">PROCESSING</option>
<option value="COMPLETED">COMPLETED</option>
</select>
</div>
</div>
<div class="form-group" style="display:flex;">
<label class="control-label col-sm-3" for="short-id-input">Remark</label>
<div class="col-sm-9">
<input class="form-control" ng-model="partner.remark"
type="text"
id="short-id-input">
</div>
</div>
</form>
</div>
<div class="col-sm-12">
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="$dismiss()">Cancel</button>
<button type="button" class="btn btn-success" ng-click="submit(partnerForm)">Submit</button>
</div>

@ -19,9 +19,9 @@
<li ui-sref-active="active" ng-if="'simpleApplyApp'|withModule">
<a ui-sref="partner_apply.simple_application"> <span>Application & Open</span></a>
</li>
<!--<li ui-sref-active-eq="active" ng-if="'citypartner'|withModule">
<a ui-sref="partner_apply.citypartner_reg"><i class="fa fa-tv"></i> <span>City Partners</span></a>
</li>-->
<li ui-sref-active-eq="active" ng-if="'simpleApplyApp'|withModule">
<a ui-sref="partner_apply.loans_application"><span>Loans Application</span></a>
</li>
</ul>
</div>
</div>

Loading…
Cancel
Save