Explorar el Código

Merge remote-tracking branch 'origin/developerB' into developer

zhengjinyi hace 2 años
padre
commit
82bbeb6c51

+ 8 - 0
src/main/java/com/caimei/www/mapper/SupplierDao.java

@@ -20,5 +20,13 @@ public interface SupplierDao {
      * @return
      */
     SupplierDetail getSupplierById(Integer supplierId);
+    /**
+     * 公司资质照片
+     */
+    List<String> getShopCertById(Integer shopId, int shopCertTypeId);
+    /**
+     * 医疗器械经营许可
+     */
+    String medicalPracticeLicense(Integer shopId);
 
 }

+ 16 - 0
src/main/java/com/caimei/www/pojo/page/SupplierDetail.java

@@ -38,6 +38,22 @@ public class SupplierDetail implements Serializable {
     private String productDesc;
     /** 网站 */
     private String site;
+    /**
+     * 医疗器械经营许可
+     */
+    private String medicalPracticeLicense;
+    /**
+     * 公司资质照片1
+     */
+    private String medicalPracticeLicenseImg1;
+    /**
+     * 公司资质照片2
+     */
+    private String medicalPracticeLicenseImg2;
+    /**
+     * 公司资质照片3
+     */
+    private String medicalPracticeLicenseImg3;
 
     private static final long serialVersionUID = 1L;
 }

+ 15 - 0
src/main/java/com/caimei/www/service/page/impl/SupplierServiceImpl.java

@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * Description
@@ -36,6 +37,20 @@ public class SupplierServiceImpl implements SupplierService {
         if (!StringUtils.isEmpty(supplier.getBusinessScope())) {
             String[] businessScope = supplier.getBusinessScope().split("/");
             supplier.setBusinessScopeArr(businessScope);
+            supplier.setMedicalPracticeLicense(supplierDao.medicalPracticeLicense(supplierId));
+        }
+        //公司资质照片
+        List<String> productionLicence = supplierDao.getShopCertById(supplierId, 2);
+        if (null != productionLicence && productionLicence.size() > 0) {
+            supplier.setMedicalPracticeLicenseImg1(productionLicence.get(0));
+        }
+        List<String> hygienicLicense = supplierDao.getShopCertById(supplierId, 5);
+        if (null != hygienicLicense && hygienicLicense.size() > 0) {
+            supplier.setMedicalPracticeLicenseImg2(hygienicLicense.get(0));
+        }
+        List<String> taxLicense = supplierDao.getShopCertById(supplierId, 6);
+        if (null != taxLicense && taxLicense.size() > 0) {
+            supplier.setMedicalPracticeLicenseImg3(taxLicense.get(0));
         }
         return supplier;
     }

+ 6 - 0
src/main/resources/mapper/SupplierMapper.xml

@@ -18,5 +18,11 @@
         from shop s
         where shopID = #{supplierId}
     </select>
+    <select id="getShopCertById" resultType="java.lang.String">
+        SELECT image FROM shopcert WHERE shopID = #{shopId} AND shopCertTypeID = #{shopCertTypeId}
+    </select>
+    <select id="medicalPracticeLicense" resultType="java.lang.String">
+        SELECT medicalPracticeLicenseImg1 FROM shop WHERE shopID = #{shopId}
+    </select>
 
 </mapper>

+ 6 - 2
src/main/resources/static/css/product/detail.h5.css

@@ -95,8 +95,12 @@ li{list-style:none}
 .productInfo .tabCon img{max-width:100%;height:auto!important;}
 .productInfo .tabCon table{width:100%;text-align:left}
 .productInfo .tabCon td{padding:1.5vw;line-height:5vw}
