Commit 8a96f766 authored by GuanHua's avatar GuanHua
parents c3fa209f 2342bc4d
...@@ -183,14 +183,21 @@ const marketingRoutes = { ...@@ -183,14 +183,21 @@ const marketingRoutes = {
noLayout: true, noLayout: true,
hideInMenu: true, hideInMenu: true,
}, },
// { {
// /** 平台营销活动执行 - marketingExecute */ /** 平台营销活动执行 - marketingExecute */
// path: '/marketingManage/marketing/marketingExecute', path: '/marketingManage/marketing/marketingExecute',
// name: '平台营销活动执行', name: '平台营销活动执行',
// hidePageHeader: true, hidePageHeader: true,
// : true, component: '@/pages/marketingManage/marketing/marketingExecute',
// component: '@/pages/marketingManage/marketing/marketingExecute', },
// }, {
/** 平台营销活动执行详情 - marketingExecute */
path: '/marketingManage/marketing/marketingExecute/detail',
name: '平台营销活动执行详情',
hidePageHeader: true,
hideInMenu: true,
component: '@/pages/marketingManage/marketing/marketingExecute/detail',
},
// { // {
// /** 平台营销活动监控 - marketingMonitor */ // /** 平台营销活动监控 - marketingMonitor */
// path: '/marketingManage/marketing/marketingMonitor', // path: '/marketingManage/marketing/marketingMonitor',
......
...@@ -384,7 +384,31 @@ const router = { ...@@ -384,7 +384,31 @@ const router = {
hidePageHeader: true, hidePageHeader: true,
hideInMenu: true, hideInMenu: true,
component: '@/pages/systemManage/appVersion/add', component: '@/pages/systemManage/appVersion/add',
} },
{
// APP版本管理
path: '/system/appLink/index',
name: 'APP下载',
hidePageHeader: true,
// hideInMenu: true,
component: '@/pages/systemManage/appLink',
},
{
// APP版本管理
path: '/system/appLink/add',
name: '新增APP下载',
hidePageHeader: true,
hideInMenu: true,
component: '@/pages/systemManage/appLink/edit',
},
{
// APP版本管理
path: '/system/appLink/edit',
name: '编辑APP下载',
hidePageHeader: true,
hideInMenu: true,
component: '@/pages/systemManage/appLink/edit',
},
] ]
} }
export default router export default router
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"@linkseeks/design-core": "^1.0.0", "@linkseeks/design-core": "^1.0.0",
"@linkseeks/design-react": "^1.0.0", "@linkseeks/design-react": "^1.0.0",
"@linkseeks/design-react-web": "^1.0.0", "@linkseeks/design-react-web": "^1.0.0",
"@linkseeks/design-ui": "^1.0.2", "@linkseeks/design-ui": "^1.0.5",
"@linkseeks/design-utils": "^1.0.0", "@linkseeks/design-utils": "^1.0.0",
"@linkseeks/god": "^1.0.0", "@linkseeks/god": "^1.0.0",
"@types/crypto-js": "^4.0.1", "@types/crypto-js": "^4.0.1",
......
...@@ -75,7 +75,7 @@ const AnchorPage = (props: IProps) => { ...@@ -75,7 +75,7 @@ const AnchorPage = (props: IProps) => {
useEffect(() => { useEffect(() => {
const firstKey = anchors.length ? `#${anchors[0].key}` : ''; const firstKey = anchors.length ? `#${anchors[0].key}` : '';
if (firstKey && firstKey !== current) { if (firstKey && firstKey !== current) {
setCurrent(firstKey); mounted.current && setCurrent(firstKey);
} }
}, [anchors]); }, [anchors]);
......
...@@ -68,7 +68,7 @@ registerShape('point', 'pointer', { ...@@ -68,7 +68,7 @@ registerShape('point', 'pointer', {
attrs: { attrs: {
x: center.x, x: center.x,
y: center.y, y: center.y,
r: 6, r: 4,
stroke: cfg.color, stroke: cfg.color,
lineWidth: 3, lineWidth: 3,
fill: '#fff', fill: '#fff',
......
...@@ -6,12 +6,14 @@ import style from './index.less'; ...@@ -6,12 +6,14 @@ import style from './index.less';
export interface BasicInfoProps { export interface BasicInfoProps {
effect?: any, effect?: any,
/** 栅格 */
span?: number
} }
const count = 0; const count = 0;
const BasicLayout: React.FC<BasicInfoProps> = (props: any) => { const BasicLayout: React.FC<BasicInfoProps> = (props: any) => {
const { effect } = props; const { effect, span } = props;
return ( return (
<Card <Card
...@@ -20,7 +22,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => { ...@@ -20,7 +22,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => {
> >
<Row gutter={[8, 8]}> <Row gutter={[8, 8]}>
{effect.length > count && effect.map((item, index) => ( {effect.length > count && effect.map((item, index) => (
<Col key={`effect_${index + 1}`} span={8}> <Col key={`effect_${index + 1}`} span={span}>
{ item.col.map((it, idx) => ( { item.col.map((it, idx) => (
<div className={style.cell} key={`effect_col_${idx + 1}`}> <div className={style.cell} key={`effect_col_${idx + 1}`}>
<h5 className={style.label}>{it.label}: </h5> <h5 className={style.label}>{it.label}: </h5>
...@@ -33,5 +35,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => { ...@@ -33,5 +35,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => {
</Card> </Card>
) )
} }
BasicLayout.defaultProps = {
span: 8,
}
export default BasicLayout export default BasicLayout
...@@ -15,12 +15,14 @@ export interface GeneraInfoProps { ...@@ -15,12 +15,14 @@ export interface GeneraInfoProps {
extra?: ReactNode, extra?: ReactNode,
/** 是否开启没数据不显示字段 */ /** 是否开启没数据不显示字段 */
visible?: boolean, visible?: boolean,
/** 栅格 */
span?: number
} }
const count = 0; const count = 0;
const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => { const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => {
const { effect, anchor, title, extra, visible } = props; const { effect, anchor, title, extra, visible, span } = props;
return ( return (
<Card <Card
...@@ -30,7 +32,7 @@ const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => { ...@@ -30,7 +32,7 @@ const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => {
> >
<Row gutter={[8, 8]}> <Row gutter={[8, 8]}>
{effect.length > count && effect.map((item, index) => ( {effect.length > count && effect.map((item, index) => (
<Col key={`effect_${index + 1}`} span={8}> <Col key={`effect_${index + 1}`} span={span}>
{item.col.map((it, idx) => ( {item.col.map((it, idx) => (
<Fragment key={`effect_col_${idx + 1}`}> <Fragment key={`effect_col_${idx + 1}`}>
{visible ? <> {visible ? <>
...@@ -56,5 +58,7 @@ const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => { ...@@ -56,5 +58,7 @@ const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => {
</Card> </Card>
) )
} }
GeneralLayout.defaultProps = {
span: 8
}
export default GeneralLayout export default GeneralLayout
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @LastEditTime: 2020-09-22 18:04:44 * @LastEditTime: 2020-09-22 18:04:44
* @Description: 评价笑脸组件 * @Description: 评价笑脸组件
*/ */
import React from 'react'; import React, { CSSProperties } from 'react';
import { import {
SmileFilled, SmileFilled,
MehFilled, MehFilled,
...@@ -13,30 +13,40 @@ import { ...@@ -13,30 +13,40 @@ import {
} from '@ant-design/icons'; } from '@ant-design/icons';
interface MoodProps { interface MoodProps {
/**
* 类型
*/
type: 'smile' | 'notBad' | 'sad'; type: 'smile' | 'notBad' | 'sad';
/**
* 自定义外部样式
*/
customStyle?: CSSProperties,
}; };
const Mood: React.FC<MoodProps> = ({ type = 'smile' }) => { const Mood: React.FC<MoodProps> = ({ type = 'smile', customStyle = {} }) => {
let node = null; let node: any = null;
switch (type) { switch (type) {
case 'smile': case 'smile':
node = <><SmileFilled style={{ color: '#41CC9E', marginRight: 4 }} /></>; node = <><SmileFilled style={{ color: '#41CC9E', ...customStyle }} /></>;
break; break;
case 'notBad': case 'notBad':
node = <><MehFilled style={{ color: '#FFC400', marginRight: 4 }} /></>; node = <><MehFilled style={{ color: '#FFC400', ...customStyle }} /></>;
break; break;
case 'sad': case 'sad':
node = <><FrownFilled style={{ color: '#EF6260', marginRight: 4 }} /></>; node = <><FrownFilled style={{ color: '#EF6260', ...customStyle }} /></>;
break; break;
default: default:
break; break;
} }
return node; return node;
}; };
Mood.defaultProps = {
customStyle: {},
};
export default Mood; export default Mood;
\ No newline at end of file
...@@ -179,6 +179,7 @@ export interface IUploaderProps { ...@@ -179,6 +179,7 @@ export interface IUploaderProps {
value: any[] value: any[]
listType?: UploadListType listType?: UploadListType
readOnly?: boolean readOnly?: boolean
maxCount?: number
} }
export const Upload = connect({ export const Upload = connect({
...@@ -274,7 +275,7 @@ export const Upload = connect({ ...@@ -274,7 +275,7 @@ export const Upload = connect({
public render() { public render() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const { listType, locale, onChange, value = [], ...others } = this.props const { listType, locale, onChange, value = [], ...others } = this.props
if (listType.indexOf('card') > -1) { if (listType!.indexOf('card') > -1) {
return ( return (
<AntdUpload <AntdUpload
{...others} {...others}
...@@ -283,13 +284,13 @@ export const Upload = connect({ ...@@ -283,13 +284,13 @@ export const Upload = connect({
onRemove={this.onRemoveHandler} onRemove={this.onRemoveHandler}
listType={'picture-card'} listType={'picture-card'}
> >
{!others.readOnly ? ( {!others.readOnly && (others.maxCount !== undefined ? this.state.value.length < others.maxCount : true) ? (
<UploadPlaceholder /> <UploadPlaceholder />
) : null} ) : null}
</AntdUpload> </AntdUpload>
) )
} }
if (listType.indexOf('dragger') > -1) { if (listType!.indexOf('dragger') > -1) {
return ( return (
<UploadDragger <UploadDragger
{...others} {...others}
...@@ -297,7 +298,7 @@ export const Upload = connect({ ...@@ -297,7 +298,7 @@ export const Upload = connect({
onChange={this.onChangeHandler} onChange={this.onChangeHandler}
onRemove={this.onRemoveHandler} onRemove={this.onRemoveHandler}
// TODO image 类型是跟 picture 一样 ? // TODO image 类型是跟 picture 一样 ?
listType={listType.indexOf('image') > -1 ? 'picture' : 'text'} listType={listType!.indexOf('image') > -1 ? 'picture' : 'text'}
> >
<p className={'ant-upload-drag-icon'}> <p className={'ant-upload-drag-icon'}>
<InboxOutlined /> <InboxOutlined />
......
import React from 'react'; import React from 'react';
import Mood from '@/components/Mood'; import Mood from '@/components/Mood';
import { getIntl } from 'umi';
const intl = getIntl();
interface SmilingFaceProps { interface SmilingFaceProps {
value: number; value: number;
}; };
const SmilingFace: React.FC<SmilingFaceProps> = ({ const SmilingFace = (props) => {
value, const { value, schema } = props
}) => { const componentProps = schema?.getExtendsComponentProps() || {};
let node = null;
let node: any = null;
switch (value) { switch (value) {
case 1: case 0:
case 1:
case 2: { case 2: {
node = ( node = (
<> <div {...componentProps}>
<Mood type="sad" /> <Mood type="sad" customStyle={{ marginRight: 8 }} />
<span>差评</span> <span>{intl.formatMessage({id: 'components.chaping'})}</span>
</> </div>
); );
break; break;
} }
case 3: { case 3: {
node = ( node = (
<> <div {...componentProps}>
<Mood type="notBad" /> <Mood type="notBad" customStyle={{ marginRight: 8 }} />
<span>中评</span> <span>{intl.formatMessage({id: 'components.zhongping'})}</span>
</> </div>
); );
break; break;
} }
case 4: case 4:
case 5: { case 5: {
node = ( node = (
<> <div {...componentProps}>
<Mood type="smile" /> <Mood type="smile" customStyle={{ marginRight: 8 }} />
<span>好评</span> <span>{intl.formatMessage({id: 'components.haoping'})}</span>
</> </div>
); );
break; break;
} }
default: default:
break; break;
} }
return node; return node;
}; };
export default SmilingFace; SmilingFace.isFieldComponent = true;
\ No newline at end of file
export default SmilingFace;
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import SchemaForm, { import SchemaForm, {
IAntdSchemaFormProps, createVirtualBox, registerVirtualBox, Schema, SchemaField, FormButtonGroup, Reset, createControllerBox, registerValidationRules, IAntdSchemaFormProps, createVirtualBox, registerVirtualBox, Schema, SchemaField, FormButtonGroup, Reset, createControllerBox, registerValidationRules
} from '@formily/antd'; } from '@formily/antd';
import { Button, Space, Row, Col, DatePicker } from 'antd'; import { Button, Space, Row, Col, DatePicker } from 'antd';
import CustomUpload from './components/CustomUpload'; import CustomUpload from './components/CustomUpload';
......
...@@ -51,11 +51,13 @@ interface Iprops { ...@@ -51,11 +51,13 @@ interface Iprops {
onClose: () => void, onClose: () => void,
onOk: (selectRow: number[] | string[], selectedRows: { [key: string]: any }[]) => void, onOk: (selectRow: number[] | string[], selectedRows: { [key: string]: any }[]) => void,
/** customKey */ /** customKey */
customKey?: string customKey?: string,
/** 宽度 */
width?: number
} }
const TableModal: React.FC<Iprops> = (props: Iprops) => { const TableModal: React.FC<Iprops> = (props: Iprops) => {
const { title, visible, schema, columns, effects, tableProps, mode, expressionScope, fetchData, onClose, onOk, value, format, customizeRadio, modalType, footer, customKey } = props; const { title, visible, schema, columns, effects, tableProps, mode, expressionScope, fetchData, onClose, onOk, value, format, customizeRadio, modalType, footer, customKey, width } = props;
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowSelection, RowCtl] = useRowSelectionTable({ type: customizeRadio && mode === 'radio' ? 'checkbox' : mode, customKey: customKey }); const [rowSelection, RowCtl] = useRowSelectionTable({ type: customizeRadio && mode === 'radio' ? 'checkbox' : mode, customKey: customKey });
const isFirstLoad = useRef<boolean>(true); const isFirstLoad = useRef<boolean>(true);
...@@ -120,7 +122,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => { ...@@ -120,7 +122,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
onClose={handleOnClose} onClose={handleOnClose}
onCancel={handleOnClose} onCancel={handleOnClose}
// onOk={handleOk} // onOk={handleOk}
width={900} width={width}
{...otherProps} {...otherProps}
> >
<StandardTable <StandardTable
...@@ -168,7 +170,8 @@ TableModal.defaultProps = { ...@@ -168,7 +170,8 @@ TableModal.defaultProps = {
format: null, format: null,
customizeRadio: false, customizeRadio: false,
modalType: "Modal", modalType: "Modal",
footer: null footer: null,
width: 900
} }
export default TableModal; export default TableModal;
import React from 'react';
import { Image, Button, Typography } from 'antd';
const columns_10 = ({
value,
handlCollocation
}) => {
return (
[
{
title: '商品ID',
key: 'productId',
dataIndex: 'productId',
render: (text) => <Typography.Link target="_blank" href={`/productManage/commodity/products/detail?id=${text}`}>{text}</Typography.Link>
},
{
title: '商品图片',
key: 'productImgUrl',
dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
},
{
title: '商品名称',
key: 'productName',
dataIndex: 'productName'
},
{
title: '品类',
key: 'category',
dataIndex: 'category'
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand'
},
{
title: '单位',
key: 'unit',
dataIndex: 'unit'
},
{
title: '商品价格',
key: 'price',
dataIndex: 'price',
render: (text) => `¥${Number(text).toFixed(2)}`
},
{
title: '个人限购数量',
key: 'restrictNum',
dataIndex: 'restrictNum',
},
{
title: '活动限购总数量',
key: 'restrictTotalNum',
dataIndex: 'restrictTotalNum',
},
{
title: '操作',
key: 'operation',
dataIndex: 'operation',
render: (_text, _record) => (
<>
{(value === 6) && (
<Button type='link' onClick={() => handlCollocation(_record)}>查看赠品</Button>
)}
{(value === 13) && (
<Button type='link' onClick={() => handlCollocation(_record)}>查看换购商品</Button>
)}
{(value === 15) && (
<Button type='link' onClick={() => handlCollocation(_record)}>查看搭配商品</Button>
)}
</>
)
},
]
)
}
export default columns_10
...@@ -55,24 +55,6 @@ const columns_4 = ({ ...@@ -55,24 +55,6 @@ const columns_4 = ({
key: 'restrictTotalNum', key: 'restrictTotalNum',
dataIndex: 'restrictTotalNum', dataIndex: 'restrictTotalNum',
}, },
{
title: '操作',
key: 'operation',
dataIndex: 'operation',
render: (_text, _record) => (
<>
{(value === 6) && (
<Button type='link' onClick={() => handlCollocation(_record)}>查看赠品</Button>
)}
{(value === 13) && (
<Button type='link' onClick={() => handlCollocation(_record)}>查看换购商品</Button>
)}
{(value === 15) && (
<Button type='link' onClick={() => handlCollocation(_record)}>查看搭配商品</Button>
)}
</>
)
},
] ]
) )
} }
......
...@@ -3,33 +3,49 @@ import columns_2 from './columns_2'; ...@@ -3,33 +3,49 @@ import columns_2 from './columns_2';
import columns_3 from './columns_3'; import columns_3 from './columns_3';
import columns_4 from './columns_4'; import columns_4 from './columns_4';
import columns_5 from './columns_4'; import columns_5 from './columns_4';
import columns_6 from './columns_4'; import columns_6 from './columns_10';
import columns_7 from './columns_4'; import columns_7 from './columns_4';
import columns_8 from './columns_4'; import columns_8 from './columns_4';
import columns_9 from './columns_5'; import columns_9 from './columns_5';
import columns_10 from './columns_9'; import columns_10 from './columns_9';
import columns_11 from './columns_6'; import columns_11 from './columns_6';
import columns_12 from './columns_7'; import columns_12 from './columns_7';
import columns_13 from './columns_4'; import columns_13 from './columns_10';
import columns_14 from './columns_8'; import columns_14 from './columns_8';
import columns_15 from './columns_4'; import columns_15 from './columns_10';
import columns_16 from './columns_4'; import columns_16 from './columns_4';
export const Columns = { export const Columns = {
/** 特价促销 */
1: columns_1, 1: columns_1,
/** 直降促销 */
2: columns_2, 2: columns_2,
/** 折价促销 */
3: columns_3, 3: columns_3,
/** 满量促销 */
4: columns_4, 4: columns_4,
/** 满额促销 */
5: columns_5, 5: columns_5,
/** 赠送促销 */
6: columns_6, 6: columns_6,
/** 多件促销 */
7: columns_7, 7: columns_7,
/** 组合促销 */
8: columns_8, 8: columns_8,
/** 拼团 */
9: columns_9, 9: columns_9,
/** 抽奖 */
10: columns_10, 10: columns_10,
/** 砍价 */
11: columns_11, 11: columns_11,
/** 秒杀 */
12: columns_12, 12: columns_12,
/** 换购 */
13: columns_13, 13: columns_13,
/** 预售 */
14: columns_14, 14: columns_14,
/** 套餐 */
15: columns_15, 15: columns_15,
/** 试用 */
16: columns_16, 16: columns_16,
} }
import React from 'react'; import React from 'react';
import { Space, Tooltip, Typography } from 'antd'; import { Space, Tooltip, Typography } from 'antd';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { format } from '@/pages/transaction/common/dateFormat';
import { QuestionCircleOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined } from '@ant-design/icons';
import { format } from '@/constants/dateFormat';
import { isEmpty } from '@formily/antd/esm/shared';
/** * 活动类型 */ /** * 活动类型 */
export enum ACTIVITYTYPE { export enum ACTIVITYTYPE {
/** 特价促销 */ /** 特价促销 */
...@@ -65,6 +66,7 @@ const lotteryNumType = { ...@@ -65,6 +66,7 @@ const lotteryNumType = {
} }
/** 活动类型 */ /** 活动类型 */
export const GeneralEffect = (int, data) => { export const GeneralEffect = (int, data) => {
const allowActivity = (data?.allowActivity ? data.allowActivity : []);
switch (Number(int)) { switch (Number(int)) {
case 1: case 1:
case 2: case 2:
...@@ -73,7 +75,7 @@ export const GeneralEffect = (int, data) => { ...@@ -73,7 +75,7 @@ export const GeneralEffect = (int, data) => {
{ {
col: [ col: [
{ {
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => ( label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} /> <StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))} ))}
</Space> </Space>
...@@ -115,21 +117,21 @@ export const GeneralEffect = (int, data) => { ...@@ -115,21 +117,21 @@ export const GeneralEffect = (int, data) => {
{(int === 5 && data.type === 2) && '满额折'} {(int === 5 && data.type === 2) && '满额折'}
</>, extra: <> </>, extra: <>
{(int === 4 && data.type === 1) && <Space direction='vertical'> {(int === 4 && data.type === 1) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`}</div>))} {!isEmpty(data.ladderBOList) && data.ladderBOList.map(item => (<div>{`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`}</div>))}
</Space>} </Space>}
{(int === 4 && data.type === 2) && <Space direction='vertical'> {(int === 4 && data.type === 2) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`满 ${item.key} 个, 打 ${item.value} 折`}</div>))} {!isEmpty(data.ladderBOList) && data.ladderBOList.map(item => (<div>{`满 ${item.key} 个, 打 ${item.value} 折`}</div>))}
</Space>} </Space>}
{(int === 5 && data.type === 1) && <Space direction='vertical'> {(int === 5 && data.type === 1) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`}</div>))} {!isEmpty(data.ladderBOList) && data.ladderBOList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`}</div>))}
</Space>} </Space>}
{(int === 5 && data.type === 2) && <Space direction='vertical'> {(int === 5 && data.type === 2) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value} 折`}</div>))} {!isEmpty(data.ladderBOList) && data.ladderBOList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value} 折`}</div>))}
</Space>} </Space>}
</> </>
}, },
{ {
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => ( label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} /> <StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))} ))}
</Space> </Space>
...@@ -159,7 +161,7 @@ export const GeneralEffect = (int, data) => { ...@@ -159,7 +161,7 @@ export const GeneralEffect = (int, data) => {
</> </>
}, },
{ {
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => ( label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} /> <StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))} ))}
</Space> </Space>
...@@ -190,11 +192,11 @@ export const GeneralEffect = (int, data) => { ...@@ -190,11 +192,11 @@ export const GeneralEffect = (int, data) => {
col: [ col: [
{ {
label: '优惠规则', extra: <Space direction='vertical'> label: '优惠规则', extra: <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`满 ${item.discount} 件, 打 ${item.num} 折`}</div>))} {!isEmpty(data.ladderBOList) && data.ladderBOList.map(item => (<div>{`满 ${item.discount} 件, 打 ${item.num} 折`}</div>))}
</Space> </Space>
}, },
{ {
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => ( label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} /> <StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))} ))}
</Space> </Space>
...@@ -219,7 +221,7 @@ export const GeneralEffect = (int, data) => { ...@@ -219,7 +221,7 @@ export const GeneralEffect = (int, data) => {
col: [ col: [
{ label: '优惠规则', extra: `任选 ${data.num} 件, 付 ${data.price} 元` }, { label: '优惠规则', extra: `任选 ${data.num} 件, 付 ${data.price} 元` },
{ {
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => ( label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} /> <StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))} ))}
</Space> </Space>
...@@ -319,7 +321,7 @@ export const GeneralEffect = (int, data) => { ...@@ -319,7 +321,7 @@ export const GeneralEffect = (int, data) => {
</> </>
}, },
{ {
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => ( label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} /> <StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))} ))}
</Space> </Space>
......
export const OuterStatusColor = (type) => {
switch (type) {
case 1:
case 2:
case 3:
case 6:
return 'warning'
case 4:
return 'success'
case 5:
return 'error'
case 7:
return 'processing'
default:
return 'default'
}
}
export const InnerStatusColor = (type) => {
switch (type) {
case 1:
case 2:
case 4:
case 6:
return 'warning'
case 3:
case 5:
return 'error'
case 7:
return 'processing'
case 9:
return 'success'
default:
return 'default'
}
}
...@@ -239,7 +239,7 @@ function useGetLayout() { ...@@ -239,7 +239,7 @@ function useGetLayout() {
const props = _row.key === 'top' ? { const props = _row.key === 'top' ? {
imageUrl: currentProps.imageUrl imageUrl: currentProps.imageUrl
} : { } : {
visible: currentProps.visible || true, visible: currentProps.visible ?? true,
theme: currentProps.theme || 0, theme: currentProps.theme || 0,
title: currentProps.title, title: currentProps.title,
}; };
......
...@@ -93,7 +93,7 @@ const columns: ColumnsType<GoodListType[0]> = [ ...@@ -93,7 +93,7 @@ const columns: ColumnsType<GoodListType[0]> = [
render: (_text, _record) => { render: (_text, _record) => {
return ( return (
<div className={styles.priceInfo}> <div className={styles.priceInfo}>
<span>{_record.activityPrice}</span> <span>{_record.activityPrice || _record.plummetPrice}</span>
<span className={styles.unit}>({_record.unit})</span> <span className={styles.unit}>({_record.unit})</span>
</div> </div>
); );
......
/** 平台营销活动执行 */
import React from 'react'; import React from 'react';
import { history } from 'umi';
import { Button, Tag, Typography } from 'antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { format } from '@/constants/dateFormat';
import { ColumnType } from 'antd/lib/table/interface';
import TableLayout from '@/components/TableLayout';
import { OuterStatusColor } from '../../common/tagColor';
import { PATTERN_MAPS } from '@/constants/regExp';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { FormEffectHooks } from '@formily/antd';
import { getMarketingPlatformActivityExecutePage, getMarketingPlatformActivityGetOuterStatusList, getMarketingPlatformActivitySignupGetActivityTypeList } from '@/services/MarketingV2Api';
const { onFormMount$ } = FormEffectHooks;
const Search = () => {
const columns: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'id',
render: (text, record) =>
<Button type='link' target='_blank' style={{ padding: 0 }} onClick={() => history.push(`/marketingManage/marketing/marketingSearch/preview?id=${text}`)}>{text}</Button>
},
{
title: '活动名称',
dataIndex: 'activityName',
},
{
title: '活动类型',
dataIndex: 'activityTypeName',
},
{
title: '活动开始时间',
dataIndex: 'startTime',
render: (text) => format(text)
},
{
title: '活动结束时间',
dataIndex: 'endTime',
render: (text) => format(text)
},
{
title: '参与客户数',
dataIndex: 'customerCount',
},
{
title: '已执行订单单数',
dataIndex: 'orderCount',
},
{
title: '已执行订单金额',
dataIndex: 'orderAmount',
render: (text) => (
<Typography.Text>{Number(text).toFixed(2)}</Typography.Text>
)
},
{
title: '外部状态',
dataIndex: 'statusName',
render: (text, _) => (
<Tag color={OuterStatusColor(_.status)}>{text}</Tag>
)
},
{
title: '操作',
dataIndex: 'opertion',
render: (_text, _) => (
<Button type='link' onClick={() => history.push(`/marketingManage/marketing/marketingExecute/detail?id=${_.id}`)}>查看</Button>
)
}
]
const useStateEffects = () => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
/** 活动类型 */
getMarketingPlatformActivitySignupGetActivityTypeList().then(res => {
const _enum = res.data.map((item) => { return { label: item.name, value: item.status } });
linkage.enum('activityType', _enum);
}).catch(err => {
console.warn(err)
})
/** 外部状态 */
getMarketingPlatformActivityGetOuterStatusList().then(res => {
const _enum = res.data.map((item) => { return { label: item.name, value: item.status } });
linkage.enum('outerStatus', _enum);
}).catch(err => {
console.warn(err)
})
})
}
const MarketingExecute = () => {
return ( return (
<div>123</div> <TableLayout
) columns={columns}
effects="id"
fetch={getMarketingPlatformActivityExecutePage}
useStateEffects={useStateEffects}
schema={{
type: 'object',
properties: {
mageLayout: {
type: "object",
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
justifyContent: 'space-between'
}
},
properties: {
id: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '活动ID'
},
'x-rules': [
{
pattern: PATTERN_MAPS.quantity,
message: '请输入ID',
},
],
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'Flex-Layout',
"x-component-props": {
rowStyle: {
justifyContent: "flex-start",
flexWrap: "nowrap"
},
colStyle: {//改变间隔
marginRight: 20
}
},
properties: {
activityName: {
type: 'string',
'x-component-props': {
placeholder: '活动名称',
allowClear: true,
style: {
width: 160,
},
},
},
'[startTime,endTime]': {
type: 'daterange',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
allowClear: true,
style: {
width: 240,
},
},
},
activityType: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '活动类型',
allowClear: true,
style: {
width: 160,
},
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
}}
/>
);
} }
export default MarketingExecute; export default Search;
...@@ -4,6 +4,7 @@ import StatusTag from '@/components/StatusTag'; ...@@ -4,6 +4,7 @@ import StatusTag from '@/components/StatusTag';
import moment from 'moment'; import moment from 'moment';
import { QuestionCircleOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined } from '@ant-design/icons';
import { isEmpty } from '@formily/shared'; import { isEmpty } from '@formily/shared';
import { ACTIVITY_TYPE_1, ACTIVITY_TYPE_10, ACTIVITY_TYPE_11, ACTIVITY_TYPE_12, ACTIVITY_TYPE_13, ACTIVITY_TYPE_14, ACTIVITY_TYPE_15, ACTIVITY_TYPE_16, ACTIVITY_TYPE_2, ACTIVITY_TYPE_3, ACTIVITY_TYPE_4, ACTIVITY_TYPE_5, ACTIVITY_TYPE_6, ACTIVITY_TYPE_7, ACTIVITY_TYPE_8, ACTIVITY_TYPE_9 } from '@/constants/const/marketing';
export const format = (text, fmt?: string) => { export const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm")}</>
...@@ -72,9 +73,9 @@ const lotteryNumType = { ...@@ -72,9 +73,9 @@ const lotteryNumType = {
/** 活动类型 */ /** 活动类型 */
export const GeneralEffect = (int, data) => { export const GeneralEffect = (int, data) => {
switch (Number(int)) { switch (Number(int)) {
case 1: case ACTIVITY_TYPE_1:
case 2: case ACTIVITY_TYPE_2:
case 3: case ACTIVITY_TYPE_3:
return [ return [
{ {
col: [ col: [
...@@ -100,36 +101,36 @@ export const GeneralEffect = (int, data) => { ...@@ -100,36 +101,36 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 4: case ACTIVITY_TYPE_4:
case 5: case ACTIVITY_TYPE_5:
return [ return [
{ {
col: [ col: [
{ {
label: `满${int === 4 ? '量' : '额'}促销类型`, extra: <> label: `满${int === ACTIVITY_TYPE_4 ? '量' : '额'}促销类型`, extra: <>
{(int === 4 && data.type === 1) && <StatusTag type="default" title="满量减" />} {(int === ACTIVITY_TYPE_4 && data.type === 1) && <StatusTag type="default" title="满量减" />}
{(int === 4 && data.type === 2) && <StatusTag type="default" title="满量折" />} {(int === ACTIVITY_TYPE_4 && data.type === 2) && <StatusTag type="default" title="满量折" />}
{(int === 5 && data.type === 1) && <StatusTag type="default" title="满额减" />} {(int === ACTIVITY_TYPE_5 && data.type === 1) && <StatusTag type="default" title="满额减" />}
{(int === 5 && data.type === 2) && <StatusTag type="default" title="满额折" />} {(int === ACTIVITY_TYPE_5 && data.type === 2) && <StatusTag type="default" title="满额折" />}
</> </>
}, },
{ {
label: <> label: <>
{(int === 4 && data.type === 1) && '满量减'} {(int === ACTIVITY_TYPE_4 && data.type === 1) && '满量减'}
{(int === 4 && data.type === 2) && '满量折'} {(int === ACTIVITY_TYPE_4 && data.type === 2) && '满量折'}
{(int === 5 && data.type === 1) && '满额减'} {(int === ACTIVITY_TYPE_5 && data.type === 1) && '满额减'}
{(int === 5 && data.type === 2) && '满额折'} {(int === ACTIVITY_TYPE_5 && data.type === 2) && '满额折'}
</>, extra: <> </>, extra: <>
{(int === 4 && data.type === 1) && <Space direction='vertical'> {(int === ACTIVITY_TYPE_4 && data.type === 1) && <Space direction='vertical'>
{!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`}</div>))} {!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`}</div>))}
</Space>} </Space>}
{(int === 4 && data.type === 2) && <Space direction='vertical'> {(int === ACTIVITY_TYPE_4 && data.type === 2) && <Space direction='vertical'>
{!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${item.key} 个, 打 ${item.value / 10} 折`}</div>))} {!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${item.key} 个, 打 ${item.value / 10} 折`}</div>))}
</Space>} </Space>}
{(int === 5 && data.type === 1) && <Space direction='vertical'> {(int === ACTIVITY_TYPE_5 && data.type === 1) && <Space direction='vertical'>
{!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`}</div>))} {!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`}</div>))}
</Space>} </Space>}
{(int === 5 && data.type === 2) && <Space direction='vertical'> {(int === ACTIVITY_TYPE_5 && data.type === 2) && <Space direction='vertical'>
{!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value /10} 折`}</div>))} {!isEmpty(data.ladderList) && data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value /10} 折`}</div>))}
</Space>} </Space>}
</> </>
...@@ -154,7 +155,7 @@ export const GeneralEffect = (int, data) => { ...@@ -154,7 +155,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 6: case ACTIVITY_TYPE_6:
return [ return [
{ {
col: [ col: [
...@@ -190,7 +191,7 @@ export const GeneralEffect = (int, data) => { ...@@ -190,7 +191,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 7: case ACTIVITY_TYPE_7:
return [ return [
{ {
col: [ col: [
...@@ -219,7 +220,7 @@ export const GeneralEffect = (int, data) => { ...@@ -219,7 +220,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 8: case ACTIVITY_TYPE_8:
return [ return [
{ {
col: [ col: [
...@@ -244,7 +245,7 @@ export const GeneralEffect = (int, data) => { ...@@ -244,7 +245,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 9: case ACTIVITY_TYPE_9:
return [ return [
{ {
col: [ col: [
...@@ -263,7 +264,7 @@ export const GeneralEffect = (int, data) => { ...@@ -263,7 +264,7 @@ export const GeneralEffect = (int, data) => {
] ]
}, },
] ]
case 10: case ACTIVITY_TYPE_10:
return [ return [
{ {
col: [ col: [
...@@ -273,7 +274,7 @@ export const GeneralEffect = (int, data) => { ...@@ -273,7 +274,7 @@ export const GeneralEffect = (int, data) => {
] ]
}, },
] ]
case 11: case ACTIVITY_TYPE_11:
return [ return [
{ {
col: [ col: [
...@@ -288,7 +289,7 @@ export const GeneralEffect = (int, data) => { ...@@ -288,7 +289,7 @@ export const GeneralEffect = (int, data) => {
] ]
}, },
] ]
case 12: case ACTIVITY_TYPE_12:
return [ return [
{ {
col: [ col: [
...@@ -307,7 +308,7 @@ export const GeneralEffect = (int, data) => { ...@@ -307,7 +308,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 13: case ACTIVITY_TYPE_13:
return [ return [
{ {
col: [ col: [
...@@ -337,7 +338,7 @@ export const GeneralEffect = (int, data) => { ...@@ -337,7 +338,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 14: case ACTIVITY_TYPE_14:
return [ return [
{ {
col: [ col: [
...@@ -356,7 +357,7 @@ export const GeneralEffect = (int, data) => { ...@@ -356,7 +357,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 15: case ACTIVITY_TYPE_15:
return [ return [
{ {
col: [ col: [
...@@ -365,7 +366,7 @@ export const GeneralEffect = (int, data) => { ...@@ -365,7 +366,7 @@ export const GeneralEffect = (int, data) => {
] ]
} }
] ]
case 16: case ACTIVITY_TYPE_16:
return [ return [
{ {
col: [ col: [
......
...@@ -21,6 +21,7 @@ import { remindLayout, RemindLayoutProps } from '@/pages/marketingManage/common/ ...@@ -21,6 +21,7 @@ import { remindLayout, RemindLayoutProps } from '@/pages/marketingManage/common/
import ListModalLayout from '../../components/listModalLayout'; import ListModalLayout from '../../components/listModalLayout';
import CouponsListLayout from '../../components/couponsListLayout'; import CouponsListLayout from '../../components/couponsListLayout';
import { getMarketingPlatformMerchantActivityDetail, getMarketingPlatformMerchantActivityDetailGoodsPage, postMarketingPlatformMerchantActivityExamine } from '@/services/MarketingV2Api'; import { getMarketingPlatformMerchantActivityDetail, getMarketingPlatformMerchantActivityDetailGoodsPage, postMarketingPlatformMerchantActivityExamine } from '@/services/MarketingV2Api';
import { ACTIVITY_TYPE_13, ACTIVITY_TYPE_15, ACTIVITY_TYPE_6 } from '@/constants/const/marketing';
const TABLINK = [ const TABLINK = [
{ id: 'progressLayout', title: '流转进度' }, { id: 'progressLayout', title: '流转进度' },
...@@ -120,13 +121,13 @@ const DetialLayout = () => { ...@@ -120,13 +121,13 @@ const DetialLayout = () => {
}) })
data.externalLogs = externalLogs; data.externalLogs = externalLogs;
} }
if (data.activityType === 6) { if (data.activityType === ACTIVITY_TYPE_6) {
setRemind(remindLayout(data.activityType, data.activityDefined.giveType, data.activityDefined.giftType)); setRemind(remindLayout(data.activityType, data.activityDefined.giveType, data.activityDefined.giftType));
} }
if (data.activityType === 13) { if (data.activityType === ACTIVITY_TYPE_13) {
setRemind(remindLayout(data.activityType, data.activityDefined.swapType)); setRemind(remindLayout(data.activityType, data.activityDefined.swapType));
} }
if (data.activityType === 15) { if (data.activityType === ACTIVITY_TYPE_15) {
setRemind(remindLayout(data.activityType)); setRemind(remindLayout(data.activityType));
} }
setAllusers([ setAllusers([
......
...@@ -13,12 +13,66 @@ import TabTree from '@/components/TabTree'; ...@@ -13,12 +13,66 @@ import TabTree from '@/components/TabTree';
import { useTreeTabs } from '@/hooks/useTreeTabs'; import { useTreeTabs } from '@/hooks/useTreeTabs';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { getProductPlatformGetCategoryAttributeList, getProductPlatformGetCategoryTree, postProductPlatformDeleteCategoryAttribute, postProductPlatformSaveCategoryAttribute } from '@/services/ProductV2Api'; import { getProductPlatformGetCategoryAttributeList, getProductPlatformGetCategoryTree, postProductPlatformDeleteCategoryAttribute, postProductPlatformSaveCategoryAttribute } from '@/services/ProductV2Api';
import Search from '@/components/NiceForm/components/Search';
import Submit from '@/components/NiceForm/components/Submit';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema } from '@formily/antd';
const fetchCategoryTreeData = async () => { const fetchCategoryTreeData = async () => {
const res = await getProductPlatformGetCategoryTree() const res = await getProductPlatformGetCategoryTree()
return res return res
} }
const searchSchema: ISchema = {
type: 'object',
properties: {
groupName: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '属性组名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
name: {
type: 'string',
"x-component-props": {
placeholder: '属性名称',
style: {
width: 160
}
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '提交'
}
}
}
}
}
}
const CategoryAttributes: React.FC<{}> = () => { const CategoryAttributes: React.FC<{}> = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
const refLink = useRef({}) const refLink = useRef({})
...@@ -305,17 +359,16 @@ const CategoryAttributes: React.FC<{}> = () => { ...@@ -305,17 +359,16 @@ const CategoryAttributes: React.FC<{}> = () => {
}} }}
formilyProps={{ formilyProps={{
ctx: { ctx: {
schema: { schema: searchSchema,
type: 'object', components: { ModalSearch: Search, Submit },
properties: { effects: ($, actions) => {
name: { actions.reset()
type: 'string', useStateFilterSearchLinkageEffect(
'x-component-props': { $,
placeholder: '属性名称' actions,
}, 'groupName',
'x-component': 'Search' FORM_FILTER_PATH,
} );
}
} }
} }
}} }}
......
...@@ -9,7 +9,7 @@ import { ColumnType } from 'antd/lib/table/interface' ...@@ -9,7 +9,7 @@ import { ColumnType } from 'antd/lib/table/interface'
import ReutrnEle from '@/components/ReturnEle' import ReutrnEle from '@/components/ReturnEle'
import moment from 'moment' import moment from 'moment'
import styles from './index.less' import styles from './index.less'
import { getProductBrandGetBrandCheckRecord, getProductBrandGetPlatformBrand } from '@/services/ProductV2Api' import { getProductBrandGetPlatformBrandCheckRecord, getProductBrandGetPlatformBrand } from '@/services/ProductV2Api'
const { Step } = Steps; const { Step } = Steps;
...@@ -35,7 +35,7 @@ const viewBrand: React.FC<{}> = () => { ...@@ -35,7 +35,7 @@ const viewBrand: React.FC<{}> = () => {
setFixStep(2) setFixStep(2)
} }
}) })
getProductBrandGetBrandCheckRecord({brandId: id}).then(res=> { getProductBrandGetPlatformBrandCheckRecord({brandId: id}).then(res=> {
if(res.code===1000) if(res.code===1000)
setRecordData(res.data) setRecordData(res.data)
}) })
......
...@@ -10,7 +10,7 @@ import { ColumnType } from 'antd/lib/table/interface' ...@@ -10,7 +10,7 @@ import { ColumnType } from 'antd/lib/table/interface'
import ReutrnEle from '@/components/ReturnEle' import ReutrnEle from '@/components/ReturnEle'
import moment from 'moment' import moment from 'moment'
import styles from '../trademarkSearch/index.less' import styles from '../trademarkSearch/index.less'
import { getProductBrandGetBrandCheckRecord, getProductBrandGetPlatformBrand, postProductBrandCheckBrand } from '@/services/ProductV2Api' import { getProductBrandGetPlatformBrandCheckRecord, getProductBrandGetPlatformBrand, postProductBrandCheckPlatformBrand } from '@/services/ProductV2Api'
const { Step } = Steps const { Step } = Steps
const { TextArea } = Input const { TextArea } = Input
...@@ -100,7 +100,7 @@ const CheckBrand: React.FC<{}> = () => { ...@@ -100,7 +100,7 @@ const CheckBrand: React.FC<{}> = () => {
setFixStep(2) setFixStep(2)
} }
}) })
getProductBrandGetBrandCheckRecord({brandId: id}).then(res=> { getProductBrandGetPlatformBrandCheckRecord({brandId: id}).then(res=> {
if(res.code===1000) if(res.code===1000)
setRecordData(res.data) setRecordData(res.data)
}) })
...@@ -158,7 +158,7 @@ const CheckBrand: React.FC<{}> = () => { ...@@ -158,7 +158,7 @@ const CheckBrand: React.FC<{}> = () => {
const handleOK = () => { const handleOK = () => {
checkForm.validateFields().then(values => { checkForm.validateFields().then(values => {
postProductBrandCheckBrand({ id: brandInfo?.id, ...values }).then(res=>{ postProductBrandCheckPlatformBrand({ id: brandInfo?.id, ...values }).then(res=>{
if(res.code=1000){ if(res.code=1000){
handleCancel() handleCancel()
setDisableCheck(true) setDisableCheck(true)
......
...@@ -6,14 +6,14 @@ import { StandardTable } from '@linkseeks/god' ...@@ -6,14 +6,14 @@ import { StandardTable } from '@linkseeks/god'
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 { getProductBrandGetPlatformBrandList } from '@/services/ProductV2Api' import { getProductBrandGetPlatformUnCheckBrandList } from '@/services/ProductV2Api'
const Trademark: React.FC<{}> = () => { const Trademark: React.FC<{}> = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
const fetchData = (params: any) => { const fetchData = (params: any) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getProductBrandGetPlatformBrandList({ ...params, name: params.name || '', status: 2 }).then(res => { getProductBrandGetPlatformUnCheckBrandList({ ...params, name: params.name || '', status: 2 }).then(res => {
const { data } = res const { data } = res
resolve(data) resolve(data)
}) })
......
...@@ -26,7 +26,7 @@ const Offter = () => { ...@@ -26,7 +26,7 @@ const Offter = () => {
key: 'purchaseInquiryNo', key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo', dataIndex: 'purchaseInquiryNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<EyePreview url={`/purchase/demandBidMgt/demand/detail?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}>{text}</EyePreview> <EyePreview url={`/purchase/demandVouch/demandBidMgt/demand/detail?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}>{text}</EyePreview>
) )
}, { }, {
title: '需求摘要', title: '需求摘要',
...@@ -88,7 +88,7 @@ const Offter = () => { ...@@ -88,7 +88,7 @@ const Offter = () => {
key: 'operate', key: 'operate',
dataIndex: 'operate', dataIndex: 'operate',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Button type='link' onClick={() => history.push(`/purchase/demandBidMgt/offer/preview?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`)}>查看</Button> <Button type='link' onClick={() => history.push(`/purchase/demandVouch/demandBidMgt/offer/preview?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`)}>查看</Button>
) )
}]; }];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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