Browse Source

产品库模态框及样式修改

yangc 7 years ago
parent
commit
887e7b09e1

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

@@ -355,14 +355,23 @@ define([ 'app/app' ], function(app) {
             }
         };
 
+        $scope.isDoubleChecked = false;
         // 单选
-        $scope.chooseOne = function (goods, $event) {
-            $event.stopPropagation();
+        $scope.chooseOne = function (event, goods) {
+            if (event) {
+                event.preventDefault();
+                event.stopPropagation();
+                $scope.isDoubleChecked = true;
+            }
             if (typeof goods.isChoosed == 'undefined' || !goods.isChoosed) {
                 goods.isChoosed = true;
             } else {
                 goods.isChoosed = false;
             }
+            if ($scope.isDoubleChecked) {
+                goods.isChoosed = !goods.isChoosed;
+                $scope.isDoubleChecked = false;
+            }
             checkChoosedAll();
         };
 
@@ -386,7 +395,10 @@ define([ 'app/app' ], function(app) {
             });
         };
 
-        $scope.cancelBatch = function () {
+        $scope.cancelBatch = function (event) {
+            if (event) {
+                event.stopPropagation();
+            }
             $scope.batchStatus = false;
         };
 
@@ -642,6 +654,7 @@ define([ 'app/app' ], function(app) {
          * 去对应的批次信息
          */
         $scope.goToBatchDetail = function (event, commodity) {
+            event.stopPropagation();
             if(!commodity || !event || commodity.edit) {
                 return ;
             };
@@ -1682,13 +1695,19 @@ define([ 'app/app' ], function(app) {
         };
 
         // 取消删除的操作
-        $scope.cancleSoldOut = function () {
+        $scope.cancleSoldOut = function (event) {
+            if (event) {
+                event.stopPropagation();
+            }
             $scope.isSoldOut = false;
             $scope.soldOutCommodity = null;
         };
 
         // 点击下架操作
-        $scope.soldOut = function (commodity) {
+        $scope.soldOut = function (event, commodity) {
+            if (event) {
+                event.stopPropagation();
+            }
             $scope.isSoldOut = true;
             $scope.soldOutCommodity = commodity;
         };

+ 1 - 1
src/main/webapp/resources/view/common/modal/delete_modal.html

@@ -10,7 +10,7 @@
         width: 310px;
         border-radius: 0;
         outline: 0;
-        overflow: hidden;
+        /*overflow: hidden;*/
     }
     .modal-dialog{
         height: 152px;

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

@@ -1541,10 +1541,10 @@
 	#wanted-list02{
 		display: none;
 	}
-    .modal-backdrop {
+    /*.modal-backdrop {
         background-color: transparent ;
         bottom: unset!important;
-    }
+    }*/
     .modal{
         bottom: unset!important;
     }

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_material_person.html

@@ -1491,10 +1491,10 @@
 	#wanted-list02{
 		display: none;
 	}
-    .modal-backdrop {
+   /* .modal-backdrop {
         background-color: transparent ;
         bottom: unset!important;
-    }
+    }*/
     .modal{
         bottom: unset!important;
     }

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

@@ -178,6 +178,10 @@
         text-align: center;
         margin: 0 auto;
     }
+    .com-out-box .content div.red {
+        position: relative;
+        top: -10px;
+    }
     .com-out-box .content div a{
         width: 55px;
         height: 26px;
@@ -298,6 +302,9 @@
         overflow: hidden;
         text-overflow: ellipsis;
     }
+    .vendor-tab.table td .wid135 p em.href {
+        cursor: pointer;
+    }
     .vendor-tab.table td p{
         font-size: 14px;
         text-align: left;
@@ -937,7 +944,7 @@
                         <td colspan="10" class="hei16"></td>
                     </tr>
                     </tbody>
-                    <tbody ng-repeat="commodity in currenctGoods" ng-click="goToBatchDetail($event, commodity)" class="edit-border">
+                    <tbody ng-repeat="commodity in currenctGoods" ng-click="chooseOne(null, commodity)" class="edit-border">
                     <!--非编辑状态自定义标签-->
                     <tr class="define" ng-if="!commodity.edit">
                         <td colspan="10">
@@ -955,7 +962,7 @@
                     <tr class="edit-form" ng-if="!commodity.edit">
                         <td class="middle padding0 check-input">
                             <!-- <span><input type="checkbox" id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>-->
-                            <span name="check-one"><input type="checkbox" ng-checked="commodity.isChoosed" ng-click="chooseOne(commodity, $event)" id="{{$index+1}}"/><label for="{{$index+1}}"></label></span>
+                            <span name="check-one"><input type="checkbox" ng-checked="commodity.isChoosed" fid="{{$index+1}}"/><label for="{{$index+1}}"></label></span>
                             <!--&lt;!&ndash;非标产品标志&ndash;&gt;-->
                             <!--<img ng-if="!commodity.uuid" src="static/img/store/common/nonstandard.png" alt="" class="standard"/>-->
                             <!--&lt;!&ndash;标产品标志&ndash;&gt;-->
@@ -971,7 +978,7 @@
                             <div class="fr wid135">
                                 <p ng-if="!commodity.uuid">类目: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
                                 <p ng-if="commodity.uuid" name="kind-a"><a href="product/kind/{{commodity.kindUuid}}" style="margin: 0; color: #333;" target="_blank">类目: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
-                                <p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>
+                                <p>型号: <em class="href" ng-bind="commodity.code" title="{{commodity.code}}"  ng-click="goToBatchDetail($event, commodity)">LPC1112</em></p>
                                 <p ng-if="!commodity.uuid">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
                                 <p ng-if="commodity.uuid" name="brand-a"><a href="product/brand/{{commodity.branduuid}}" style="margin: 0; color: #333;" target="_blank">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
                             </div>
@@ -1034,7 +1041,7 @@
                         <td class="padding0">
                             <div ng-if="!commodity.sourceId" name="edit-a" class="edit-a"><span class="edit edits" ng-click="editCommodity(commodity)">编辑</span></div><!--updateCommodityInfo(commodity, false)-->
                             <div ng-if="commodity.sourceId"><a style="margin: 0;">来源UAS</a></div>
-                            <div ng-if="!commodity.sourceId" name="down-a" class="down-a"><span class='edits' ng-click="soldOut(commodity)">下架</span></div>
+                            <div ng-if="!commodity.sourceId" name="down-a" class="down-a"><span class='edits' ng-click="soldOut($event, commodity)">下架</span></div>
                         </td>
                     </tr>
                     <!--编辑状态自定义标签-->
@@ -1354,27 +1361,31 @@
     </div>
 </div>
 <!--下架操作-->
-<div class="com-out-box" ng-if="isSoldOut">
-    <div class="title">
-        <a ng-click="cancleSoldOut()"><i class="fa fa-close fa-lg"></i></a>
-    </div>
-    <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>确认下架?</p>
-        <div><a ng-click="cancleSoldOut()">取消</a><a ng-click="updateCommodityInfo(soldOutCommodity)">确认</a></div>
+<div class="com-modal-wrap" ng-if="isSoldOut" ng-click="cancleSoldOut($event)">
+    <div class="com-out-box">
+        <div class="title">
+            <a ng-click="cancleSoldOut()"><i class="fa fa-close fa-lg"></i></a>
+        </div>
+        <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>确认下架?</p>
+            <div><a ng-click="cancleSoldOut()">取消</a><a ng-click="updateCommodityInfo(soldOutCommodity)">确认</a></div>
+        </div>
     </div>
 </div>
-<div class="com-out-box" ng-if="batchStatus">
-    <div class="title">
-        <a ng-click="cancelBatch()"><i class="fa fa-close fa-lg"></i></a>
-    </div>
-    <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>{{batchTitle}}</p>
-        <div class="red" ng-if="batchType==1">*<i ng-if="batchType==1">已有交易记录的产品无法删除</i>
+<div class="com-modal-wrap" ng-if="batchStatus" ng-click="cancelBatch($event)">
+    <div class="com-out-box">
+        <div class="title">
+            <a ng-click="cancelBatch()"><i class="fa fa-close fa-lg"></i></a>
         </div>
-        <div>
-            <a ng-click="cancelBatch()">取消</a>
-            <a ng-if="batchType==1" ng-click="batchDelete()">确认</a>
-            <a ng-if="batchType==2" ng-click="batchDown()">确认</a>
+        <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>{{batchTitle}}</p>
+            <div class="red" ng-if="batchType==1">*<i ng-if="batchType==1">已有交易记录的产品无法删除</i>
+            </div>
+            <div>
+                <a ng-click="cancelBatch()">取消</a>
+                <a ng-if="batchType==1" ng-click="batchDelete()">确认</a>
+                <a ng-if="batchType==2" ng-click="batchDown()">确认</a>
+            </div>
         </div>
     </div>
 </div>