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.

671 lines
21 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
3 months ago
3 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
3 months ago
3 months ago
3 months ago
3 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 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
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
5 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
5 months ago
5 months ago
5 months ago
4 weeks 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
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
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
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
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <script setup>
  2. import { computed, onMounted, reactive, ref, watch } from 'vue'
  3. import { ElMessage, ElMessageBox } from 'element-plus'
  4. import API from '@/util/http.js'
  5. import { useAdminStore } from "@/store/index.js";
  6. import { storeToRefs } from "pinia";
  7. import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js"
  8. import { e } from 'mathjs';
  9. const adminStore = useAdminStore();
  10. const { adminData, menuTree } = storeToRefs(adminStore);
  11. // 国际化
  12. import { useI18n } from 'vue-i18n'
  13. const { t } = useI18n()
  14. const tableData = ref([])
  15. const pagination = ref({
  16. pageNum: 1,
  17. pageSize: 10,
  18. total: 0
  19. })
  20. // 精网号去空格
  21. const trimJwCode = () => {
  22. if (addRefund.value.jwcode) {
  23. addRefund.value.jwcode = addRefund.value.jwcode.replace(/\s/g, '');
  24. }
  25. }
  26. // 这是添加退款信息的表单
  27. const addRefund = ref({
  28. jwcode: '',
  29. goodsName: '',
  30. refundType: '',
  31. refundModel: 0, // 0:全部退款, 1:部分退款
  32. permanentGold: '',
  33. freeGold: '',
  34. taskGold: '',
  35. sumGold: 0,
  36. remark: '',
  37. adminId: adminData.value.id,
  38. adminName: adminData.value.name,
  39. orderCode: '',
  40. type: 0
  41. })
  42. // 取消按钮
  43. const cancel = function () {
  44. addRefund.value = {
  45. jwcode: '',
  46. goodsName: '',
  47. refundType: '',
  48. refundModel: 0,
  49. permanentGold: '',
  50. freeGold: '',
  51. taskGold: '',
  52. sumGold: 0,
  53. remark: '',
  54. adminId: adminData.value.id,
  55. orderCode: '',
  56. }
  57. }
  58. const getRefund = async function () {
  59. if (!addRefund.value.jwcode) {
  60. ElMessage.error(t('elmessage.checkJwCode'))
  61. return
  62. }
  63. addRefund.value.orderCode = ''
  64. addRefund.value.goodsName = ''
  65. addRefund.value.permanentGold = ''
  66. addRefund.value.freeGold = ''
  67. addRefund.value.taskGold = ''
  68. let type = null
  69. if (addRefund.value.refundType === t('refund.refundTypeOptions.商品退款')) {
  70. type = 1
  71. } else {
  72. type = 0
  73. }
  74. const params = {
  75. pageNum: pagination.value.pageNum,
  76. pageSize: pagination.value.pageSize,
  77. goldDetail: {
  78. jwcode: addRefund.value.jwcode,
  79. flag: 0,
  80. type: type,
  81. markets:[]
  82. }
  83. }
  84. try {
  85. const res = await API({
  86. url: '/goldDetail/getGoldDetail',
  87. data: {
  88. ...params
  89. }
  90. })
  91. tableData.value = res.data.list
  92. pagination.value.total = res.data.total
  93. if (Array.isArray(res.data.list) && res.data.list.length > 0) {
  94. orderCodes.value = res.data.list.map(item => ({
  95. label: item.orderCode,
  96. value: item.orderCode
  97. }))
  98. console.log("看看订单号们", orderCodes.value)
  99. } else {
  100. ElMessage.info(t('elmessage.noOrder'))
  101. }
  102. } catch (error) {
  103. console.log('goldDetail有错误', error)
  104. ElMessage.error(t('elmessage.requestFailed'))
  105. tableData.value = []
  106. pagination.value.total = 0
  107. }
  108. }
  109. // 这是添加退款信息的接口
  110. const add = async function () {
  111. // 检查是否有添加权限
  112. if (!canAdd.value) {
  113. ElMessage.error(t('elmessage.noPermission'))
  114. return
  115. }
  116. try {
  117. if (addRefund.value.refundType === t('refund.refundTypeOptions.商品退款')) {
  118. addRefund.value.type = 1
  119. } else {
  120. addRefund.value.type = 0
  121. }
  122. // 对提交的金币数乘以 100
  123. const processedRefund = {
  124. ...addRefund.value,
  125. permanentGold: addRefund.value.permanentGold * 100,
  126. freeGold: addRefund.value.freeGold * 100,
  127. taskGold: addRefund.value.taskGold * 100,
  128. sumGold: addRefund.value.sumGold * 100
  129. }
  130. console.log('提交的退款信息', processedRefund)
  131. addDisabled.value = true
  132. // 发送POST请求
  133. const result = await API({
  134. url: '/refund/add',
  135. data: processedRefund
  136. })
  137. addDisabled.value = false
  138. if (result.code === 0) {
  139. ElMessage.error(result.msg)
  140. return
  141. }
  142. console.log('请求成功', result)
  143. ElMessage.success(t('elmessage.addSuccess'))
  144. // 重置表单
  145. cancel()
  146. } catch (error) {
  147. console.log('请求失败', error)
  148. ElMessage.error('请求失败,请重试')
  149. addDisabled.value = false
  150. }
  151. }
  152. // 提交禁止重复点击
  153. const addDisabled = ref(false)
  154. // 提交退款信息前的表单验证
  155. const addBefore = () => {
  156. Ref.value.validate(async (valid) => {
  157. if (valid) {
  158. ElMessageBox.confirm(t('elmessage.confirmRefund'))
  159. .then(() => {
  160. add()
  161. })
  162. .catch(() => {
  163. console.log('取消退款')
  164. })
  165. } else {
  166. // 提示
  167. ElMessage({
  168. type: 'error',
  169. message: t('elmessage.checkInputContent')
  170. })
  171. }
  172. })
  173. }
  174. // 表单验证
  175. const Ref = ref(null)
  176. const validateJwCode = (rule, value, callback) => {
  177. if (!value) {
  178. callback(new Error(t('elmessage.noEmptyJwcode')));
  179. return;
  180. }
  181. if (/[^0-9]/.test(value)) {
  182. callback(new Error(t('elmessage.limitDigitJwcode')));
  183. return;
  184. }
  185. callback();
  186. };
  187. const rules = reactive({
  188. jwcode: [{ required: true, validator: validateJwCode, trigger: 'blur' }],
  189. refundType: [{ required: true, message: t('elmessage.checkRefundType'), trigger: 'blur' }],
  190. goodsName: [{ required: false, message: t('elmessage.checkRefundGoods'), trigger: 'blur' }],
  191. // 订单号
  192. orderCode: [{ required: true, message: t('elmessage.checkOrderNo'), trigger: 'blur' }],
  193. taskGold: [{ required: true, message: t('elmessage.checkTaskGold'), trigger: 'blur' }],
  194. freeGold: [{ required: true, message: t('elmessage.checkFreeGold'), trigger: 'blur' }],
  195. permanentGold: [
  196. { required: true, message: t('elmessage.checkPermanentGold'), trigger: 'blur' }
  197. ],
  198. sumGold: [
  199. { required: true, message: t('elmessage.checkPayModel'), trigger: 'blur' },
  200. {
  201. validator: (rule, value) => {
  202. if (value === 0) {
  203. return Promise.reject(new Error(t('elmessage.noTotalGoldZero')))
  204. }
  205. return Promise.resolve()
  206. },
  207. trigger: 'blur'
  208. }
  209. ]
  210. })
  211. // 查找客户信息的方法
  212. const user = ref({
  213. firstRechargeTime: ''
  214. })
  215. const getUser = async function (jwcode) {
  216. trimJwCode();
  217. // 验证精网号
  218. if (!jwcode) {
  219. ElMessage.warning(t('elmessage.noEmptyJwcode'));
  220. return;
  221. }
  222. // 验证精网号是否为数字
  223. if (!/^\d{1,9}$/.test(jwcode)) {
  224. cancel()
  225. return;
  226. }
  227. try {
  228. // 发送POST请求
  229. const result = await API({
  230. url: '/user/selectUser',
  231. data: {
  232. jwcode: addRefund.value.jwcode
  233. }
  234. })
  235. console.log('请求成功', result)
  236. // 重置订单信息
  237. restGoods()
  238. //在此处错误逻辑的提示做了注释,在后续商品查询接口返回错误时,提示信息会显示在弹窗中
  239. if (result.code === 0) {
  240. ElMessage.error(result.msg);
  241. } else if (result.data === null) {
  242. ElMessage.error(t('elmessage.noUser'));
  243. } else {
  244. // 对传过来的金币数除以 100
  245. const processedData = {
  246. ...result.data,
  247. historySumGold: (Number(result.data.historySumGold) || 0),
  248. nowSumGold: (Number(result.data.nowSumGold) || 0),
  249. nowPermanentGold: (Number(result.data.nowPermanentGold) || 0),
  250. nowFreeGold: (Number(result.data.nowFreeGold) || 0),
  251. nowTaskGold: (Number(result.data.nowTaskGold) || 0)
  252. }
  253. user.value = processedData;
  254. console.log("用户信息", user.value);
  255. tableData.value = []
  256. addRefund.value.refundType = ''
  257. }
  258. } catch (error) {
  259. console.log("请求失败", error);
  260. ElMessage.error(t('elmessage.jwcodeError'));
  261. }
  262. }
  263. // 退款类型,写死为商品退款
  264. const refundType = ref([
  265. { value: '商品退款', label: t('refund.refundTypeOptions.商品退款') },
  266. { value: '金币退款', label: t('refund.refundTypeOptions.金币退款') }
  267. ])
  268. // 存储所有商品信息和订单号下拉数据
  269. const goodsName = ref([])
  270. const orderCodes = ref([])
  271. // 根据订单号自动带出商品名和金币信息
  272. const handleOrderChange = (orderCode) => {
  273. addRefund.value.refundModel = 0
  274. addRefund.value.goodsName = ''
  275. addRefund.value.permanentGold = ''
  276. addRefund.value.freeGold = ''
  277. addRefund.value.taskGold = ''
  278. const order = tableData.value.find(item => item.orderCode === orderCode)
  279. if (order) {
  280. addRefund.value.goodsName = order.goodsName
  281. if (addRefund.value.refundType === t('refund.refundTypeOptions.金币退款')) {
  282. selectedGoodsGold.value = {
  283. permanentGold: Number(order.permanentGold) || 0,
  284. freeGold: Number(order.freeGold) || 0,
  285. taskGold: Number(order.taskGold) || 0
  286. }
  287. console.log('看看金币退款参数', selectedGoodsGold.value)
  288. } else {
  289. selectedGoodsGold.value = {
  290. permanentGold: -Number(order.permanentGold) || 0,
  291. freeGold: -Number(order.freeGold) || 0,
  292. taskGold: -Number(order.taskGold) || 0
  293. }
  294. console.log('看看商品退款参数', selectedGoodsGold.value)
  295. }
  296. // 全部退款的填充
  297. if (addRefund.value.refundModel === 0) {
  298. addRefund.value.permanentGold = selectedGoodsGold.value.permanentGold.toString()
  299. addRefund.value.freeGold = selectedGoodsGold.value.freeGold.toString()
  300. addRefund.value.taskGold = selectedGoodsGold.value.taskGold.toString()
  301. }
  302. } else {
  303. addRefund.value.goodsName = ''
  304. selectedGoodsGold.value = {
  305. permanentGold: 0,
  306. freeGold: 0,
  307. taskGold: 0
  308. }
  309. }
  310. }
  311. // 存储选中商品的金币花费信息
  312. const selectedGoodsGold = ref({
  313. permanentGold: 0,
  314. freeGold: 0,
  315. taskGold: 0
  316. })
  317. // 重置订单信息
  318. const restGoods = () => {
  319. addRefund.value.orderCode = ''
  320. addRefund.value.goodsName = ''
  321. addRefund.value.permanentGold = ''
  322. addRefund.value.freeGold = ''
  323. addRefund.value.taskGold = ''
  324. }
  325. // 处理退款方式切换
  326. const handleRefundModelChange = () => {
  327. // 全部退款的自动填充 上面有
  328. if (addRefund.value.refundModel === 0) {
  329. addRefund.value.permanentGold = selectedGoodsGold.value.permanentGold.toString();
  330. addRefund.value.freeGold = selectedGoodsGold.value.freeGold.toString();
  331. addRefund.value.taskGold = selectedGoodsGold.value.taskGold.toString();
  332. }
  333. }
  334. // 统一的输入处理函数
  335. const handleGoldInput = (type, value) => {
  336. // 1. 过滤非法字符(只允许数字和小数点)
  337. let filtered = value.replace(/[^\d.]/g, '');
  338. // 2. 防止多个小数点
  339. const dotCount = (filtered.match(/\./g) || []).length;
  340. if (dotCount > 1) {
  341. // 保留第一个小数点,移除后续的小数点
  342. const parts = filtered.split('.');
  343. filtered = parts[0] + '.' + parts.slice(1).join('');
  344. }
  345. // 3. 限制小数点后两位
  346. if (filtered.includes('.')) {
  347. const [integer, decimal] = filtered.split('.');
  348. if (decimal.length > 2) {
  349. filtered = `${integer}.${decimal.slice(0, 2)}`;
  350. }
  351. }
  352. // 4. 检查是否以小数点开头,如果是,在前面添加0
  353. if (filtered.startsWith('.')) {
  354. filtered = '0' + filtered;
  355. }
  356. // 5. 更新值
  357. addRefund.value[type] = filtered;
  358. // 6. 验证逻辑(这里直接应用修正后的值)
  359. const maxValue = selectedGoodsGold.value[type];
  360. const inputValue = Number(filtered || 0);
  361. if (isNaN(inputValue)) {
  362. return;
  363. }
  364. if (inputValue > maxValue) {
  365. // 修正为最大值并设置回输入框
  366. const correctedValue = maxValue.toFixed(2);
  367. addRefund.value[type] = correctedValue;
  368. ElMessage.warning(t('elmessage.limitBalance'));
  369. }
  370. if (inputValue < 0) {
  371. // 修正为0并设置回输入框
  372. addRefund.value[type] = '0';
  373. ElMessage.warning(t('elmessage.noNegativeNumber'));
  374. }
  375. }
  376. // 使用示例
  377. const handlePermanentGoldInput = (value) => handleGoldInput('permanentGold', value);
  378. const handleFreeGoldInput = (value) => handleGoldInput('freeGold', value);
  379. const handleTaskGoldInput = (value) => handleGoldInput('taskGold', value);
  380. // 计算总金币
  381. const calculatedRechargeGoods = computed(() => {
  382. const permanentGold = addRefund.value.permanentGold === '' ? 0 : +addRefund.value.permanentGold;
  383. const freeGold = addRefund.value.freeGold === '' ? 0 : +addRefund.value.freeGold;
  384. const taskGold = addRefund.value.taskGold === '' ? 0 : +addRefund.value.taskGold;
  385. return Number((permanentGold + freeGold + taskGold).toFixed(2));
  386. })
  387. const canAdd = ref(findMenuById(menuTree.value,permissionMapping.add_gold_coin_refund))
  388. watch(calculatedRechargeGoods, (newVal) => {
  389. addRefund.value.sumGold = newVal
  390. })
  391. const handlePageSizeChange = function (val) {
  392. pagination.value.pageSize = val
  393. getRefund()
  394. }
  395. const handleCurrentChange = function (val) {
  396. pagination.value.pageNum = val
  397. getRefund()
  398. }
  399. onMounted(() =>{
  400. console.log(adminData.value)
  401. })
  402. </script>
  403. <template>
  404. <div class="father">
  405. <div class="userAndForm">
  406. <div class="left">
  407. <el-form :model="addRefund" ref="Ref" :rules="rules" label-width="auto" label-position="right"
  408. style="min-width: 420px" class="add-form">
  409. <el-form-item prop="jwcode" :label="$t('common_add.jwcode')">
  410. <el-input v-model="addRefund.jwcode" style="width: 220px" />
  411. <el-button type="primary" @click="getUser(addRefund.jwcode)" style="margin-left: 20px">{{ $t('common.search') }}
  412. </el-button>
  413. </el-form-item>
  414. <el-form-item prop="refundType" :label="$t('common_add.refundType')">
  415. <el-select v-model="addRefund.refundType" :placeholder="$t('common_add.refundTypePlaceholder')" style="width: 220px"
  416. @change="getRefund(addRefund.jwcode)">
  417. <el-option v-for="item in refundType" :key="item.value" :label="item.label" :value="item.value" />
  418. </el-select>
  419. </el-form-item>
  420. <el-form-item prop="orderCode" :label="$t('common_add.orderNo')">
  421. <el-select v-model="addRefund.orderCode" :placeholder="$t('common_add.orderNoPlaceholder')" style="width: 220px;" clearable filterable
  422. @change="handleOrderChange">
  423. <el-option v-for="(item, index) in orderCodes" :key="index" :label="item.label" :value="item.value" />
  424. </el-select>
  425. </el-form-item>
  426. <el-form-item prop="goodsName" :label="$t('common_add.goodsName')">
  427. <el-input v-model="addRefund.goodsName" style="width: 220px" disabled />
  428. </el-form-item>
  429. <el-form-item prop="refundModel" :label="$t('common_add.refundModel')">
  430. <el-radio-group v-model="addRefund.refundModel" @change="handleRefundModelChange">
  431. <el-radio :value="0">{{ $t('common_add.refundModelAll') }}</el-radio>
  432. <el-radio :value="1">{{ $t('common_add.refundModelPart') }}</el-radio>
  433. </el-radio-group>
  434. </el-form-item>
  435. <el-form-item prop="permanentGold" :label="$t('common_add.permanentGold')">
  436. <el-input v-model="addRefund.permanentGold" style="width: 220px" :disabled="addRefund.refundModel === 0"
  437. @input="handlePermanentGoldInput($event)" type="number">
  438. </el-input>&nbsp;&nbsp;{{ $t('common.') }}
  439. <template>
  440. </template>
  441. </el-form-item>
  442. <el-form-item prop="freeGold" :label="$t('common_add.freeGold')">
  443. <el-input v-model="addRefund.freeGold" style="float: left; width: 220px"
  444. :disabled="addRefund.refundModel === 0" @input="handleFreeGoldInput($event)" type="number" />
  445. &nbsp;&nbsp;{{ $t('common.个') }}
  446. </el-form-item>
  447. <div>
  448. <el-form-item prop="taskGold" :label="$t('common_add.taskGold')">
  449. <el-input v-model="addRefund.taskGold" style="float: left; width: 220px"
  450. :disabled="addRefund.refundModel === 0" @input="handleTaskGoldInput($event)" type="number" />
  451. &nbsp;&nbsp;{{ $t('common.个') }}
  452. </el-form-item>
  453. </div>
  454. <div>
  455. <el-form-item prop="sumGold" :label="$t('common_add.refundGoldCoin')">
  456. <el-input disabled v-model="addRefund.sumGold" style="width: 220px">
  457. </el-input>
  458. </el-form-item>
  459. </div>
  460. <div>
  461. <el-form-item prop="remark" :label="$t('common_add.remark')">
  462. <el-input v-model="addRefund.remark" style="width: 220px" :rows="3" maxlength="100" show-word-limit
  463. type="textarea" />
  464. </el-form-item>
  465. </div>
  466. <el-button type="success" @click="cancel()" style="margin-left: 200px">{{ $t('common.reset') }}</el-button>
  467. <el-button type="primary" :disabled="addDisabled" @click="addBefore" v-if="canAdd"> {{ $t('common.submit') }}</el-button>
  468. </el-form>
  469. </div>
  470. </div>
  471. <div class="right">
  472. <div class="right-up">
  473. <!-- 客户信息栏 -->
  474. <el-card v-if="user.jwcode" class="customer-info">
  475. <el-form :model="user" label-width="auto" label-position="left">
  476. <span style="margin-left: 30%;font-size: larger;">{{ $t('common_add_user.customerInfo') }}</span>
  477. <el-row style="margin-top: 1vh;">
  478. <div class="line">
  479. <span style="width:5vw;">{{ $t('common_add_user.name') }}</span>
  480. <span style="width:10vw;">{{ user.name }}</span>
  481. <span style="width:10vw;">{{ $t('common_add_user.currentGoldCoinTotal') }}</span>
  482. <span style="color: #2fa1ff;width: 25vw;" v-if="user.nowSumGold !== undefined">{{
  483. user.nowSumGold
  484. }}</span>
  485. </div>
  486. </el-row>
  487. <el-row style="height: 3vh;width: 100%;">
  488. <span style="height:3vh;color: #b1b1b1;font-size: small;margin-left:50%;"
  489. v-if="user.nowPermanentGold !== undefined">({{ $t('common_add_user.permanentGold') }}:{{
  490. user.nowPermanentGold
  491. }};
  492. {{ $t('common_add_user.freeGold') }}:{{ user.nowFreeGold }};
  493. {{ $t('common_add_user.taskGold') }}:{{ user.nowTaskGold }})</span>
  494. </el-row>
  495. <el-row>
  496. <!-- 第二行精网号 + 消费次数 -->
  497. <div class="line">
  498. <span style="width:5vw;">{{ $t('common_add_user.jwcode') }}</span>
  499. <span style="width: 10vw;">{{ user.jwcode }}</span>
  500. <span style="width:10vw;">{{ $t('common_add_user.consumptionTimes') }}</span>
  501. <span style="width: 10vw;color: #2fa1ff;">{{ user.consumeNum }}</span>
  502. </div>
  503. </el-row>
  504. <el-row>
  505. <span style="height:3vh;color: #b1b1b1;font-size: small;margin-left:50%;">({{ $t('common_add_user.onlyStatisticsDataAfter20250101') }}2025-01-01)</span>
  506. </el-row>
  507. <!-- 第四行所属门店 -->
  508. <el-row>
  509. <div class="line">
  510. <span style="width:5vw;">{{ $t('common_add_user.store') }}</span>
  511. <span style="width: 10vw;">{{ user.market }}</span>
  512. </div>
  513. </el-row>
  514. </el-form>
  515. </el-card>
  516. </div>
  517. <div>
  518. <el-card class="card" v-if="tableData.length > 0">
  519. <el-table :data="tableData" style="height:43vh;width:50vw">
  520. <el-table-column type="index" :label="$t('refund.id')" width="80">
  521. <template #default="scope">
  522. <span>{{
  523. scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize
  524. }}</span>
  525. </template>
  526. </el-table-column>
  527. <el-table-column prop="type" :label="$t('refund.type')" width="100">
  528. <template #default="{ row }">
  529. {{ row.type === 0 ? $t('refund.recharge') : $t('refund.consume') }}
  530. </template>
  531. </el-table-column>
  532. <el-table-column prop="goodsName" :label="$t('refund.productName')" width="120" show-overflow-tooltip />
  533. <el-table-column prop="orderCode" :label="$t('refund.orderCode')" width="200px" show-overflow-tooltip />
  534. <el-table-column prop="permanentGold" :label="$t('refund.permanentGold')" width="120">
  535. <template #default="{ row }">
  536. {{ row.permanentGold }}
  537. </template>
  538. </el-table-column>
  539. <el-table-column prop="freeGold" :label="$t('refund.freeGold')" width="120">
  540. <template #default="{ row }">
  541. {{ row.freeGold }}
  542. </template>
  543. </el-table-column>
  544. <el-table-column prop="taskGold" :label="$t('refund.taskGold')" width="120">
  545. <template #default="{ row }">
  546. {{ row.taskGold }}
  547. </template>
  548. </el-table-column>
  549. <el-table-column prop="isRefund" :label="$t('refund.isRefund')" width="120">
  550. <template #default="{ row }">
  551. {{ row.isRefund === 1 ? $t('refund.no') : $t('refund.yes') }}
  552. </template>
  553. </el-table-column>
  554. </el-table>
  555. <el-pagination class="pagination" v-model:current-page="pagination.pageNum"
  556. v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
  557. :total="pagination.total" @size-change="handlePageSizeChange"
  558. @current-change="handleCurrentChange"></el-pagination>
  559. </el-card>
  560. </div>
  561. </div>
  562. </div>
  563. </template>
  564. <style scoped lang="scss">
  565. p {
  566. margin: 0px;
  567. }
  568. .father {
  569. width: 75vw;
  570. height: 70vh;
  571. display: flex;
  572. }
  573. .userAndForm {
  574. width: 25vw;
  575. height: 100%;
  576. display: flex;
  577. }
  578. .left {
  579. width: 35vw;
  580. display: flex;
  581. .add-form {
  582. width: 100%;
  583. margin-top: 30px;
  584. }
  585. }
  586. .right-up {
  587. width: 50vw;
  588. height: 20vh;
  589. display: flex;
  590. justify-content: center;
  591. align-items: center;
  592. margin-left: 5vw;
  593. .customer-info {
  594. height: 21vh;
  595. padding-left: 5%;
  596. display: flex;
  597. align-items: center;
  598. .line {
  599. display: flex;
  600. height: 3vh;
  601. }
  602. }
  603. }
  604. .card {
  605. width: 50vw;
  606. height: 50vh;
  607. margin-left: 5vw;
  608. margin-top: 1vh;
  609. }
  610. .pagination {
  611. display: flex;
  612. margin-top: 0.5vh;
  613. }
  614. </style>