소스 검색

Merge branch 'feat/v20241023-商家代金券提现' into dev

GuYun-D 5 달 전
부모
커밋
cae8cc3aea

+ 299 - 269
src/api/business.js

@@ -1,269 +1,299 @@
-import request from '@/utils/request'
-
-// ******商家列表******
-// 商家管理查询
-export function businessListGetAll(data) {
-  return request({
-    url: '/shop/getAll',
-    method: 'post',
-    data
-  })
-}
-
-// 新增商家
-export function businessListSave(data) {
-  return request({
-    url: '/shop/save',
-    method: 'post',
-    data
-  })
-}
-
-// 商家编辑查询
-export function businessListGetById(data) {
-  return request({
-    url: '/shop/getById',
-    method: 'post',
-    data
-  })
-}
-
-//   修改商家
-export function businessListUpdate(data) {
-  return request({
-    url: '/shop/update',
-    method: 'post',
-    data
-  })
-}
-
-// 启停用商家
-export function businessListStart(data) {
-  return request({
-    url: '/shop/start',
-    method: 'post',
-    data
-  })
-}
-
-export function delBusinessById(data) {
-  return request({
-    url: '/shop/cleanShop',
-    method: 'post',
-    data
-  })
-}
-
-// 入驻申请
-// 入驻申请管理查询
-export function settlementGetAll(data) {
-  return request({
-    url: '/check/getAll',
-    method: 'post',
-    data
-  })
-}
-
-// 入驻申请详情
-export function settlementGetById(data) {
-  return request({
-    url: '/check/getById',
-    method: 'post',
-    data
-  })
-}
-
-// 处理
-export function settlementHandle(data) {
-  return request({
-    url: '/check/handle',
-    method: 'post',
-    data
-  })
-}
-
-// 删除
-export function settlementDelete(data) {
-  return request({
-    url: '/check/delete',
-    method: 'post',
-    data
-  })
-}
-
-// **********************关键词**********************
-// 启停用
-export function wordStart(data) {
-  return request({
-    url: '/word/start',
-    method: 'post',
-    data
-  })
-}
-
-// 启停用
-export function wordGetAll(data) {
-  return request({
-    url: '/word/getAll',
-    method: 'post',
-    data
-  })
-}
-
-// 添加关键词
-export function wordAdd(data) {
-  return request({
-    url: '/word/save',
-    method: 'post',
-    data
-  })
-}
-
-// 修改关键词查询
-export function wordGetById(data) {
-  return request({
-    url: '/word/getById',
-    method: 'post',
-    data
-  })
-}
-
-// 修改关键词
-export function wordUpdate(data) {
-  return request({
-    url: '/word/update',
-    method: 'post',
-    data
-  })
-}
-
-// 删除关键词
-export function wordDelete(data) {
-  return request({
-    url: '/word/delete',
-    method: 'post',
-    data
-  })
-}
-
-
-// **********************商家分类**********************
-// 添加商家分类
-export function businessClassList(data) {
-  return request({
-    url: '/shopCategory/getAll',
-    method: "post",
-    data
-  })
-}
-
-// 根据一级获取
-export function businessClassListById(data) {
-  return request({
-    url: "/shopCategory/getById",
-    method: "post",
-    data
-  })
-}
-
-// 删除标签分类
-export function deleteBusinessClass(data) {
-  return request({
-    url: "/shopCategory/deleteCategory",
-    method: "post",
-    data
-  })
-}
-
-// 更新标签
-export function updateBusinessClass(data) {
-  return request({
-    url: "/shopCategory/updateCategory",
-    method: "post",
-    data
-  })
-}
-
-// 添加分类
-export function addBusinessClass(data) {
-  return request({
-    url: '/shopCategory/addCategory',
-    data,
-    method: "post"
-  })
-}
-
-
-// **********品牌工厂***********
-// 获取所有分类
-
-export function factoryClassList(data) {
-  return request({
-    url: '/shopCategoryMall/getAll',
-    method: "post",
-    data
-  })
-}
-
-export function factoryClassListById(data) {
-  return request({
-    url: "/shopCategoryMall/getById",
-    method: "post",
-    data
-  })
-}
-
-// 删除标签分类
-export function deleteFactoryClass(data) {
-  return request({
-    url: "/shopCategoryMall/deleteCategory",
-    method: "post",
-    data
-  })
-}
-
-// 更新标签
-export function updateFactoryClass(data) {
-  return request({
-    url: "/shopCategoryMall/updateCategory",
-    method: "post",
-    data
-  })
-}
-
-// 添加分类
-export function addFactoryClass(data) {
-  return request({
-    url: '/shopCategoryMall/addCategory',
-    data,
-    method: "post"
-  })
-}
-
-// 获取所有分类树
-export function getAllCategoryClassTree(data) {
-  return request({
-    url: "shopCategory/getAllTree",
-    data,
-    method: "get"
-  })
-}
-
-
-//  分页查询商家的收款码
-export function getAllPaymentCode(data) {
-  return request({
-    url: "/paymentCode/getAll",
-    data,
-    method: "post"
-  })
-}
-
-//  禁用该收款码
-export function disablePaymentCode(data) {
-  return request({
-    url: "/paymentCode/handle",
-    data,
-    method: "post"
-  })
-}
+import request from '@/utils/request'
+
+// ******商家列表******
+// 商家管理查询
+export function businessListGetAll(data) {
+  return request({
+    url: '/shop/getAll',
+    method: 'post',
+    data
+  })
+}
+
+// 新增商家
+export function businessListSave(data) {
+  return request({
+    url: '/shop/save',
+    method: 'post',
+    data
+  })
+}
+
+// 商家编辑查询
+export function businessListGetById(data) {
+  return request({
+    url: '/shop/getById',
+    method: 'post',
+    data
+  })
+}
+
+//   修改商家
+export function businessListUpdate(data) {
+  return request({
+    url: '/shop/update',
+    method: 'post',
+    data
+  })
+}
+
+// 启停用商家
+export function businessListStart(data) {
+  return request({
+    url: '/shop/start',
+    method: 'post',
+    data
+  })
+}
+
+export function delBusinessById(data) {
+  return request({
+    url: '/shop/cleanShop',
+    method: 'post',
+    data
+  })
+}
+
+// 入驻申请
+// 入驻申请管理查询
+export function settlementGetAll(data) {
+  return request({
+    url: '/check/getAll',
+    method: 'post',
+    data
+  })
+}
+
+// 入驻申请详情
+export function settlementGetById(data) {
+  return request({
+    url: '/check/getById',
+    method: 'post',
+    data
+  })
+}
+
+// 处理
+export function settlementHandle(data) {
+  return request({
+    url: '/check/handle',
+    method: 'post',
+    data
+  })
+}
+
+// 删除
+export function settlementDelete(data) {
+  return request({
+    url: '/check/delete',
+    method: 'post',
+    data
+  })
+}
+
+// **********************关键词**********************
+// 启停用
+export function wordStart(data) {
+  return request({
+    url: '/word/start',
+    method: 'post',
+    data
+  })
+}
+
+// 启停用
+export function wordGetAll(data) {
+  return request({
+    url: '/word/getAll',
+    method: 'post',
+    data
+  })
+}
+
+// 添加关键词
+export function wordAdd(data) {
+  return request({
+    url: '/word/save',
+    method: 'post',
+    data
+  })
+}
+
+// 修改关键词查询
+export function wordGetById(data) {
+  return request({
+    url: '/word/getById',
+    method: 'post',
+    data
+  })
+}
+
+// 修改关键词
+export function wordUpdate(data) {
+  return request({
+    url: '/word/update',
+    method: 'post',
+    data
+  })
+}
+
+// 删除关键词
+export function wordDelete(data) {
+  return request({
+    url: '/word/delete',
+    method: 'post',
+    data
+  })
+}
+
+
+// **********************商家分类**********************
+// 添加商家分类
+export function businessClassList(data) {
+  return request({
+    url: '/shopCategory/getAll',
+    method: "post",
+    data
+  })
+}
+
+// 根据一级获取
+export function businessClassListById(data) {
+  return request({
+    url: "/shopCategory/getById",
+    method: "post",
+    data
+  })
+}
+
+// 删除标签分类
+export function deleteBusinessClass(data) {
+  return request({
+    url: "/shopCategory/deleteCategory",
+    method: "post",
+    data
+  })
+}
+
+// 更新标签
+export function updateBusinessClass(data) {
+  return request({
+    url: "/shopCategory/updateCategory",
+    method: "post",
+    data
+  })
+}
+
+// 添加分类
+export function addBusinessClass(data) {
+  return request({
+    url: '/shopCategory/addCategory',
+    data,
+    method: "post"
+  })
+}
+
+
+// **********品牌工厂***********
+// 获取所有分类
+
+export function factoryClassList(data) {
+  return request({
+    url: '/shopCategoryMall/getAll',
+    method: "post",
+    data
+  })
+}
+
+export function factoryClassListById(data) {
+  return request({
+    url: "/shopCategoryMall/getById",
+    method: "post",
+    data
+  })
+}
+
+// 删除标签分类
+export function deleteFactoryClass(data) {
+  return request({
+    url: "/shopCategoryMall/deleteCategory",
+    method: "post",
+    data
+  })
+}
+
+// 更新标签
+export function updateFactoryClass(data) {
+  return request({
+    url: "/shopCategoryMall/updateCategory",
+    method: "post",
+    data
+  })
+}
+
+// 添加分类
+export function addFactoryClass(data) {
+  return request({
+    url: '/shopCategoryMall/addCategory',
+    data,
+    method: "post"
+  })
+}
+
+// 获取所有分类树
+export function getAllCategoryClassTree(data) {
+  return request({
+    url: "shopCategory/getAllTree",
+    data,
+    method: "get"
+  })
+}
+
+
+//  分页查询商家的收款码
+export function getAllPaymentCode(data) {
+  return request({
+    url: "/paymentCode/getAll",
+    data,
+    method: "post"
+  })
+}
+
+//  禁用该收款码
+export function disablePaymentCode(data) {
+  return request({
+    url: "/paymentCode/handle",
+    data,
+    method: "post"
+  })
+}
+
+// **********商家代金券提现申请***********
+
+//  查询申请列表
+export function getWithdrawalApplicationList(data) {
+  return request({
+    url: "/shop-vouchers-withdrawal-qualification/getWithdrawalQualificationAll",
+    data,
+    method: "post"
+  })
+}
+
+// 审核
+export function examineWithdrawalApplication(data) {
+  return request({
+    url: "/shop-vouchers-withdrawal-qualification/auditWithdrawalQualification",
+    data,
+    method: "post"
+  })
+}
+
+
+// 代金券提现记录
+export function getWithdrawalRecortAllApi(data) {
+  return request({
+    url: "/shop-vouchers-withdrawal-qualification/getWithdrawalRecortAll",
+    data,
+    method: "post"
+  })
+}

