Browse Source

Merge remote-tracking branch 'origin/dev-mysql-1227' into dev-mysql-1227

hulh 8 years ago
parent
commit
003096053c

+ 2 - 1
src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/B2cOrderServiceImpl.java

@@ -133,7 +133,7 @@ public class B2cOrderServiceImpl implements B2cOrderService {
     }
 
     @Override
-    public void ensuryPay(Payment payment) {
+    public boolean ensuryPay(Payment payment) {
         BankTransfer bankTransfer = ModelConverter.convert(payment);
         List<BankInfo> mallBankInfos = bankInfoService.getEnterpriseBankInfoContainsStatus(Type.MALL.value(), Status.ALLOW.value(), sysConf.getEnUU());
         if (!CollectionUtils.isEmpty(mallBankInfos)) {
@@ -141,6 +141,7 @@ public class B2cOrderServiceImpl implements B2cOrderService {
         }
 
         bankTransferService.save(bankTransfer, payment.getOrderid());
+        return true;
     }
 
     @Override

+ 8 - 5
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -1783,11 +1783,14 @@ public class OrderServiceImpl implements OrderService {
 
                     //统计器件的购买的数量
                     String uuid = orderDetail.getUuid();
-                    Double num = mapQty.get(uuid);
-                    num = num == null ? 0 : num;
-                    num = num + orderDetail.getNumber();
-                    uuids.add(uuid);
-                    mapQty.put(uuid, num);
+                    if (!StringUtils.isEmpty(uuid)) {
+                        Double num = mapQty.get(uuid);
+                        num = num == null ? 0 : num;
+                        num = num + orderDetail.getNumber();
+                        uuids.add(uuid);
+                        mapQty.put(uuid, num);
+                    }
+
                 }
             }
 

+ 0 - 2
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -310,8 +310,6 @@
 		text-align:center;
 		_position:absolute;
 		_top:50%; _left:50%;
-		top: inherit !important;
-		left: inherit !important;
 	}
 	#image-box .x-floating img ,.image-box .x-floating img {
 		margin: auto auto;

+ 1 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_order_ctrl.js

@@ -269,7 +269,7 @@ define(['app/app'], function (app) {
 			OrderSimpleInfo.ensureAccept({ids: ids},{},function(data){
 				loadData();
 				getCounts();
-				toaster.pop('success', '处理成功');
+				toaster.pop('success', '成功' ,'确认收货成功');
 			}, function(res){
 				toaster.pop('error', '失败!' + res.data);
 			});

+ 93 - 75
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -1653,21 +1653,21 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		 */
 		var getProductDetail = function (product) {
 			Material.getProductDetail({id : product.id}, function (data) {
-				$scope.goods.erpReserve = typeof data.reserve == 'undefined' ? 0 : data.reserve;
-				$scope.goods.b2cReserve = typeof data.b2cReserve == 'undefined' ? 0 : data.b2cReserve;
-				$scope.goods.packaging = data.packaging;
-				$scope.goods.produceDate = data.produceDate;
-				$scope.goods.minPackQty = data.minPackQty;
-				$scope.goods.breakUp = data.breakUp;
-				$scope.goods.minBuyQty = data.minBuyQty;
-				$scope.goods.minDelivery = data.minDelivery;
-				$scope.goods.maxDelivery = data.maxDelivery;
-				$scope.goods.prices = [];
-				product.selected = true;
-				if ('MAINLAND' == $scope.store.enType)
-					$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, rMBPrice: data.price});
-				if ('HK' == $scope.store.enType)
-					$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, uSDPrice: data.price});
+				// $scope.goods.erpReserve = typeof data.reserve == 'undefined' ? 0 : data.reserve;
+				// $scope.goods.b2cReserve = typeof data.b2cReserve == 'undefined' ? 0 : data.b2cReserve;
+				// $scope.goods.packaging = data.packaging;
+				// $scope.goods.produceDate = data.produceDate;
+				// $scope.goods.minPackQty = data.minPackQty;
+				// $scope.goods.breakUp = data.breakUp;
+				// $scope.goods.minBuyQty = data.minBuyQty;
+				// $scope.goods.minDelivery = data.minDelivery;
+				// $scope.goods.maxDelivery = data.maxDelivery;
+				// $scope.goods.prices = [];
+				// product.selected = true;
+				// if ('MAINLAND' == $scope.store.enType)
+				// 	$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, rMBPrice: data.price});
+				// if ('HK' == $scope.store.enType)
+				// 	$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, uSDPrice: data.price});
 
 			});
 		}
