|
|
@@ -6517,6 +6517,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if($stateParams.id) {
|
|
|
PurcAccept.getDetail({id: $stateParams.id}, {}, function(data) {
|
|
|
$scope.accept= data;
|
|
|
+ if($scope.accept.acceptItems != null) {
|
|
|
+ var sum = 0;
|
|
|
+ angular.forEach($scope.accept.acceptItems, function(item) {
|
|
|
+ sum += item.orderPrice * item.qty;
|
|
|
+ });
|
|
|
+ $scope.totalPrice = sum;
|
|
|
+ }
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -6612,6 +6619,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if($stateParams.id != null) {
|
|
|
PurcReturn.getDetail({id: $stateParams.id}, {}, function(data) {
|
|
|
$scope.returns = data;
|
|
|
+ if($scope.returns.returnItems != null) {
|
|
|
+ var sum = 0;
|
|
|
+ angular.forEach($scope.returns.returnItems, function(item) {
|
|
|
+ sum += item.orderPrice * item.qty;
|
|
|
+ });
|
|
|
+ $scope.totalPrice = sum;
|
|
|
+ }
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|