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';
.anchor-page {
&-header {
background: #FFFFFF;
&-main {
padding: 0 16px;
display: flex;
}
&-left {
flex: 1;
overflow: hidden;
}
&-right {
padding-top: 14px;
flex-shrink: 0;
margin-left: 12px;
}
&-heading {
padding: 14px 0 9px 0;
display: flex;
align-items: center;
&-title {
margin-bottom: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 18px;
line-height: 32px;
min-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-back {
margin-right: 12px;
font-size: 16px;
cursor: pointer;
&:hover {
color: @primary-color;
}
}
&-anchors {
display: flex;
align-items: center;
}
:global {
.ant-anchor {
background-color: #FFFFFF;
&-wrapper {
margin-left: 0;
}
&-link {
padding: 0 16px;
font-size: 14px;
font-weight: 400;
color: @text-color;
&-title {
padding: 16px 0;
border-bottom: 2px solid transparent;
}
&-active,
&:hover {
font-weight: 500;
color: @text-color;
.ant-anchor-link-title {
border-bottom: 2px solid @primary-color;
}
}
}
&-ink {
display: none;
}
}
}
}
&-content {
padding: 16px;
}
}
\ No newline at end of file
@import '~antd/es/style/themes/default.less';
.anchor-page {
&-header {
background: #FFFFFF;
&-main {
padding: 0 16px;
display: flex;
}
&-left {
flex: 1;
overflow: hidden;
}
&-right {
padding-top: 14px;
flex-shrink: 0;
margin-left: 12px;
}
&-heading {
padding: 14px 0 9px 0;
display: flex;
align-items: center;
&-title {
margin-bottom: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 18px;
line-height: 32px;
min-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-back {
margin-right: 12px;
font-size: 16px;
cursor: pointer;
&:hover {
color: @primary-color;
}
}
&-anchors {
display: flex;
align-items: center;
&:hover {
overflow-x: auto;
}
}
:global {
.ant-anchor {
background-color: #FFFFFF;
&-wrapper {
margin-left: 0;
}
&-link {
padding: 0 16px;
font-size: 14px;
font-weight: 400;
color: @text-color;
&-title {
padding: 16px 0;
border-bottom: 2px solid transparent;
}
&-active,
&:hover {
font-weight: 500;
color: @text-color;
.ant-anchor-link-title {
border-bottom: 2px solid @primary-color;
}
}
}
&-ink {
display: none;
}
}
}
}
&-content {
padding: 16px;
}
}
......@@ -78,12 +78,12 @@ const HeaderDropdown: React.FC = () => {
console.log(getLocale(), "locale")
if (locales) {
setLocale(locales as any, true);
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
}
setCurrentLangKey(getLocale())
}, [])
const setLang = (langItem: countryItem) => {
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
setLocale(langItem.key, true)
}
......
......@@ -9,7 +9,7 @@ export default {
'commodity.goods.columns.brand':'Brand',
'commodity.goods.columns.unit':'Unit',
'commodity.goods.columns.costPrice':'Into unit price',
'commodity.goods.columns.currency':'¥',
'commodity.goods.columns.currency':'$',
'commodity.goods.columns.batch':'Import batch',
'commodity.goods.columns.option':'Operation',
'commodity.goods.columns.option.button.1':'Modify',
......
......@@ -14,7 +14,6 @@ import { IButtonFilter, IFormFilter } from 'god/dist/src/standard-table/TableCon
import { getMemberRolePage, postMemberRoleDelete, postMemberRoleUpdatestatus } from '@/services/MemberV2Api';
import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import PopConfirmControl from '@/components/PopConfirmControl';
......@@ -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 (
<PageHeaderWrapper>
......
......@@ -12,6 +12,13 @@ import { getIntl } from 'umi';
const intl = getIntl();
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 16 },
labelAlign: "left"
}
const AddInfo = (props: any) => {
const { currentRef, basicsData } = props;
const refs = useRef({});
......@@ -141,7 +148,7 @@ const AddInfo = (props: any) => {
const tagList: any = [];
res.data.payPlanList.map((item, index) => {
tagList.push({
name: item.payWay == 1 ? intl.formatMessage({id: 'contract.zhangqi'}) : item.payWay == 2 ? intl.formatMessage({id: 'contract.yuejie'}) : intl.formatMessage({id: 'contract.xianjie'}),
name: item.payWay == 1 ? intl.formatMessage({ id: 'contract.zhangqi' }) : item.payWay == 2 ? intl.formatMessage({ id: 'contract.yuejie' }) : intl.formatMessage({ id: 'contract.xianjie' }),
payParam: item.payParam,
Index: index + 1,
payWay: item.payWay,
......@@ -161,6 +168,7 @@ const AddInfo = (props: any) => {
return (
<div className={style.revise_info}>
<Form
{...layout}
form={attrValueForm}
name="edit_infomation"
layout="horizontal"
......@@ -178,47 +186,45 @@ const AddInfo = (props: any) => {
}}>
<Form.Item
label={intl.formatMessage({id: 'contract.qingkuandanzhaiyao'})}
label={intl.formatMessage({ id: 'contract.qingkuandanzhaiyao' })}
labelAlign="left"
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
name="applyAbstract"
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruqingkuandanzhaiyao'}),
message: intl.formatMessage({ id: 'contract.qingshuruqingkuandanzhaiyao' }),
},
]}
>
<Input placeholder={intl.formatMessage({id: 'contract.qingshuruqingkuandanzhaiyao'})} />
<Input placeholder={intl.formatMessage({ id: 'contract.qingshuruqingkuandanzhaiyao' })} />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongbianhao'})}
label={intl.formatMessage({ id: 'contract.hetongbianhao' })}
labelAlign="left"
labelCol={{ span: 4 }}
name="contractNo"
wrapperCol={{ span: 18 }}
>
<Input placeholder={intl.formatMessage({id: 'contract.zuichang60gezifu30ge'})} disabled />
<Input placeholder={intl.formatMessage({ id: 'contract.zuichang60gezifu30ge' })} disabled />
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.shoukuanfang'}) }labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.shoukuanfang' })} labelAlign="left" >
<span>{basics.account}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.shoukuanzhanghao'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.shoukuanzhanghao' })} labelAlign="left" >
<span>{basics.payeeName}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.yinhangkahao'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.yinhangkahao' })} labelAlign="left" >
<span>{basics.bankAccount}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.kaihuhang'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.kaihuhang' })} labelAlign="left" >
<span>{basics.bankDeposit}</span>
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongfukuanjieduan'})}
label={intl.formatMessage({ id: 'contract.hetongfukuanjieduan' })}
labelAlign="left"
name="payPlanId"
initialValue={basics.payPlanId}
labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
>
<Select
onChange={(e) => onSelect(e)}
>
......@@ -229,36 +235,32 @@ const AddInfo = (props: any) => {
}
</Select>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.hetongfukuanbili'})}
<Form.Item label={intl.formatMessage({ id: 'contract.hetongfukuanbili' })}
labelAlign="left"
labelCol={{ span: 4 }}
name="payRatio"
wrapperCol={{ span: 18 }}
initialValue={basics.payRatio}
>
<Input addonAfter="%" />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.qingkuanjine'})}
label={intl.formatMessage({ id: 'contract.qingkuanjine' })}
name="applyAmount"
labelAlign="left"
initialValue={basics.applyAmount}
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruqingkuanjine'}),
message: intl.formatMessage({ id: 'contract.qingshuruqingkuanjine' }),
},
]}
>
<Input addonAfter={intl.formatMessage({id: 'contract.yuan'})} />
<Input addonAfter={intl.formatMessage({ id: 'contract.yuan' })} />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.yujifukuanshijian'})}
label={intl.formatMessage({ id: 'contract.yujifukuanshijian' })}
labelAlign="left"
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
name="expectPayTime"
>
<DatePicker
......@@ -272,7 +274,7 @@ const AddInfo = (props: any) => {
{
tag.length != 0 &&
<>
<Form.Item label={intl.formatMessage({id: 'contract.fukuanfangshi'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.fukuanfangshi' })} labelAlign="left" >
{
tag.map((item: any) => {
return (
......@@ -281,13 +283,13 @@ const AddInfo = (props: any) => {
})
}
</Form.Item>
<Form.Item label=" " labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} >
<Form.Item label=" " labelAlign="left"  >
{/* * payWay 1 账期  2 月结 3 现结 */}
<Input addonAfter={Index === 2 ? intl.formatMessage({id: 'contract.tian'}) : Index === 3 ? intl.formatMessage({id: 'contract.hao'}) : null} value={tag[Index - 1].name === intl.formatMessage({id: 'contract.xianjie'}) ? '' : tag[Index - 1].payParam} disabled={tag[Index - 1].name === intl.formatMessage({id: 'contract.xianjie'}) ? true : false} />
<Input addonAfter={Index === 2 ? intl.formatMessage({ id: 'contract.tian' }) : Index === 3 ? intl.formatMessage({ id: 'contract.hao' }) : null} value={tag[Index - 1].name === intl.formatMessage({ id: 'contract.xianjie' }) ? '' : tag[Index - 1].payParam} disabled={tag[Index - 1].name === intl.formatMessage({ id: 'contract.xianjie' }) ? true : false} />
</Form.Item>
</>
}
<Form.Item label={intl.formatMessage({id: 'contract.zhifufangshi'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.zhifufangshi' })} labelAlign="left" >
<div
style={{
display: 'flex',
......@@ -302,7 +304,7 @@ const AddInfo = (props: any) => {
// marginRight: 20,
}}
>
<Option value="2" key={2}>{intl.formatMessage({id: 'contract.xianxiazhifu'})}</Option>
<Option value="2" key={2}>{intl.formatMessage({ id: 'contract.xianxiazhifu' })}</Option>
</Select>
<Select
......@@ -312,7 +314,7 @@ const AddInfo = (props: any) => {
width: '290px'
}}
>
<Option value="5" key={5}>{intl.formatMessage({id: 'contract.xianxiazhifuxianshangqueren'})}</Option>
<Option value="5" key={5}>{intl.formatMessage({ id: 'contract.xianxiazhifuxianshangqueren' })}</Option>
</Select>
</div>
</Form.Item>
......@@ -322,28 +324,26 @@ const AddInfo = (props: any) => {
flex: 1,
}}>
<Form.Item
label={intl.formatMessage({id: 'contract.qingkuanbeizhu'})}
label={intl.formatMessage({ id: 'contract.qingkuanbeizhu' })}
labelAlign="left"
name="remark"
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruqingkuanbeizhu'}),
message: intl.formatMessage({ id: 'contract.qingshuruqingkuanbeizhu' }),
},
]}
>
<TextArea placeholder={intl.formatMessage({id: 'contract.zuichang160zifu80gehan'})} maxLength={160} style={{ height: 72 }} />
<TextArea placeholder={intl.formatMessage({ id: 'contract.zuichang160zifu80gehan' })} maxLength={160} style={{ height: 72 }} />
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.fapiaobianhaokaipiaori'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.fapiaobianhaokaipiaori' })} labelAlign="left" >
<span>{basics.number}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.danjushijian'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.danjushijian' })} labelAlign="left" >
<span>{basics.orderTime}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.neibuzhuangtai'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.neibuzhuangtai' })} labelAlign="left" >
<span>{basics.statusName}</span>
</Form.Item>
</div>
......
......@@ -66,13 +66,13 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<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>
),
dataIndex: 'orderAmount', align: 'center',
render: (text, record) =>
<div>
<div>{record.orderType == 2 ? `-${text}` : text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{record.orderType == 2 ? `-${text}` : text}</div>
</div>
},
......@@ -90,12 +90,12 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<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>
),
render: (text) =>
<div>
<div>{text ? text : 0}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div>
},
{
......@@ -103,12 +103,12 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<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>
),
render: (text, record) =>
<div>
<div>{text ? text : 0}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div>
},
{
......@@ -116,13 +116,13 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<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>
),
render: (_, item, index) =>
<Input
addonBefore="¥"
addonBefore={intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}
style={{
width: 130,
}}
......@@ -257,7 +257,7 @@ const table = (props: any) => {
align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div>
},
{
......@@ -266,7 +266,7 @@ const table = (props: any) => {
align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div>
},
]
......
......@@ -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