shenjj 7 years ago
parent
commit
8ac46a9e2b

+ 130 - 34
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -3361,45 +3361,71 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     }
 
     $scope.onCodeChange = function(code, index) {
-      if ((/[^\x00-\xff]/g).test(code)) {
-        var chineseIndex = -1;
-        for (var i = 0; i < code.length; i++) {
-          if ((/[^\x00-\xff]/g).test(code.charAt(i))) {
-            chineseIndex = i;
-            break;
-          }
+      if (!index) {
+        if (code === '') {
+          $scope.Regul.CodeList = []
+          return false
         }
-        $scope.replaceMaterialList[index].ptrCmpcode = cutOutString(code, chineseIndex);
-      } else if (code && getRealLen(code) > 100) {
-        $scope.replaceMaterialList[index].ptrCmpcode = cutOutString(code, 100);
+        if ((/[^\x00-\xff]/g).test(code)) {
+          $scope.Regul.cmpcode = ''
+          $scope.Regul.CodeList = []
+          return false
+        }
+        $scope.Regul.CodeList = getSimilarCode(code).$$state
       } else {
-        if (!code) {
-          $scope.setShowSimilarCodeList(false, index);
+        if ((/[^\x00-\xff]/g).test(code)) {
+          var chineseIndex = -1;
+          for (var i = 0; i < code.length; i++) {
+            if ((/[^\x00-\xff]/g).test(code.charAt(i))) {
+              chineseIndex = i;
+              break;
+            }
+          }
+          $scope.replaceMaterialList[index].ptrCmpcode = cutOutString(code,
+              chineseIndex);
+        } else if (code && getRealLen(code) > 100) {
+          $scope.replaceMaterialList[index].ptrCmpcode = cutOutString(code,
+              100);
         } else {
-          $scope.getSimilarCode(code, index);
+          if (!code) {
+            $scope.setShowSimilarCodeList(false, index);
+          } else {
+            $scope.getSimilarCode(code, index);
+          }
         }
       }
     }
     // 品牌change事件
     $scope.onBrandChange = function(brand, index) {
-      if (brand && getRealLen(brand) > 50) {
-        $scope.replaceMaterialList[index].ptrBranden = cutOutString(brand, 50);
-      } else if ((/[^\x00-\xff]/g).test(brand)) {
-        var chineseIndex = -1;
-        for (var i = 0; i < brand.length; i++) {
-          if ((/[^\x00-\xff]/g).test(brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(brand.charAt(i))) {
-            chineseIndex = i;
-            break;
-          }
-        }
-        if (chineseIndex > -1) {
-          $scope.replaceMaterialList[index].ptrBranden = brand.substring(0, chineseIndex);
+      if (!index) {
+        if (brand === '') {
+          $scope.Regul.BrandList = []
+          return false
         }
+        $scope.Regul.BrandList = $scope.getSimilarBrands(brand).$$state
       } else {
-        if (!brand) {
-          $scope.setShowSimilarBrandList(false, index);
+        if (brand && getRealLen(brand) > 50) {
+          $scope.replaceMaterialList[index].ptrBranden = cutOutString(brand,
+              50);
+        } else if ((/[^\x00-\xff]/g).test(brand)) {
+          var chineseIndex = -1;
+          for (var i = 0; i < brand.length; i++) {
+            if ((/[^\x00-\xff]/g).test(brand.charAt(i))
+                && !(/[\u4e00-\u9fa5]/).test(brand.charAt(i))) {
+              chineseIndex = i;
+              break;
+            }
+          }
+          if (chineseIndex > -1) {
+            $scope.replaceMaterialList[index].ptrBranden = brand.substring(0,
+                chineseIndex);
+          }
         } else {
-          $scope.getSimilarBrand(brand, index);
+          if (!brand) {
+            $scope.setShowSimilarBrandList(false, index);
+          } else {
+            $scope.getSimilarBrand(brand, index);
+          }
         }
       }
     }
@@ -3413,18 +3439,65 @@ define(['app/app', 'jquery-uploadify'], function(app) {
         }, function(error) {})
       }
     }
+    /**
+     * 获取型号联想词
+     *
+     * @param name    品牌名称
+     */
+    function getSimilarCode(name) {
+      if (name) {
+        return Search.getSimilarComponents({keyword: name}).$promise.then(
+            function (data) {
+              return data.map(function (item) {
+                return item;
+              });
+            });
+      }
+    }
+    /**
+     * 替换物料型号输入框失去焦点
+     */
     $scope.onCodeBlur = function(index) {
       if ($scope.replaceMaterialList[index].ptrCmpcode) {
         $scope.errorObj[index].code = 0;
       }
       $scope.setShowSimilarCodeList($scope.isInCodeList[index], index);
     }
+    /**
+     * 编辑物料型号输入框失去焦点
+     *
+     * @param name    型号名称
+     */
+    $scope.RegulonCodeBlur = function(name) {
+      if (name === '') {
+        $scope.Regul.CodeList = []
+      } else {
+        $scope.Regul.cmpcode = $scope.Regul.CodeList.value[0].code
+        $scope.Regul.CodeList = []
+      }
+    }
+    /**
+     * 替换物料品牌输入框失去焦点
+     */
     $scope.onBrandBlur = function(index) {
       if ($scope.replaceMaterialList[index].ptrBranden) {
         $scope.errorObj[index].brand = 0;
       }
       $scope.setShowSimilarBrandList($scope.isInBrandList[index], index);
     }
+    /**
+     * 物料编辑品牌输入框失去焦点
+     *
+     * @param name    品牌名称
+     */
+    $scope.RegulonBrandBlur = function(name) {
+      if (name === '') {
+        $scope.Regul.BrandList = []
+      } else {
+        $scope.Regul.brandcode = $scope.Regul.BrandList.value[0].nameEn
+        $scope.Regul.BrandList = []
+      }
+    }
     $scope.setShowSimilarBrandList = function(flag, index) {
       if (!$scope.replaceMaterialList[index].ptrBranden || !$scope.similarBrand || !$scope.similarBrand.length) {
         $scope.replaceMaterialList[index].showSimilarBrandList = false;
@@ -3432,9 +3505,17 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       }
       $scope.replaceMaterialList[index].showSimilarBrandList = flag;
     }
-    $scope.setCode = function(index, code) {
-      $scope.replaceMaterialList[index].ptrCmpcode = code;
-      $scope.setShowSimilarCodeList(false, index);
+    $scope.setCode = function(code, index) {
+      if (!index) {
+        $scope.Regul.cmpcode = code
+        $scope.Regul.CodeList = []
+      } else {
+        $scope.replaceMaterialList[index].ptrCmpcode = code;
+        $scope.setShowSimilarCodeList(false, index);
+      }
+    }
+    $scope.RegulsetBrand = function(index, code) {
+
     }
     $scope.setBrand = function(index, brand) {
       $scope.replaceMaterialList[index].ptrBranden = brand;
@@ -3575,15 +3656,20 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     /**
      * 编辑物料
      */
-    $scope.Regul = {}
+    $scope.Regul = {
+      IsLookOrUpdate: 'update'
+    }
     $scope.editRegulPicture = function(Regulpic, commodity) {
+      for (var i = 0; i < $scope.currenctMaterial.length; i++) {
+        $scope.currenctMaterial[i].editRegulShow = false
+      }
       commodity.editRegulShow = true
 	    var ChooseItem = commodity
       $scope.Regul.iniUrlImg = 'static/img/vendor/images/upload_file_icon.png'
       $scope.Regul.Regulpic =  (ChooseItem.productAttachSubmit && ChooseItem.productAttachSubmit.uploadAttach) || ChooseItem.attach || 'static/img/vendor/images/upload_file_icon.png'; // 图片
-      $scope.Regul.Ischange = (ChooseItem.productAttachSubmit && ChooseItem.productAttachSubmit.uploadAttach || ChooseItem.attach) ? true : false
+      $scope.Regul.Ischange = (ChooseItem.productAttachSubmit && ChooseItem.productAttachSubmit.uploadAttach || ChooseItem.attach) ? true : false // 是否存在规格书
       $scope.Regul.showAction = true  // 个人产品库和企业产品 还是在售产品
-      $scope.Regul.sLookOrUpdate = ChooseItem.standard === 1 ? 'look' : 'update' // 编辑还是查看
+      $scope.Regul.IsLookOrUpdate = ChooseItem.standard === 1 ? 'look' : 'update' // 编辑还是查看
       $scope.Regul.brandcode = ChooseItem.pbranden || ChooseItem.pbrand || ($scope.Regul.IsLookOrUpdate === 'update' ? '' : '-') // 品牌
       $scope.Regul.BrandList = [] // 品牌数组
       $scope.Regul.kind = ChooseItem.kind || ChooseItem.kinden || '-' // 类目
@@ -3592,6 +3678,16 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       $scope.Regul.CodeList = [] // 型号数组
       $scope.Regul.RegulChange = (ChooseItem.standard === 1 && $scope.Regul.Ischange) ? false : true // 规格书是否可以编辑
       $scope.Regul.ChooseItem = ChooseItem
+      $scope.Regul.Productpic = 'static/img/vendor/images/upload_file_icon.png' // 物料图片
+    }
+
+    // 修改规格书
+    $scope.onUploadSuccess = function(data){
+      $scope.Regul.Regulpic = data.path;
+    };
+    // 修改物料图片
+    $scope.onUploadSuccessProduct = function(data) {
+      $scope.Regul.Productpic = data.path;
     }
   }
   ]);

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

@@ -610,7 +610,7 @@
 	.wanted_list01 .tab table tr.active td{
 		background: #c2dff7;
 	}
-	.wanted_list01 .tab table tbody tr:hover{
+	.wanted_list01 .tab table tbody tr.allLine:hover{
 		background: #c7ebfd;
 	}
     .user_content .user_right {
@@ -2119,7 +2119,7 @@
 						</tbody>
 						<tbody ng-repeat="material in currenctMaterial | orderBy:'-id'">
 						<!--<tr ng-class="{ 'active': material.selected }" class="gre-bg">-->
-							<tr ng-class="{ 'active': material.selected, 'gre-bg' : material.exPandOper}">
+							<tr class="allLine" ng-class="{ 'active': material.selected, 'gre-bg' : material.exPandOper}">
 								<td class="check-input">
 									<img src="static/img/vendor/images/person-material-pc.png" ng-if="material.addProductPerson" alt="">
 									<span style="float:left;margin-top:40px;margin-left:10px"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
@@ -2268,51 +2268,168 @@
 							<!--编辑物料 ng-show="material.editRegulShow"-->
 							<tr style="height: auto">
 								<td colspan="7">
-									<div style="background: #b1b3b6;height: 39px;line-height: 39px;">编辑物料</div>
-									<div>
-										<ul>
-											<li class="wuliao_list clearboth">
-												<div class="pull-left clearboth">
-													<div class="name pull-left" style="width: 60px"><em style="color: #f01414">*</em>品牌:</div>
-													<div class="pull-left" style="position: relative;">
-														<div ng-show="Regul.IsLookOrUpdate === 'update'">
+									<div style="border: 1px solid #5078cb;margin: 0 10px;">
+										<div style="background: #f8f8f8;height: 39px;line-height: 39px;">编辑物料</div>
+										<div style="padding: 20px 0px;">
+											<ul style="padding-bottom: 10px;border-bottom: 1px solid #dcdcdc">
+												<li class="wuliao_list clearboth">
+													<div class="pull-left clearboth">
+														<div class="name pull-left"><em style="color: #f01414">*</em>品牌:</div>
+														<div class="pull-left" style="position: relative;">
+															<div ng-show="Regul.IsLookOrUpdate === 'update'">
+																<!-- 可编辑状态 -->
+																<input type="text"
+																			 ng-change="onBrandChange(Regul.brandcode)"
+																			 placeholder="请输入品牌名称"
+																			 ng-blur="RegulonBrandBlur(Regul.brandcode)"
+																			 ng-model="Regul.brandcode"
+																			 class="form-control inputText" maxlength="25"/>
+																<ul class="listUl" ng-show="Regul.BrandList.value.length > 0">
+																	<li ng-repeat="item in Regul.BrandList.value" ng-click="setCode(item.nameEn)">
+																		{{item.nameEn}}
+																	</li>
+																</ul>
+															</div>
+															<div ng-show="Regul.IsLookOrUpdate === 'look'" style="width: 165px;height: 28px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
+																{{brandcode}}
+															</div>
+														</div>
+													</div>
+													<div class="pull-left clearboth">
+														<div class="name pull-left"><em style="color: #f01414">*</em>物料名称:</div>
+														<div class="pull-left" style="position: relative;">
+															<div ng-show="Regul.IsLookOrUpdate === 'update'">
+																<!-- 可编辑状态 -->
+																<input type="text"
+																			 placeholder="请输入物料名称"
+																			 ng-model="Regul.kind"
+																			 class="form-control inputText" maxlength="20"/>
+															</div>
+															<div ng-show="Regul.IsLookOrUpdate === 'look'" style="width: 165px;height: 28px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
+																{{Regul.kind}}
+															</div>
+														</div>
+													</div>
+													<div class="pull-left clearboth">
+														<div class="name pull-left"><em style="color: #f01414">*</em>型号:</div>
+														<div class="pull-left" style="position: relative;">
+															<div ng-show="Regul.IsLookOrUpdate === 'update'">
+																<!-- 可编辑状态 -->
+																<input type="text"
+																			 ng-change="onCodeChange(Regul.cmpcode)"
+																			 placeholder="请输入型号"
+																			 ng-blur="RegulonCodeBlur(Regul.cmpcode)"
+																			 ng-model="Regul.cmpcode"
+																			 class="form-control inputText" maxlength="100"/>
+																<ul class="listUl" ng-show="Regul.CodeList.value.length > 0">
+																	<li ng-repeat="item in Regul.CodeList.value" ng-click="setCode(item.nameEn)">
+																		{{item.code}}
+																	</li>
+																</ul>
+															</div>
+															<div ng-show="Regul.IsLookOrUpdate === 'look'" style="width: 165px;height: 28px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
+																{{Regul.cmpcode}}
+															</div>
+														</div>
+													</div>
+													<div class="pull-left clearboth">
+														<div class="name pull-left">规格:</div>
+														<div class="pull-left">
 															<!-- 可编辑状态 -->
 															<input type="text"
-																		 ng-change="onBrandChange(Regul.brandcode)"
-																		 placeholder="请输入品牌名称"
-																		 style="width: 165px;height: 28px;border-radius: 2px;color: #333"
-																		 ng-blur="onBrandBlur(Regul.brandcode)"
-																		 ng-model="Regul.brandcode"
-																		 class="form-control" maxlength="25"/>
-															<ul class="listUl" ng-show="Regul.BrandList.value.length > 0">
-																<li ng-repeat="item in Regul.BrandList.value" ng-click="setBrand(item.nameEn)">
-																	{{item.nameEn}}
-																</li>
-															</ul>
+																		 placeholder="请输入规格参数"
+																		 ng-model="Regul.spec"
+																		 class="form-control inputText" maxlength="50"/>
 														</div>
-														<div ng-show="Regul.IsLookOrUpdate === 'look'" style="width: 165px;height: 28px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
-															{{brandcode}}
+													</div>
+												</li>
+												<li class="wuliao_list clearboth">
+													<div class="pull-left clearboth">
+														<div class="name pull-left">最小包装数:</div>
+														<div class="pull-left">
+															<!-- 可编辑状态 -->
+															<input type="text"
+																		 oninput="if(value.length>6)value=value.slice(0,6)"
+																		 placeholder="请输入最小包装数"
+																		 ng-blur="setPriceMinPackAmount(Regul.spec)"
+																		 class="form-control inputText" maxlength="50"/>
 														</div>
 													</div>
-												</div>
-												<div class="pull-left clearboth">
-													<div class="name pull-left"><em style="color: #f01414">*</em>物料名称:</div>
-													<div class="pull-left" style="position: relative;">
-														<div ng-show="Regul.IsLookOrUpdate === 'update'">
+													<div class="pull-left clearboth">
+														<div class="name pull-left">生产日期:</div>
+														<div class="pull-left">
 															<!-- 可编辑状态 -->
 															<input type="text"
-																		 placeholder="请输入物料名称"
-																		 style="width: 165px;height: 28px;border-radius: 2px;color: #333"
-																		 ng-model="Regul.kind"
-																		 class="form-control" maxlength="20"/>
+																		 placeholder="请输入生产日期"
+																		 class="form-control inputText" maxlength="12"/>
+														</div>
+													</div>
+													<div class="pull-left clearboth">
+														<div class="name pull-left">包装方式:</div>
+														<div class="pull-left">
+															<!-- 可编辑状态 -->
+															<select style="text-indent: 12px" ng-model="goods.editPackaging" ng-init="goods.editPackaging='请选择'" class="select-adder select-package inputText" title="包装">
+																<option style="text-indent: 12px" ng-repeat="item in packageArray" ng-click="showClickText(goods, item)">{{item}}</option>
+															</select>
+														</div>
+													</div>
+												</li>
+												<li class="wuliao_list clearboth">
+													<div class="pull-left clearboth">
+														<div class="name pull-left">规格书:</div>
+														<div class="pull-left">
+															<div class="update-big-img clearboth">
+																<div class="previewImage">
+																	<input ng-show="!Regul.Ischange" type="file" image-upload class="uploadImage" accept=".pdf"  on-success="onUploadSuccess($data, $file)" max-size="20971520" errorSizeMsg="'文件大小不能超过20M'">
+																	<img ng-src="{{Regul.Ischange ? 'static/img/vendor/images/pdf.png' : Regul.Regulpic}}" alt="商品图片" style="height: 78px;width: 78px;">
+																	<div class="cover" style="background: rgba(0,0,0,0)">
+																		<i class="fa fa-trash" style="z-index: 98" ng-click="deleteImg()"></i>
+																	</div>
+																	<a href="{{Regul.Regulpic}}" target="_blank" ng-if="Regul.Regulpic != Regul.iniUrlImg">
+																		<div class="cover">
+																			<div class="look"><i class="fa fa-search"></i>查看</div>
+																		</div>
+																	</a>
+																</div>
+																<div class="prompt">
+																	<div><em style="color: #f00;">*</em>仅允许上传PDF格式文件,大小不超过20M</div>
+																	<div><em style="color: #f00;">*</em>规格书上传后,将在两个工作日完成审核</div>
+																	<div><em style="color: #f00;">*</em>如审核不通过,将会以消息的形式通知您</div>
+																	<div><em style="color: #f00;">*</em>已有原厂规格书的器件暂不开放上传</div>
+																	<div><em style="color: #f00;">*</em>更新规格书需重新审核</div>
+																</div>
+															</div>
 														</div>
-														<div ng-show="Regul.IsLookOrUpdate === 'look'" style="width: 165px;height: 28px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
-															{{Regul.kind}}
+													</div>
+													<div class="pull-left clearboth">
+														<div class="name pull-left">物料图片:</div>
+														<div class="pull-left">
+															<div class="update-big-img clearboth">
+																<div class="previewImage">
+																	<input type="file" image-upload class="uploadImage" on-success="onUploadSuccessProduct($data, $file)" max-size="1024" errorSizeMsg="'文件大小不能超过20M'">
+																	<img ng-src="{{Regul.Productpic}}" alt="商品图片" style="height: 78px;width: 78px;">
+																	<div class="cover" style="background: rgba(0,0,0,0)">
+																		<i class="fa fa-trash" style="z-index: 98" ng-click="deleteImg()"></i>
+																	</div>
+																	<a ng-if="Regul.Regulpic != Regul.iniUrlImg">
+																		<div class="cover">
+																			<div class="look"><i class="fa fa-search"></i>查看</div>
+																		</div>
+																	</a>
+																</div>
+																<div class="prompt">
+																	<div><em style="color: #f00;">*</em>支持JPG、PNG格式文件,大小不超过1M</div>
+																</div>
+															</div>
 														</div>
 													</div>
-												</div>
-											</li>
-										</ul>
+												</li>
+											</ul>
+											<div class="editRegulControll">
+												<div>确定</div>
+												<div>取消</div>
+											</div>
+										</div>
 									</div>
 								</td>
 							</tr>
@@ -2920,7 +3037,7 @@
 					<span><em>*</em>型号:</span>
 					<input type="text" class="form-control" ng-readonly="mate.editable == false" ng-model="mate.ptrCmpcode" ng-focus="onFocus($event, 'similar-list2_'+ key, 'code', key)" ng-change="onCodeChange(mate.ptrCmpcode, key, $event)" ng-blur="onCodeBlur(key)" ng-class="{'error': errorObj[key].code == 1}" placeholder="请输入型号名称">
 					<ul class="similar-list" ng-class="'similar-list2_'+ key" ng-show="mate.showSimilarCodeList && similarCode.length > 0 && mate.ptrCmpcode" ng-mouseenter="setIsInCodeList(true, key)" ng-mouseleave="setIsInCodeList(false, key)">
-						<li ng-repeat="sCode in similarCode" ng-bind="sCode.code" title="{{sCode.code}}" ng-click="setCode(key, sCode.code)"></li>
+						<li ng-repeat="sCode in similarCode" ng-bind="sCode.code" title="{{sCode.code}}" ng-click="setCode(sCode.code, key)"></li>
 					</ul>
 					<i class="fa fa-minus-circle" ng-if="replaceMaterialList.length >= 1 && mate.editable != false" ng-click="setReplies('sub', key)"></i>
 					<i class="fa fa-plus-circle" ng-if="key == linearLength - 1 && mate.editable != false" ng-click="setReplies('add', key)"></i>
@@ -3015,8 +3132,6 @@
 		</div>
 	</div>
 </div>
-
-
 <div class="com-modal-wrap" ng-show="modifyResult">
 	<div class="com-mall-del-box import-result">
 		<div class="title" ng-click="modifyResult=false">
@@ -3044,7 +3159,7 @@
 		}
 		.wuliao_list .name {
 			margin-right: 5px;
-			width: 115px;
+			width: 100px;
 			text-align: right;
 			color: #666;
 		}
@@ -3059,6 +3174,112 @@
 		.pull-left {
 			float: left
 		}
+		.listUl {
+			position: absolute;
+			top: 28px;
+			left: 0px;
+			width: 140px;
+			max-height: 180px;
+			overflow-y: auto;
+			background: #fff;
+			border: 1px solid #dcdcdc;
+			z-index: 100;
+		}
+		.listUl li {
+			font-size: 14px;
+			color: #666;
+			line-height: 24px;
+			text-indent: 12px;
+		}
+		.listUl li:hover {
+			background: #dcdcdc;
+			cursor: pointer;
+		}
+		.editRegulControll div {
+			width: 120px;
+			height: 36px;
+			line-height: 36px;
+			font-size: 16px;
+			color: #fff;
+			border-radius: 3px;
+			text-align: center;
+			background: #5078cb;
+			margin-right: 20px;
+			display: inline-block;
+			margin-top: 20px;
+			cursor: pointer;
+		}
+		.editRegulControll div:hover {
+			background: #4290f7
+		}
+		.editRegulControll div:last-child:hover {
+			background: #6b6b6b
+		}
+		.editRegulControll div:last-child {
+			background: #aaaaaa;
+		}
+		.wuliao_list .inputText {
+			width: 140px;
+			height: 28px;
+			border-radius: 2px;
+			color: #333;
+		}
+		.wanted_list01 .tab table td {
+			overflow: inherit;
+		}
+		.uploadImage {
+			width: 100%;
+			height: 100%;
+			z-index: 10;
+			position: absolute;
+			left: 0;
+			top: 0;
+			opacity: 0;
+		}
+		.update-big-img .previewImage {
+			height: 78px;
+			width: 78px;
+			line-height: 78px;
+			text-align: center;
+			position: relative;
+			border: 1px solid #dcdcdc;
+			float: left
+		}
+		.update-big-img .prompt {
+			float: left;
+			font-size: 12px;
+			color: #999;
+			margin-left: 12px;
+			text-align: left
+		}
+		.update-big-img .prompt div {
+			line-height: 16px;
+		}
+
+		.update-big-img .previewImage img {
+			overflow: hidden;
+			line-height: 78px;
+			margin-bottom: 5px;
+			position: relative;
+			width: 100%;
+			height: 100%;
+		}
+		.cover {
+			position: absolute;
+			width: 100%;
+			height: 100%;
+			left: 0px;
+			top: 0px;
+			background: rgba(0,0,0,0.5);
+		}
+		.cover .fa-trash {
+			color: #fff;
+			font-size: 18px;
+			position: absolute;
+			right: 5px;
+			top: 5px;
+			cursor: pointer;
+		}
     /**/
     .wanted_list01 .empty{
         overflow: hidden;

+ 0 - 2
src/main/webapp/resources/view/vendor/modal/edit_regul_modal.html

@@ -379,10 +379,8 @@
       <div ng-if="showAction && RegulChange" class="clearboth">
         <div class="update-big-img" style="margin-top: 0px;width: 197px;">
           <div class="previewImage" style="height: 197px;width: 197px;line-height: 197px;text-align: center">
-            <!--<img ng-if="Regulpic" ng-src="static/img/vendor/images/pdf.png" alt="商品图片"  style="height: 197px;line-height: 197px;width: 197px;">-->
             <input ng-show="!Ischange" type="file" image-upload class="uploadImage" accept=".pdf"   on-success="onUploadSuccess($data, $file)" max-size="20971520" errorSizeMsg="'文件大小不能超过20M'">
             <img ng-src="{{Ischange ? 'static/img/vendor/images/pdf.png' : Regulpic}}" alt="商品图片" style="height: 159px;width: 130px;">
-            <!--<img ng-src="{{Regulpic}}" alt="商品图片" ng-if="!Ischange" style="height: 197px;line-height: 197px;width: 197px;">-->
             <div class="cover" style="background: rgba(0,0,0,0)">
               <i class="fa fa-trash" style="z-index: 98" ng-click="deleteImg()"></i>
             </div>