|
|
@@ -3156,7 +3156,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
var loadData = function () {
|
|
|
$scope.loading = true;
|
|
|
- PurcOrdersInfo.getAll({id: $stateParams.id}, function (data) {
|
|
|
+ PurcOrdersInfo.getAll({id: $stateParams.id},{}, function (data) {
|
|
|
$scope.order = data;
|
|
|
var sum = 0;
|
|
|
angular.forEach($scope.order.orderItems, function (item) {
|
|
|
@@ -3166,7 +3166,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// if($scope.order.display == 1) {//未查看的设为已查看
|
|
|
// $scope.setDisplay('setRead', $scope.order.id);
|
|
|
// }
|
|
|
- $scope.loading = false;
|
|
|
+ //$scope.loading = false;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|
|
|
@@ -4171,8 +4173,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
$scope.getHistory = function (item) {
|
|
|
if (!item.history) {
|
|
|
- PurcInquiry.getHistory({itemId: item.id}, function (data) {
|
|
|
+ PurcInquiry.getHistory({itemId: item.id},function (data) {
|
|
|
+ $scope.historyShow = true;
|
|
|
item.history = data;
|
|
|
+ }, function (response) {
|
|
|
+ $scope.historyShow = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
@@ -6111,8 +6117,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.isUser = data.isUser;
|
|
|
});
|
|
|
var loadData = function () {
|
|
|
- PurchaseInquiry.detail({id: $stateParams.id}, function (data) {
|
|
|
+ PurchaseInquiry.detail({id: $stateParams.id}, {},function (data) {
|
|
|
$scope.inquiry = data;
|
|
|
+ },function (response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|
|
|
@@ -6421,8 +6429,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 获取历史报价
|
|
|
$scope.getHistory = function (mould) {
|
|
|
if (!mould.history) {
|
|
|
- PurcInquiryMould.getHistory({id: mould.id}, function (data) {
|
|
|
+ PurcInquiryMould.getHistory({id: mould.id},{}, function (data) {
|
|
|
+ $scope.historyShow = true;
|
|
|
mould.history = data;
|
|
|
+ },function (response) {
|
|
|
+ $scope.historyShow = false;
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ //$Scope.PurcInquiryMouldpermission = true;
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
@@ -6627,8 +6640,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 获取历史报价
|
|
|
$scope.getHistory = function (mould) {
|
|
|
if (!mould.history) {
|
|
|
- PurcInquiryMould.getHistory({id: mould.id}, function (data) {
|
|
|
+ PurcInquiryMould.getHistory({id: mould.id},{}, function (data) {
|
|
|
+ $scope.historyShow = true;
|
|
|
mould.history = data;
|
|
|
+ },function (response) {
|
|
|
+ $scope.historyShow = false;
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
@@ -8745,7 +8762,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$modalInstance.close('success');
|
|
|
}).error(function (data) {
|
|
|
$scope.loading = false;
|
|
|
- toaster.pop('danger', '错误', data);
|
|
|
+ toaster.pop('error', '错误', data);
|
|
|
});
|
|
|
};
|
|
|
|
|
|
@@ -15406,6 +15423,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
Vendor.contacts({venduu: $scope.vendor.uu}, {}, function (data) {
|
|
|
$scope.vendorContacts = data;
|
|
|
});
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|
|
|
@@ -17801,6 +17820,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
DeputyOrder.getOrderDetail({id: $stateParams.id}, {}, function (data) {
|
|
|
$scope.deOrder = data;
|
|
|
$scope.deOrder.$editing = true;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
};
|
|
|
loadData();
|