From 3cc624019a6687a68690d33e9bf25702b129d77a Mon Sep 17 00:00:00 2001
From: 819527061@qq.com <123456>
Date: 星期日, 07 四月 2024 17:35:35 +0800
Subject: [PATCH] 新增订单缴费弹框及其他弹框提示细节完善

---
 src/components/page/IndexXTYH.vue |  191 ++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 161 insertions(+), 30 deletions(-)

diff --git a/src/components/page/IndexXTYH.vue b/src/components/page/IndexXTYH.vue
index cc560d8..c51e302 100644
--- a/src/components/page/IndexXTYH.vue
+++ b/src/components/page/IndexXTYH.vue
@@ -7,7 +7,7 @@
         <!--</div>-->
         <div class="weizhang-main-box">
             <div class="weizhang-main-top">
-                <img class="logoPhone" src="../../assets/images/logoImg.png" alt="">
+<!--                <img class="logoPhone" src="../../assets/images/logoImg.png" alt="">-->
                 <span class="weizhang">鍋滆溅鏀惰垂</span>
                 <span class="money">锟{this.statisticData.price}}</span>
             </div>
@@ -33,26 +33,26 @@
                             {{this.statisticData.code}}
                             <!--<el-input v-model="statisticData.code" readonly></el-input>-->
                         </el-form-item>
-                        <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 4.498vh" label-width="0" v-show="showFlag">
+                        <el-form-item v-if="isShowjiaofei" class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 4.498vh" label-width="0" v-show="showFlag">
                             <el-button class="jiaofei-btn" type="primary" @click="pay()" :loading="payFlag">鍘荤即璐�</el-button>
                         </el-form-item>
                     </el-form>
-                  <el-form
-                      class="carSearch"
-                      label-position="left">
-                    <el-form-item
-                        class='formLabel'
-                        style="display: flex;
-                            flex-direction: column;align-items: center;justify-content: center"
-                        label="鏃� 鐗� 杞� 杈� 鏌� 璇�">
-                      <el-input prefix-icon="el-icon-search" style="margin-top: 20px;border: solid 1px #ccc!important;" v-model="carNo" placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input>
-                    </el-form-item>
-                    <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 5.498vh" label-width="0">
-                      <el-button
-                          style="borderColor:'none';background:#121215e0 "
-                          class="jiaofei-btn" type="primary" @click="noCarOut()" v-show="showFlag">鏌ヨ</el-button>
-                    </el-form-item>
-                  </el-form>
+<!--                  <el-form-->
+<!--                      class="carSearch"-->
+<!--                      label-position="left">-->
+<!--                    <el-form-item-->
+<!--                        class='formLabel'-->
+<!--                        style="display: flex;-->
+<!--                            flex-direction: column;align-items: center;justify-content: center"-->
+<!--                        label="鏃� 鐗� 杞� 杈� 鏌� 璇�">-->
+<!--                      <el-input prefix-icon="el-icon-search" style="margin-top: 20px;border: solid 1px #ccc!important;" v-model="carNo" placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input>-->
+<!--                    </el-form-item>-->
+<!--&lt;!&ndash;                    <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 5.498vh" label-width="0">&ndash;&gt;-->
+<!--&lt;!&ndash;                      <el-button&ndash;&gt;-->
+<!--&lt;!&ndash;                          style="borderColor:'none';background:#121215e0 "&ndash;&gt;-->
+<!--&lt;!&ndash;                          class="jiaofei-btn" type="primary" @click="noCarOut()" v-show="showFlag">鏌ヨ</el-button>&ndash;&gt;-->
+<!--&lt;!&ndash;                    </el-form-item>&ndash;&gt;-->
+<!--                  </el-form>-->
 
                 </div>
 
@@ -91,17 +91,47 @@
           </span>
         </el-dialog>
       </div>
