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

794 lines
22 KiB

12 months ago
11 months ago
11 months ago
12 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
11 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
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
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
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <!-- 这是金豆充值明细页面 -->
  3. <div class="filter-box">
  4. <el-form :model="detailY" ref="ruleFormRef">
  5. <el-form-item prop="jwcode">
  6. <el-text class="mx-1" size="large">精网号</el-text>
  7. <el-input
  8. v-model="detailY.jwcode"
  9. placeholder="请输入精网号"
  10. style="width: 220px"
  11. />
  12. </el-form-item>
  13. <el-form-item prop="deptName" >
  14. <el-text class="mx-1" size="large">地区</el-text>
  15. <el-select
  16. v-model="detailY.deptName"
  17. placeholder="请选择所属地区"
  18. style="width: 240px"
  19. clearable
  20. >
  21. <el-option
  22. v-for="item in areaList"
  23. :key="item"
  24. :label="item"
  25. :value="item"
  26. />
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item prop="orderNo" >
  30. <el-text class="mx-1" size="large">订单号</el-text>
  31. <el-input
  32. v-model="detailY.orderNo"
  33. placeholder="请输入订单号"
  34. style="width: 220px"
  35. />
  36. </el-form-item>
  37. <el-form-item prop="type">
  38. <el-text class="mx-1" size="large">充值类型</el-text>
  39. <el-select
  40. v-model="detailY.type"
  41. placeholder="请选择充值类型"
  42. style="width: 240px"
  43. clearable
  44. >
  45. <el-option
  46. v-for="item in typeList"
  47. :key="item"
  48. :label="item"
  49. :value="item"
  50. />
  51. </el-select>
  52. </el-form-item>
  53. <!-- <el-form-item prop="payStyle" label="充值平台">
  54. <el-select
  55. v-model="detailY.payStyle"
  56. placeholder="请选择充值平台"
  57. style="width: 240px"
  58. clearable
  59. >
  60. <el-option
  61. v-for="item in platformList"
  62. :key="item"
  63. :label="item"
  64. :value="item"
  65. />
  66. </el-select>
  67. </el-form-item> -->
  68. <el-row :span="24">
  69. <el-form-item prop="startTime">
  70. <el-text class="mx-1" size="large">开始时间</el-text>
  71. <el-date-picker
  72. v-model="detailY.startTime"
  73. type="date"
  74. placeholder="开始日期"
  75. style="width: 240px"
  76. format="YYYY-MM-DD HH:mm:ss"
  77. value-format="YYYY-MM-DD HH:mm:ss"
  78. />
  79. </el-form-item>
  80. <el-form-item prop="endTime">
  81. <el-text class="mx-1" size="large">结束时间</el-text>
  82. <el-date-picker
  83. v-model="detailY.endTime"
  84. type="date"
  85. placeholder="结束日期"
  86. style="width: 240px"
  87. format="YYYY-MM-DD HH:mm:ss"
  88. value-format="YYYY-MM-DD HH:mm:ss"
  89. />
  90. </el-form-item>
  91. <el-button style="margin-left: 10px" @click="getToday()"></el-button>
  92. <el-button @click="getYesterday()"></el-button>
  93. <el-button @click="get7Days()">近7天</el-button>
  94. </el-row>
  95. <el-form-item>
  96. <el-button type="primary" @click="search">查询</el-button>
  97. <el-button type="success" @click="reset(ruleFormRef)">重置</el-button>
  98. <el-button type="primary" @click="showExportInfoPanel = true">导出excel</el-button>
  99. </el-form-item>
  100. </el-form>
  101. </div>
  102. <!-- 导出excel提前展示的信息面板 -->
  103. <el-dialog
  104. v-model="showExportInfoPanel"
  105. title="导出信息确认"
  106. width="400px"
  107. :close-on-click-modal="false"
  108. >
  109. <div class="info-panel-header">导出信息</div>
  110. <div v-if="!detailY.jwcode && !detailY.deptName && !detailY.orderNo && !detailY.type && !detailY.startTime && !detailY.endTime">
  111. 你正在导出所有数据
  112. </div>
  113. <div v-else>
  114. 你正在导出以下数据
  115. </div>
  116. <div v-if="detailY.jwcode">精网号{{ detailY.jwcode || '' }}</div>
  117. <div v-if="detailY.deptName">所属地区{{ detailY.deptName || '' }}</div>
  118. <div v-if="detailY.orderNo">订单号{{ detailY.orderNo || '' }}</div>
  119. <div v-if="detailY.type">充值类型{{ detailY.type || '' }}</div>
  120. <div v-if="detailY.startTime || detailY.endTime">
  121. <span>更新时间</span>
  122. <span>{{ detailY.startTime || '无起始时间' }} {{ detailY.endTime || '无结束时间' }}</span>
  123. </div>
  124. <template #footer>
  125. <span class="dialog-footer">
  126. <el-button @click="showExportInfoPanel = false">取消</el-button>
  127. <el-button type="primary" @click="doExportExcel">导出</el-button>
  128. </span>
  129. </template>
  130. </el-dialog>
  131. <!-- 导出进度弹窗 -->
  132. <el-dialog
  133. v-model="isExporting"
  134. title="正在导出"
  135. width="400px"
  136. :close-on-click-modal="false"
  137. :show-close="false"
  138. >
  139. <el-progress
  140. :percentage="exportProgress"
  141. :stroke-width="15"
  142. striped
  143. animated
  144. />
  145. <div class="export-status">
  146. 已导出 {{ exportedCount }} / {{ totalExport }}
  147. </div>
  148. <template #footer>
  149. <el-button type="danger" @click="cancelExport">取消导出</el-button>
  150. </template>
  151. </el-dialog>
  152. <div class="table-box">
  153. <div
  154. >金豆总数充值金豆总数{{ countValue }}合计金额数{{
  155. priceValue
  156. }}</div
  157. >
  158. <el-table :data="tableData" style="width: 100%" height="584px">
  159. <el-table-column type="index" label="序号" width="100px" fixed="left">
  160. <template #default="scope">
  161. <span>{{
  162. scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
  163. }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column fixed="left" prop="nickname" label="姓名" width="150" />
  167. <el-table-column fixed="left" prop="jwcode" label="精网号" width="120" />
  168. <el-table-column prop="ipAddress" label="地区" width="120" />
  169. <el-table-column prop="orderNo" label="订单号" width="120" />
  170. <el-table-column prop="money" label="金豆数量" width="120">
  171. </el-table-column>
  172. <el-table-column prop="moneyBuy" label="付费金豆" width="120">
  173. </el-table-column>
  174. <el-table-column prop="moneyFree" label="免费金豆" width="120">
  175. </el-table-column>
  176. <el-table-column prop="price" label="金额"></el-table-column>
  177. <el-table-column prop="type" label="类型"></el-table-column>
  178. <!-- <el-table-column prop="payStyle" label="充值平台" width="140">
  179. </el-table-column>
  180. <el-table-column prop="notes" label="备注" width="210"></el-table-column> -->
  181. <el-table-column
  182. prop="time"
  183. label="充值时间"
  184. width="210"
  185. show-overflow-tooltip
  186. >
  187. <template #default="scope">
  188. <span>{{
  189. !!scope.row.time
  190. ? moment.unix(scope.row.time).format('YYYY-MM-DD HH:mm:ss')
  191. : '-'
  192. }}</span>
  193. </template>
  194. </el-table-column>
  195. </el-table>
  196. <!-- 分页 -->
  197. <div class="pagination">
  198. <el-pagination
  199. background
  200. :page-size="getObj.pageSize"
  201. :page-sizes="[5, 10, 20, 50, 100]"
  202. layout="total, sizes, prev, pager, next, jumper"
  203. :total="total"
  204. @size-change="handlePageSizeChange"
  205. @current-change="handleCurrentChange"
  206. >
  207. </el-pagination>
  208. </div>
  209. </div>
  210. <!-- 这是导出excel的弹窗 -->
  211. <!-- <el-dialog
  212. v-model="dialogVisible"
  213. title="请选择导出条件"
  214. width="500"
  215. :close-on-click-modal="false"
  216. @close="
  217. () => {
  218. dialogVisible = false
  219. isExport = false
  220. }
  221. "
  222. >
  223. <template #footer>
  224. <el-form
  225. ref="ruleFormRef"
  226. style="max-width: 600px"
  227. :model="excelData"
  228. :rules="rules"
  229. label-width="auto"
  230. class="demo-ruleForm"
  231. status-icon
  232. >
  233. <el-form-item prop="activityName" label="精网号:">
  234. <el-input
  235. v-model="excelData.jwcode"
  236. placeholder="请输入精网号"
  237. style="width: 220px"
  238. />
  239. </el-form-item>
  240. <el-form-item label="所属地区:"
  241. ><el-select
  242. v-model="excelData.area"
  243. placeholder="请选择所属地区"
  244. style="width: 240px"
  245. clearable
  246. >
  247. <el-option
  248. v-for="item in areaList"
  249. :key="item"
  250. :label="item"
  251. :value="item"
  252. />
  253. </el-select>
  254. </el-form-item>
  255. <el-form-item label="更新时间:">
  256. <el-radio-group v-model="excelData.timegap">
  257. <el-radio value="1">今天</el-radio>
  258. <el-radio value="3">近三天</el-radio>
  259. <el-radio value="7">近一周</el-radio>
  260. <el-radio value="30">近一个月</el-radio>
  261. </el-radio-group>
  262. </el-form-item>
  263. <el-button
  264. type="primary"
  265. size="small"
  266. style="margin-left: 10px"
  267. @click="exportConfirm()"
  268. >确定</el-button
  269. >
  270. </el-form>
  271. </template>
  272. </el-dialog> -->
  273. </template>
  274. <script setup lang="ts">
  275. import { reactive, ref, onMounted, onUnmounted } from 'vue'
  276. import { FormInstance } from 'element-plus'
  277. import { ElMessage } from 'element-plus'
  278. import moment from 'moment'
  279. import API from '@/util/http'
  280. import { utils, write } from 'xlsx'
  281. import { saveAs } from 'file-saver'
  282. const showExportInfoPanel = ref(false)
  283. const isExporting = ref(false)
  284. const exportProgress = ref(0)
  285. const totalExport = ref(0)
  286. const exportedCount = ref(0)
  287. let cancelToken: any = null
  288. let allExportData: any[] = []
  289. // 取消导出
  290. const cancelExport = () => {
  291. if (cancelToken) {
  292. cancelToken.cancel('导出已取消')
  293. }
  294. isExporting.value = false
  295. exportProgress.value = 0
  296. exportedCount.value = 0
  297. allExportData = []
  298. ElMessage.info('导出已取消')
  299. }
  300. // 导出 Excel
  301. const doExportExcel = async () => {
  302. try {
  303. isExporting.value = true
  304. exportProgress.value = 0
  305. exportedCount.value = 0
  306. allExportData = []
  307. // 获取总数据量
  308. const totalResult = await API({
  309. url: '/dou/getPay',
  310. data: {
  311. pay: {
  312. jwcode: detailY.value.jwcode,
  313. deptName: detailY.value.deptName,
  314. startTime: detailY.value.startTime || '',
  315. endTime: detailY.value.endTime || '',
  316. payStyle: detailY.value.payStyle,
  317. type: detailY.value.type,
  318. orderNo: detailY.value.orderNo,
  319. sortField: '',
  320. sortOrder: ''
  321. },
  322. pageNum: 1,
  323. pageSize: 1
  324. }
  325. })
  326. totalExport.value = totalResult.data.total
  327. if (totalExport.value === 0) {
  328. ElMessage.error('没有数据可导出')
  329. isExporting.value = false
  330. return
  331. }
  332. const pageSize = 5000 // 每批次获取 100 条数据
  333. const totalPages = Math.ceil(totalExport.value / pageSize)
  334. for (let page = 1; page <= totalPages; page++) {
  335. if (!isExporting.value) break // 如果取消导出,停止循环
  336. const result = await API({
  337. url: '/dou/getPay',
  338. data: {
  339. pay: {
  340. jwcode: detailY.value.jwcode,
  341. deptName: detailY.value.deptName,
  342. startTime: detailY.value.startTime || '',
  343. endTime: detailY.value.endTime || '',
  344. payStyle: detailY.value.payStyle,
  345. type: detailY.value.type,
  346. orderNo: detailY.value.orderNo,
  347. sortField: '',
  348. sortOrder: ''
  349. },
  350. pageNum: page,
  351. pageSize: pageSize
  352. }
  353. })
  354. const data = result.data.list
  355. allExportData = allExportData.concat(data)
  356. exportedCount.value = allExportData.length
  357. exportProgress.value = Math.round((exportedCount.value / totalExport.value) * 100)
  358. }
  359. if (isExporting.value) {
  360. // 导出的数据将字段映射,添加序号列
  361. const exportData = allExportData.map((item, index) => {
  362. return {
  363. 序号: index + 1, // 添加序号列
  364. 姓名: item.nickname,
  365. 精网号: item.jwcode,
  366. 地区: item.ipAddress,
  367. 订单号: item.orderNo,
  368. 金豆数量: item.money,
  369. 付费金豆: item.moneyBuy,
  370. 免费金豆: item.moneyFree,
  371. 金额: item.price,
  372. 类型: item.type,
  373. 充值时间: !!item.time ? moment.unix(item.time).format('YYYY-MM-DD HH:mm:ss') : '-'
  374. }
  375. })
  376. const worksheet = utils.json_to_sheet(exportData)
  377. const workbook = utils.book_new()
  378. utils.book_append_sheet(workbook, worksheet, 'Sheet1')
  379. const wbout = write(workbook, { bookType: 'xlsx', type: 'array' })
  380. saveAs(
  381. new Blob([wbout], { type: 'application/octet-stream' }),
  382. '金豆充值明细导出.xlsx'
  383. )
  384. showExportInfoPanel.value = false
  385. isExporting.value = false
  386. ElMessage.success('导出成功')
  387. }
  388. } catch (error) {
  389. if (error.message === '导出已取消') {
  390. return
  391. }
  392. console.log('导出失败', error)
  393. isExporting.value = false
  394. ElMessage.error('导出失败,请稍后重试')
  395. }
  396. }
  397. // 充值明细表格
  398. const tableData = ref([])
  399. //分页总条目
  400. const total = ref(100)
  401. const dialogVisible = ref(false)
  402. const excelData = reactive({
  403. jwcode: '',
  404. area: '',
  405. timegap: '',
  406. startTime: '',
  407. endTime: ''
  408. })
  409. const priceValue = ref(0)
  410. const countValue = ref(0)
  411. // areaList 地区列表
  412. const areaList = ref<string[]>([])
  413. const isExport = ref<boolean>(false)
  414. const rules = ref({
  415. jwcode: [{ required: true, message: '请输入精网号', trigger: 'blur' }],
  416. area: [{ required: true, message: '请选择所属地区', trigger: 'change' }]
  417. })
  418. // 今天
  419. const getToday = function () {
  420. const today = new Date()
  421. // 格式化开始时间
  422. const startDate = moment(today).startOf('day').format('YYYY-MM-DD HH:mm:ss')
  423. // 格式化结束时间
  424. const endDate = moment(today).endOf('day').format('YYYY-MM-DD HH:mm:ss')
  425. detailY.value.startTime = startDate
  426. detailY.value.endTime = endDate
  427. search()
  428. }
  429. // 昨天
  430. const getYesterday = function () {
  431. const yesterday = moment().subtract(1, 'days')
  432. // 格式化开始时间
  433. const startDate = yesterday.startOf('day').format('YYYY-MM-DD HH:mm:ss')
  434. // 格式化结束时间
  435. const endDate = yesterday.endOf('day').format('YYYY-MM-DD HH:mm:ss')
  436. detailY.value.startTime = startDate
  437. detailY.value.endTime = endDate
  438. search()
  439. }
  440. // 近7天
  441. const get7Days = function () {
  442. // 格式化开始时间
  443. const startDate = moment().subtract(6, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss')
  444. // 格式化结束时间
  445. const endDate = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
  446. detailY.value.startTime = startDate
  447. detailY.value.endTime = endDate
  448. search()
  449. }
  450. //获取地区接口
  451. const getArea = async () => {
  452. try {
  453. const result = await API({
  454. url: '/dou/getPayIp'
  455. })
  456. areaList.value = result.data
  457. } catch (error) {
  458. console.log('请求失败', error)
  459. }
  460. }
  461. const getType = async () => {
  462. try {
  463. const result = await API({
  464. url: '/dou/getType'
  465. })
  466. typeList.value = result.data
  467. } catch (error) {
  468. console.log('请求失败', error)
  469. }
  470. }
  471. const handlePageSizeChange = (val) => {
  472. getObj.value.pageSize = val
  473. getObj.value.pageNum = 1
  474. getInit({})
  475. }
  476. const handleCurrentChange = function (val) {
  477. getObj.value.pageNum = val
  478. getInit({})
  479. }
  480. const platformList = ref<string[]>([
  481. // 'stripe',
  482. // 'ios',
  483. // 'FirstData',
  484. // 'paymentasia',
  485. // 'system',
  486. // '金币系统'
  487. ])
  488. const typeList = ref<string[]>([
  489. '金币换金豆',
  490. '金币换免费金豆',
  491. '赠送金豆',
  492. '购买金豆',
  493. '客服操作'
  494. ])
  495. //搜索表单数据
  496. const detailY = ref({
  497. jwcode: '',
  498. deptName: '',
  499. orderNo: '',
  500. payStyle: '',
  501. type: '',
  502. startTime:'',
  503. endTime:''
  504. })
  505. const getObj = ref({
  506. pageNum: 1,
  507. pageSize: 50
  508. })
  509. // const exportExcel = function () {
  510. // dialogVisible.value = true
  511. // isExport.value = true
  512. // }
  513. // const exportConfirm = function () {
  514. // if (excelData.timegap == '1') {
  515. // excelData.startTime = moment().startOf('day').format('YYYY-MM-DD HH:mm:ss')
  516. // excelData.endTime = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
  517. // } else if (excelData.timegap == '3') {
  518. // excelData.startTime = moment()
  519. // .subtract(3, 'days')
  520. // .startOf('day')
  521. // .format('YYYY-MM-DD HH:mm:ss')
  522. // excelData.endTime = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
  523. // } else if (excelData.timegap == '7') {
  524. // excelData.startTime = moment()
  525. // .subtract(7, 'days')
  526. // .startOf('day')
  527. // .format('YYYY-MM-DD')
  528. // excelData.endTime = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
  529. // } else if (excelData.timegap == '30') {
  530. // excelData.startTime = moment()
  531. // .subtract(30, 'days')
  532. // .startOf('day')
  533. // .format('YYYY-MM-DD HH:mm:ss')
  534. // excelData.endTime = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
  535. // }
  536. // getInit(
  537. // {
  538. // sortField: '',
  539. // sortOrder: ''
  540. // },
  541. // (data) => {
  542. // console.log('导出数据', data)
  543. // //导出的数据将字段映射
  544. // data = data.map((item) => {
  545. // return {
  546. // 姓名: item.name,
  547. // 精网号: item.jwcode,
  548. // 地区: item.deptName,
  549. // 订单号: item.orderNo,
  550. // 充值平台: item.payStyle,
  551. // 金豆数量: item.count,
  552. // 充值时间: moment(item.successTime).format('YYYY-MM-DD'),
  553. // 金额: item.price
  554. // }
  555. // })
  556. // if (data.length == 0) {
  557. // ElMessage.error('没有数据')
  558. // isExport.value = false
  559. // dialogVisible.value = false
  560. // return
  561. // }
  562. // console.log('导出数据', data)
  563. // excelExport(data)
  564. // }
  565. // )
  566. // }
  567. //数据导出excel
  568. // const excelExport = async function (data) {
  569. // const worksheet = utils.json_to_sheet(data)
  570. // const workbook = utils.book_new()
  571. // utils.book_append_sheet(workbook, worksheet, 'Sheet1')
  572. // const wbout = write(workbook, { bookType: 'xlsx', type: 'array' })
  573. // saveAs(
  574. // new Blob([wbout], { type: 'application/octet-stream' }),
  575. // '数据导出.xlsx'
  576. // )
  577. // isExport.value = false
  578. // dialogVisible.value = false
  579. // }
  580. const ruleFormRef = ref<FormInstance>()
  581. //初始化
  582. const getInit = async function (
  583. {
  584. sortField = '',
  585. sortOrder = ''
  586. }: {
  587. sortField?: string
  588. sortOrder?: string
  589. },
  590. // callback?: Function
  591. ) {
  592. try {
  593. console.log('搜索参数', getObj.value)
  594. const startTime = detailY.value.startTime
  595. const endTime = detailY.value.endTime
  596. console.log(startTime, endTime)
  597. // 发送POST请求
  598. const result = await API({
  599. url: '/dou/getPay',
  600. data: {
  601. pay: {
  602. jwcode: detailY.value.jwcode,
  603. deptName: detailY.value.deptName,
  604. startTime: detailY.value.startTime || '',
  605. endTime: detailY.value.endTime || '',
  606. payStyle: detailY.value.payStyle,
  607. type: detailY.value.type,
  608. orderNo: detailY.value.orderNo,
  609. sortField,
  610. sortOrder
  611. },
  612. pageNum: getObj.value.pageNum,
  613. pageSize: getObj.value.pageSize
  614. }
  615. })
  616. // if (isExport.value) {
  617. // !!callback && callback(result.data)
  618. // } else {
  619. tableData.value = result.data.list
  620. total.value = result.data.total
  621. // }
  622. } catch (error) {
  623. console.log('请求失败', error)
  624. // 在这里可以处理错误逻辑,比如显示错误提示等
  625. }
  626. }
  627. const handleSortChange = (column) => {
  628. const { prop, order } = column
  629. if (order === 'ascending') {
  630. getInit({ sortField: prop, sortOrder: 'ASC' })
  631. } else if (order === 'descending') {
  632. getInit({ sortField: prop, sortOrder: 'DESC' })
  633. }
  634. }
  635. // 精网号、订单号、充值类型去空格
  636. const trim = () => {
  637. if (detailY.value.jwcode) {
  638. detailY.value.jwcode = detailY.value.jwcode.replace(/\s/g, '');
  639. }
  640. if (detailY.value.orderNo) {
  641. detailY.value.orderNo = detailY.value.orderNo.replace(/\s/g, '');
  642. }
  643. if (detailY.value.type) {
  644. detailY.value.type = detailY.value.type.replace(/\s/g, '');
  645. }
  646. }
  647. // 搜索
  648. const search = function () {
  649. trim();
  650. getObj.value.pageNum = 1
  651. getInit({})
  652. getCount()
  653. }
  654. // 重置
  655. const reset = function (formEl) {
  656. formEl.resetFields()
  657. }
  658. //获取支付方式接口
  659. const getPayType = async () => {
  660. try {
  661. const result = await API({
  662. url: '/dou/getStyle'
  663. })
  664. platformList.value = result.data
  665. // typeList.value = result.data
  666. } catch (error) {
  667. console.log('请求失败', error)
  668. }
  669. }
  670. //获取金豆数接口
  671. const getCount = async () => {
  672. try {
  673. const result = await API({
  674. url: '/dou/getTotal',
  675. data: {
  676. jwcode: detailY.value.jwcode,
  677. deptName: detailY.value.deptName,
  678. startTime: detailY.value.startTime,
  679. endTime: detailY.value.endTime,
  680. orderNo: detailY.value.orderNo,
  681. type: detailY.value.type
  682. // payStyle: detailY.value.payStyle
  683. }
  684. })
  685. if (!!result.data) {
  686. const { price, count } = result.data
  687. console.log('金豆总数', price, count)
  688. priceValue.value = price
  689. countValue.value = count
  690. } else {
  691. priceValue.value = 0
  692. countValue.value = 0
  693. }
  694. } catch (error) {
  695. console.log('请求失败', error)
  696. }
  697. }
  698. onMounted(() => {
  699. getInit({})
  700. getPayType()
  701. getCount()
  702. getArea()
  703. getType()
  704. })
  705. </script>
  706. <style scoped lang="scss">
  707. .filter-box {
  708. width: 100%;
  709. display: flex;
  710. justify-content: space-between;
  711. align-items: center;
  712. padding: 20px;
  713. padding-bottom: 0px;
  714. box-sizing: border-box;
  715. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  716. margin-bottom: 20px;
  717. border-radius: 5px;
  718. .el-form {
  719. display: flex;
  720. flex-wrap: wrap;
  721. row-gap: 20px;
  722. column-gap: 20px;
  723. }
  724. }
  725. .table-box {
  726. width: 100%;
  727. padding: 20px;
  728. box-sizing: border-box;
  729. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  730. border-radius: 5px;
  731. }
  732. .pagination {
  733. display: flex;
  734. align-items: center;
  735. margin-top: 10px;
  736. }
  737. .filter-box {
  738. width: 100%;
  739. display: flex;
  740. justify-content: space-between;
  741. align-items: center;
  742. padding: 20px;
  743. padding-bottom: 0px;
  744. box-sizing: border-box;
  745. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  746. margin-bottom: 20px;
  747. border-radius: 5px;
  748. .el-form {
  749. display: flex;
  750. flex-wrap: wrap;
  751. row-gap: 20px;
  752. column-gap: 20px;
  753. }
  754. }
  755. .table-box {
  756. width: 100%;
  757. padding: 20px;
  758. box-sizing: border-box;
  759. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  760. border-radius: 5px;
  761. }
  762. .pagination {
  763. display: flex;
  764. align-items: center;
  765. margin-top: 10px;
  766. }
  767. </style>