|
|
@@ -90,8 +90,8 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.type = $scope.storage_tab === 'inBound'? 'INBOUND' : 'OUTBOUND'
|
|
|
$scope.selfSupport = $scope.storage_tab === 'inBound'? $scope.boundType.INBOUND : $scope.boundType.OUTBOUND;
|
|
|
var currentTime = _getClearDay(new Date());
|
|
|
- var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
|
|
|
- $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
|
|
|
+ var endDate = currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
|
|
|
+ $scope.startDate = currentTime - 30 * 24 * 60 * 60 * 1000;
|
|
|
$scope.endDate = endDate;
|
|
|
};
|
|
|
clearRecordParams();
|
|
|
@@ -126,7 +126,7 @@ define([ 'app/app' ], function(app) {
|
|
|
})
|
|
|
} else {
|
|
|
for (var i = 0; i< $scope.countData; i++) {
|
|
|
- $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true})
|
|
|
+ $scope.otherData.push({qty: '', id: '', price: '', key: '', erpReserve: '', show: false, newId: true})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -163,15 +163,15 @@ define([ 'app/app' ], function(app) {
|
|
|
if (type === 'dateArea') {
|
|
|
// 时间筛选
|
|
|
var currentTime = _getClearDay(new Date());
|
|
|
- var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
|
|
|
+ var endDate = currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
|
|
|
if (val === 'oneMonth') {
|
|
|
- $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
|
|
|
+ $scope.startDate = currentTime - 30 * 24 * 60 * 60 * 1000;
|
|
|
$scope.endDate = endDate;
|
|
|
} else if (val === 'threeMonth') {
|
|
|
- $scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000);
|
|
|
+ $scope.startDate = currentTime - 3 * 30 * 24 * 60 * 60 * 1000;
|
|
|
$scope.endDate = endDate;
|
|
|
} else if (val === 'sixMonth') {
|
|
|
- $scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000);
|
|
|
+ $scope.startDate = currentTime - 6 * 30 * 24 * 60 * 60 * 1000;
|
|
|
$scope.endDate = endDate;
|
|
|
} else {
|
|
|
$scope.startDate = null;
|
|
|
@@ -203,21 +203,21 @@ define([ 'app/app' ], function(app) {
|
|
|
};
|
|
|
|
|
|
// 日期选择框选择时间显示
|
|
|
- $scope.onDateCondition = function (bool) {
|
|
|
- var startTime = $scope.startDate ? $scope.startDate.getTime() : null;
|
|
|
- var endTime = $scope.endDate ? $scope.endDate.getTime() : null;
|
|
|
- if (startTime && endTime && startTime > endTime) {
|
|
|
- if (bool === 1) {
|
|
|
- toaster.pop('info', '起始时间不能大于结束时间')
|
|
|
- $scope.startDate = null;
|
|
|
- } else {
|
|
|
- toaster.pop('info', '结束时间不能小于起始时间');
|
|
|
- $scope.endDate = null;
|
|
|
- }
|
|
|
- }
|
|
|
- if ($scope.endDate && bool === 2) {
|
|
|
- $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
|
|
|
- }
|
|
|
+ $scope.onDateCondition = function (bool, autoStartDate, autoEndDate) {
|
|
|
+ $scope.startDate = autoStartDate ? autoStartDate.getTime() : null;
|
|
|
+ $scope.endDate = autoEndDate ? autoEndDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000 : null;
|
|
|
+ if ($scope.startDate && $scope.endDate && $scope.startDate > $scope.endDate) {
|
|
|
+ if (bool === 1) {
|
|
|
+ toaster.pop('info', '起始时间不能大于结束时间')
|
|
|
+ $scope.startDate = null;
|
|
|
+ } else {
|
|
|
+ toaster.pop('info', '结束时间不能小于起始时间');
|
|
|
+ $scope.endDate = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /* if ($scope.endDate && bool === 2) {
|
|
|
+ $scope.endDate = $scope.endDate + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
|
|
|
+ }*/
|
|
|
getLoadStorageData();
|
|
|
};
|
|
|
|
|
|
@@ -250,11 +250,11 @@ define([ 'app/app' ], function(app) {
|
|
|
if($scope.storage_tab === 'outBound' && $scope.handleItem === 2) {
|
|
|
param.sorting = {"createtime":"DESC"};
|
|
|
param.status = '502-406';
|
|
|
- param.startMils = $scope.startDate ? $scope.startDate.getTime() : null;
|
|
|
- param.endMils = $scope.endDate ? $scope.endDate.getTime() : null;
|
|
|
+ param.startMils = $scope.startDate;
|
|
|
+ param.endMils = $scope.endDate;
|
|
|
} else {
|
|
|
- param.fromDate = $scope.startDate ? $scope.startDate.getTime() : null;
|
|
|
- param.toDate = $scope.endDate ? $scope.endDate.getTime() : null;
|
|
|
+ param.fromDate = $scope.startDate;
|
|
|
+ param.toDate = $scope.endDate;
|
|
|
}
|
|
|
if ($scope.handleItem !== 1) {
|
|
|
Goods[getUrl()](param, function(data) {
|
|
|
@@ -296,6 +296,7 @@ define([ 'app/app' ], function(app) {
|
|
|
val.spec = '';
|
|
|
val.qty = '';
|
|
|
val.price = '';
|
|
|
+ val.erpReserve = '';
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -324,6 +325,7 @@ define([ 'app/app' ], function(app) {
|
|
|
type.spec = '';
|
|
|
type.qty = '';
|
|
|
type.price = '';
|
|
|
+ type.erpReserve = '',
|
|
|
$scope.listData = [];
|
|
|
type.show = false;
|
|
|
} else {
|
|
|
@@ -353,10 +355,10 @@ define([ 'app/app' ], function(app) {
|
|
|
if(type === 'clear') {
|
|
|
initOtherData()
|
|
|
} else if(type === 'one') {
|
|
|
- $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true});
|
|
|
+ $scope.otherData.push({qty: '', id: '', price: '', key: '', erpReserve: '', show: false, newId: true});
|
|
|
} else if(type === 'ten') {
|
|
|
for (var i = 0; i< 10; i++) {
|
|
|
- $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true})
|
|
|
+ $scope.otherData.push({qty: '', id: '', price: '', key: '', erpReserve: '', show: false, newId: true})
|
|
|
}
|
|
|
}
|
|
|
};
|