Browse Source

Merge remote-tracking branch 'origin/development' into development

congxuesong 2 tuần trước cách đây
mục cha
commit
48a8ce36a8
1 tập tin đã thay đổi với 24 bổ sung6 xóa
  1. 24 6
      src/views/financialManagement/withdrawaRecord.vue

+ 24 - 6
src/views/financialManagement/withdrawaRecord.vue

@@ -53,7 +53,7 @@
             </div>
             <div class="detail-item">
               <span class="detail-label">提现金额</span>
-              <span class="detail-value amount">¥{{ (withdrawalDetail.money / 100).toFixed(2) || "6146.6" }}</span>
+              <span class="detail-value amount">¥{{ formatNumber(withdrawalDetail.money / 100) }}</span>
             </div>
             <div class="detail-item">
               <span class="detail-label">发起提现时间</span>
@@ -90,14 +90,32 @@ import { ElMessageBox } from "element-plus/es";
 import { localGet } from "@/utils";
 const dialogVisible = ref(false);
 const withdrawalDetail = ref<any>({});
+// 格式化数字为千分位
+const formatNumber = (value: any): string => {
+  if (value === null || value === undefined || value === "") {
+    return "0.00";
+  }
+  const num = typeof value === "string" ? parseFloat(value) : Number(value);
+  if (isNaN(num)) {
+    return "0.00";
+  }
+  // 保留两位小数并添加千分位
+  return num.toLocaleString("zh-CN", {
+    minimumFractionDigits: 2,
+    maximumFractionDigits: 2
+  });
+};
 // ProTable 实例(需要在使用它的地方之前定义)
 const proTable = ref<ProTableInstance>();
 
 // 提现状态枚举
 const paymentStatusEnum = [
-  { label: "体现中", value: 0 },
+  { label: "现中", value: 0 },
   { label: "提现成功", value: 1 },
-  { label: "提现失败", value: 2 }
+  { label: "提现失败", value: 2 },
+  { label: "待审核", value: 3 },
+  { label: "提现拒绝", value: 4 },
+  { label: "审核通过", value: 5 }
 ];
 
 // 表格配置项
@@ -141,16 +159,16 @@ const columns = reactive<ColumnProps<any>[]>([
     label: "提现状态",
     render: scope => {
       return scope.row.paymentStatus === 0
-        ? "提现中"
+        ? "进行中"
         : scope.row.paymentStatus === 1
           ? "提现成功"
           : scope.row.paymentStatus === 2
             ? "提现失败"
             : scope.row.paymentStatus === 3
-              ? "提现待审核"
+              ? "待审核"
               : scope.row.paymentStatus === 4
                 ? "提现拒绝"
-                : "提现待审核通过";
+                : "审核通过";
     },
     search: {
       el: "select",