StoreSaleStatisticsController.js 859 字节
"use strict";
var StoreSaleStatisticsController = angular.module('StoreSaleStatisticsController',[]);

StoreSaleStatisticsController.controller('StoreSaleStatisticsController', [
    '$state',
    '$rootScope',
    '$scope',
    'StoreSaleStatisticsService',
    function($state,$rootScope, $scope, StoreSaleStatisticsService) {
        $scope.sales=[];
        $scope.dateQuery={
            startDt:'',
            endDt:''
        };

        StoreSaleStatisticsService.salesPager($scope.dateQuery);
        $scope.$on('sales.list',function(){
            $scope.sales=StoreSaleStatisticsService.sales.datas;
        });
        $scope.search=function(){
            $scope.dateQuery.startDt= $("#date").val();
            $scope.dateQuery.endDt= $("#date").val();
            StoreSaleStatisticsService.salesPager($scope.dateQuery);
        };
    }]
);