@@ -1763,9 +1763,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		 * @param goods		商品信息
 		 */
 		function setPriceMinAmount(goods, edit) {
-			if ($scope.$$nonProduct.enterSaveButton) {
-				return ;
-			}
             // goods.editMinBuyQtyInValid = false;
 			// if (typeof goods.editMinBuyQty == 'undefined') {
 			// 	goods.editMinBuyQtyInValid = true;
@@ -1782,7 +1779,9 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 						goods.editPrices[0].start = goods.editMinBuyQty;
 					}
 				}
-                toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+				}
                 return false;
             }
             goods.editMinBuyQtyPre = goods.editMinBuyQty;
@@ -1801,27 +1800,32 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		 * @param goods		商品信息
 		 */
 		function setPriceMinPackAmount(goods) {
-			if ($scope.$$nonProduct.enterSaveButton) {
-				return ;
-			}
             goods.editMinPackQtyInValid = false;
 			if (typeof goods.editMinPackQty == 'undefined') {
-				toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				}
 				return false;
 			}
             if (!$scope.isInt.test(goods.editMinPackQty)) {
-				goods.editMinPackQtyInValid = true;
-                toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editMinPackQtyInValid = true;
+					toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				}
                 return false;
             }
             if (parseInt(goods.editMinPackQty) < 1) {
-				goods.editMinPackQtyInValid = true;
-                toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editMinPackQtyInValid = true;
+					toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				}
                 return false;
             }
             if (parseInt(goods.editMinPackQty) > $scope.maxPackQty) {
-                toaster.pop('warning', '提示', '包装数量必须小于' + $scope.maxPackQty);
-				goods.editMinPackQtyInValid = true;
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					toaster.pop('warning', '提示', '包装数量必须小于' + $scope.maxPackQty);
+					goods.editMinPackQtyInValid = true;
+				}
                 return false;
             }
             if (goods.editMinBuyQty) {
@@ -1839,17 +1843,18 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		 * @param goods		商品信息
 		 */
 		function setPriceMaxAmount(goods, edit) {
-			if ($scope.$$nonProduct.enterSaveButton) {
-				return ;
-			}
 			if (!goods.editReserve) {
-				goods.editReserveInvalid = true;
-				toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editReserveInvalid = true;
+					toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				}
 				return false;
 			}
 			if (!$scope.isInt.test(goods.editReserve)) {
-                goods.editReserveInvalid = true;
-                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editReserveInvalid = true;
+					toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				}
                 return false;
 			}
             // if(goods.editMinBuyQty) {
@@ -1860,8 +1865,10 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
             //     }
             // }
             if (parseInt(goods.editReserve) > $scope.maxReserve || goods.editReserve < $scope.minReserve) {
-                goods.editReserveInvalid = true;
-                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editReserveInvalid = true;
+					toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				}
                 return false;
             }
             goods.editReservePre = goods.editReserve;
