浏览代码

账户余额查询:绑卡、解绑、重绑、轨迹

yaoyao 2 年之前
父节点
当前提交
7340540a71

+ 36 - 0
src/http/moudules/dept.js

@@ -212,6 +212,42 @@ export const withdraw = (data) => {
     })
 }
 
+// 绑卡
+export const insert = (data) => {
+    return axios({
+        url: '/userBank/insert',
+        method: 'post',
+        data
+    })
+}
+
+// 解绑
+export const unbind = (data) => {
+    return axios({
+        url: '/userBank/unbind',
+        method: 'post',
+        data
+    })
+}
+
+// 重新绑定
+export const rebind = (data) => {
+    return axios({
+        url: '/userBank/rebind',
+        method: 'post',
+        data
+    })
+}
+
+// 轨迹
+export const getUserBankCardHistoryList = (data) => {
+    return axios({
+        url: '/userBank/getUserBankCardHistoryList',
+        method: 'post',
+        data
+    })
+}
+
 //获取树结构
 export const sysDeptInternalAgentFindTree = (params) => {
     return axios({

+ 43 - 0
src/views/Core/KtCommonTable.vue

@@ -51,6 +51,24 @@
             </el-table-column>
             <el-table-column prop="bankNumber" label="银行卡号" style="flex: 1">
             </el-table-column>
+            <el-table-column prop="delFlag" label="是否解绑" style="flex: 1">
+              <template slot-scope="scope1">
+                <el-row>
+                  <el-col :span="8">
+                    <span style="margin-right: 20px;">{{ scope1.row.delFlag == '0' ? '未解绑' : '已解绑' }}</span>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-button v-if="scope1.row.delFlag == '0'" type="text" size="mini" @click="handleBreak(scope.$index, scope.row, scope1.$index, scope1.row)">解绑</el-button>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-button v-if="scope1.row.delFlag == '1'" type="text" size="mini" @click="handleRebind(scope.$index, scope.row, scope1.$index, scope1.row)">重绑</el-button>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-button type="text" size="mini" @click="handleTimeLine(scope.$index, scope.row, scope1.$index, scope1.row)">轨迹</el-button>
+                  </el-col>
+                </el-row>
+              </template>
+            </el-table-column>
           </el-table>
         </template>
       </el-table-column>
@@ -640,6 +658,31 @@ export default {
       });
       // this.$emit('findLeftTreeData')
     },
+    handleBreak: function (index, row, i, r) {
+      this.$emit("handleBreak", {
+        index: index,
+        row: row,
+        i: i,
+        r: r
+      })
+    },
+    
+    handleTimeLine: function (index, row, i, r) {
+      this.$emit("handleTimeLine", {
+        index: index,
+        row: row,
+        i: i,
+        r: r
+      })
+    },
+    handleRebind: function (index, row, i, r) {
+      this.$emit("handleRebind", {
+        index: index,
+        row: row,
+        i: i,
+        r: r
+      })
+    },
     // 删除
     handleDelete: function (index, row) {
       let _keyName = "id";

+ 133 - 3
src/views/FinancialManagement/AcountWithdrawal/AcountBalance.vue

@@ -35,10 +35,10 @@
       </div>
       <kt-common-table :showBatchDelete="false" :showSysUserAccountCardList="true" :showBatchPrint="false"
         :showOperation="true" :data="pageResult" :columns="columns" @findPage="queryBalance" :isshowpagination="true"
-        button2Name="提现" button2Background="#409eff" @handleButton2="withdrawButton">
+        button2Name="提现" button3Name="绑卡" button2Background="#409eff" button3Background="#409eff" @handleButton2="withdrawButton" @handleButton3="withdrawButton2" @handleBreak="handleBreak" @handleTimeLine="handleTimeLine" @handleRebind="handleRebind">
       </kt-common-table>
     </SplitArea>
-    </Split>
+    <!-- </Split> -->
     <div class="popupBox">
       <el-dialog :visible.sync="dialogVisible" title="提现" @close="dialogVisible = false" width="40%">
         <el-form ref="form" :model="withdrawForm" label-width="100px">
@@ -64,6 +64,37 @@
           <el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
         </span>
       </el-dialog>
+
+      <el-dialog :visible.sync="dialogVisible1" title="绑卡" @close="dialogVisible1 = false" width="40%">
+        <el-form ref="form" :model="addCard" label-width="100px">
+          <el-form-item label="银行卡号">
+            <el-input v-model="addCard.bankNumber" placeholder="请输入银行卡号" style="width: 300px;"></el-input>
+          </el-form-item>
+          <el-form-item label="开户行">
+            <el-input v-model="addCard.bankAccount" placeholder="请输入开户行" style="width: 300px;"></el-input>
+          </el-form-item>
+          <el-form-item label="开户行地址">
+            <el-input v-model="addCard.bankAddress" placeholder="请输入开户行地址" style="width: 300px;"></el-input>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button size="small" @click="dialogVisible1 = false">取 消</el-button>
+          <el-button size="small" type="primary" @click="handleConfirm1">确 定</el-button>
+        </span>
+      </el-dialog>
+
+      <el-dialog :visible.sync="dialogVisibleLine" title="轨迹" @close="dialogVisibleLine = false" width="30%">
+        <el-steps direction="vertical">
+          <el-step :title="item.title" v-for="(item, index) in timeLine" :key="index">
+            <template slot="description">
+              <div class="tab-panecent1">
+                <div>时间: {{ item.createTime }}</div>
+                <div>创建人: {{ item.creator }}</div>
+              </div>
+            </template>
+            </el-step>
+          </el-steps>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -79,6 +110,14 @@ export default {
   },
   data() {
     return {
+      // 轨迹
+      dialogVisibleLine: false,
+      timeLine: [],
+      // 绑卡
+      dialogVisible1: false,
+      addCard: {
+        userId: "",
+      },
       withdrawForm: {
         userId: "",
         amountStatus: "",
@@ -217,6 +256,75 @@ export default {
   },
 
   methods: {
+    // 轨迹
+    handleTimeLine({index, row, i, r}) {
+      this.dialogVisibleLine = true
+      this.$api.dept.getUserBankCardHistoryList({
+        bankNumber: r.bankNumber
+      }).then((res) => {
+        res.data.forEach(val => {
+          if (val.type == 'add') {
+            val.title = '绑定银行卡'
+          }
+          if (val.type == 'unbind') {
+            val.title = '解绑'
+          }
+          if (val.type == 'pass') {
+            val.title = '审核通过'
+          }
+          if (val.type == 'refuse') {
+            val.title = '审核驳回'
+          }
+          if (val.type == 'rebind') {
+            val.title = '重新绑定'
+          }
+        })
+        this.timeLine = res.data
+      })
+    },
+    // 解绑
+    handleBreak({index, row, i, r}) {
+      this.$api.dept.unbind({
+        id: r.id,
+        delFlag: '1',
+        bankNumber: r.bankNumber
+      }).then((res) => {
+        if (res.code == 200) {
+          this.queryBalance();
+          this.$message.success(res.msg)
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    // 重新绑定
+    handleRebind({index, row, i, r}) {
+      this.$api.dept.rebind({
+        id: r.id,
+        delFlag: '0',
+        bankNumber: r.bankNumber
+      }).then((res) => {
+        if (res.code == 200) {
+          this.queryBalance();
+          this.$message.success(res.msg)
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    // 绑卡
+    handleConfirm1() {
+      this.addCard.isDefault = '0'
+      this.$api.dept.insert(this.addCard).then((res) => {
+        if (res.code == 200) {
+          this.queryBalance();
+          this.$message.success(res.msg)
+          this.dialogVisible1 = false
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
     //弹窗是否出现
     showDialog() {
       this.dialogVisible = !this.dialogVisible;
@@ -250,6 +358,14 @@ export default {
       this.sysUserAccountCardList = row.sysUserAccountCardList;
       this.dialogVisible = !this.dialogVisible;
     },
+    // 绑卡
+    withdrawButton2({index, row}) {
+      this.addCard = {}
+      this.addCard.userId = row.userId;
+      this.addCard.userName = row.name
+      console.log(this.addCard)
+      this.dialogVisible1 = true
+    },
     //联级选择器触发事件
     handleChange(val) {
       if (val.length !== 0) {
@@ -312,7 +428,7 @@ export default {
 };
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 /* 顶部查询条件样式Start */
 .queryFrom {
   background: #f2f7fc;
@@ -348,4 +464,18 @@ export default {
 .el-cascader {
   width: 100%;
 }
+.el-steps {
+  >>> .el-step__head.is-wait {
+    color: var(--themeColor);
+    border-color: var(--themeColor);
+  }
+  >>> .el-step__title.is-wait {
+    color: var(--themeColor);
+    font-weight: 700;
+  }
+  >>> .el-step__description.is-wait {
+    color: #606266;
+    margin-bottom: 10px;
+  }
+}
 </style>

+ 1 - 0
src/views/FinancialManagement/AcountWithdrawal/WithdrawalReview2.vue

@@ -68,6 +68,7 @@ export default {
                 { prop: "bankNumber", label: "卡号" },
                 { prop: "bankAccount", label: "银行" },
                 { prop: "bankAddress", label: "开户行" },
+                { prop: "auditTime", label: "审核时间" },
                 { prop: "auditStatus", label: "状态",formatter:this.statusFormatter },
                 // { prop: "remark", label: "驳回原因" },
             ],

+ 1 - 0
src/views/FinancialManagement/AcountWithdrawal/WithdrawalReview3.vue

@@ -68,6 +68,7 @@ export default {
                 { prop: "bankNumber", label: "卡号" },
                 { prop: "bankAccount", label: "银行" },
                 { prop: "bankAddress", label: "开户行" },
+                { prop: "auditTime", label: "审核时间" },
                 { prop: "auditStatus", label: "状态",formatter:this.statusFormatter },
                 { prop: "remark", label: "驳回原因" },
             ],

+ 2 - 1
src/views/Letter/Wallet/FundsWallet.vue

@@ -223,7 +223,8 @@ export default {
     instantWithdrawal() {
       this.extract=null
       this.$api.letter.getUserBankList({
-        auditStatus: '1'
+        auditStatus: '1',
+        delFlag: '0'
       }).then((res) => {
         if (res.code == '200' && res.data.length) {
           this.bankList.map(val => {