-
+      <div class="again-dialog-box">
+        <el-dialog
+            title="鎻愮ず"
+            :visible.sync="againDialogVisible"
+            :close-on-click-modal="false"
+            :show-close="false"
+            width="100%">
+         <div class="again-dialog-main">
+           <h1>
+             鎮ㄥ凡鍙戣捣杩囨璁㈠崟缂磋垂鐢宠锛屽纭缂磋垂鎴愬姛锛岃鍘熷湴绛夊緟鎶潌锛屽缂磋垂鏈垚鍔燂紝璇风户缁敮浠�
+           </h1>
+         </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="againDialogVisible = false" type="primary">鍙栨秷</el-button>
+            <el-button @click="againPay" type="success">纭畾</el-button>
+          </span>
+        </el-dialog>
+      </div>
+      <tishi-dialog ref="TishiDialog" v-if="tishiDialogVisiable"></tishi-dialog>
+      <tishi-dialog2 ref="TishiDialog" v-if="tishiDialogVisiable2"></tishi-dialog2>
     </div>
 </template>
 
 <script>
 import wx from 'weixin-js-sdk'
+import TishiDialog from "@/components/page/TishiDialog";
+import TishiDialog2 from "@/components/page/TishiDialog2";
 export default {
         name: 'dashboard',
+        components: {
+          TishiDialog,
+          TishiDialog2,
+
+        },
         data() {
             return {
+                tishiDialogVisiable: false,
+                tishiDialogVisiable2: false,
+                isShowjiaofei: true,
                 dialogVisible:false,
+                againDialogVisible: false, //
                 payFlag:false,
                 payNowFlag:false,
                 outParkId:"",
@@ -172,6 +202,27 @@
             this.status3 = this.statisticData.status3;
             this.oldCarNo = this.statisticData.carNo;
             this.payFlag = false
+            if(!this.statisticData.enterTime) {  //娌℃湁鍏ュ満
+              this.isShowjiaofei = false
+              this.tishiDialogVisiable = true
+              // this.$message({
+              //   showClose: false,
+              //   duration:0,
+              //   type: 'success',
+              //   message: '鍏ュ満寮傚父锛岃鑱旂郴绠$悊鍛�'
+              // });
+            }else if(this.statisticData.enterTime && (!this.statisticData.price || this.statisticData.price == 0)) { //閲戦涓�0
+              this.isShowjiaofei = false
+              this.tishiDialogVisiable2 = true
+              // this.$message({
+              //   showClose: false,
+              //   duration:0,
+              //   type: 'success',
+              //   message: '鏃犻渶缂磋垂锛岃鍘熷湴绛夊緟锛屾垨鑱旂郴绠$悊鍛�'
+              // });
+            }else {
+              this.isShowjiaofei = true
+            }
             if(this.status3==1){
               this.$message({
                 message: '鎮ㄦ湁杩濈珷鏈鐞嗭紝璇峰厛澶勭悊鎴栬仈绯诲仠杞﹀満绠$悊浜哄憳',
@@ -185,8 +236,9 @@
             pay(){
                 console.log('code',this.code)
                 console.log('code2',this.code2)
-                this.payFlag = true;
+                // this.payFlag = true;
                 this.payNowFlag = true;
+                // this.showFlag = true
                 if(this.status3==1){
                     this.$message({
                         message: '鎮ㄦ湁杩濈珷鏈鐞嗭紝璇峰厛澶勭悊鎴栬仈绯诲仠杞﹀満绠$悊浜哄憳',
@@ -195,12 +247,46 @@
                     });
                     return;
                 }
-                this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/parkXT', {id:this.outParkId}, res => {
-                  if(res.code === 0){
-                    this.getCode()
-                    this.showFlag = false
+              this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/parkJudg', {id:this.outParkId}, res => {
+                console.log(res,'res====')
+                if(res.code === 0){
+                  this.payNowFlag = false;
+                  if(res.data == 1) { //1 寮瑰嚭寮规
+                    this.againDialogVisible = true
+                  }else {
+                    this.parkXT(this.outParkId)
                   }
-                })
+                  // this.getCode()
+                  // this.showFlag = false
+                }else {
+                  this.$message({
+                    message: '鏀粯閿欒锛岃閲嶆柊鏀粯',
+                    type: 'error',
+                    duration:3000,
+                  });
+                  this.payNowFlag = false;
+                }
+              })
+            },
+            againPay() {
+              this.againDialogVisible = false
+              this.parkXT(this.outParkId)
+            },
+            parkXT(outParkId) {
+              this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/parkXT', {id:outParkId}, res => {
+                if(res.code === 0){
+                  this.payNowFlag = false;
+                  this.getCode()
+                  // this.showFlag = false
+                }else {
+                  this.$message({
+                    message: '鏀粯閿欒锛岃閲嶆柊鏀粯',
+                    type: 'error',
+                    duration:3000,
+                  });
+                  this.payNowFlag = false;
+                }
+              })
             },
             noCarOut(){
                 if(this.carNo){
@@ -252,6 +338,7 @@
               if(this.type == 0 ){
                 //寰俊锛岃幏鍙朿ode
                 if(this.code==null||this.code==""){
+                  // var url = encodeURIComponent("http://hesuancj.cn/#/index2?code2="+this.code2);
                   var url = encodeURIComponent("http://hesuancj.cn/#/index2?code2="+this.code2);
                   window.location.href ="https://open.weixin.qq.com/connect/oauth2/authorize?" +
                       "appid=wx46e756aed958f895&redirect_uri="+url+"&response_type=code" +
@@ -343,6 +430,18 @@
 
 
 <style lang="scss">
+.el-message{
+  padding: 6.944vh  /* 75/10.8 */ 0.78125vw  /* 15/19.2 */ 6.944vh  /* 75/10.8 */ 1.042vw  /* 20/19.2 */;
+}
+.el-icon-success:before{
+  content: none;
+}
+.el-message__content{
+  font-size: 5vw;
+}
+.el-icon-error:before{
+  font-size: 5vw
+}
     .weizhang-main-bootom{
         .el-input__inner{
             border:none;
@@ -370,9 +469,6 @@
         left: 0;
         margin: 0;
       }
-      .el-dialog__body{
-        padding: 2.67vw  /* 20/7.5 */ 5.33vw  /* 40/7.5 */;
-      }
       .el-dialog__header{
         width: 100%;
         display: flex;
@@ -380,6 +476,11 @@
         align-items: center;
         padding: 1.87vw  /* 14/7.5 */;
         background: rgba(103,201,122,0.1);
+      }
+    }
+    .dialog-box,.again-dialog-box{
+      .el-dialog__body{
+        padding: 2.67vw  /* 20/7.5 */ 5.33vw  /* 40/7.5 */;
       }
       .el-dialog__title{
         font-size: 4vw  /* 30/7.5 */;
@@ -393,7 +494,29 @@
         .el-button{
           width: 100%;
           background: rgba(74,76,89,1);
+          padding: 1.056vh  /* 12/11.36 */ 1.761vh  /* 20/11.36 */;
         }
+      }
+    }
+    .again-dialog-box{
+      .el-button--success{
+        background: linear-gradient(to right, #33b1fe, #0679dc)!important;
+      }
+      .el-dialog__body{
+        padding: 8.67vw 5.33vw;
+      }
+      .el-dialog{
+        width: 80%!important;
+        margin-top: 47vh!important;
+        border-radius: 2.67vw  /* 20/7.5 */;
+      }
+      .el-dialog__header{
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        padding: 1.87vw  /* 14/7.5 */;
+        background: rgba(103,201,122,0.1);
       }
     }
 
@@ -433,16 +556,17 @@
         padding:5.33vw  /* 40/7.5 */;
     }
     .weizhang-main-top{
-        height: 22.489vh  /* 300/13.34 */;
+        height: 21.489vh  /* 300/13.34 */;
         display: flex;
         flex-direction: column;
         justify-content: center;
         align-items: center;
         border-bottom: 1px solid #f0f0f0;
         .money{
-            font-size: 6.93vw  /* 52/7.5 */;
+            font-size: 7.6vw  /* 52/7.5 */;
             font-weight: 550;
             color: #000;
+            margin-top: 1vw;
         }
         .weizhang{
             font-size: 0.4rem  /* 30/75 */;
@@ -529,4 +653,11 @@
         }
       }
     }
+    .again-dialog-box{
+      .again-dialog-main{
+        h1{
+          font-size: 4vw  /* 30/7.5 */;
+        }
+      }
+    }
 </style>

--
Gitblit v1.9.1