@@ -1966,9 +1973,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
          * @param isEnd 是否是结束值
          */
         $scope.editQty = function (goods, index, isEnd, num) {
-			if ($scope.$$nonProduct.enterSaveButton) {
-				return ;
-			}
             goods.editPrices[index].endInValid = false;
             goods.editPrices[index].startInValid = false;
             if (goods.editPrices.length < index || index < 0) {
@@ -1978,26 +1982,32 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				return ;
 			}
             if (!$scope.isInt.test(num)) {
-				if (isEnd) {
-					//goods.editPrices[index].endInValid = true;
-					delete goods.editPrices[index].end;
-				} else {
-					//goods.editPrices[index].startInValid = true;
-					delete goods.editPrices[index].start;
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					if (isEnd) {
+						//goods.editPrices[index].endInValid = true;
+						delete goods.editPrices[index].end;
+					} else {
+						//goods.editPrices[index].startInValid = true;
+						delete goods.editPrices[index].start;
+					}
+					toaster.pop('warning', '提示', '输入值必须为正整数');
 				}
-                toaster.pop('warning', '提示', '输入值必须为正整数');
                 return ;
             }
             if (isEnd) {
                 if (index < goods.editPrices.length - 1) {
                     if (parseInt(goods.editPrices[index].end) < parseInt(goods.editPrices[index].start)) {
-                        toaster.pop('warning', '提示', '输入值必须大于' + goods.editPrices[index].start);
-						//goods.editPrices[index].endInValid = true;
-						delete goods.editPrices[index].end;
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值必须大于' + goods.editPrices[index].start);
+							//goods.editPrices[index].endInValid = true;
+							delete goods.editPrices[index].end;
+						}
                     } else if ((goods.editPrices[index + 1].end) && (parseInt(goods.editPrices[index].end) + 1) >= parseInt(goods.editPrices[index + 1].end)) {
-                        toaster.pop('warning', '提示', '输入值必须小于'+(parseInt(goods.editPrices[index + 1].end) - 1));
-						//goods.editPrices[index].endInValid = true;
-						delete goods.editPrices[index].end;
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值必须小于'+(parseInt(goods.editPrices[index + 1].end) - 1));
+							//goods.editPrices[index].endInValid = true;
+							delete goods.editPrices[index].end;
+						}
                     } else {
                         goods.editPrices[index + 1].start = parseInt(goods.editPrices[index].end) + 1;
 						goods.editPrices[index + 1].startInValid = false;
@@ -2025,13 +2035,17 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
                     if (parseInt(goods.editPrices[index].start) > parseInt(goods.editPrices[index].end)) {
                         // toaster.pop('warning', '提示', '修改本分段之后,会导致分段的起始值' + goods.editPrices[index ].start + '大于结束值' + parseInt(goods.editPrices[index].end));
 						//goods.editPrices[index].startInValid = true;
-						toaster.pop('warning', '提示', '输入值必须小于'+ + goods.editPrices[index].end);
-						delete goods.editPrices[index].start;
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值必须小于'+ + goods.editPrices[index].end);
+							delete goods.editPrices[index].start;
+						}
                     } else if ((parseInt(goods.editPrices[index].start) - 1) < goods.editPrices[index - 1].start) {
                         // toaster.pop('warning', '提示', '修改本分段之后,会导致前一个分段的起始值' + goods.editPrices[index - 1].start + '大于结束值' + (parseInt(goods.editPrices[index].start) - 1));
 						//goods.editPrices[index].startInValid = true;
-						toaster.pop('warning', '提示', '输入值会导致梯度重叠,请重新修改');
-						delete goods.editPrices[index].start;
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值会导致梯度重叠,请重新修改');
+							delete goods.editPrices[index].start;
+						}
                     } else {
                         goods.editPrices[index - 1].end = parseInt(goods.editPrices[index].start) - 1;
 						goods.editPrices[index - 1].endInValid = false;
@@ -2152,9 +2166,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
          * @param commodity 批次信息
          */
         $scope.changeDelivery = function(min, max, isMin, goods) {
-			if($scope.$$nonProduct.enterSaveButton) {
-				return ;
-			}
 			if(isMin) {
 				goods.editMinDeliveryinValid = false;
 			}else {
@@ -2169,9 +2180,11 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 						return ;
 					}
                     if(!$scope.isInt.test(min)) {
-                        toaster.pop('warning', '提示', '交期请输入1-31的整数');
+						if(!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '交期请输入1-31的整数');
+							goods.editMinDeliveryinValid = true;
+						}
                     }
-                    goods.editMinDeliveryinValid = true;
                     return ;
                 }
 
