Your Name преди 2 години
родител
ревизия
9fd1f382f8
променени са 2 файла, в които са добавени 29 реда и са изтрити 10 реда
  1. 1
    0
      src/views/caseManagement/caseList.vue
  2. 28
    10
      src/views/caseManagement/components/payDialog.vue

+ 1
- 0
src/views/caseManagement/caseList.vue Целия файл

@@ -347,6 +347,7 @@
347 347
       :payTitle="payTitle"
348 348
       :form="form"
349 349
       :payForm="payForm"
350
+      @getcaseApply="getcaseApply"
350 351
       @paycancelRow="paycancelRow"
351 352
     ></payDialog>
352 353
   </div>

+ 28
- 10
src/views/caseManagement/components/payDialog.vue Целия файл

@@ -1,14 +1,7 @@
1 1
 <template>
2 2
   <div>
3
-    <el-dialog
4
-      :title="payTitle"
5
-      :visible.sync="openPay"
6
-      v-if="openPay"
7
-      width="800px"
8
-      append-to-body
9
-      :destroy-on-close="true"
10
-      center
11
-    >
3
+    <el-dialog :title="payTitle" :visible.sync="openPay" v-if="openPay" width="800px" append-to-body
4
+      :destroy-on-close="true" center>
12 5
       <el-descriptions title="订单信息">
13 6
         <el-descriptions-item label="案件编号">{{
14 7
           form.caseNum
@@ -49,7 +42,7 @@
49 42
 </template>
50 43
 
51 44
 <script>
52
-import { casePay } from "@/api/pay/pay";
45
+import { casePay, selectCaseApplicationConfirm } from "@/api/pay/pay";
53 46
 import QRCode from "qrcodejs2";
54 47
 export default {
55 48
   props: ["openPay", "payTitle", "form", "payForm"],
@@ -58,6 +51,7 @@ export default {
58 51
       // key: value
59 52
       // 支付文字
60 53
       payMain: "",
54
+      timer:null
61 55
     };
62 56
   },
63 57
   methods: {
@@ -73,6 +67,21 @@ export default {
73 67
         colorLight: "#fff",
74 68
       });
75 69
     },
70
+    // 查询缴费状态
71
+    selectCaseApplicationConfirmFn(parms) {
72
+      selectCaseApplicationConfirm(parms).then(res => {
73
+        console.log(res, this.form, "KKKKKKKKKKKKKKKKKKKK");
74
+        if(res.data.paymentStatus == 1){
75
+          clearInterval(this.timer);
76
+          this.openPay = false;
77
+          this.$message({
78
+          message: "缴费成功",
79
+          type: "success",
80
+        });
81
+        this.$emit("getcaseApply",this.queryParams);
82
+        }
83
+      })
84
+    },
76 85
     // 支付
77 86
     pay(val) {
78 87
       if (this.payForm.feePayable == 0 || !this.payForm.feePayable) {
@@ -98,6 +107,12 @@ export default {
98 107
       }).then((res) => {
99 108
         this.paySrc = res.data.code_url;
100 109
         this.qrcode(this.paySrc);
110
+        this.timer = setInterval(() => {
111
+          this.selectCaseApplicationConfirmFn({ id: this.form.id })
112
+        }, 3000);
113
+        setTimeout(() => {
114
+          clearInterval(this.timer);
115
+        }, 1000*60);
101 116
       });
102 117
     },
103 118
     payCancel() {
@@ -136,17 +151,20 @@ export default {
136 151
   width: 100%;
137 152
   text-align: center;
138 153
 }
154
+
139 155
 ::v-deep .el-dialog {
140 156
   width: 800px;
141 157
   background: #ffffff;
142 158
   border-radius: 20px;
143 159
 }
160
+
144 161
 .endbutton {
145 162
   width: 154px;
146 163
   height: 37px;
147 164
   background: #ffffff;
148 165
   border: 1px solid #d0d0d0;
149 166
   border-radius: 19px;
167
+
150 168
   span {
151 169
     width: 31px;
152 170
     height: 13px;