Commit 2bd2dcbe authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

feat: 门户管理列表接口接入

parent faac1ab1
......@@ -24,7 +24,7 @@ import asyncRoutes from '../router.config.json';
// import contracRoute from './contracRoute';
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const isDev = false;
const isDev = true;
const homeRoute = {
path: `/memberCenter/home`,
name: 'home',
......
......@@ -67,13 +67,13 @@ const AreaSelectItem: React.FC<AreaSelectItemProps> = (props) => {
useEffect(() => {
initProvinceOptions();
}, [pcode]);
useEffect(() => {
if ('value' in props) {
setInnerValue(value?.code);
}
}, [value]);
const triggerChange = (value: AreaSelectValueType) => {
if (onChange) {
onChange(value);
......@@ -102,4 +102,4 @@ const AreaSelectItem: React.FC<AreaSelectItemProps> = (props) => {
);
};
export default AreaSelectItem;
\ No newline at end of file
export default AreaSelectItem;
......@@ -28,7 +28,7 @@ const AreaSelect: React.FC<AreaSelectProps> = (props) => {
const [innerValues, setInnerValues] = useState<AreaSelectValueType[]>([]);
useEffect(() => {
if ('value' in props && value.length) {
if ('value' in props && value?.length) {
setInnerValues(value);
}
}, [value]);
......@@ -55,13 +55,11 @@ const AreaSelect: React.FC<AreaSelectProps> = (props) => {
triggerChange([]);
}
if (!('value' in props)) {
setInnerValues(newInnerValues);
}
// 全部选择了才触发 onChange
if (newInnerValues.length === MAX) {
triggerChange(newInnerValues);
} else {
setInnerValues(newInnerValues);
}
};
......
......@@ -11,15 +11,15 @@ const BasicLayout: React.FC<{}> = () => {
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item label='门户代码' name='' rules={[{ required: true, message: '请输入门户代码' }]}>
<Form.Item label='门户代码' name='code' rules={[{ required: true, message: '请输入门户代码' }]}>
<Input placeholder='请输入' maxLength={12} />
</Form.Item>
<Form.Item label='门店名称' name='' rules={[{ required: true, message: '请输门店名称' }]}>
<Form.Item label='门店名称' name='name' rules={[{ required: true, message: '请输门店名称' }]}>
<Input placeholder='请输入' maxLength={20} />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item label='门店LOGO' name='' >
<Form.Item label='门店LOGO' name='logo' >
<UploadImage
imgUrl=''
fileMaxSize={50}
......
......@@ -2,6 +2,7 @@ import React from 'react';
import { Button, Col, Form, Input, Row, Select } from 'antd';
import CardLayout from '@/pages/transaction/components/card'
import { LinkOutlined } from '@ant-design/icons';
import AreaSelect from '@/components/AddressSelect/components/AreaSelect';
const ContactLayout: React.FC<{}> = () => {
......@@ -14,20 +15,20 @@ const ContactLayout: React.FC<{}> = () => {
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item label='门店地址' name='' required>
<span>四级联动</span>
<Form.Item label='门店地址' name='areaSelect' required>
<AreaSelect />
</Form.Item>
<Form.Item label='详细地址' name='' rules={[{ required: true, message: '' }]}>
<Form.Item label='详细地址' name='address' rules={[{ required: true, message: '' }]}>
<Input.TextArea autoSize maxLength={30} placeholder='请填写详细地址,路名、门牌号等' />
</Form.Item>
<Form.Item label='联系人姓名' name='' rules={[{ required: true, message: '' }]}>
<Form.Item label='联系人姓名' name='contactName' rules={[{ required: true, message: '' }]}>
<Input placeholder='请输入您的姓名' maxLength={8} />
</Form.Item>
<Form.Item label='联系电话' name='' required>
<Form.Item label='联系电话' required>
<Row gutter={16}>
<Col span={8}>
<Form.Item
name='phoneCode'
name='countryCode'
rules={[{ required: true, message: '请选择' }]}
>
<Select>
......@@ -39,7 +40,7 @@ const ContactLayout: React.FC<{}> = () => {
</Col>
<Col span={16}>
<Form.Item
name='contactPhone'
name='phone'
rules={[{ required: true, message: '请选择' }]}
>
<Input type='number' maxLength={11} />
......@@ -49,16 +50,16 @@ const ContactLayout: React.FC<{}> = () => {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item label='邮箱' name=''>
<Form.Item label='邮箱' name='email'>
<Input placeholder='请输入' />
</Form.Item>
<Form.Item label='邮编' name=''>
<Form.Item label='邮编' name='postalCode'>
<Input placeholder='请输入' maxLength={6} />
</Form.Item>
<Form.Item label='职位' name='' rules={[{ required: true, message: '' }]}>
<Form.Item label='职位' name='position' rules={[{ required: true, message: '' }]}>
<Input placeholder='请输入' maxLength={10} />
</Form.Item>
<Form.Item label='所属组织机构' name='' rules={[{ required: true, message: '' }]}>
<Form.Item label='所属组织机构' name='orgId' rules={[{ required: true, message: '' }]}>
<Input.Search readOnly enterButton={<div className='connectBtn'><LinkOutlined style={{ marginRight: 4 }} /></div>} />
</Form.Item>
</Col>
......
import React, { Fragment, useRef, useState } from 'react';
import { history } from 'umi';
import { Button, Row, Col, Space, Popconfirm } from 'antd';
import { Button, Row, Col, Space, Popconfirm, Switch } from 'antd';
import TableLayout from '@/components/TableLayout';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import { PlusOutlined } from '@ant-design/icons';
import { getMemberStorePage } from '@/services/MemberV2Api/id13430';
const PortalSystem = () => {
const ref = useRef<any>({});
......@@ -15,24 +16,24 @@ const PortalSystem = () => {
const columns: ColumnType<any>[] = [
{
title: '门店代码',
key: 'id',
dataIndex: 'id',
key: 'code',
dataIndex: 'code',
},
{
title: '门店名称',
key: 'activityName',
dataIndex: 'activityName',
key: 'name',
dataIndex: 'name',
render: (text, record) => <EyePreview url={`/marketingManage/marketing/waitAddedMarketing/preview?id=${record.id}`}>{text}</EyePreview>
},
{
title: '门店地址',
key: 'activityType',
dataIndex: 'activityType',
key: 'fullAddress',
dataIndex: 'fullAddress',
},
{
title: '邮编',
key: 'startTime',
dataIndex: 'startTime',
key: 'postalCode',
dataIndex: 'postalCode',
},
{
title: '所属机构',
......@@ -41,8 +42,8 @@ const PortalSystem = () => {
},
{
title: '联系人',
key: 'signUpStartTime',
dataIndex: 'signUpStartTime',
key: 'contactName',
dataIndex: 'contactName',
},
{
title: '联系电话',
......@@ -51,8 +52,9 @@ const PortalSystem = () => {
},
{
title: '状态',
key: 'signUpEndTime',
dataIndex: 'signUpEndTime',
key: 'showEnable',
dataIndex: 'showEnable',
render: (text, record) => <Switch />
},
{
title: '操作',
......@@ -60,14 +62,14 @@ const PortalSystem = () => {
dataIndex: 'state',
render: (text, record) => (
<Fragment>
<Button type='link'>
编辑
</Button>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否">
<Button type='link'>
删除
</Button>
</Popconfirm>
{record.showUpdate && <Button type='link'>编辑</Button>}
{record.showDelete && (
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否">
<Button type='link'>
删除
</Button>
</Popconfirm>
)}
</Fragment>
)
}
......@@ -78,9 +80,9 @@ const PortalSystem = () => {
selectedRow
reload={ref}
columns={columns}
effects="id"
effects="name"
fetchRowkeys={(e) => setRowKeys(e)}
fetch={[]}
fetch={getMemberStorePage}
schema={{
type: "object",
properties: {
......@@ -95,7 +97,7 @@ const PortalSystem = () => {
type: "object",
"x-component": "controllerBtns",
},
id: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
......@@ -126,7 +128,7 @@ const PortalSystem = () => {
inline: true
},
properties: {
activityName: {
contactName: {
type: 'string',
'x-component-props': {
placeholder: '联系人',
......@@ -135,7 +137,7 @@ const PortalSystem = () => {
},
},
},
activityType: {
status: {
type: 'string',
'x-component-props': {
placeholder: '状态',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment