Преглед изворни кода

feat(financialManagement): 动态显示技术服务费率

将原先写死的 3% 费率改为从本地存储中读取 commissionRate,实现费率可配置。同时更新了今日收益、已对账等页面的相关逻辑,并引入 getDetail 接口用于获取门店名称信息。此外,调整了提现记录中的状态枚举值以匹配最新业务需求。
zhuli пре 3 недеља
родитељ
комит
3760e8dcc4

+ 2 - 1
src/views/financialManagement/reconciled.vue

@@ -28,7 +28,7 @@
           <el-col :span="12"> 实际收益: +{{ ((reconciled.money || 0) / 100).toFixed(2) }} </el-col>
           <el-col :span="12">
             <!-- {{ `技术服务费(${unposted.commission / 100 || 3}%)` }}: 后续后端会变成可控的-->
-            {{ `技术服务费(3%):` }}
+            {{ `技术服务费(${commissionRate}%):` }}
             {{ reconciled.commission != null ? (reconciled.commission / 100).toFixed(2) : "--" }}
           </el-col>
         </el-row>
@@ -53,6 +53,7 @@ import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
 import { getPaymentCycle } from "@/api/modules/homeEntry";
 import { localGet } from "@/utils";
 import { useRouter } from "vue-router";
+const commissionRate = localGet("commissionRate") || "";
 const router = useRouter();
 const dialogVisible = ref(false);
 const reconciled = ref<any>({});

+ 2 - 1
src/views/financialManagement/todayIncomeList.vue

@@ -27,7 +27,7 @@
         <el-row class="couponRow">
           <el-col :span="12"> 实际收益: {{ ((unposted.money || 0) / 100).toFixed(2) }} </el-col>
           <el-col :span="12">
-            {{ `技术服务费(${commissionRate || 3}%)` }}:
+            {{ `技术服务费(${commissionRate}%):` }}:
             {{ unposted.commission != null ? (unposted.commission / 100).toFixed(2) : "--" }}
           </el-col>
         </el-row>
@@ -57,6 +57,7 @@ import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
 import { getGroupIncome } from "@/api/modules/homeEntry";
 import { ElMessageBox } from "element-plus/es";
 import { localGet } from "@/utils";
+const commissionRate = localGet("commissionRate") || "";
 const router = useRouter();
 const dialogVisible = ref(false);
 const unposted = ref<any>({});

+ 2 - 1
src/views/financialManagement/unposted.vue

@@ -31,7 +31,7 @@
           </el-col>
           <el-col :span="12">
             <!-- {{ `技术服务费(${unposted.commission / 100 || 3}%)` }}: 后续后端会变成可控的-->
-            {{ `技术服务费(3%):` }}
+            {{ `技术服务费(${commissionRate}%):` }}:
             {{ unposted.commission != null ? (unposted.commission / 100).toFixed(2) : "--" }}
           </el-col>
         </el-row>
@@ -60,6 +60,7 @@ import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
 import { getPaymentCycle } from "@/api/modules/homeEntry";
 import { ElMessageBox } from "element-plus/es";
 import { localGet } from "@/utils";
+const commissionRate = localGet("commissionRate") || "";
 const router = useRouter();
 const dialogVisible = ref(false);
 const unposted = ref<any>({});

+ 1 - 4
src/views/financialManagement/withdrawaRecord.vue

@@ -95,12 +95,9 @@ const proTable = ref<ProTableInstance>();
 
 // 提现状态枚举
 const paymentStatusEnum = [
-  { label: "提现中", value: 0 },
-  { label: "提现成功", value: 1 },
-  { label: "提现失败", value: 2 },
   { label: "提现待审核", value: 3 },
   { label: "提现拒绝", value: 4 },
-  { label: "提现待审核通过", value: 5 }
+  { label: "提现成功", value: 5 }
 ];
 
 // 表格配置项

+ 21 - 2
src/views/home/components/go-examine.vue

@@ -52,11 +52,19 @@ import homeIcon from "../../../assets/images/home-icon.png";
 import homeWallet from "../../../assets/images/home-wallet.png";
 import homeOrder from "../../../assets/images/home-order.png";
 import homeIncome from "../../../assets/images/home-income.png";
-import { verifyOrder, verifyCoupon, getTodayOrderCount, getTodayIncome, getAccountBalance } from "@/api/modules/homeEntry";
+import {
+  verifyOrder,
+  verifyCoupon,
+  getTodayOrderCount,
+  getTodayIncome,
+  getAccountBalance,
+  getDetail
+} from "@/api/modules/homeEntry";
+
 import { localGet, localSet } from "@/utils/index";
 const userInfo = localGet("geeker-user").userInfo;
 // 数据(可根据实际接口替换)
-const storeName = ref("时间图书馆");
+const storeName = ref("");
 const expireDate = ref("2027/10/29");
 const voucherCode = ref("");
 
@@ -67,8 +75,19 @@ onMounted(() => {
   getOrder();
   getInCome();
   getMyMoney();
+  getStoreDetail();
 });
 
+const getStoreDetail = async () => {
+  let param = {
+    id: userInfo.storeId
+  };
+  const res: any = await getDetail(param as any);
+  if (res.code == 200) {
+    console.log(1);
+    storeName.value = res.data.storeName;
+  }
+};
 //可提现金额
 const getMyMoney = async () => {
   let param = {