Commit dc8b63c8 authored by 卢均锐's avatar 卢均锐

Merge branch 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into v2

* 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform: feat:营销能力-商家优惠劵管理-商家优惠劵执行按钮权限 fix: 修改翻译
parents c5ee8e7f 1180ad68
@import '~antd/es/style/themes/default.less'; @import '~antd/es/style/themes/default.less';
.anchor-page { .anchor-page {
&-header { &-header {
background: #FFFFFF; background: #FFFFFF;
&-main { &-main {
padding: 0 16px; padding: 0 16px;
display: flex; display: flex;
} }
&-left { &-left {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
} }
&-right { &-right {
padding-top: 14px; padding-top: 14px;
flex-shrink: 0; flex-shrink: 0;
margin-left: 12px; margin-left: 12px;
} }
&-heading { &-heading {
padding: 14px 0 9px 0; padding: 14px 0 9px 0;
display: flex; display: flex;
align-items: center; align-items: center;
&-title { &-title {
margin-bottom: 0; margin-bottom: 0;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
line-height: 32px; line-height: 32px;
min-height: 32px; min-height: 32px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
&-back { &-back {
margin-right: 12px; margin-right: 12px;
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
color: @primary-color; color: @primary-color;
} }
} }
&-anchors { &-anchors {
display: flex; display: flex;
align-items: center; align-items: center;
}
&:hover {
:global { overflow-x: auto;
.ant-anchor { }
background-color: #FFFFFF; }
&-wrapper { :global {
margin-left: 0; .ant-anchor {
} background-color: #FFFFFF;
&-link { &-wrapper {
padding: 0 16px; margin-left: 0;
font-size: 14px; }
font-weight: 400;
color: @text-color; &-link {
padding: 0 16px;
&-title { font-size: 14px;
padding: 16px 0; font-weight: 400;
border-bottom: 2px solid transparent; color: @text-color;
}
&-title {
&-active, padding: 16px 0;
&:hover { border-bottom: 2px solid transparent;
font-weight: 500; }
color: @text-color;
&-active,
.ant-anchor-link-title { &:hover {
border-bottom: 2px solid @primary-color; font-weight: 500;
} color: @text-color;
}
} .ant-anchor-link-title {
border-bottom: 2px solid @primary-color;
&-ink { }
display: none; }
} }
}
} &-ink {
} display: none;
}
&-content { }
padding: 16px; }
} }
}
\ No newline at end of file &-content {
padding: 16px;
}
}
...@@ -78,12 +78,12 @@ const HeaderDropdown: React.FC = () => { ...@@ -78,12 +78,12 @@ const HeaderDropdown: React.FC = () => {
console.log(getLocale(), "locale") console.log(getLocale(), "locale")
if (locales) { if (locales) {
setLocale(locales as any, true); setLocale(locales as any, true);
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
} }
setCurrentLangKey(getLocale()) setCurrentLangKey(getLocale())
}, []) }, [])
const setLang = (langItem: countryItem) => { const setLang = (langItem: countryItem) => {
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
setLocale(langItem.key, true) setLocale(langItem.key, true)
} }
......
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
'commodity.goods.columns.brand':'Brand', 'commodity.goods.columns.brand':'Brand',
'commodity.goods.columns.unit':'Unit', 'commodity.goods.columns.unit':'Unit',
'commodity.goods.columns.costPrice':'Into unit price', 'commodity.goods.columns.costPrice':'Into unit price',
'commodity.goods.columns.currency':'¥', 'commodity.goods.columns.currency':'$',
'commodity.goods.columns.batch':'Import batch', 'commodity.goods.columns.batch':'Import batch',
'commodity.goods.columns.option':'Operation', 'commodity.goods.columns.option':'Operation',
'commodity.goods.columns.option.button.1':'Modify', 'commodity.goods.columns.option.button.1':'Modify',
......
...@@ -14,7 +14,6 @@ import { IButtonFilter, IFormFilter } from 'god/dist/src/standard-table/TableCon ...@@ -14,7 +14,6 @@ import { IButtonFilter, IFormFilter } from 'god/dist/src/standard-table/TableCon
import { getMemberRolePage, postMemberRoleDelete, postMemberRoleUpdatestatus } from '@/services/MemberV2Api'; import { getMemberRolePage, postMemberRoleDelete, postMemberRoleUpdatestatus } from '@/services/MemberV2Api';
import StatusSwitch from '@/components/StatusSwitch'; import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import PopConfirmControl from '@/components/PopConfirmControl'; import PopConfirmControl from '@/components/PopConfirmControl';
...@@ -94,6 +93,21 @@ const MemberSystem: React.FC<{}> = () => { ...@@ -94,6 +93,21 @@ const MemberSystem: React.FC<{}> = () => {
} }
]; ];
const STATUS_ENUM = [
{
label: intl.formatMessage({id: 'common.text.all'}),
value: null
},
{
label: intl.formatMessage({id: 'common.status.effective'}),
value: 1
},
{
label: intl.formatMessage({id: 'common.status.invalid'}),
value: 0
}
]
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
......
...@@ -66,13 +66,13 @@ const table = (props: any) => { ...@@ -66,13 +66,13 @@ const table = (props: any) => {
title: ( title: (
<Space direction='vertical'> <Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.danjujine'})}</Text> <Text>{intl.formatMessage({id: 'contract.danjujine'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {toorderAmount}</Text> <Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{toorderAmount}</Text>
</Space> </Space>
), ),
dataIndex: 'orderAmount', align: 'center', dataIndex: 'orderAmount', align: 'center',
render: (text, record) => render: (text, record) =>
<div> <div>
<div>{record.orderType == 2 ? `-${text}` : text}</div> <div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{record.orderType == 2 ? `-${text}` : text}</div>
</div> </div>
}, },
...@@ -90,12 +90,12 @@ const table = (props: any) => { ...@@ -90,12 +90,12 @@ const table = (props: any) => {
title: ( title: (
<Space direction='vertical'> <Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.yifukuan'})}</Text> <Text>{intl.formatMessage({id: 'contract.yifukuan'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {topayAmount}</Text> <Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{topayAmount}</Text>
</Space> </Space>
), ),
render: (text) => render: (text) =>
<div> <div>
<div>{text ? text : 0}</div> <div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div> </div>
}, },
{ {
...@@ -103,12 +103,12 @@ const table = (props: any) => { ...@@ -103,12 +103,12 @@ const table = (props: any) => {
title: ( title: (
<Space direction='vertical'> <Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.yiqingkuandaifukuan'})}</Text> <Text>{intl.formatMessage({id: 'contract.yiqingkuandaifukuan'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {tounPayApplyAmount}</Text> <Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{tounPayApplyAmount}</Text>
</Space> </Space>
), ),
render: (text, record) => render: (text, record) =>
<div> <div>
<div>{text ? text : 0}</div> <div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div> </div>
}, },
{ {
...@@ -116,13 +116,13 @@ const table = (props: any) => { ...@@ -116,13 +116,13 @@ const table = (props: any) => {
title: ( title: (
<Space direction='vertical'> <Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.qingkuanjine'})}</Text> <Text>{intl.formatMessage({id: 'contract.qingkuanjine'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {applyAmount}</Text> <Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{applyAmount}</Text>
</Space> </Space>
), ),
render: (_, item, index) => render: (_, item, index) =>
<Input <Input
addonBefore="¥" addonBefore={intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}
style={{ style={{
width: 130, width: 130,
}} }}
...@@ -257,7 +257,7 @@ const table = (props: any) => { ...@@ -257,7 +257,7 @@ const table = (props: any) => {
align: 'center', align: 'center',
render: (text, record) => render: (text, record) =>
<div> <div>
<div>{text}</div> <div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div> </div>
}, },
{ {
...@@ -266,7 +266,7 @@ const table = (props: any) => { ...@@ -266,7 +266,7 @@ const table = (props: any) => {
align: 'center', align: 'center',
render: (text, record) => render: (text, record) =>
<div> <div>
<div>{text}</div> <div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div> </div>
}, },
] ]
......
...@@ -9,16 +9,16 @@ import React from 'react'; ...@@ -9,16 +9,16 @@ import React from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import moment from 'moment'; import moment from 'moment';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { getIntl} from 'umi' import { getIntl } from 'umi'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
/** /**
* *
* @param target string 会员详情路径前缀 * @param target string 会员详情路径前缀
* @returns Table Columns * @returns Table Columns
*/ */
const intl = getIntl(); const intl = getIntl();
const columns = (target = '/memberCenter/marketingAbility/merchantCoupon/unsubmitted/detail'): ColumnType<any>[] => ([ const columns = (target = '/memberCenter/marketingAbility/merchantCoupon/unsubmitted/detail'): ColumnType<any>[] => ([
{ {
title: 'ID', title: 'ID',
dataIndex: 'id', dataIndex: 'id',
...@@ -30,6 +30,7 @@ import { getIntl} from 'umi' ...@@ -30,6 +30,7 @@ import { getIntl} from 'umi'
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<EyePreview <EyePreview
type={AuthUrl('deliver.see', 'marketingAbility') ? 'link' : 'button'}
url={`${target}?id=${record.id}`} url={`${target}?id=${record.id}`}
> >
{text} {text}
...@@ -63,7 +64,7 @@ import { getIntl} from 'umi' ...@@ -63,7 +64,7 @@ import { getIntl} from 'umi'
title: intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd' }), title: intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd' }),
dataIndex: 'effectiveTimeEnd', dataIndex: 'effectiveTimeEnd',
align: 'center', 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' }), title: intl.formatMessage({ id: 'merchantCoupon.getWayName' }),
......
...@@ -28,7 +28,7 @@ import { ...@@ -28,7 +28,7 @@ import {
} from '@/constants/marketing'; } from '@/constants/marketing';
import verifySchema from '../common/schemas/verify'; import verifySchema from '../common/schemas/verify';
import commonColumn from '../common/columns/coupon'; import commonColumn from '../common/columns/coupon';
import { useIntl} from 'umi' import { useIntl } from 'umi'
const formActions = createFormActions(); const formActions = createFormActions();
...@@ -82,27 +82,27 @@ const MerchantCouponAnalysis: React.FC = () => { ...@@ -82,27 +82,27 @@ const MerchantCouponAnalysis: React.FC = () => {
return res.data; 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(); baseColumns.pop();
const defaultColumns = baseColumns.concat([ const defaultColumns = baseColumns.concat([
{ {
title: `${intl.formatMessage({ id: 'merchantCoupon.Havereceived'})}`, title: `${intl.formatMessage({ id: 'merchantCoupon.Havereceived' })}`,
dataIndex: 'obtainQuantity', dataIndex: 'obtainQuantity',
}, },
{ {
title: `${intl.formatMessage({ id: 'merchantCoupon.Used'})}`, title: `${intl.formatMessage({ id: 'merchantCoupon.Used' })}`,
dataIndex: 'useQuantity', dataIndex: 'useQuantity',
}, },
{ {
title: `${intl.formatMessage({ id: 'merchantCoupon.expired'})}`, title: `${intl.formatMessage({ id: 'merchantCoupon.expired' })}`,
dataIndex: 'dueQuantity', dataIndex: 'dueQuantity',
}, },
{ {
title: `${intl.formatMessage({ id: 'merchantCoupon.innerState'})}`, title: `${intl.formatMessage({ id: 'merchantCoupon.innerState' })}`,
dataIndex: 'statusName', dataIndex: 'statusName',
}, },
{ {
title: `${intl.formatMessage({ id: 'merchantCoupon.operation'})}`, title: `${intl.formatMessage({ id: 'merchantCoupon.operation' })}`,
dataIndex: 'option', dataIndex: 'option',
align: 'center', align: 'center',
render: (_, record) => ( render: (_, record) => (
...@@ -111,7 +111,7 @@ const MerchantCouponAnalysis: React.FC = () => { ...@@ -111,7 +111,7 @@ const MerchantCouponAnalysis: React.FC = () => {
<Button <Button
type="link" type="link"
onClick={() => history.push(`/memberCenter/marketingAbility/merchantCoupon/analysis/deliver?id=${record.id}`)} 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