Sfoglia il codice sorgente

修改规格书编辑

shenjj 7 anni fa
parent
commit
7e4896ddfd

+ 41 - 16
src/main/webapp/resources/js/admin/controllers/AuditRegulpicListCtrl.js

@@ -183,8 +183,8 @@ define([ 'app/app' ], function(app) {
   /**
    * 审核通过模态框控制器
    */
-  app.register.controller('auditRegulpicpassController', ['$scope', '$modalInstance', 'toaster', 'Commodity', 'Search','item', 'StoreAdminListInformation',
-    function ($scope, $modalInstance, toaster, Commodity, Search, item, StoreAdminListInformation) {
+  app.register.controller('auditRegulpicpassController', ['$scope', '$modalInstance', 'toaster', 'Commodity', 'Search','item', 'StoreAdminListInformation', 'Kind',
+    function ($scope, $modalInstance, toaster, Commodity, Search, item, StoreAdminListInformation, Kind) {
 
     $scope.kindPojo = {
       first: '请选择一级类目',
@@ -199,7 +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.FisrtkindInfo = []
+    /**
      * 品牌联想词
      */
     $scope.onBrandChange = function(name) {
@@ -217,11 +218,19 @@ define([ 'app/app' ], function(app) {
     /**
      * 品牌联想词失去焦点
      */
+    var _Ch = false
     $scope.onBrandBlur = function(name) {
-      if (name === '') {
-        $scope.BrandList = []
-        return false
-      }
+      setTimeout(function() {
+        if (name !== '') {
+          if (!_Ch) {
+            $scope.keyword = ''
+            angular.element('#brannameid').val('')
+            angular.element('.listUl').hide()
+            $scope.BrandList = []
+          }
+        }
+        _Ch = false
+      }, 250)
     }
     /**
      * 保存不通过原因
@@ -237,21 +246,19 @@ define([ 'app/app' ], function(app) {
           toaster.pop('error', '商城一级类目未选择');
           return;
         }
-        if ($scope.kindPojo.second === ''
-            && $scope.kindInfo[$scope.kindPojo.first].children) {
+        if ($scope.kindPojo.second === '请选择二级类目' && $scope.TwokindInfo.length > 0) {
           toaster.pop('error', '商城二级类目未选择');
           return;
         }
-        if ($scope.kindPojo.third === ''
-            && $scope.kindInfo[$scope.kindPojo.first].children[$scope.kindPojo.second].children) {
+        if ($scope.kindPojo.third === '请选择三级类目'  && $scope.ThreekindInfo.length > 0) {
           toaster.pop('error', '商城三级类目未选择');
           return;
         }
-        if ($scope.kindPojo.third !== '') {
+        if ($scope.kindPojo.third !== '请选择三级类目') {
           info = $scope.kindPojo.third
-        } else if ($scope.kindPojo.second !== '') {
+        } else if ($scope.kindPojo.second !== '请选择二级类目') {
           info = $scope.kindPojo.second
-        } else if ($scope.kindPojo.first !== '') {
+        } else if ($scope.kindPojo.first !== '请选择一级类目') {
           info = $scope.kindPojo.first
         }
         $scope.item.kindId = info.id
@@ -273,6 +280,7 @@ define([ 'app/app' ], function(app) {
     $scope.setBrand = function(item, id) {
       $scope.keyword = item
       $scope.brandId = id
+      _Ch = true
       $scope.BrandList = []
     }
 
@@ -284,12 +292,28 @@ define([ 'app/app' ], function(app) {
     }
 
     var initKindDataInfo = function () {
-      Commodity.getAllKindInfo({}, function (data) {
-        $scope.kindInfo = data[0].children;
+      Kind.Getparentid({parentid: 0}, function (data) {
+        $scope.FisrtkindInfo = data.data
       })
     };
     initKindDataInfo();
 
+    $scope.ChooseFirstItem = function() {
+      $scope.kindPojo.second = '请选择二级类目'
+      $scope.kindPojo.third = '请选择三级类目'
+      $scope.ThreekindInfo = []
+      Kind.Getparentid({parentid: $scope.kindPojo.first}, function (data) {
+        $scope.TwokindInfo = data.data
+      })
+    }
+
+    $scope.ChooseTwoItem = function() {
+      $scope.kindPojo.third = '请选择三级类目'
+      Kind.Getparentid({parentid: $scope.kindPojo.second}, function (data) {
+        $scope.ThreekindInfo = data.data
+      })
+    }
+
     /**
      * 获取品牌联想词
      *
@@ -340,5 +364,6 @@ define([ 'app/app' ], function(app) {
     function dismiss() {
       $modalInstance.dismiss();
     }
+
   }])
 });

+ 1 - 0
src/main/webapp/resources/js/common/query/commodity.js

@@ -46,6 +46,7 @@ define([ 'ngResource' ], function() {
 				method: 'GET',
 				isArray: true
 			}
+
 		});
 	}]);
 });

+ 8 - 1
src/main/webapp/resources/js/common/query/kind.js

@@ -56,7 +56,14 @@ define([ 'ngResource'], function() {
 			changeKindProperty: {
 				url: 'produce/kind/kindProperty/changeKindProperty',
 				method: 'PUT'
-			}
+			},
+      /**
+       * 返回所有类目信息(正式环境)
+       */
+      Getparentid: {
+        url : 'produce/kind/parentid',
+        method: 'GET'
+      }
 		});
 	}]).factory('KindAPI', ['$resource', '$cacheFactory', function($resource, $cacheFactory) {
 		var cache = $cacheFactory('KindAPI');

+ 2 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -1497,7 +1497,8 @@ define([ 'app/app' ], function(app) {
             Goods.updateGoods(null, commodity, function(data){
                 if(data.code == 1) {
                     toaster.pop('success', '修改成功');
-                    $scope.currenctGoods.splice(index, 1, data.data);
+                    loadData()
+                    // $scope.currenctGoods.splice(index, 1, data.data);
                 }else {
                     toaster.pop('error', '失败', data.message);
                 }

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

@@ -220,6 +220,9 @@
   .application-tab table tr td .lookNoPassInfo:hover .infoMore{
     display: block;
   }
+  #store-list .table tr>th, #store-list .table tr>td {
+    padding: 0px;
+  }
 </style>
 <div class="row-fluid sortable" id="store-list">
   <div class="com-title">

+ 7 - 2
src/main/webapp/resources/view/admin/modal/application_unpass_reason.html

@@ -24,9 +24,14 @@
 	}
 
 	div.title {
-		background-color: #F3F3F3;
+		background-color: #3ba9e9;
+		border-top-left-radius: 6px;
+		border-top-right-radius: 6px;
+		overflow: hidden;
+	}
+	.modal-content {
+		overflow: hidden;
 	}
-
 	#body . {
 		margin-bottom: 10px;
 	}

+ 7 - 1
src/main/webapp/resources/view/admin/modal/auditRegulpic_choose_modal.html

@@ -10,9 +10,15 @@
     padding-right: 10px;
     font-size: 15px;
   }
+  .modal-content {
+    overflow: hidden;
+  }
 
   div.title {
     background-color: #3ba9e9;
+    border-top-left-radius: 6px;
+    border-top-right-radius: 6px;
+    overflow: hidden;
   }
 
   #body . {
@@ -37,7 +43,7 @@
         <p style="color: #ea0025">商城已存在该标准物料,请选择正确的规格书</p>
       </div>
     </div>
-    <div class="form-group" style="margin: 0px">
+    <div class="form-group" style="border-bottom: 1px dashed #dcdcdc;padding-bottom: 15px;">
       <div class="col-sm-6">
         <label class="radio-inline">
           <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="store" ng-checked="checked === 'store'" ng-click="checked = 'store'">

+ 6 - 0
src/main/webapp/resources/view/admin/modal/auditRegulpic_modal.html

@@ -13,6 +13,12 @@
 
   div.title {
     background-color: #3ba9e9;
+    border-top-left-radius: 6px;
+    border-top-right-radius: 6px;
+    overflow: hidden;
+  }
+  .modal-content {
+    overflow: hidden;
   }
 
   #body . {

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

@@ -10,9 +10,14 @@
     padding-right: 10px;
     font-size: 15px;
   }
-
+  .modal-content {
+    overflow: hidden;
+  }
   div.title {
     background-color: #3ba9e9;
+    border-top-left-radius: 6px;
+    border-top-right-radius: 6px;
+    overflow: hidden;
   }
 
   #body . {
@@ -29,7 +34,7 @@
     line-height: 28px;
   }
   .form-horizontal div {
-    color: #666;
+    color: #333;
     font-size: 14px
   }
   .form-horizontal .name {
@@ -75,14 +80,14 @@
       <div class="col-sm-3 name">型号:</div>
       <div class="col-sm-9">{{item.product.cmpCode || item.product.pcmpcode || '-'}}</div>
     </div>
-    <div class="form-group">
+    <div class="form-group" style="border-bottom: 1px dashed #dcdcdc;padding-bottom: 15px;">
       <div class="col-sm-3 name">规格书:</div>
       <div class="col-sm-9"><a href="{{item.uploadAttach}}" target="_blank"><img src="static/img/vendor/images/pdf.png" style="width:28px;height:28px;"/></a></div>
     </div>
     <div class="form-group">
-      <div class="col-sm-3 name"><em style="color: #ea0e0e">*</em>品牌:</div>
-      <div class="col-sm-9" style="position: relative;" ng-if="!item.brandId">
-        <input 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-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" />
         <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}}
@@ -94,29 +99,29 @@
       </div>
     </div>
     <div class="form-group">
-      <div class="col-sm-3 name"><em style="color: #ea0e0e">*</em>商城类目:</div>
+      <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-4" style="padding: 0px;">
           <select class="form-control"
                   ng-model="kindPojo.first"
-                  ng-options="key as value.nameCn for (key,value) in kindInfo"
-                  ng-change="kindPojo.second='';kindPojo.third='';"
+                  ng-change="ChooseFirstItem()"
                   style="opacity: 1;height:28px;overflow-y: scroll;line-height:28px;padding: 0 6px;">
-            <option value="">请选择一级类目</option>
+            <option value="请选择一级类目" selected="selected">请选择一级类目</option>
+            <option ng-repeat="item in FisrtkindInfo" value="{{item.id}}">{{item.nameCn}}</option>
           </select>
         </div>
         <div class="col-sm-4" style="padding: 0px;">
-          <select class="form-control" ng-model="kindPojo.second" ng-show="kindInfo[kindPojo.first].children"
-                  ng-options="key as value.nameCn for (key,value) in kindInfo[kindPojo.first].children"
-                  ng-change="kindPojo.third='';" style="height:28px;line-height:28px;padding: 0 6px;">
-            <option value="">请选择二级类目</option>
+          <select class="form-control" ng-model="kindPojo.second" ng-show="TwokindInfo.length > 0"
+                  ng-change="ChooseTwoItem()" style="height:28px;line-height:28px;padding: 0 6px;">
+            <option value="请选择二级类目" selected="selected">请选择二级类目</option>
+            <option ng-repeat="item in TwokindInfo" value="{{item.id}}">{{item.nameCn}}</option>
           </select>
         </div>
         <div class="col-sm-4" style="padding: 0px;">
           <select class="form-control" ng-model="kindPojo.third" style="opacity: 1;height:28px;line-height:28px;padding: 0 6px;"
-                  ng-show="kindInfo[kindPojo.first].children[kindPojo.second].children"
-                  ng-options="value as value.nameCn for value in kindInfo[kindPojo.first].children[kindPojo.second].children">
-            <option value="">请选择三级类目</option>
+                  ng-show="ThreekindInfo.length> 0">
+            <option value="请选择三级类目" selected="selected">请选择三级类目</option>
+            <option ng-repeat="item in ThreekindInfo" value="{{item.id}}">{{item.nameCn}}</option>
           </select>
         </div>
       </div>
@@ -124,8 +129,8 @@
         {{item.kind.nameCn}}
       </div>
     </div>
-    <div class="form-group">
-      <div class="col-sm-3 name">规格:</div>
+    <div class="form-group" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 12px;">
+      <div class="col-sm-3 name" style="color:#333;">规格:</div>
       <div class="col-sm-9">
         <input type="text" placeholder="请输入规格(非必填)" ng-model="spec" class="form-control" style="width: 240px;height: 28px" />
       </div>

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

@@ -1246,22 +1246,22 @@
                                             <a ng-click="editGoodsPicture(commodity.editPic || 'static/img/store/common/default.png', commodity)" title="修改图片"><img src="static/img/icon/update-img.png" /></a>
                                         </div>
                                     </div>
-                                    <div class="fr wid135">
-                                        <p>
+                                    <div class="fr wid135" style="margin-top: 0px">
+                                        <p style="margin-top: 5px">
                                             品牌:
-                                            <input type="text" ng-model="commodity.brandNameEn" style="width:106px" maxlength="25" ng-change="onBrandChange(commodity.brandNameEn)"/>
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.brandNameEn" style="width:106px" maxlength="25" ng-change="onBrandChange(commodity.brandNameEn)"/>
                                         </p>
-                                        <p>
+                                        <p style="margin-top: 5px">
                                             物料名称:
-                                            <input type="text" ng-model="commodity.kindNameCn" style="width:78px" maxlength="20" ng-change="onCodeChange(commodity.kindNameCn)"/>
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 79px" type="text" ng-model="commodity.kindNameCn" style="width:78px" maxlength="20" ng-change="onCodeChange(commodity.kindNameCn)"/>
                                         </p>
-                                        <p>
+                                        <p style="margin-top: 5px">
                                             型号:
-                                            <input type="text" ng-model="commodity.code" style="width:106px" maxlength="100" />
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.code" style="width:106px" maxlength="100" />
                                         </p>
-                                        <p>
+                                        <p style="margin-top: 5px">
                                             规格:
-                                            <input type="text" ng-model="commodity.spec" maxlength="50" style="width:106px"/>
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.spec" maxlength="50" style="width:106px"/>
                                         </p>
                                         <!--<p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>-->
                                         <!--<p>物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>-->
@@ -1357,10 +1357,10 @@
                                             <a class="Regulpica" ng-click="editRegulPicture(commodity.productAttachSubmit.uploadAttach || 'static/img/vendor/images/upload_file_icon.png', commodity)" ng-if="!commodity.attach" style="margin: 0px">
                                                 <div style="width:24px;height:26px;position: relative">
                                                     <img style="width:24px;height:26px" src="static/img/vendor/images/pdf.png"/>
-                                                    <div class="zhezhaodang" ng-if="commodity.productAttachSubmit.uploadAttach"></div>
+                                                    <div class="zhezhaodang"></div>
                                                 </div>
                                             </a>
-                                            <img ng-if="commodity.productAttachSubmit.uploadAttach" src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;" class="nopass"/>
+                                                <img ng-if="commodity.productAttachSubmit.uploadAttach" src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;" class="nopass"/>
                                             <div class="forAdminLook">待审核</div>
                                         </div>
                                     </div>

+ 31 - 10
src/main/webapp/resources/view/vendor/modal/edit_regul_modal.html

@@ -193,6 +193,7 @@
     margin-right: 5px;
     width: 115px;
     text-align: right;
+    color: #666;
   }
   .listUl {
     position: absolute;
@@ -253,6 +254,24 @@
   .ToforAdminLook:hover .forAdminLook {
     display: block;
   }
+
+
+  input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+    /* WebKit browsers */
+    color: #999;
+  }
+  input:-moz-placeholder, textarea:-moz-placeholder {
+    /* Mozilla Firefox 4 to 18 */
+    color: #999;
+  }
+  input::-moz-placeholder, textarea::-moz-placeholder {
+    /* Mozilla Firefox 19+ */
+    color: #999;
+  }
+  input:-ms-input-placeholder, textarea:-ms-input-placeholder {
+    /* Internet Explorer 10+ */
+    color: #999;
+  }
 </style>
 <div class="modal-head"></div>
 <div class="modal-body" style="padding: 0px">
@@ -271,8 +290,8 @@
               <!-- 可编辑状态 -->
               <input type="text"
                      ng-change="onBrandChange(brandcode)"
-                     placeholder="请输入品牌名"
-                     style="width: 165px;height: 28px"
+                     placeholder="请输入品牌名"
+                     style="width: 165px;height: 28px;border-radius: 2px;color: #333"
                      ng-blur="onBrandBlur(brandcode)"
                      ng-model="brandcode"
                      class="form-control" maxlength="25"/>
@@ -293,8 +312,8 @@
               <div ng-show="IsLookOrUpdate === 'update'">
                 <!-- 可编辑状态 -->
                 <input type="text"
-                       placeholder="请输入物料名称(类目)"
-                       style="width: 165px;height: 28px"
+                       placeholder="请输入物料名称(类目)"
+                       style="width: 165px;height: 28px;border-radius: 2px;color: #333"
                        ng-model="kind"
                        class="form-control" maxlength="20"/>
               </div>
@@ -313,7 +332,7 @@
                 <input type="text"
                        ng-change="onCodeChange(cmpcode)"
                        placeholder="请输入型号"
-                       style="width: 165px;height: 28px"
+                       style="width: 165px;height: 28px;border-radius: 2px;color: #333"
                        ng-blur="onCodeBlur(cmpcode)"
                        ng-model="cmpcode"
                        class="form-control" maxlength="100"/>
@@ -334,7 +353,7 @@
                 <!-- 可编辑状态 -->
                 <input type="text"
                        placeholder="请输入规格参数"
-                       style="width: 165px;height: 28px"
+                       style="width: 165px;height: 28px;border-radius: 2px;color: #333"
                        ng-model="spec"
                        class="form-control" maxlength="50"/>
             </div>
@@ -344,7 +363,7 @@
           <div class="name pull-left" style="width: 60px">规格书:</div>
           <div ng-show="RegulChange" style="line-height: 30px;position: relative;height: 30px;width: 60px;text-align: center;" class="pull-left">
             <input style="display: inline-block" type="file" image-upload class="uploadImage" accept=".pdf"  on-success="onUploadSuccess($data, $file)" max-size="20971520" errorSizeMsg="'文件大小不能超过20M'">
-            <span style="color: #5078cb;cursor: pointer;">点击上传</span>
+            <span style="color: #fff;cursor: pointer;background:#f15601;border-radius: 2px;font-size: 12px;padding: 3px 4px;">点击上传</span>
           </div>
           <div ng-show="RegulChange" style="position: relative;display: inline-block" class="ToforAdminLook" ng-if="ChooseItem.productAttachSubmit.uploadAttach">
             <img src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;"/>
@@ -435,11 +454,13 @@
         </div>
         <div class="update-file-btn clearboth"  style="width: 100%; float: none">
           <p>
-            <a ng-click="confirm()" class="ok" style="float: none">确定</a>
-            <span style="position:static;vertical-align: top;" ng-click="cancel()">
-          取消
+            <span style="position:relative;vertical-align: top;">
+              <input type="file" image-upload class="uploadImage" accept=".pdf"   on-success="onUploadSuccess($data, $file)" max-size="20971520" errorSizeMsg="'文件大小不能超过20M'">
+          选择文件
               <!--<span >取消</span>-->
             </span>
+            <a ng-click="confirm()" class="ok" style="float: none">确定</a>
+
           </p>
         </div>
       </div>