Commit 79e9d1a3 authored by rainbowmorel@163.com's avatar rainbowmorel@163.com

Merge branch 'v2-220418' into 20418order

parents 81e6013b 3c595203
...@@ -8,6 +8,8 @@ import EyePreview from '@/components/EyePreview'; ...@@ -8,6 +8,8 @@ import EyePreview from '@/components/EyePreview';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { getMemberStorePage, postMemberStoreDelete, postMemberStoreEnable } from '@/services/MemberV2Api'; import { getMemberStorePage, postMemberStoreDelete, postMemberStoreEnable } from '@/services/MemberV2Api';
import StatusSwitch from '@/components/StatusSwitch'; import StatusSwitch from '@/components/StatusSwitch';
import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import AuthButton from '@/components/AuthButton';
const intl = getIntl() const intl = getIntl()
...@@ -27,12 +29,14 @@ const PortalSystem = () => { ...@@ -27,12 +29,14 @@ const PortalSystem = () => {
const _delete = async (record) => { const _delete = async (record) => {
setConfirmLoading(true) setConfirmLoading(true)
await postMemberStoreDelete({id: record.id}).then(res => { await postMemberStoreDelete({ id: record.id }).then(res => {
setConfirmLoading(false) setConfirmLoading(false)
tableRef.current.reload() tableRef.current.reload()
}) })
} }
console.log(AuthUrl('portalSystem.detail'), 'portalSystem.detail')
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: intl.formatMessage({ id: 'portalSystem.mendiandaima', defaultMessage: '门店代码' }), title: intl.formatMessage({ id: 'portalSystem.mendiandaima', defaultMessage: '门店代码' }),
...@@ -43,7 +47,7 @@ const PortalSystem = () => { ...@@ -43,7 +47,7 @@ const PortalSystem = () => {
title: intl.formatMessage({ id: 'portalSystem.mendianmingcheng', defaultMessage: '门店名称' }), title: intl.formatMessage({ id: 'portalSystem.mendianmingcheng', defaultMessage: '门店名称' }),
key: 'name', key: 'name',
dataIndex: 'name', dataIndex: 'name',
render: (text, record) => <EyePreview url={`/memberCenter/systemSetting/authConfig/portalSystem/detail?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview type={AuthUrl('portalSystem.detail') ? 'link' : 'button'} url={`/memberCenter/systemSetting/authConfig/portalSystem/detail?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: intl.formatMessage({ id: 'portalSystem.mendiandizhi', defaultMessage: '门店地址' }), title: intl.formatMessage({ id: 'portalSystem.mendiandizhi', defaultMessage: '门店地址' }),
...@@ -75,7 +79,7 @@ const PortalSystem = () => { ...@@ -75,7 +79,7 @@ const PortalSystem = () => {
title: intl.formatMessage({ id: 'portalSystem.zhuangtai', defaultMessage: '状态' }), title: intl.formatMessage({ id: 'portalSystem.zhuangtai', defaultMessage: '状态' }),
key: 'status', key: 'status',
dataIndex: 'status', dataIndex: 'status',
render: (_text, record) => <StatusSwitch handleConfirm={() => handleStatus(record)} record={record}/> render: (_text, record) => <AuthButton btnCode='portalSystem.status'><StatusSwitch handleConfirm={() => handleStatus(record)} record={record} /></AuthButton>
}, },
{ {
title: intl.formatMessage({ id: 'portalSystem.caozuo', defaultMessage: '操作' }), title: intl.formatMessage({ id: 'portalSystem.caozuo', defaultMessage: '操作' }),
...@@ -83,13 +87,15 @@ const PortalSystem = () => { ...@@ -83,13 +87,15 @@ const PortalSystem = () => {
dataIndex: 'operate', dataIndex: 'operate',
render: (_text, record) => ( render: (_text, record) => (
<Fragment> <Fragment>
{record.showUpdate && <Button type='link' onClick={() => history.push(`/memberCenter/systemSetting/authConfig/portalSystem/edit?id=${record.id}`)}>{intl.formatMessage({ id: 'portalSystem.bianji', defaultMessage: '编辑' })}</Button>} {record.showUpdate && <AuthButton btnCode='portalSystem.eidt'><Button type='link' onClick={() => history.push(`/memberCenter/systemSetting/authConfig/portalSystem/edit?id=${record.id}`)}>{intl.formatMessage({ id: 'portalSystem.bianji', defaultMessage: '编辑' })}</Button></AuthButton>}
{record.showDelete && ( {record.showDelete && (
<AuthButton btnCode='portalSystem.deletd'>
<Popconfirm title={intl.formatMessage({ id: 'portalSystem.quedingyaoshanchuma', defaultMessage: '确定要删除吗?' })} okText={intl.formatMessage({ id: 'portalSystem.shi', defaultMessage: '是' })} cancelText={intl.formatMessage({ id: 'portalSystem.fou', defaultMessage: '否' })} onConfirm={() => _delete(record)} okButtonProps={{ loading: confirmLoading }}> <Popconfirm title={intl.formatMessage({ id: 'portalSystem.quedingyaoshanchuma', defaultMessage: '确定要删除吗?' })} okText={intl.formatMessage({ id: 'portalSystem.shi', defaultMessage: '是' })} cancelText={intl.formatMessage({ id: 'portalSystem.fou', defaultMessage: '否' })} onConfirm={() => _delete(record)} okButtonProps={{ loading: confirmLoading }}>
<Button type='link'> <Button type='link'>
{intl.formatMessage({ id: 'portalSystem.shanchu', defaultMessage: '删除' })} {intl.formatMessage({ id: 'portalSystem.shanchu', defaultMessage: '删除' })}
</Button> </Button>
</Popconfirm> </Popconfirm>
</AuthButton>
)} )}
</Fragment> </Fragment>
) )
...@@ -165,8 +171,8 @@ const PortalSystem = () => { ...@@ -165,8 +171,8 @@ const PortalSystem = () => {
}, },
}, },
enum: [ enum: [
{label: intl.formatMessage({id: 'portalSystem.qiyong', defaultMessage: '启用'}), value: 1}, { label: intl.formatMessage({ id: 'portalSystem.qiyong', defaultMessage: '启用' }), value: 1 },
{label: intl.formatMessage({id: 'portalSystem.tingyong', defaultMessage: '停用'}), value: 0}, { label: intl.formatMessage({ id: 'portalSystem.tingyong', defaultMessage: '停用' }), value: 0 },
], ],
}, },
} }
...@@ -188,13 +194,16 @@ const PortalSystem = () => { ...@@ -188,13 +194,16 @@ const PortalSystem = () => {
<Row> <Row>
<Col span={24}> <Col span={24}>
<Space direction="horizontal" size={16}> <Space direction="horizontal" size={16}>
<AuthButton btnCode='portalSystem.added'>
<Button <Button
type="primary" type="primary"
icon={<PlusOutlined />} icon={<PlusOutlined />}
onClick={() => history.push(`/memberCenter/systemSetting/authConfig/portalSystem/add`)} onClick={() => history.push(`/memberCenter/systemSetting/authConfig/portalSystem/add`)}
> >
{intl.formatMessage({id: 'portalSystem.added', defaultMessage: '新增'})} {intl.formatMessage({ id: 'portalSystem.added', defaultMessage: '新增' })}
</Button> </Button>
</AuthButton>
</Space> </Space>
</Col> </Col>
</Row> </Row>
......
...@@ -7,6 +7,8 @@ import { ColumnType } from 'antd/lib/table/interface'; ...@@ -7,6 +7,8 @@ import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { getMemberAbilitySalesPage, postMemberAbilitySalesDelete } from '@/services/MemberV2Api'; import { getMemberAbilitySalesPage, postMemberAbilitySalesDelete } from '@/services/MemberV2Api';
import AuthButton from '@/components/AuthButton';
import { AuthUrl } from '@/components/AuthButton/AuthUrl';
const intl = getIntl() const intl = getIntl()
...@@ -35,7 +37,7 @@ const PortalSystem = () => { ...@@ -35,7 +37,7 @@ const PortalSystem = () => {
title: intl.formatMessage({ id: 'channel.member.table.name' }), title: intl.formatMessage({ id: 'channel.member.table.name' }),
key: 'name', key: 'name',
dataIndex: 'name', dataIndex: 'name',
render: (text, record) => <EyePreview url={`/memberCenter/systemSetting/salesmanManage/salesmanBind/detail?id=${record.userId}`}>{text}</EyePreview> render: (text, record) => <EyePreview type={AuthUrl('memberList.see') ? 'link' : 'button'} url={`/memberCenter/systemSetting/salesmanManage/salesmanBind/detail?id=${record.userId}`}>{text}</EyePreview>
}, },
{ {
title: intl.formatMessage({ id: 'channel.member.table.orgName' }), title: intl.formatMessage({ id: 'channel.member.table.orgName' }),
...@@ -63,8 +65,9 @@ const PortalSystem = () => { ...@@ -63,8 +65,9 @@ const PortalSystem = () => {
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any) => { render: (text: any, record: any) => {
return <> return <>
<Button type='link' onClick={() => updateItem(record)}>{intl.formatMessage({ id: 'common.button.modify' })}</Button> <AuthButton btnCode='memberList.update'><Button type='link' onClick={() => updateItem(record)}>{intl.formatMessage({ id: 'common.button.modify' })}</Button></AuthButton>
{ {
<AuthButton btnCode='memberList.del'>
<Popconfirm <Popconfirm
title={intl.formatMessage({ id: 'common.tip.option.confirm' })} title={intl.formatMessage({ id: 'common.tip.option.confirm' })}
onConfirm={() => deleteItem(record)} onConfirm={() => deleteItem(record)}
...@@ -73,6 +76,7 @@ const PortalSystem = () => { ...@@ -73,6 +76,7 @@ const PortalSystem = () => {
> >
<Button type='link'>{intl.formatMessage({ id: 'common.button.delete' })}</Button> <Button type='link'>{intl.formatMessage({ id: 'common.button.delete' })}</Button>
</Popconfirm> </Popconfirm>
</AuthButton>
} }
</> </>
} }
...@@ -159,6 +163,7 @@ const PortalSystem = () => { ...@@ -159,6 +163,7 @@ const PortalSystem = () => {
<Row> <Row>
<Col span={24}> <Col span={24}>
<Space direction="horizontal" size={16}> <Space direction="horizontal" size={16}>
<AuthButton btnCode='memberList.add'>
<Button <Button
type="primary" type="primary"
icon={<PlusOutlined />} icon={<PlusOutlined />}
...@@ -166,6 +171,7 @@ const PortalSystem = () => { ...@@ -166,6 +171,7 @@ const PortalSystem = () => {
> >
{intl.formatMessage({ id: 'portalSystem.added', defaultMessage: '新增' })} {intl.formatMessage({ id: 'portalSystem.added', defaultMessage: '新增' })}
</Button> </Button>
</AuthButton>
</Space> </Space>
</Col> </Col>
</Row> </Row>
......
...@@ -8,6 +8,8 @@ import { Row, Col, Button, Tag, Badge, Modal } from 'antd'; ...@@ -8,6 +8,8 @@ import { Row, Col, Button, Tag, Badge, Modal } from 'antd';
import { WAITALLOTORDERSCHEMA } from './schema'; import { WAITALLOTORDERSCHEMA } from './schema';
import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor'; import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor';
import { getTransactionProductInquiryExternalStateEnum, getTransactionProductInquiryInteriorStateEnum, getTransactionProductInquiryNotAssignedAssigned, getTransactionProductInquiryNotAssignedList, postTransactionProductInquiryNotAssignedAssignedBatch } from '@/services/TransactionV2Api'; import { getTransactionProductInquiryExternalStateEnum, getTransactionProductInquiryInteriorStateEnum, getTransactionProductInquiryNotAssignedAssigned, getTransactionProductInquiryNotAssignedList, postTransactionProductInquiryNotAssignedAssignedBatch } from '@/services/TransactionV2Api';
import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import AuthButton from '@/components/AuthButton';
const intl = getIntl(); const intl = getIntl();
const WaitAllotOrder = () => { const WaitAllotOrder = () => {
...@@ -21,10 +23,10 @@ const WaitAllotOrder = () => { ...@@ -21,10 +23,10 @@ const WaitAllotOrder = () => {
const fetchSubmitBatch = async (id?: string, index?: number) => { const fetchSubmitBatch = async (id?: string, index?: number) => {
let res = null; let res = null;
if (id) { if (id) {
setLoading({[index]: true}) setLoading({ [index]: true })
res = await getTransactionProductInquiryNotAssignedAssigned({ inquiryId: id }) res = await getTransactionProductInquiryNotAssignedAssigned({ inquiryId: id })
} else { } else {
setLoading({load: true}) setLoading({ load: true })
res = await postTransactionProductInquiryNotAssignedAssignedBatch({ idList: rowkeys }); res = await postTransactionProductInquiryNotAssignedAssignedBatch({ idList: rowkeys });
} }
if (res.code !== 1000) { if (res.code !== 1000) {
...@@ -44,6 +46,7 @@ const WaitAllotOrder = () => { ...@@ -44,6 +46,7 @@ const WaitAllotOrder = () => {
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
type={AuthUrl('waitAllotOrder.detail') ? 'link' : 'button'}
url={`/memberCenter/tranactionAbility/inquiryOffer/waitAllotOrder/preview?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/inquiryOffer/waitAllotOrder/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
...@@ -90,7 +93,7 @@ const WaitAllotOrder = () => { ...@@ -90,7 +93,7 @@ const WaitAllotOrder = () => {
title: intl.formatMessage({ id: 'dealAbility.caozuo' }), title: intl.formatMessage({ id: 'dealAbility.caozuo' }),
key: 'options', key: 'options',
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any, index: number) => <Button type='link' loading={loading[index]} onClick={() => fetchSubmitBatch(record.id, index)}>领取</Button> render: (text: any, record: any, index: number) => <AuthButton btnCode='waitAllotOrder.collect'><Button type='link' loading={loading[index]} onClick={() => fetchSubmitBatch(record.id, index)}>领取</Button></AuthButton>
}, },
]; ];
return ( return (
...@@ -107,6 +110,7 @@ const WaitAllotOrder = () => { ...@@ -107,6 +110,7 @@ const WaitAllotOrder = () => {
controllerBtns={ controllerBtns={
<Row> <Row>
<Col span={6}> <Col span={6}>
<AuthButton btnCode='waitAllotOrder.batch'>
<Button <Button
loading={loading?.load} loading={loading?.load}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
...@@ -114,6 +118,7 @@ const WaitAllotOrder = () => { ...@@ -114,6 +118,7 @@ const WaitAllotOrder = () => {
> >
批量领取 批量领取
</Button> </Button>
</AuthButton>
</Col> </Col>
</Row> </Row>
} }
......
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