-.productInfo .tabCon td:nth-of-type(1){width:20%;color:#93979F}
-.productInfo .tabCon td:nth-of-type(2){width:80%;color:#4A4F58}
+.productInfo .tabCon td a{color: #4688fa;}
+.productInfo .tabCon td:nth-of-type(1){width:33.3%;color:#93979F}
+.productInfo .tabCon td:nth-of-type(2){width:33.3%;color:#93979F}
+.productInfo .tabCon td:nth-of-type(3){width:33.3%;color:#93979F}
+.productInfo .tabCon td a{color:#4688fa}
+.productInfo .product-qualificationTable{margin-bottom: 3vw;}
 .tabCon .item div p{line-height: 6vw;text-align: left;font-size:3.3vw}
 .tabCon .item div p.tl{line-height:8vw;text-align: left; font-weight: bold;}
 .productInfo .comment{color:#93979F;padding:5vw 0;    margin-right: 25px;position: relative}

+ 6 - 2
src/main/resources/static/css/product/detail.pc.css

@@ -158,9 +158,13 @@ li{list-style:none;}
 .productInfo .tabCon img{max-width:100%;}
 .productInfo .tabCon table{width:100%;text-align:left}
 .productInfo .tabCon td{padding:10px 12px;line-height:20px}
-.productInfo .tabCon td:nth-of-type(1){width:20%;color:#93979F}
-.productInfo .tabCon td:nth-of-type(2){width:80%;color:#4A4F58}
+.productInfo .tabCon td a{color: #4688fa;}
+.productInfo .tabCon td:nth-of-type(1){width:30%;color:#93979F}
+.productInfo .tabCon td:nth-of-type(2){width:40%;color:#93979F}
+.productInfo .tabCon td:nth-of-type(3){width:30%;color:#93979F}
+.productInfo .tabCon td a{color:#4688fa}
 .productInfo .comment{color:#93979F;padding:40px 0;margin-right: 30px; position: relative}
+.productInfo .product-qualificationTable{margin-bottom: 15px;}
 .productInfo .product-qualificationImg{width: 100%;height: auto;}
 .productInfo .product-qualificationImg image{width: 100%;height: auto;display: block;}
 .wrap>.rgt{float:right;width:284px}

+ 58 - 16
src/main/resources/static/js/supplier-center/shop/release.js

@@ -59,6 +59,9 @@ var releaseContainer = new Vue({
             trainingType:0,// 售价包含培训费用
             trainingFee:'',
             newProductType:0,// 新品商品状态  1.参与 2.未参与
+            qualificationNo:'',//资质证书编号
+            productName:'',//资质产品名称
+            qualificationTime:'',//证书有效日期
         },
         params:{
             param:[],//相关参数
@@ -138,6 +141,9 @@ var releaseContainer = new Vue({
         vShow_attribute:false,
         vShow_trainingMethod:false,
         vShow_trainingType:false,
+        vShow_QualificationNo:false,
+        vShow_ProductName:false,
+        vShow_QualificationTime:false,
     },
     computed: {
 
@@ -171,6 +177,9 @@ var releaseContainer = new Vue({
                     _this.releaseParams.step = data.step;
                     _this.releaseParams.byFlag = data.byFlag;
                     _this.releaseParams.allAreaFlag = data.allAreaFlag;
+                    _this.releaseParams.productName = data.productName;
+                    _this.releaseParams.qualificationNo = data.qualificationNo;
+                    _this.releaseParams.qualificationTime = data.qualificationTime;
                     _this.releaseParams.newProductType = data.newProductType;
                     _this.releaseParams.detailInfo = data.productDetail.detailInfo;
                     _this.releaseParams.serviceInfo = data.productDetail.serviceInfo;
@@ -792,7 +801,7 @@ var releaseContainer = new Vue({
                     _this.scrollIntoView();
                     setTimeout(function(){
                         _this.vShow_GoodsType = false;
-                    },2000);
+                    },3000);
                     return;
                 }
                 if(_this.releaseParams.qualificationImg == ''){
@@ -801,7 +810,34 @@ var releaseContainer = new Vue({
                     _this.scrollIntoView();
                     setTimeout(function(){
                         _this.vShow_QualificationImg = false;
-                    },2000);
+                    },3000);
+                    return;
+                }
+                if(_this.releaseParams.qualificationNo == ''){
+                    _this.vShow_QualificationNo = true;
+                    _this.fromMessage = '请输入证书编号';
+                    _this.scrollIntoView();
+                    setTimeout(function(){
+                        _this.vShow_QualificationNo = false;
+                    },3000);
+                    return;
+                }
+                if(_this.releaseParams.productName == ''){
+                    _this.vShow_ProductName = true;
+                    _this.fromMessage = '请输入产品名称';
+                    _this.scrollIntoView();
+                    setTimeout(function(){
+                        _this.vShow_ProductName = false;
+                    },3000);
+                    return;
+                }
+                if(_this.releaseParams.qualificationTime == ''){
+                    _this.vShow_QualificationTime = true;
+                    _this.fromMessage = '请选择证书有效期';
+                    _this.scrollIntoView();
+                    setTimeout(function(){
+                        _this.vShow_QualificationTime = false;
+                    },3000);
                     return;
                 }
             }
@@ -812,7 +848,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_Tags = false;
-                },2000);
+                },3000);
                 return;
             }else{
                 _this.tagsList.forEach(function(el){
@@ -825,7 +861,7 @@ var releaseContainer = new Vue({
                 _this.fromMessage = '请输入包装规格';
                 setTimeout(function(){
                     _this.vShow_Unit = false;
-                },2000);
+                },3000);
                 _this.scrollIntoView();
                 return;
             }
@@ -852,7 +888,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_NormalPrice = false;
-                },2000);
+                },3000);
                 return
             }
             if(_this.releaseParams.normalPrice == 0){
@@ -861,7 +897,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_NormalPrice = false;
-                },2000);
+                },3000);
                 return
             }
             if(_this.releaseParams.price == ''){
@@ -870,7 +906,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_price = false;
-                },2000);
+                },3000);
                 return;
             }
             if(_this.releaseParams.price == 0){
@@ -879,7 +915,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_price = false;
-                },2000);
+                },3000);
                 return;
             }
             if(_this.releaseParams.includedTax == 3){
@@ -888,7 +924,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_includedTax = false;
-                },2000);
+                },3000);
                 return;
             }
             if(_this.releaseParams.minBuyNumber === ''){
@@ -897,7 +933,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_MinBuyNumber = false;
-                },2000);
+                },3000);
                 return;
             }
             if(_this.releaseParams.stock === ''){
@@ -906,7 +942,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_Stock = false;
-                },2000);
+                },3000);
                 return;
             }
             if(_this.releaseParams.minBuyNumber > _this.releaseParams.stock){
@@ -915,7 +951,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_MinBuyNumber = false;
-                },2000);
+                },3000);
                 return;
             }
             if(_this.releaseParams.areaFlag == '0'){
@@ -929,7 +965,7 @@ var releaseContainer = new Vue({
                     _this.fromMessage = '请选择指定区域';
                     setTimeout(function(){
                         _this.vShow_isProvince = false;
-                    },2000);
+                    },3000);
                     return;
                 }
             }
