|
|
@@ -7036,11 +7036,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
} else {
|
|
|
if (!isSumbit) {
|
|
|
PurcNotice.sendByBatch({token: token}, $scope.saleSend, function (data) {
|
|
|
- toaster.pop('success', '提示', '发货成功,跳转至发货单:' + $scope.saleSend.code);
|
|
|
- $modalInstance.close('success');
|
|
|
- $state.go('sale.send_detail', {id: data.id});
|
|
|
+ if(data.id) {
|
|
|
+ toaster.pop('success', '提示', '发货成功,跳转至发货单:' + $scope.saleSend.code);
|
|
|
+ $modalInstance.close('success');
|
|
|
+ $state.go('sale.send_detail', {id: data.id});
|
|
|
+ } else if(data.info) {
|
|
|
+ toaster.pop('error', '提示', '发货失败,请刷新页面重试');
|
|
|
+ }
|
|
|
}, function (response) {
|
|
|
- toaster.pop('error', '错误', response.data);
|
|
|
+ toaster.pop('error', '错误', '发货失败');
|
|
|
});
|
|
|
isSumbit = true;
|
|
|
return true;
|