Commit 93e91b89 authored by Bill's avatar Bill
parents 2e5daede 3fbfe8e8
btnCode 是pass 平台配置唯一表示
btnCode 是pass 平台配置唯一表示
......@@ -76,6 +76,36 @@ repositories.edit:仓位库存调拨按钮
营销能力-marketingAbility
营销能力-商家优惠劵管理
平台营销活动报名
paltformSign.see 平台营销活动查询 平台营销活动查询-按钮
待提交审核报名资料
readySubmitExamine.see 待提交审核报名资料-查询 待提交审核报名资料-查询-按钮
readySubmitExamine.update 待提交审核报名资料-修改 待提交审核报名资料-修改-按钮
readySubmitExamine.submit 待提交审核报名资料-提交 待提交审核报名资料-提交-按钮
readySubmitExamine.save 待提交审核报名资料-保存 待提交审核报名资料-保存-按钮
readySubmitExamine.batch 待提交审核报名资料-批量 待提交审核报名资料-批量-按钮
待审核报名资料 (一级)-批量
readyExamineOne.batch 待审核报名资料 (一级)-批量 待审核报名资料 (一级)-批量-按钮
readyExamineOne.see 待审核报名资料 (一级)-查看 待审核报名资料 (一级)-查看-按钮
readyExamineOne.examine 待审核报名资料 (一级)-审核 待审核报名资料 (一级)-审核-按钮
待审核报名资料 (二级)-审核
readyExamineTwo.examine 待审核报名资料 (二级)-审核 待审核报名资料 (二级)-审核-按钮
readyExamineTwo.see 待审核报名资料 (二级)-查看 待审核报名资料 (二级)-查看-按钮
readyExamineTwo.batch 待审核报名资料 (二级)-批量 待审核报名资料 (二级)-批量-按钮
待提交报名资料
readySubmit.batch 待提交报名资料 待提交报名资料-按钮
readySubmit.see 待提交报名查看 待提交报名查看-按钮
readySubmit.examine 待提交报名审核 待提交报名审核-按钮
商家优惠劵查询
merchantCouponQuery.see 商家优惠劵查询-查看 商家优惠劵查询-查看-按钮
merchantCouponQuery.cancel 商家优惠劵查询-取消 商家优惠劵查询-取消-按钮
merchantCouponQuery.restart 商家优惠劵查询-重启 商家优惠劵查询-重启-按钮
merchantCouponQuery.stop 商家优惠劵查询-终止 商家优惠劵查询-终止-按钮
待提交审核商家优惠劵
merchantCouponUnsubmitted.batchSubmit 待提交审核商家优惠劵-批量提交 待提交审核商家优惠劵-批量提交-按钮 删除
merchantCouponUnsubmitted.batchdel 待提交审核商家优惠劵-批量删除 待提交审核商家优惠劵-批量删除-按钮 删除
merchantCouponUnsubmitted.add 待提交审核商家优惠劵-新曾 待提交审核商家优惠劵-新曾-按钮 删除
......
......@@ -379,3 +379,28 @@ export enum COMMODITY_TYPE {
*/
integral = 3
}
export const SelectLangList = {
siteList: [
{
name: '简体中文-ZH',
key: 'zh-CN',
icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png'
},
{
name: 'English-EN',
key: 'en-US',
icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png'
},
// {
// name: '日本語-JP',
// key: 'jp',
// icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png'
// },
{
name: '한국어-KO',
key: 'ko-KR',
icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png'
}
]
}
......@@ -62,7 +62,7 @@ import us from '../../../mockStatic/us.png'
import '../styles/SelectLang.less'
import { getCookie, removeCookie } from '@/utils/cookie'
import { getTopDomainByHost } from '@/utils'
import { TOP_DOMAIN_NO_PORT } from '@/constants'
import { SelectLangList, TOP_DOMAIN_NO_PORT } from '@/constants'
interface countryItem {
name: string,
......@@ -90,7 +90,7 @@ const HeaderDropdown: React.FC = () => {
const menuHeaderDropdown = (
<Menu selectedKeys={[]}>
{
GlobalConfig.publicSelect.siteList.map(v => <Menu.Item key={v.key} onClick={() => setLang(v)}>
SelectLangList.siteList.map(v => <Menu.Item key={v.key} onClick={() => setLang(v)}>
<Space>
{currentLangKey === v.key ? <img src={gou} style={{ width: 20, height: 20 }} /> : <div style={{ width: 20, height: 20 }}></div>}
<img src={v.icon} style={{ width: 24, height: 17 }} />
......@@ -109,7 +109,7 @@ const HeaderDropdown: React.FC = () => {
const renderCurrentLang = () => {
let currentLang: countryItem
GlobalConfig.publicSelect.siteList.map(item => {
SelectLangList.siteList.map(item => {
if (item.key === currentLangKey) {
currentLang = item
}
......
......@@ -9,6 +9,7 @@ import korenImg from '../../../mockStatic/koren.png'
import us from '../../../mockStatic/us.png'
import '../styles/SelectLang.less'
import { SelectLangList } from '@/constants'
interface countryItem {
name: string,
......@@ -31,7 +32,7 @@ const SelectLang: React.FC = () => {
const menuHeaderDropdown = (
<Menu selectedKeys={[]}>
{
GlobalConfig.publicSelect.siteList.map(v => <Menu.Item key={v.key} onClick={() => setLang(v)}>
SelectLangList.siteList.map(v => <Menu.Item key={v.key} onClick={() => setLang(v)}>
<Space>
{currentLangKey === v.key ? <img src={gou} style={{ width: 20, height: 20 }} /> : <div style={{ width: 20, height: 20 }}></div>}
<img src={v.icon} style={{ width: 24, height: 17 }} />
......@@ -50,7 +51,7 @@ const SelectLang: React.FC = () => {
const renderCurrentLang = () => {
let currentLang: countryItem
GlobalConfig.publicSelect.siteList.map(item => {
SelectLangList.siteList.map(item => {
if (item.key === currentLangKey) {
currentLang = item
}
......
import React, { useRef, useState } from 'react';
import { Drawer, Button } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import StandardTable from '@/components/StandardTable';
import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
// import { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/SettleV2Api'
import Submit from '@/components/NiceForm/components/Submit'
import NiceForm from '@/components/NiceForm'
import { getIntl } from 'umi';
interface ContractDrawerProps {
visible: boolean,
onClose?: () => void,
}
const intl = getIntl();
const formActions = createFormActions();
const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProps) => {
const { visible, onClose } = props;
const ref = useRef<any>({})
const [selectedRowKeys, setSelectedRowKeys] = useState<any>([])
const loadingTableData = async (params) => {
const _params = { ...params }
const { data } = await getSettleAccountsBusinessReconciliationToReconciliationList(_params)
return data;
}
const columns: ColumnType<any>[] = [{
title: '合同编号',
key: 'memberId',
dataIndex: 'memberId',
}, {
title: '合同摘要',
key: 'memberName',
dataIndex: 'memberName',
}, {
title: '合同生效时间',
key: 'memberType',
dataIndex: 'memberType',
}, {
title: '合同失效时间',
key: 'memberRole',
dataIndex: 'memberRole',
}, {
title: '合同金额',
key: 'memberLevel',
dataIndex: 'memberLevel',
}, {
title: '合同剩余金额',
key: 'memberLevel',
dataIndex: 'memberLevel',
}];
const handleSelectChange = (record, selected, selectedRow, nativeEvent) => {
setSelectedRowKeys([record.id]);
};
return (
<Drawer
title={'选择采购合同'}
placement={'right'}
onClose={onClose}
visible={visible}
key={'right'}
width={'50%'}
footer={
<div style={{ textAlign: 'right' }}>
<Button onClick={onClose} style={{ marginRight: 8 }}>
{intl.formatMessage({ id: 'balance.quxiao' })}
</Button>
<Button onClick={onClose} type="primary">
{'确定'}
</Button>
</div>
}
>
<StandardTable
keepAlive={false}
// fetchTableData={params => loadingTableData(params)}
columns={columns}
currentRef={ref}
rowKey="id"
rowSelection={{
type: 'radio',
selectedRowKeys: selectedRowKeys,
onSelect: handleSelectChange,
}}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
)
}}
schema={{
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
"x-component-props": {
grid: true
},
properties: {
memberName: {
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: '请输入会员名称',
align: 'flex-start',
},
},
}
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
justifyContent: 'flex-end'
},
colStyle: {
marginRight: 16,
},
},
properties: {
"applyAbstract": {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanzhaiyao' }),
allowClear: true,
}
},
"[expectPayTimeStart,expectPayTimeEnd]": {
type: 'string',
"x-component": "daterange",
"x-component-props": {
placeholder: [intl.formatMessage({ id: 'balance.yujifukuankaishishijian' }), intl.formatMessage({ id: 'balance.yujifukuanjieshushijian' })],
allowClear: true,
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: intl.formatMessage({ id: 'balance.chaxun' }),
},
},
},
}
}
}}
components={{
Submit,
}}
/>
}
/>
</Drawer>
);
}
export default ContractDrawer;
import React, { useRef, useState } from 'react';
import { Drawer, Button } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import StandardTable from '@/components/StandardTable';
import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
// import { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/SettleV2Api'
import Submit from '@/components/NiceForm/components/Submit'
import NiceForm from '@/components/NiceForm'
import { getIntl } from 'umi';
interface RequestFundsDrawerProps {
visible: boolean,
onClose?: () => void,
}
const intl = getIntl();
const formActions = createFormActions();
const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFundsDrawerProps) => {
const { visible, onClose } = props;
const ref = useRef<any>({})
const [selectedRowKeys, setSelectedRowKeys] = useState<any>([])
const loadingTableData = async (params) => {
const _params = { ...params }
const { data } = await getSettleAccountsBusinessReconciliationToReconciliationList(_params)
return data;
}
const columns: ColumnType<any>[] = [{
title: '单据号',
key: 'memberId',
dataIndex: 'memberId',
}, {
title: '单据摘要',
key: 'memberName',
dataIndex: 'memberName',
}, {
title: '单据类型',
key: 'memberType',
dataIndex: 'memberType',
}, {
title: '单据时间',
key: 'memberRole',
dataIndex: 'memberRole',
}, {
title: '单据状态',
key: 'memberLevel',
dataIndex: 'memberLevel',
}, {
title: '单据金额',
key: 'memberLevel',
dataIndex: 'memberLevel',
}, {
title: '已付款',
key: 'memberLevel',
dataIndex: 'memberLevel',
}, {
title: '已请款待付款',
key: 'memberLevel',
dataIndex: 'memberLevel',
}, {
title: '待请款',
key: 'memberLevel',
dataIndex: 'memberLevel',
}];
const handleSelectChange = (record, selected, selectedRow, nativeEvent) => {
setSelectedRowKeys([record.id]);
};
return (
<Drawer
title={'选择待请款单据'}
placement={'right'}
onClose={onClose}
visible={visible}
key={'right'}
width={'50%'}
footer={
<div style={{ textAlign: 'right' }}>
<Button onClick={onClose} style={{ marginRight: 8 }}>
{intl.formatMessage({ id: 'balance.quxiao' })}
</Button>
<Button onClick={onClose} type="primary">
{'确定'}
</Button>
</div>
}
>
<StandardTable
keepAlive={false}
// fetchTableData={params => loadingTableData(params)}
columns={columns}
currentRef={ref}
rowKey="id"
rowSelection={{
type: 'radio',
selectedRowKeys: selectedRowKeys,
onSelect: handleSelectChange,
}}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
)
}}
schema={{
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
"x-component-props": {
grid: true
},
properties: {
memberName: {
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: '请输入单据号',
align: 'flex-start',
},
},
}
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
justifyContent: 'flex-end'
},
colStyle: {
marginRight: 16,
},
},
properties: {
"applyAbstract": {
type: 'string',
'x-component-props': {
placeholder: '请输入单据摘要',
allowClear: true,
}
},
"[expectPayTimeStart,expectPayTimeEnd]": {
type: 'string',
"x-component": "daterange",
"x-component-props": {
placeholder: [intl.formatMessage({ id: 'balance.yujifukuankaishishijian' }), intl.formatMessage({ id: 'balance.yujifukuanjieshushijian' })],
allowClear: true,
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: intl.formatMessage({ id: 'balance.chaxun' }),
},
},
},
}
}
}}
components={{
Submit,
}}
/>
}
/>
</Drawer>
);
}
export default RequestFundsDrawer;
......@@ -9,7 +9,8 @@ import ActivityItem from './components/ActivityItem';
import styles from './index.less';
import SearchPannel from './components/SearchPannel';
import { getTemplateWebActivityPagePage, GetTemplateWebActivityPagePageRequest, GetTemplateWebActivityPagePageResponseDetail, postTemplateWebActivityPageDelete, postTemplateWebActivityPageOpenOffLine } from '@/services/TemplateV2Api';
import { useIntl} from 'umi'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
const { Search } = Input;
......@@ -28,7 +29,7 @@ const ActivePage = () => {
const [currentPage, setPage] = useState<number>(1);
const [currentPageSize, setPageSize] = useState<number>(10);
const [searchParams, setSearchParams] = useState<SearchParamsType | null>(null);
const cacheData = useMemo(() => ({...searchParams, current: currentPage, pageSize: currentPageSize, type: PLATFORM }), [searchParams, currentPage, currentPageSize]);
const cacheData = useMemo(() => ({ ...searchParams, current: currentPage, pageSize: currentPageSize, type: PLATFORM }), [searchParams, currentPage, currentPageSize]);
const debouncedValue = useDebounce(cacheData, 1000);
const [loading, setLoading] = useState<boolean>(false);
const [dataSource, setDataSource] = useState<GetTemplateWebActivityPagePageResponseDetail[]>([]);
......@@ -55,7 +56,7 @@ const ActivePage = () => {
const getData = async (params: GetTemplateWebActivityPagePageRequest) => {
setLoading(true);
/** 这里type = 2 是能力中心, 因为平台后台跟能力中心用的是同一个接口 */
const { data, code } = await getTemplateWebActivityPagePage({...params, type: 2});
const { data, code } = await getTemplateWebActivityPagePage({ ...params, type: 2 });
setLoading(false);
if (code === 1000) {
setTotal(data.totalCount);
......@@ -64,14 +65,14 @@ const ActivePage = () => {
};
useEffect(() => {
getData({...debouncedValue, name: searchInput});
getData({ ...debouncedValue, name: searchInput });
}, [debouncedValue]);
const handleRemove = async (id: number) => {
const { data, code } = await postTemplateWebActivityPageDelete({id});
const { data, code } = await postTemplateWebActivityPageDelete({ id });
if (code === 1000) {
getData({...debouncedValue, name: searchInput});
getData({ ...debouncedValue, name: searchInput });
}
};
......@@ -81,7 +82,7 @@ const ActivePage = () => {
status,
});
if (code === 1000) {
getData({...debouncedValue, name: searchInput});
getData({ ...debouncedValue, name: searchInput });
}
};
......@@ -90,7 +91,7 @@ const ActivePage = () => {
};
const handleSearch = () => {
getData({...debouncedValue, name: searchInput});
getData({ ...debouncedValue, name: searchInput });
};
return (
......@@ -101,11 +102,14 @@ const ActivePage = () => {
<div className={styles.tablePanenl}>
<div className={styles.header}>
<div className={styles.search}>
<Search placeholder={intl.formatMessage({ id: 'activityPage.searchshousuo' })} onChange={(e) => onChange(e.target.value)} onSearch={handleSearch}/>
<Search placeholder={intl.formatMessage({ id: 'activityPage.searchshousuo' })} onChange={(e) => onChange(e.target.value)} onSearch={handleSearch} />
</div>
<Link to='/memberCenter/marketingAbility/activityPages/management/add'>
<Button icon={<PlusOutlined />} type="primary">{intl.formatMessage({ id: 'activityPage.add' })}</Button>
</Link>
<AuthButton btnCode='management.add' menuCode='marketingAbility'>
<Link to='/memberCenter/marketingAbility/activityPages/management/add'>
<Button icon={<PlusOutlined />} type="primary">{intl.formatMessage({ id: 'activityPage.add' })}</Button>
</Link>
</AuthButton>
</div>
<Spin spinning={loading} wrapperClassName={styles.body}>
<div className={styles.table}>
......@@ -136,7 +140,7 @@ const ActivePage = () => {
{
total > 0 && (
<div className={styles.pagination}>
<Pagination showQuickJumper total={total} pageSize={currentPageSize} current={currentPage} onChange={onPaginationChange} />
<Pagination showQuickJumper total={total} pageSize={currentPageSize} current={currentPage} onChange={onPaginationChange} />
</div>
) || null
}
......
......@@ -5,7 +5,7 @@
* @LastEditTime: 2021-09-30 17:00:59
* @Description: 商家优惠劵查询
*/
import { useIntl} from 'umi'
import { useIntl } from 'umi'
import React, { useRef, useState } from 'react';
import {
Card,
......@@ -25,6 +25,9 @@ import { getMarketingCouponPageCondition, getMarketingCouponSummaryPage, GetMark
import useSpliceArray from '@/hooks/useSpliceArray';
import { querySchema } from './schema';
import ActionModal, { ActionModalType, ActionModalValueType } from './components/ActionModal';
import AuthButton from '@/components/AuthButton'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
const formActions = createFormActions();
......@@ -87,11 +90,12 @@ const MerchantCouponQuery: React.FC = () => {
align: 'center',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.couponName'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.couponName' })}`,
dataIndex: 'name',
align: 'center',
render: (text, record) => (
<EyePreview
type={AuthUrl('merchantCouponQuery.see', 'marketingAbility') ? 'link' : 'button'}
url={`/memberCenter/marketingAbility/merchantCoupon/query/detail?id=${record.id}`}
>
{text}
......@@ -99,7 +103,7 @@ const MerchantCouponQuery: React.FC = () => {
),
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.DealsCoupontype'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.DealsCoupontype' })}`,
dataIndex: 'typeName',
align: 'center',
filters: [],
......@@ -119,69 +123,81 @@ const MerchantCouponQuery: React.FC = () => {
render: (text) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd' })}`,
dataIndex: 'effectiveTimeStart',
align: 'center',
sorter: (a, b) => a.effectiveTimeStart - b.effectiveTimeStart,
render: (text) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '-',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd' })}`,
dataIndex: 'effectiveTimeEnd',
align: 'center',
sorter: (a, b) => a.effectiveTimeEnd - b.effectiveTimeEnd,
render: (text, record) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : `领取${record.invalidDay}天后失效`,
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.getWayName'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.getWayName' })}`,
dataIndex: 'getWayName',
align: 'center',
filters: [],
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.denomination'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.denomination' })}`,
dataIndex: 'denomination',
sorter: (a, b) => a.denomination - b.denomination,
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.Quantity'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.Quantity' })}`,
dataIndex: 'quantity',
sorter: (a, b) => a.quantity - b.quantity,
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.innerState'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.innerState' })}`,
dataIndex: 'statusName',
filters: [],
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.operation'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.operation' })}`,
dataIndex: 'option',
align: 'center',
render: (_, record) => (
<>
{record.cancel && (
<Button
type="link"
onClick={() => handleShowActionModal('cancel', { id: record.id })}
>{ intl.formatMessage({ id: 'merchantCoupon.cancel'}) }</Button>
<AuthButton btnCode='merchantCouponQuery.cancel' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => handleShowActionModal('cancel', { id: record.id })}
>{intl.formatMessage({ id: 'merchantCoupon.cancel' })}</Button>
</AuthButton>
)}
{record.restart && (
<Button
type="link"
onClick={() => handleShowActionModal('startUp', { id: record.id })}
>{ intl.formatMessage({ id: 'merchantCoupon.Restart'}) }</Button>
<AuthButton btnCode='merchantCouponQuery.restart' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => handleShowActionModal('startUp', { id: record.id })}
>{intl.formatMessage({ id: 'merchantCoupon.Restart' })}</Button>
</AuthButton>
)}
{record.update && (
<Button
type="link"
onClick={() => handleShowActionModal('edit', { id: record.id, releaseTimeStart: moment(record.releaseTimeStart).format('YYYY-MM-DD HH:mm:ss'), releaseTimeEnd: moment(record.releaseTimeEnd).format('YYYY-MM-DD HH:mm:ss'), quantity: `${record.quantity}` })}
>{ intl.formatMessage({ id: 'merchantCoupon.Revise'}) }</Button>
<AuthButton btnCode='merchantCouponQuery.update' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => handleShowActionModal('edit', { id: record.id, releaseTimeStart: moment(record.releaseTimeStart).format('YYYY-MM-DD HH:mm:ss'), releaseTimeEnd: moment(record.releaseTimeEnd).format('YYYY-MM-DD HH:mm:ss'), quantity: `${record.quantity}` })}
>{intl.formatMessage({ id: 'merchantCoupon.Revise' })}</Button>
</AuthButton>
)}
{record.stop && (
<Button
type="link"
onClick={() => handleShowActionModal('stop', { id: record.id })}
>{ intl.formatMessage({ id: 'merchantCoupon.termination'}) }</Button>
<AuthButton btnCode='merchantCouponQuery.stop' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => handleShowActionModal('stop', { id: record.id })}
>{intl.formatMessage({ id: 'merchantCoupon.termination' })}</Button>
</AuthButton>
)}
</>
),
......
......@@ -31,7 +31,8 @@ import { getMarketingCouponTypeList, getMarketingCouponWaitAuditPage, GetMarketi
import useSpliceArray from '@/hooks/useSpliceArray';
import { querySchema } from './schema';
import commonColumn from '../common/columns/coupon';
import { useIntl} from 'umi'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
const { confirm } = Modal;
......@@ -66,7 +67,7 @@ const MerchantCouponUnsubmitted: React.FC = () => {
const handleCommit = (ids: number[]) => {
const mesInstance = message.loading({
content: `${intl.formatMessage({ id: 'merchantCoupon.Submitting'})}`,
content: `${intl.formatMessage({ id: 'merchantCoupon.Submitting' })}`,
duration: 0,
});
postMarketingCouponWaitAuditSubmitBatch({
......@@ -83,7 +84,7 @@ const MerchantCouponUnsubmitted: React.FC = () => {
const handleDelete = (ids: number[]) => {
const mesInstance = message.loading({
content: `${intl.formatMessage({ id: 'merchantCoupon.Deleting'})}`,
content: `${intl.formatMessage({ id: 'merchantCoupon.Deleting' })}`,
duration: 0,
});
postMarketingCouponWaitAuditDelete({
......@@ -100,28 +101,37 @@ const MerchantCouponUnsubmitted: React.FC = () => {
const defaultColumns: ColumnType<GetMarketingCouponWaitAuditPageResponseDetail>[] = commonColumn().concat([
{
title: `${intl.formatMessage({ id: 'merchantCoupon.operation'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.operation' })}`,
dataIndex: 'option',
align: 'center',
render: (_, record) => (
<>
{record.submit && (
<Button
type="link"
onClick={() => handleCommit([record.id])}
>{ intl.formatMessage({ id: 'merchantCoupon.submit'}) }</Button>
<AuthButton btnCode='merchantCouponUnsubmitted.Submit' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => handleCommit([record.id])}
>{intl.formatMessage({ id: 'merchantCoupon.submit' })}</Button>
</AuthButton>
)}
{record.update && (
<Button
type="link"
onClick={() => history.push(`/memberCenter/marketingAbility/merchantCoupon/unsubmitted/edit?id=${record.id}`)}
>{ intl.formatMessage({ id: 'merchantCoupon.Revise'}) }</Button>
<AuthButton btnCode='merchantCouponUnsubmitted.edit' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => history.push(`/memberCenter/marketingAbility/merchantCoupon/unsubmitted/edit?id=${record.id}`)}
>{intl.formatMessage({ id: 'merchantCoupon.Revise' })}</Button>
</AuthButton>
)}
{record.delete && (
<Button
type="link"
onClick={() => handleDelete([record.id])}
>{ intl.formatMessage({ id: 'merchantCoupon.delete'}) }</Button>
<AuthButton btnCode='merchantCouponUnsubmitted.del' menuCode='marketingAbility'>
<Button
type="link"
onClick={() => handleDelete([record.id])}
>{intl.formatMessage({ id: 'merchantCoupon.delete' })}</Button>
</AuthButton>
)}
</>
),
......@@ -152,11 +162,11 @@ const MerchantCouponUnsubmitted: React.FC = () => {
const handleBatchCommit = () => {
if (!selectedRowKeys.length) {
message.warning(`${intl.formatMessage({ id: 'merchantCoupon.Nocouponsareselected'})}`);
message.warning(`${intl.formatMessage({ id: 'merchantCoupon.Nocouponsareselected' })}`);
return;
}
confirm({
title: `${intl.formatMessage({ id: 'merchantCoupon.tip'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.tip' })}`,
icon: <QuestionCircleOutlined />,
content: `${intl.formatMessage({ id: 'merchantCoupon.sureSubmitChosenCoupon' })}`,
onOk() {
......@@ -182,11 +192,11 @@ const MerchantCouponUnsubmitted: React.FC = () => {
const handleBatchDelete = () => {
if (!selectedRowKeys.length) {
message.warning(`${intl.formatMessage({ id: 'merchantCoupon.Nocouponsareselected'})}?`);
message.warning(`${intl.formatMessage({ id: 'merchantCoupon.Nocouponsareselected' })}?`);
return;
}
confirm({
title: `${intl.formatMessage({ id: 'merchantCoupon.tip'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.tip' })}`,
icon: <QuestionCircleOutlined />,
content: `${intl.formatMessage({ id: 'merchantCoupon.sureDeleteChosenCoupon' })}?`,
onOk() {
......@@ -212,17 +222,24 @@ const MerchantCouponUnsubmitted: React.FC = () => {
const ControllerBtns = () => (
<Space size={16}>
<Button
type="primary"
onClick={() => history.push('/memberCenter/marketingAbility/merchantCoupon/unsubmitted/add')}
>
<PlusOutlined />{ intl.formatMessage({ id: 'merchantCoupon.Newcoupons'}) }</Button>
<Button
onClick={handleBatchCommit}
>{ intl.formatMessage({ id: 'merchantCoupon.Batchsubmission'}) }</Button>
<Button
onClick={handleBatchDelete}
>{ intl.formatMessage({ id: 'merchantCoupon.amountDelete'}) }</Button>
<AuthButton btnCode='merchantCouponUnsubmitted.add' menuCode='marketingAbility'>
<Button
type="primary"
onClick={() => history.push('/memberCenter/marketingAbility/merchantCoupon/unsubmitted/add')}
>
<PlusOutlined />{intl.formatMessage({ id: 'merchantCoupon.Newcoupons' })}</Button>
</AuthButton>
<AuthButton btnCode='merchantCouponUnsubmitted.batchSubmit' menuCode='marketingAbility'>
<Button
onClick={handleBatchCommit}
>{intl.formatMessage({ id: 'merchantCoupon.Batchsubmission' })}</Button>
</AuthButton>
<AuthButton btnCode='merchantCouponUnsubmitted.batchdel' menuCode='marketingAbility'>
<Button
onClick={handleBatchDelete}
>{intl.formatMessage({ id: 'merchantCoupon.amountDelete' })}</Button>
</AuthButton>
</Space>
);
......
......@@ -13,6 +13,8 @@ import { FormEffectHooks } from '@formily/antd';
import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor';
import { getMarketingPlatformActivitySignupGetActivityTypeList, getMarketingPlatformActivitySignupPageTobeExamineStep1, postMarketingPlatformActivitySignupExamineStep1Batch } from '@/services/MarketingV2Api';
import { PATTERN_MAPS } from '@/constants/regExp';
import AuthButton from '@/components/AuthButton'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
const { onFormMount$ } = FormEffectHooks;
......@@ -33,7 +35,7 @@ const ReadyExamineOne = () => {
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
key: 'activityName',
dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/readyExamineOne/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
render: (text, record) => <EyePreview type={AuthUrl('readyExamineOne.see', 'marketingAbility') ? 'link' : 'button'} url={`/memberCenter/marketingAbility/paltformSign/readyExamineOne/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
......@@ -85,7 +87,10 @@ const ReadyExamineOne = () => {
title: `${intl.formatMessage({ id: 'paltformSign.operation' })}`,
key: 'state',
dataIndex: 'state',
render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readyExamineOne/detail?activityId=${record.activityId}&signUpId=${record.id}`)}>{intl.formatMessage({ id: 'paltformSign.audit' })}</Button>
render: (_, record) =>
<AuthButton btnCode='readyExamineOne.examine' menuCode='marketingAbility'>
<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readyExamineOne/detail?activityId=${record.activityId}&signUpId=${record.id}`)}>{intl.formatMessage({ id: 'paltformSign.audit' })}</Button>
</AuthButton>
},
]
......@@ -105,11 +110,14 @@ const ReadyExamineOne = () => {
const controllerBtns = (
<Row>
<Col span={6}>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>{intl.formatMessage({ id: 'paltformSign.batchSubmitAudit' })}</Button>
<AuthButton btnCode='readyExamineOne.batch' menuCode='marketingAbility'>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>{intl.formatMessage({ id: 'paltformSign.batchSubmitAudit' })}</Button>
</AuthButton>
</Col>
</Row>
)
......
......@@ -13,6 +13,8 @@ import EyePreview from '@/components/EyePreview';
import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor';
import { getMarketingPlatformActivitySignupGetActivityTypeList, getMarketingPlatformActivitySignupPageTobeExamineStep2, postMarketingPlatformActivitySignupExamineStep2Batch } from '@/services/MarketingV2Api';
import { PATTERN_MAPS } from '@/constants/regExp';
import AuthButton from '@/components/AuthButton'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
const { onFormMount$ } = FormEffectHooks;
const ReadyExamineTwo = () => {
......@@ -31,7 +33,7 @@ const ReadyExamineTwo = () => {
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
key: 'activityName',
dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/readyExamineTwo/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
render: (text, record) => <EyePreview type={AuthUrl('readyExamineTwo.see', 'marketingAbility') ? 'link' : 'button'} url={`/memberCenter/marketingAbility/paltformSign/readyExamineTwo/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
......@@ -83,7 +85,11 @@ const ReadyExamineTwo = () => {
title: `${intl.formatMessage({ id: 'paltformSign.operation' })}`,
key: 'state',
dataIndex: 'state',
render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readyExamineTwo/detail?activityId=${record.activityId}&signUpId=${record.id}`)}>{intl.formatMessage({ id: 'paltformSign.audit' })}</Button>
render: (_, record) =>
<AuthButton btnCode='readyExamineOne.examine' menuCode='marketingAbility'>
<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readyExamineTwo/detail?activityId=${record.activityId}&signUpId=${record.id}`)}>{intl.formatMessage({ id: 'paltformSign.audit' })}</Button>
</AuthButton>
},
]
......@@ -103,11 +109,14 @@ const ReadyExamineTwo = () => {
const controllerBtns = (
<Row>
<Col span={6}>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>{intl.formatMessage({ id: 'paltformSign.batchSubmitAudit' })}</Button>
<AuthButton btnCode='readyExamineTwo.batch' menuCode='marketingAbility'>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>{intl.formatMessage({ id: 'paltformSign.batchSubmitAudit' })}</Button>
</AuthButton>
</Col>
</Row>
)
......
......@@ -13,6 +13,8 @@ import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor';
import { getMarketingPlatformActivitySignupGetActivityTypeList, getMarketingPlatformActivitySignupPageTobeSubmitSignUp, postMarketingPlatformActivitySignupSubmitSignUp, postMarketingPlatformActivitySignupSubmitSignUpBatch } from '@/services/MarketingV2Api';
import { PATTERN_MAPS } from '@/constants/regExp';
const { onFormMount$ } = FormEffectHooks;
import AuthButton from '@/components/AuthButton'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
const ReadySubmit = () => {
const intl = useIntl();
......@@ -45,43 +47,43 @@ const ReadySubmit = () => {
dataIndex: 'activityId',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
key: 'activityName',
dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/readySubmit/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
render: (text, record) => <EyePreview type={AuthUrl('readySubmit.see', 'marketingAbility') ? 'link' : 'button'} url={`/memberCenter/marketingAbility/paltformSign/readySubmit/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
key: 'activityType',
dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>,
},
{
title: `${intl.formatMessage({ id: 'paltformSign.activitiesStartTime'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.activitiesStartTime' })}`,
key: 'startTime',
dataIndex: 'startTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.activityOverTime'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.activityOverTime' })}`,
key: 'endTime',
dataIndex: 'endTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.startTimeSigningUp'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.startTimeSigningUp' })}`,
key: 'signUpStartTime',
dataIndex: 'signUpStartTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.endTimeSigningUp'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.endTimeSigningUp' })}`,
key: 'signUpEndTime',
dataIndex: 'signUpEndTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.externalState'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.externalState' })}`,
key: 'outerStatus',
dataIndex: 'outerStatus',
render: (_, record) => (
......@@ -89,7 +91,7 @@ const ReadySubmit = () => {
)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.internalState'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.internalState' })}`,
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text, record) => (
......@@ -97,12 +99,16 @@ const ReadySubmit = () => {
)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.operation'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.operation' })}`,
key: 'state',
dataIndex: 'state',
render: (text, record) => <Popconfirm title={intl.formatMessage({ id: 'marketingAbility.quedingyaotijiaoma?'})} okButtonProps={{ loading: confirmLoading }} disabled={!record.id} okText={intl.formatMessage({ id: 'paltformSign.is'})} cancelText={intl.formatMessage({ id: 'paltformSign.no'})} onConfirm={() => fetchSubmitBatch(record.id)}>
<Button type='link' disabled={!record.id}>{ intl.formatMessage({ id: 'paltformSign.submit'}) }</Button>
</Popconfirm>
render: (text, record) =>
<AuthButton btnCode='readySubmit.examine' menuCode='marketingAbility'>
<Popconfirm title={intl.formatMessage({ id: 'marketingAbility.quedingyaotijiaoma?' })} okButtonProps={{ loading: confirmLoading }} disabled={!record.id} okText={intl.formatMessage({ id: 'paltformSign.is' })} cancelText={intl.formatMessage({ id: 'paltformSign.no' })} onConfirm={() => fetchSubmitBatch(record.id)}>
<Button type='link' disabled={!record.id}>{intl.formatMessage({ id: 'paltformSign.submit' })}</Button>
</Popconfirm>
</AuthButton>
},
]
......@@ -130,11 +136,14 @@ const ReadySubmit = () => {
fetchRowkeys={(e) => setRowKeys(e)}
controllerBtns={
<Space>
<Button
loading={confirmLoading}
disabled={rowkeys.length === 0}
onClick={() => fetchSubmitBatch()}
>{ intl.formatMessage({ id: 'paltformSign.batchSubmission'}) }</Button>
<AuthButton btnCode='readySubmit.batch' menuCode='marketingAbility'>
<Button
loading={confirmLoading}
disabled={rowkeys.length === 0}
onClick={() => fetchSubmitBatch()}
>{intl.formatMessage({ id: 'paltformSign.batchSubmission' })}</Button>
</AuthButton>
</Space>
}
schema={{
......@@ -193,7 +202,7 @@ const ReadySubmit = () => {
activityName: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
style: {
width: 160,
},
......@@ -202,7 +211,7 @@ const ReadySubmit = () => {
'[startTime,endTime]': {
type: 'daterange',
'x-component-props': {
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime'})}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime'})}`],
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime' })}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime' })}`],
style: {
width: 240,
},
......@@ -211,7 +220,7 @@ const ReadySubmit = () => {
activityType: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.theActivityType'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
style: {
width: 160,
},
......@@ -226,7 +235,7 @@ const ReadySubmit = () => {
span: 1
},
"x-component-props": {
children: `${intl.formatMessage({ id: 'paltformSign.theQuery'})}`
children: `${intl.formatMessage({ id: 'paltformSign.theQuery' })}`
}
}
}
......
......@@ -14,6 +14,8 @@ import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor';
import { getMarketingPlatformActivitySignupGetActivityTypeList, getMarketingPlatformActivitySignupPageTobeSubmit, postMarketingPlatformActivitySignupSubmit, postMarketingPlatformActivitySignupSubmitBatch } from '@/services/MarketingV2Api';
import { PATTERN_MAPS } from '@/constants/regExp';
const { onFormMount$ } = FormEffectHooks;
import AuthButton from '@/components/AuthButton'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
const ReadySubmitExamine = () => {
const intl = useIntl();
......@@ -49,43 +51,43 @@ const ReadySubmitExamine = () => {
dataIndex: 'activityId',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
key: 'activityName',
dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
render: (text, record) => <EyePreview type={AuthUrl('readySubmitExamine.see', 'marketingAbility') ? 'link' : 'button'} url={`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
key: 'activityType',
dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>,
},
{
title: `${intl.formatMessage({ id: 'paltformSign.activitiesStartTime'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.activitiesStartTime' })}`,
key: 'startTime',
dataIndex: 'startTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.activityOverTime'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.activityOverTime' })}`,
key: 'endTime',
dataIndex: 'endTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.startTimeSigningUp'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.startTimeSigningUp' })}`,
key: 'signUpStartTime',
dataIndex: 'signUpStartTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.endTimeSigningUp'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.endTimeSigningUp' })}`,
key: 'signUpEndTime',
dataIndex: 'signUpEndTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.externalState'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.externalState' })}`,
key: 'outerStatus',
dataIndex: 'outerStatus',
render: (_, record) => (
......@@ -93,7 +95,7 @@ const ReadySubmitExamine = () => {
)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.internalState'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.internalState' })}`,
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text, record) => (
......@@ -101,18 +103,29 @@ const ReadySubmitExamine = () => {
)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.operation'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.operation' })}`,
key: 'state',
dataIndex: 'state',
render: (text, record) => (
<>
{record.update && <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/edit?activityId=${record.activityId}&signUpId=${record.id}`)}>{ intl.formatMessage({ id: 'paltformSign.modifyTheRegistrationInformation'}) }</Button>}
{record.update &&
<AuthButton btnCode='readySubmitExamine.update' menuCode='marketingAbility'>
<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/edit?activityId=${record.activityId}&signUpId=${record.id}`)}>{intl.formatMessage({ id: 'paltformSign.modifyTheRegistrationInformation' })}</Button>
</AuthButton>
}
{record.submit && (
<Popconfirm title={intl.formatMessage({ id: 'paltformSign.sureToSummit' })} disabled={!record.id} okText={intl.formatMessage({ id: 'paltformSign.is'})} cancelText={intl.formatMessage({ id: 'paltformSign.no'})} onConfirm={() => handleSubmit(record.id)}>
<Button type='link' disabled={!record.id}>{ intl.formatMessage({ id: 'paltformSign.submitAudit'}) }</Button>
</Popconfirm>
<AuthButton btnCode='readySubmitExamine.submit' menuCode='marketingAbility'>
<Popconfirm title={intl.formatMessage({ id: 'paltformSign.sureToSummit' })} disabled={!record.id} okText={intl.formatMessage({ id: 'paltformSign.is' })} cancelText={intl.formatMessage({ id: 'paltformSign.no' })} onConfirm={() => handleSubmit(record.id)}>
<Button type='link' disabled={!record.id}>{intl.formatMessage({ id: 'paltformSign.submitAudit' })}</Button>
</Popconfirm>
</AuthButton>
)}
{record.save && <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add?activityId=${record.activityId}`)}>{ intl.formatMessage({ id: 'paltformSign.fillInTheRegistrationInformation'}) }</Button>}
{record.save &&
<AuthButton btnCode='readySubmitExamine.save' menuCode='marketingAbility'>
<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add?activityId=${record.activityId}`)}>{intl.formatMessage({ id: 'paltformSign.fillInTheRegistrationInformation' })}</Button>
</AuthButton>
}
</>
)
},
......@@ -122,11 +135,14 @@ const ReadySubmitExamine = () => {
const controllerBtns = (
<Row>
<Col span={6}>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>{ intl.formatMessage({ id: 'paltformSign.batchSubmitAudit'}) }</Button>
<AuthButton btnCode='readySubmitExamine.batch' menuCode='marketingAbility'>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>{intl.formatMessage({ id: 'paltformSign.batchSubmitAudit' })}</Button>
</AuthButton>
</Col>
</Row>
)
......@@ -152,7 +168,7 @@ const ReadySubmitExamine = () => {
<TableLayout
reload={ref}
selectedRow
fetchRowkeys={(e) => { setRowKeys(e); console.log(e)}}
fetchRowkeys={(e) => { setRowKeys(e); console.log(e) }}
getCheckboxProps={getCheckboxProps}
columns={columns}
effects="id"
......@@ -216,7 +232,7 @@ const ReadySubmitExamine = () => {
activityName: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
style: {
width: 160,
},
......@@ -225,7 +241,7 @@ const ReadySubmitExamine = () => {
'[startTime,endTime]': {
type: 'daterange',
'x-component-props': {
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime'})}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime'})}`],
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime' })}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime' })}`],
style: {
width: 240,
},
......@@ -234,7 +250,7 @@ const ReadySubmitExamine = () => {
activityType: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.theActivityType'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
style: {
width: 160,
},
......@@ -249,7 +265,7 @@ const ReadySubmitExamine = () => {
span: 1
},
"x-component-props": {
children: `${intl.formatMessage({ id: 'paltformSign.theQuery'})}`
children: `${intl.formatMessage({ id: 'paltformSign.theQuery' })}`
}
}
}
......
......@@ -14,6 +14,8 @@ import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor';
import { getMarketingPlatformActivitySignupGetActivityTypeList, getMarketingPlatformActivitySignupGetInnerStatusList, getMarketingPlatformActivitySignupGetOuterStatusList, getMarketingPlatformActivitySignupPage } from '@/services/MarketingV2Api';
import { PATTERN_MAPS } from '@/constants/regExp';
const { onFormMount$ } = FormEffectHooks;
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
const Search = () => {
const intl = useIntl();
const columns: ColumnType<any>[] = [
......@@ -23,43 +25,45 @@ const Search = () => {
dataIndex: 'activityId',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
key: 'activityName',
dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/search/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
render: (text, record) => <EyePreview
type={AuthUrl('paltformSign.see', 'marketingAbility') ? 'link' : 'button'}
url={`/memberCenter/marketingAbility/paltformSign/search/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
key: 'activityType',
dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>,
},
{
title: `${intl.formatMessage({ id: 'paltformSign.activitiesStartTime'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.activitiesStartTime' })}`,
key: 'startTime',
dataIndex: 'startTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.activityOverTime'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.activityOverTime' })}`,
key: 'endTime',
dataIndex: 'endTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.startTimeSigningUp'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.startTimeSigningUp' })}`,
key: 'signUpStartTime',
dataIndex: 'signUpStartTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.endTimeSigningUp'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.endTimeSigningUp' })}`,
key: 'signUpEndTime',
dataIndex: 'signUpEndTime',
render: (text) => format(text)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.externalState'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.externalState' })}`,
key: 'outerStatus',
dataIndex: 'outerStatus',
render: (_, record) => (
......@@ -67,7 +71,7 @@ const Search = () => {
)
},
{
title: `${intl.formatMessage({ id: 'paltformSign.internalState'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.internalState' })}`,
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text, record) => (
......@@ -94,7 +98,7 @@ const Search = () => {
console.warn(err)
})
/** 内部状态 */
getMarketingPlatformActivitySignupGetInnerStatusList ().then(res => {
getMarketingPlatformActivitySignupGetInnerStatusList().then(res => {
const _enum = res.data.map((item) => { return { label: item.name, value: item.status } })
linkage.enum('innerStatus', _enum);
}).catch(err => {
......@@ -164,7 +168,7 @@ const Search = () => {
activityName: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.theNameOfTheEvent' })}`,
style: {
width: 160,
},
......@@ -173,7 +177,7 @@ const Search = () => {
'[startTime,endTime]': {
type: 'daterange',
'x-component-props': {
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime'})}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime'})}`],
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime' })}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime' })}`],
style: {
width: 240,
},
......@@ -182,7 +186,7 @@ const Search = () => {
activityType: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.theActivityType'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.theActivityType' })}`,
style: {
width: 160,
},
......@@ -192,7 +196,7 @@ const Search = () => {
outerStatus: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.externalState'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.externalState' })}`,
style: {
width: 160,
},
......@@ -202,7 +206,7 @@ const Search = () => {
innerStatus: {
type: 'string',
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'paltformSign.internalState'})}`,
placeholder: `${intl.formatMessage({ id: 'paltformSign.internalState' })}`,
style: {
width: 160,
},
......@@ -217,7 +221,7 @@ const Search = () => {
span: 1
},
"x-component-props": {
children: `${intl.formatMessage({ id: 'paltformSign.theQuery'})}`
children: `${intl.formatMessage({ id: 'paltformSign.theQuery' })}`
}
}
}
......
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