金币系统前端
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.

939 lines
27 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
12 months ago
  1. <script setup>
  2. import { ref, onMounted, reactive, computed } from 'vue'
  3. import ElementPlus from 'element-plus'
  4. import { ElMessage, ElMessageBox } from 'element-plus'
  5. import { AiFillRead } from 'vue-icons-plus/ai'
  6. import axios from 'axios'
  7. import request from '@/util/http'
  8. import moment from 'moment'
  9. import API from '../../api/index.js'
  10. // 变量
  11. //这是获取用户信息的接口
  12. const adminData = ref({})
  13. const getAdminData = async function () {
  14. try {
  15. const result = await request({
  16. url: '/admin/userinfo',
  17. data: {}
  18. })
  19. adminData.value = result
  20. console.log('请求成功', result)
  21. console.log('用户信息', adminData.value)
  22. } catch (error) {
  23. console.log('请求失败', error)
  24. }
  25. }
  26. // 充值明细表格
  27. const tableData = ref([])
  28. // 搜索======================================
  29. // 搜索rechargeVo
  30. const rechargeVo = ref({
  31. rechargeWay: '客服充值'
  32. })
  33. // 搜索对象
  34. const getObj = ref({
  35. pageNum: 1,
  36. pageSize: 50
  37. })
  38. //分页总条目
  39. const total = ref(100)
  40. // 搜索对象时间
  41. const getTime = ref([])
  42. // 搜索活动列表
  43. const activity = ref([])
  44. // 所有信息
  45. const allData = ref([])
  46. // 搜索地区列表
  47. const area = ref([])
  48. // 编辑======================================
  49. // 驳回弹出框
  50. const rejectVisible = ref(false)
  51. // 驳回对象
  52. const rejectObj = ref({})
  53. // 通过对象
  54. const passObj = ref({})
  55. //标签页默认高亮选项
  56. const activeName = ref('all')
  57. // 支付方式选项
  58. const payWay = [
  59. {
  60. value: '微信',
  61. label: '微信'
  62. },
  63. {
  64. value: '支付宝',
  65. label: '支付宝'
  66. },
  67. {
  68. value: '银联',
  69. label: '银联'
  70. },
  71. {
  72. value: '信用卡',
  73. label: '信用卡'
  74. },
  75. {
  76. value: '借记卡',
  77. label: '借记卡'
  78. }
  79. ]
  80. // //表格高度
  81. // const tableHeight = computed(function () {
  82. // return (getObj.value.pageSize + 2) * 60 + "px";
  83. // });
  84. // 表单验证ref
  85. const Ref = ref(null)
  86. // 方法
  87. // 合计数存储
  88. // 统计合计数
  89. const trueGold = ref(0)
  90. const trueCount = ref(0)
  91. const trueRGold = ref(0)
  92. const trueFGold = ref(0)
  93. // 转化一下,保留两位小数,展示时填充转化后的变量名
  94. const formattedTrueGold = computed(() => trueGold.value.toFixed(2))
  95. const formattedTrueRGold = computed(() => trueRGold.value.toFixed(2))
  96. const formattedTrueFGold = computed(() => trueFGold.value.toFixed(2))
  97. // 待审核条数
  98. const pendingCount = ref(0)
  99. // 待审核金币数
  100. const pendingGold = ref(0)
  101. const pendingRGold = ref(0)
  102. const pendingFGold = ref(0)
  103. // 已通过条数
  104. const approvedCount = ref(0)
  105. // 已通过金币数
  106. const approvedGold = ref(0)
  107. const approvedRGold = ref(0)
  108. const approvedFGold = ref(0)
  109. // 已驳回条数
  110. const rejectedCount = ref(0)
  111. // 已驳回金币数
  112. const rejectedGold = ref(0)
  113. const rejectedRGold = ref(0)
  114. const rejectedFGold = ref(0)
  115. // 搜索==============================================================
  116. // 搜索方法
  117. const get = async function (val) {
  118. try {
  119. // 地区赋值
  120. if (adminData.value.area === '泰国') {
  121. rechargeVo.value.areas = ['泰国', '越南']
  122. } else if (adminData.value.area !== '总部') {
  123. rechargeVo.value.area = adminData.value.area
  124. }
  125. // 搜索参数页码赋值
  126. if (typeof val === 'number') {
  127. getObj.value.pageNum = val
  128. }
  129. // 搜索参数时间赋值
  130. if (getTime.value != null) {
  131. if (getTime.value.startDate != '' && getTime.value.endDate != '') {
  132. rechargeVo.value.startDate = getTime.value[0]
  133. rechargeVo.value.endDate = getTime.value[1]
  134. }
  135. } else {
  136. rechargeVo.value.startDate = ''
  137. rechargeVo.value.endDate = ''
  138. }
  139. rechargeVo.value.sortField = sortField.value
  140. rechargeVo.value.sortOrder = sortOrder.value
  141. console.log('搜索参数', getObj.value)
  142. // 发送POST请求
  143. const result = await request({
  144. url: '/recharge/recharge',
  145. data: {
  146. pageNum: getObj.value.pageNum,
  147. pageSize: getObj.value.pageSize,
  148. rechargeVo: { ...rechargeVo.value }
  149. }
  150. })
  151. // 合计数的接口
  152. // 复制一份 rechargeVo.value 并移除排序字段和排序方式
  153. const detailWithoutSort = { ...rechargeVo.value }
  154. delete detailWithoutSort.sortField
  155. delete detailWithoutSort.sortOrder
  156. delete detailWithoutSort.status
  157. const result2 = await request({
  158. url: '/recharge/recharge/RechargeA',
  159. data: detailWithoutSort
  160. })
  161. // 做一个判断,如果result2.data[i].flag="待审核",那么 totalData.value = result2.data[i],否则就赋值为0
  162. // 统计合计数
  163. if (result2.data) {
  164. result2.data.forEach((item) => {
  165. switch (item.auditStatus) {
  166. case '待审核':
  167. // 若 item.raudit 为空则赋值为 0
  168. pendingCount.value = item.raudit || 0
  169. // 若 item.sumRaudit 为空则赋值为 0
  170. pendingGold.value = item.sumRaudit || 0
  171. pendingRGold.value = item.sumRaudit1 || 0
  172. pendingFGold.value = item.sumRaudit2 || 0
  173. break
  174. case '已通过':
  175. approvedCount.value = item.raudit || 0
  176. approvedGold.value = item.sumRaudit || 0
  177. approvedRGold.value = item.sumRaudit1 || 0
  178. approvedFGold.value = item.sumRaudit2 || 0
  179. break
  180. case '已驳回':
  181. rejectedCount.value = item.raudit || 0
  182. rejectedGold.value = item.sumRaudit || 0
  183. rejectedRGold.value = item.sumRaudit1 || 0
  184. rejectedFGold.value = item.sumRaudit2 || 0
  185. break
  186. }
  187. })
  188. }
  189. trueGold.value = pendingGold.value + approvedGold.value + rejectedGold.value
  190. trueCount.value =
  191. pendingCount.value + approvedCount.value + rejectedCount.value
  192. trueRGold.value =
  193. pendingRGold.value + approvedRGold.value + rejectedRGold.value
  194. trueFGold.value =
  195. pendingFGold.value + approvedFGold.value + rejectedFGold.value
  196. // 将响应结果存储到响应式数据中
  197. console.log('请求成功', result)
  198. console.log('这是分页', getObj.value)
  199. // 存储表格数据
  200. tableData.value = result.data.list
  201. console.log('tableData', tableData.value)
  202. // 存储分页总数
  203. total.value = result.data.total
  204. console.log('total', total.value)
  205. } catch (error) {
  206. console.log('请求失败', error)
  207. // 在这里可以处理错误逻辑,比如显示错误提示等
  208. }
  209. }
  210. // 搜索
  211. const search = function () {
  212. trimJwCode();
  213. getObj.value.pageNum = 1
  214. get()
  215. }
  216. // 重置
  217. const reset = function () {
  218. delete rechargeVo.value.activityId
  219. delete rechargeVo.value.jwcode
  220. delete rechargeVo.value.payWay
  221. delete rechargeVo.value.area
  222. delete rechargeVo.value.startDate
  223. delete rechargeVo.value.endDate
  224. getTime.value = {}
  225. }
  226. // 今天
  227. const getToday = function () {
  228. const today = new Date()
  229. const startDate = new Date(
  230. today.getFullYear(),
  231. today.getMonth(),
  232. today.getDate()
  233. )
  234. const endDate = new Date(
  235. today.getFullYear(),
  236. today.getMonth(),
  237. today.getDate() + 1
  238. )
  239. getTime.value = [startDate, endDate]
  240. console.log('getTime', getTime.value)
  241. get()
  242. }
  243. // 昨天
  244. const getYesterday = function () {
  245. const yesterday = new Date()
  246. yesterday.setDate(yesterday.getDate() - 1)
  247. const startDate = new Date(
  248. yesterday.getFullYear(),
  249. yesterday.getMonth(),
  250. yesterday.getDate()
  251. )
  252. const endDate = new Date(
  253. yesterday.getFullYear(),
  254. yesterday.getMonth(),
  255. yesterday.getDate() + 1
  256. )
  257. getTime.value = [startDate, endDate]
  258. console.log('getTime', getTime.value)
  259. get()
  260. }
  261. // 近7天
  262. const get7Days = function () {
  263. const today = new Date()
  264. const startDate = new Date(
  265. today.getFullYear(),
  266. today.getMonth(),
  267. today.getDate() - 6
  268. )
  269. const endDate = new Date(
  270. today.getFullYear(),
  271. today.getMonth(),
  272. today.getDate() + 1
  273. )
  274. getTime.value = [startDate, endDate]
  275. console.log('getTime', getTime.value)
  276. get()
  277. }
  278. //全部充值明细
  279. const adminAll = function () {
  280. console.log('adminAll')
  281. rechargeVo.value.status = ''
  282. getObj.value.pageNum = 1
  283. get()
  284. }
  285. //待审核充值明细
  286. const adminWait = async function () {
  287. rechargeVo.value.status = 0
  288. getObj.value.pageNum = 1
  289. await get()
  290. console.log('adminWait')
  291. trueCount.value = pendingCount.value
  292. trueGold.value = pendingGold.value
  293. trueRGold.value = pendingRGold.value
  294. trueFGold.value = pendingFGold.value
  295. }
  296. //已通过充值明细
  297. const adminPass = async function () {
  298. rechargeVo.value.status = 1
  299. getObj.value.pageNum = 1
  300. await get()
  301. console.log('adminPass')
  302. trueCount.value = approvedCount.value
  303. trueGold.value = approvedGold.value
  304. trueRGold.value = approvedRGold.value
  305. trueFGold.value = approvedFGold.value
  306. }
  307. //已驳回充值明细
  308. const adminReject = async function () {
  309. rechargeVo.value.status = 2
  310. getObj.value.pageNum = 1
  311. await get()
  312. console.log('adminReject')
  313. trueCount.value = rejectedCount.value
  314. trueGold.value = rejectedGold.value
  315. trueRGold.value = rejectedRGold.value
  316. trueFGold.value = rejectedFGold.value
  317. }
  318. //点击标签页
  319. const handleClick = function (tab, event) {
  320. if (tab.props.name === 'all') {
  321. adminAll()
  322. } else if (tab.props.name === 'wait') {
  323. adminWait()
  324. } else if (tab.props.name === 'pass') {
  325. adminPass()
  326. } else if (tab.props.name === 'reject') {
  327. adminReject()
  328. }
  329. }
  330. // 获取活动名称
  331. const getActivity = async function () {
  332. try {
  333. // 发送POST请求
  334. const result = await request({
  335. url: '/recharge/activity/select',
  336. data: {}
  337. })
  338. // 将响应结果存储到响应式数据中
  339. console.log('请求成功', result)
  340. // 存储表格数据
  341. activity.value = result.data
  342. console.log('activity', activity.value)
  343. } catch (error) {
  344. console.log('请求失败', error)
  345. // 在这里可以处理错误逻辑,比如显示错误提示等
  346. }
  347. }
  348. // 获取地区
  349. const getArea = async function () {
  350. try {
  351. // 发送POST请求
  352. const result = await request({
  353. url: '/recharge/user/search',
  354. data: {}
  355. })
  356. // 将响应结果存储到响应式数据中
  357. console.log('请求成功', result)
  358. // 存储地区信息
  359. area.value = result.data
  360. console.log('地区', area.value)
  361. } catch (error) {
  362. console.log('请求失败', error)
  363. // 在这里可以处理错误逻辑,比如显示错误提示等
  364. }
  365. }
  366. // 验证跳转输入框的数字是否合法
  367. const checkNumber = function () {
  368. if (typeof parseInt(getObj.value.pageNum) === 'number') {
  369. console.log('总共有多少页' + Math.ceil(total.value / getObj.value.pageSize))
  370. if (
  371. getObj.value.pageNum > 0 &&
  372. getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize)
  373. ) {
  374. console.log('输入的数字合法')
  375. getObj.value.pageNum = parseInt(getObj.value.pageNum)
  376. get()
  377. } else {
  378. //提示
  379. ElMessage({
  380. type: 'error',
  381. message: '请检查输入内容'
  382. })
  383. }
  384. } else {
  385. //提示
  386. ElMessage({
  387. type: 'error',
  388. message: '请检查输入内容'
  389. })
  390. }
  391. }
  392. const handlePageSizeChange = function (val) {
  393. getObj.value.pageSize = val
  394. get()
  395. }
  396. const handleCurrentChange = function (val) {
  397. getObj.value.pageNum = val
  398. get()
  399. }
  400. // 编辑====================================
  401. // 通过按钮
  402. const pass = function (row) {
  403. // 通过初始化
  404. passObj.value = row
  405. passObj.value.adminId = adminData.value.adminId
  406. passObj.value.auditId = row.auditId
  407. // passObj.value.status = 1
  408. passObj.value.rechargeId = row.rechargeId
  409. passObj.value.detailId = row.detailId
  410. passObj.value.jwcode = row.jwcode
  411. passObj.value.paidGold = row.paidGold
  412. passObj.value.freeGold = row.freeGold
  413. passObj.value.adminName = adminData.value.adminName
  414. console.log('通过对象', passObj.value)
  415. }
  416. // 通过确认
  417. const passConfirm = async function () {
  418. try {
  419. // 也许大概应该在点击确认时改变状态
  420. passObj.value.status = 1
  421. console.log('通过对象', passObj.value)
  422. // 发送POST请求
  423. // passObj.value.flag = 0;
  424. const result = await request({
  425. url: '/audit/audit/goldedit',
  426. data: passObj.value
  427. })
  428. // 将响应结果存储到响应式数据中
  429. console.log('请求成功', result)
  430. // 刷新表格数据
  431. get()
  432. //提示
  433. ElMessage({
  434. type: 'success',
  435. message: '通过成功!'
  436. })
  437. } catch (error) {
  438. console.error('请求失败', error);
  439. // 提示网络请求错误
  440. ElMessage({
  441. type: 'error',
  442. message: '网络请求出错,请检查网络连接!'
  443. });
  444. }
  445. }
  446. // 打开驳回弹出框
  447. const openRejectVisible = function () {
  448. rejectVisible.value = true
  449. }
  450. // 关闭驳回弹出框
  451. const closeRejectVisible = function () {
  452. rejectVisible.value = false
  453. }
  454. // 驳回按钮
  455. const reject = function (row) {
  456. // 驳回初始化
  457. rejectObj.value.adminId = adminData.value.adminId
  458. rejectObj.value.auditId = row.auditId
  459. rejectObj.value.status = 2
  460. rejectObj.value.reson = ''
  461. rejectObj.value.rechargeId = row.rechargeId
  462. rejectObj.value.detailId = row.detailId
  463. console.log('驳回对象', rejectObj.value)
  464. openRejectVisible()
  465. }
  466. // 驳回确认
  467. const rejectConfirm = async function () {
  468. Ref.value.validate(async (valid) => {
  469. if (valid) {
  470. try {
  471. console.log('驳回对象', rejectObj.value)
  472. // 发送POST请求
  473. const result = await request({
  474. url: '/audit/audit/goldedit',
  475. data: rejectObj.value
  476. })
  477. // 将响应结果存储到响应式数据中
  478. console.log('请求成功', result)
  479. // 刷新表格数据
  480. get()
  481. // 关闭弹出框
  482. closeRejectVisible()
  483. //提示
  484. ElMessage({
  485. type: 'success',
  486. message: '驳回成功!'
  487. })
  488. } catch (error) {
  489. console.log('请求失败', error)
  490. // 在这里可以处理错误逻辑,比如显示错误提示等
  491. }
  492. } else {
  493. //提示
  494. ElMessage({
  495. type: 'error',
  496. message: '请检查输入内容'
  497. })
  498. }
  499. })
  500. }
  501. // 表单验证
  502. const rules = reactive({
  503. reson: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }]
  504. })
  505. // 挂载
  506. onMounted(async function () {
  507. await getAdminData()
  508. await getActivity()
  509. await get()
  510. await getArea()
  511. })
  512. // 新增排序字段和排序方式
  513. const sortField = ref('')
  514. const sortOrder = ref('')
  515. // 处理排序事件
  516. const handleSortChange = (column) => {
  517. console.log('排序字段:', column.prop)
  518. console.log('排序方式:', column.order)
  519. if (column.prop === 'rechargeGold') {
  520. sortField.value = 'recharge_gold'
  521. } else if (column.prop === 'freeGold') {
  522. sortField.value = 'free_gold'
  523. } else if (column.prop === 'rechargeTime') {
  524. sortField.value = 'recharge_time'
  525. } else if (column.prop === 'createTime') {
  526. sortField.value = 'create_time'
  527. } else if (column.prop === 'paidGold') {
  528. sortField.value = 'paid_gold'
  529. }
  530. sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
  531. get()
  532. }
  533. // 精网号去空格
  534. const trimJwCode = () => {
  535. if (rechargeVo.value.jwcode) {
  536. rechargeVo.value.jwcode = rechargeVo.value.jwcode.replace(/\s/g, '');
  537. }
  538. }
  539. </script>
  540. <template>
  541. <el-row>
  542. <el-col>
  543. <el-card style="margin-bottom: 20px">
  544. <el-row style="margin-bottom: 10px">
  545. <el-col :span="6">
  546. <div class="head-card-element">
  547. <el-text class="mx-1" size="large">精网号</el-text>
  548. <el-input
  549. v-model="rechargeVo.jwcode"
  550. placeholder="请输入精网号"
  551. size="large"
  552. style="width: 240px"
  553. clearable
  554. />
  555. </div>
  556. </el-col>
  557. <el-col :span="6">
  558. <div class="head-card-element">
  559. <el-text class="mx-1" size="large">活动名称</el-text>
  560. <el-select
  561. v-model="rechargeVo.activityId"
  562. placeholder="请选择活动名称"
  563. size="large"
  564. style="width: 240px"
  565. clearable
  566. >
  567. <el-option
  568. v-for="item in activity"
  569. :key="item.activityId"
  570. :label="item.activityName"
  571. :value="item.activityId"
  572. />
  573. </el-select>
  574. </div>
  575. </el-col>
  576. <el-col :span="6">
  577. <div class="head-card-element">
  578. <el-text class="mx-1" size="large">支付方式</el-text>
  579. <el-select
  580. v-model="rechargeVo.payWay"
  581. placeholder="请选择支付方式"
  582. size="large"
  583. style="width: 240px"
  584. clearable
  585. >
  586. <el-option
  587. v-for="item in payWay"
  588. :key="item.value"
  589. :label="item.label"
  590. :value="item.value"
  591. />
  592. </el-select>
  593. </div>
  594. </el-col>
  595. <el-col :span="6">
  596. <div class="head-card-element" v-if="adminData.area == '总部'">
  597. <el-text class="mx-1" size="large">所属地区</el-text>
  598. <el-select
  599. v-model="rechargeVo.area"
  600. placeholder="请选择所属地区"
  601. size="large"
  602. style="width: 240px"
  603. clearable
  604. >
  605. <el-option
  606. v-for="item in area"
  607. :key="item"
  608. :label="item"
  609. :value="item"
  610. />
  611. </el-select>
  612. </div>
  613. </el-col>
  614. </el-row>
  615. <el-row>
  616. <el-col :span="21">
  617. <div class="head-card-element">
  618. <el-text class="mx-1" size="large">充值时间</el-text>
  619. <el-date-picker
  620. v-model="getTime"
  621. type="datetimerange"
  622. range-separator="至"
  623. start-placeholder="起始时间"
  624. end-placeholder="结束时间"
  625. />
  626. <el-button style="margin-left: 10px" @click="getToday()"
  627. ></el-button
  628. >
  629. <el-button @click="getYesterday()"></el-button>
  630. <el-button @click="get7Days()">近7天</el-button>
  631. </div>
  632. </el-col>
  633. <el-col :span="3">
  634. <div class="head-card-btn">
  635. <el-button @click="reset()" type="success">重置</el-button>
  636. <el-button type="primary" @click="search()">查询</el-button>
  637. </div>
  638. </el-col>
  639. </el-row>
  640. </el-card>
  641. </el-col>
  642. </el-row>
  643. <el-row>
  644. <el-col>
  645. <el-card>
  646. <el-tabs
  647. v-model="activeName"
  648. type="card"
  649. class="demo-tabs"
  650. @tab-click="handleClick"
  651. >
  652. <el-tab-pane label="全部" name="all"></el-tab-pane>
  653. <el-tab-pane label="待审核" name="wait"></el-tab-pane>
  654. <el-tab-pane label="已通过" name="pass"></el-tab-pane>
  655. <el-tab-pane label="已驳回" name="reject"></el-tab-pane>
  656. <div>
  657. 总条数{{ trueCount }}总金币数{{
  658. formattedTrueGold
  659. }}金币永久金币{{ formattedTrueRGold }}金币免费金币{{ formattedTrueFGold }}金币
  660. </div>
  661. </el-tabs>
  662. <div style="height: 540px; overflow-y: auto">
  663. <el-table
  664. :data="tableData"
  665. style="width: 100%"
  666. height="540px"
  667. @sort-change="handleSortChange"
  668. >
  669. <el-table-column
  670. type="index"
  671. label="序号"
  672. width="100px"
  673. fixed="left"
  674. >
  675. <template #default="scope">
  676. <span>{{
  677. scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
  678. }}</span>
  679. </template>
  680. </el-table-column>
  681. <el-table-column prop="username" label="姓名" width="100px" />
  682. <el-table-column prop="jwcode" label="精网号" width="110px" />
  683. <el-table-column prop="area" label="所属地区" width="100px" />
  684. <el-table-column
  685. prop="activityName"
  686. label="活动名称"
  687. width="150px"
  688. />
  689. <el-table-column
  690. prop="rechargeGold"
  691. label="充值金额"
  692. sortable="“custom”"
  693. width="110px"
  694. >
  695. <template #default="scope">
  696. {{ scope.row.rechargeGold }}
  697. </template>
  698. </el-table-column>
  699. <el-table-column
  700. prop="rechargeWay"
  701. label="充值方式"
  702. width="110px"
  703. />
  704. <el-table-column
  705. prop="paidGold"
  706. label="永久金币"
  707. sortable="“custom”"
  708. width="110px"
  709. >
  710. <template #default="scope">
  711. {{ scope.row.paidGold / 100 }}
  712. </template>
  713. </el-table-column>
  714. <el-table-column
  715. prop="freeGold"
  716. label="免费金币"
  717. sortable="“custom”"
  718. width="110px"
  719. >
  720. <template #default="scope">
  721. {{ scope.row.freeGold / 100 }}
  722. </template>
  723. </el-table-column>
  724. <el-table-column
  725. prop="remark"
  726. label="备注"
  727. width="200px"
  728. show-overflow-tooltip
  729. />
  730. <el-table-column prop="payWay" label="支付方式" width="100px" />
  731. <el-table-column
  732. prop="rechargeVoucher"
  733. label="支付凭证"
  734. width="150px"
  735. >
  736. <template #default="scope">
  737. <el-image
  738. :src="scope.row.rechargeVoucher"
  739. alt="凭证"
  740. style="width: 50px; height: 50px"
  741. />
  742. </template>
  743. </el-table-column>
  744. <el-table-column prop="name" label="提交人" width="100px" />
  745. <el-table-column prop="status" label="审核状态" width="100px">
  746. <template #default="scope">
  747. <span v-if="scope.row.status === 1">
  748. <div class="status">
  749. <span class="green-dot"></span>
  750. <span>已通过</span>
  751. </div>
  752. </span>
  753. <span v-if="scope.row.status === 0">
  754. <div class="status">
  755. <span class="grey-dot"></span>
  756. <span>待审核</span>
  757. </div>
  758. </span>
  759. <span v-if="scope.row.status === 2">
  760. <div class="status">
  761. <span class="red-dot"></span>
  762. <span>已驳回</span>
  763. </div>
  764. </span>
  765. </template>
  766. </el-table-column>
  767. <el-table-column
  768. prop="reson"
  769. label="驳回理由"
  770. width="200px"
  771. show-overflow-tooltip
  772. />
  773. <el-table-column
  774. prop="rechargeTime"
  775. label="交款时间"
  776. sortable="“custom”"
  777. width="200px"
  778. >
  779. <template #default="scope">
  780. {{
  781. moment(scope.row.rechargeTime).format('YYYY-MM-DD HH:mm:ss')
  782. }}
  783. </template>
  784. </el-table-column>
  785. <el-table-column
  786. prop="createTime"
  787. label="提交时间"
  788. sortable="“custom”"
  789. width="200px"
  790. />
  791. <el-table-column
  792. fixed="right"
  793. prop="operation"
  794. label="操作"
  795. width="150px"
  796. >
  797. <template #default="scope">
  798. <div class="operation">
  799. <el-popconfirm
  800. title="确定要通过此条记录吗?"
  801. @confirm="passConfirm"
  802. >
  803. <template #reference>
  804. <el-button
  805. :disabled="
  806. scope.row.status === 1 || scope.row.status === 2
  807. ? true
  808. : false
  809. "
  810. type="primary"
  811. text
  812. @click="pass(scope.row)"
  813. >
  814. 通过
  815. </el-button>
  816. </template>
  817. <template #actions="{ confirm, cancel }">
  818. <el-button size="small" @click="cancel">取消</el-button>
  819. <el-button type="primary" size="small" @click="confirm">
  820. 确定
  821. </el-button>
  822. </template>
  823. </el-popconfirm>
  824. <el-button
  825. :disabled="
  826. scope.row.status === 1 || scope.row.status === 2
  827. ? true
  828. : false
  829. "
  830. type="primary"
  831. text
  832. @click="reject(scope.row)"
  833. >
  834. 驳回
  835. </el-button>
  836. </div>
  837. </template>
  838. </el-table-column>
  839. </el-table>
  840. </div>
  841. <!-- 分页 -->
  842. <div class="pagination">
  843. <el-pagination
  844. background
  845. :page-size="getObj.pageSize"
  846. :page-sizes="[5, 10, 20, 50, 100]"
  847. layout="total, sizes, prev, pager, next, jumper"
  848. :total="total"
  849. @size-change="handlePageSizeChange"
  850. @current-change="handleCurrentChange"
  851. ></el-pagination>
  852. </div>
  853. </el-card>
  854. </el-col>
  855. </el-row>
  856. <!-- 驳回弹出框 -->
  857. <el-dialog
  858. v-model="rejectVisible"
  859. title="驳回理由"
  860. width="500"
  861. :before-close="closeRejectVisible"
  862. >
  863. <template #footer>
  864. <el-form
  865. :model="rejectObj"
  866. ref="Ref"
  867. :rules="rules"
  868. label-width="auto"
  869. style="max-width: 600px"
  870. >
  871. <el-form-item prop="reson" label="驳回理由:">
  872. <el-input
  873. v-model="rejectObj.reson"
  874. maxlength="150"
  875. show-word-limit
  876. style="width: 350px"
  877. type="textarea"
  878. placeholder="请输入内容"
  879. />
  880. </el-form-item>
  881. </el-form>
  882. <div class="dialog-footer">
  883. <el-button @click="closeRejectVisible()">取消</el-button>
  884. <el-button type="primary" @click="rejectConfirm()"> 确定 </el-button>
  885. </div>
  886. </template>
  887. </el-dialog>
  888. </template>
  889. <style scoped>
  890. .pagination {
  891. display: flex;
  892. }
  893. .status {
  894. display: flex;
  895. }
  896. .operation {
  897. display: flex;
  898. }
  899. .head-card {
  900. display: flex;
  901. }
  902. .head-card-element {
  903. margin-right: 20px;
  904. }
  905. .head-card-btn {
  906. margin-left: auto;
  907. }
  908. </style>