沈丘营商办后台前端项目
346149741
2024-06-18 9fb6a0ff49c2af567be2e3adaf93c4c301b3f102
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true">
      <el-form-item label="用户账号" prop="userName">
        <el-input v-model="queryParams.userName" placeholder="请输入用户账号" clearable style="width: 200px" @keyup.enter="getDataList"></el-input>
      </el-form-item>
      <el-form-item label="订单号" prop="orderNo">
        <el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable style="width: 200px" @keyup.enter="getDataList"></el-input>
      </el-form-item>
      <el-form-item label="提现账户类型" prop="accountType">
        <el-select v-model="queryParams.accountType" placeholder="提现账户类型" clearable style="width: 200px">
          <el-option v-for="dict in account_type" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="审核状态" prop="checkState">
        <el-select v-model="queryParams.checkState" placeholder="审核状态" clearable style="width: 200px">
          <el-option v-for="dict in check_state" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="Search" @click="getDataList">搜索</el-button>
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <!-- <el-col :span="1.5">
              <el-button type="primary" plain :disabled="power.add" @click="handleRate">解冻</el-button>
            </el-col>
            <el-col :span="1.5">
              <el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
            </el-col> -->
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getDataList"></right-toolbar>
    </el-row>
    <el-table v-loading="tableOption.loading" :data="dataTable">
      <el-table-column type="index" width="50" />
      <el-table-column label="订单号" align="center" key="orderNo" prop="orderNo" width="180" />
      <el-table-column label="用户账号" align="center" key="userName" prop="userName" width="120" />
      <el-table-column label="真实姓名" align="center" key="realName" prop="realName" width="100" />
      <el-table-column label="账户类型" align="center" width="100">
        <template #default="scope">
          <span>{{ dispAccountType(scope.row.accountType) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="账户号" align="center" key="accountNo" prop="accountNo" width="200">
        <template #default="scope">
          <div v-if="scope.row.accountType == '1'">{{ scope.row.accountBank }}</div>
          <div>{{ scope.row.accountNo }}</div>
        </template>
      </el-table-column>
      <el-table-column label="提现金额" align="center" key="orderMoney" prop="orderMoney" />
      <el-table-column label="手续费" align="center" key="serviceMoney" prop="serviceMoney" />
      <el-table-column label="到账金额" align="center" key="realMoney" prop="realMoney" />
      <el-table-column label="备注" align="center" key="orderRemark" prop="orderRemark" />
      <el-table-column label="审核状态" align="center">
        <template #default="scope">
          <span>{{ dispCheckState(scope.row.checkState) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="审核时间" align="center" key="checkTime" prop="checkTime" />
    </el-table>
    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getDataList" />
  </div>
</template>
<script setup lang="ts">
import { reactive, onMounted, toRefs, ref, getCurrentInstance } from "vue";
import { GetDataList, GetDataInfo } from "@/api/orders/cash";
import type { FormInstance } from "element-plus";
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { account_type, check_state } = proxy.useDict("account_type", "check_state");
const state = reactive({
  dataTable: [] as any[], //数据列表
  total: 0, //总条数
  amountInfo: {} as any, //合计信息
  tableOption: {
    //表格配置
    loading: true,
  },
  power: {
    //操作权限
    add: false,
    single: false, //
    multiple: true, //
  },
  dataInfo: {} as any, //数据详情
  showSearch: true, //是否显示分类
  isOpenInfo: false,
  isOpenRate: false,
});
const { dataTable, total, tableOption, power, showSearch, isOpenRate, isOpenInfo, dataInfo } = toRefs(state);
 
onMounted(() => {
  getDataList();
});
 
//#region commonDisp
/**
 * 账户类型
 * @param e
 */
const dispAccountType = (e: string) => {
  let stt = account_type.value.find((f: Dict.dictType) => f.value == e);
  return stt ? stt.label : "";
};
 
/**
 * 审核状态
 * @param e
 */
const dispCheckState = (e: string) => {
  let stt = check_state.value.find((f: Dict.dictType) => f.value == e);
  return stt ? stt.label : "";
};
 
//#endregion
 
//#region  查询
 
const queryRef = ref<FormInstance>();
const queryParams = reactive({
  //查询配置参数
  pageNum: 1,
  pageSize: 10,
  userName: "", //用户账号
  accountType: "", //支付方式
  orderNo: "", //订单号
  checkState: "", //审核状态
});
/**
 * 获取数据列表
 */
const getDataList = async () => {
  // if (queryParams.shopState == 0) queryParams.shopState = "";
  await GetDataList(queryParams).then((res) => {
    if (res.code == 200) {
      state.dataTable = res.rows;
      state.total = res.total;
      state.tableOption.loading = false;
    }
  });
};
 
/**
 * 重置
 */
const resetQuery = () => {
  queryRef.value!.resetFields();
};
 
//#endregion
</script>
 
<style scoped lang="scss">
._cu_row {
  padding: 5px 0px;
  align-items: center;
}
 
.el-table :deep(.danger-row) {
  --el-table-tr-bg-color: var(--el-color-danger-light-9);
}
._el-row {
  padding: 5px 0px;
  border-bottom: 1px solid var(--el-border-color);
  // margin-left: 20px;
  align-items: center;
 
  .el-input__wrapper {
    padding: 0px !important;
  }
}
// .td {
//   overflow: hidden;
// }
// :deep(.el-descriptions__table) {
//   table-layout: fixed;
// }
:deep(.el-descriptions__cell) {
  padding: 8px 0px !important;
}
// .custom-item-sty {
//   color: #333;
//   padding: 8px 0px;
//   font-weight: bold;
//   overflow-x: hidden;
// }
</style>