|
|
@@ -1515,13 +1515,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, 5000);
|
|
|
}
|
|
|
var getToken = function() {
|
|
|
- if($scope.token == null) {
|
|
|
- token.info({userType: 'salenotice'}, {}, function(data) {
|
|
|
- $scope.token = data.token;
|
|
|
- }, function(response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
+ token.info({userType: 'salenotice'}, {}, function(data) {
|
|
|
+ $scope.token = data.token;
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
getToken();
|
|
|
$scope.send = function () {// 发货
|
|
|
@@ -3025,13 +3023,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 获取token信息
|
|
|
$scope.getToken = function() {
|
|
|
- if($scope.token == null) {
|
|
|
- token.info({userType: 'sale'}, {}, function(data) {
|
|
|
- $scope.token = data.token;
|
|
|
- }, function(response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
+ token.info({userType: 'sale'}, {}, function(data) {
|
|
|
+ $scope.token = data.token;
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
$scope.onReplyClick = function (item, inverse) {
|
|
|
@@ -3049,14 +3045,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
if (inverse && inverse == -1) reply.qty = -1 * reply.qty;// 取相反
|
|
|
$scope.loading = true;
|
|
|
- PurcOrderItem.reply({orderItemId: item.id, token: $scope.token}, reply, function () {
|
|
|
- $scope.loading = false;
|
|
|
- toaster.pop('info', '提示', (inverse == -1 ? '撤销成功' : '回复成功'));
|
|
|
- $scope.tableParams.reload();
|
|
|
- }, function (response) {
|
|
|
- $scope.loading = false;
|
|
|
- toaster.pop('error', '回复失败', response.data);
|
|
|
- });
|
|
|
+ if($scope.token != null) {
|
|
|
+ PurcOrderItem.reply({orderItemId: item.id, token: $scope.token}, reply, function () {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('info', '提示', (inverse == -1 ? '撤销成功' : '回复成功'));
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }, function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '回复失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -3623,13 +3621,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 获取token信息
|
|
|
$scope.getToken = function() {
|
|
|
- if($scope.token == null) {
|
|
|
- token.info({userType: 'salenotice'}, {}, function(data) {
|
|
|
- $scope.token = data.token;
|
|
|
- }, function(response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
+ token.info({userType: 'salenotice'}, {}, function(data) {
|
|
|
+ $scope.token = data.token;
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
$scope.onReplyClick = function (item, withSteps) {
|
|
|
@@ -6144,13 +6140,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 获取token信息
|
|
|
$scope.getToken = function() {
|
|
|
- if($scope.token == null) {
|
|
|
- token.info({userType: 'salenotice'}, {}, function(data) {
|
|
|
- $scope.token = data.token;
|
|
|
- }, function(response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
+ token.info({userType: 'salenotice'}, {}, function(data) {
|
|
|
+ $scope.token = data.token;
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
//可送货日期
|