Explorar o código

导出提现记录

DELL %!s(int64=3) %!d(string=hai) anos
pai
achega
016376872b
Modificáronse 2 ficheiros con 49 adicións e 2 borrados
  1. 11 1
      src/api/finance/withdraw.js
  2. 38 1
      src/views/finance/withdraw/index.vue

+ 11 - 1
src/api/finance/withdraw.js

@@ -26,4 +26,14 @@ export function withdrawVerify(data) {
     method: 'post',
     data
   })
-}
+}
+
+// 导出
+export function exchangeWithdrawExport(data) {
+  return request({
+    url: '/api/v1/mp/admin/channel/withdraw/export',
+    method: 'post',
+    timeout: 15 * 60 * 1000,
+    data
+  })
+}

+ 38 - 1
src/views/finance/withdraw/index.vue

@@ -43,13 +43,27 @@
         >
       </el-form-item>
     </el-form>
+
     <!-- 刷新 -->
     <el-row :gutter="10">
+      <el-col :span="1.5">
+        <el-button
+          type="infor"
+          plain
+          icon="el-icon-download"
+          size="small"
+          @click="handleExportDraw"
+          v-hasPermi="['finance:withdraw:export']"
+        >导出记录</el-button
+        >
+      </el-col>
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
       ></right-toolbar>
     </el-row>
+    <br>
+
     <!-- 列表状态 -->
     <el-tabs type="card" v-model="state" @tab-click="handleClick">
       <el-tab-pane label="全部" name="null"></el-tab-pane>
@@ -121,7 +135,7 @@
   </div>
 </template>
 <script>
-import { withdrawList, withdrawDetail } from "@/api/finance/withdraw";
+import { withdrawList, withdrawDetail, exchangeWithdrawExport } from "@/api/finance/withdraw";
 import WithdrawDetail from './components/Detail'
 export default {
   name: "Withdraw",
@@ -250,6 +264,29 @@ export default {
       this.detailShow = false;
       this.getList();
     },
+    // 导出订单
+    handleExportDraw() {
+      this.$confirm("是否确认导出记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.vloading = this.$loading({
+            lock: true,
+            text: "正在导出记录.....",
+            background: "rgba(0, 0, 0, 0.7)",
+          });
+          return exchangeWithdrawExport(this.queryParams);
+        })
+        .then((response) => {
+          this.vloading.close();
+          this.download(response.msg);
+        })
+        .catch(() => {
+          this.vloading.close();
+        });
+    },
   },
 };
 </script>