|
|
@@ -2050,6 +2050,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
+ }, function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|
|
|
@@ -5543,6 +5546,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
attach.type = attach.name.substr(attach.name.lastIndexOf('.') + 1);
|
|
|
});
|
|
|
$scope.inquiryMould = mould;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|
|
|
@@ -5986,7 +5991,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.item.quotation.custUU = $scope.item.quotation.cust.uu;
|
|
|
$scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
|
|
|
$scope.item.productId = $scope.item.product.id;
|
|
|
- $scope.item.quotation.status = 100;//在录入
|
|
|
+ // $scope.item.quotation.status = 100;//在录入
|
|
|
if ($scope.item.quotation.date instanceof Date) {
|
|
|
$scope.item.quotation.date = $scope.item.quotation.date.getTime();
|
|
|
}
|
|
|
@@ -5995,6 +6000,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
Quotation.save({}, $scope.item, function (data) {
|
|
|
$scope.loading = false;
|
|
|
+ $scope.item = data;
|
|
|
toaster.pop('success', '成功', '保存成功');
|
|
|
if ($stateParams.id)
|
|
|
window.location.reload();
|
|
|
@@ -6035,15 +6041,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.item.quotation.custUU = $scope.item.quotation.cust.uu;
|
|
|
$scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
|
|
|
$scope.item.productId = $scope.item.product.id;
|
|
|
- $scope.item.quotation.status = 101;//已提交
|
|
|
+ // $scope.item.quotation.status = 101;//已提交
|
|
|
if ($scope.item.quotation.date instanceof Date) {
|
|
|
$scope.item.quotation.date = $scope.item.quotation.date.getTime();
|
|
|
}
|
|
|
if ($scope.item.quotation.endDate instanceof Date) {
|
|
|
$scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
|
|
|
}
|
|
|
- Quotation.save({}, $scope.item, function (data) {
|
|
|
+ Quotation.submit({}, $scope.item, function (data) {
|
|
|
$scope.loading = false;
|
|
|
+ $scope.item = data;
|
|
|
toaster.pop('success', '成功', '提交成功');
|
|
|
// window.location.hash = '#/sale/quotation/' + data.id;
|
|
|
window.location.hash = '#/sale/quotation/list';
|
|
|
@@ -9305,9 +9312,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', '单据被反过账,请立即作废本单据');
|
|
|
$scope.haveSelected = true;
|
|
|
}
|
|
|
- }, function () {
|
|
|
+ }, function (response) {
|
|
|
$scope.loading = false;
|
|
|
- toaster.pop('error', '提示', '更新已转数失败');
|
|
|
+ toaster.pop('error', '更新已转数失败', response.data);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -9339,8 +9346,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
FaApCheck.deleteApCheck({id: $stateParams.id}, function (data) {
|
|
|
updateYCheckQty();
|
|
|
toaster.pop('success', '提示', '删除成功');
|
|
|
- }, function () {
|
|
|
- toaster.pop('error', '提示', '删除失败');
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '删除失败', response.data);
|
|
|
});
|
|
|
$scope.haveSelected = false;
|
|
|
|
|
|
@@ -9357,9 +9364,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
} else {
|
|
|
toaster.pop('error', '提示', '作废失败');
|
|
|
}
|
|
|
- }, function () {
|
|
|
+ }, function (response) {
|
|
|
$scope.loading = false;
|
|
|
- toaster.pop('error', '提示', '作废失败');
|
|
|
+ toaster.pop('error', '作废失败', response.data);
|
|
|
});
|
|
|
|
|
|
}
|
|
|
@@ -11734,6 +11741,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
var loadData = function () {
|
|
|
MakeChange.get({id: $stateParams.id}, function (data) {
|
|
|
$scope.change = data;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|
|
|
@@ -12503,6 +12512,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
}
|
|
|
$scope.loading = false;
|
|
|
+ }, function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|