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