Просмотр исходного кода

修改包装方式和交期的输入验证

hulh 8 лет назад
Родитель
Сommit
0d81e21f0b

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/constant/ErrorInfoConstant.java

@@ -21,7 +21,7 @@ public enum  ErrorInfoConstant {
     PACKAGE_EMPTY_INFO("F列:包装方式不能为空"),
     PERSON_PACKAGE_EMPTY_INFO("C列:规格信息不能为空"),
     DELIVERY_EMPTY_INFO("G-H列:存在交期的信息为空"),
-    DELIVERY_VALUE_INFO("G-H列:交期只能填写1-31之间的整数值"),
+    DELIVERY_VALUE_INFO("G-H列:交期只能填写1-999之间的整数值"),
     PRICE_INFO("K列:单价必须是小于1万的正数"),
     MIN_PACKAGE_INFO("I列:最小包数量包含非数字字符"),
     REPEAT_IN_EXCEL("表格中已存在相同的产品");

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/constant/ShortConstant.java

@@ -10,7 +10,7 @@ public class ShortConstant {
     /**
      * 最长交期
      */
-    public static final Short maxDelivery = 31;
+    public static final Short maxDelivery = 999;
 
     /**
      * 最短交期

+ 8 - 8
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -246,14 +246,14 @@ public class GoodsServiceImpl implements GoodsService {
         if (goods.getPackaging() == null) {
             throw new IllegalOperatorException("包装信息为空");
         }
-        if (goods.getPackaging().length() > 10) {
-            throw new IllegalOperatorException("包装信息操作约定的10个字符");
-        }
-        if (!PatternUtil.matchChineseAndEnglish(goods.getPackaging())) {
-            throw new IllegalOperatorException("包装信息只能包含中文和英文");
-        }
-        if (goods.getProduceDate().length() > 11) {
-            throw new IllegalOperatorException("产品生产日期不能超过11个字符");
+//        if (goods.getPackaging().length() > 10) {
+//            throw new IllegalOperatorException("包装信息操作约定的10个字符");
+//        }
+//        if (!PatternUtil.matchChineseAndEnglish(goods.getPackaging())) {
+//            throw new IllegalOperatorException("包装信息只能包含中文和英文");
+//        }
+        if (goods.getProduceDate().length() > 12) {
+            throw new IllegalOperatorException("产品生产日期不能超过12个字符");
         }
         if (goods.getOriginal() == null) {
             throw new IllegalOperatorException("必须选择库存类型");

BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls


BIN
src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls


+ 37 - 25
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -38,6 +38,18 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		 * @type {number}
 		 */
 		$scope.maxReserve = 999999999;
+
+		$scope.packageArray = ["请选择", "Bulk-散装", "Reel-卷装", "Tape/Reel-编带", "Tray-盘装",
+			"Tube-管装", "盒装", "袋装", "罐装", "瓶装", "桶装", "箱装"];
+
+		$scope.showText = function (item) {
+			$scope.goods.editPackaging = item;
+		};
+		
+		$scope.showClickText = function (goods, item) {
+			goods.editPackaging = item;
+		};
+
 		/**
 		 * 最小包装量的最大值
 		 */
@@ -1284,27 +1296,27 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
                 toaster.pop('warning', '提示', '标签信息超过了20个字符');
                 return result;
             }
-            if (!goods.editPackaging) {
-                goods.editPackagingInvalid = true;
-                toaster.pop('warning', '提示', '请填写包装方式');
-                return result;
-            }
-            if (!pattern.test(goods.editPackaging)) {
+            if (!goods.editPackaging || goods.editPackaging == '请选择') {
                 goods.editPackagingInvalid = true;
-                toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
-                return result;
-            }
-            if (goods.editPackaging.length > 10) {
-                goods.editPackagingInvalid = true;
-                toaster.pop('warning', '提示', '包装方式不能超过10个字符');
+                toaster.pop('warning', '提示', '请选择包装方式');
                 return result;
             }
+            // if (!pattern.test(goods.editPackaging)) {
+            //     goods.editPackagingInvalid = true;
+            //     toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
+            //     return result;
+            // }
+            // if (goods.editPackaging.length > 10) {
+            //     goods.editPackagingInvalid = true;
+            //     toaster.pop('warning', '提示', '包装方式不能超过10个字符');
+            //     return result;
+            // }
             if (!goods.editProduceDate) {
                 goods.editProduceDateInvalid = true;
                 toaster.pop('warning', '提示', '请填写生产日期');
                 return result;
             }
-            if (goods.editProduceDate.length > 11) {
+            if (goods.editProduceDate.length > 12) {
                 goods.editProduceDateInvalid = true;
                 toaster.pop('warning', '提示', '生产日期不能超过12个字符');
                 return result;
@@ -1450,31 +1462,31 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
         $scope.compareNum = function(min, max, type, goods) {
             if(!min) {
                 goods.editMinDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                 return false;
             }else if(!max) {
                 goods.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                 return false;
             }
             if(!$scope.isInt.test(min)) {
                 goods.editMinDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                 return false;
             }
             if(!$scope.isInt.test(max)) {
                 goods.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                 return false;
             }
-            if(min < 1 || min > 31) {
+            if(min < 1 || min > 999) {
                 goods.editMinDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的值');
                 return false;
             }
-            if(max < 1 || max > 31) {
+            if(max < 1 || max > 999) {
                 goods.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期的时间必须是1-31之内');
+                toaster.pop('warning', '提示', '交期的时间必须是1-999之内');
                 return false;
             }
             if(Number(min) > Number(max)) {
@@ -2519,7 +2531,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 					}
                     if(!$scope.isInt.test(min)) {
 						if(!$scope.$$nonProduct.enterSaveButton) {
-							toaster.pop('warning', '提示', '交期请输入1-31的整数');
+							toaster.pop('warning', '提示', '交期请输入1-999的整数');
 							goods.editMinDeliveryinValid = true;
 						}
                     }
@@ -2535,7 +2547,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 					}
                     if(!$scope.isInt.test(max)) {
 						if(!$scope.$$nonProduct.enterSaveButton) {
-							toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+							toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
 							goods.editMaxDeliveryinValid = true;
 						}
                     }
@@ -2543,14 +2555,14 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
                 }
 
             }
-            if(day > 31 || day < 1) {
+            if(day > 999 || day < 1) {
 				if(!$scope.$$nonProduct.enterSaveButton) {
 					if(isMin) {
 						goods.editMinDeliveryinValid = true;
 					}else {
 						goods.editMaxDeliveryinValid = true;
 					}
-					toaster.pop('warning', '提示', '交期的值必须在1-31天');
+					toaster.pop('warning', '提示', '交期的值必须在1-999天');
 				}
                 return ;
             }

+ 24 - 21
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -9,6 +9,9 @@ define([ 'app/app' ], function(app) {
         //数字的正则表达式
         var intPattern = /^[1-9]+$/;
 
+        $scope.packageArray = ["Bulk-散装", "Reel-卷装", "Tape/Reel-编带", "Tray-盘装",
+            "Tube-管装", "盒装", "袋装", "罐装", "瓶装", "桶装", "箱装"];
+
         //只包含中文和英文的字符
         var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
         $scope.param = {
@@ -983,22 +986,22 @@ define([ 'app/app' ], function(app) {
             }
             if(!$scope.isInt.test(min)) {
                 commodity.editMinDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                 return false;
             }
             if(!$scope.isInt.test(max)) {
                 commodity.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                 return false;
             }
-            if(min < 1 || min > 31) {
+            if(min < 1 || min > 999) {
                 commodity.editMinDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的值');
                 return false;
             }
-            if(max < 1 || max > 31) {
+            if(max < 1 || max > 999) {
                 commodity.editMaxDeliveryinValid = true;
-                toaster.pop('warning', '提示', '交期的时间必须是1-31之内');
+                toaster.pop('warning', '提示', '交期的时间必须是1-999之内');
                 return false;
             }
             if(Number(min) > Number(max)) {
@@ -1034,7 +1037,7 @@ define([ 'app/app' ], function(app) {
                     if(!$scope.isInt.test(min)) {
                         if(!$scope.enterSaveButton) {
                             commodity.editMinDeliveryinValid = true;
-                            toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                            toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                         }
                     }
                     return ;
@@ -1049,16 +1052,16 @@ define([ 'app/app' ], function(app) {
                     if(!$scope.isInt.test(max)) {
                         if (!$scope.enterSaveButton) {
                             commodity.editMaxDeliveryinValid = true;
-                            toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                            toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                         }
                     }
                     return ;
                 }
 
             }
-            if(day > 31 || day < 1) {
+            if(day > 999 || day < 1) {
                 if(!$scope.enterSaveButton) {
-                    toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                    toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
                     if(isMin) {
                         commodity.editMinDeliveryinValid = true;
                     }else {
@@ -1161,22 +1164,22 @@ define([ 'app/app' ], function(app) {
                 toaster.pop('warning', '提示', '请填写包装方式');
                 return result;
             }
-            if (!pattern.test(goods.editPackaging)) {
-                goods.editPackagingInvalid = true;
-                toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
-                return result;
-            }
-            if (goods.editPackaging.length > 10) {
-                goods.editPackagingInvalid = true;
-                toaster.pop('warning', '提示', '包装方式不能超过10个字符');
-                return result;
-            }
+            // if (!pattern.test(goods.editPackaging)) {
+            //     goods.editPackagingInvalid = true;
+            //     toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
+            //     return result;
+            // }
+            // if (goods.editPackaging.length > 10) {
+            //     goods.editPackagingInvalid = true;
+            //     toaster.pop('warning', '提示', '包装方式不能超过10个字符');
+            //     return result;
+            // }
             if (!goods.editProduceDate) {
                 goods.editProduceDateInvalid = true;
                 toaster.pop('warning', '提示', '请填写生产日期');
                 return result;
             }
-            if (goods.editProduceDate.length > 11) {
+            if (goods.editProduceDate.length > 12) {
                 goods.editProduceDateInvalid = true;
                 toaster.pop('warning', '提示', '生产日期不能超过12个字符');
                 return result;

+ 41 - 26
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -404,6 +404,15 @@
 		text-align: center;
 	    padding: 0;
 	}
+	.edit-content .input-list .select-package{
+		width: 96px;
+		height: 24px;
+		border: 1px solid #a9a9a9;
+		font-size: 12px;
+		text-align: center;
+		border-radius: 3px;
+		padding-left: 6px;
+	}
 	.edit-content .input-list .button-option{
 		position: absolute;
 		top: 22px;
@@ -417,7 +426,9 @@
 		line-height: 30px;
 		padding: 0;
 	}
-	.edit-content .input-list .button-option li a{
+	.edit-content .produceDate-fix{
+		position: relative;
+		top: 4px;
 	}
 	.edit-content div.margin10{
 		padding-top: 24px;
@@ -1712,7 +1723,7 @@
 						</td>
 					</tr>
 					<!--展开内容-->
-					<tr ng-if="material.addGoodsOper  || (material.exPandOper && material.goodsArr.length > 0)">
+					<tr ng-show="material.addGoodsOper  || (material.exPandOper && material.goodsArr.length > 0)">
 						<td colspan="7" style="padding: 0;">
 							<div class="show-content">
 								<div class="content-body">
@@ -1741,15 +1752,24 @@
                                                     <div class="content margin10">
                                                         <!--<p class="title">包装/生产日期</p>-->
                                                         <div class="input-list">
-                                                            <span class="tit">包装:</span><input type="text" class="form-control" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 96px;" ng-model="goods.editPackaging"
-                                                                                               ng-class="{'error' : goods.editPackagingInvalid}" ng-blur="editPackaging(goods, true)" ng-change="changePackaging(goods)"/>
+                                                            <span class="tit">包装:</span><!--<input type="text" class="form-control" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 96px;" ng-model="goods.editPackaging"
+                                                                                               ng-class="{'error' : goods.editPackagingInvalid}" ng-blur="editPackaging(goods, true)" ng-change="changePackaging(goods)"/>-->
+															<select ng-model="goods.editPackaging" ng-init="goods.editPackaging='请选择'"  class="select-adder select-package" title="包装">
+																<option ng-repeat="item in packageArray" ng-click="showText(item)">{{item}}</option>
+															</select>
+															<!--<div class="dropdown">
+																<input class="btn btn-default dropdown-toggle button-select select-adder" id="dropdownMenu2" type="text" ng-model="goods.editPackaging" placeholder="包装方式" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" readonly="readonly">
+																<ul class="dropdown-menu .dropdown-menu-left button-option" aria-labelledby="dropdownMenu2">
+																	<li ng-repeat="item in packageArray" ng-click="showText(item)">{{item}}</li>
+																</ul>
+															</div>-->
                                                         </div>
-                                                        <div class="input-list">
+                                                        <div class="input-list produceDate-fix">
                                                             <span class="tit">生产日期:</span><input type="text" class="form-control" name="produceDate" ng-maxlength="11" title="生产日期" maxlength="11" placeholder="生产日期" style="width: 96px;" ng-model="goods.editProduceDate"
                                                                                                  ng-class="{'error' : goods.editProduceDateInvalid}"
                                                                                                  ng-change="editProduceDateFa(goods, false)"/>
                                                         </div>
-                                                        <div class="clearfix">
+                                                        <div class="clearfix produceDate-fix">
                                                             <span>可拆卖:</span>
                                                             <span class="switch"><button ng-class="{'active' : goods.editBreakUp}"
                                                                                            ng-click="toggleIsBreadUp(goods, false)"></button></span>
@@ -1808,12 +1828,12 @@
                                                         <p class="title height29">交期(天):</p>
                                                         <div class="input-list">
                                                             <p>
-											<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)"
+											<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" oninput="if(value.length>3)value=value.slice(0,3)"
                                                          ng-model="goods.editMinDelivery"
                                                          ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, true, goods)"
                                                          ng-class="{'error' : goods.editMinDeliveryinValid}"/></span>
                                                                 <span style="margin-left: 4px;">–</span>
-                                                                <span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)" ng-model="goods.editMaxDelivery" ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, false, goods)"
+                                                                <span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" oninput="if(value.length>3)value=value.slice(0,3)" ng-model="goods.editMaxDelivery" ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, false, goods)"
                                                                              ng-class="{'error' : goods.editMaxDeliveryinValid}"/></span>
                                                             </p>
                                                         </div>
@@ -1909,7 +1929,7 @@
 													自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
 											</td>
 										</tr>
-										<tr class="edit-content edits" ng-if="goods.edit">
+										<tr class="edit-content edits" ng-show="goods.edit">
 											<td colspan="10" style="background:#f0f7fd;">
                                                 <div class="blue-bg">
 													<div></div>
@@ -1923,25 +1943,20 @@
 													<div class="content margin10">
 														<!--<p class="title">包装/生产日期</p>-->
 														<div class="input-list">
-															<span class="tit">包装</span><!--<input type="text" class="select" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 96px;" ng-model="goods.editPackaging"
+															<span class="tit">包装:</span><!--<input type="text" class="select" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 96px;" ng-model="goods.editPackaging"
 																							   ng-class="{'error' : goods.editPackagingInvalid}"
 																							   ng-blur="editPackaging(goods, true)" ng-change="changePackaging(goods)"/>-->
-															<div class="dropdown">
-																<button class="btn btn-default dropdown-toggle button-select" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-																	{{goods.editPackaging}}
-																	<span class="caret"></span>
-																</button>
+															<select ng-model="goods.editPackaging" ng-init="goods.editPackaging='请选择'" class="select-adder select-package" title="包装">
+																<option ng-repeat="item in packageArray" ng-click="showClickText(goods, item)">{{item}}</option>
+															</select>
+															<!--<div class="dropdown">
+																<input class="btn btn-default dropdown-toggle button-select select-adder" type="text" id="dropdownMenu1" ng-model="goods.editPackaging" placeholder="包装方式" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" readonly="readonly">
 																<ul class="dropdown-menu .dropdown-menu-left button-option" aria-labelledby="dropdownMenu1">
-																	<li><a href="#">Separated link</a></li>
-																	<li><a href="#">Separated link</a></li>
-																	<li><a href="#">Separated link</a></li>
-																	<li><a href="#">Separated link</a></li>
-																	<li><a href="#">Separated link</a></li>
+																	<li ng-repeat="item in packageArray" ng-click="showClickText(goods, item)">{{item}}</li>
 																</ul>
-															</div>
-
+															</div>-->
 														</div>
-														<div class="input-list">
+														<div class="input-list produceDate-fix">
 															<span class="tit">生产日期:</span><input type="text" class="form-control" name="produceDate" ng-maxlength="11" title="生产日期" maxlength="11" placeholder="生产日期" style="width: 96px;" ng-model="goods.editProduceDate"
 																								 ng-class="{'error' : goods.editProduceDateInvalid}"
 																								 ng-change="editProduceDateFa(goods, true)"/>
@@ -1950,7 +1965,7 @@
 															<!--<option value="0">不可拆卖</option>-->
 															<!--</select>-->
 														</div>
-														<div class="clearfix">
+														<div class="clearfix produceDate-fix ">
 															<span>可拆卖:</span>
 															<span class="switch"><button ng-class="{'active' : goods.editBreakUp}"
 																						 ng-click="toggleIsBreadUp(goods, true)"></button></span>
@@ -2014,10 +2029,10 @@
 														<p class="title height29">交期(天):</p>
 														<div class="input-list">
 															<p>
-																<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)" ng-model="goods.editMinDelivery"
+																<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" oninput="if(value.length>3)value=value.slice(0,3)" ng-model="goods.editMinDelivery"
 																			 ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, true, goods)" ng-class="{'error' : goods.editMinDeliveryinValid}"/></span>
 																<span style="margin-left: 4px;">–</span>
-																<span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)" ng-model="goods.editMaxDelivery"
+																<span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" oninput="if(value.length>3)value=value.slice(0,3)" ng-model="goods.editMaxDelivery"
 																			 ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, false, goods)" ng-class="{'error' : goods.editMaxDeliveryinValid}"/></span>
 															</p>
 														</div>

+ 16 - 5
src/main/webapp/resources/view/vendor/forstore/vendor_onSale.html

@@ -643,6 +643,15 @@
         margin-top: 4px;
         float: left;
     }
+    .content-show .select-item{
+        width: 88px;
+        height: 24px;
+        border: 1px solid #a9a9a9;
+        font-size: 12px;
+        text-align: center;
+        border-radius: 3px;
+        padding-left: 6px;
+    }
     .wanted_list01 .tab table tr.edit-forms td .bg-show .width20{
         width: 20px;
     }
@@ -957,7 +966,11 @@
                                 </div>
                                 <div class="content-show width120">
                                     <div>
-                                        <span><input type="text" ng-blur="editPackaging(commodity, true)" ng-change="changePackaging(commodity)" placeholder="包装方式" maxlength="10" ng-model="commodity.editPackaging" ng-class="{'error' : commodity.editPackagingInvalid}" class="wid88 form-control"/></span>
+                                        <span><!--<input type="text" ng-blur="editPackaging(commodity, true)" ng-change="changePackaging(commodity)" placeholder="包装方式" maxlength="10" ng-model="commodity.editPackaging" ng-class="{'error' : commodity.editPackagingInvalid}" class="wid88 form-control"/>-->
+                                            <select ng-model="commodity.editPackaging" class="select-adder select-item" title="包装">
+                                                <option ng-repeat="item in packageArray" ng-click="showText(goods, item)">{{item}}</option>
+                                            </select>
+                                        </span>
                                     </div>
                                     <div>
                                         <span><input type="text" ng-change="editProduceDateFa(commodity)" placeholder="生产日期" maxlength="11" ng-model="commodity.editProduceDate" ng-class="{'error' : commodity.editProduceDateInvalid}" class="wid88 form-control"/></span>
@@ -1038,12 +1051,10 @@
                                 </div>
                                 <div class="content-show width60">
                                     <div>
-                                    <span
-                                            name="save-a"><button class="ok" ng-mouseleave="recoveryBlur()" ng-mouseenter="impedeBlur()" ng-click="updateGoods(commodity, $index)">保存</button></span>
+                                    <span name="save-a"><button class="ok" ng-mouseleave="recoveryBlur()" ng-mouseenter="impedeBlur()" ng-click="updateGoods(commodity, $index)">保存</button></span>
                                     </div>
                                     <div>
-                                    <span
-                                            name="cancle-a"><button class="off" ng-click="cancleEdit(commodity)">取消</button></span>
+                                    <span name="cancle-a"><button class="off" ng-click="cancleEdit(commodity)">取消</button></span>
                                     </div>
                                 </div>
                             </div>