Quellcode durchsuchen

采购验收单金额显示异常及物料信息显示异常问题的处理

hejq vor 8 Jahren
Ursprung
Commit
be80562531

+ 3 - 0
src/main/webapp/resources/js/index/app.js

@@ -9003,6 +9003,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if ($scope.accept.acceptItems != null) {
                     var sum = 0;
                     angular.forEach($scope.accept.acceptItems, function (item) {
+                        if (item.orderPrice == null) {
+                            item.orderPrice = 0;
+                        }
                         sum += item.orderPrice * item.qty;
                     });
                     $scope.totalPrice = sum;

+ 1 - 11
src/main/webapp/resources/tpl/index/sale/accept.html

@@ -200,9 +200,6 @@
 			<tr class="order-hd">
 				<td class="first" colspan="6">
 					<div class="order-main">
-						<!--<span> <input type="checkbox" class="selector"
-						ng-model="accept.$selected">
-					</span> -->
 						<span class="text-num text-bold"
 							title="{{accept.date | date: 'yyyy年MM月dd日 hh:mm'}}"
 							ng-bind="accept.date | date:'yyyy-MM-dd'"></span> <span
@@ -215,13 +212,6 @@
 						</span>
 					</div>
 				</td>
-				<!-- <td colspan="1" class="text-center">
-				<div class="operates">
-					<a href="#" class="text-muted" title="打印">
-						<i class="fa fa-print fa-lg fa-fw"></i>
-					</a>
-				</div>
-			</td> -->
 			</tr>
 			<tr class="order-bd" ng-repeat="item in accept.acceptItems">
 				<td class="product">
@@ -251,7 +241,7 @@
 				<td>
 					<div ng-if="!isUser" class="text-num" title="{{item.orderPrice}}">
 						<span ng-bind="::currency(accept.currency)"></span><span
-							ng-bind="item.orderPrice | number : 6"></span>
+							ng-bind="item.orderPrice || 0 | number : 6"></span>
 					</div>
 					<div  ng-if="isUser" class="text-num"></div>
 					<div class="text-muted" title="{{item.orderItem.taxrate}}%">

+ 5 - 5
src/main/webapp/resources/tpl/index/sale/accept_detail.html

@@ -106,16 +106,16 @@
 						</td>
 						<td class="text-center" width="180">
 							<div>
-								<span ng-bind="::acceptitem.orderItem.product.code"></span>
-								<span ng-bind="::acceptitem.orderItem.product.title"></span>
-								<span ng-bind="::acceptitem.orderItem.product.cmpCode"></span>
+								<span ng-bind="::acceptitem.product.code"></span>
+								<span ng-bind="::acceptitem.product.title"></span>
+								<span ng-bind="::acceptitem.product.cmpCode"></span>
 							</div>
 						</td>
 						<td class="text-center" width="100">
-							<div ng-bind="::acceptitem.orderItem.product.brand"></div>
+							<div ng-bind="::acceptitem.product.brand"></div>
 						</td>
 						<td class="text-center" width="50">
-							<div ng-bind="::acceptitem.orderItem.product.unit"></div>
+							<div ng-bind="::acceptitem.product.unit"></div>
 						</td>
 						<td class="text-center" width="60">
 							<div ng-if="!isUser" ng-bind="::acceptitem.orderPrice"></div>