|
|
@@ -9223,7 +9223,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if ($scope.returns.returnItems != null) {
|
|
|
var sum = 0;
|
|
|
angular.forEach($scope.returns.returnItems, function (item) {
|
|
|
- sum += item.orderPrice * item.qty;
|
|
|
+ if (null != item.orderPrice) {
|
|
|
+ sum += item.orderPrice * item.qty;
|
|
|
+ }
|
|
|
});
|
|
|
$scope.totalPrice = sum;
|
|
|
}
|
|
|
@@ -18964,30 +18966,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- // // 查找客户物料
|
|
|
- // $scope.dbfindCustProd = function(){
|
|
|
- // if($scope.item.$editing) {
|
|
|
- // if($scope.item.quotation.cust.uu) {
|
|
|
- // var modalInstance = $modal.open({
|
|
|
- // templateUrl: 'static/tpl/index/sale/quotation_new_custProd.html',
|
|
|
- // controller: 'DbfindCustProdCtrl',
|
|
|
- // size: 'lg',
|
|
|
- // resolve: {
|
|
|
- // custUU: function(){return $scope.item.quotation.cust.uu}
|
|
|
- // }
|
|
|
- // });
|
|
|
- //
|
|
|
- // modalInstance.result.then(function(data){
|
|
|
- // $scope.item.product = data;
|
|
|
- // }, function(){
|
|
|
- //
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // toaster.pop('error', '错误', '请先选择客户');
|
|
|
- // }
|
|
|
- // }
|
|
|
- // };
|
|
|
-
|
|
|
if (!$scope.attaches) {
|
|
|
$scope.attaches = []; // 存放上传了的附件
|
|
|
}
|
|
|
@@ -18999,9 +18977,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url: 'tender/addTenderAttach',
|
|
|
file: file,
|
|
|
method: 'POST'
|
|
|
- // data: {
|
|
|
- // tender: $scope.tender
|
|
|
- // }
|
|
|
}).success(function (attach) {
|
|
|
$scope.attaches.push(attach);
|
|
|
});
|
|
|
@@ -19009,9 +18984,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
$scope.removeAttach = function (id, index) {
|
|
|
$scope.attaches.splice(index, 1);
|
|
|
- // PurcTender.removeAttach({attachId:id}, function() {
|
|
|
- //
|
|
|
- // });
|
|
|
};
|
|
|
|
|
|
var sleep = function (d) {
|
|
|
@@ -19188,10 +19160,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
|
|
|
$scope.getMinDate = function () {
|
|
|
- // var now = new Date();
|
|
|
- // now = now.setDate(now.getDate()+1);
|
|
|
- // var minDate = angular.copy($scope.tender.endDate);
|
|
|
- // minDate = minDate.setDate(minDate.getDate() + 1);
|
|
|
if ($scope.tender.endDate instanceof Date) {
|
|
|
var minDate = new Date($scope.tender.endDate.getTime() + 2 * 24 * 60 * 60 * 1000 + 1); // 公布结果日期与截止报价日期至少隔一天
|
|
|
}
|