feat(admin,store): landline contact phone and package audit UX
Allow store contactPhone as landline, show pending package audit badge, and split live vs pending packages in HQ review. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import type { FormInstance } from 'antd/es/form';
|
||||
import { EnvironmentOutlined } from '@ant-design/icons';
|
||||
import { isStoreContactPhone, STORE_CONTACT_PHONE_HINT } from '@dukang/domain';
|
||||
import { request, type Paginated } from '../lib/api';
|
||||
import {
|
||||
ADMIN_OPTIONS_PAGE_SIZE,
|
||||
@@ -966,10 +967,18 @@ export default function StoresPage() {
|
||||
<Form.Item
|
||||
name="contactPhone"
|
||||
label="联系电话(店长/对外)"
|
||||
rules={[{ required: true, message: '请填写对外联系电话' }]}
|
||||
extra="用户端门店详情展示与拨号使用此号码,可与登录号不同"
|
||||
rules={[
|
||||
{ required: true, message: '请填写对外联系电话' },
|
||||
{
|
||||
validator: (_, value) =>
|
||||
isStoreContactPhone(String(value || ''))
|
||||
? Promise.resolve()
|
||||
: Promise.reject(new Error(STORE_CONTACT_PHONE_HINT)),
|
||||
},
|
||||
]}
|
||||
extra="用户端门店详情展示与拨号使用此号码,可与登录号不同,支持座机"
|
||||
>
|
||||
<Input placeholder="11位手机号" />
|
||||
<Input placeholder="手机号或座机,如 0379-8888888" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="categoryParentId"
|
||||
@@ -1252,9 +1261,18 @@ export default function StoresPage() {
|
||||
<Form.Item
|
||||
name="contactPhone"
|
||||
label="联系电话(店长/对外)"
|
||||
extra="用户端拨号展示;留空则与登录号相同"
|
||||
extra="用户端拨号展示;留空则与登录号相同。支持座机"
|
||||
rules={[
|
||||
{
|
||||
validator: (_, value) => {
|
||||
const raw = String(value || '').trim();
|
||||
if (!raw || isStoreContactPhone(raw)) return Promise.resolve();
|
||||
return Promise.reject(new Error(STORE_CONTACT_PHONE_HINT));
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input placeholder="11位手机号,可与登录号不同" />
|
||||
<Input placeholder="手机号或座机,如 0379-8888888" />
|
||||
</Form.Item>
|
||||
<Form.Item name="sortOrder" label="排序" extra="数值越小越靠前">
|
||||
<InputNumber min={0} precision={0} style={{ width: '100%' }} placeholder="0" />
|
||||
|
||||
Reference in New Issue
Block a user