Explorar el Código

修改品牌不能输入中文的问题

shenjj hace 7 años
padre
commit
85db0032dd

+ 4 - 0
src/main/webapp/resources/js/admin/controllers/AuditRegulpicListCtrl.js

@@ -199,6 +199,8 @@ define([ 'app/app' ], function(app) {
     $scope.item = item;
     $scope.keyword = item.brand ? item.brand.nameEn : '';
     $scope.kindId = item.kind ? item.kind.nameCn : '';
+    $scope.Showbrand = item.brand ? true : false;
+    $scope.ShowKind = item.kind ? true : false;
     $scope.FisrtkindInfo = []
     /**
      * 品牌联想词
@@ -265,6 +267,8 @@ define([ 'app/app' ], function(app) {
         if (data.success) {
           $modalInstance.close(data);
         } else {
+          $scope.item.kindId = ''
+          $scope.item.brandId = ''
           toaster.pop('error', data.message);
         }
       })

+ 1 - 1
src/main/webapp/resources/view/admin/RegulpicList.html

@@ -241,7 +241,7 @@
     </div>
     <div class="col-sm-3">
       <div class="sreach-input">
-        <input type="search" class="form-control" placeholder="请输入公司名" ng-model="keyword" ng-search="refreshTableData()"/>
+        <input type="search" class="form-control" placeholder="请输入公司名字/提交人" ng-model="keyword" ng-search="refreshTableData()"/>
         <button ng-click="refreshTableData()">搜索</button>
       </div>
     </div>

+ 5 - 5
src/main/webapp/resources/view/admin/modal/auditRegulpicpass_modal.html

@@ -86,21 +86,21 @@
     </div>
     <div class="form-group">
       <div class="col-sm-3 name" style="color: #333"><em style="color: #ea0e0e">*</em>品牌:</div>
-      <div class="col-sm-9" style="position: relative;" ng-show="!item.brandId">
-        <input id="brannameid" type="text" ng-blur="onBrandBlur(keyword)"  ng-change="onBrandChange(keyword)" placeholder="请输入品牌名字" ng-model="keyword" class="form-control" style="width: 240px;height: 28px" />
+      <div class="col-sm-9" style="position: relative;" ng-show="!Showbrand">
+        <input id="brannameid" type="text" ng-blur="onBrandBlur(keyword)"  ng-change="onBrandChange(keyword)" placeholder="请选择品牌名称" ng-model="keyword" class="form-control" style="width: 240px;height: 28px" />
         <ul class="listUl" ng-if="BrandList.value.length > 0">
           <li ng-repeat="item in BrandList.value" ng-click="setBrand(item.nameEn,item.id)">
             {{item.nameEn}}
           </li>
         </ul>
       </div>
-      <div class="col-sm-9" style="position: relative;" ng-if="item.brandId">
+      <div class="col-sm-9" style="position: relative;" ng-if="Showbrand">
         {{item.brand.nameEn}}
       </div>
     </div>
     <div class="form-group">
       <div class="col-sm-3 name" style="color: #333"><em style="color: #ea0e0e">*</em>商城类目:</div>
-      <div class="col-sm-9" ng-if="!item.kindId">
+      <div class="col-sm-9" ng-if="!ShowKind">
         <div class="col-sm-4" style="padding: 0px;">
           <select class="form-control"
                   ng-model="kindPojo.first"
@@ -125,7 +125,7 @@
           </select>
         </div>
       </div>
-      <div class="col-sm-9" ng-if="item.kindId">
+      <div class="col-sm-9" ng-if="ShowKind">
         {{item.kind.nameCn}}
       </div>
     </div>