Browse Source

品牌映射反馈1处理

hulh 8 years ago
parent
commit
ac5f228893

+ 11 - 0
src/main/webapp/resources/js/admin/controllers/product/brandMapCtrl.js

@@ -207,6 +207,11 @@ define(['app/app'], function(app) {
 			$scope.brandInfo = item;
 		};
 
+		$scope.cancelFitBrand = function () {
+			$scope.brandInfo = null;
+			$scope.showBrand = false;
+		};
+
 		$scope.fitBrandInMap = function () {
 			if (!$scope.brandInfo){
 				toaster.pop("info", "请选择对应标准库的品牌");
@@ -316,6 +321,12 @@ define(['app/app'], function(app) {
 			$scope.showStore = false;
 		};
 
+		$scope.cancelFitStore = function () {
+			$scope.storeInfo = null;
+			$scope.showStore = false;
+			$scope.wordInStore = '';
+		};
+
 		$scope.reloadStoreData =function () {
 			$scope.storeInfoTableParams.page(1);
 			$scope.storeInfoTableParams.reload();

+ 12 - 12
src/main/webapp/resources/view/admin/product/brand_map.html

@@ -24,7 +24,7 @@
 
     .mobile-select{
         position:absolute;
-        top:25px;
+        top:29px;
         z-index:1000;
         width:550px;
         min-height:210px;
@@ -210,7 +210,7 @@
                                     <i class="fa fa-search" style="color:#fff;width:20px;height:20px;display:inline-block;margin-left:-20px;background: #2fa4e7;padding:3px;" ng-click="showStoreFrame()"></i>
                                 </div>
                                 <button ng-click="fitStoreInMap()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px;">确定</button>
-                                <button ng-click="fitStoreInMap()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px;">取消</button>
+                                <button ng-click="cancelFitStore()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px;">取消</button>
                             </form>
                             <table class="table table-striped table-condensed" ng-table="storeInfoTableParams">
                                 <thead>
@@ -223,7 +223,7 @@
                                 </thead>
                                 <tbody>
                                     <tr ng-repeat="store in storeList">
-                                        <td><input type="radio" value="item.id" ng-checked="store.id == storeInfo.id" name="item_radio" ng-click="fitStoreObj(store)"></td>
+                                        <td><input type="radio" value="store.id" ng-checked="store.id == storeInfo.id" name="item_radio" ng-click="fitStoreObj(store)"></td>
                                         <td><span ng-bind="store.id | storeId">00100021</span></td>
                                         <td><span ng-bind="store.storeName">深圳中国移动公司</span></td>
                                         <td><span ng-bind="convertType[store.type]">代码商</span></td>
@@ -233,7 +233,7 @@
                         </div>
                     </div>
                 </td>
-                <td><input type="text" style="width:115px;height:29px;" ng-model="convertType[brandMap.type]"/></td>
+                <td>{{convertType[brandMap.type]}}</td>
                 <td><input type="text" style="width:115px;height:29px;" ng-model="brandMap.nameChildCn"/></td>
                 <td><input type="text" style="width:115px;height:29px;" ng-model="brandMap.nameChildEn"/></td>
                 <td class="tdcenter">
@@ -243,8 +243,8 @@
                             <div style="margin-bottom:10px;display: inline-flex;align-items: center">
                                 <input type="text" ng-model="wordInBrand" ng-change="changeTextInBrand(wordInBrand)" style="width:395px;height:20px;line-height:20px;padding:0 20px 0 10px;border:1px solid #2fa4e7;" placeholder="输入品牌中文/英文名称">
                                 <i ng-click="searchBrand()" class="fa fa-search" style="color:#fff;width:20px;height:20px;display:inline-block;margin-left:-20px;background: #2fa4e7;padding:3px;" ng-click="showStoreFrame()"></i>
-                                <button ng-click="fitStoreInMap()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px 0 10px;">确定</button>
-                                <button ng-click="fitStoreInMap()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px;">取消</button>
+                                <button ng-click="fitBrandInMap()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px 0 10px;">确定</button>
+                                <button ng-click="cancelFitBrand()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 3px;margin:0 5px;">取消</button>
                             </div>
                             <ul>
                                 <li>字母索引:</li>
@@ -279,20 +279,20 @@
                             <table class="table table-condensed" ng-table="brandInfoTableParams">
                                 <tr ng-repeat="value in showList">
                                     <td ng-repeat="item in value" style="width:33%;padding-left:5px;text-align: left;">
-                                        <input type="radio" name="radio-type" ng-click="fitBrandObj(item)">
-                                        <span style="width:110px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;" ng-click="fitBrandObj(item)">{{item.nameEn}}/{{item.nameCn}}</span>
+                                        <label>
+                                            <input type="radio" value="item.id" ng-checked="item.id == brandInfo.id" name="radio-type" ng-click="fitBrandObj(item)">
+                                            <span style="width:110px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;">{{item.nameEn}}/{{item.nameCn}}</span>
+                                        </label>
                                     </td>
                                 </tr>
                             </table>
-                            <button ng-click="fitBrandInMap()" style="border:1px solid #2fa4e7;background: #2fa4e7;color:#fff;position:absolute;right:20px;font-size: 12px;width:34px;height:24px;line-height: 24px;border-radius: 2px;">确定</button>
                         </div>
                     </div>
                 </td>
-                <td><input type="text" style="width:115px;height:29px;" ng-model="brandMap.nameStandardEn"/></td>
-                <td></td>
+                <td>{{brandMap.nameStandardEn}}</td>
                 <td>
                     <button style="width:43px;color:#fff;background: #50b2eb;border:0;margin-right:20px;" ng-click="ensureAdd()">保存</button>
-                    <button style="width:43px;color:#fff;background: #50b2eb;border:0;" ng-click="ensureAdd()">取消</button>
+                    <button style="width:43px;color:#fff;background: #50b2eb;border:0;" ng-click="cancelAdd()">取消</button>
                 </td>
             </tr >