Commit 06bc9b88 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: 修改商家营销活动报名 审核不能全选的问题 fix: 获取顶域带端口问题修复 fix: 修改营销活动BUG
parents 7ca33ecc 9a2561b3
......@@ -116,7 +116,7 @@ export default {
'logistics.pinpai': '品牌',
'logistics.shuliangdanwei': '数量/单位',
'logistics.xiangshu': '箱数',
'logistics.zhongliangKG': '重量(KG',
'logistics.zhongliangKG': '重量(KG)',
'logistics.tijiM3': '体积(M3)',
'logistics.heji': '合计',
'logistics.qingxianbianjiyunfei': '请先编辑运费!',
......@@ -129,4 +129,47 @@ export default {
'logistics.zongtiji': '总体积',
'logistics.quedingyaotijiaoma': '确定要提交吗?',
'logistics.tijiao': '提交',
'logistics.queren': '确认',
'logistics.shangpinmingcheng': '商品名称',
'logistics.danwei': '单位',
'logistics.shuliang': '数量',
'logistics.qingshurutijiM3': '请输入体积 (M3)',
'logistics.qingshuruzhongliangKG': '请输入重量 (KG)',
'logistics.qingshurushuliang': '请输入数量',
'logistics.qingshuruxiangshu': '请输入箱数',
'logistics.fahuodanhao': '发货单号',
'logistics.duiyingcangku': '对应仓库',
'logistics.danjuleixing': '单据类型',
'logistics.danjuhao': '单据号',
'logistics.qingxianxuanzeyaocaozuode': '请先选择要操作的对应发货单号或对应订单号/售后单',
'logistics.qingxiantianjiashangpin': '请先添加商品',
'logistics.cidingdanidbucunzai': '此订单id不存在!',
'logistics.qingshurudanjuzhaiyao': '请输入单据摘要',
'logistics.qingxuanzeliufuwushang': '请选择流服务商',
'logistics.zhakandanhaoxiangqing': '查看单号详情',
'logistics.qingxuanzefahuodizhi': '请选择发货地址',
'logistics.duiyingdingdanhaoshouhou': '对应订单号/售后单',
'logistics.daitijiao': '待提交',
'logistics.daiqueren': '待确认',
'logistics.xuanzeshangpin': '选择商品',
'logistics.xuanzefahuodan': '选择发货单',
'logistics.zongxiangshuxiang': '总箱数(箱)',
'logistics.zongzhongliangKG': '总重量(KG)',
'logistics.zongtijiM3': '总体积(M3)',
'logistics.shangpinID': '商品ID',
'logistics.caozuoshijian': '操作时间',
'logistics.shenheyijian': '审核意见',
'logistics.tijiaowuliudan': '提交物流单',
'logistics.querenwuliudan': '确认物流单',
'logistics.caozuojuese': '操作角色',
'logistics.liuzhuanshunxuhao': '流转顺序号',
'logistics.dingdanbianhao': '订单编号',
'logistics.danjuxuanze': '单据选择',
'logistics.dingdan': '订单',
'logistics.huanhuoshenqingdantuihuo': '换货申请单(退货发货)',
'logistics.huanhuoshenqingdanhuanhuo': '换货申请单(换货发货)',
'logistics.tuihuoshenqingdan': '退货申请单',
'logistics.shengchantongzhidan': '生产通知单',
'logistics.danjushijianquanbu': '单据时间(全部)',
'logistics.shenqingdanhao': '申请单号',
}
......@@ -28,7 +28,7 @@ const ProgressLayout: React.FC<ProgressProps> = (props: any) => {
useEffect(() => {
if (!isEmpty(context)) {
console.log(context)
console.log(context, 10086)
setLogStatesStatus(context.externalLogStates ? LOGSTATESTYPE.EXTERNALSTATES : LOGSTATESTYPE.INTERIORSTATES)
setData(context)
}
......
......@@ -33,10 +33,12 @@ interface AddedFormLayoutProps {
title?: string,
/** 二次询价 */
two?: boolean,
/** 二次询价地址显示 */
isDefault?: boolean
}
const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
const { isEdit, id, fetchRequest, spam, title, two, shopId } = props;
const { isEdit, id, fetchRequest, spam, title, two, shopId, isDefault } = props;
const [form] = Form.useForm();
const [loading, setLoading] = useState<boolean>(false)
const [unsaved, setUnsaved] = useState<boolean>(false);
......@@ -314,7 +316,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
>
<BasicInfoLatyout getMemberInfo={getMemberInfo} memb={memberInfo} isEdit={spam || two} />
<InquiryProductLayout isEdit={two} form={form} getInquiryProduct={getInquiryProduct} member={memberInfo} setInquiryProduct={inquiryProduct} />
<TradeTermsLayout isEdit getFullAddress={getFullAddress} getContacts={getContacts} fullAddress={fullAddress} />
<TradeTermsLayout isEdit={isEdit} isDefault={isDefault} getFullAddress={getFullAddress} getContacts={getContacts} fullAddress={fullAddress} />
<AttachLayout enclosureUrls={enclosureUrls} getEnclosureUrls={getEnclosureUrls} removeEnclosureUrls={removeEnclosureUrls} />
</Form>
}
......
......@@ -25,10 +25,12 @@ interface TradeTermsLayoutProps {
fullAddress?: any,
/** 二次询价 */
isEdit?: boolean,
/** 二次询价地址显示 */
isDefault?: boolean
}
const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
const { getFullAddress, getContacts, fullAddress, isEdit } = props;
const { getFullAddress, getContacts, fullAddress, isEdit, isDefault } = props;
const [visible, setVisible] = useState<boolean>(false)
const [address, setaddress] = useState<any>({});
const [telCode, setTelCode] = useState<any>([]);
......@@ -105,9 +107,12 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
setaddress({
id: fullAddress.fullAddressId,
})
console.log(fullAddress)
}
}, [fullAddress])
console.log(isEdit, 10086)
return (
<Card
id="tradeTermsLayout"
......@@ -124,9 +129,8 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
</Form.Item>
<Form.Item label='交付地址' className={style.address_style}>
<AddressSelect
echo={isEdit}
extra={fullAddress.fullAddress}
value={address}
echo={isDefault}
value={isDefault ? fullAddress.fullAddress : address}
isDefaultAddress
addressType={1}
disabled={false}
......
......@@ -10,6 +10,7 @@ const RfqEnquiryOrder = (props: any) => {
<AddForm
id={id}
isEdit
isDefault
title={props.route.name}
fetchRequest={postTransactionInquiryListAdd}
two
......
......@@ -69,7 +69,7 @@ const WaitConfirmLogisticsBill = () => {
title: intl.formatMessage({ id: 'logistics.caozuo' }),
key: 'confirm',
dataIndex: 'confirm',
render: (text, data) => text && <Button type='link' onClick={() => history.push(`/memberCenter/logisticsAbility/logisticsBillManage/waitConfirmLogisticsBill/detail?id=${data.id}`)}>确认</Button>
render: (text, data) => text && <Button type='link' onClick={() => history.push(`/memberCenter/logisticsAbility/logisticsBillManage/waitConfirmLogisticsBill/detail?id=${data.id}`)}>{intl.formatMessage({ id: 'logistics.queren' })}</Button>
},
]
......
......@@ -37,7 +37,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '单据号',
placeholder: intl.formatMessage({ id: 'logistics.danjuhao' }),
align: 'flex-left',
},
},
......@@ -59,7 +59,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
memberName: {
type: 'string',
"x-component-props": {
placeholder: '会员名称',
placeholder: intl.formatMessage({ id: 'logistics.huiyuanmingcheng' }),
style: {
width: 160
}
......@@ -68,7 +68,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
orderThe: {
type: 'string',
"x-component-props": {
placeholder: '单据摘要',
placeholder: intl.formatMessage({ id: 'logistics.danjuzhaiyao' }),
style: {
width: 160
}
......@@ -78,7 +78,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间(全部)',
placeholder: intl.formatMessage({id: 'logistics.danjushijianquanbu'}),
}
},
submit: {
......@@ -87,7 +87,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
span: 1
},
"x-component-props": {
children: '查询'
children: intl.formatMessage({ id: 'logistics.chaxun' })
}
}
}
......@@ -101,7 +101,7 @@ export const otherSearchSchema: ISchema = {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '申请单号',
placeholder: intl.formatMessage({id: 'logistics.shenqingdanhao'}),
align: 'flex-left',
},
},
......@@ -123,7 +123,7 @@ export const otherSearchSchema: ISchema = {
memberName: {
type: 'string',
"x-component-props": {
placeholder: '会员名称',
placeholder: intl.formatMessage({ id: 'logistics.huiyuanmingcheng' }),
style: {
width: 160
}
......@@ -132,7 +132,7 @@ export const otherSearchSchema: ISchema = {
applyAbstract: {
type: 'string',
"x-component-props": {
placeholder: '单据摘要',
placeholder: intl.formatMessage({ id: 'logistics.danjuzhaiyao' }),
style: {
width: 160
}
......@@ -142,7 +142,7 @@ export const otherSearchSchema: ISchema = {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间(全部)',
placeholder: intl.formatMessage({id: 'logistics.danjushijianquanbu'}),
}
},
submit: {
......@@ -151,7 +151,7 @@ export const otherSearchSchema: ISchema = {
span: 1
},
"x-component-props": {
children: '查询'
children: intl.formatMessage({ id: 'logistics.chaxun' })
}
}
}
......@@ -176,7 +176,7 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
const [form] = Form.useForm();
const [type, setType] = useState<number>(1);
const [modalTitle, setmodalTitle] = useState<string>('订单');
const [modalTitle, setmodalTitle] = useState<string>(intl.formatMessage({id: 'logistics.dingdan'}));
useEffect(() => {
console.log(relevanceType)
......@@ -283,13 +283,13 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}>
<Col span={18} style={{ zIndex: 99 }}>
<Form form={form}>
<Form.Item name='radio' label='单据选择'>
<Form.Item name='radio' label={intl.formatMessage({id: 'logistics.danjuxuanze'})}>
<Radio.Group onChange={(e) => { setType(e.target.value); selfRef.current.reload(); }}>
<Radio value={1}>订单</Radio>
<Radio value={2}>换货申请单(退货发货)</Radio>
<Radio value={3}>换货申请单(换货发货)</Radio>
<Radio value={4}>退货申请单</Radio>
<Radio value={5}>生产通知单</Radio>
<Radio value={1}>{intl.formatMessage({id: 'logistics.dingdan'})}</Radio>
<Radio value={2}>{intl.formatMessage({id: 'logistics.huanhuoshenqingdantuihuo'})}</Radio>
<Radio value={3}>{intl.formatMessage({id: 'logistics.huanhuoshenqingdanhuanhuo'})}</Radio>
<Radio value={4}>{intl.formatMessage({id: 'logistics.tuihuoshenqingdan'})}</Radio>
<Radio value={5}>{intl.formatMessage({id: 'logistics.shengchantongzhidan'})}</Radio>
</Radio.Group>
</Form.Item>
</Form>
......
......@@ -4,22 +4,22 @@ import { getIntl } from 'umi';
const intl = getIntl();
export const SelectGoodsColumns: ColumnType<any>[] = [
{
title: '商品ID',
title: intl.formatMessage({ id: 'logistics.shangpinID' }),
key: 'productId',
dataIndex: 'productId',
},
{
title: '商品名称',
title: intl.formatMessage({ id: 'logistics.shangpinmingcheng' }),
key: 'productName',
dataIndex: 'productName',
},
{
title: '品类',
title: intl.formatMessage({ id: 'logistics.pinlei' }),
key: 'category',
dataIndex: 'category',
},
{
title: '品牌',
title: intl.formatMessage({ id: 'logistics.pinpai' }),
key: 'brand',
dataIndex: 'brand',
}
......@@ -27,27 +27,27 @@ export const SelectGoodsColumns: ColumnType<any>[] = [
export const AfterSalesSelectGoodsColumns: ColumnType<any>[] = [
{
title: '商品ID',
title: intl.formatMessage({ id: 'logistics.shangpinID' }),
key: 'productId',
dataIndex: 'productId',
},
{
title: '商品名称',
title: intl.formatMessage({ id: 'logistics.shangpinmingcheng' }),
key: 'productName',
dataIndex: 'productName',
},
{
title: '品类',
title: intl.formatMessage({ id: 'logistics.pinlei' }),
key: 'category',
dataIndex: 'category',
},
{
title: '订单编号',
title: intl.formatMessage({id: 'logistics.dingdanbianhao'}),
key: 'orderNo',
dataIndex: 'orderNo',
},
{
title: '品牌',
title: intl.formatMessage({ id: 'logistics.pinpai' }),
key: 'brand',
dataIndex: 'brand',
}
......@@ -55,26 +55,26 @@ export const AfterSalesSelectGoodsColumns: ColumnType<any>[] = [
export const ExternalListColumns: ColumnType<any>[] = [
{
title: '流转顺序号',
title: intl.formatMessage({id: 'logistics.liuzhuanshunxuhao'}),
key: 'number',
dataIndex: 'number',
render:(text:any, record:any, index:number) => {return index + 1;}
render: (text: any, record: any, index: number) => { return index + 1; }
},
{
title: '操作角色',
title: intl.formatMessage({id: 'logistics.caozuojuese'}),
key: 'operatorRoleName',
dataIndex: 'operatorRoleName',
},
{
title: '状态',
title: intl.formatMessage({ id: 'logistics.zhuangtai' }),
key: 'status',
dataIndex: 'status',
render:(text:any, record:any, index:number) => {
render: (text: any, record: any, index: number) => {
return (
text === 1 ? '待提交':
text === 2 ? '待确认':
text === 3 ? '不接收物流单':
'接收物流单'
text === 1 ? intl.formatMessage({ id: 'logistics.daitijiao' }) :
text === 2 ? intl.formatMessage({ id: 'logistics.daiqueren' }) :
text === 3 ? intl.formatMessage({ id: 'logistics.bujieshouwuliudan' }) :
intl.formatMessage({ id: 'logistics.jieshouwuliudan' })
)
}
},
......@@ -82,24 +82,24 @@ export const ExternalListColumns: ColumnType<any>[] = [
title: intl.formatMessage({ id: 'logistics.caozuo' }),
key: 'type',
dataIndex: 'type',
render:(text:any, record:any, index:number) => {
render: (text: any, record: any, index: number) => {
return (
text === 1 ? '提交物流单':'确认物流单'
text === 1 ? intl.formatMessage({ id: 'logistics.tijiaowuliudan' }) : intl.formatMessage({ id: 'logistics.querenwuliudan' })
)
}
},
{
title: '操作时间',
title: intl.formatMessage({ id: 'logistics.caozuoshijian' }),
key: 'operateTime',
dataIndex: 'operateTime',
render:(text:any, record:any) => {
return(
render: (text: any, record: any) => {
return (
moment(text).format('YYYY-MM-DD HH:mm:ss')
)
}
},
{
title: '审核意见',
title: intl.formatMessage({ id: 'logistics.shenheyijian' }),
key: 'remark',
dataIndex: 'remark',
}
......
......@@ -13,11 +13,11 @@ import FreightLayout from '@/pages/transaction/components/detailLayout/component
import { getLogisticsOrderWaitSubmitGet } from '@/services/LogisticsV2Api';
const intl = getIntl();
const TABLINK = [
{ id: 'progressLayout', title: '流转进度' },
{ id: 'basicLayout', title: '基本信息' },
{ id: 'logisticsBillLayout', title: '物流单明细' },
{ id: 'freightLayout', title: '运费' },
{ id: 'recordLyout', title: '流转记录' },
{ id: 'progressLayout', title: intl.formatMessage({id: 'logistics.liuzhuanjindu'}) },
{ id: 'basicLayout', title: intl.formatMessage({id: 'logistics.jibenxinxi'}) },
{ id: 'logisticsBillLayout', title: intl.formatMessage({id: 'logistics.wuliudanmingxi'})},
{ id: 'freightLayout', title: intl.formatMessage({id: 'logistics.yunfei'})},
{ id: 'recordLyout', title: intl.formatMessage({id: 'logistics.liuzhuanjilu'}) },
]
const LogisticsBillSubmitDetail = () => {
......@@ -39,22 +39,22 @@ const LogisticsBillSubmitDetail = () => {
{
col: [
{ label: intl.formatMessage({ id: 'logistics.wuliudanhao' }), extra: data.logisticsOrderNo },
{ label: '单据摘要', extra: data.digest },
{ label: intl.formatMessage({ id: 'logistics.danjuzhaiyao' }), extra: data.digest },
{ label: intl.formatMessage({ id: 'logistics.wuliufuwushang' }), extra: data.companyName },
{ label: intl.formatMessage({ id: 'logistics.waibuzhuangtai' }), extra: data.statusName },
]
},
{
col: [
{ label: '对应发货单号', extra: data.shipmentOrderCode },
{ label: '对应订单/售后单', extra: data.relevanceOrderCode },
{ label: '发货地址', extra: data.shipperFullAddress },
{ label: intl.formatMessage({id: 'logistics.duiyingfahuodanhao'}), extra: data.shipmentOrderCode },
{ label: intl.formatMessage({id: 'logistics.duiyingdingdanshouhoudan'}), extra: data.relevanceOrderCode },
{ label: intl.formatMessage({id: 'logistics.fahuodizhi'}), extra: data.shipperFullAddress },
]
},
{
col: [
{ label: intl.formatMessage({ id: 'logistics.shouhuofang' }), extra: data.receiverName },
{ label: '收货地址', extra: data.receiverFullAddress },
{ label: intl.formatMessage({id: 'logistics.shouhuodizhi'}), extra: data.receiverFullAddress },
{ label: intl.formatMessage({ id: 'logistics.danjushijian' }), extra: format(data.invoicesTime) },
]
},
......@@ -65,9 +65,9 @@ const LogisticsBillSubmitDetail = () => {
setFreightEffect([
{
col: [
{ label: '含税/税率', extra: `${data.taxInclusive}/${data.taxRate}` },
{ label: '运费', extra: `¥${data.freightPrice && data.freightPrice.toFixed(2)}` },
{ label: '结算方式', extra: data.settlementWay },
{ label: intl.formatMessage({ id: 'logistics.hanshuishuil' }), extra: `${data.taxInclusive}/${data.taxRate}` },
{ label: intl.formatMessage({ id: 'logistics.yunfei' }), extra: `¥${data.freightPrice && data.freightPrice.toFixed(2)}` },
{ label: intl.formatMessage({ id: 'logistics.jiesuanfangshi' }), extra: data.settlementWay },
]
},
])
......@@ -75,7 +75,7 @@ const LogisticsBillSubmitDetail = () => {
const columns: ColumnType<any>[] = [
{
title: '商品ID/名称',
title: intl.formatMessage({ id: 'logistics.shangpinIDmingcheng' }),
key: 'productId',
dataIndex: 'productId',
render: (text: any, record: any) => (
......@@ -86,33 +86,33 @@ const LogisticsBillSubmitDetail = () => {
)
},
{
title: '品类',
title: intl.formatMessage({ id: 'logistics.pinlei' }),
key: 'categoryName',
dataIndex: 'categoryName',
},
{
title: '品牌',
title: intl.formatMessage({ id: 'logistics.pinpai' }),
key: 'brandName',
dataIndex: 'brandName',
},
{
title: '数量/单位',
title: intl.formatMessage({ id: 'logistics.shuliangdanwei' }),
key: 'amount',
dataIndex: 'amount',
render: (text: any, record: any) => <Typography.Text>{`${text}/${record.unitName}`}</Typography.Text>
},
{
title: <>箱数<br />合计:{dataSource.totalCarton}</>,
title: <>{intl.formatMessage({ id: 'logistics.xiangshu' })}<br />{intl.formatMessage({ id: 'logistics.heji' })}:{dataSource.totalCarton}</>,
key: 'carton',
dataIndex: 'carton',
},
{
title: <>重量(KG)<br />合计:{dataSource.totalWeight}</>,
title: <>{intl.formatMessage({ id: 'logistics.zhongliangKG' })}<br />{intl.formatMessage({ id: 'logistics.heji' })}:{dataSource.totalWeight}</>,
key: 'weight',
dataIndex: 'weight',
},
{
title: <>体积(M3)<br />合计:{dataSource.totalVolume}</>,
title: <>{intl.formatMessage({ id: 'logistics.tijiM3' })}<br />{intl.formatMessage({ id: 'logistics.heji' })}:{dataSource.totalVolume}</>,
key: 'volume',
dataIndex: 'volume',
},
......@@ -171,13 +171,13 @@ const LogisticsBillSubmitDetail = () => {
<ProgressLayout />
<BasicLayout effect={basicEffect} />
<ListLayout
title="物流单明细"
title={intl.formatMessage({id: 'logistics.wuliudanmingxi'})}
anchor="logisticsBillLayout"
columns={columns}
done={true}
data={dataSource.detailList}
/>
<FreightLayout anchor="freightLayout" title="运费" effect={freightEffect} />
<FreightLayout anchor="freightLayout" title={intl.formatMessage({id: 'logistics.yunfei'})} effect={freightEffect} />
<RecordLyout />
</Fragment>
}
......
......@@ -87,7 +87,7 @@ export const LOGISTICSBILLQUERYSCHEMA: ISchema = {
type: 'string',
"x-component": "DateRangePickerUnix",
"x-component-props": {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({ id: 'logistics.kaishishijian' }),intl.formatMessage({ id: 'logistics.jieshushijian' })],
}
},
}
......@@ -98,7 +98,7 @@ export const LOGISTICSBILLQUERYSCHEMA: ISchema = {
span: 1
},
'x-component-props': {
children: '查询'
children: intl.formatMessage({ id: 'logistics.chaxun' })
}
}
}
......@@ -126,7 +126,7 @@ export const WAITSBUMITLOGISTICSBILLSCHEMA: ISchema = {
"x-component": "Search",
"x-mega-props": {},
"x-component-props": {
placeholder: "物流单号"
placeholder: intl.formatMessage({ id: 'logistics.wuliudanhao' })
}
}
}
......@@ -156,7 +156,7 @@ export const WAITSBUMITLOGISTICSBILLSCHEMA: ISchema = {
relevanceOrderCode: {
type: "string",
"x-component-props": {
placeholder: "对应订单号"
placeholder: intl.formatMessage({ id: 'logistics.duiyingdingdanhao' })
}
},
companyId: {
......@@ -185,7 +185,7 @@ export const WAITSBUMITLOGISTICSBILLSCHEMA: ISchema = {
type: 'string',
"x-component": "DateRangePickerUnix",
"x-component-props": {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({ id: 'logistics.kaishishijian' }),intl.formatMessage({ id: 'logistics.jieshushijian' })],
}
},
}
......@@ -196,7 +196,7 @@ export const WAITSBUMITLOGISTICSBILLSCHEMA: ISchema = {
span: 1
},
"x-component-props": {
children: "查询"
children: intl.formatMessage({ id: 'logistics.chaxun' })
}
}
}
......
......@@ -3,6 +3,7 @@ import { Space, Tooltip, Typography } from 'antd';
import StatusTag from '@/components/StatusTag';
import { format } from '@/pages/transaction/common/dateFormat';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { isEmpty } from 'lodash';
/** * 活动类型 */
export enum ACTIVITYTYPE {
/** 特价促销 */
......@@ -191,7 +192,7 @@ export const GeneralEffect = (int, data) => {
col: [
{
label: '优惠规则', extra: <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`满 ${item.discount} 件, 打 ${item.num / 10} 折`}</div>))}
{!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${item.num} 件, 打 ${item.discount / 10} 折`}</div>))}
</Space>
},
{
......
......@@ -96,7 +96,7 @@ const ActivityUserLayout: React.FC<ActivityUserLayoutProps> = (props: any) => {
<Col span={6}>
<div className={style.cell}>
<h5 className={style.label}>会员角色: </h5>
<h5 className={style.content}>{item.roleTypeName}</h5>
<h5 className={style.content}>{item.roleName}</h5>
</div>
</Col>
<Col span={6}>
......
......@@ -153,11 +153,12 @@ const ReadySubmitExamine = () => {
<TableLayout
reload={ref}
selectedRow
fetchRowkeys={(e) => setRowKeys(e)}
fetchRowkeys={(e) => { setRowKeys(e); console.log(e)}}
getCheckboxProps={getCheckboxProps}
columns={columns}
effects="id"
rowKey="activityId"
activeKey='id'
// rowKey="activityId"
fetch={getMarketingPlatformActivitySignupPageTobeSubmit}
controllerBtns={controllerBtns}
schema={{
......
......@@ -84,7 +84,7 @@ const DetialLayout = () => {
let interiorLogStates: any = [];
let externalLogs: any = [];
let interiorLogs: any = [];
data.outerTaskList.forEach((item: any) => {
(data.outerTaskList || []).forEach((item: any) => {
externalLogStates.push({
state: item.step,
stateName: null,
......@@ -92,9 +92,9 @@ const DetialLayout = () => {
operationalProcess: item.taskName,
roleName: item.roleName,
})
data.externalLogStates = externalLogStates;
})
data.innerTaskList.forEach((item: any) => {
data.externalLogStates = externalLogStates;
(data.innerTaskList || []).forEach((item: any) => {
interiorLogStates.push({
state: item.step,
stateName: null,
......@@ -102,9 +102,9 @@ const DetialLayout = () => {
operationalProcess: item.taskName,
roleName: item.roleName,
})
data.interiorLogStates = interiorLogStates;
})
data.outerRecordDOList.forEach((item: any, index: number) => {
data.interiorLogStates = interiorLogStates;
(data.outerRecordDOList || []).forEach((item: any, index: number) => {
externalLogs.push({
operation: item.operate,
createTime: item.operateTime,
......@@ -115,9 +115,9 @@ const DetialLayout = () => {
state: item.status,
step: index,
})
data.externalLogs = externalLogs;
})
data.innerRecordDOList.forEach((item: any, index: number) => {
data.externalLogs = externalLogs;
(data.innerRecordDOList || []).forEach((item: any, index: number) => {
interiorLogs.push({
auditOpinion: item.opinion,
createMemberId: item.memberId,
......@@ -135,8 +135,8 @@ const DetialLayout = () => {
state: item.step,
step: item.step,
})
data.interiorLogs = interiorLogs;
})
data.interiorLogs = interiorLogs;
setAllusers([
{
title: '适用用户',
......
......@@ -241,7 +241,6 @@ const AddedMarketing = () => {
})
}, [])
return (
<Fragment>
<PeripheralLayout
......
......@@ -7,7 +7,7 @@ import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
import moment from 'moment';
import style from './index.less';
import CardLayout from '../card';
import { OVERLAYACTIVITYTYPE, OVERRUNRULETYPE, PROMOTIONTYPE, LADDERBOLIST } from '../../constants';
import { OVERLAYACTIVITYTYPE, PROMOTIONTYPE, LADDERBOLIST } from '../../constants';
interface RulesLayoutProps {
/** umi-hooks */
......@@ -29,6 +29,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const { focus$, form } = props;
const [option, setOption] = useState<optionProps>();
const [ladderType, setLadderType] = useState<number>(1);
const [rejec, setRejec] = useState<any>({});
const handleActivityDefinedBO = (e) => {
const { value } = e.target
......@@ -40,6 +41,17 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
form.resetFields(['activityDefined']);
});
const rejection = (key: string, num: number) => {
console.log(num, 10086)
const data = {...rejec};
if (data[key] === num) {
data[key] = null
} else {
data[key] = num
}
setRejec({...data})
}
/** 叠加活动类型 */
const allowActivity = (int = 1) => {
switch (int) {
......@@ -61,9 +73,21 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
className={style.rulesLayout}
>
<Checkbox.Group>
{OVERLAYACTIVITYTYPE(int)?.map(item => (
<Checkbox key={item.value} value={item.value}>{item.label}</Checkbox>
))}
{!isEmpty(OVERLAYACTIVITYTYPE(int).A) && (
OVERLAYACTIVITYTYPE(int).A.map(item => (
<Checkbox key={item.value} value={item.value} disabled={ rejec?.A && item.value !== rejec?.A} onChange={(value) => rejection('A', item.value) }>{item.label}</Checkbox>
))
)}
{!isEmpty(OVERLAYACTIVITYTYPE(int).B) && (
OVERLAYACTIVITYTYPE(int).B.map(item => (
<Checkbox key={item.value} value={item.value} disabled={rejec?.B && item.value !== rejec?.B} onChange={(value) => rejection('B', item.value) }>{item.label}</Checkbox>
))
)}
{!isEmpty(OVERLAYACTIVITYTYPE(int).C) && (
OVERLAYACTIVITYTYPE(int).C.map(item => (
<Checkbox key={item.value} value={item.value}>{item.label}</Checkbox>
))
)}
</Checkbox.Group>
</Form.Item>
)
......@@ -501,7 +525,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
name={['activityDefined', 'assembleNum']}
rules={[{
required: true, validator: (_rule, value) => {
const pattern = /^-?[0-2][1-9]\d*$/;
const pattern = /^\+?[1-9]\d*$/;
if (!value) {
return Promise.reject(new Error('请输入成团人数'));
}
......@@ -542,7 +566,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
initialValue={24}
rules={[{
required: true, validator: (_rule, value) => {
const pattern = /^(0?\.[1-9]|1\d|2[0-3])(\.\d{1,1})?$/;
const pattern = /^(0?\.[1-9]|1\d|2[0-4])(\.\d{1,1})?$/;
if (!value) {
return Promise.reject(new Error('请输入成团时间'));
}
......
/**
* 活动类型
*/
type activityType = {
type activityType = {
lable: string,
value: number,
}[]
......@@ -29,49 +29,75 @@ export const OVERLAYACTIVITYTYPE = (int) => {
case 1:
case 2:
case 3:
return [
{ label: '满量促销', value: 4 },
{ label: '满额促销', value: 5 },
{ label: '赠送促销', value: 6 },
{ label: '换购', value: 13 },
]
return {
B: [
{ label: '满量促销', value: 4 },
{ label: '满额促销', value: 5 },
],
C: [
{ label: '赠送促销', value: 6 },
{ label: '换购', value: 13 },
]
}
case 4:
case 5:
return [
{ label: '特价促销', value: 1 },
{ label: '直降促销', value: 2 },
{ label: '折扣促销', value: 3 },
{ label: '赠送促销', value: 6 },
{ label: '换购', value:13 },
]
return {
A: [
{ label: '特价促销', value: 1 },
{ label: '直降促销', value: 2 },
{ label: '折扣促销', value: 3 },
],
B: [
{ label: '赠送促销', value: 6 },
],
C: [
{ label: '换购', value: 13 },
],
}
case 6:
return [
{ label: '特价促销', value: 1 },
{ label: '直降促销', value: 2 },
{ label: '折扣促销', value: 3 },
{ label: '满量促销', value: 4 },
{ label: '满额促销', value: 5 },
{ label: '多件促销', value: 7 },
{ label: '组合促销', value: 8 },
{ label: '换购', value: 13 },
]
return {
A: [
{ label: '特价促销', value: 1 },
{ label: '直降促销', value: 2 },
{ label: '折扣促销', value: 3 },
],
B: [
{ label: '满量促销', value: 4 },
{ label: '满额促销', value: 5 },
],
C: [
{ label: '多件促销', value: 7 },
{ label: '组合促销', value: 8 },
{ label: '换购', value: 13 },
],
}
case 7:
case 8:
return [
{ label: '赠送促销', value: 6 },
{ label: '换购', value: 13 },
]
return {
B: [
{ label: '赠送促销', value: 6 },
],
C: [
{ label: '换购', value: 13 },
]
}
case 13:
return [
{ label: '特价促销', value: 1 },
{ label: '直降促销', value: 2 },
{ label: '折扣促销', value: 3 },
{ label: '满量促销', value: 4 },
{ label: '满额促销', value: 5 },
{ label: '多件促销', value: 6 },
{ label: '组合促销', value: 7 },
{ label: '换购', value: 8 },
]
return {
A: [
{ label: '特价促销', value: 1 },
{ label: '直降促销', value: 2 },
{ label: '折扣促销', value: 3 },
],
B: [
{ label: '满量促销', value: 4 },
{ label: '满额促销', value: 5 },
],
C: [
{ label: '多件促销', value: 6 },
{ label: '组合促销', value: 7 },
{ label: '换购', value: 8 },
],
}
}
}
/** 超限规则 */
......@@ -136,23 +162,23 @@ export const PROMOTIONTYPE = (int) => {
}
}
/** 满量/额减 */
export const LADDERBOLIST = (int, type=1) => {
export const LADDERBOLIST = (int, type = 1) => {
switch (Number(int)) {
case 4:
return {
tooltip: type === 1 ? '优惠金额为最后订单总额减去的优惠金额' : '折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90',
label: `满量${type ===1 ? '减' : '折'}`,
message: `请新增满量${type ===1 ? '减' : '折'}`,
addon: '数量' ,
label: `满量${type === 1 ? '减' : '折'}`,
message: `请新增满量${type === 1 ? '减' : '折'}`,
addon: '数量',
addonAfter: type === 1 ? '减' : '打',
addonBefore: type === 1 ? '元' : '折',
}
case 5:
return {
tooltip: type === 1 ? '优惠金额为最后订单总额减去的优惠金额' : '折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90',
label: `满额${type ===1 ? '减' : '折'}`,
message: `请新增满额${type ===1 ? '减' : '折'}`,
addon: '元' ,
label: `满额${type === 1 ? '减' : '折'}`,
message: `请新增满额${type === 1 ? '减' : '折'}`,
addon: '元',
addonAfter: type === 1 ? '减' : '打',
addonBefore: type === 1 ? '元' : '折',
}
......
import { isDev, TOP_DOMAIN } from '@/constants'
import { TOP_DOMAIN_NO_PORT, TOP_DOMAIN } from '@/constants'
import { GetMemberLoginRegetResponse } from '@/services/MemberV2Api'
import { getTopDomainByHost } from '.'
import { getCookie, removeCookie, setCookie } from './cookie'
......@@ -33,8 +33,8 @@ export const setAuth = (info: AuthInfo) => {
memberRoleId: info.memberRoleId,
memberType: info.memberType,
}
setCookie(AUTH_KEY, JSON.stringify(auth), { domain: TOP_DOMAIN})
setCookie(AUTH_ROLES_KEY, JSON.stringify(info.roles), { domain: TOP_DOMAIN })
setCookie(AUTH_KEY, JSON.stringify(auth), { domain: TOP_DOMAIN_NO_PORT})
setCookie(AUTH_ROLES_KEY, JSON.stringify(info.roles), { domain: TOP_DOMAIN_NO_PORT })
setLocalAuth(info)
setRouters(info.urls)
}
......@@ -96,8 +96,8 @@ export const removeRouters = () => {
}
export const removeAuth = () => {
removeCookie(AUTH_KEY, { path: '/', domain: getTopDomainByHost(TOP_DOMAIN, true) })
removeCookie(AUTH_ROLES_KEY, { path: '/', domain: getTopDomainByHost(TOP_DOMAIN, true) })
removeCookie(AUTH_KEY, { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
removeCookie(AUTH_ROLES_KEY, { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
window.localStorage.removeItem(AUTH_KEY)
removeRouters()
const _window: any = window
......
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