@@ -2183,27 +2196,32 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 						return ;
 					}
                     if(!$scope.isInt.test(max)) {
-                        toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+						if(!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+							goods.editMaxDeliveryinValid = true;
+						}
                     }
-                    goods.editMaxDeliveryinValid = true;
                     return ;
                 }
 
             }
             if(day > 31 || day < 1) {
-                if(isMin) {
-                    goods.editMinDeliveryinValid = true;
-                }else {
-                    goods.editMaxDeliveryinValid = true;
-                }
-                toaster.pop('warning', '提示', '交期的值必须在1-31天');
-
+				if(!$scope.$$nonProduct.enterSaveButton) {
+					if(isMin) {
+						goods.editMinDeliveryinValid = true;
+					}else {
+						goods.editMaxDeliveryinValid = true;
+					}
+					toaster.pop('warning', '提示', '交期的值必须在1-31天');
+				}
                 return ;
             }
             if(Number(min) > Number(max)) {
-                goods.editMinDeliveryinValid = true;
-                goods.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+				if(!$scope.$$nonProduct.enterSaveButton) {
+					goods.editMinDeliveryinValid = true;
+					goods.editMaxDeliveryinValid = true;
+					toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+				}
                 return ;
             }
 			goods.editMinDeliveryinValid = false;

