|
|
@@ -18,7 +18,18 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
|
|
|
}
|
|
|
$rootScope.ShaRETimer = {}
|
|
|
|
|
|
- // 筛选
|
|
|
+ var clearSeekStatus = function () {
|
|
|
+ // if ($scope.seekListData) {}
|
|
|
+ angular.forEach($scope.seekListData.content, function (item) {
|
|
|
+ item.$status = 0;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ var enIdFilter = $filter('EncryptionFilter');
|
|
|
+ if ($location.search().seekType === '1') {
|
|
|
+ $scope.tab = 'offered'
|
|
|
+ } else {
|
|
|
+ $scope.tab = 'waitOffer';
|
|
|
+ }
|
|
|
var _formatDate = function (date, fmt) {
|
|
|
if (!date) {
|
|
|
return null;
|
|
|
@@ -49,21 +60,14 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
|
|
|
var _getClearDay = function (date) {
|
|
|
return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
|
|
|
}
|
|
|
- var clearSeekStatus = function () {
|
|
|
- // if ($scope.seekListData) {}
|
|
|
- angular.forEach($scope.seekListData.content, function (item) {
|
|
|
- item.$status = 0;
|
|
|
- })
|
|
|
- }
|
|
|
- var enIdFilter = $filter('EncryptionFilter');
|
|
|
- if ($location.search().seekType === '1') {
|
|
|
- $scope.tab = 'offered'
|
|
|
- } else {
|
|
|
- $scope.tab = 'waitOffer';
|
|
|
+ var init = function () {
|
|
|
+ // 发布时间
|
|
|
+ $scope.dateArea = 'sevenDay';
|
|
|
+ var currentTime = _getClearDay(new Date());
|
|
|
+ $scope.startDate = new Date(currentTime - 6 * 24 * 60 * 60 * 1000);
|
|
|
+ $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
|
|
|
}
|
|
|
-
|
|
|
- // 发布时间
|
|
|
- $scope.dateArea = 'sevenDay';
|
|
|
+ init()
|
|
|
|
|
|
// 更换待报价状态
|
|
|
$scope.vendorType = 'self'
|
|
|
@@ -82,13 +86,13 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
|
|
|
$scope.startDate = null;
|
|
|
$scope.endDate = null;
|
|
|
} else if (val == 'oneDay') {
|
|
|
- $scope.startDate = new Date(currentTime - 24 * 60 * 60 * 1000);
|
|
|
+ $scope.startDate = new Date(currentTime);
|
|
|
$scope.endDate = endDate;
|
|
|
} else if (val == 'threeDay') {
|
|
|
- $scope.startDate = new Date(currentTime - 3 * 24 * 60 * 60 * 1000);
|
|
|
+ $scope.startDate = new Date(currentTime - 2 * 24 * 60 * 60 * 1000);
|
|
|
$scope.endDate = endDate;
|
|
|
} else if (val == 'sevenDay') {
|
|
|
- $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
|
|
|
+ $scope.startDate = new Date(currentTime - 6 * 24 * 60 * 60 * 1000);
|
|
|
$scope.endDate = endDate;
|
|
|
} else {
|
|
|
$scope.startDate = null;
|
|
|
@@ -1221,8 +1225,5 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}]);
|
|
|
});
|