喻文俊 3 anni fa
parent
commit
a36ec1b3a7

+ 18 - 1
src/main/resources/static/js/account/register-club.js

@@ -76,10 +76,16 @@ var registerPage = new Vue({
             license: '^[a-zA-Z0-9_]{18}$',
             email: '^(([^<>()\\[\\]\\\\.,;:\\s@&quot;]+(\\.[^<>()\\[\\]\\\\.,;:\\s@&quot;]+)*)|(&quot;.+&quot;))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$',
             password: "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$"
-        }
+        },
+        medicalPracticeLicenseFlag: false
     },
     computed: {
 
+    },
+    watch: {
+        userMainPros: function(){
+            $('#business').parent().find('.errTips').removeClass("show");
+        }
     },
     methods: {
         handleChangeType: function(type){
@@ -211,6 +217,11 @@ var registerPage = new Vue({
                     $('#firstClubType').siblings('.errTips').text('请选择机构类型').addClass("show");
                     return  false;
                 }
+                if(!_self.clubUpgradeUser.firstClubType){
+                    $('#firstClubType').parent().addClass("error");
+                    $('#firstClubType').siblings('.errTips').text('请选择机构类型').addClass("show");
+                    return  false;
+                }
                 if(Number(_self.clubUpgradeUser.firstClubType) == 1){
                     if(!_self.clubUpgradeUser.medicalPracticeLicense){
                         $('#formmedicalPracticeLicenseImage').parent().addClass("error").find('.checked').removeClass("show");
@@ -218,6 +229,10 @@ var registerPage = new Vue({
                         return  false;
                     }
                 }
+                if(_self.userMainPros.length === 0){
+                    $('#business').siblings('.errTips').text('请选择或添加主营产品').addClass("show");
+                    return false;
+                }
                 _self.clubUpgradeUser.mainProduct = _self.userMainPros.join("/");
                 _self.loginLoading = true;
                 UserApi.ClubUpgrade(_self.clubUpgradeUser,function (response) {
@@ -345,6 +360,8 @@ var registerPage = new Vue({
             var file = inputDOM.files;
             _this.formData.append('file', file[0]);
             PublicApi.uploadimg(_this.formData,function(response){
+                $('#formmedicalPracticeLicenseImage').parent().removeClass("error");
+                $('#formmedicalPracticeLicenseImage').siblings('.errTips').removeClass("show");
                 _this.clubUpgradeUser.medicalPracticeLicense = response.data;
                 event.target.value = '';
             });

+ 9 - 21
src/main/resources/static/js/pay/caimei-pay.js

@@ -50,6 +50,7 @@ var payContainer = new Vue({
         comboInfo: [], // 会员套餐
         type: 1,
         vipMonth: 0,
+        vipRecordId: undefined
     },
     filters: {
         NumFormat :function(value) {
@@ -85,18 +86,18 @@ var payContainer = new Vue({
                     _self.payInfo.payUserType =  _self.payInfo.payLinkType == 1 ? 'ENTERPRISE' : 'USER';
                     _self.unpaidAmount = _data.orderPayLink.unpaidAmount;
                     _self.type = _data.type;
-                    _self.userName = _data.userName;
-                    _self.vipMonth = _data.orderPayLink.vipMonth;
                     if(_data.code == 0){
                         setTimeout(function () {  //支付倒计时
                             _self.countTime(_self.payInfo.payTime)
                         }, 1000);
-                        if(_self.payInfo.payOrderId !== null){
-
+                        if(_self.type === 1){
                             _self.infoPayOrderCheckoutCounter();
                         }else{
                             console.log('本次支付链接是支付超级会员');
-                            _self.fetchSuperPackage(); // 获取套餐
+                            _self.userName = _data.userName;
+                            _self.vipMonth = _data.orderPayLink.vipMonth;
+                            _self.vipRecordId = _data.orderPayLink.vipRecordId;
+                            _self.isRequest = true;
                         }
                     }else{
                         _self.isErrorShow = true;
@@ -206,17 +207,6 @@ var payContainer = new Vue({
                 }
             });
         },
-        // 获取套餐
-        fetchSuperPackage: function(){
-            var _self = this;
-            UserApi.FetchSuperPackage({}, function(response){
-                console.log(response);
-                if(response.code === 0){
-                    _self.comboInfo = response.data;
-                    _self.isRequest = true;
-                }
-            })
-        },
         PayOrderPcMallPay:function(params){//订单网银支付请求
             var _self = this;
             _self.isSubMitStatus=true;
@@ -238,11 +228,9 @@ var payContainer = new Vue({
             PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
                 _self.isPayAlert = false;
                 var data = response.data.data;
-                if(data.status === '1'){
-                    window.location.href = '/pay/success.html?pageType=www&type=success&payAmount='+ _self.payInfo.payUnpaidAmount;
-                }else{
-                    window.location.href = '/pay/success.html?pageType=www&type=error&payAmount='+ _self.payInfo.payUnpaidAmount;
-                }
+                var pageType = _self.type === 1 ? 'www' : 'vip&payFlag=1'; // 1 普通订单 2 vip订单
+                var type = data.status === '1' ? 'success' : 'error'; // 成功 or 失败
+                window.location.href = '/pay/success.html?pageType='+ pageType +'&type='+ type +'&payAmount=' + _self.payInfo.payUnpaidAmount;
             });
         },
         changeTab:function(index,item){// 选择银行

+ 10 - 3
src/main/resources/static/js/pay/caimei-success.js

@@ -15,6 +15,7 @@ var payContainer = new Vue({
         openLink:'/myaccount/orderlist--1-1.html',
         isSuccessText:'',
         refreshType: false,
+        payFlag: '',
     },
     filters: {
         NumFormat:function(value) {
@@ -51,8 +52,13 @@ var payContainer = new Vue({
                     }
                     break;
                 case 'vip':
-                    _self.linkText = '会员中心';
-                    _self.openLink = '/user/member.html';
+                    if (_self.payFlag) {
+                        _self.linkText = '采美商城首页';
+                        _self.openLink = '/index.html';
+                    } else {
+                        _self.linkText = '会员中心';
+                        _self.openLink = '/user/member.html';
+                    }
                     break;
                 default:
                     _self.linkText = '采美商城首页';
@@ -81,9 +87,10 @@ var payContainer = new Vue({
     mounted: function () {
         var _self = this;
         _self.pageType = CAIMEI.getUrlParam('pageType');
+        _self.payFlag = CAIMEI.getUrlParam('payFlag');
         _self.type = CAIMEI.getUrlParam('type');
         _self.payAmount = CAIMEI.getUrlParam('payAmount');
-        if(_self.pageType === 'vip'){
+        if(_self.pageType === 'vip' && !_self.payFlag){
             _self.refreshType = true;
         }
         _self.infoRequestBody();

+ 8 - 0
src/main/resources/static/js/user-center/setting/information.js

@@ -89,6 +89,7 @@ var informationPage = new Vue({
         secondtypeflag:false,
         mproflag:false,
         userMainProflag:false,
+        medicalPracticeLicenseFlag: false
     },
     computed: {
 
@@ -188,6 +189,13 @@ var informationPage = new Vue({
                         }, 2000);
                         return;
                     }
+                    if (!_self.clubUpgradeUser.medicalPracticeLicense) {
+                        _self.medicalPracticeLicenseFlag = true;
+                        setTimeout(function () {
+                            _self.medicalPracticeLicenseFlag = false;
+                        }, 2000);
+                        return;
+                    }
                     if (_self.userMainPros == '') {
                         _self.mproflag = true;
                         setTimeout(function () {

+ 13 - 5
src/main/resources/static/js/user-center/setting/upgrade.js

@@ -65,6 +65,7 @@ var upgradePage = new Vue({
         secondtypeflag:false,
         mproflag:false,
         userMainProflag:false,
+        medicalPracticeLicenseFlag: false
     },
     computed: {
 
@@ -154,22 +155,29 @@ var upgradePage = new Vue({
                _self.typeflag = true;
                setTimeout(function () {
                     _self.typeflag = false;
-                },2000)
+                },2000);
                return;
             }
             if(_self.clubUpgradeUser.firstClubType==1){
-                if(_self.clubUpgradeUser.secondClubType==''||_self.clubUpgradeUser.secondClubType==null){
+                if (_self.clubUpgradeUser.secondClubType == '' || _self.clubUpgradeUser.secondClubType == null) {
                     _self.secondtypeflag = true;
                     setTimeout(function () {
-                    _self.secondtypeflag = false;
-                },2000)
+                        _self.secondtypeflag = false;
+                    }, 2000);
+                    return;
+                }
+                if(!_self.clubUpgradeUser.medicalPracticeLicense){
+                    _self.medicalPracticeLicenseFlag = true;
+                    setTimeout(function () {
+                        _self.medicalPracticeLicenseFlag = false;
+                    }, 2000);
                     return;
                 }
                 if(_self.userMainPros==''){
                       _self.mproflag = true;
                      setTimeout(function () {
                         _self.mproflag = false;
-                    },2000)
+                    },2000);
                     return;
                 }
             }

+ 6 - 4
src/main/resources/templates/account/register-club.html

@@ -165,7 +165,7 @@
                 </div>
                 <div v-show="clubUpgradeUser.firstClubType == 1" class="formLine">
                     <div class="form-upload">
-                        <p>资质:</p>
+                        <p><em>*</em>资质:</p>
                         <div class="form-upload-image" v-if="clubUpgradeUser.medicalPracticeLicense!=''">
                             <img class="upload-img" :src="clubUpgradeUser.medicalPracticeLicense" alt="" id="medicalPracticeLicenseImg" @click="showViewerImageFn2()">
                             <i class="icon mIcon" @click="deleteMedicalImage()"></i>
@@ -187,7 +187,7 @@
                 </div>
                 <div class="formLine clear" v-if="clubUpgradeUser.firstClubType == 1">
                     <p><em>*</em>主营内容:</p>
-                    <p class="business clear">
+                    <p class="business clear" id="business">
                         <label v-for="pro in medicaCampNullList" class="diyBox second" >
                             <input type="checkbox" name="secondClubType" v-model="userMainPros" :value="pro.name" >
                             <i class="icon mIcon">{{pro.name}}</i>
@@ -197,12 +197,13 @@
                         <input type="text" placeholder="请输入其他自定义品项目" v-model.trim="mainProEdit">
                         <a href="javascript:void(0);" @click="mainProAdd()">确认添加</a>
                     </p>
+                    <div style="clear:both;"></div>
                     <span class="errTips icon mIcon" tips="请选择或添加主营产品"></span>
                 </div>
                 <div class="formLine clear" v-if="clubUpgradeUser.firstClubType == 2">
                     <p><em>*</em>主营内容:</p>
-                    <p class="business clear">
-                        <label v-for="pro in mentuzCampNullList" class="diyBox second">
+                    <p class="business clear" id="business">
+                        <label v-for="pro in mentuzCampNullList" class="diyBox second" @click>
                             <input type="checkbox" name="secondClubType" v-model="userMainPros" :value="pro.name" >
                             <i class="icon mIcon">{{pro.name}}</i>
                         </label>
@@ -211,6 +212,7 @@
                         <input type="text" placeholder="请输入其他自定义品项目" v-model.trim="mainProEdit">
                         <a href="javascript:void(0);" @click="mainProAdd()">确认添加</a>
                     </p>
+                    <div style="clear:both;"></div>
                     <span class="errTips icon mIcon" tips="请选择或添加主营产品"></span>
                 </div>
                 <div class="subLine">

+ 3 - 1
src/main/resources/templates/user-center/setting/information.html

@@ -136,7 +136,7 @@
                             </div>
                             <div v-show="clubUpgradeUser.firstClubType == 1" class="formLine">
                                 <div class="form-upload">
-                                    <p>资质:</p>
+                                    <p><em>*</em>资质:</p>
                                     <div class="form-upload-image" v-if="clubUpgradeUser.medicalPracticeLicense!=''&&clubUpgradeUser.medicalPracticeLicense!=null">
                                         <img class="upload-img" :src="clubUpgradeUser.medicalPracticeLicense" alt="" id="medicalPracticeLicenseImg" @click="showViewerImageFn2()">
                                         <i class="icon mIcon" @click="deleteMedicalImage()"></i>
@@ -151,6 +151,8 @@
                                     <i class="icon icon-wen"></i>
                                     <div class="wen-tips">点击图片可放大图片</div>
                                 </div>
+                                <div style="clear:both"></div>
+                                <span class="errTips icon mIcon" tips="" :class="medicalPracticeLicenseFlag?'show':''">请上传医疗执业许可证</span>
                             </div>
                             <div v-if="clubUpgradeUser.secondClubType == 2 || clubUpgradeUser.secondClubType == 3" class="formLine">
                                 <p>科室:</p>

+ 2 - 0
src/main/resources/templates/user-center/setting/upgrade.html

@@ -144,6 +144,8 @@
                                     <i class="icon icon-wen"></i>
                                     <div class="wen-tips">点击图片可放大图片</div>
                                 </div>
+                                <div style="clear:both"></div>
+                                <span class="errTips icon mIcon" tips="" :class="medicalPracticeLicenseFlag?'show':''">请上传医疗执业许可证</span>
                             </div>
                             <div v-if="clubUpgradeUser.secondClubType == 2 || clubUpgradeUser.secondClubType == 3" class="formLine">
                                 <p>科室:</p>