feat:
1. 更新框架 2. 修复框架更新后导致的问题 3. 消息系统升级
This commit is contained in:
@@ -140,7 +140,8 @@ export function createAdminModalFormProps(
|
||||
},
|
||||
fieldName: 'phone',
|
||||
label: '手机号',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
formItemClass: 'col-span-6',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -59,7 +59,8 @@ export const modalFormProps: VbenFormProps = {
|
||||
},
|
||||
fieldName: 'phone',
|
||||
label: '手机号',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
formItemClass: 'col-span-6',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -67,7 +67,8 @@ export const modalFormProps: VbenFormProps = {
|
||||
},
|
||||
fieldName: 'phone',
|
||||
label: '手机号',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
help: '默认初始密码 Xk123456@',
|
||||
dependencies: {
|
||||
if({ id }: { id?: number | string }) {
|
||||
|
||||
@@ -96,7 +96,8 @@ export const modalFormProps: VbenFormProps = {
|
||||
fieldName: 'mobile',
|
||||
formItemClass: 'col-span-6',
|
||||
label: '手机号码',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
},
|
||||
{
|
||||
component: 'VbenInput',
|
||||
|
||||
@@ -152,7 +152,8 @@ export const modalFormProps: VbenFormProps = {
|
||||
},
|
||||
fieldName: 'mobile',
|
||||
label: '联系人手机号',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
},
|
||||
{
|
||||
// 编辑时可选:同步修改药店管理员后台登录手机号
|
||||
|
||||
@@ -137,7 +137,8 @@ export const modalFormProps: VbenFormProps = {
|
||||
},
|
||||
fieldName: 'mobile',
|
||||
label: '联系人手机号',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
},
|
||||
{
|
||||
component: 'PromoterPicker',
|
||||
|
||||
@@ -177,7 +177,8 @@ export const modalFormProps: VbenFormProps = {
|
||||
},
|
||||
fieldName: 'mobile',
|
||||
label: '联系人手机号',
|
||||
rules: 'required',
|
||||
// 与后端 checkPhone 一致:必填 + 大陆 11 位号段
|
||||
rules: 'mobile',
|
||||
},
|
||||
{
|
||||
// 编辑时可选:同步修改诊所管理员后台登录手机号
|
||||
|
||||
@@ -34,7 +34,8 @@ export const gridOptions: VxeGridProps<RowType> = {
|
||||
field: 'vip',
|
||||
align: 'left',
|
||||
title: 'VIP会员',
|
||||
width: 160,
|
||||
minWidth: 200,
|
||||
width: 240,
|
||||
slots: { default: 'vip' },
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
import { formatVipExpireAt } from '#/utils/vip';
|
||||
|
||||
import { getVipStoreList } from '../api';
|
||||
|
||||
export const gridOptions: VxeGridProps<any> = {
|
||||
@@ -32,21 +34,10 @@ export const gridOptions: VxeGridProps<any> = {
|
||||
{
|
||||
field: 'expire_at',
|
||||
title: '到期时间',
|
||||
width: 170,
|
||||
formatter: ({ row }) => {
|
||||
if (!row.vip) return '-';
|
||||
if (row.vip.is_lifetime) return '终身';
|
||||
const expireAt = Number(row.vip.expire_at || 0);
|
||||
if (!expireAt) {
|
||||
return row.vip.level_code === 'V0' ? '-' : '终身';
|
||||
}
|
||||
if (typeof row.vip.expire_at === 'string' && String(row.vip.expire_at).includes('-')) {
|
||||
return row.vip.expire_at;
|
||||
}
|
||||
const d = new Date(expireAt * 1000);
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
||||
},
|
||||
width: 180,
|
||||
formatter: ({ row }) =>
|
||||
formatVipExpireAt(row.vip, { emptyText: '-', lifetimeText: '终身' }) ||
|
||||
'-',
|
||||
},
|
||||
{ title: '操作', slots: { default: 'action' }, width: 100, fixed: 'right' },
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user