yuan 6 years ago
parent 6ca6628c12
commit b164e32641

@ -594,4 +594,7 @@ CREATE TABLE `pre_apply_handle_log` (
PRIMARY KEY (`id`),
KEY `client_id` (`client_id`) USING BTREE,
KEY `client_pre_apply_id` (`client_pre_apply_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `sys_client_pre_apply`
ADD COLUMN `status` tinyint(2) NULL DEFAULT 0 COMMENT '0:未处理1处理中2处理完成';

@ -5,7 +5,7 @@ define(['angular'], function (angular) {
'use strict';
var app = angular.module('citypartner', ['ui.router']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('citypartner_reg', {
$stateProvider.state('partner_apply.citypartner_reg', {
url: '/citypartner_registries',
templateUrl: '/static/citypartner/templates/citypartner_registers.html',
controller: 'citypartnerRegisterListCtrl'

@ -19,27 +19,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
return $http.get('/partners/application/' + $stateParams.client_apply_id);
}]
}
}).state('partner_apply.simple_application', {
url: '/simple/applications',
templateUrl: '/static/payment/partner/templates/simple_applications.html',
controller: 'simpleApplicationListCtrl',
data: {label: '商户自主申请列表'}
}).state('partner_apply.apply_detail', {
url: '/{client_pre_apply_id}/{status}/detail',
templateUrl: '/static/payment/partner/templates/simple_application_detail.html',
controller: 'simpleApplicationDetailCtrl',
resolve: {
client_pre_apply_id: ['$stateParams', function ($stateParams) {
return $stateParams.client_pre_apply_id;
}],
status: ['$stateParams', function ($stateParams) {
return $stateParams.status;
}]
}
}).state('partner_apply.citypartner_reg', {
url: '/citypartner_registries',
templateUrl: '/static/citypartner/templates/citypartner_registers.html',
controller: 'citypartnerRegisterListCtrl'
})
}]);
app.controller('partnerApplyCtrl', ['$rootScope','$state', function ($rootScope,$state) {
@ -228,114 +207,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}]);
app.controller('simpleApplicationListCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', 'industryMap', 'stateMap','countryMap',
function ($scope, $state, $http, $uibModal, commonDialog) {
$scope.pagination = {};
$scope.params = {};
$scope.removeStatus = function () {
if($scope.params.status){
delete $scope.params.status;
}
};
$scope.loadSimpleApplies = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/register/manage', {params: params}).then(function (resp) {
$scope.applies = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadSimpleApplies(1);
}]);
app.controller('simpleApplicationDetailCtrl', [ '$scope', '$http', '$state', '$uibModal', 'commonDialog','client_pre_apply_id','status', function ($scope, $http, $state, $uibModal, commonDialog,client_pre_apply_id,status) {
$scope.pagination = {};
if(status == 0 || status ==1){
$scope.index = 1;
}
$scope.params = {client_pre_apply_id:client_pre_apply_id};
$scope.loadDetail = function () {
$http.get('/register/manage/getOne/' + client_pre_apply_id).then(function (resp) {
$scope.partner = resp.data;
});
};
$scope.loadHandleLogs = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/register/manage/log',{params:params}).then(function (resp) {
$scope.handleLogs = resp.data.data;
$scope.pagination = resp.data.pagination
});
};
$scope.loadDetail(1);
$scope.loadHandleLogs();
$scope.addHandleLog = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/add_handle_log.html',
controller: 'addHandleDetailCtrl',
resolve:{
client_pre_apply_id:function () {
return $scope.partner.client_pre_apply_id;
}}
}).result.then(function () {
$scope.loadHandleLogs(1);
commonDialog.alert({title: 'Success', type: 'success'});
})
};
$scope.closeHandleLog = function () {
commonDialog.confirm({title: 'Confirm', content: '确定此次处理已结束?'
}).then(function () {
$http.put('/register/manage/'+ client_pre_apply_id).then(function (resp) {
commonDialog.alert({title: 'Success', type: 'Success'});
$scope.loadHandleLogs(1);
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
}
}]);
app.controller('addHandleDetailCtrl', [ '$scope', '$http', '$state', 'client_pre_apply_id', 'commonDialog',function ($scope, $http, $state, client_pre_apply_id, commonDialog) {
$scope.handleDetail = {client_pre_apply_id:client_pre_apply_id};
$scope.addHandleLog = function () {
$http.put('/register/manage', $scope.handleDetail).then(function (resp) {
$scope.$close();
},function (resp) {
});
}
}]);
app.controller('citypartnerRegisterListCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
$scope.pagination = {};
$scope.listRegisters = function (page) {
// page = page || $scope.pagination.page || 1;
$http.get('/sys/citypartners').then(function (resp) {
$scope.cityPartners = resp.data;
// $scope.cityPartners = resp.data.data;
// $scope.pagination = resp.data.pagination;
})
};
$scope.listRegisters(1);
$scope.handleRegister = function (registry) {
commonDialog.confirm({
title: 'Confirm',
content: '操作无法撤销,确认继续?'
}).then(function () {
$http.put('/sys/citypartners/' + registry.partner_id + '/handle').then(function () {
commonDialog.alert({title: 'Success', content: '处理成功', type: 'success'});
$scope.listRegisters();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
})
})
};
}]);
app.filter('cut', function () {
return function (value, wordwise, max, tail) {
if (!value) return '';

@ -0,0 +1,134 @@
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) {
'use strict';
var app = angular.module('simpleApplyApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.select']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('partner_apply.simple_application', {
url: '/simple/applications',
templateUrl: '/static/payment/partner/templates/simple_applications.html',
controller: 'simpleApplicationListCtrl',
data: {label: '商户自主申请列表'}
}).state('partner_apply.apply_detail', {
url: '/{client_pre_apply_id}/detail',
templateUrl: '/static/payment/partner/templates/simple_application_detail.html',
controller: 'simpleApplicationDetailCtrl',
resolve: {
client_pre_apply_id: ['$stateParams', function ($stateParams) {
return $stateParams.client_pre_apply_id;
}],
index: ['$stateParams', function ($stateParams) {
return 0;
}]
}
}).state('partner_apply.handle_detail', {
url: '/{client_pre_apply_id}/handle',
templateUrl: '/static/payment/partner/templates/simple_application_detail.html',
controller: 'simpleApplicationDetailCtrl',
resolve: {
client_pre_apply_id: ['$stateParams', function ($stateParams) {
return $stateParams.client_pre_apply_id;
}],
index: ['$stateParams', function ($stateParams) {
return 1;
}]
}
})
}]);
app.controller('simpleApplicationListCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', 'industryMap', 'stateMap','countryMap',
function ($scope, $state, $http, $uibModal, commonDialog) {
$scope.pagination = {};
$scope.params = {};
$scope.removeStatus = function () {
if($scope.params.status){
delete $scope.params.status;
}
};
$scope.loadSimpleApplies = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/register/manage', {params: params}).then(function (resp) {
$scope.applies = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadSimpleApplies(1);
}]);
app.controller('simpleApplicationDetailCtrl', [ '$scope', '$http', '$state', '$uibModal', 'commonDialog','client_pre_apply_id','index', function ($scope, $http, $state, $uibModal, commonDialog,client_pre_apply_id,index) {
$scope.pagination = {};
$scope.index = index;
$scope.params = {client_pre_apply_id:client_pre_apply_id};
$scope.loadDetail = function () {
$http.get('/register/manage/getOne/' + client_pre_apply_id).then(function (resp) {
$scope.partner = resp.data;
});
};
$scope.loadHandleLogs = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/register/manage/log',{params:params}).then(function (resp) {
$scope.handleLogs = resp.data.data;
$scope.pagination = resp.data.pagination
});
};
$scope.loadDetail(1);
$scope.loadHandleLogs();
$scope.addHandleLog = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/add_handle_log.html',
controller: 'addHandleDetailCtrl',
resolve:{
client_pre_apply_id:function () {
return $scope.partner.client_pre_apply_id;
}}
}).result.then(function () {
$scope.loadHandleLogs(1);
commonDialog.alert({title: 'Success', type: 'success'});
})
};
$scope.closeHandleLog = function () {
commonDialog.confirm({title: 'Confirm', content: '确定此次处理已结束?'
}).then(function () {
$http.put('/register/manage/'+ client_pre_apply_id).then(function (resp) {
commonDialog.alert({title: 'Success', type: 'Success'});
$scope.loadHandleLogs(1);
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
}
}]);
app.controller('addHandleDetailCtrl', [ '$scope', '$http', '$state', 'client_pre_apply_id', 'commonDialog',function ($scope, $http, $state, client_pre_apply_id, commonDialog) {
$scope.handleDetail = {client_pre_apply_id:client_pre_apply_id};
$scope.addHandleLog = function () {
$http.put('/register/manage', $scope.handleDetail).then(function (resp) {
$scope.$close();
},function (resp) {
});
}
}]);
app.filter('cut', function () {
return function (value, wordwise, max, tail) {
if (!value) return '';
max = parseInt(max, 10);
if (!max) return value;
if (value.length <= max) return value;
value = value.substr(0, max);
if (wordwise) {
var lastspace = value.lastIndexOf(' ');
if (lastspace != -1) {
value = value.substr(0, lastspace);
}
}
return value + (tail || ' …');
};
});
return app;
});

@ -13,13 +13,13 @@
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active">
<li ui-sref-active-eq="active" ng-if="'partnerapply'|withModule">
<a ui-sref="partner_apply.partner_application"><span>Partner Application</span></a>
</li>
<li ui-sref-active="active" ng-if="('10'|withRole) || ('1'|withRole)">
<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">
<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>
</ul>

@ -45,7 +45,7 @@
<!-- <th>Approve Status</th>-->
<th style="max-width: 20%">Company Name</th>
<th>Status</th>
<th>Handle Detail</th>
<th>Handle Status</th>
<th>Create Time</th>
<th>Apply Source</th>
<th>Operation</th>
@ -70,7 +70,7 @@
<span ng-if="apply.status==0">未处理</span>
<span ng-if="apply.status==1">处理中</span>
</span>
<span ng-if="apply.agree">/</span>
<span ng-if="apply.agree"></span>
</td>
<td ng-bind="apply.create_time"></td>
<td>
@ -79,8 +79,12 @@
</td>
<td>
<a class="text-primary" role="button" title="Detail"
ui-sref="partner_apply.apply_detail({client_pre_apply_id:apply.client_pre_apply_id,status:apply.status})">
ui-sref="partner_apply.apply_detail({client_pre_apply_id:apply.client_pre_apply_id})">
<i class="fa fa-search"></i> Detail
</a><br>
<a class="text-primary" role="button" title="Detail"
ui-sref="partner_apply.handle_detail({client_pre_apply_id:apply.client_pre_apply_id})">
<i class="fa fa-check-circle-o"></i> Handle
</a>
</td>
</tr>

Loading…
Cancel
Save