Browse Source

优化了用户提现申请打款确认信息

wzy 1 năm trước cách đây
mục cha
commit
b5985b6c35
1 tập tin đã thay đổi với 14 bổ sung5 xóa
  1. 14 5
      src/views/finance/application/index.vue

+ 14 - 5
src/views/finance/application/index.vue

@@ -74,7 +74,7 @@
         <div v-if="dioObj.type === 2" class="botTitle">*请确认您已转账成功,再点击确认</div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button v-if="dioObj.type === 2" type="primary" @click="agreeEn(1)">确认打款</el-button>
+        <el-button v-if="dioObj.type === 2" type="primary" @click="agreeEn(1)">{{  confirmInfo }}</el-button>
         <el-button v-if="dioObj.type === 2" type="danger" @click="agreeEn(2)">拒绝打款</el-button>
         <el-button v-if="dioObj.type === 1" @click="closeDialog">关 闭</el-button>
       </span>
@@ -116,7 +116,9 @@ export default {
       multipleSelection: [],
       dioObj: {},
       //  拒绝打款理由
-      rejectReason: ""
+      rejectReason: "",
+      //  控制确认信息和确认打款
+      confirmInfo:"确认信息"
     }
   },
   created() {
@@ -178,13 +180,20 @@ export default {
     },
     // 确认
     async agreeEn(index) {
-      if (index === 1) {
+      if (index === 1 && this.confirmInfo == "确认信息") {
         const res = await applicationHandle({
           withdrawalId: this.dioObj.arr.withdrawalId,
           state: 1
-        })
+        });
+        this.$message.success('确认信息成功,请确认打款')
+        this.confirmInfo = "确认打款";
+      }else if(index === 1 && this.confirmInfo == "确认打款"){
+        const res = await applicationHandle({
+          withdrawalId: this.dioObj.arr.withdrawalId,
+          state: 3
+        });
         if (res.code === '') {
-          this.$message.success('成功确认打款')
+          this.$message.success('确认打款成功')
           this.dioObj.show = false
           this.getAll(this.formInline)
         }