@@ -1028,7 +1064,7 @@ var releaseContainer = new Vue({
                 _this.scrollIntoView();
                 setTimeout(function(){
                     _this.vShow_isNewProductType = false;
-                },2000);
+                },3000);
                 return;
             }
             _this.releaseParams.orderInfo = orderInfoEditor.getData();
@@ -1083,7 +1119,7 @@ var releaseContainer = new Vue({
                 _this.fromMessage = '请输入商品显示名';
                 setTimeout(function(){
                     _this.vShow_Name = false;
-                },2000);
+                },3000);
             }else{
                 _this.vShow_Name = false;
             }
@@ -1096,7 +1132,7 @@ var releaseContainer = new Vue({
                 _this.fromMessage = '请输入内部商品名';
                 setTimeout(function(){
                     _this.vShow_AliasName = false;
-                },2000);
+                },3000);
             }else{
                 _this.vShow_AliasName = false;
             }
@@ -1116,6 +1152,12 @@ var releaseContainer = new Vue({
         blur_aliasUnit: function(e){
             this.vShow_Unit = false;
         },
+        blur_qualificationNo: function(e){
+            this.vShow_QualificationNo = false;
+        },
+        blur_productName: function(e){
+            this.vShow_ProductName = false;
+        },
         input_normalPrice: function(e){
             this.vShow_NormalPrice = false;
         },

+ 16 - 0
src/main/resources/templates/product/detail.html

@@ -586,6 +586,22 @@
                     </div>
                 </div>
                 <div class="item" v-if="tabsIndex == 5">
+                    <div class="product-qualificationTable">
+                        <table border="1">
+                            <tr>
+                                <td>证书编号</td>
+                                <td>产品名称</td>
+                                <td>详情</td>
+                            </tr>
+                            <tr>
+                                <td>{{ product.qualificationNo }}</td>
+                                <td>{{ product.productName }}</td>
+                                <td>
+                                    <a target="_blank" :href="product.qualificationLink">查看</a>
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
                     <div class="product-qualificationImg">
                         <img :src="product.qualificationImg" alt="">
                     </div>

+ 15 - 0
src/main/resources/templates/supplier-center/shop/release.html

@@ -203,6 +203,21 @@
                                 </div>
                                 <div class="release-tips" v-show="vShow_QualificationImg">{{fromMessage}}</div>
                             </div>
+                            <div class="release-from clear" v-if="releaseParams.productType == 2">
+                                <div class="release-label"><span class="star">*</span>证书编号:</div>
+                                <div class="release-input"><input class="input" v-model="releaseParams.qualificationNo" maxlength="50" type="text" placeholder="请完整输入证书上的编号" @blur="blur_qualificationNo"></div>
+                                <div class="release-tips" v-show="vShow_QualificationNo">{{fromMessage}}</div>
+                            </div>
+                            <div class="release-from clear" v-if="releaseParams.productType == 2">
+                                <div class="release-label"><span class="star">*</span>产品名称:</div>
+                                <div class="release-input"><input class="input" v-model="releaseParams.productName" maxlength="50" type="text" placeholder="请输入证书上的产品名称" @blur="blur_productName"></div>
+                                <div class="release-tips" v-show="vShow_ProductName">{{fromMessage}}</div>
+                            </div>
+                            <div class="release-from clear" v-if="releaseParams.productType == 2" id="EffectiveDate">
+                                <div class="release-label"><span class="star">*</span>证书有效期:</div>
+                                <div class="release-input"><input class="input" type="date"  style="width: 220px;" v-model="releaseParams.qualificationTime" maxlength="40" required="required"></div>
+                                <div class="release-tips" v-show="vShow_QualificationTime">{{fromMessage}}</div>
+                            </div>
                             <div class="release-from none clear">
                                 <div class="release-label"><span class="star">*</span>商品标签:</div>
                                 <div class="release-input">

+ 12 - 3
src/main/resources/templates/supplier/index.html

@@ -158,10 +158,19 @@
                 <div class="part" >
                     <div class="title">公司资质</div>
                     <div class="photo">
-                        <a th:href="${supplier.taxCertificate}" target="_blank" th:if="not${#strings.isEmpty(supplier.taxCertificate)}">
-                            <img th:src="${supplier.taxCertificate}">
+                        <a th:href="${supplier.medicalPracticeLicense}" target="_blank" th:if="not${#strings.isEmpty(supplier.medicalPracticeLicense)}">
+                            <img th:src="${supplier.medicalPracticeLicense}">
                         </a>
-                         <div class="cont" th:if="${#strings.isEmpty(supplier.taxCertificate)}">暂无</div>
+                        <a th:href="${supplier.medicalPracticeLicenseImg1}" target="_blank" th:if="not${#strings.isEmpty(supplier.medicalPracticeLicenseImg1)}">
+                            <img th:src="${supplier.medicalPracticeLicenseImg1}">
+                        </a>
+                        <a th:href="${supplier.medicalPracticeLicenseImg2}" target="_blank" th:if="not${#strings.isEmpty(supplier.medicalPracticeLicenseImg2)}">
+                            <img th:src="${supplier.medicalPracticeLicenseImg2}">
+                        </a>
+                        <a th:href="${supplier.medicalPracticeLicenseImg3}" target="_blank" th:if="not${#strings.isEmpty(supplier.medicalPracticeLicenseImg3)}">
+                            <img th:src="${supplier.medicalPracticeLicenseImg3}">
+                        </a>
+                         <div class="cont" th:if="${#strings.isEmpty(supplier.medicalPracticeLicenseImg1)}">暂无</div>
                     </div>
                 </div>
                 <div class="part" >