You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

721 lines
23 KiB

2 months ago
2 months ago
3 weeks ago
3 months ago
5 months ago
3 weeks ago
2 months ago
3 months ago
3 months ago
3 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
3 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
3 months ago
  1. <script setup>
  2. // 这是退款明细页面
  3. import { computed, onMounted, ref,watch } from 'vue'
  4. import { ElMessage } from 'element-plus'
  5. import moment from 'moment'
  6. import API from '@/util/http.js'
  7. import request from '@/util/http.js'
  8. import { reverseMarketMapping } from "@/utils/marketMap.js";
  9. import { useAdminStore } from "@/store/index.js";
  10. import { storeToRefs } from "pinia";
  11. import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js"
  12. import dayjs from "dayjs";
  13. const adminStore = useAdminStore();
  14. const { adminData, menuTree, flag } = storeToRefs(adminStore);
  15. // 监听全局flag状态变化
  16. watch(flag, (newFlag, oldFlag) => {
  17. // 当flag状态改变时,重新发送请求
  18. if (newFlag !== oldFlag) {
  19. console.log('员工数据flag状态改变,重新加载数据', newFlag)
  20. getSelectBy()
  21. }
  22. })
  23. // const showEmployeeData = ref(false)
  24. const canLook = ref(findMenuById(menuTree.value, permissionMapping.gold_coin_refund_details))
  25. const defaultTime = [
  26. new Date(2000, 1, 1, 0, 0, 0),
  27. new Date(2000, 2, 1, 23, 59, 59),
  28. ]
  29. //无法选择的时间
  30. const disabledDate = (time) => {
  31. const limitDate = new Date(2025, 0, 1);
  32. return time.getTime() < limitDate.getTime();
  33. }
  34. const format3 = (num) => {
  35. // 每三位添加逗号
  36. return num.toLocaleString('en-US')
  37. }
  38. // 精网号去空格
  39. const trimJwCode = () => {
  40. if (refundUser.value.jwcode) {
  41. // 去除所有空格,并尝试转换为整数
  42. const trimmed = refundUser.value.jwcode.toString().replace(/\s/g, '');
  43. const numeric = Number(trimmed);
  44. // 如果转换为数字成功,保存为数字,否则提示错误
  45. if (!isNaN(numeric)) {
  46. refundUser.value.jwcode = numeric;
  47. } else {
  48. ElMessage.error("精网号格式不正确,请输入数字");
  49. }
  50. }
  51. }
  52. // 变量
  53. //这是获取用户信息的接口
  54. // 标记当前激活的时间范围按钮
  55. const activeTimeRange = ref('')
  56. // 日期选择器变化时清除按钮激活状态
  57. const handleDatePickerChange = () => {
  58. activeTimeRange.value = ''
  59. }
  60. // 充值明细表格
  61. const tableData = ref([])
  62. // 搜索======================================
  63. // 搜索detail
  64. const refundUser = ref({
  65. market: "",
  66. refundType: ""
  67. })
  68. // 搜索对象
  69. const getObj = ref({
  70. pageNum: 1,
  71. pageSize: 50
  72. })
  73. //分页总条目
  74. const total = ref(100)
  75. // 搜索对象时间
  76. const getTime = ref([])
  77. // 搜索地区列表
  78. const market = ref([])
  79. // 定义响应式变量存储金币合计数
  80. const permanentGolds = ref(0)
  81. const freeGolds = ref(0)
  82. const taskGolds = ref(0)
  83. // 计算总金币数
  84. const sumGolds = computed(() => permanentGolds.value + freeGolds.value + taskGolds.value)
  85. // 退款类型
  86. const refundType = ref([])
  87. //时间格式化
  88. const formatTime = (val) => val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : ''
  89. // 获取退款类型
  90. const getRefundTypes = async function () {
  91. try {
  92. // 发送请求获取退款类型
  93. const result = await API({
  94. url: '/refund/refundType', //这里应该写上一个退款类型的接口
  95. data: {}
  96. })
  97. console.log('退款类型请求成功', result)
  98. // 检查返回的数据是否为数组
  99. if (Array.isArray(result.data)) {
  100. // 将字符串数组转换为 { value, label } 格式
  101. refundType.value = result.data.map(item => ({ value: item, label: item }));
  102. } else {
  103. console.error('退款类型数据格式错误', result)
  104. ElMessage.error('退款类型数据格式错误,请联系管理员')
  105. }
  106. console.log('退款类型', refundType.value)
  107. } catch (error) {
  108. console.log('退款类型请求失败', error)
  109. }
  110. }
  111. // 搜索==============================================================
  112. // 搜索方法
  113. const getSelectBy = async function (val) {
  114. if (!canLook.value) {
  115. console.log('无此权限', canLook.value)
  116. ElMessage.error('无此权限')
  117. return
  118. }
  119. try {
  120. // 搜索参数页码赋值
  121. if (typeof val === 'number') {
  122. getObj.value.pageNum = val
  123. }
  124. // 搜索参数时间赋值
  125. if (getTime.value != null) {
  126. if (getTime.value.startTime != '' && getTime.value.endTime != '') {
  127. refundUser.value.startTime = formatTime(getTime.value[0])
  128. refundUser.value.endTime = formatTime(getTime.value[1])
  129. }
  130. } else {
  131. refundUser.value.startTime = ''
  132. refundUser.value.endTime = ''
  133. }
  134. // 添加排序字段和排序方式到请求参数
  135. refundUser.value.sortField = sortField.value
  136. refundUser.value.sortOrder = sortOrder.value
  137. console.log('搜索参数', getObj.value)
  138. // 发送POST请求
  139. // if (refundUser.value.market === '9' || refundUser.value.market === '9999') {
  140. // refundUser.value.market = '';
  141. // }
  142. if (refundUser.value.jwcode) {
  143. // 纯数字
  144. const numberRegex = /^\d{1,9}$/;
  145. // 检查是否不是数字
  146. if (!numberRegex.test(refundUser.value.jwcode)) {
  147. ElMessage.error('请检查精网号格式')
  148. // 上面提示过了
  149. return
  150. }
  151. }
  152. const result = await API({
  153. url: '/refund/selectBy',
  154. data: {
  155. ...getObj.value,
  156. refundUser: { ...refundUser.value, flag: flag.value }
  157. }
  158. })
  159. console.log('===============================', refundUser.value)
  160. // 复制一份 refundUser.value 并移除排序字段和排序方式
  161. const detailWithoutSort = {
  162. ...refundUser.value,
  163. flag: flag.value
  164. }
  165. delete detailWithoutSort.sortField
  166. delete detailWithoutSort.sortOrder
  167. const resultTotalGold = await API({
  168. url: '/refund/statsGold',
  169. data: {
  170. ...detailWithoutSort
  171. }
  172. })
  173. // 将响应结果存储到响应式数据中
  174. console.log('resultTotalGold请求成功', resultTotalGold)
  175. // 检查响应的 code 是否为 200 且 data 存在
  176. if (resultTotalGold.code === 200 && resultTotalGold.data) {
  177. const data = resultTotalGold.data
  178. console.log('获取到的金币数据:', data)
  179. permanentGolds.value = (Number(data.permanentGolds) || 0)
  180. freeGolds.value = (Number(data.freeGolds) || 0)
  181. taskGolds.value = (Number(data.taskGolds) || 0)
  182. }
  183. // 存储表格数据
  184. tableData.value = result.data.list
  185. tableData.value = tableData.value.map(item => ({
  186. ...item,
  187. sumGold: (Number(item.sumGold) || 0),
  188. permanentGold: (Number(item.permanentGold) || 0),
  189. freeGold: (Number(item.freeGold) || 0),
  190. taskGold: (Number(item.taskGold) || 0)
  191. }))
  192. console.log('tableData', tableData.value)
  193. // 存储分页总数
  194. total.value = result.data.total
  195. console.log('total', total.value)
  196. } catch (error) {
  197. console.log('请求失败', error)
  198. // 在这里可以处理错误逻辑,比如显示错误提示等
  199. }
  200. }
  201. // 搜索
  202. const search = function () {
  203. trimJwCode()
  204. getObj.value.pageNum = 1
  205. getSelectBy()
  206. }
  207. // 重置
  208. const reset = function () {
  209. refundUser.value = { market: "" }
  210. sortField.value = ''
  211. sortOrder.value = ''
  212. getTime.value = {}
  213. activeTimeRange.value = '' // 清除激活状态
  214. selectedMarketPath.value = []
  215. // 重置页码
  216. getObj.value.pageNum = 1
  217. getSelectBy()
  218. }
  219. // 今天
  220. const getToday = function () {
  221. const today = dayjs()
  222. const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss')
  223. const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
  224. getTime.value = [startTime, endTime]
  225. console.log('getTime', getTime.value)
  226. activeTimeRange.value = 'today' // 标记当前激活状态
  227. getSelectBy()
  228. }
  229. // 昨天
  230. const getYesterday = function () {
  231. const today = dayjs()
  232. const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
  233. const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
  234. getTime.value = [startTime, endTime]
  235. console.log('getTime', getTime.value)
  236. activeTimeRange.value = 'yesterday' // 标记当前激活状态
  237. getSelectBy()
  238. }
  239. // 近7天
  240. const get7Days = function () {
  241. const today = dayjs()
  242. const startTime = today.subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
  243. const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
  244. getTime.value = [startTime, endTime]
  245. console.log('getTime', getTime.value)
  246. activeTimeRange.value = '7days' // 标记当前激活状态
  247. getSelectBy()
  248. }
  249. const delObj = ref({})
  250. const del = function (row) {
  251. delObj.value.detailId = row.detailId
  252. console.log('delObj', delObj.value)
  253. }
  254. // 删除按钮的气泡弹出框确认按钮
  255. const delConfirm = async function () {
  256. try {
  257. console.log('delObj', delObj.value)
  258. // 发送POST请求
  259. const result = await API({
  260. url: '/refund/softDelete?detailId=' + delObj.value.detailId,
  261. data: {}
  262. })
  263. // 将响应结果存储到响应式数据中
  264. console.log('请求成功', result)
  265. // 刷新表格数据
  266. getSelectBy()
  267. } catch (error) {
  268. console.log('请求失败', error)
  269. // 在这里可以处理错误逻辑,比如显示错误提示等
  270. }
  271. }
  272. // 查询商品的接口
  273. const goods = ref([])
  274. const getGoods = async function () {
  275. try {
  276. // 发送POST请求
  277. const result = await request({
  278. url: '/general/goods',
  279. data: {}
  280. })
  281. // 将响应结果存储到响应式数据中
  282. console.log('请求成功product', result)
  283. if (Array.isArray(result.data)) {
  284. // 过滤掉空字符串和 null 值
  285. const validGoods = result.data.filter(item => item && item.trim() !== '');
  286. // 直接使用后端返回的字符串作为 value 和 label
  287. goods.value = validGoods.map(item => ({
  288. value: item,
  289. label: item
  290. }));
  291. }
  292. } catch (error) {
  293. console.log('请求失败', error)
  294. // 在这里可以处理错误逻辑,比如显示错误提示等
  295. }
  296. }
  297. // 挂载
  298. onMounted(async function () {
  299. console.log('=======', adminData.value)
  300. await getSelectBy()
  301. await getMarket()
  302. await getRefundTypes()
  303. await getGoods()
  304. })
  305. // 新增排序字段和排序方式
  306. const sortField = ref('')
  307. const sortOrder = ref('')
  308. // 处理排序事件
  309. const handleSortChange = (column) => {
  310. console.log('排序字段:', column.prop)
  311. console.log('排序方式:', column.order)
  312. if (column.prop === 'permanentGold') {
  313. sortField.value = 'permanentGold'
  314. } else if (column.prop === 'taskGold') {
  315. sortField.value = 'taskGold'
  316. } else if (column.prop === 'freeGold') {
  317. sortField.value = 'freeGold'
  318. } else if (column.prop === 'auditTime') {
  319. sortField.value = 'auditTime'
  320. } else if (column.prop === 'auditTime') {
  321. sortField.value = 'auditTime'
  322. } else if (column.prop === 'sumGold') {
  323. sortField.value = 'sumGold'
  324. }
  325. sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
  326. getSelectBy()
  327. }
  328. const handlePageSizeChange = function (val) {
  329. getObj.value.pageSize = val
  330. getSelectBy()
  331. }
  332. const handleCurrentChange = function (val) {
  333. getObj.value.pageNum = val
  334. getSelectBy()
  335. }
  336. const exportExcel = async function () {
  337. const params = {
  338. refundUser: {
  339. jwcode: refundUser.value.jwcode || '',
  340. refundModel: refundUser.value.refundModel || '',
  341. market: refundUser.value.market || "",
  342. startTime: refundUser.value.startTime || '',
  343. endTime: refundUser.value.endTime || '',
  344. goodsName: refundUser.value.goodsName || '',
  345. flag: flag.value,
  346. refundType: refundUser.value.refundType || '',
  347. },
  348. page: getObj.pageNum,
  349. size: total.value
  350. }
  351. try {
  352. const res = await API({ url: '/export/exportRefund', data: params })
  353. if (res.code === 200) {
  354. ElMessage.success('导出成功')
  355. } else {
  356. ElMessage.error(res.message || '导出失败,请稍后重试')
  357. }
  358. } catch (error) {
  359. console.log('请求失败', error)
  360. ElMessage.error('导出失败,请稍后重试')
  361. }
  362. }
  363. const exportListVisible = ref(false)
  364. // 打开导出列表弹窗
  365. const openExportList = () => {
  366. getExportList()
  367. exportListVisible.value = true
  368. }
  369. // 导出列表数据
  370. const exportList = ref([])
  371. // 导出列表加载状态
  372. const exportListLoading = ref(false)
  373. // 获取导出列表
  374. const getExportList = async () => {
  375. exportListLoading.value = true
  376. try {
  377. const result = await API({ url: '/export/export' })
  378. if (result.code === 200) {
  379. const filteredData = result.data.filter(item => {
  380. return item.type === 3; //3表示金币退款列表
  381. });
  382. exportList.value = filteredData
  383. } else {
  384. ElMessage.error(result.msg || '获取导出列表失败')
  385. }
  386. } catch (error) {
  387. console.error('获取导出列表出错:', error)
  388. ElMessage.error('获取导出列表失败,请稍后重试')
  389. } finally {
  390. exportListLoading.value = false
  391. }
  392. }
  393. // 下载导出文件
  394. const downloadExportFile = (item) => {
  395. if (item.state === 2) {
  396. const link = document.createElement('a')
  397. link.href = item.url
  398. link.download = item.fileName
  399. link.click()
  400. } else {
  401. ElMessage.warning('文件还在导出中,请稍后再试')
  402. }
  403. }
  404. //根据状态返回对应的标签类型
  405. const getTagType = (state) => {
  406. switch (state) {
  407. case 0:
  408. return 'info';
  409. case 1:
  410. return 'primary';
  411. case 2:
  412. return 'success';
  413. case 3:
  414. return 'danger';
  415. default:
  416. return 'info';
  417. }
  418. }
  419. //根据状态返回对应的标签文案
  420. const getTagText = (state) => {
  421. switch (state) {
  422. case 0:
  423. return '待执行';
  424. case 1:
  425. return '执行中';
  426. case 2:
  427. return '执行完成';
  428. case 3:
  429. return '执行出错';
  430. default:
  431. return '未知状态';
  432. }
  433. }
  434. // 存储地区选择变化
  435. const selectedMarketPath = ref("")
  436. const handleMarketChange = (value) => {
  437. if (value && value.length > 0) {
  438. const lastValue = value[value.length - 1]
  439. refundUser.value.market = reverseMarketMapping[lastValue]
  440. } else {
  441. refundUser.value.market = ''
  442. }
  443. }
  444. // 获取地区,修改为级联下拉框
  445. const getMarket = async function () {
  446. try {
  447. // 发送POST请求
  448. const result = await API({
  449. url: '/market/selectMarket',
  450. });
  451. // 将响应结果存储到响应式数据中
  452. console.log('请求成功', result)
  453. // 递归转换树形结构为级联选择器需要的格式(跳过第一级节点)
  454. const transformTree = (nodes) => {
  455. // 直接处理第一级节点的子节点
  456. const allChildren = nodes.flatMap(node => node.children || []);
  457. return allChildren.map(child => {
  458. const grandchildren = child.children && child.children.length
  459. ? transformTree([child]) // 递归处理子节点
  460. : null;
  461. return {
  462. value: child.name,
  463. label: child.name,
  464. children: grandchildren
  465. };
  466. });
  467. };
  468. // 存储地区信息
  469. market.value = transformTree(result.data)
  470. console.log('转换后的地区树==============', market.value)
  471. } catch (error) {
  472. console.log('请求失败', error)
  473. }
  474. }
  475. </script>
  476. <template>
  477. <el-card class="card1" style="margin-bottom: 0.5vh;">
  478. <el-col style="margin-bottom: 1vh;">
  479. <div class="select">
  480. <div class="selectRow">
  481. <el-text class="text" size="large">精网号</el-text>
  482. <el-input class="selectContent" v-model="refundUser.jwcode" placeholder="请输入精网号" style="width: 10vw;"
  483. clearable />
  484. </div>
  485. <div class="selectRow">
  486. <el-text class="text" size="large">商品名称</el-text>
  487. <el-select class="selectContent" v-model="refundUser.goodsName" placeholder="请选择商品名称" style="width: 10vw;"
  488. clearable filterable>
  489. <el-option v-for="item in goods" :key="item.value" :label="item.label" :value="item.value" />
  490. </el-select>
  491. </div>
  492. <div class="selectRow">
  493. <el-text class="text" size="large">所属地区</el-text>
  494. <el-cascader class="selectContent" v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区"
  495. clearable style="width:10vw" @change="handleMarketChange" />
  496. </div>
  497. <div class="selectRow" style="width: 12vw;">
  498. <el-text size="large">退款类型</el-text>
  499. <el-select class="selectContent" v-model="refundUser.refundType" placeholder="请选择退款类型" style="width: 10vw"
  500. clearable>
  501. <el-option v-for="item in refundType" :key="item.value" :label="item.label" :value="item.value" />
  502. </el-select>
  503. </div>
  504. <!-- <el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> -->
  505. </div>
  506. </el-col>
  507. <el-col>
  508. <div class="select">
  509. <div class="selectRow" style="width: 35vw">
  510. <el-text class="text" size="large">退款时间</el-text>
  511. <el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
  512. start-placeholder="起始时间" end-placeholder="结束时间" style="width: 20vw;" @change="handleDatePickerChange"
  513. :default-time="defaultTime" :disabled-date="disabledDate" />
  514. <el-button @click="getToday()" style="margin-left: 0.3vw"
  515. :type="activeTimeRange === 'today' ? 'primary' : ''">
  516. </el-button>
  517. <el-button @click="getYesterday()" style="margin-left: 0.3vw"
  518. :type="activeTimeRange === 'yesterday' ? 'primary' : ''">
  519. </el-button>
  520. <el-button @click="get7Days()" style="margin-left: 0.3vw"
  521. :type="activeTimeRange === '7days' ? 'primary' : ''">
  522. 近7天
  523. </el-button>
  524. </div>
  525. <div class="selectRow" style="justify-content: flex-start;">
  526. <el-button type="primary" @click="search()" v-if="canLook">查询</el-button>
  527. <el-button type="primary" @click="exportExcel">导出Excel</el-button>
  528. <el-button type="primary" @click="openExportList">查看导出列表</el-button>
  529. <el-button type="success" @click="reset()">重置</el-button>
  530. </div>
  531. </div>
  532. </el-col>
  533. </el-card>
  534. <el-card class="card2">
  535. <div class="goldStatistics">
  536. 退款金币总数{{ format3(Math.abs(sumGolds).toFixed(2)) }}&nbsp;&nbsp;&nbsp;&nbsp;
  537. 永久金币{{ format3(Math.abs(permanentGolds).toFixed(2)) }}&nbsp;&nbsp;&nbsp;&nbsp;
  538. 免费金币{{ format3(Math.abs(freeGolds).toFixed(2)) }}&nbsp;&nbsp;&nbsp;&nbsp;
  539. 任务金币{{ format3(Math.abs(taskGolds).toFixed(2)) }}
  540. </div>
  541. <!-- 设置表格容器的高度和滚动样式 -->
  542. <div style="height: 58vh; ">
  543. <el-table :data="tableData" style="height: 57vh" @sort-change="handleSortChange"
  544. :row-style="{ height: '50px' }">
  545. <el-table-column type="index" label="序号" width="80px" fixed="left">
  546. <template #default="scope">
  547. <span>{{
  548. scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
  549. }}</span>
  550. </template>
  551. </el-table-column>
  552. <el-table-column prop="name" label="姓名" fixed="left" width="130px" show-overflow-tooltip />
  553. <el-table-column prop="jwcode" label="精网号" fixed="left" width="110px" />
  554. <el-table-column prop="market" label="所属地区" width="110px" />
  555. <el-table-column prop="orderCode" label="订单号" width="260px" show-overflow-tooltip />
  556. <el-table-column prop="goodsName" label="商品名称" width="110px" show-overflow-tooltip />
  557. <el-table-column prop="refundType" label="退款类型" width="100px" />
  558. <el-table-column prop="refundModel" label="退款方式" width="110px">
  559. <template #default="scope">
  560. {{ scope.row.refundModel === 0 ? '全部退款' : scope.row.refundModel === 1 ? '部分退款' : '' }}
  561. </template>
  562. </el-table-column>
  563. <el-table-column prop="sumGold" label="退款金币总数" width="150px" sortable="custom" />
  564. <el-table-column prop="permanentGold" label="永久金币" width="110px" sortable="custom" />
  565. <el-table-column prop="freeGold" sortable="custom" label="免费金币" width="110px" />
  566. <el-table-column prop="taskGold" sortable="custom" label="任务金币" width="110px" />
  567. <el-table-column prop="remark" label="退款原因" width="160px" show-overflow-tooltip />
  568. <el-table-column prop="adminName" label="提交人" width="100px" />
  569. <el-table-column prop="auditTime" sortable="custom" label="退款时间" width="180px">
  570. <template #default="scope">
  571. {{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }}
  572. </template>
  573. </el-table-column>
  574. </el-table>
  575. </div>
  576. <!-- 分页 -->
  577. <div class="pagination" style="margin-top: 20px;display: flex;">
  578. <el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
  579. layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
  580. @current-change="handleCurrentChange" @jump="checkPageNumber"></el-pagination>
  581. </div>
  582. </el-card>
  583. <!-- 导出弹窗 -->
  584. <el-dialog v-model="exportListVisible" title="导出列表" width="80%">
  585. <el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
  586. <el-table-column prop="fileName" label="文件名" />
  587. <el-table-column prop="state" label="状态">
  588. <template #default="scope">
  589. <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
  590. {{ getTagText(scope.row.state) }}
  591. </el-tag>
  592. </template>
  593. </el-table-column>
  594. <el-table-column prop="auditTime" label="创建时间">
  595. <template #default="scope">
  596. {{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }}
  597. </template>
  598. </el-table-column>
  599. <el-table-column label="操作">
  600. <template #default="scope">
  601. <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
  602. :disabled="scope.row.state !== 2">
  603. 下载
  604. </el-button>
  605. </template>
  606. </el-table-column>
  607. </el-table>
  608. <template #footer>
  609. <div class="dialog-footer">
  610. <el-button text @click="exportListVisible = false">关闭</el-button>
  611. </div>
  612. </template>
  613. </el-dialog>
  614. </template>
  615. <style scoped lang="scss">
  616. // 搜索的卡片样式
  617. .card1 {
  618. background: #F3FAFE;
  619. }
  620. // 表单的卡片样式
  621. .card2 {
  622. background: #E7F4FD;
  623. }
  624. // 新币总数等等
  625. .goldStatistics {
  626. margin-left: 1vw;
  627. margin-bottom: 1vh;
  628. color: #000000;
  629. font-family: "PingFang SC";
  630. font-size: 16px;
  631. font-style: normal;
  632. font-weight: 700;
  633. line-height: 20px;
  634. }
  635. // 表头背景等
  636. :deep(.el-table__header-wrapper),
  637. :deep(.el-table__body-wrapper),
  638. :deep(.el-table__cell),
  639. /* 表格 */
  640. :deep(.el-table__body td) {
  641. background-color: #F3FAFE !important;
  642. }
  643. /* 表头 */
  644. :deep(.el-table__header th) {
  645. background-color: #F3FAFE !important;
  646. }
  647. /* 鼠标悬停 */
  648. :deep(.el-table__row:hover > .el-table__cell) {
  649. background-color: #E5EBFE !important;
  650. }
  651. /** 搜索的样式 */
  652. .select {
  653. display: flex;
  654. .selectRow {
  655. width: 17vw;
  656. display: flex;
  657. align-items: center;
  658. justify-content: center;
  659. padding: 0 0.5vw;
  660. .text {
  661. width: 5vw;
  662. font-size: 15px;
  663. }
  664. .selectContent {
  665. flex: 1;
  666. }
  667. }
  668. }
  669. </style>