Browse Source

平台相关错误的调整处理

hejq 8 years ago
parent
commit
e2656704fd

+ 1 - 1
src/main/java/com/uas/platform/b2b/controller/PurcProductController.java

@@ -388,7 +388,7 @@ public class PurcProductController {
 	 */
 	 */
 	@RequestMapping(value = "/edit/matchbytype/{type}", method = RequestMethod.POST)
 	@RequestMapping(value = "/edit/matchbytype/{type}", method = RequestMethod.POST)
 	@ResponseBody
 	@ResponseBody
-	private ModelMap matchall(@PathVariable String type) {
+	private ModelMap matchall(@PathVariable String type) throws Exception {
 		return productService.matchall(type);
 		return productService.matchall(type);
 	}
 	}
 }
 }

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

@@ -275,19 +275,6 @@ public class Prod {
 		product.setLtinstock(this.pr_ltinstock);
 		product.setLtinstock(this.pr_ltinstock);
 		product.setSourceId(this.pr_id);
 		product.setSourceId(this.pr_id);
 		product.setBrand(this.pr_brand);
 		product.setBrand(this.pr_brand);
-		if (this.pr_status != null) {
-			if (this.pr_status.equals(Status.DISABLED.getPhrase())) {
-				product.getProductStatus().setB2bDisabled(Constant.YES);
-			} else {
-				product.getProductStatus().setB2bDisabled(null);
-			}
-
-//			if (this.pr_status.equals(Status.AUDITED.getPhrase())) {
-//				//product.setIsSale((short) 1);
-//			} else if (this.pr_status.equals(Status.DISABLED.getPhrase())) {
-//				//product.setIsSale((short) 0);
-//			}
-		}
 		if (this.pr_orispeccode != null) {
 		if (this.pr_orispeccode != null) {
 			product.setCmpCode(this.pr_orispeccode);
 			product.setCmpCode(this.pr_orispeccode);
 		} else {
 		} else {

+ 21 - 21
src/main/webapp/resources/js/index/app.js

@@ -5557,6 +5557,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             window.open("#/sale/pubinquiry");
             window.open("#/sale/pubinquiry");
         }
         }
 
 
+
     }]);
     }]);
 
 
     /**
     /**
@@ -5605,27 +5606,26 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
 
         // 保存报价信息
         // 保存报价信息
         $scope.save = function(inquiryItem, method) {
         $scope.save = function(inquiryItem, method) {
-            console.log(inquiryItem);
-            // var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
-            // $upload.upload({
-            //     url: 'pubInquiry/turnToQuotation',
-            //     file: file,
-            //     method: 'POST',
-            //     data: {
-            //         item: inquiryItem,
-            //         method: method
-            //     }
-            // }).success(function (data) {
-            //     if (data.item) {
-            //         item = data.item;
-            //     }
-            //     $scope.loading = false;
-            //     toaster.pop('info', '提示', '报价成功');
-            //     $modalInstance.close();
-            // }).error(function (data) {
-            //     $scope.loading = false;
-            //     toaster.pop('error', '附件上传失败');
-            // });
+            var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
+            $upload.upload({
+                url: 'pubInquiry/turnToQuotation',
+                file: file,
+                method: 'POST',
+                data: {
+                    item: inquiryItem,
+                    method: method
+                }
+            }).success(function (data) {
+                if (data.item) {
+                    item = data.item;
+                }
+                $scope.loading = false;
+                toaster.pop('info', '提示', '报价成功');
+                $modalInstance.close();
+            }).error(function (data) {
+                $scope.loading = false;
+                toaster.pop('error', '附件上传失败');
+            });
         }
         }
 
 
         $scope.previewShow = false;
         $scope.previewShow = false;