Kaynağa Gözat

促销商品相关

chao 4 yıl önce
ebeveyn
işleme
089707100e

+ 26 - 0
src/main/java/com/caimei/www/controller/authorized/supplier/SupplierPageController.java

@@ -18,6 +18,12 @@ public class SupplierPageController extends BaseController {
 	private static final String ORDER_LIST = "supplier-center/order/list";
     /** 订单详情 */
 	private static final String ORDER_DETAIL = "supplier-center/order/detail";
+    /** 物流 */
+	private static final String LOGISTICS = "supplier-center/order/logistics";
+    /** 发货 */
+	private static final String DELIVERY = "supplier-center/order/delivery";
+    /** 发货记录 */
+	private static final String DELIVERY_RECORD = "supplier-center/order/delivery_record";
     /** 结算管理 */
 	private static final String SETTLEMENT_LIST = "supplier-center/order/settlement";
     /** 员工管理 */
@@ -66,6 +72,24 @@ public class SupplierPageController extends BaseController {
         return SETTLEMENT_LIST;
     }
 
+    /** 结算管理 */
+    @GetMapping("/supplier/order/logistics.html")
+    public String logistics() {
+        return LOGISTICS;
+    }
+
+    /** 结算管理 */
+    @GetMapping("/supplier/order/delivery.html")
+    public String delivery() {
+        return DELIVERY;
+    }
+
+    /** 结算管理 */
+    @GetMapping("/supplier/order/delivery_record.html")
+    public String deliveryRecord() {
+        return DELIVERY_RECORD;
+    }
+
     /** 员工管理 */
     @GetMapping("/supplier/operation/list.html")
     public String operationList() {
@@ -113,11 +137,13 @@ public class SupplierPageController extends BaseController {
     public String goodsList() {
         return GOODS_LIST;
     }
+
     /** 商品预览 */
     @GetMapping("/supplier/goods/preview.html")
     public String goodsPreview() {
         return GOODS_PREVIEW;
     }
+
     /** 消息列表 */
     @GetMapping("/supplier/message/list.html")
     public String settingMessage() {return MESSAGE;}

+ 3 - 5
src/main/resources/static/css/base/base.h5.css

@@ -126,7 +126,7 @@
 .productItem .item .name em{font-style: normal;color: #e15616;}
 .productItem .item .price{height:21vw;text-align:center}
 .productItem .item .price em{display:block;height:7vw;line-height:7vw;color:#4A4F58;font-style:normal;}
-/*.productItem .item .price em.p{color:#F55C5C}*/
+.productItem .item .price em.p{color:#F55C5C}
 .productItem .item .price .icon{display:inline-block;font-size:0;height:5vw;line-height:5vw;vertical-align:text-bottom;}
 .productItem .item .price .icon:before{width:11vw;height:5vw;}
 .productItem .item .price .icon.i0:before{background-position:0 -23.2vw}
@@ -138,9 +138,6 @@
 .productItem .item .btn{height:9vw;line-height:9vw}
 .productItem .item .btn{display:inline-block;width:35.8vw;height:9vw;text-align:center;overflow:hidden;color:#F94B4B;background:#FEF6F3;border-radius:2px}
 .productItem .item .btn.add{background:#FEF6F3;color:#E15616;}
-.price .login-btn{width:14vw;height:5vw;background:#FBEDE6;text-align:center;line-height:5vw;font-size:3vw;color:#e15616;padding:0.5vw 1.25vw}
-.price .pricebox{background:#e15616;width:42.5vw;height:10.5vw;line-height:5vw;display:block;font-size:3vw}
-.productItem .price em{font-weight:bold}
 .noMore{height:10vw;line-height:10vw;text-align:center;color:#ccc}
 /* 登录弹框 */
 .loginAlert{padding-top:1vw;text-align:center;}
@@ -164,7 +161,8 @@
 #scrollTop .phoneHover a{color:#E15616}
 #scrollTop .phoneHover a>i{display:inline-block;height:7.2vw;line-height:7.2vw;padding:0 2vw;background:#F55C5C;border-radius:3.6vw;margin-left:4vw;font-size:3.4vw}
 /* 活动标签,阶梯价格 */
-.priceTag .tag{position:absolute;left:0;height:6.4vw;line-height:6.4vw;font-size:3vw;padding:0 6vw 0 3vw;background-color:#ffe6dc;color:#E15616;border-radius:2px;font-style:normal;white-space:nowrap;top:-6.8vw}
+.priceTag .tag,.listTag{height:6.4vw;line-height:6.4vw;font-size:3vw;padding:0 6vw 0 3vw;background-color:#ffe6dc;color:#E15616;border-radius:2px;font-style:normal;white-space:nowrap;}
+.priceTag .tag{position:absolute;left:0;top:-6.8vw}
 .priceTag .tag:before{width:4vw;height:4vw;background-position:-51.6vw -.9vw;position:absolute;right:1.5vw;top:1.2vw}
 .priceTag .tag.on:before{background-position:-43vw -.9vw}
 .priceTag .ladder,.priceTag .promotion{display:none;background-color:rgba(74,79,88,.7);z-index:998}

+ 9 - 31
src/main/resources/static/css/base/base.pc.css

@@ -26,13 +26,7 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .icon.shop .tips{position:absolute;top:-30px;left:0;white-space:nowrap;background-color:#666;border-radius:2px;line-height:30px;font-size:12px;color:#FFF;text-align:center;display:inline-block;opacity:0;transition:all 1s;padding:0 10px;font-style:normal}
 .icon.shop .tips:before{content:"";width:10px;height:10px;background:#666;position:absolute;bottom:-3px;left:17px;transform:rotate(45deg)}
 .icon.shop:hover .tips{opacity:1}
-.icon.comment:before {
-    width: 25px;
-    height: 25px;
-    background-position: -5px -333px;
-    position: absolute;
-    top: 35px
-}
+.icon.comment:before{width:25px;height:25px;background-position:-5px -333px;position:absolute;top:35px}
 /*短信图形验证弹窗统一样式*/
 .content-model{width: 100%;height: 100%;background: rgba(0,0,0,.3);position: fixed;top: 0;left: 0;display: none;}
 .content-model.active{display: block;}
@@ -53,7 +47,6 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .content-model .model-content .model-button{width: 100%;height: 32px;float: left;margin-top: 32px;}
 .content-model .model-content .model-button .button{width: 120px;height: 32px;border-radius: 2px;background-color: #e15616;text-align: center;line-height: 32px;font-size: 14px;float: right;color: #FFFFFF;cursor: pointer;}
 
-
 /* 头部 */
 .baseHeadTop{width:100%;font-size:14px;background:#FBFBFB}
 .baseHeadTop ul{height:40px;line-height:40px}
@@ -205,14 +198,13 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .productItem .image .icon.hot:before,.productItem .image .icon.new:before{display:block;width:50px;height:64px}
 .productItem .image .icon.hot:before{background-position:-57px -180px}
 .productItem .image .icon.new:before{background-position:0px -180px}
-.productItem .name{display:block;padding:14px 35px;height:48px;line-height:24px}
+.productItem .name{display:block;padding:15px;height:48px;line-height:24px}
 .productItem .name span{color:#93979F;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 .productItem .name em{font-style: normal;color: #e15616;}
 .productItem .price{height:48px;border-top: 1px solid #E15616}
 .productItem .price em{height:48px;line-height:48px;color:#4A4F58;font-style:normal;margin-left:15px;font-weight:bold;font-size:14px}
 .productItem .price em.p{color:#333333}
-.productItem .price .rmb{font-weight:bold;}
-.productItem .price .icon{display:inline-block;font-size:0;height:24px;line-height:24px;vertical-align:text-bottom;}
+.productItem .price .icon{display:inline-block;font-size:0;height:24px;line-height:24px;margin-left:4px;vertical-align:text-bottom;}
 .productItem .price .icon:before{width:80px;height:24px;}
 .productItem .price .icon.i0:before{background-position:-295px -140px}
 .productItem .price .icon.i1:before{background-position:-295px -140px}
@@ -220,18 +212,14 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .productItem .price .icon.i3:before{background-position:-295px -208px}
 .productItem .price .icon.i4:before{background-position:-295px -242px}
 .productItem .price .icon.i5:before{background-position:-295px -276px}
-.productItem .btnBox{display:none;position:absolute;width:284px;height:68px;background:#fef6f3;text-align:center;bottom:0;left:0}
-.btnBox a {color: #fff;font-size:12px;text-align:center;}
+.productItem .btnBox{display:none;position:absolute;width:284px;height:68px;z-index:1;background:#fef6f3;text-align:center;bottom:0;left:0}
 .productItem .item:hover .btnBox{display:block}
 .productItem .item:hover .name span{color: #e15616;}
 .productItem .item:hover{box-shadow:0px 2px 6px #dedede;-moz-transition: all 0.5s;-webkit-transition:all 0.5s;transition:all 0.3s;-webkit-transform:translate3d(0,-2px,0);transform:translate3d(0,-2px,0);}
-.productItem .btn{display:block;width:158px;margin:12px auto;height:42px;line-height:42px;text-align:center;overflow:hidden;color:#F94B4B;background:#FFE6DC;border:1px solid #E15616;border-radius:2px}
+.productItem .btn{display:block;width:158px;margin:12px auto;height:42px;line-height:42px;font-size:16px;text-align:center;overflow:hidden;color:#F94B4B;background:#FFE6DC;border:1px solid #E15616;border-radius:2px}
 .productItem .btn.add{color:#E15616;}
+.productItem .btn.cat{font-size:12px;width:80%;background:#E15616;color:#FFF}
 .productItem .btn:hover{background:#E15616;color:#FFF}
-.price .login-btn{float:right;margin:10px 10px 0 0;padding:2px 5px;border:1px solid rgba(225,86,22,0.16862745098039217);color:#E15616;border-radius:2px;height:24px;line-height:24px}
-.price .pricebox{background:#e15616;width:244px;height:44px;line-height:44px;display:block;text-align:center;margin:12px auto}
-.priceicon{font-weight:bold}
-
 
 /*分页*/
 .pageWrap{width:1184px;text-align:center;margin:20px auto 36px}
@@ -249,7 +237,7 @@ header{box-shadow: 0 2px 10px #ebecef;}
 /* 登录弹框 */
 .loginAlert{padding-top:5px;}
 .loginAlert span:first-child:after{content: ',';}
-/*.loginAlert:after{content:'';display:block;width:125px;height:125px;background:url(/img/account/to_login.png) no-repeat left top;background-size:100% 100%;margin:10px 0 0 15px;}*/
+.loginAlert:after{content:'';display:block;width:125px;height:125px;background:url(/img/account/to_login.png) no-repeat left top;background-size:100% 100%;margin:10px 0 0 15px;}
 /* 咨询,回到顶部 */
 #scrollTop{display:none;position:fixed;right:50%;margin-right:-700px;width:88px;z-index:9999;bottom:120px;}
 #scrollTop .item{width:100%;background-color:#fff;box-sizing:border-box;text-align:center;box-shadow:0 2px 4px rgb(254,246,243);border-radius:2px;margin-bottom:10px;font-size:12px;position:relative}
@@ -266,7 +254,8 @@ header{box-shadow: 0 2px 10px #ebecef;}
 #scrollTop .item:hover .phoneHover{display:block}
 /* 活动标签,阶梯价格 */
 .priceTag{position:relative}
-.priceTag .tag{display:inline-block;height:24px;line-height:24px;border:1px solid #ffe6dc;border-radius:2px;font-size:12px;color:#E15616;cursor:pointer;background:#fff;padding:0 24px 0 10px;position:relative;font-style:normal}
+.priceTag .tag,.listTag{display:inline-block;height:24px;line-height:24px;border:1px solid #ffe6dc;border-radius:2px;font-size:12px;color:#E15616;cursor:pointer;background:#fff;padding:0 24px 0 10px;position:relative;font-style:normal}
+.listTag{float:right;padding:0 12px;margin:12px 15px 0 0;}
 .priceTag .tag:before{width:24px;height:24px;background-position:-88px 3px;position:absolute;right:0;top:0}
 .priceTag .tag.on:before{background-position:-117px 3px}
 .priceTag .ladder,.priceTag .promotion{position:absolute;background:#fff;box-shadow:0 3px 6px 0 #d7dfec;border-radius:2px;line-height:42px;left:0;top:28px;z-index:9;transition:all .8s;display:none}
@@ -285,16 +274,5 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .priceTag .promotion p.r{text-align:right;}
 .priceTag .promotion .more{color:#f55c5c;text-decoration:underline;float:right;}
 
-
-.login-btn{float:right;margin:10px 10px 0 0;padding:2px 5px;border:1px solid rgba(225,86,22,0.16862745098039217);color:#E15616;border-radius:2px;height:24px;line-height:24px}
-.pricebox{background:#e15616;width:244px;height:44px;line-height:44px;display:block;text-align:center;margin:12px auto}
-.activity{text-align:center;display:inline-block;height:24px;border:1px solid rgba(225,86,22,0.30196078431372547);opacity:1;border-radius:2px;font-size:12px;font-family:Microsoft YaHei;font-weight:400;line-height:24px;color:rgba(225,86,22,1) !important;position:relative;z-index:1;cursor:pointer;background:#fff;padding:0px 20px 0 5px;margin-left:15px}
-.activitystyle{border-bottom:1px solid #fff !important}
-.activity .icon.shaky:before{width:20px;height:20px;position:absolute;top:-5px;right:0;background-position:-90px 6px}
-.activity .activeicon{background-position:-207px -46px;top:8px}
-.activityBox{border:1px solid rgba(225,86,22,0.30196078431372547);border-radius:0px 2px 2px 2px;position:absolute;background:#fff;left:0;font-size:12px;text-align:center;top:28px;line-height:40px;padding:10px;max-height:319px;overflow:auto}
-.activeBtn{width:57px;height:24px;background:#E15616;color:#fff;border-radius:2px;float:right;margin-top:10px;cursor:pointer}
-.priceicon{font-weight:bold}
-
 /*  加载  */
 .loading {box-sizing: border-box;padding: 200px 0;text-align: center;}

+ 2 - 0
src/main/resources/static/css/index/index.pc.css

@@ -84,6 +84,7 @@ li{list-style:none;}
 #sideNav .item>a:first-child:before{display:none}
 #sideNav .item>a.on{background:#FEF6F3;color:#E15616}
 
+/*
 .btnBox{
     background:#E15616;
     height: 55px;
@@ -97,3 +98,4 @@ li{list-style:none;}
     font-size: 12px;
     text-align: center
 }
+*/

+ 11 - 7
src/main/resources/static/js/base.js

@@ -1,10 +1,14 @@
 var spiServer = $("#spiServer").val();
 var isPC = ($(window).width()>768);
 var globalUserData = '';
-var REV_TOKEN_DEV = 'X-Token';
+var GLOBAL_TOKEN = 'X-Token';
+var GLOBAL_USER_ID = 0;
+var GLOBAL_SHOP_ID = 0;
 if(localStorage.getItem('userInfo')){
     globalUserData = JSON.parse(localStorage.getItem('userInfo'));
-    REV_TOKEN_DEV = globalUserData.token;
+    GLOBAL_TOKEN = globalUserData.token;
+    GLOBAL_USER_ID = globalUserData.userId;
+    GLOBAL_SHOP_ID = globalUserData.shopId;
 }
 // 头部
 var globalHead = new Vue({
@@ -364,7 +368,7 @@ function tokenAjax(type, url, params, callback){
         data: params,
         headers:{
             'Content-Type': type=='post'?'application/x-www-form-urlencoded':'application/json;charset=utf8',
-            'X-Token':REV_TOKEN_DEV
+            'X-Token':GLOBAL_TOKEN
         },
         success : function (res) {
             if(res.code === -99){
@@ -392,6 +396,7 @@ function setSearchProductList(list, userId) {//处理搜索
             brand: item.p_brand_name,
             priceFlag: item.p_price_flag,
             priceGrade: item.p_price_flag,
+            actStatus: 0,
             priceLoaded: false
         });
         // 0公开价格 1不公开价格 2仅对会员机构公开
@@ -421,8 +426,7 @@ function setProductPrice(productList, productIds, userId, callback){
                         product.price = item.price;
                         product.priceLoaded = true;
                         product.ladderPriceFlag = item.ladderPriceFlag;
-                     var actStatus = item.actStatus;
-                        product.actStatus=actStatus;
+                        product.actStatus =item.actStatus;
                         product.promotions =item.promotions;
                     }
                 });
@@ -582,14 +586,14 @@ function addShoppingCart(userId, productId, count, callback){
                     },
                     close: {
                         text: '继续购物',
-                        btnClass: 'btn-cancel'
+                        btnClass: 'btn-cancel',
+                        action: callback()
                     }
                 }
             });
         } else {
             dialog("加入购物车失败!");
         }
-        callback();
     });
 }
 

+ 35 - 35
src/main/resources/static/js/product/detail.js

@@ -6,24 +6,33 @@ var productDetail = new Vue({
         userIdentity: '', //2-会员机构;3-供应商;4-普通机构
         userToken: '',
         images: [],
-        price: 564,
-        priceFlag: 2,
+        priceObj: {
+            actStatus: 0,
+            ladderPriceFlag: 0,
+            minBuyNumber: 1,
+            price: 0,
+            costPrice: 0,
+            priceFlag: 3,
+            productId: 0,
+            promotions: '',
+            step: 1,
+            supplierId: 0,
+            userIdentity: 0
+        },
+        ladderList:[],//阶梯价
+        promotions:{},//促销活动信息
+        promotionsId:0,//活动id
+        allTotalPrice:0,
         recommendType: 1,
         recommendPage: 1,
         recommends: [],
         parameters: [],
         isShow:false,
-        ladderList:[],//阶梯价
-        deailData:{},
-        promotions:{},//促销活动信息
         recommde:false,
         recommdeindex:0,
         number:0,
         minBuyNumber:0,
-        buyRetailPrice:0,
-        allTotalPrice:0,
         typedata:0,
-        promotionsId:0,//活动id
         isQuantity:false,
         isStock:false,
         cartAlert:false
@@ -71,29 +80,20 @@ var productDetail = new Vue({
             var _self = this;
             if(_self.productId ===0){return;}
             $.getJSON(spiServer + "/product/detail/price",{
-                // userId:this.userId,
-                // productId: this.productId
-                userId:10684,
+                userId: GLOBAL_USER_ID,
                 productId: _self.productId
             }).done(function (r) {
                 if (r.code === 0 && r.data) {
-                _self.priceFlag = r.data.priceFlag;
-                _self.number = r.data.minBuyNumber;//最小起訂量
-                _self.buyRetailPriceStep = r.data.step;
-                _self.minBuyNumber = r.data.minBuyNumber;
-                _self.buyRetailPrice = r.data.price;
-                    console.log(r)
+                    _self.priceObj = r.data;
                     if(r.data.ladderPriceFlag==1){
                         _self.ladderPrice();
-                     }else {
-                        _self.allTotalPrice = _self.number * _self.deailData.price;
-                     }
-                   _self.deailData =r.data;
-                    if(_self.deailData.actStatus==1){
-                    _self.promotions =  _self.deailData.promotions;
-                    _self.promotionsId = _self.deailData.promotions.id;
+                    }else {
+                        _self.allTotalPrice = _self.number * _self.priceObj.price;
+                    }
+                    if(r.data.actStatus==1){
+                        _self.promotions =  r.data.promotions;
+                        _self.promotionsId = r.data.promotions.id;
                     }
-
                 }
             });
         },
@@ -114,12 +114,12 @@ var productDetail = new Vue({
         },
         changeCountAdd:function () { //数量增加按钮
             var _this = this;
-            if(_this.buyRetailPriceStep == 2){
+            if(_this.priceObj.step == 2){
                 _this.number += _this.minBuyNumber
             }else{
                 _this.number++
             }
-            _this.allTotalPrice = _this.number * _this.deailData.price;
+            _this.allTotalPrice = _this.number * _this.priceObj.price;
             _this.calculatPerice()
         },
         changeCountSub:function(){//popup弹窗数量减按钮
@@ -133,12 +133,12 @@ var productDetail = new Vue({
                          });
 					return
 				}else{
-					if(_this.buyRetailPriceStep == 2){
+					if(_this.priceObj.step == 2){
 						_this.number-=_this.minBuyNumber
 					}else{
 						_this.number--
 					}
-					_this.allTotalPrice = _this.number * _this.deailData.price;
+					_this.allTotalPrice = _this.number * _this.priceObj.price;
 					_this.calculatPerice();
 					_this.isQuantity =false
 				}
@@ -156,21 +156,21 @@ var productDetail = new Vue({
 					_this.number = _this.minBuyNumber
 				}else{
 					_this.number = e.detail.value;
-					_this.allTotalPrice = _this.number * _this.deailData.price;
+					_this.allTotalPrice = _this.number * _this.priceObj.price;
 					_this.calculatPerice();
 				}
 			},
         calculatPerice:function(){//判断是否为阶梯价然后做计算价格处理
               var _this = this;
-				if(_this.deailData.ladderPriceFlag == '1'){
+				if(_this.priceObj.ladderPriceFlag == '1'){
 					_this.ladderList.forEach(function (item,index) {
 						if(_this.number>=item.buyNum){
-							_this.buyRetailPrice = item.buyPrice
+							_this.priceObj.price = item.buyPrice
 							_this.allTotalPrice = _this.number*item.buyPrice
 						}
 					})
 				}else{
-					_this.buyRetailPrice = _this.deailData.price;
+					_this.priceObj.price = _this.priceObj.price;
 				}
 			},
 		addShopCart:function(){ //加入购物车
@@ -226,8 +226,8 @@ var productDetail = new Vue({
                    _self.ladderList =r.data;
                    _self.ladderList.forEach(function (item,index) {
 						if(_self.number>=item.buyNum){
-							_self.buyRetailPrice = item.buyPrice
-							_self.allTotalPrice = _self.buyRetailPrice*_self.number;
+							_self.priceObj.price = item.buyPrice
+							_self.allTotalPrice = _self.priceObj.price*_self.number;
 						}
 					})
 

+ 17 - 26
src/main/resources/templates/index.html

@@ -48,7 +48,7 @@
     <!--页面主体数据-->
     <div class="wrap">
         <div>
-            <div class="floorTit">
+            <div class="floorTit toLogin">
                 <h2 v-for="item in pageFloors" v-if="item.type==1" v-text="item.title" data-id="1"></h2>
                 <h2 v-else-if="pageFloors.length==0" data-id="1">推荐专区</h2>
             </div>
@@ -65,42 +65,33 @@
                                     <span v-html="p.name"></span>
                                 </a>
                                 <div class="price mfhc">
-                                    <template v-if="userId && userId>0">
+                                    <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                        <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                         <template v-if="p.priceFlag==1">
-                                            <em >¥价格未公开</em>
-                                             <div class="btnBox" v-if="isPC">
-                                                <a href="javascript:0" class="pricebox">价格未公开,请联系 0755-22907771</a>
+                                            <em>¥价格未公开</em>
+                                            <div class="btnBox">
+                                                <a href="javascript:void(0)" class="btn cat">价格未公开,请联系 0755-22907771</a>
                                             </div>
                                         </template>
                                         <template v-else>
-<!--                                            <em v-if="!p.priceLoaded">正在获取价格...</em>-->
-                                            <template v-if="p.priceFlag==2 && p.userIdentity!=2">
+                                            <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
+                                                <em class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
+                                                <span class="listTag" v-if="p.actStatus==1">{{p.promotions.name}}</span>
+                                            </template>
+                                            <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
                                                 <em>¥会员可见</em>
-                                                <div class="btnBox" v-if="isPC">
-                                                    <a href="javascript:void(0)" class="btn add" @click="upgrade">升级会员查看价格</a>
+                                                <div class="btnBox">
+                                                    <a href="/upgrade.html" class="btn">升级会员查看价格</a>
                                                 </div>
                                             </template>
-                                            <em v-else class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
-                                            <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
-                                            <template  v-else-if="p.userIdentity==3">
-                                                <em class="p" v-if="p.supplierId==shopID" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
-                                                <em v-else>
-                                                    <span class="rmb">¥</span>
-                                                    <i :class="'icon mIcon i'+p.priceGrade"></i>
-                                                 </em>
+                                            <template v-else>
+                                                <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                             </template>
                                         </template>
-
                                     </template>
                                     <template v-else>
-                                       <em >
-                                             <span class="rmb">¥</span>
-                                             <i :class="'icon mIcon i'+p.priceGrade"></i>
-                                        </em>
-                                        <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
-                                         <div class="btnBox">
-                                            <a href="javascript:void(0);" class=" btn add" @click="toLogin">登录查看价格</a>
-                                        </div>
+                                        <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
+                                        <div class="btnBox"><a href="javascript:void(0)" class="btn add toLogin">登录查看价格</a></div>
                                     </template>
                                 </div>
                             </div>

+ 24 - 29
src/main/resources/templates/product/detail.html

@@ -50,31 +50,26 @@
                 </p>
                 <div class="detail">
                     <div class="row"><span class="l">采美价</span><i>:</i>
-                    <template v-if="userId && userId>0">
-                       <em v-if="priceFlag==1" class="pricedeail">¥价格未公开</em>
-                       <template v-else>
-                            <template v-if="priceFlag==2 && userIdentity!=2">
-                                <em style="font-weight: bold" class="pricedeail">¥会员可见</em>
+                        <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                            <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
+                            <em v-if="priceObj.priceFlag==1">¥价格未公开</em>
+                            <em v-else-if="priceObj.priceFlag==2 && priceObj.userIdentity!=2">¥会员可见</em>
+                            <template v-else-if="priceObj.priceFlag==0 || priceObj.userIdentity==2 || (priceObj.userIdentity==3 && priceObj.supplierId==GLOBAL_SHOP_ID)">
+                                <em class="p" v-text="'¥'+parseFloat(priceObj.price).toFixed(2)"></em>
                             </template>
-                            <em v-else class="price pricedeail" :class="promotions.type==1&&promotions.mode==1?'original-price':''">¥{{buyRetailPrice}}</em>
+                            <em v-else>¥<i :class="'icon mIcon i'+priceObj.priceGrade"></i></em>
                         </template>
-                    </template>
-                    <template v-else>
-                        <em class="price">
-                        <span class="priceicon">¥</span>
-                            <i th:class="'icon mIcon i'+*{priceGrade}"></i>
-                        </em>
-                    </template>
+                        <em v-else>¥<i :class="'icon mIcon i'+priceObj.priceGrade"></i></em>
                     </div>
-                    <template  v-if="priceFlag!=2  && userIdentity!=2 ">
+                    <template v-if="priceObj.priceFlag!=2 && priceObj.userIdentity!=2">
                         <div class="row"> <span class="l">市场价</span><i>:</i>
-                             <em class="pricedeail" :class="deailData.actStatus==1?'original-price':''">¥{{buyRetailPrice}}</em>
+                             <em class="pricedeail" :class="priceObj.actStatus==1?'original-price':''">¥{{priceObj.costPrice}}</em>
                         </div>
                     </template>
-                    <div class="row" v-if="deailData.actStatus==1||deailData.ladderPriceFlag==1" ><span class="l">促销</span><i>:</i>
-                        <template v-if="userId && userId>0">
+                    <div class="row" v-if="priceObj.actStatus==1||priceObj.ladderPriceFlag==1" ><span class="l">促销</span><i>:</i>
+                        <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                             <!-- 阶梯价 -->
-                            <div v-if="deailData.ladderPriceFlag==1" class="priceTag">
+                            <div v-if="priceObj.ladderPriceFlag==1" class="priceTag">
                                 <i class="tag icon mIcon" @click="toggleThisLadder($event)">阶梯价格</i>
                                 <div class="ladder mFixed">
                                     <span>
@@ -88,7 +83,7 @@
                                 </div>
                             </div>
                             <!-- 促销活动 -->
-                            <div v-if="deailData.actStatus==1 && promotions" class="priceTag">
+                            <div v-if="priceObj.actStatus==1 && promotions" class="priceTag">
                                 <i v-if="promotions.type==1 && promotions.mode==1" @click="toggleThisLadder($event)" class="tag icon mIcon" v-text="promotions.name+':¥'+toFloat(promotions.touchPrice)"></i>
                                 <i v-else class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="promotions?promotions.name:''"></i>
                                 <div class="promotion mFixed">
@@ -117,13 +112,13 @@
                         </template>
                         <!-- 登录 -->
                         <template v-else>
-                            <div v-if="deailData.ladderPriceFlag==1 || deailData.actStatus==1" class="priceTag">
-                                <i v-if="deailData.ladderPriceFlag==1" class="tag icon mIcon" @click="toggleThisLadder($event)">阶梯价格</i>
-                                <i v-if="deailData.actStatus==1" class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="promotions?promotions.name:''"></i>
+                            <div v-if="priceObj.ladderPriceFlag==1 || priceObj.actStatus==1" class="priceTag">
+                                <i v-if="priceObj.ladderPriceFlag==1" class="tag icon mIcon" @click="toggleThisLadder($event)">阶梯价格</i>
+                                <i v-if="priceObj.actStatus==1" class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="promotions?promotions.name:''"></i>
                                 <div class="promotion mFixed">
                                     <div>
-                                        <p v-if="deailData.ladderPriceFlag==1"><em @click="toLogin">登录</em>,享受阶梯价格优惠</p>
-                                        <p v-if="deailData.actStatus==1"><em @click="toLogin">登录</em>,参与促销活动</p>
+                                        <p v-if="priceObj.ladderPriceFlag==1"><em @click="toLogin">登录</em>,享受阶梯价格优惠</p>
+                                        <p v-if="priceObj.actStatus==1"><em @click="toLogin">登录</em>,参与促销活动</p>
                                         <p class="r"><a class="close" @click="hideThisLadder($event)" href="JavaScript:void(0);">了解</a></p>
                                     </div>
                                 </div>
@@ -135,10 +130,10 @@
                     <div class="row"><span class="l">商品编码</span><i>:</i><em th:text="*{productCode}"></em></div>
                     <div class="row"><span class="l">库存</span><i>:</i><em th:text="*{stock}"></em></div>
                     <div class="row"><span class="l">起批量</span><i>:</i><em th:text="*{minBuyNumber}"></em></div>
-                    <div class="row" v-if="priceFlag== 0 && userIdentity !=2"><span class="l" >采购量</span><i>:</i>
+                    <div class="row" v-if="priceObj.priceFlag== 0 && userIdentity !=2"><span class="l" >采购量</span><i>:</i>
                         <span class="number">
                             <em class="sub" @click="changeCountSub" :class="[isQuantity==true?'disabled':'']">-</em>
-                            <input type="number" v-model="number" maxlength='6' @blur="changeNumber($event)" >
+                            <input type="number" v-model="priceObj.minBuyNumber" maxlength='6' @blur="changeNumber($event)" >
                             <em class="add" @click="changeCountAdd" :class="[isStock==true?'disabled':'']">+</em>
                         </span>
                         <input type="hidden" th:value="*{step}">
@@ -150,11 +145,11 @@
                         <em class="ser icon mIcon">正品保证</em>
                     </div>
                 </div>
-               <template v-if="userId && userId>0">
-                   <div  class="btnBox" v-if="priceFlag==2 && userIdentity!=2">
+               <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                   <div  class="btnBox" v-if="priceObj.priceFlag==2 && userIdentity!=2">
                       <a class="upgrade" @click="clubupgrade" href="javascript:0">升级会员查看价格</a>
                    </div>
-                    <div class="btnBox" v-else-if="priceFlag==0">
+                    <div class="btnBox" v-else-if="priceObj.priceFlag==0">
                         <a href="javascript:void(0);" class="cart icon" @click='addShopCart()'>加入购物车</a>
                         <a href="javascript:void(0);" class="buy" @click="buyNowSubmit()">立即购买</a>
                     </div>

+ 16 - 25
src/main/resources/templates/product/list.html

@@ -109,42 +109,33 @@
                         <span v-html="p.name"></span>
                     </a>
                     <div class="price mfhc">
-                        <template v-if="userId && userId>0">
+                        <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                            <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                             <template v-if="p.priceFlag==1">
-                                <em >¥价格未公开</em>
-                                 <div class="btnBox " v-if="isPC">
-                                    <a href="javascript:0" class="pricebox">价格未公开,请联系 0755-22907771</a>
+                                <em>¥价格未公开</em>
+                                <div class="btnBox">
+                                    <a href="javascript:void(0)" class="btn cat">价格未公开,请联系 0755-22907771</a>
                                 </div>
                             </template>
                             <template v-else>
-                                <em v-if="!p.priceLoaded">正在获取价格...</em>
-                                <template v-else-if="p.priceFlag ==2 && p.userIdentity!=2">
+                                <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
+                                    <em class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
+                                    <span class="listTag" v-if="p.actStatus==1">{{p.promotions.name}}</span>
+                                </template>
+                                <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
                                     <em>¥会员可见</em>
-                                    <div class="btnBox" v-if="isPC">
-                                        <a href="javascript:void(0)" class="btn add" @click="upgrade">升级会员查看价格</a>
+                                    <div class="btnBox">
+                                        <a href="/upgrade.html" class="btn">升级会员查看价格</a>
                                     </div>
                                 </template>
-                                <em v-else class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)" ></em>
-                                <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
-                                <a href="javascript:void(0);" class="login-btn" v-else-if="p.ladderPriceFlag==1">阶梯价格</a>
-                                 <template  v-else-if="p.userIdentity==3">
-                                    <em class="p" v-if="p.supplierId==shopID" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
-                                    <em v-else>
-                                        <span class="rmb">¥</span>
-                                        <i :class="'icon mIcon i'+p.priceGrade"></i>
-                                    </em>
+                                <template v-else>
+                                    <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                 </template>
                             </template>
                         </template>
                         <template v-else>
-                            <em>
-                                <span class="rmb">¥</span>
-                                <i :class="'icon mIcon i'+p.priceGrade"></i>
-                            </em>
-                             <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
-                            <div class="btnBox">
-                              <a href="javascript:void(0)" @click="toLogin" class="btn add">登录查看价格</a>
-                            </div>
+                            <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
+                            <div class="btnBox"><a href="javascript:void(0)" class="btn add toLogin">登录查看价格</a></div>
                         </template>
                     </div>
                 </div>

+ 41 - 33
src/main/resources/templates/supplier/index.html

@@ -57,29 +57,33 @@
                                     <span v-html="p.name"></span>
                                 </a>
                                 <div class="price mfhc">
-                                    <template v-if="userId && userId>0">
-                                        <em v-if="p.priceFlag==1">¥未公开价格</em>
-                                        <div class="btnBox " v-if="p.priceFlag==1" >
-                                              <a href="javascript:0" class="pricebox">价格未公开,请联系 0755-22907771</a>
-                                        </div>
+                                    <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                        <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
+                                        <template v-if="p.priceFlag==1">
+                                            <em>¥价格未公开</em>
+                                            <div class="btnBox">
+                                                <a href="javascript:void(0)" class="btn cat">价格未公开,请联系 0755-22907771</a>
+                                            </div>
+                                        </template>
                                         <template v-else>
-                                            <em v-if="!p.priceLoaded">正在获取价格...</em>
-                                             <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
-                                                <em >¥会员可见</em>
-                                                <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
+                                            <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
+                                                <em class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
+                                                <span class="listTag" v-if="p.actStatus==1">{{p.promotions.name}}</span>
+                                            </template>
+                                            <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
+                                                <em>¥会员可见</em>
                                                 <div class="btnBox">
-                                                       <a href="javascript:void(0)" class="btn add" @click="upgrade">升级会员查看价格</a>
-                                                 </div>
+                                                    <a href="/upgrade.html" class="btn">升级会员查看价格</a>
+                                                </div>
+                                            </template>
+                                            <template v-else>
+                                                <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                             </template>
-                                            <em v-else class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
                                         </template>
                                     </template>
                                     <template v-else>
-                                        <em><span class="rmb">¥</span><i :class="'icon mIcon i'+p.priceGrade"></i></em>
-                                        <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
-                                        <div class="btnBox">
-                                            <a href="javascript:void(0)" @click="toLogin" class="btn add">登录查看价格</a>
-                                        </div>
+                                        <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
+                                        <div class="btnBox"><a href="javascript:void(0)" class="btn add toLogin">登录查看价格</a></div>
                                     </template>
                                 </div>
                             </div>
@@ -100,29 +104,33 @@
                                     <span v-html="p.name"></span>
                                 </a>
                                 <div class="price mfhc">
-                                    <template v-if="userId && userId>0">
-                                        <em v-if="p.priceFlag==1">价格未公开¥</em>
-                                        <div class="btnBox " v-if="p.priceFlag==1" >
-                                              <a href="javascript:0" class="pricebox">价格未公开,请联系 0755-22907771</a>
-                                        </div>
+                                    <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                        <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
+                                        <template v-if="p.priceFlag==1">
+                                            <em>¥价格未公开</em>
+                                            <div class="btnBox">
+                                                <a href="javascript:void(0)" class="btn cat">价格未公开,请联系 0755-22907771</a>
+                                            </div>
+                                        </template>
                                         <template v-else>
-                                            <em v-if="!p.priceLoaded">正在获取价格...</em>
+                                            <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
+                                                <em class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
+                                                <span class="listTag" v-if="p.actStatus==1">{{p.promotions.name}}</span>
+                                            </template>
                                             <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
-                                                <em >¥会员可见</em>
-                                                <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
+                                                <em>¥会员可见</em>
                                                 <div class="btnBox">
-                                                       <a href="javascript:void(0)" class="btn add" @click="upgrade">升级会员查看价格</a>
-                                                 </div>
+                                                    <a href="/upgrade.html" class="btn">升级会员查看价格</a>
+                                                </div>
+                                            </template>
+                                            <template v-else>
+                                                <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                             </template>
-                                            <em v-else class="p" v-text="'¥'+parseFloat(p.price).toFixed(2)"></em>
                                         </template>
                                     </template>
                                     <template v-else>
-                                        <em><span class="rmb">¥</span><i :class="'icon mIcon i'+p.priceGrade"></i></em>
-                                        <a href="javascript:void(0);" class="login-btn" v-if="p.actStatus==1">{{p.promotions.name}}</a>
-                                        <div class="btnBox">
-                                            <a href="javascript:void(0);" class=" btn add" @click="toLogin">登录查看价格</a>
-                                        </div>
+                                        <em>¥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
+                                        <div class="btnBox"><a href="javascript:void(0)" class="btn add toLogin">登录查看价格</a></div>
                                     </template>
                                 </div>
                             </div>