+ 100 - 0
src/views/business/voucherApply/Examine.vue

@@ -0,0 +1,100 @@
+<template>
+  <el-dialog title="商家代金券提现审核" :visible.sync="examineVisible" width="30%" :close-on-click-modal="false">
+    <el-form ref="examineFormRef" :model="form" label-width="auto" :rules="rules">
+      <el-form-item label="审核状态" prop="auditStatus">
+        <el-radio-group v-model="form.auditStatus">
+          <el-radio :label="2">通过</el-radio>
+          <el-radio :label="3">不通过</el-radio>
+        </el-radio-group>
+      </el-form-item>
+
+      <el-form-item v-if="form.auditStatus === 2" label="提现比例" prop="ratio" :rules="[{ validator: validateRatio, trigger: 'blur' }]">
+        <el-input placeholder="请输入提现比例" v-model="form.ratio">
+          <template slot="append">%</template>
+        </el-input>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="mini" @click="examineVisible = false">取 消</el-button>
+      <el-button size="mini" type="primary" @click="handleSubmit" :loading="isLoading">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+// api docs: https://www.showdoc.com.cn/2068420669770919/11538603024917661
+import { examineWithdrawalApplication } from '@/api/business'
+
+export default {
+  data() {
+    return {
+      examineVisible: false,
+      form: {
+        id: '',
+        auditStatus: 2, // 1=已申请、2=审核通过、3=审核不通过
+        ratio: '' // 提现比例,最高不能超过0.4, [0, 40]
+      },
+      rules: {
+        auditStatus: [{ required: true, message: '请选择审核状态', type: 'number' }]
+      },
+      isLoading: false
+    }
+  },
+
+  watch: {
+    examineVisible(val) {
+      if (!val) {
+        this.reset()
+      }
+    }
+  },
+
+  methods: {
+    open(row) {
+      if (!row.id) {
+        return this.$message.error('数据错误')
+      }
+      this.form.id = row.id
+      this.examineVisible = true
+    },
+
+    validateRatio(rule, value, callback) {
+      const number = Number(value)
+      if (isNaN(number)) {
+        callback(new Error('提现比例必须是数字'))
+      } else if (!Number.isInteger(number)) {
+        callback(new Error('必须是整数'))
+      } else if (number <= 0 || number > 40) {
+        callback(new Error('提现比例必须大于0且小于等于40'))
+      } else {
+        callback()
+      }
+    },
+
+    async handleSubmit() {
+      this.isLoading = true
+      try {
+        await this.$refs.examineFormRef.validate()
+        const data = JSON.parse(JSON.stringify(this.form))
+        data.ratio = (data.ratio / 100).toFixed(2)
+        const res = await examineWithdrawalApplication(data)
+        if (res.code == '200') {
+          this.$message.success('审核成功')
+          this.$emit('refresh')
+          this.examineVisible = false
+        }
+      } finally {
+        this.isLoading = false
+      }
+    },
+
+    reset() {
+      this.$refs.examineFormRef.resetFields()
+      this.form.auditStatus = 2
+      this.form.ratio = ''
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 130 - 0
src/views/business/voucherApply/index.vue

@@ -0,0 +1,130 @@
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <!-- <div class="filter-container">
+      <el-input v-model="listQuery.shopName" clearable size="mini" class="filter-item" style="width: 200px; margin-left: 10px" placeholder="请输入商家名称" />
+      <el-button size="mini" class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 10px" @click="handleSearch">查找</el-button>
+      <br />
+      <el-button size="mini" type="primary" icon="el-icon-plus" @click="$refs.EditModal && $refs.EditModal.handleOpen({ shopId: '' })">添加</el-button>
+    </div> -->
+
+    <!-- 查询结果 -->
+    <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" label="商家ID" prop="shopId" fixed="left" />
+        <el-table-column align="center" label="商家名称 " prop="shopName"></el-table-column>
+
+        <el-table-column align="center" label="审核状态" prop="auditStatus">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.auditStatus === 2" :style="{ marginRight: '6px' }" type="success">已通过</el-tag>
+            <el-tag v-if="row.auditStatus === 1" :style="{ marginRight: '6px' }" type="warning">已申请</el-tag>
+            <el-tag v-if="row.auditStatus === 3" :style="{ marginRight: '6px' }" type="danger">不通过</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" label="提现比例" prop="ratio">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.ratio" :style="{ marginRight: '6px' }" type="success">{{ row.ratio * 100 + '%' }}</el-tag>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" label="操作" width="220" fixed="right" class-name="small-padding fixed-width">
+          <template slot-scope="{ row }">
+            <el-button :disabled="[2, 3].includes(row.auditStatus)" type="warning" size="mini" @click="handleDetail(row)">资格审核</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div style="padding-top: 10px;">
+      <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>
+
+    <Examine @refresh="refresh" ref="examineRef"></Examine>
+  </div>
+</template>
+
+<script>
+import { getWithdrawalApplicationList } from '@/api/business'
+import Examine from './Examine.vue'
+
+export default {
+  name: 'voucherApply',
+  components: { Examine },
+  data() {
+    return {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        pageSize: 20
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await getWithdrawalApplicationList(this.listQuery)
+        this.list = res.data.list
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    handleDetail(row) {
+      this.$refs.examineRef && this.$refs.examineRef.open(row)
+    },
+    refresh() {
+      this.listQuery.page = 1
+      this.getList()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-container {
+  padding: 20px;
+  display: flex;
+  flex-direction: column;
+
+  .filter-container {
+    .filter-item {
+      display: inline-block;
+      vertical-align: middle;
+      margin-bottom: 10px;
+    }
+  }
+
+  .small-padding {
+    .cell {
+      padding-left: 5px;
+      padding-right: 5px;
+    }
+  }
+
+  .fixed-width {
+    .el-button--mini {
+      padding: 7px 10px;
+    }
+  }
+}
+</style>

+ 149 - 0
src/views/business/withdrawalRecord/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <!-- <div class="filter-container">
+      <el-input v-model="listQuery.shopName" clearable size="mini" class="filter-item" style="width: 200px; margin-left: 10px" placeholder="请输入商家名称" />
+      <el-button size="mini" class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 10px" @click="handleSearch">查找</el-button>
+      <br />
+      <el-button size="mini" type="primary" icon="el-icon-plus" @click="$refs.EditModal && $refs.EditModal.handleOpen({ shopId: '' })">添加</el-button>
+    </div> -->
+
+    <!-- 查询结果 -->
+    <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" label="#" type="index" width="50"></el-table-column>
+        <el-table-column align="center" prop="shopId" label="商家ID" width="70" />
+        <el-table-column align="center" prop="vouchersNumber" label="代金券提现数量" width="120" />
+        <el-table-column align="center" prop="amount" label="实际提现金额" width="120" />
+        <el-table-column align="center" prop="type" label="代金券提现类型" width="120">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.type === 1">充值</el-tag>
+            <el-tag v-if="row.type === 2">兑换</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="ratio" label="代金券提现比例" width="120">
+          <template slot-scope="{ row }">
+            <el-tag type="success">{{ parseInt(row.ratio * 100) + '%' }}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="handleSn" label="对应提现单号" width="200" />
+        <el-table-column align="center" prop="entryAccountSn" label="入账单号集合">
+          <template slot-scope="{ row }">
+            <el-popover placement="right" width="400" trigger="click">
+              <ul class="popover-list">
+                <li class="popover-list-li" v-for="(item, index) in row.entryAccountSn.split(',')" :key="item + index">{{ item }}</li>
+              </ul>
+              <el-button slot="reference" type="primary" size="mini">查看</el-button>
+            </el-popover>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="outgoingAccountSn" label="出账单号集合">
+          <template slot-scope="{ row }">
+            <el-popover placement="right" width="400" trigger="click">
+              <ul class="popover-list">
+                <li class="popover-list-li" v-for="(item, index) in row.outgoingAccountSn.split(',')" :key="item + index">{{ item }}</li>
+              </ul>
+              <el-button slot="reference" type="primary" size="mini">查看</el-button>
+            </el-popover>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
+      </el-table>
+    </div>
+
+    <div style="padding-top: 10px">
+      <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>
+  </div>
+</template>
+
+<script>
+import { getWithdrawalRecortAllApi } from '@/api/business'
+
+export default {
+  name: 'withdrawalRecord',
+  data() {
+    return {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        pageSize: 20
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await getWithdrawalRecortAllApi(this.listQuery)
+        this.list = res.data.list
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    handleDetail(row) {
+      this.$refs.examineRef && this.$refs.examineRef.open(row)
+    },
+    refresh() {
+      this.listQuery.page = 1
+      this.getList()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.popover-list {
+  height: 300px;
+  overflow-y: auto;
+
+  &::-webkit-scrollbar {
+    background-color: transparent;
+    width: 10px;
+  }
+
+  &::-webkit-scrollbar-thumb {
+    background-color: #e9e9e9;
+    border-radius: 5px;
+    width: 10px;
+  }
+
+  .popover-list-li {
+    height: 30px;
+    line-height: 30px;
+    padding-left: 20px;
+    position: relative;
+
+    &::after {
+      content: '';
+      position: absolute;
+      display: block;
+      width: 10px;
+      height: 10px;
+      border-radius: 50%;
+      background-color: #409eff;
+      top: 50%;
+      left: 0;
+      transform: translateY(-50%);
+    }
+  }
+}
+</style>

+ 166 - 187
src/views/finance/withdrawal/index.vue

@@ -1,187 +1,166 @@
-<!--  -->
-<template>
-  <div class="app-container">
-    <!-- 查询和其他操作 -->
-    <div class="filter-container">
-      <el-input
-        v-model="listQuery.shopName" clearable size="mini" class="filter-item"
-        style="width: 200px;"
-        placeholder="请输入店铺名称"
-      />
-      <el-input
-        v-model="listQuery.shopCode" clearable size="mini" class="filter-item"
-        style="width: 200px;margin-left: 10px;" placeholder="请输入店铺编码"
-      />
-      <el-date-picker
-        v-model="listQuery.startTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"
-        size="mini" class="filter-item" style="width: 200px;margin-left: 10px;"
-      />
-      <el-select
-        v-model="listQuery.state" clearable size="mini" class="filter-item"
-        style="width: 200px;margin-left: 10px;" placeholder="请选择处理状态"
-      >
-        <el-option label="待处理" value="0" />
-        <el-option label="已处理" value="1" />
-        <el-option label="通过" value="2" />
-        <el-option label="拒绝" value="3" />
-        <el-option label="待确认" value="4" />
-      </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>
-
-    <!-- 查询结果 -->
-    <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="shopName" show-overflow-tooltip />
-        <el-table-column align="center" min-width="150" label="店铺编码" prop="shopCode" show-overflow-tooltip />
-        <el-table-column align="center" width="120" label="提现金额" prop="withdrawalMoney" show-overflow-tooltip />
-        <el-table-column align="center" label="处理状态" prop="state">
-          <template slot-scope="{ row }">
-            <el-tag v-if="row.state === 0" effect="plain" type="info">待处理</el-tag>
-            <el-tag v-else-if="row.state === 1" effect="plain" type="success">已处理</el-tag>
-            <el-tag v-else-if="row.state === 2" effect="plain">通过</el-tag>
-            <el-tag v-else-if="row.state === 3" effect="plain" type="warning">拒绝</el-tag>
-            <el-tag v-else-if="row.state === 4" effect="plain" type="danger">待确认</el-tag>
-            <span v-else>--</span>
-          </template>
-        </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 == 2)" size="mini" @click="handleResolve(row)">
-              处理
-            </el-button>
-            <el-button v-if="row.state == 4" 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 WithdrawalProcessing from './components/WithdrawalProcessing'
-import DetailModal from './components/DetailModal'
-import { withdrawalGetAll, updateWithdrawalByAllinpay } from '@/api/withdrawal'
-export default {
-  name: 'Withdrawal',
-  components: {
-    WithdrawalProcessing,
-    DetailModal
-  },
-  data() {
-    return {
-      listQuery: {
-        shopName: '', // 店铺名称
-        shopCode: '', // 店铺编号
-        startTime: '', // 申请时间数组
-        state: '', // 处理状态 1-已处理 0-未处理
-        page: 1,
-        pageSize: 10
-      },
-      list: [],
-      total: 0,
-      listLoading: true
-    }
-  },
-  mounted() {
-    this.getList()
-  },
-  methods: {
-    async getList() {
-      this.listLoading = true
-      try {
-        const res = await withdrawalGetAll(this.listQuery)
-        this.list = res.data.list
-        this.total = res.data.total
-      } finally {
-        this.listLoading = false
-      }
-    },
-    handleSearch() {
-      this.listQuery.page = 1
-      this.getList()
-    },
-    handleReset() {
-      this.listQuery = { shopName: '', shopCode: '', dates: [], state: '', page: 1, pageSize: 10 }
-      this.getList()
-    },
-    handleDetail(row) {
-      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
-    },
-    handleResolve(row) {
-      this.$refs.WithdrawalProcessing && this.$refs.WithdrawalProcessing.handleOpen(row)
-    },
-    handleConfirmTong(row) {
-      this.$confirm('确定此项通联确认?')
-        .then(async () => {
-          await updateWithdrawalByAllinpay({ handleSn: row.handleSn, withdrawalId: row.withdrawalId })
-          this.$message({ message: '操作成功!', type: 'success' })
-          this.handleSearch()
-        })
-        .catch(() => {})
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.app-container {
-	padding: 20px;
-	display: flex;
-	flex-direction: column;
-
-	.filter-container {
-		.filter-item {
-			display: inline-block;
-			vertical-align: middle;
-			margin-bottom: 10px;
-		}
-	}
-
-	.small-padding {
-		.cell {
-			padding-left: 5px;
-			padding-right: 5px;
-		}
-	}
-
-	.fixed-width {
-		.el-button--mini {
-			padding: 7px 10px;
-		}
-	}
-}
-</style>
+<!--  -->
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input v-model="listQuery.shopName" clearable size="mini" class="filter-item" style="width: 200px" placeholder="请输入店铺名称" />
+      <el-input v-model="listQuery.shopCode" clearable size="mini" class="filter-item" style="width: 200px; margin-left: 10px" placeholder="请输入店铺编码" />
+      <el-date-picker v-model="listQuery.startTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" size="mini" class="filter-item" style="width: 200px; margin-left: 10px" />
+      <el-select v-model="listQuery.state" clearable size="mini" class="filter-item" style="width: 200px; margin-left: 10px" placeholder="请选择处理状态">
+        <el-option label="待处理" value="0" />
+        <el-option label="已处理" value="1" />
+        <el-option label="通过" value="2" />
+        <el-option label="拒绝" value="3" />
+        <el-option label="待确认" value="4" />
+      </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>
+
+    <!-- 查询结果 -->
+    <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="shopName" show-overflow-tooltip />
+        <el-table-column align="center" min-width="150" label="店铺编码" prop="shopCode" show-overflow-tooltip />
+        <el-table-column align="center" min-width="150" label="提现类型" prop="withdrawalType">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.withdrawalType === 1" effect="plain" type="info">普通订单</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 2" effect="plain" type="success">交易金</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 3" effect="plain">代金券</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="120" label="提现金额" prop="withdrawalMoney" show-overflow-tooltip />
+        <el-table-column align="center" label="处理状态" prop="state">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.state === 0" effect="plain" type="info">待处理</el-tag>
+            <el-tag v-else-if="row.state === 1" effect="plain" type="success">已处理</el-tag>
+            <el-tag v-else-if="row.state === 2" effect="plain">通过</el-tag>
+            <el-tag v-else-if="row.state === 3" effect="plain" type="warning">拒绝</el-tag>
+            <el-tag v-else-if="row.state === 4" effect="plain" type="danger">待确认</el-tag>
+            <span v-else>--</span>
+          </template>
+        </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 == 2" size="mini" @click="handleResolve(row)">处理</el-button>
+            <el-button v-if="row.state == 4" 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 WithdrawalProcessing from './components/WithdrawalProcessing'
+import DetailModal from './components/DetailModal'
+import { withdrawalGetAll, updateWithdrawalByAllinpay } from '@/api/withdrawal'
+export default {
+  name: 'Withdrawal',
+  components: {
+    WithdrawalProcessing,
+    DetailModal
+  },
+  data() {
+    return {
+      listQuery: {
+        shopName: '', // 店铺名称
+        shopCode: '', // 店铺编号
+        startTime: '', // 申请时间数组
+        state: '', // 处理状态 1-已处理 0-未处理
+        page: 1,
+        pageSize: 10
+      },
+      list: [],
+      total: 0,
+      listLoading: true
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await withdrawalGetAll(this.listQuery)
+        this.list = res.data.list
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    handleReset() {
+      this.listQuery = { shopName: '', shopCode: '', dates: [], state: '', page: 1, pageSize: 10 }
+      this.getList()
+    },
+    handleDetail(row) {
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
+    },
+    handleResolve(row) {
+      this.$refs.WithdrawalProcessing && this.$refs.WithdrawalProcessing.handleOpen(row)
+    },
+    handleConfirmTong(row) {
+      this.$confirm('确定此项通联确认?')
+        .then(async () => {
+          await updateWithdrawalByAllinpay({ handleSn: row.handleSn, withdrawalId: row.withdrawalId })
+          this.$message({ message: '操作成功!', type: 'success' })
+          this.handleSearch()
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-container {
+  padding: 20px;
+  display: flex;
+  flex-direction: column;
+
+  .filter-container {
+    .filter-item {
+      display: inline-block;
+      vertical-align: middle;
+      margin-bottom: 10px;
+    }
+  }
+
+  .small-padding {
+    .cell {
+      padding-left: 5px;
+      padding-right: 5px;
+    }
+  }
+
+  .fixed-width {
+    .el-button--mini {
+      padding: 7px 10px;
+    }
+  }
+}
+</style>