+ 89 - 65
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -379,13 +379,16 @@ define([ 'app/app' ], function(app) {
          * @param edit
          */
         $scope.editPackaging = function(goods) {
-            goods.editPackagingInvalid = false;
             if (goods.editPackaging) {
                 if (!pattern.test(goods.editPackaging)) {
-                    toaster.pop('warning', '提示', '包装方式只能填写中英文');
-                    goods.editPackagingInvalid = true;
+                    if (!$scope.enterSaveButton) {
+                        goods.editPackagingInvalid = true;
+                        toaster.pop('warning', '提示', '包装方式只能填写中英文');
+                        return ;
+                    }
                 }
             }
+            goods.editPackagingInvalid = false;
         };
 
         $scope.changePackaging = function (goods) {
@@ -668,9 +671,6 @@ define([ 'app/app' ], function(app) {
          * @param isEnd 是否是结束值
          */
         $scope.editQty = function (commodity, index, isEnd, num) {
-            if($scope.enterSaveButton) {
-                return ;
-            }
             commodity.editPrices[index].endInValid = false;
             commodity.editPrices[index].startInValid = false;
             if(commodity.editPrices.length < index || index < 0) {
@@ -680,26 +680,32 @@ define([ 'app/app' ], function(app) {
                 return ;
             }
             if (!$scope.isInt.test(num)) {
-                if (isEnd) {
-                    delete commodity.editPrices[index].end;
-                    //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
-                } else {
-                    delete commodity.editPrices[index].start;
-                    //commodity.editPrices[index].start = commodity.editPrices[index].startPre;
+                if(!$scope.enterSaveButton) {
+                    if (isEnd) {
+                        delete commodity.editPrices[index].end;
+                        //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
+                    } else {
+                        delete commodity.editPrices[index].start;
+                        //commodity.editPrices[index].start = commodity.editPrices[index].startPre;
+                    }
+                    toaster.pop('warning', '提示', '分段数量必须为正整数');
                 }
-                toaster.pop('warning', '提示', '分段数量必须为正整数');
                 return ;
             }
             if (isEnd) {
                 if (index < commodity.editPrices.length - 1) {
                     if (parseInt(commodity.editPrices[index].end) < parseInt(commodity.editPrices[index].start)) {
-                        toaster.pop('warning', '提示', '输入值必须大于' +  commodity.editPrices[index].start);
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入值必须大于' +  commodity.editPrices[index].start);
+                            delete commodity.editPrices[index].end;
+                        }
                         //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
-                        delete commodity.editPrices[index].end;
                     } else if ((commodity.editPrices[index + 1].end) && (parseInt(commodity.editPrices[index].end) + 1) >= parseInt(commodity.editPrices[index + 1].end)) {
-                        toaster.pop('warning', '提示', '输入的值必须小于'+(parseInt(commodity.editPrices[index].end) - 1));
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入的值必须小于'+(parseInt(commodity.editPrices[index].end) - 1));
+                            delete commodity.editPrices[index].end;
+                        }
                         //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
-                        delete commodity.editPrices[index].end;
                     } else {
                         commodity.editPrices[index + 1].start = parseInt(commodity.editPrices[index].end) + 1;
                         commodity.editPrices[index].endPre = commodity.editPrices[index].end;
@@ -726,13 +732,17 @@ define([ 'app/app' ], function(app) {
                     if (parseInt(commodity.editPrices[index].start) > parseInt(commodity.editPrices[index].end)) {
                         // toaster.pop('warning', '提示', '修改本分段之后,会导致分段的起始值' + commodity.editPrices[index ].start + '大于结束值' + parseInt(commodity.editPrices[index].end));
                         //commodity.editPrices[index].start = commodity.editPrices[index].startPre;
-                        toaster.pop('warning', '提示', '输入值必须小于'+ + commodity.editPrices[index].end);
-                        delete commodity.editPrices[index].start;
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入值必须小于'+ + commodity.editPrices[index].end);
+                            delete commodity.editPrices[index].start;
+                        }
                     } else if ((parseInt(commodity.editPrices[index].start) - 1) < commodity.editPrices[index - 1].start) {
                         // toaster.pop('warning', '提示', '修改本分段之后,会导致前一个分段的起始值' + commodity.editPrices[index - 1].start + '大于结束值' + (parseInt(commodity.editPrices[index].start) - 1));
                         // commodity.editPrices[index].start = commodity.editPrices[index].startPre;
-                        toaster.pop('warning', '提示', '输入值会导致梯度重叠,请重新修改');
-                        delete commodity.editPrices[index].start;
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入值会导致梯度重叠,请重新修改');
+                            delete commodity.editPrices[index].start;
+                        }
                     } else {
                         commodity.editPrices[index - 1].end = parseInt(commodity.editPrices[index].start) - 1;
                         commodity.editPrices[index].startPre = commodity.editPrices[index].start;
@@ -800,23 +810,24 @@ define([ 'app/app' ], function(app) {
          * 验证库存量是否大于原有的库存量
          */
         $scope.changeReserve = function (commodity) {
-            if ($scope.enterSaveButton) {
-                return ;
-            }
             commodity.editReserveInvalid = true;
             if (typeof commodity.editReserve == 'undefined') {
                 return;
             }
             if (!commodity.editReserve) {
                 //commodity.editReserve = commodity.editReservePre;
-                commodity.editReserveInvalid = true;
-                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                if (!$scope.enterSaveButton) {
+                    commodity.editReserveInvalid = true;
+                    toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                }
                 return false;
             }
             if (!$scope.isInt.test(commodity.editReserve)) {
                 //commodity.editReserve = commodity.editReservePre;
-                commodity.editReserveInvalid = true;
-                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                    commodity.editReserveInvalid = true;
+                }
                 return false;
             }
             // if (parseInt(commodity.editReserve) < parseInt(commodity.editMinBuyQty)) {
@@ -827,8 +838,10 @@ define([ 'app/app' ], function(app) {
             // }
             if (parseInt(commodity.editReserve) > $scope.maxReserve || commodity.editReserve < $scope.minReserve) {
                 //commodity.editReserve = commodity.editReservePre;
-                commodity.editReserveInvalid = true;
-                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                    commodity.editReserveInvalid = true;
+                }
                 return false;
             }
             commodity.editReservePre = commodity.editReserve;
@@ -877,9 +890,6 @@ define([ 'app/app' ], function(app) {
          * 验证库存的最小起订量是否大于库存量
          */
         $scope.changeMinBuyQty = function (commodity) {
-            if ($scope.enterSaveButton) {
-                return ;
-            }
             // commodity.editMinBuyQtyInValid = false;
             // if (typeof commodity.editMinBuyQty == 'undefined') {
             //     commodity.editMinBuyQtyInValid = true;
@@ -896,7 +906,10 @@ define([ 'app/app' ], function(app) {
                         commodity.editPrices[0].start = commodity.editMinBuyQty;
                     }
                 }
-                toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+                    return false;
+                }
                 return false;
             }
             commodity.editMinBuyQtyPre = commodity.editMinBuyQty;
@@ -914,19 +927,21 @@ define([ 'app/app' ], function(app) {
          * @param commodity
          */
         $scope.changeMinPackQty = function(commodity) {
-            if($scope.enterSaveButton) {
-                return ;
-            }
-            commodity.editMinPackQtyInValid = true;
             if(typeof commodity.editMinPackQty == 'undefined') {
                 return;
             }
             if(!$scope.isInt.test(commodity.editMinPackQty)) {
-                toaster.pop('warning', '提示', '包装数必须是大于0的整数');
+                if(!$scope.enterSaveButton) {
+                    commodity.editMinPackQtyInValid = true;
+                    toaster.pop('warning', '提示', '包装数必须是大于0的整数');
+                }
                 return false;
             }
             if(commodity.editMinPackQty < 1) {
-                toaster.pop('warning', '提示', '包装数必须大于0');
+                if(!$scope.enterSaveButton) {
+                    commodity.editMinPackQtyInValid = true;
+                    toaster.pop('warning', '提示', '包装数必须是大于0的整数');
+                }
                 return false;
             }
             // if(commodity.editMinPackQty > commodity.editReserve) {
@@ -934,8 +949,11 @@ define([ 'app/app' ], function(app) {
             //     return false;
             // }
             if(parseInt(commodity.editMinPackQty) > $scope.maxPackQty) {
-                toaster.pop('warning', '提示', '包装数量必须小于等于' + $scope.maxPackQty);
-                return ;
+                if(!$scope.enterSaveButton) {
+                    commodity.editMinPackQtyInValid = true;
+                    toaster.pop('warning', '提示', '包装数量必须小于等于' + $scope.maxPackQty);
+                }
+                return false;
             }
             if(commodity.editMinBuyQty) {
                 if(!commodity.editBreakUp) {
@@ -1001,9 +1019,6 @@ define([ 'app/app' ], function(app) {
          * @param commodity 批次信息
          */
         $scope.changeDelivery = function(min, max, isMin, isHk, commodity) {
-            if($scope.enterSaveButton) {
-                return ;
-            }
             if(isMin) {
                 commodity.editMinDeliveryinValid = false;
             }else {
@@ -1018,12 +1033,13 @@ define([ 'app/app' ], function(app) {
                         return ;
                     }
                     if(!$scope.isInt.test(min)) {
-                        toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                        if(!$scope.enterSaveButton) {
+                            commodity.editMinDeliveryinValid = true;
+                            toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                        }
                     }
-                    commodity.editMinDeliveryinValid = true;
                     return ;
                 }
-
             }else {
                 if(max && $scope.isInt.test(max)) {
                     day = max;
@@ -1032,28 +1048,32 @@ define([ 'app/app' ], function(app) {
                         return ;
                     }
                     if(!$scope.isInt.test(max)) {
-                        toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                        if (!$scope.enterSaveButton) {
+                            commodity.editMaxDeliveryinValid = true;
+                            toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                        }
                     }
-                    commodity.editMaxDeliveryinValid = true;
                     return ;
                 }
 
             }
             if(day > 31 || day < 1) {
-                if(isMin) {
-                    commodity.editMinDeliveryinValid = true;
-                }else {
-                    commodity.editMaxDeliveryinValid = true;
+                if(!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                    if(isMin) {
+                        commodity.editMinDeliveryinValid = true;
+                    }else {
+                        commodity.editMaxDeliveryinValid = true;
+                    }
                 }
-                toaster.pop('warning', '提示', '交期只能是1-31之间的值');
-
                 return ;
             }
             if(Number(min) > Number(max)) {
-                commodity.editMinDeliveryinValid = true;
-                commodity.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
-
+                if(!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+                    commodity.editMinDeliveryinValid = true;
+                    commodity.editMaxDeliveryinValid = true;
+                }
                 return ;
             }
 
@@ -1087,13 +1107,17 @@ define([ 'app/app' ], function(app) {
                 return ;
             }
             if(isNaN(price)) {
-                prices[index].priceInvalid = true;
-                toaster.pop('warning', '提示', '单价必须是大于0的数字');
-                return;
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '单价必须是大于0的数字');
+                    prices[index].priceInvalid = true;
+                    return;
+                }
             }
             if(new Number(price) <= 0) {
-                prices[index].priceInvalid = true;
-                toaster.pop('warning', '提示', '单价必须是大于0的数字');
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '单价必须是大于0的数字');
+                    prices[index].priceInvalid = true;
+                }
                 return;
             }
             if(price.indexOf('.') > -1) {

+ 21 - 6
src/main/webapp/resources/view/admin/store_qualification_maintenance.html

@@ -92,6 +92,7 @@
 		border-bottom: #fff 1px solid;
 	}
 	.open-web{
+		margin-left: 13%;
 		width: 150px;
 		height: 40px;
 		display: inline-block;
@@ -100,12 +101,26 @@
 		text-align: center;
 		color: #fff;
 		border-radius: 5px;
-		margin-left: 35%;
 	}
 	.open-web:hover{
 		background: #5078cb;
 		color: #fff;
 	}
+	.open-img{
+		margin-left: 2%;
+		width: 150px;
+		height: 40px;
+		display: inline-block;
+		line-height: 40px;
+		background: #3ba9e9;
+		text-align: center;
+		color: #fff;
+		border-radius: 5px;
+	}
+	.open-img:hover{
+		background: #5078cb;
+		color: #fff;
+	}
 	.comon-row{
 		margin-top: 20px;
 	}
@@ -282,8 +297,8 @@
 	.image-box .x-floating {
 		position: fixed;
 		z-index: 99999;
-		top: 60px;
-		left: 0;
+		top: 60px !important ;
+		left: 0 !important ;
 		width: 100%;
 		height: 100%;
 		text-align: center;
@@ -336,7 +351,6 @@
 		font-weight: normal;
 	}
 	/* 预览框 end */
-
 </style>
 <div class="row-fluid sortable" id="store-qualification">
 	<div class="title-top row">
@@ -593,7 +607,7 @@
 											<div class="x-close-wrap" title="关闭">
 												<a href="javascript:void(0);" ng-click="showBrandInfo(brand, false)">×</a>
 											</div>
-											<div class="x-floating-wrap"></div>
+											<div class="x-floating-wrap" style="z-index: 10 !important;"></div>
 											<div class="x-floating">
 												<img ng-src="{{brand.url}}"/>
 											</div>
@@ -616,6 +630,7 @@
 								</div>
 							</div>
 						</div>
+						<a ng-href="{{brand.url}}" class="open-img" target="_blank">查看大图</a>
 						<a href="http://sbj.saic.gov.cn/sbcx/" class="open-web" target="_blank" ng-if="brand.certificate === '大陆商标注册证' && application.type === 'ORIGINAL_FACTORY'">打开认证网站</a>
 						<a href="http://ipsearch.ipd.gov.hk/trademark/index.html" class="open-web" target="_blank" ng-if="brand.certificate === '香港注册证明书' && application.type === 'ORIGINAL_FACTORY'">打开认证网站</a>
 					</div>
@@ -679,7 +694,7 @@
 											<div class="x-close-wrap" title="关闭">
 												<a href="javascript:void(0);" ng-click="showBrandInfo(brand, false)">×</a>
 											</div>
-											<div class="x-floating-wrap"></div>
+											<div class="x-floating-wrap" style="z-index: 10 !important;"></div>
 											<div class="x-floating">
 												<img ng-src="{{brand.url}}"/>
 											</div>