|
|
@@ -24058,6 +24058,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ // 删除明细
|
|
|
+ $scope.del = function (index) {
|
|
|
+ $scope.change.orderChangeItems.splice(index, 1);
|
|
|
+ }
|
|
|
+
|
|
|
$scope.getMinDate = function () {
|
|
|
return $filter('date')(new Date, 'yyyy-MM-dd');
|
|
|
};
|
|
|
@@ -24069,11 +24074,17 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
|
|
|
$scope.save = function() {
|
|
|
- change.save({}, $scope.change, function (data) {
|
|
|
+ if ($scope.change.unNeedReply == null) {
|
|
|
+ toaster.pop('error', '请选择是否需要供应商确认');
|
|
|
+ } else if ($scope.change.orderChangeItems.length == 0) {
|
|
|
+ toaster.pop('error', '请至少选择一条采购明细')
|
|
|
+ } else {
|
|
|
+ change.save({}, $scope.change, function (data) {
|
|
|
|
|
|
- }, function(res) {
|
|
|
+ }, function(res) {
|
|
|
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
@@ -24098,6 +24109,24 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.condition.dateFrom = fromDate;
|
|
|
$scope.condition.dateTo = toDate;
|
|
|
|
|
|
+ $scope.changeDateZone = function (zone) {
|
|
|
+ $scope.condition.dateZone = zone;
|
|
|
+ $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
|
|
|
+ $scope.condition.$dateZoneOpen = false;
|
|
|
+ getDateCondition(zone, $scope.condition);
|
|
|
+ $scope.tableParams.page(1);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.openFilterDatePicker = function ($event, item, openParam) {
|
|
|
+ $event.preventDefault();
|
|
|
+ $event.stopPropagation();
|
|
|
+ item[openParam] = !item[openParam];
|
|
|
+ if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
page: 1,
|
|
|
count: 5,
|