|
|
|
@ -23,21 +23,24 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
|
|
|
|
|
$http.get('/actchairty/clients', {params: params}).then(function (resp) {
|
|
|
|
|
$scope.clients = resp.data.data;
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.loadClients();
|
|
|
|
|
$scope.new_conf = {};
|
|
|
|
|
$scope.ctrl = {dateInput: false};
|
|
|
|
|
$scope.submitClient = function () {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
var client_moniker = $scope.new_conf.client_moniker;
|
|
|
|
|
$scope.msg = null;
|
|
|
|
|
var conf = {
|
|
|
|
|
date: $filter('date')($scope.new_conf.date, 'yyyy-MM-dd'),
|
|
|
|
|
};
|
|
|
|
|
$http.put('/actchairty/clients/' + $scope.new_conf.client_moniker, conf).then(function () {
|
|
|
|
|
$scope.new_conf = {};
|
|
|
|
|
$scope.loadClients();
|
|
|
|
|
$scope.msg = "商户创建成功!商户ID:"+ client_moniker + " 参加时间:" + conf.date;
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$scope.errmsg = resp.data.message;
|
|
|
|
|
$scope.msg = resp.data.message;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}]);
|
|
|
|
|