Commit c3c2e315 authored by suichenguang's avatar suichenguang

页面修改

parent 7c72efd5
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</span> </span>
</div> </div>
</span> </span>
<span class="col-lg-1" style="margin-left: 1em"> <span class="col-lg-1" style="margin-left: 6em">
<button type="button" class="btn btn-primary" ng-click="task_click()">查询</button> <button type="button" class="btn btn-primary" ng-click="task_click()">查询</button>
</span> </span>
</div> </div>
......
app.controller('cycleSheetCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', 'ngDialog', function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService, ngDialog) { app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', 'ngDialog', function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService, ngDialog) {
if ($rootScope.loginData.login === false) { if ($rootScope.loginData.login === false) {
$state.go("signin") $state.go("signin")
} else { } else {
$state.go("layout.qualityReport") $state.go("layout.yieldReport")
} }
$scope.userState = $rootScope.loginData.state; $scope.userState = $rootScope.loginData.state;
// $scope.userState=5; // $scope.userState=5;
if ($rootScope.loginData.login == false) {
$location.path("/login");
}
$scope.date = "date"; $scope.date = "date";
...@@ -30,13 +27,13 @@ app.controller('cycleSheetCtrl', ['$scope', '$rootScope', '$http', '$state', '$f ...@@ -30,13 +27,13 @@ app.controller('cycleSheetCtrl', ['$scope', '$rootScope', '$http', '$state', '$f
return currentdate; return currentdate;
} }
$scope.currentDetailDate = getNowFormatDetailDate(); $scope.currentDetailDate = getNowFormatDetailDate();
$scope.nowDate = new Date().format("yyyyMMdd"); $scope.nowDate = new Date("yyyyMMdd");
$scope.nowMonth = new Date().format("yyyyMM"); $scope.nowMonth = new Date("yyyyMM");
var getMonthFirstDay = function () { var getMonthFirstDay = function () {
var month_first = new Date(); var month_first = new Date("yyyyMMdd");
month_first.setDate(1); month_first.setDate(1);
return month_first.format("yyyyMMdd"); return month_first;
} }
var getMonthLastDay = function () { var getMonthLastDay = function () {
var date = new Date(); var date = new Date();
...@@ -45,7 +42,7 @@ app.controller('cycleSheetCtrl', ['$scope', '$rootScope', '$http', '$state', '$f ...@@ -45,7 +42,7 @@ app.controller('cycleSheetCtrl', ['$scope', '$rootScope', '$http', '$state', '$f
var nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1); var nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);
var oneDay = 1000 * 60 * 60 * 24; var oneDay = 1000 * 60 * 60 * 24;
var month_last = new Date(nextMonthFirstDay - oneDay); var month_last = new Date(nextMonthFirstDay - oneDay);
return month_last.format("yyyyMMdd"); return $filter('date')(month_last,'yyyyMMdd');
} }
$scope.month_first = getMonthFirstDay(); $scope.month_first = getMonthFirstDay();
$scope.month_last = getMonthLastDay(); $scope.month_last = getMonthLastDay();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment