diff --git a/packages/ui/certd-client/src/router/source/modules/certd.ts b/packages/ui/certd-client/src/router/source/modules/certd.ts
index 622d78be0..9b01955d6 100644
--- a/packages/ui/certd-client/src/router/source/modules/certd.ts
+++ b/packages/ui/certd-client/src/router/source/modules/certd.ts
@@ -370,21 +370,6 @@ export const certdResources = [
keepAlive: true,
},
},
- {
- title: "certd.myWallet",
- name: "MyWallet",
- path: "/certd/wallet",
- component: "/certd/wallet/index.vue",
- meta: {
- show: () => {
- const settingStore = useSettingStore();
- return settingStore.isComm;
- },
- icon: "ion:wallet-outline",
- auth: true,
- keepAlive: true,
- },
- },
{
title: "certd.inviteCommission",
name: "InviteCommission",
@@ -400,6 +385,21 @@ export const certdResources = [
keepAlive: true,
},
},
+ {
+ title: "certd.myWallet",
+ name: "MyWallet",
+ path: "/certd/wallet",
+ component: "/certd/wallet/index.vue",
+ meta: {
+ show: () => {
+ const settingStore = useSettingStore();
+ return settingStore.isComm;
+ },
+ icon: "ion:wallet-outline",
+ auth: true,
+ keepAlive: true,
+ },
+ },
{
title: "certd.paymentReturn",
name: "PaymentReturn",
diff --git a/packages/ui/certd-client/src/views/certd/invite/crud-invitees.tsx b/packages/ui/certd-client/src/views/certd/invite/crud-invitees.tsx
index 55425747f..6a6f37e9e 100644
--- a/packages/ui/certd-client/src/views/certd/invite/crud-invitees.tsx
+++ b/packages/ui/certd-client/src/views/certd/invite/crud-invitees.tsx
@@ -14,21 +14,30 @@ export default function (): CreateCrudOptionsRet {
toolbar: { show: false },
rowHandle: { show: false },
columns: {
- inviteeUserId: {
- title: "被推广用户ID",
- type: "number",
- column: { width: 140 },
- },
- inviteCode: {
- title: "推广码",
- type: "text",
- column: { width: 160 },
- },
createTime: {
- title: "推广时间",
+ title: "邀请时间",
type: "datetime",
column: { width: 180 },
},
+ simpleUser: {
+ title: "被邀请用户名",
+ type: "text",
+ column: {
+ minWidth: 180,
+ cellRender({ row }) {
+ const simpleUser = row.simpleUser;
+ if (!simpleUser) {
+ return row.inviteeUserId ? `用户${row.inviteeUserId} (${row.inviteeUserId})` : "-";
+ }
+ return simpleUser.displayName || `${simpleUser.username || "-"} (${simpleUser.id})`;
+ },
+ },
+ },
+ inviteCode: {
+ title: "邀请码",
+ type: "text",
+ column: { width: 160 },
+ },
},
},
};
diff --git a/packages/ui/certd-client/src/views/certd/invite/crud-logs.tsx b/packages/ui/certd-client/src/views/certd/invite/crud-logs.tsx
index 8b702a981..0637f05b5 100644
--- a/packages/ui/certd-client/src/views/certd/invite/crud-logs.tsx
+++ b/packages/ui/certd-client/src/views/certd/invite/crud-logs.tsx
@@ -15,6 +15,11 @@ export default function (): CreateCrudOptionsRet {
toolbar: { show: false },
rowHandle: { show: false },
columns: {
+ createTime: {
+ title: "时间",
+ type: "datetime",
+ column: { width: 180 },
+ },
amount: {
title: "收益金额",
type: "number",
@@ -56,11 +61,6 @@ export default function (): CreateCrudOptionsRet {
type: "text",
column: { minWidth: 220 },
},
- createTime: {
- title: "时间",
- type: "datetime",
- column: { width: 180 },
- },
},
},
};
diff --git a/packages/ui/certd-client/src/views/certd/invite/index.vue b/packages/ui/certd-client/src/views/certd/invite/index.vue
index 6896228c0..9ee1ca178 100644
--- a/packages/ui/certd-client/src/views/certd/invite/index.vue
+++ b/packages/ui/certd-client/src/views/certd/invite/index.vue
@@ -13,8 +13,14 @@
-
{{ item.title }}
-
{{ item.value }}
+
+
{{ item.title }}
+
{{ item.value }}
+
+
+
可提现 {{ moneyText(inviteInfo.wallet?.availableAmount) }}
+
提现
+
@@ -47,14 +53,18 @@
我的等级
{{ inviteInfo.currentLevel?.name || "未设置" }}
- {{ inviteInfo.currentLevel.commissionRate }}%
+
+ 返佣比例
+ {{ inviteInfo.currentLevel.commissionRate }}%
+
+ 好友付费后按此比例计算佣金
-
+
@@ -72,6 +82,17 @@
推广越多,等级越高,返佣比例越高
+
+
+
当前累计推广金额
+
¥ {{ amountToYuan(inviteInfo.summary.promotionAmount) }}
+
+
+ 距离下一等级「{{ inviteInfo.nextLevel.name }}」还差 {{ amountToYuan(inviteInfo.nextLevel.gapAmount) }} 元
+ 当前为专属等级,不参与自动升级
+ 已达到当前可自动升级的最高等级
+
+
@@ -83,7 +104,8 @@
佣金比例
{{ level.commissionRate }}%
-
累计推广 ≥ {{ amountToYuan(level.minAmount) }} 元
+
平台指定专属等级
+
累计推广 ≥ {{ amountToYuan(level.minAmount) }} 元
当前等级
还差 {{ amountToYuan(inviteInfo.nextLevel.gapAmount) }}
@@ -119,6 +141,7 @@
import { computed, nextTick, onActivated, onMounted, reactive, ref } from "vue";
import { FsIcon, useFs } from "@fast-crud/fast-crud";
import { notification } from "ant-design-vue";
+import { useRouter } from "vue-router";
import * as api from "./api";
import createInviteesCrudOptions from "./crud-invitees";
import createLogsCrudOptions from "./crud-logs";
@@ -127,6 +150,7 @@ import { util } from "/@/utils";
defineOptions({ name: "InviteCommission" });
+const router = useRouter();
const settingStore = useSettingStore();
const enabled = ref(false);
const activeTab = ref("invitees");
@@ -144,6 +168,7 @@ const inviteInfo = reactive
({
inviteLink: "",
agreementContent: "",
summary: { totalIncomeAmount: 0, monthIncomeAmount: 0, promotionAmount: 0, inviteeCount: 0 },
+ wallet: { availableAmount: 0 },
currentLevel: null,
nextLevel: null,
levelList: [],
@@ -173,6 +198,12 @@ const summaryCards = computed(() => [
value: moneyText(inviteInfo.summary.monthIncomeAmount),
className: "income",
},
+ {
+ key: "promotionAmount",
+ title: "累计推广金额",
+ value: moneyText(inviteInfo.summary.promotionAmount),
+ className: "promotion",
+ },
{
key: "inviteeCount",
title: "已推广人数",
@@ -191,6 +222,10 @@ function levelIcon(level: any) {
return level?.icon || "ion:ribbon-outline";
}
+function gotoWallet() {
+ router.push({ path: "/certd/wallet" });
+}
+
function openAgreementDialog(needOpenPlan: boolean) {
agreementDialogNeedOpen.value = needOpenPlan;
agreementAgree.value = false;
@@ -326,7 +361,7 @@ onActivated(async () => {
.invite-summary-grid {
flex: none;
- grid-template-columns: repeat(3, minmax(0, 1fr));
+ grid-template-columns: repeat(4, minmax(0, 1fr));
margin-bottom: 18px;
}
@@ -351,11 +386,19 @@ onActivated(async () => {
.summary-card {
position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 16px;
min-height: 112px;
overflow: hidden;
padding: 22px;
}
+ .summary-card-main {
+ min-width: 0;
+ }
+
.summary-title {
margin-bottom: 10px;
color: hsl(var(--muted-foreground));
@@ -376,6 +419,30 @@ onActivated(async () => {
color: #3478f6;
}
+ .summary-value.promotion {
+ color: #16a085;
+ }
+
+ .summary-action-button {
+ flex: none;
+ min-width: 72px;
+ }
+
+ .withdraw-action {
+ display: flex;
+ align-items: flex-end;
+ flex: none;
+ flex-direction: column;
+ gap: 8px;
+ }
+
+ .withdraw-available {
+ color: hsl(var(--muted-foreground));
+ font-size: 12px;
+ line-height: 18px;
+ white-space: nowrap;
+ }
+
.invite-link-panel {
flex: none;
padding: 16px 18px;
@@ -450,22 +517,56 @@ onActivated(async () => {
}
.current-level-rate {
+ display: inline-flex;
+ align-items: center;
+ flex: none;
+ height: 26px;
margin-left: 6px;
+ overflow: hidden;
+ border: 1px solid rgba(197, 138, 53, 0.22);
+ border-radius: 6px;
+ background: rgba(197, 138, 53, 0.08);
color: #c58a35;
+ font-size: 13px;
font-weight: 700;
}
+ .current-level-rate-label {
+ height: 100%;
+ padding: 0 8px;
+ border-right: 1px solid rgba(197, 138, 53, 0.18);
+ background: rgba(197, 138, 53, 0.1);
+ color: #8a5a16;
+ font-weight: 500;
+ line-height: 24px;
+ }
+
+ .current-level-rate-value {
+ padding: 0 8px;
+ line-height: 24px;
+ }
+
.level-info-content {
display: flex;
align-items: center;
- gap: 4px;
+ gap: 6px;
+ min-width: 0;
+ flex-wrap: wrap;
}
.level-name-text {
+ flex: none;
color: hsl(var(--foreground));
font-weight: 600;
}
+ .level-rate-desc {
+ min-width: 180px;
+ color: hsl(var(--muted-foreground));
+ font-size: 12px;
+ line-height: 20px;
+ }
+
.level-open-icon {
flex: none;
color: hsl(var(--muted-foreground));
@@ -608,6 +709,10 @@ onActivated(async () => {
text-align: center;
}
+ .exclusive-threshold {
+ color: #8a5a16;
+ }
+
.current-tag {
display: table;
margin: 10px auto 0;
@@ -622,6 +727,36 @@ onActivated(async () => {
margin-top: 12px;
}
+.level-progress-box {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 16px;
+ padding: 12px 14px;
+ border: 1px solid rgba(52, 120, 246, 0.16);
+ border-radius: 8px;
+ background: rgba(248, 250, 252, 0.86);
+}
+
+.level-progress-label {
+ color: hsl(var(--muted-foreground));
+ font-size: 12px;
+}
+
+.level-progress-value {
+ margin-top: 2px;
+ color: #16a085;
+ font-size: 22px;
+ font-weight: 700;
+ line-height: 28px;
+}
+
+.level-progress-desc {
+ color: #3478f6;
+ font-size: 13px;
+ text-align: right;
+}
+
.invite-agreement-content {
max-height: 360px;
padding: 12px;
@@ -680,6 +815,15 @@ onActivated(async () => {
.level-card-grid {
grid-template-columns: 1fr;
}
+
+ .level-progress-box {
+ align-items: flex-start;
+ flex-direction: column;
+ }
+
+ .level-progress-desc {
+ text-align: left;
+ }
}
}
diff --git a/packages/ui/certd-client/src/views/certd/suite/order-modal.vue b/packages/ui/certd-client/src/views/certd/suite/order-modal.vue
index f9e451f6c..4b5626767 100644
--- a/packages/ui/certd-client/src/views/certd/suite/order-modal.vue
+++ b/packages/ui/certd-client/src/views/certd/suite/order-modal.vue
@@ -4,20 +4,33 @@
{{ $t("certd.order.package") }}:{{ product.title }}
-
+
{{ $t("certd.order.description") }}:{{ product.intro }}
-
+
{{ $t("certd.order.specifications") }}:
-
- {{ $t("certd.order.pipeline") }};
- {{ $t("certd.order.totalDomain") }};
-
- - {{ $t("certd.order.includedWildcardDomain") }};
-
- {{ $t("certd.order.deployTimes") }};
- {{ $t("certd.order.monitorCount") }};
-
+
+
+
{{ $t("certd.order.totalDomain") }}
+
+
+
+
{{ $t("certd.order.includedWildcardDomain") }}
+
+
+
+
{{ $t("certd.order.pipeline") }}
+
+
+
+
{{ $t("certd.order.deployTimes") }}
+
+
+
+
{{ $t("certd.order.monitorCount") }}
+
+
+
@@ -26,10 +39,10 @@
{{ $t("certd.order.price") }}:
-
+
-
返利抵扣:
+
余额抵扣:
可用 {{ amountToYuan(wallet.availableAmount) }} 元,预计抵扣 {{ amountToYuan(expectedRebateAmount) }} 元
@@ -58,7 +71,7 @@ import DurationValue from "/@/views/sys/suite/product/duration-value.vue";
import { useRouter } from "vue-router";
import qrcode from "qrcode";
import * as api from "/@/views/certd/suite/api";
-import { GetMyInvite } from "/@/views/certd/invite/api";
+import { GetWalletSummary } from "/@/views/certd/wallet/api";
import { util } from "/@/utils";
const openRef = ref(false);
@@ -77,8 +90,7 @@ async function open(opts: OrderModalOpenReq) {
formRef.value.num = opts.num ?? 1;
formRef.value.useRebateBalance = false;
try {
- const inviteInfo: any = await GetMyInvite();
- wallet.value = inviteInfo.wallet || { availableAmount: 0 };
+ wallet.value = await GetWalletSummary();
} catch (e) {
wallet.value = { availableAmount: 0 };
}
@@ -261,6 +273,10 @@ defineExpose({
diff --git a/packages/ui/certd-client/src/views/certd/trade/api.ts b/packages/ui/certd-client/src/views/certd/trade/api.ts
index ddc9d4b89..e32147f71 100644
--- a/packages/ui/certd-client/src/views/certd/trade/api.ts
+++ b/packages/ui/certd-client/src/views/certd/trade/api.ts
@@ -26,11 +26,11 @@ export async function UpdateObj(obj: any) {
});
}
-export async function DelObj(id: any) {
+export async function CancelObj(id: any) {
return await request({
- url: apiPrefix + "/delete",
+ url: apiPrefix + "/cancel",
method: "post",
- params: { id },
+ data: { id },
});
}
@@ -50,14 +50,6 @@ export async function GetDetail(id: any) {
});
}
-export async function DeleteBatch(ids: any[]) {
- return await request({
- url: apiPrefix + "/deleteByIds",
- method: "post",
- data: { ids },
- });
-}
-
export async function SyncStatus(id: any) {
return await request({
url: apiPrefix + "/syncStatus",
diff --git a/packages/ui/certd-client/src/views/certd/trade/crud.tsx b/packages/ui/certd-client/src/views/certd/trade/crud.tsx
index a4a1d9a9a..d1768a430 100644
--- a/packages/ui/certd-client/src/views/certd/trade/crud.tsx
+++ b/packages/ui/certd-client/src/views/certd/trade/crud.tsx
@@ -1,18 +1,10 @@
import * as api from "./api";
-import { useI18n } from "/src/locales";
-import { computed, Ref, ref } from "vue";
-import { useRouter } from "vue-router";
-import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
-import { useUserStore } from "/@/store/user";
-import { useSettingStore } from "/@/store/settings";
+import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { Modal } from "ant-design-vue";
import PriceInput from "/@/views/sys/suite/product/price-input.vue";
-import SuiteValue from "/@/views/sys/suite/product/suite-value.vue";
import DurationValue from "/@/views/sys/suite/product/duration-value.vue";
-export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
- const router = useRouter();
- const { t } = useI18n();
+export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const pageRequest = async (query: UserPageQuery): Promise
=> {
return await api.GetList(query);
};
@@ -21,56 +13,34 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const res = await api.UpdateObj(form);
return res;
};
- const delRequest = async ({ row }: DelReq) => {
- return await api.DelObj(row.id);
- };
-
const addRequest = async ({ form }: AddReq) => {
const res = await api.AddObj(form);
return res;
};
- const userStore = useUserStore();
- const settingStore = useSettingStore();
- const selectedRowKeys: Ref = ref([]);
- context.selectedRowKeys = selectedRowKeys;
-
return {
crudOptions: {
- settings: {
- plugins: {
- //这里使用行选择插件,生成行选择crudOptions配置,最终会与crudOptions合并
- rowSelection: {
- enabled: true,
- order: -2,
- before: true,
- // handle: (pluginProps,useCrudProps)=>CrudOptions,
- props: {
- multiple: true,
- crossPage: true,
- selectedRowKeys,
- },
- },
- },
- },
request: {
pageRequest,
addRequest,
editRequest,
- delRequest,
},
rowHandle: {
- width: 240,
+ width: 120,
fixed: "right",
buttons: {
view: { show: false },
edit: { show: false },
copy: { show: false },
+ remove: { show: false },
syncStatus: {
show: compute(({ row }) => {
return row.status === "wait_pay";
}),
- text: "同步订单状态",
+ title: "同步订单状态",
+ text: null,
+ tooltip: { title: "同步订单状态" },
+ icon: "ant-design:sync-outlined",
type: "link",
click: async ({ row }) => {
Modal.confirm({
@@ -83,6 +53,28 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
});
},
},
+ cancel: {
+ show: compute(({ row }) => {
+ return row.status === "wait_pay";
+ }),
+ title: "取消订单",
+ text: null,
+ tooltip: { title: "取消订单" },
+ icon: "ion:close-circle-outline",
+ type: "link",
+ click: async ({ row }) => {
+ Modal.confirm({
+ title: "确认取消订单?",
+ content: "取消后订单会关闭,已冻结的余额抵扣金额将自动退回。",
+ okText: "确认取消",
+ cancelText: "再想想",
+ onOk: async () => {
+ await api.CancelObj(row.id);
+ await crudExpose.doRefresh();
+ },
+ });
+ },
+ },
},
},
actionbar: {
@@ -152,7 +144,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
},
rebateAmount: {
- title: "返利抵扣",
+ title: "余额抵扣",
type: "number",
column: {
width: 110,
@@ -201,7 +193,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
{ label: "支付宝", value: "alipay" },
{ label: "微信", value: "wxpay" },
{ label: "免费", value: "free" },
- { label: "返利余额", value: "rebate" },
+ { label: "余额抵扣", value: "rebate" },
],
}),
column: {
diff --git a/packages/ui/certd-client/src/views/certd/trade/index.vue b/packages/ui/certd-client/src/views/certd/trade/index.vue
index dae890251..a0a2fd8da 100644
--- a/packages/ui/certd-client/src/views/certd/trade/index.vue
+++ b/packages/ui/certd-client/src/views/certd/trade/index.vue
@@ -3,13 +3,7 @@
我的订单
-
-
-
-
-
-
-
+
@@ -17,31 +11,11 @@
import { onActivated, onMounted } from "vue";
import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud";
-import { message, Modal } from "ant-design-vue";
-import { DeleteBatch } from "./api";
defineOptions({
name: "MyTrade",
});
-const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
-
-const selectedRowKeys = context.selectedRowKeys;
-const handleBatchDelete = () => {
- if (selectedRowKeys.value?.length > 0) {
- Modal.confirm({
- title: "确认",
- content: `确定要批量删除这${selectedRowKeys.value.length}条记录吗`,
- async onOk() {
- await DeleteBatch(selectedRowKeys.value);
- message.info("删除成功");
- crudExpose.doRefresh();
- selectedRowKeys.value = [];
- },
- });
- } else {
- message.error("请先勾选记录");
- }
-};
+const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions });
// 页面打开后获取列表数据
onMounted(() => {
diff --git a/packages/ui/certd-client/src/views/certd/wallet/crud-logs.tsx b/packages/ui/certd-client/src/views/certd/wallet/crud-logs.tsx
index 481362d8a..f32fe4d4f 100644
--- a/packages/ui/certd-client/src/views/certd/wallet/crud-logs.tsx
+++ b/packages/ui/certd-client/src/views/certd/wallet/crud-logs.tsx
@@ -1,6 +1,14 @@
import { CreateCrudOptionsRet, dict, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import * as api from "./api";
-import PriceInput from "/@/views/sys/suite/product/price-input.vue";
+import { util } from "/@/utils";
+
+function moneyText(amount: number) {
+ const yuan = util.amount.toYuan(Math.abs(amount || 0));
+ if (amount < 0) {
+ return `-¥${yuan}`;
+ }
+ return `¥${yuan}`;
+}
export default function (): CreateCrudOptionsRet {
const pageRequest = async (query: UserPageQuery): Promise => {
@@ -24,6 +32,7 @@ export default function (): CreateCrudOptionsRet {
{ label: "收益入账", value: "income", color: "success" },
{ label: "余额抵扣", value: "consume", color: "default" },
{ label: "提现冻结", value: "withdraw_freeze", color: "warning" },
+ { label: "提现成功", value: "withdraw", color: "success" },
{ label: "提现成功", value: "withdraw_success", color: "success" },
{ label: "提现退回", value: "withdraw_reject", color: "processing" },
],
@@ -35,7 +44,10 @@ export default function (): CreateCrudOptionsRet {
type: "number",
column: {
width: 120,
- component: { name: PriceInput, vModel: "modelValue", edit: false },
+ cellRender({ value }) {
+ const amount = Number(value || 0);
+ return {moneyText(amount)};
+ },
},
},
balanceAfter: {
@@ -43,7 +55,9 @@ export default function (): CreateCrudOptionsRet {
type: "number",
column: {
width: 130,
- component: { name: PriceInput, vModel: "modelValue", edit: false },
+ cellRender({ value }) {
+ return {moneyText(Number(value || 0))};
+ },
},
},
remark: {
diff --git a/packages/ui/certd-client/src/views/sys/suite/invite/crud-level.tsx b/packages/ui/certd-client/src/views/sys/suite/invite/crud-level.tsx
index bf46273ed..69e36d4cd 100644
--- a/packages/ui/certd-client/src/views/sys/suite/invite/crud-level.tsx
+++ b/packages/ui/certd-client/src/views/sys/suite/invite/crud-level.tsx
@@ -72,6 +72,7 @@ export default function (): CreateCrudOptionsRet {
title: "升级金额",
type: "number",
form: {
+ show: compute(({ form }) => form.levelType !== "exclusive"),
component: { name: PriceInput, vModel: "modelValue", edit: true },
rules: [{ required: true, message: "请输入升级金额" }],
},
@@ -100,7 +101,7 @@ export default function (): CreateCrudOptionsRet {
}),
form: {
value: "normal",
- helper: "专属等级可由管理员手动指定,不参与普通用户自动升级。",
+ helper: "专属等级可由管理员手动指定,不参与普通用户自动升级。专属等级不会在普通用户端展示。",
},
column: { width: 120, align: "center" },
},
diff --git a/packages/ui/certd-client/src/views/sys/suite/invite/crud-user-level.tsx b/packages/ui/certd-client/src/views/sys/suite/invite/crud-user-level.tsx
index 5f90e8510..f2aef3862 100644
--- a/packages/ui/certd-client/src/views/sys/suite/invite/crud-user-level.tsx
+++ b/packages/ui/certd-client/src/views/sys/suite/invite/crud-user-level.tsx
@@ -23,7 +23,6 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
initialForm: {
userId: row.userId,
levelId: row.levelId,
- levelLocked: row.levelLocked === true,
},
columns: {
levelId: {
@@ -33,20 +32,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
form: {
col: { span: 24 },
rules: [{ required: true, message: "请选择推广等级" }],
- },
- },
- levelLocked: {
- title: "锁定等级",
- type: "dict-switch",
- dict: dict({
- data: [
- { label: "自动升级", value: false, color: "success" },
- { label: "锁定", value: true, color: "warning" },
- ],
- }),
- form: {
- col: { span: 24 },
- helper: "专属等级会自动锁定,不参与自动升级。",
+ helper: "专属等级将锁定为当前等级,普通等级将按累计推广金额自动升级。",
},
},
},
@@ -80,8 +66,17 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
},
columns: {
userId: { title: "用户ID", type: "number", search: { show: true }, column: { width: 100 } },
- username: { title: "用户名", type: "text", search: { show: true }, column: { width: 160 } },
- userDisplay: { title: "显示名称", type: "text", column: { width: 160 } },
+ username: {
+ title: "用户名",
+ type: "text",
+ search: { show: true },
+ column: {
+ width: 180,
+ cellRender({ row }) {
+ return row.simpleUser?.displayName || row.userDisplay || row.username || row.userId;
+ },
+ },
+ },
enabled: {
title: "开通状态",
type: "dict-switch",
diff --git a/packages/ui/certd-client/src/views/sys/suite/invite/level.vue b/packages/ui/certd-client/src/views/sys/suite/invite/level.vue
index b5287d740..5a7ab612d 100644
--- a/packages/ui/certd-client/src/views/sys/suite/invite/level.vue
+++ b/packages/ui/certd-client/src/views/sys/suite/invite/level.vue
@@ -33,7 +33,8 @@
佣金比例
{{ item.commissionRate || 0 }}%
-
累计推广 ≥ {{ amountToYuan(item.minAmount) }} 元
+
平台指定专属等级
+
累计推广 ≥ {{ amountToYuan(item.minAmount) }} 元
-
-
-
-
-
-
-
+
@@ -20,31 +14,11 @@
import { onActivated, onMounted } from "vue";
import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud";
-import { message, Modal } from "ant-design-vue";
-import { DeleteBatch } from "./api";
defineOptions({
name: "TradeManager",
});
-const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
-
-const selectedRowKeys = context.selectedRowKeys;
-const handleBatchDelete = () => {
- if (selectedRowKeys.value?.length > 0) {
- Modal.confirm({
- title: "确认",
- content: `确定要批量删除这${selectedRowKeys.value.length}条记录吗`,
- async onOk() {
- await DeleteBatch(selectedRowKeys.value);
- message.info("删除成功");
- crudExpose.doRefresh();
- selectedRowKeys.value = [];
- },
- });
- } else {
- message.error("请先勾选记录");
- }
-};
+const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions });
// 页面打开后获取列表数据
onMounted(() => {