SaleStatisticsController.js
814 字节
"use strict";
var SaleStatisticsController = angular.module('SaleStatisticsController',[]);
SaleStatisticsController.controller('SaleStatisticsController', [
'$state',
'$rootScope',
'$scope',
'SaleStatisticsService',
function($state,$rootScope, $scope, SaleStatisticsService) {
$scope.sales=[];
$scope.dateQuery={
startDt:'',
endDt:''
};
SaleStatisticsService.salesPager($scope.dateQuery);
$scope.$on('sales.list',function(){
$scope.sales=SaleStatisticsService.sales.datas;
});
$scope.search=function(){
$scope.dateQuery.startDt= $("#date").val();
$scope.dateQuery.endDt= $("#date").val();
SaleStatisticsService.salesPager($scope.dateQuery);
};
}]
);