Commit 2269212f authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

feat: SAAS需求 - 新增业务员绑定

parent fe39c71c
......@@ -180,7 +180,39 @@ const AuthConfigRoute: RouterChild = {
name: 'parameterSetting',
component: '@/pages/systemSetting/parameterSetting'
},
/** 业务员管理 */
{
path: '/memberCenter/systemSetting/salesmanManage',
name: '业务员管理',
routes: [
{
path: '/memberCenter/systemSetting/salesmanManage/salesmanBind',
name: '业务员绑定',
component: '@/pages/systemSetting/salesmanManage/salesmanBind'
},
{
path: '/memberCenter/systemSetting/salesmanManage/salesmanBind/add',
name: '新增业务员绑定',
component: '@/pages/systemSetting/salesmanManage/salesmanBind/add',
hideInMenu: true,
noMargin: true,
},
{
path: '/memberCenter/systemSetting/salesmanManage/salesmanBind/edit',
name: '编辑业务员绑定',
component: '@/pages/systemSetting/salesmanManage/salesmanBind/add',
hideInMenu: true,
noMargin: true,
},
{
path: '/memberCenter/systemSetting/salesmanManage/salesmanBind/detail',
name: '业务员绑定详情',
component: '@/pages/systemSetting/salesmanManage/salesmanBind/detail',
hideInMenu: true,
noMargin: true,
}
]
}
],
}
......
......@@ -11,7 +11,7 @@ import CommodityRoute from './commodityRoute' // 商品能力路由
import TranactionRoute from './tranactionRoute' // 交易能力路由
// import LogisticsRoute from './logisticsRoutes' // 物流能力路由
// import PayandSettleRoute from './payandSettle' //支付与结算
// import AuthConfigRoute from './authConfigRoute'
import AuthConfigRoute from './authConfigRoute'
// import AfterService from './afterServiceRoute' // 售后
// import HandlingRoute from './handlingRoute'; // 加工能力
// import DealAbilityRoute from './dealAbilityRoute'; //
......@@ -32,7 +32,7 @@ const homeRoute = {
key: 'home',
component: '@/pages/home',
};
const routes = isDev ? [ homeRoute, TranactionRoute ] : asyncRoutes;
const routes = isDev ? [ homeRoute, AuthConfigRoute ] : asyncRoutes;
// const routes = isDev ? [ CommodityRoute ] : asyncRoutes;
const memberCenterRoute = {
......
......@@ -6,7 +6,7 @@ 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, postMemberStoreDelete, postMemberStoreEnable } from '@/services/MemberV2Api/id13430';
import { getMemberStorePage, postMemberStoreDelete, postMemberStoreEnable } from '@/services/MemberV2Api';
import StatusSwitch from '@/components/StatusSwitch';
const intl = getIntl()
......
import React from 'react';
import { Form, Button } from 'antd';
import PeripheralLayout from '@/pages/transaction/components/detailLayout';
import BasicLayout from './components/basicLayout';
import ManageLayout from './components/manageLayout';
export const Tablink = [
{ id: 'basicLayout', title: '基本信息' },
{ id: 'manageLayout', title: '管理下级会员' },
]
export const layout: any = {
colon: false,
labelCol: { style: { width: "144px" } },
labelAlign: "left"
};
const SalesmanBindAdded = (props) => {
return (
<PeripheralLayout
hideBreak
detail={props.route.name}
tabLink={Tablink}
effect={<Button type='primary'>保存</Button>}
components={
<Form {...layout}>
<BasicLayout />
<ManageLayout />
</Form>
}
/>
)
}
export default SalesmanBindAdded
import React from 'react';
import { Form, Row, Col, Input, Button } from 'antd';
import CardLayout from '@/pages/transaction/components/card';
import { LinkOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
import TableModal from '@/pages/transaction/components/tableModal';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const BasicLayout = () => {
const [visible, setVisible] = React.useState<boolean>(false);
const columns: ColumnType<any>[] = [
{
title: '序号',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '姓名',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '手机号',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '所属机构',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '职位',
ellipsis: true,
key: '',
dataIndex: '',
},
]
const fetchData = () => {
return new Promise(resolve => {
resolve({
code: 1000,
data: []
})
})
}
return (
<React.Fragment>
<CardLayout
id='basicLayout'
title='基本信息'
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item
label='业务员'
name=''
rules={[
{ required: true, message: '请选择业务员' }
]}
>
<Input.Search placeholder='请选择业务员' readOnly enterButton={<Button style={{ backgroundColor: '#00a98f' }} type='primary' icon={<LinkOutlined />} />} />
</Form.Item>
</Col>
</Row>
</CardLayout>
<TableModal
width={800}
modalType='Drawer'
visible={visible}
title='选择业务员'
mode='checkbox'
schema={{
type: "object",
properties: {
megalayout: {
type: "object",
"x-component": "mega-layout",
properties: {
inquiryListNo: {
type: "string",
"x-component": "Search",
"x-mega-props": {},
"x-component-props": {
placeholder: '姓名',
align: "flex-left",
}
}
}
},
[FORM_FILTER_PATH]: {
type: "object",
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
justifyContent: "flex-start",
flexWrap: "nowrap"
},
colStyle: {//改变间隔
marginRight: 20
}
},
properties: {
PRO_LAYOUT: {
type: "object",
"x-component": "mega-layout",
"x-mega-props": {
span: 5
},
"x-component-props": {
inline: true
},
properties: {
details: {
type: "string",
"x-component-props": {
placeholder: '所属机构'
}
},
memberName: {
type: "string",
"x-component-props": {
placeholder: '职位'
}
},
}
},
sumbit: {
"x-component": "Submit",
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}}
columns={columns}
fetchData={fetchData}
onClose={() => setVisible(false)}
onOk={() => setVisible(false)}
/>
</React.Fragment>
)
}
export default BasicLayout
import React, { CSSProperties } from 'react';
import { Form, Button, Table, Space, Input } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import CardLayout from '@/pages/transaction/components/card';
import { PlusOutlined } from '@ant-design/icons';
import TableModal from '@/pages/transaction/components/tableModal';
const styles: CSSProperties = {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
marginBottom: '16px'
}
const ManageLayout = () => {
const [visible, setVisible] = React.useState<boolean>(false);
const columns: ColumnType<any>[] = [
{
title: '会员ID',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员名称',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员类型',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员角色',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '申请时间',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员等级',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员状态',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '操作',
ellipsis: true,
key: '',
dataIndex: '',
},
]
const tableModalColumns: ColumnType<any>[] = [
{
title: '会员ID',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员名称',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员类型',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员角色',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员等级',
ellipsis: true,
key: '',
dataIndex: '',
},
]
const fetchData = () => {
return new Promise(resolve => {
resolve({
code: 1000,
data: []
})
})
}
return (
<React.Fragment>
<CardLayout
id='manageLayout'
title='管理下级会员'
>
<div style={styles}>
<Button>批量解除绑定关系</Button>
<Space size={16}>
<Input.Search placeholder='会员姓名' />
<Button>重置</Button>
</Space>
</div>
<Button block type="dashed" style={{ marginBottom: "16px" }} icon={<PlusOutlined />}>选择待绑定下级会员</Button>
<Form.Item
name=''
rules={[
{ required: true, message: '请绑定下级会员' }
]}
>
<Table
rowSelection={{}}
columns={columns}
dataSource={[]}
/>
</Form.Item>
</CardLayout>
<TableModal
modalType='Drawer'
visible={visible}
title='选择会员'
mode='checkbox'
schema={{
type: "object",
properties: {
megalayout: {
type: "object",
"x-component": "mega-layout",
properties: {
inquiryListNo: {
type: "string",
"x-component": "Search",
"x-mega-props": {},
"x-component-props": {
placeholder: '会员名称',
align: "flex-left",
advanced: false,
}
}
}
}
}
}}
columns={tableModalColumns}
fetchData={fetchData}
onClose={() => setVisible(false)}
onOk={() => setVisible(false)}
/>
</React.Fragment>
)
}
export default ManageLayout
import React from 'react';
import { Form, Button, Row, Col, Typography } from 'antd';
import PeripheralLayout from '@/pages/transaction/components/detailLayout';
import CardLayout from '@/pages/transaction/components/card';
import StandardTable from '@/components/StandardTable';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { searchSelectGetSelectCategoryOptionEffect } from '@/pages/transaction/effect';
import { layout } from './add';
const formActions = createFormActions()
export const Tablink = [
{ id: 'basicLayout', title: '基本信息' },
{ id: 'manageLayout', title: '管理下级会员' },
]
const SalesmanBindDetail = (props) => {
const ref = React.useRef<any>(null);
const columns: ColumnType<any>[] = [
{
title: '会员ID',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员名称',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员类型',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员角色',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '申请时间',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员等级',
ellipsis: true,
key: '',
dataIndex: '',
},
{
title: '会员状态',
ellipsis: true,
key: '',
dataIndex: '',
},
]
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
resolve({
code: 1000,
data: []
})
})
}
// 搜索
const search = (values: any) => {
ref.current.reload(values)
}
return (
<PeripheralLayout
hideBreak
detail={props.route.name}
tabLink={Tablink}
components={
<React.Fragment>
<CardLayout
id='basicLayout'
title='基本信息'
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form {...layout}>
<Form.Item label='业务员'>
<Typography.Text>张三</Typography.Text>
</Form.Item>
<Form.Item label='所属机构'>
<Typography.Text>广州总部-业务部-华南区-广东省</Typography.Text>
</Form.Item>
<Form.Item label='职位'>
<Typography.Text>业务员</Typography.Text>
</Form.Item>
<Form.Item label='所属角色'>
<Typography.Text>业务员-广东省</Typography.Text>
</Form.Item>
<Form.Item label='绑定后手机号'>
<Typography.Text>+86 18677665544</Typography.Text>
</Form.Item>
</Form>
</Col>
</Row>
</CardLayout>
<CardLayout
id='manageLayout'
title='管理下级会员'
>
<StandardTable
tableProps='id'
columns={columns}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'name', 'FORM_FILTER_PATH')
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={{
type: "object",
properties: {
megalayout: {
type: "object",
"x-component": "mega-layout",
properties: {
name: {
type: "string",
"x-component": "Search",
"x-mega-props": {},
"x-component-props": {
placeholder: '会员名称',
align: "flex-left",
advanced: false,
}
}
}
}
}
}}
/>
}
/>
</CardLayout>
</React.Fragment>
}
/>
)
}
export default SalesmanBindDetail
import React, { Fragment, useRef, useState } from 'react';
import { history, getIntl } from 'umi';
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';
const intl = getIntl()
const PortalSystem = () => {
const tableRef = useRef<any>({});
const columns: ColumnType<any>[] = [
{
title: '登录帐号',
key: '',
dataIndex: ''
},
{
title: '姓名',
key: '',
dataIndex: ''
},
{
title: '所属机构',
key: '',
dataIndex: ''
},
{
title: '绑定手机号',
key: '',
dataIndex: ''
},
{
title: '职位',
key: '',
dataIndex: ''
},
{
title: '所属角色',
key: '',
dataIndex: ''
},
{
title: '操作',
key: '',
dataIndex: ''
},
]
return (
<TableLayout
reload={tableRef}
columns={columns}
effects="name"
fetch={[]}
schema={{
type: "object",
properties: {
megalayout: {
type: "object",
"x-component": "mega-layout",
"x-component-props": {
grid: true
},
properties: {
ctl: {
type: "object",
"x-component": "controllerBtns",
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '登录帐号',
},
},
}
},
[FORM_FILTER_PATH]: {
type: "object",
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
flexWrap: "nowrap"
},
colStyle: {
marginLeft: 20
}
},
properties: {
PRO_LAYOUT: {
type: "object",
"x-component": "mega-layout",
"x-mega-props": {
span: 5
},
"x-component-props": {
inline: true
},
properties: {
contactName: {
type: 'string',
'x-component-props': {
placeholder: '姓名',
style: {
width: 160,
},
},
},
}
},
sumbit: {
"x-component": "Submit",
"x-mega-props": {
span: 1
},
"x-component-props": {
children: intl.formatMessage({ id: 'portalSystem.chaxun', defaultMessage: '查询' })
}
}
}
},
},
}}
controllerBtns={
<Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button
type="primary"
icon={<PlusOutlined />}
onClick={() => history.push(`/memberCenter/systemSetting/salesmanManage/salesmanBind/add`)}
>
{intl.formatMessage({id: 'portalSystem.added', defaultMessage: '新增'})}
</Button>
</Space>
</Col>
</Row>
}
/>
)
}
export default PortalSystem;
......@@ -107,9 +107,9 @@ export const removeEnableMultiTenancy = () => {
export const getEnableMultiTenancy = () => {
try {
const enableMultiTenancy = JSON.parse(window.localStorage.getItem("SITE"))
return (enableMultiTenancy || {} ) as boolean
return (enableMultiTenancy ?? false ) as boolean
} catch (error) {
return null as boolean
return false as boolean
}
}
......
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