|
|
@@ -216,20 +216,31 @@ define(['app/app'], function(app) {
|
|
|
toaster.pop('error', '回复失败');
|
|
|
});
|
|
|
} else if ($scope.rateType == "allRate") {
|
|
|
+ var count= 0 ;
|
|
|
if ($scope.order.status == 523){
|
|
|
angular.forEach($scope.buyerRateGoods,function (item,index) {
|
|
|
- if (item.buyerRate == '此用户没有填写评价!'){
|
|
|
+ if (item.buyerRate != '此用户没有填写评价!'){
|
|
|
if (!item.returnMeg || item.returnMeg =='' ){
|
|
|
item.returnMeg = param.returnMeg;
|
|
|
- }
|
|
|
- }
|
|
|
+ }else{count++;}
|
|
|
+ }else{count++;}
|
|
|
})
|
|
|
+ if (count == $scope.buyerRateGoods.length){
|
|
|
+ $scope.setShowRateBoxFlag(false);
|
|
|
+ toaster.pop('warning', '所有商品都已回复完成');
|
|
|
+ return;
|
|
|
+ }
|
|
|
}else if ($scope.order.status == 522){
|
|
|
angular.forEach($scope.buyerRateGoods,function (item,index) {
|
|
|
if (item.buyerAfterRate && !item.afterReturnMeg){
|
|
|
item.afterReturnMeg = param.returnMeg;
|
|
|
- }
|
|
|
+ }else {count++;}
|
|
|
})
|
|
|
+ if (count == $scope.buyerRateGoods.length){
|
|
|
+ $scope.setShowRateBoxFlag(false);
|
|
|
+ toaster.pop('warning', '所有商品都已回复完成');
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
Rate.saveAllReply({orderId: $scope.order.orderid},$scope.buyerRateGoods,function (data) {
|
|
|
toaster.pop('success', '批量回复成功');
|