瀏覽代碼

2024.08.17
- 重构用户提现申请页,重新对接佣金流水记录接口;

zweiqin 7 月之前
父節點
當前提交
72206183e2

+ 9 - 0
src/api/application.js

@@ -82,6 +82,15 @@ export function getWaterRecord(params){
   })
 }
 
+// 分页查询佣金流水记录(新)
+export function getCommissionAll(params){
+  return request({
+    url:"/buyerCommissionEntryRecord/getCommissionAll",
+    method:"get",
+    params
+  })
+}
+
 //  通联查询
 export function getTonglian(data){
   return request({

+ 227 - 0
src/views/finance/application/components/DetailModal.vue

@@ -0,0 +1,227 @@
+<template>
+  <el-dialog :visible.sync="visible" v-bind="modalOptions">
+    <div>
+      <el-descriptions title="" :column="2" border>
+        <el-descriptions-item label="手机号码:">
+          {{ withdrawalInfo.phone }}
+        </el-descriptions-item>
+        <el-descriptions-item label="银行名称:">
+          {{ withdrawalInfo.bankName }}
+        </el-descriptions-item>
+        <el-descriptions-item label="银行卡号:">
+          {{ withdrawalInfo.bankCard }}
+        </el-descriptions-item>
+        <el-descriptions-item label="收款人姓名:">
+          {{ withdrawalInfo.name }}
+        </el-descriptions-item>
+        <el-descriptions-item label="提现金额:">
+          {{ withdrawalInfo.withdrawalMoney }}
+        </el-descriptions-item>
+        <el-descriptions-item label="实际到账:">
+          {{ withdrawalInfo.actualReceipt }}
+        </el-descriptions-item>
+        <el-descriptions-item label="申请时间:">
+          {{ withdrawalInfo.applyTime }}
+        </el-descriptions-item>
+        <el-descriptions-item label="处理时间:">
+          {{ withdrawalInfo.handleTime }}
+        </el-descriptions-item>
+        <el-descriptions-item label="拒绝打款理由:">
+          {{ withdrawalInfo.rejectReason || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item label="账户可提现金额:">
+          {{ watherInfo.price }}
+        </el-descriptions-item>
+        <el-descriptions-item label="账户总金额:">
+          {{ watherInfo.totalPrice }}
+        </el-descriptions-item>
+        <el-descriptions-item label="提现中:">
+          {{ watherInfo.pendingWithdrawal }}
+        </el-descriptions-item>
+        <el-descriptions-item label="已提现:">
+          {{ watherInfo.alreadyPrice }}
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+
+    <el-tabs value="relatedSettlement">
+      <el-tab-pane label="金流水记录列表" name="relatedSettlement">
+        <div v-if="recordList && recordList.length" style="margin-top: 32px;">
+          <el-table
+            v-loading="!recordList.length" height="60vh" element-loading-text="暂无金流水记录数据" :data="recordList"
+            v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+          >
+            <!-- <el-table-column align="center" min-width="80" prop="price" label="支付金额" show-overflow-tooltip></el-table-column>
+              <el-table-column align="center" width="150" prop="paymentTime" label="支付时间" show-overflow-tooltip />
+              <el-table-column prop="customerName" label="支付名称" width="120" />
+              <el-table-column prop="customerPhone" label="支付电话" />
+              <el-table-column prop="transactionId" label="通联流水号" />
+              <el-table-column label="来源类型">
+              <template slot-scope="{ row }">
+              <span v-if="row.type == 1">关系链</span>
+              <span v-if="row.type == 2">商城</span>
+              <span v-if="row.type == 3">本地</span>
+              <span v-if="row.type == 4">服务</span>
+              </template>
+              </el-table-column>
+              <el-table-column label="状态">
+              <template slot-scope="{ row }">
+              <span v-if="row.isTo == 0">订单</span>
+              <span v-if="row.isTo == 1">确认收货</span>
+              </template>
+              </el-table-column>
+              <el-table-column prop="proportion" label="佣金比例" />
+              <el-table-column prop="amount" label="分配的佣金" />
+              <el-table-column prop="totalAmount" label="佣金总金额" /> -->
+            <el-table-column align="center" min-width="80" prop="id" label="ID" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" min-width="80" prop="buyerUserId" label="入账用户Id" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="来源类型" prop="sourceType">
+              <template slot-scope="{ row }">
+                <el-tag v-if="row.sourceType === 1" effect="plain" type="info">平台</el-tag>
+                <el-tag v-else-if="row.sourceType === 2" effect="plain" type="success">商圈</el-tag>
+                <el-tag v-else-if="row.sourceType === 3" effect="plain" type="success">用户</el-tag>
+                <el-tag v-else-if="row.sourceType === 4" effect="plain" type="success">社区</el-tag>
+                <el-tag v-else-if="row.sourceType === 5" effect="plain" type="success">商城</el-tag>
+                <span v-else>--</span>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" min-width="80" prop="sourceId" label="来源Id" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" width="150" prop="orderFormid" label="来源订单编号" show-overflow-tooltip />
+            <el-table-column align="center" width="150" prop="commissionNumber" label="入账数量" show-overflow-tooltip />
+            <el-table-column align="center" label="活动配置类型" prop="waterType">
+              <template slot-scope="{ row }">
+                <el-tag v-if="row.waterType === -1" effect="plain" type="info">退款退回</el-tag>
+                <el-tag v-else-if="row.waterType === 1" effect="plain" type="success">升级活动</el-tag>
+                <el-tag v-else-if="row.waterType === 2" effect="plain" type="success">分佣活动</el-tag>
+                <el-tag v-else-if="row.waterType === 3" effect="plain" type="success">社区活动</el-tag>
+                <el-tag v-else-if="row.waterType === 4" effect="plain" type="success">赠券活动</el-tag>
+                <el-tag v-else-if="row.waterType === 5" effect="plain" type="success">赠金活动</el-tag>
+                <el-tag v-else-if="row.waterType === 6" effect="plain" type="success">商圈订单</el-tag>
+                <el-tag v-else-if="row.waterType === 7" effect="plain" type="success">爆款家具</el-tag>
+                <el-tag v-else-if="row.waterType === 8" effect="plain" type="success">社区订单</el-tag>
+                <el-tag v-else-if="row.waterType === 9" effect="plain" type="success">用户代金券转赠</el-tag>
+                <el-tag v-else-if="row.waterType === 0" effect="plain" type="success">商家代金券转赠</el-tag>
+                <el-tag v-else-if="row.waterType === 11" effect="plain" type="success">同城联盟卡</el-tag>
+                <span v-else>--</span>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" width="150" prop="effectiveTime" label="有效时间" show-overflow-tooltip />
+            <el-table-column align="center" min-width="80" prop="isProportion" label="佣金比例" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" min-width="120" prop="commissionTotal" label="佣金总额" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="受益用户类型" prop="buyerUserType">
+              <template slot-scope="{ row }">
+                <el-tag v-if="row.buyerUserType == 100" effect="plain" type="info">代理商</el-tag>
+                <el-tag v-else-if="row.buyerUserType == 200" effect="plain" type="success">加盟商</el-tag>
+                <el-tag v-else-if="row.buyerUserType == 300" effect="plain" type="success">小区店</el-tag>
+                <el-tag v-else-if="row.buyerUserType == 400" effect="plain" type="success">本系统</el-tag>
+                <span v-else>{{ row.buyerUserType }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" min-width="120" prop="withdrawalId" label="提现Id" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" width="150" prop="createTime" label="创建时间" show-overflow-tooltip />
+          </el-table>
+        </div>
+        <div v-else style="font-size: 16px;font-weight: bold;">无佣金流水记录数据</div>
+      </el-tab-pane>
+    </el-tabs>
+  </el-dialog>
+</template>
+
+<script>
+import { applicationGetById, getUserWater, getCommissionAll } from '@/api/application'
+
+export default {
+  name: 'DetailModal',
+  components: {
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '1220px',
+        title: '查看提现详情'
+      },
+      visible: false,
+      formData: {
+        withdrawalId: ''
+      },
+      withdrawalInfo: {
+        actualReceipt: '',
+        applyTime: '',
+        bankCard: '',
+        bankName: '',
+        batchId: '',
+        buyerUserId: '',
+        cost: '',
+        handleTime: '',
+        isConfirm: '',
+        name: '',
+        orderSn: '',
+        phone: '',
+        rejectReason: '',
+        state: '',
+        withdrawalId: '',
+        withdrawalMoney: ''
+      },
+      watherInfo: {},
+      recordQuery: {
+        // page: 1,
+        // pageSize: 20,
+        // acquirerId: '',
+        withdrawalId: ''
+      },
+      recordList: [],
+      recordTotal: 0
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    async initList() {
+      const res1 = await applicationGetById({ withdrawalId: this.formData.withdrawalId })
+      this.withdrawalInfo = res1.data
+      const res2 = await getUserWater({ userId: this.withdrawalInfo.buyerUserId })
+      this.watherInfo = res2.data
+      const res3 = await getCommissionAll({ ...this.recordQuery, withdrawalId: this.withdrawalInfo.withdrawalId })
+      this.recordList = res3.data.list
+      this.recordTotal = res3.data.total
+    },
+    handleOpen(params = {}) {
+      this.formData = Object.assign(this.$options.data().formData, params)
+      this.initList()
+      if (params.withdrawalId) {
+        // this.getInfo(params.withdrawalId)
+      }
+      this.visible = true
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await xxx({ withdrawalId: id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          withdrawalId: res.data.withdrawalId || ''
+        })
+      } finally {
+        loading.close()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.small-padding {
+	.cell {
+		padding-left: 5px;
+		padding-right: 5px;
+	}
+}
+
+.fixed-width {
+	.el-button--mini {
+		padding: 7px 10px;
+	}
+}
+</style>

+ 182 - 0
src/views/finance/application/components/WithdrawalProcessing.vue

@@ -0,0 +1,182 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <div>
+      <el-descriptions title="" :column="2" border>
+        <el-descriptions-item label="手机号码:">
+          {{ formData.phone }}
+        </el-descriptions-item>
+        <el-descriptions-item label="银行名称:">
+          {{ formData.bankName }}
+        </el-descriptions-item>
+        <el-descriptions-item label="银行卡号:">
+          {{ formData.bankCard }}
+        </el-descriptions-item>
+        <el-descriptions-item label="收款人姓名:">
+          {{ formData.name }}
+        </el-descriptions-item>
+        <el-descriptions-item label="提现金额:">
+          {{ formData.withdrawalMoney }}
+        </el-descriptions-item>
+        <el-descriptions-item label="实际到账:">
+          {{ formData.actualReceipt }}
+        </el-descriptions-item>
+        <el-descriptions-item label="申请时间:">
+          {{ formData.applyTime }}
+        </el-descriptions-item>
+        <el-descriptions-item label="处理时间:">
+          {{ formData.handleTime }}
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+    <el-input v-show="formData.state == 2" v-model="formData.rejectReason" type="textarea" autosize placeholder="请输入拒绝打款理由">
+    </el-input>
+
+    <template #footer>
+      <span>
+        <el-button @click="visible = false">取 消</el-button>
+        <el-button v-if="formData.state === 3" type="danger" @click="handleRefuse">确认拒绝打款</el-button>
+        <el-button v-else type="danger" @click="handleRefuse">拒绝打款</el-button>
+        <el-button v-if="formData.state === 0" type="primary" @click="handleExamine">确认用户信息</el-button>
+        <el-button v-else-if="formData.state === 1" type="primary" @click="handleConfirm">确认打款</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { applicationGetById, applicationHandle } from '@/api/application'
+
+export default {
+  name: 'WithdrawalProcessing',
+  components: {
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '820px',
+        title: '提现处理'
+      },
+      visible: false,
+      formData: {
+        actualReceipt: '',
+        applyTime: '',
+        bankCard: '',
+        bankName: '',
+        batchId: '',
+        buyerUserId: '',
+        cost: '',
+        handleTime: '',
+        isConfirm: '',
+        name: '',
+        orderSn: '',
+        phone: '',
+        rejectReason: '',
+        state: '',
+        withdrawalId: '',
+        withdrawalMoney: ''
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    async initList() {
+    },
+    handleOpen(params = {}) {
+      this.modalOptions.title = '提现处理'
+      this.formData = Object.assign(this.$options.data().formData, params)
+      this.visible = true
+      this.initList()
+      if (params.withdrawalId) {
+        this.getInfo(params.withdrawalId)
+      } else {
+        this.$refs.formData && this.$refs.formData.resetFields()
+      }
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await applicationGetById({ withdrawalId: id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          withdrawalId: res.data.withdrawalId || '',
+          actualReceipt: res.data.actualReceipt || '',
+          applyTime: res.data.applyTime || '',
+          bankCard: res.data.bankCard || '',
+          bankName: res.data.bankName || '',
+          batchId: res.data.batchId || '',
+          buyerUserId: res.data.buyerUserId || '',
+          cost: res.data.cost,
+          handleTime: res.data.handleTime || '',
+          isConfirm: res.data.isConfirm,
+          name: res.data.name || '',
+          orderSn: res.data.orderSn || '',
+          phone: res.data.phone || '',
+          rejectReason: res.data.rejectReason || '',
+          state: res.data.state,
+          withdrawalMoney: res.data.withdrawalMoney
+        })
+        this.$nextTick(() => {
+          this.$refs.formData && this.$refs.formData.validate()
+        })
+      } finally {
+        loading.close()
+      }
+    },
+    //  拒绝打款
+    async handleRefuse() {
+      if (this.formData.state == 2) {
+        if (!this.formData.rejectReason) return this.$message.error('拒绝理由不能为空')
+        const res = await applicationHandle({
+          withdrawalId: this.formData.withdrawalId,
+          state: '2',
+          rejectReason: this.formData.rejectReason
+        })
+        if (res.code == '') {
+          this.$message.success('成功拒绝打款!!!')
+        }
+        this.visible = false
+        this.$emit('success')
+      } else {
+        this.formData.state = 2
+        this.$message.warning('请填写理由并确定拒绝打款!!!')
+      }
+    },
+    // 确认审核
+    handleExamine() {
+      this.$confirm('确定审核通过吗?')
+        .then(async () => {
+          await applicationHandle({
+            withdrawalId: this.formData.withdrawalId,
+            state: '1'
+          })
+          this.$message.success('操作成功!请再次确认!')
+          this.getInfo(this.formData.withdrawalId)
+          this.$emit('success')
+        })
+        .catch(() => {})
+    },
+    // 确认打款
+    handleConfirm() {
+      this.$confirm('确定打款吗?')
+        .then(async () => {
+          if (!this.formData.type) return this.$message.error('请选择打款方式')
+          await applicationHandle({
+            withdrawalId: this.formData.withdrawalId,
+            withdrawalType: 1, // 1佣金
+            state: '3'
+          })
+          this.$message.success('打款成功!!!')
+          this.visible = false
+          this.$emit('success')
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+

+ 144 - 410
src/views/finance/application/index.vue

@@ -1,457 +1,191 @@
 <template>
-  <div class="custom_page">
-    <div class="content">
-      <!-- 顶部搜索 -->
-      <div class="toolbar">
-        <!-- 顶部搜索 -->
-        <el-form :inline="true" :model="formInline">
-          <el-form-item label="用户名称">
-            <el-input v-model="formInline.name" maxlength="20" placeholder="请输入" />
-          </el-form-item>
-          <el-form-item label="手机号">
-            <el-input v-model="formInline.phone" maxlength="11" placeholder="请输入" />
-          </el-form-item>
-          <el-form-item label="提现状态">
-            <el-select v-model="formInline.state" placeholder="请选择">
-              <el-option label="全部" :value="null" />
-              <el-option label="待审核" value="0" />
-              <el-option label="打款中" value="1" />
-              <el-option label="通过" value="1" />
-              <el-option label="拒绝" value="2" />
-              <el-option label="打款成功" value="3" />
-              <el-option label="打款失败" value="4" />
-              <el-option label="待确认" value="5" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label-width="0">
-            <el-button type="primary" plain @click="search">查询</el-button>
-            <el-button plain @click="clear">重置</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-      <!--  表格 -->
-      <div class="content_table">
-        <div class="table">
-          <el-table
-            v-loading="tableLoading" :data="tableData" border
-            :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" style="width: 100%"
-          >
-            >
-            <el-table-column prop="orderSn" label="流水号"></el-table-column>
-            <el-table-column prop="name" label="用户名称" />
-            <el-table-column prop="phone" label="手机号码" />
-            <el-table-column prop="withdrawalMoney" label="提现金额" />
-            <el-table-column prop="cost" label="手续费"></el-table-column>
-            <el-table-column label="处理状态">
-              <template slot-scope="scope">
-                <span v-if="scope.row.state == 0">审核中</span>
-                <!-- <span v-if="scope.row.state == 1">打款中</span> -->
-                <span v-if="scope.row.state == 1">通过</span>
-                <span v-if="scope.row.state == 2">拒绝</span>
-                <span v-if="scope.row.state == 3">打款成功</span>
-                <span v-if="scope.row.state == 4">打款失败</span>
-                <span v-if="scope.row.state == 5">待确认</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="applyTime" label="申请时间"></el-table-column>
-            <el-table-column label="操作" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div class="btnList">
-                  <el-button v-if="scope.row.state == 1" type="text" @click="del(scope.row)">处理</el-button>
-                  <el-button v-else-if="scope.row.state !== 0" type="text" @click="seeMore(scope.row)">查看</el-button>
-                  <el-button v-else type="text" @click="del(scope.row)">处理</el-button>
-                  <el-button v-if="scope.row.state !== 3" type="text" @click="confirmTong(scope.row)">通联确认</el-button>
-                </div>
-              </template>
-            </el-table-column>
-          </el-table>
-          <div class="fenye">
-            <el-pagination
-              :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="10"
-              layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-            />
-          </div>
-        </div>
-      </div>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input
+        v-model="listQuery.name" clearable size="mini" class="filter-item"
+        style="width: 200px;"
+        placeholder="请输入用户名称"
+      />
+      <el-input
+        v-model="listQuery.phone" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请输入手机号"
+      />
+      <el-select
+        v-model="listQuery.state" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请选择提现状态"
+      >
+        <el-option label="全部" :value="null" />
+        <el-option label="待审核" value="0" />
+        <el-option label="打款中" value="1" />
+        <el-option label="通过" value="1" />
+        <el-option label="拒绝" value="2" />
+        <el-option label="打款成功" value="3" />
+        <el-option label="打款失败" value="4" />
+        <el-option label="待确认" value="5" />
+      </el-select>
+      <el-button
+        size="mini" class="filter-item" type="primary" icon="el-icon-search"
+        style="margin-left: 10px;"
+        @click="handleSearch"
+      >
+        查找
+      </el-button>
+      <el-button size="mini" type="info" class="filter-item" @click="handleReset">
+        重置
+      </el-button>
     </div>
 
-    <!-- 详情弹框 -->
-    <el-dialog
-      :visible.sync="dioObj.show" :title="dioObj.title" width="40%" center
-      :close-on-click-modal="false"
-      @close="closeDialog"
-    >
-      <div class="box">
-        <div class="dioBox">
-          <div v-for="(item, index) in infoList" :key="index" class="inner">{{ item.name }}:{{ item.value }}</div>
-        </div>
-        <div v-if="dioObj.type === 2" class="botTitle">*请确认您已转账成功,再点击确认</div>
-      </div>
-      <template #footer>
-        <span class="dialog-footer">
-          <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>
-      </template>
-      <div class="statistics">
-        <div class="statistics-item">
-          <h1>{{ watherInfo.price }}</h1>
-          <p>账户可提现金额</p>
-        </div>
-        <div class="statistics-item">
-          <h1>{{ watherInfo.totalPrice }}</h1>
-          <p>账户总金额</p>
-        </div>
-        <div class="statistics-item">
-          <h1>{{ watherInfo.pendingWithdrawal }}</h1>
-          <p>提现中</p>
-        </div>
-        <div class="statistics-item">
-          <h1>{{ watherInfo.alreadyPrice }}</h1>
-          <p>已提现</p>
-        </div>
-      </div>
-      <div class="tabbar-list">
-        <el-table
-          v-loading="watherFlag" :data="waterData" border
-          :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" style="width: 100%"
-        >
-          >
-          <el-table-column prop="price" label="支付金额"></el-table-column>
-          <el-table-column prop="paymentTime" label="支付时间" />
-          <el-table-column prop="customerName" label="支付名称" />
-          <el-table-column prop="customerPhone" label="支付电话" />
-          <el-table-column prop="transactionId" label="通联流水号" />
-          <el-table-column label="来源类型">
-            <template slot-scope="scope">
-              <span v-if="scope.row.type == 1">关系链</span>
-              <span v-if="scope.row.type == 2">商城</span>
-              <span v-if="scope.row.type == 3">本地</span>
-              <span v-if="scope.row.type == 4">服务</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="状态">
-            <template slot-scope="scope">
-              <span v-if="scope.row.isTo == 0">订单</span>
-              <span v-if="scope.row.isTo == 1">确认收货</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="proportion" label="佣金比例" />
-          <el-table-column prop="amount" label="分配的佣金" />
-          <el-table-column prop="totalAmount" label="佣金总金额" />
-        </el-table>
-      </div>
-      <div class="dialog-pagination">
-        <el-pagination layout="prev, pager, next" :total="waterTotal" :page-size="5" @current-change="waterChange">
-        </el-pagination>
-      </div>
-    </el-dialog>
+    <!-- 查询结果 -->
+    <div v-tableHeight>
+      <el-table
+        v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
+        v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+      >
+        <el-table-column align="center" width="150" label="流水号" prop="orderSn"></el-table-column>
+        <el-table-column align="center" min-width="150" label="用户名称" prop="name" show-overflow-tooltip />
+        <el-table-column prop="phone" label="手机号码" />
+        <el-table-column prop="withdrawalMoney" label="提现金额" />
+        <el-table-column prop="cost" label="手续费"></el-table-column>
+        <el-table-column label="处理状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.state == 0">审核中</span>
+            <!-- <span v-if="scope.row.state == 1">打款中</span> -->
+            <span v-if="scope.row.state == 1">通过</span>
+            <span v-if="scope.row.state == 2">拒绝</span>
+            <span v-if="scope.row.state == 3">打款成功</span>
+            <span v-if="scope.row.state == 4">打款失败</span>
+            <span v-if="scope.row.state == 5">待确认</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="applyTime" label="申请时间"></el-table-column>
+        <el-table-column align="center" width="150" label="备注" prop="cause" show-overflow-tooltip />
+        <el-table-column label="操作" width="180" fixed="right" class-name="small-padding fixed-width">
+          <template slot-scope="{ row }">
+            <el-button type="warning" size="mini" @click="handleDetail(row)">
+              详情
+            </el-button>
+            <el-button v-if="(row.state == 0) || (row.state == 1)" size="mini" @click="handleResolve(row)">
+              处理
+            </el-button>
+            <el-button v-if="row.state !== 3" type="text" @click="handleConfirmTong(row)">
+              通联确认
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div>
+      <el-pagination
+        :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total"
+        @size-change="(val) => ((listQuery.pageSize = val) && getList())"
+        @current-change="(val) => ((listQuery.page = val) && getList())"
+      />
+    </div>
+
+    <!-- 提现处理 -->
+    <WithdrawalProcessing ref="WithdrawalProcessing" @success="getList" />
+    <!-- 查看详情 -->
+    <DetailModal ref="DetailModal" />
   </div>
 </template>
 
 <script>
 import {
   applicationGetAll,
-  applicationGetById,
-  applicationHandle,
-  getUserWater,
-  getWaterRecord,
   getTonglian
 } from '@/api/application'
+import WithdrawalProcessing from './components/WithdrawalProcessing'
+import DetailModal from './components/DetailModal'
 export default {
   name: 'Application',
+  components: {
+    WithdrawalProcessing,
+    DetailModal
+  },
   data() {
     return {
-      formInline: {
+      listQuery: {
         name: '', // 用户名称
         phone: '', // 手机号码
         state: null, // 提现状态 空-全部 0-待审核 1-通过 2-拒绝
         page: 1,
         pageSize: 10
       },
-      total: 1,
-      tableData: [],
-      //  控制表格的加载
-      tableLoading: true,
-      infoList: [
-        { name: '手机号码', value: '', fields: 'phone' },
-        { name: '银行名称', value: '', fields: 'bankName' },
-        { name: '银行卡号', value: '', fields: 'bankCard' },
-        { name: '收款人姓名', value: '', fields: 'name' },
-        { name: '提现金额', value: '', fields: 'withdrawalMoney' },
-        { name: '实际到账', value: '', fields: 'actualReceipt' },
-        { name: '申请时间', value: '', fields: 'applyTime' },
-        { name: '处理时间', value: '', fields: 'handleTime' }
-      ],
-      currentPage: 1,
-      multipleSelection: [],
-      dioObj: {},
-      //  拒绝打款理由
-      rejectReason: '',
-      //  控制确认信息和确认打款
-      confirmInfo: '确认信息',
-      // 流水信息表格数据
-      waterData: [],
-      waterTotal: null,
-      watherInfo: {},
-      // 获取流水数据参数
-      watherParameter: {
-        page: 1,
-        pageSize: 5,
-        acquirerId: ''
-      },
-      watherFlag: true
+      list: [],
+      total: 0,
+      listLoading: true
     }
   },
-  created() {
-    this.getAll(this.formInline)
+  mounted() {
+    this.getList()
   },
   methods: {
-    handleSizeChange(val) {
-      this.formInline.pageSize = val
-      this.getAll(this.formInline)
-    },
-    handleCurrentChange(val) {
-      this.formInline.page = val
-      this.getAll(this.formInline)
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val
-    },
-    // 查询
-    search() {
-      this.total = 1
-      this.formInline.page = 1
-      this.getAll(this.formInline)
-    },
-    // 清除
-    clear() {
-      this.formInline = {
-        name: '', // 用户名称
-        phone: '', // 手机号码
-        state: null, // 提现状态 空-全部 0-待审核 1-通过 2-拒绝
-        page: 1,
-        pageSize: 10
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await applicationGetAll(this.listQuery)
+        this.list = res.data.list
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
       }
-      this.getAll(this.formInline)
     },
-    // 查看
-    seeMore(row) {
-      this.dioObj = {
-        title: '查看',
-        show: true,
-        arr: row,
-        type: 1
-      }
-      this.getDetails(row.withdrawalId)
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
     },
-    // 处理
-    del(row) {
-      this.dioObj = {
-        title: '处理',
-        show: true,
-        arr: row,
-        type: 2
-      }
-      this.getDetails(row.withdrawalId)
+    handleReset() {
+      this.listQuery = { name: '', phone: '', state: null, page: 1, pageSize: 10 }
+      this.getList()
     },
-    // 确认
-    async agreeEn(index) {
-      // console.log(index)
-      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 == '确认打款') {
-        this.$confirm('此操作将把款项打给用户, 是否继续?', '打款', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(async () => {
-          const res = await applicationHandle({
-            withdrawalId: this.dioObj.arr.withdrawalId,
-            withdrawalType: 1, // 1佣金
-            state: 3
-          })
-          if (res.code === '') {
-            this.$message.success('确认打款成功')
-            this.dioObj.show = false
-            this.getAll(this.formInline)
-          }
-        })
-          .catch(() => {
-            this.$message({
-              type: 'info',
-              message: '已取消打款'
-            })
-          })
-      } else if (index === 2) {
-        if (this.rejectReason == '') {
-          this.$prompt('请输入拒绝打款理由', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            inputPattern: /^\s*[\S]+\s*$/,
-            inputErrorMessage: '输入的拒绝打款理由不能为空!!!'
-          }).then(({ value }) => {
-            this.rejectReason = value
-            //  二次确认是否拒绝打款
-            this.$confirm('此操作将决绝为该用户打款, 是否继续?', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(async () => {
-              const res = await applicationHandle({
-                withdrawalId: this.dioObj.arr.withdrawalId,
-                state: 2,
-                rejectReason: this.rejectReason
-              })
-              if (res.code === '') {
-                this.$message.success('成功拒绝打款')
-                this.dioObj.show = false
-                this.getAll(this.formInline)
-              }
-            })
-              .catch(() => {
-                this.$message({
-                  type: 'info',
-                  message: '已取消拒绝打款'
-                })
-              })
-            this.infoList.push({ name: '拒绝打款理由', value, fields: 'rejectReason' })
-          })
-            .catch(() => {
-              this.rejectReason = ''
-            })
-          return false
-        }
-      }
+    handleDetail(row) {
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
     },
-    // 查询详情
-    async getDetails(withdrawalId) {
-      const res = await applicationGetById({ withdrawalId })
-      if (res.code === '') {
-        this.details = res.data
-        this.getTopList(res.data)
-      }
-      //  判断是不是有拒绝打款理由
-      if (res.data.rejectReason && res.data.state == 2 || res.data.rejectReason && res.data.state == 4) {
-        this.infoList.push({ name: '拒绝打款理由', value: res.data.rejectReason, fields: 'rejectReason' })
-      }
-    },
-    async getTopList(o) {
-      this.infoList.map((item) => {
-        item.value = o[item.fields]
-      })
-      //  在这里获取统计的流水
-      const res = await getUserWater({ userId: o.buyerUserId })
-      this.watherInfo = res.data
-      this.getWatherTable(o.buyerUserId)
-    },
-
-    //  通联确认
-    async confirmTong(item) {
-      const obj = {
-        orderSn: item.orderSn,
-        withdrawalId: item.withdrawalId
-      }
-      await getTonglian(obj)
-      this.$message.success('通联确认成功')
-      this.getAll(this.formInline)
-    },
-    // 初始化查询所有数据
-    async getAll(formInline) {
-      //  加载状态
-      this.tableLoading = true
-      const res = await applicationGetAll(formInline)
-      //  清除加载状态
-      this.tableLoading = false
-      this.tableData = res.data.list
-      this.tableData.forEach((item) => {
-        item.phone = item.phone.replace(/(\d{3})\d+(\d{4})$/, '$1****$2')
-      })
-      this.total = res.data.total
+    handleResolve(row) {
+      this.$refs.WithdrawalProcessing && this.$refs.WithdrawalProcessing.handleOpen(row)
     },
-    //  获取流水表格数据
-    async getWatherTable(id) {
-      this.watherFlag = true
-      //  获取流水表格数据
-      this.watherParameter.acquirerId = id
-      const res = await getWaterRecord(this.watherParameter)
-      this.waterData = res.data.list
-      this.waterTotal = res.data.total
-      this.watherFlag = false
-    },
-    //  表格分页
-    waterChange(e) {
-      this.watherParameter.page = e
-      this.getWatherTable(this.watherParameter.acquirerId)
-    },
-    //  关闭弹窗的回调
-    closeDialog() {
-      this.dioObj.show = false
-      this.rejectReason = ''
-      this.confirmInfo = '确认信息'
-      // 清除流水表格信息 以及 load加载状态
-      this.waterData = []
-      console.log(this.dioObj)
-      this.infoList = this.infoList.filter((item) => item.fields != 'rejectReason')
+    // 通联确认
+    handleConfirmTong(row) {
+      this.$confirm('确定此项通联确认?')
+        .then(async () => {
+          await getTonglian({ orderSn: row.orderSn, withdrawalId: row.withdrawalId })
+          this.$message({ message: '操作成功!', type: 'success' })
+          this.handleSearch()
+        })
+        .catch(() => { })
     }
   }
 }
 </script>
 
-<style lang='scss' scoped>
-@import url("../../../styles/elDialog.scss");
-
-.custom_page {
+<style lang="scss" scoped>
+.app-container {
 	padding: 20px;
-}
-
-.box {
-	.dioBox {
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		flex-wrap: wrap;
+	display: flex;
+	flex-direction: column;
 
-		.inner {
-			width: 50%;
-			padding: 20px;
+	.filter-container {
+		.filter-item {
+			display: inline-block;
+			vertical-align: middle;
+			margin-bottom: 10px;
 		}
 	}
 
-	.botTitle {
-		color: red;
-		text-align: center;
+	.small-padding {
+		.cell {
+			padding-left: 5px;
+			padding-right: 5px;
+		}
 	}
-}
-
-.statistics {
-	display: flex;
-	align-items: center;
-	justify-content: space-around;
-	width: 100%;
-	margin: 10px 0 15px;
-
-	.statistics-item {
-		text-align: center;
 
-		h1 {
-			color: #ffae11;
-			font-size: 20px;
+	.fixed-width {
+		.el-button--mini {
+			padding: 7px 10px;
 		}
 	}
 }
-
-.dialog-pagination {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	margin-top: 15px;
-}
 </style>