Parcourir la source

供应商上架费弹窗控制

zhengjinyi il y a 2 ans
Parent
commit
2c77209f19

+ 1 - 1
src/main/resources/static/css/supplier-center/shop/goods.css

@@ -12,7 +12,7 @@ li{list-style: none}
     #newBtn{float: left;margin: 0}
     .query-btn{background-color: #e15616;color: #fff;width: 88px;border: 1px solid #e15616}
     .goods-main{width: 100%; height: auto; float: left; margin:10px 0;background: #fff;}
-    .goods-main .goods-table .goods-tips{width: 100%;height: 44px;float: left;box-sizing: border-box;background: #FFFFFF;padding:0 16px 16px 16px;margin-top: 14px;}
+    .goods-main .goods-table .goods-tips{width: 100%;height: 44px;box-sizing: border-box;background: #FFFFFF;padding:0 16px 16px 16px;margin-top: 14px;}
     .goods-main .goods-table .goods-tips .end-tips{width: 500px;height: 32px;background: #FFF3F3;border-radius: 2px;line-height: 32px;color: #F94B4B;font-size: 12px;}
     .goods-main .goods-table .goods-tips .end-tips .tips{display:inline-block;width:32px;height:32px;line-height:32px;box-sizing:border-box;position:relative;color:#333;font-size:14px;text-align:center;white-space:nowrap}
     .goods-main .goods-table .goods-tips .end-tips .tips:before{display:inline-block;width:20px;height:20px;vertical-align:middle;background-position:-24px 1px;margin-right:2px;}

+ 1 - 1
src/main/resources/static/js/supplier-center/dashboard.js

@@ -28,7 +28,7 @@
                      _this.userInfo = res.data.user;
                      _this.promotions = res.data.promotions;
                      _this.rankingList = res.data.salesRankingList;
-                     if(res.data.constraint === '1'){
+                     if(res.data.constraint === '0'){
                          CAIMEI.Alert('您的供应商账号上架费将于30日后到期,到期后将无法发布和编辑商品,同时也会影响到其他采美提供的支持服务。请联系采美工作人员进行续费,联系电话0755-22907771 或15338851365', '确定', false);
                      }
                      if (res.data.unReadMessageCount>99){

+ 17 - 17
src/main/resources/static/js/supplier-center/shop/goods.js

@@ -94,7 +94,7 @@ var myGoods = new Vue({
                 if(response.code == 0){
                     _this.isRequest = true;
                     _this.featuredNum = response.data.featuredNum;
-                    _this.forbid = response.data.listingFee === 1 ? true : false
+                    _this.isForbid = response.data.listingFee === 1 ? true : false
                     var data = response.data.productPage;
                     if(data.results && data.results.length>0){
                         _this.productsList = data.results;
@@ -270,7 +270,7 @@ var myGoods = new Vue({
             var _this = this;
             if(this.isForbid){ return }
             CAIMEI.Modal('确定下架该商品吗?','取消','确定',function () {
-                 SupplierApi.SupplierSoldOut({productIds:pros.productId},function (response) {
+                SupplierApi.SupplierSoldOut({productIds:pros.productId},function (response) {
                     if (response.code == 0){
                         CAIMEI.dialog('下架成功~');
                         _this.productsList = [];
@@ -286,13 +286,13 @@ var myGoods = new Vue({
             var num = 4-this.featuredNum;
             if(this.isForbid){ return }
             CAIMEI.Modal('总共能添加4个主推商品,您还能添加'+num+'个确定将该商品添加为主推商品吗?','取消','确定',function () {
-                 SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:1,shopId:_this.shopId},function (response) {
+                SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:1,shopId:_this.shopId},function (response) {
                     if (response.code == 0){
                         CAIMEI.dialog('添加成功~');
                         _this.productsList = [];
                         _this.GetMyproductDataInfo();
                     }else{
-                         CAIMEI.Alert(response.msg,'确定');
+                        CAIMEI.Alert(response.msg,'确定');
                     }
                 })
             })
@@ -301,13 +301,13 @@ var myGoods = new Vue({
             var _this = this;
             if(this.isForbid){ return }
             CAIMEI.Modal('是否把该商品从主推商品中删除?','取消','确定',function () {
-                  SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:0,shopId:_this.shopId},function (response) {
+                SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:0,shopId:_this.shopId},function (response) {
                     if (response.code == 0){
                         CAIMEI.dialog('删除成功~');
                         _this.productsList = [];
                         _this.GetMyproductDataInfo();
                     }else{
-                         CAIMEI.Alert(response.msg,'确定');
+                        CAIMEI.Alert(response.msg,'确定');
                     }
                 })
             })
@@ -325,17 +325,17 @@ var myGoods = new Vue({
             if(this.isForbid){ return }
             pros.isChecked = !pros.isChecked;
             if(pros.isChecked){
-                  _this.checkList.push(pros);
-                }else {
-                  _this.checkList.splice(_this.checkList.indexOf(pros), 1);
-                };
-                 if( _this.checkList.length>0){
-                     _this.check = true;
-                     _this.isProductChecked = true;
-                 } else {
-                     _this.isProductChecked = false;
-                     _this.check = false;
-                 }
+                _this.checkList.push(pros);
+            }else {
+                _this.checkList.splice(_this.checkList.indexOf(pros), 1);
+            };
+            if( _this.checkList.length>0){
+                _this.check = true;
+                _this.isProductChecked = true;
+            } else {
+                _this.isProductChecked = false;
+                _this.check = false;
+            }
 
             _this.updateCheckAllBtn();
         },

+ 1 - 1
src/main/resources/templates/supplier-center/shop/goods.html

@@ -108,7 +108,7 @@
                             <li>新品展示</li>
                             <li>操作</li>
                         </ul>
-                        <div class="goods-tips">
+                        <div class="goods-tips" v-if="isForbid">
                             <div class="end-tips">
                                 <span class="WEB-icon tips"></span>
                                 <span>您的上架费已到期,已禁止商品的所有操作,支付账户上架费后才能继续操作。</span>