|
|
|
@ -642,23 +642,27 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
$scope.clientMoniker = $scope.currentUser.client_moniker;
|
|
|
|
|
$scope.loadDashboard = function () {
|
|
|
|
|
loadBasicInfo()
|
|
|
|
|
loadTransCommon();
|
|
|
|
|
getAvgOrderAndCustomer();
|
|
|
|
|
getExchangeRate();
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
$scope.loadDashboard();
|
|
|
|
|
function loadBasicInfo() {
|
|
|
|
|
$http.get('/dashboard/partner/' + $scope.clientMoniker + '/basic_info').then(function (resp) {
|
|
|
|
|
$scope.basicinfo = resp.data;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function loadTransCommon() {
|
|
|
|
|
var params = {begin: $filter('date')(new Date(), 'yyyyMMdd'), end: $filter('date')(new Date(), 'yyyyMMdd')};
|
|
|
|
|
$http.get('/dashboard/partner/trans_common',{params:params}).then(function (resp) {
|
|
|
|
|
$scope.transcommon = resp.data;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function getExchangeRate() {
|
|
|
|
|
$http.get('/dashboard/system/exchange_rates', {params: $scope.scales[0].params()}).then(function (resp) {
|
|
|
|
|
if (resp.data && resp.data.length > 0) {
|
|
|
|
|
$scope.wechat_rate = resp.data[0].Wechat.exchange_rate;
|
|
|
|
|
$scope.alipay_rate = resp.data[0].Alipay.exchange_rate;
|
|
|
|
|
$scope.exchange_date = resp.data[0].date.substr(0, 10);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function loadTradeAmountInTypes(params) {
|
|
|
|
|
var tradeInTypeConfig = {
|
|
|
|
|
chart: {
|
|
|
|
@ -1061,12 +1065,6 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
|
|
|
|
|
|
$scope.loadSettlementLogs = function (page) {
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
// if (params.datefrom) {
|
|
|
|
|
// params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
|
|
|
|
|
// }
|
|
|
|
|
// if (params.dateto) {
|
|
|
|
|
// params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
|
|
|
|
|
// }
|
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
|
params.limit = 8;
|
|
|
|
|
$http.get('/dashboard/partner/' + $scope.clientMoniker + '/settlement_logs', {params: params}).then(function (resp) {
|
|
|
|
|