Browse Source

处理批量更新采购单价上传的相关问题

hejq 8 years ago
parent
commit
ea8383fd0f

+ 37 - 0
src/main/java/com/uas/platform/b2b/erp/model/OrderClass.java

@@ -0,0 +1,37 @@
+package com.uas.platform.b2b.erp.model;
+
+/**
+ * ERP出入库单据类型
+ *
+ * Created by hejq on 2018-04-23.
+ */
+public enum OrderClass {
+
+    /**
+     * 采购验收单
+     */
+    PURC_ACCEPT(1, "采购验收单"),
+
+    /**
+     * 采购验退单
+     */
+    PURC_RETURN(2, "采购验退单"),
+
+    /**
+     * 委外验收单
+     */
+    MAKE_ACCEPT(3, "委外验收单"),
+
+    /**
+     * 委外验退单
+     */
+    MAKE_RETURN(4, "委外验退单");
+
+    private final int value;
+    private final String phrase;
+
+    OrderClass(int value, String phrase) {
+        this.value = value;
+        this.phrase = phrase;
+    }
+}

+ 13 - 0
src/main/java/com/uas/platform/b2b/erp/model/ProdInOutRefreshPrice.java

@@ -37,6 +37,11 @@ public class ProdInOutRefreshPrice {
 	 */
 	private Short pd_orderdetno;
 
+	/**
+	 * 单据类型
+	 */
+	private String pbu_piclass;
+
 	public Short getPbu_pdno() {
 		return pbu_pdno;
 	}
@@ -92,4 +97,12 @@ public class ProdInOutRefreshPrice {
 	public void setPd_orderdetno(Short pd_orderdetno) {
 		this.pd_orderdetno = pd_orderdetno;
 	}
+
+	public String getPbu_piclass() {
+		return pbu_piclass;
+	}
+
+	public void setPbu_piclass(String pbu_piclass) {
+		this.pbu_piclass = pbu_piclass;
+	}
 }

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

@@ -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); // 公布结果日期与截止报价日期至少隔一天
             }

+ 3 - 3
src/main/webapp/resources/tpl/index/make/returns.html

@@ -238,12 +238,12 @@
 					<div class="text-bold text-inverse" ng-if="item.order.factory">送货工厂:<span ng-bind="::item.order.factory"></span></div>
 				</td>
 				<td>
-					<div ng-if="!isUser" class="text-num" title="{{::item.order.price}}">
+					<div ng-if="!isUser" class="text-num" title="{{::item.orderPrice}}">
 						<span ng-bind="::currency(returns.currency)"></span><span
-							ng-bind="::item.order.price | number:6"></span>
+							ng-bind="::item.orderPrice | number:6"></span>
 					</div>
 					<div class="text-muted" title="{{item.taxrate}}%">
-						<br> 税率:<span ng-bind="::item.order.taxrate + '%'"
+						<br> 税率:<span ng-bind="::item.taxrate + '%'"
 							class="text-num"></span>
 					</div>
 				</td>