|
|
|
@ -157,45 +157,47 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('settleTasksPriorityListManageCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
|
|
|
|
|
$scope.filters = {};
|
|
|
|
|
$scope.input = {}
|
|
|
|
|
$scope.loadPriorities = function () {
|
|
|
|
|
$http.get('/sys/settle_tasks/priority_merchants').then(function (res) {
|
|
|
|
|
$scope.clients = res.data;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.addPriorityClient = function () {
|
|
|
|
|
if (!$scope.input.moniker) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/settle_tasks/priority_merchants/' + $scope.input.moniker).then(function () {
|
|
|
|
|
$scope.loadPriorities();
|
|
|
|
|
}, function (res) {
|
|
|
|
|
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.dropPriorityClient = function (client) {
|
|
|
|
|
$http['delete']('/sys/settle_tasks/priority_merchants/' + client.client_moniker).then(function () {
|
|
|
|
|
$scope.loadPriorities();
|
|
|
|
|
}, function (res) {
|
|
|
|
|
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.listHistory = function () {
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
templateUrl: '/static/analysis/templates/settle_tasks_priority_history.html',
|
|
|
|
|
controller: ['$scope', 'history', function (scope, history) {
|
|
|
|
|
scope.logs = history.data;
|
|
|
|
|
}],
|
|
|
|
|
resolve: {
|
|
|
|
|
history: ['$http', function (http) {
|
|
|
|
|
return http.get('/sys/settle_tasks/priority_merchants_modify_history')
|
|
|
|
|
}]
|
|
|
|
|
app.controller('settleTasksPriorityListManageCtrl', ['$scope', '$http', '$uibModal', 'commonDialog',
|
|
|
|
|
function ($scope, $http, $uibModal, commonDialog) {
|
|
|
|
|
$scope.filters = {};
|
|
|
|
|
$scope.input = {}
|
|
|
|
|
$scope.loadPriorities = function () {
|
|
|
|
|
$http.get('/sys/settle_tasks/priority_merchants').then(function (res) {
|
|
|
|
|
$scope.clients = res.data;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.loadPriorities();
|
|
|
|
|
$scope.addPriorityClient = function () {
|
|
|
|
|
if (!$scope.input.moniker) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}])
|
|
|
|
|
$http.put('/sys/settle_tasks/priority_merchants/' + $scope.input.moniker).then(function () {
|
|
|
|
|
$scope.loadPriorities();
|
|
|
|
|
}, function (res) {
|
|
|
|
|
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.dropPriorityClient = function (client) {
|
|
|
|
|
$http['delete']('/sys/settle_tasks/priority_merchants/' + client.client_moniker).then(function () {
|
|
|
|
|
$scope.loadPriorities();
|
|
|
|
|
}, function (res) {
|
|
|
|
|
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.listHistory = function () {
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
templateUrl: '/static/analysis/templates/settle_tasks_priority_history.html',
|
|
|
|
|
controller: ['$scope', 'history', function (scope, history) {
|
|
|
|
|
scope.logs = history.data;
|
|
|
|
|
}],
|
|
|
|
|
resolve: {
|
|
|
|
|
history: ['$http', function (http) {
|
|
|
|
|
return http.get('/sys/settle_tasks/priority_merchants_modify_history')
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}])
|
|
|
|
|
app.controller('newSettleTaskDialogCtrl', ['$scope', '$filter', 'plans', function ($scope, $filter, plans) {
|
|
|
|
|
$scope.plans = plans;
|
|
|
|
|
$scope.task = {
|
|
|
|
|