Administrator 4 年之前
父节点
当前提交
fd015ca86f

+ 5 - 2
src/main/resources/static/css/product/instruement.css

@@ -33,9 +33,12 @@
     .hotList div a>a{display: block;}
     .hotList div .productItem img{width: 100%;height: 164px;}
     .productItem .name {display: block;padding: 0 16px;height: 40px;line-height: 21px;vertical-align: middle;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-inline-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical}
-    .productItem .price{border: 0;}
-    .listTag{margin: 12px 8px 0 0;padding: 0 2px;}
+    .productItem .price{border: 0;box-sizing: border-box;padding: 0 8px;height: 54px;width: 100%;}
+    .productItem .price .price_text_tag{width: 100%;height: 22px;box-sizing: border-box;float: left;margin-top: 3px;}
+    .productItem .price .price_text_tag .listTag{margin: 0;float: left}
+    .productItem .price  .main_price_show{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #f94b4b;text-align: left;float: left;}
     .productItem .price .icon:before{width: 63px;}
+    .productItem .price .main_price_unde { width: 100%;height: 31px;line-height: 31px;font-size: 14px;color: #4a4f58;text-align: left;float: left;}
     .productItem .price .icon.i5:before {
         background-position: -2px -832px;
     }

+ 10 - 0
src/main/resources/static/js/product/instruement.js

@@ -20,6 +20,16 @@
 
     },
     methods:{
+         PromotionsFormat:function(promo){//促销活动类型数据处理
+            if(promo!=null){
+                if(promo.type == 1 && promo.mode == 1){
+                    return true
+                }else{
+                    return false
+                }
+            }
+            return false
+        },
         closeup:function(){
             this.showflag = false;
             document.body.style.overflow='';

+ 136 - 48
src/main/resources/templates/product/instrument.html

@@ -59,17 +59,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                           <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -107,17 +118,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                       <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                           <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -155,17 +177,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -204,17 +237,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                           <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em>¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -251,17 +295,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em >¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -297,17 +352,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -344,17 +410,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
@@ -390,17 +467,28 @@
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                     <template v-if="pros.product.price1TextFlag==1">
-                                                        <em>¥价格未公开</em>
-                                                        <span class="listTag" v-if="pros.product.actStatus==1">{{ros.product.promotions.name}}</span>
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
                                                     </template>
                                                     <template v-else>
                                                         <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                            <em class="p" v-text="'¥'+parseFloat(pros.product.retailPrice).toFixed(2)"></em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                            ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                        </div>
                                                         </template>
                                                         <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
-                                                            <em>¥会员可见</em>
-                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
                                                         </template>
                                                         <template v-else>
                                                             <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>