Commit c4e44f8c authored by xiexiuxing's avatar xiexiuxing

feat:营销能力-商家优惠劵管理-商家优惠劵执行按钮权限

parent b8c20cfe
......@@ -9,16 +9,16 @@ import React from 'react';
import { ColumnType } from 'antd/lib/table/interface';
import moment from 'moment';
import EyePreview from '@/components/EyePreview';
import { getIntl} from 'umi'
import { getIntl } from 'umi'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
/**
*
* @param target string 会员详情路径前缀
* @returns Table Columns
*/
const intl = getIntl();
const columns = (target = '/memberCenter/marketingAbility/merchantCoupon/unsubmitted/detail'): ColumnType<any>[] => ([
const intl = getIntl();
const columns = (target = '/memberCenter/marketingAbility/merchantCoupon/unsubmitted/detail'): ColumnType<any>[] => ([
{
title: 'ID',
dataIndex: 'id',
......@@ -30,6 +30,7 @@ import { getIntl} from 'umi'
align: 'center',
render: (text, record) => (
<EyePreview
type={AuthUrl('deliver.see', 'marketingAbility') ? 'link' : 'button'}
url={`${target}?id=${record.id}`}
>
{text}
......@@ -63,7 +64,7 @@ import { getIntl} from 'umi'
title: intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd' }),
dataIndex: 'effectiveTimeEnd',
align: 'center',
render: (text, record) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : `${intl.formatMessage({ id: 'merchantCoupon.receive' })+ record.invalidDay + intl.formatMessage({ id: 'merchantCoupon.failureAfterDays' })}`,
render: (text, record) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : `${intl.formatMessage({ id: 'merchantCoupon.receive' }) + record.invalidDay + intl.formatMessage({ id: 'merchantCoupon.failureAfterDays' })}`,
},
{
title: intl.formatMessage({ id: 'merchantCoupon.getWayName' }),
......
......@@ -28,7 +28,7 @@ import {
} from '@/constants/marketing';
import verifySchema from '../common/schemas/verify';
import commonColumn from '../common/columns/coupon';
import { useIntl} from 'umi'
import { useIntl } from 'umi'
const formActions = createFormActions();
......@@ -82,27 +82,27 @@ const MerchantCouponAnalysis: React.FC = () => {
return res.data;
};
const baseColumns: ColumnType<GetMarketingCouponWaiteExecutePageResponseDetail>[] = commonColumn('/memberCenter/marketingAbility/merchantCoupon/analysis/detail');
const baseColumns: ColumnType<GetMarketingCouponWaiteExecutePageResponseDetail>[] = commonColumn('/memberCenter/marketingAbility/merchantCoupon/analysis/detail');
baseColumns.pop();
const defaultColumns = baseColumns.concat([
{
title: `${intl.formatMessage({ id: 'merchantCoupon.Havereceived'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.Havereceived' })}`,
dataIndex: 'obtainQuantity',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.Used'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.Used' })}`,
dataIndex: 'useQuantity',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.expired'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.expired' })}`,
dataIndex: 'dueQuantity',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.innerState'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.innerState' })}`,
dataIndex: 'statusName',
},
{
title: `${intl.formatMessage({ id: 'merchantCoupon.operation'})}`,
title: `${intl.formatMessage({ id: 'merchantCoupon.operation' })}`,
dataIndex: 'option',
align: 'center',
render: (_, record) => (
......@@ -111,7 +111,7 @@ const MerchantCouponAnalysis: React.FC = () => {
<Button
type="link"
onClick={() => history.push(`/memberCenter/marketingAbility/merchantCoupon/analysis/deliver?id=${record.id}`)}
>{ intl.formatMessage({ id: 'merchantCoupon.Shuttlecoupon'}) }</Button>
>{intl.formatMessage({ id: 'merchantCoupon.Shuttlecoupon' })}</Button>
)}
</>
),
......
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