Commit 8d6ae809 authored by XieZhiXiong's avatar XieZhiXiong
parents 1fac668b 8d39e2c8
......@@ -143,22 +143,91 @@ const DetialLayout = () => {
dataIndex: 'operation',
render: (_text, _record) => <Button type='link' style={{ padding: 0 }} onClick={() => toggle(true, _record)}>执行明细</Button>
}])
} else {
return columns.concat([{
title: '参与客户数',
key: 'customerCount',
dataIndex: 'customerCount'
},
{
title: '实购数量',
key: 'salesNum',
dataIndex: 'salesNum'
},
{
title: '实购金额',
key: 'amount',
dataIndex: 'amount'
}])
} else if (value === ACTIVITY_TYPE_6 || value === ACTIVITY_TYPE_13 || value === ACTIVITY_TYPE_15) {
return [
{
title: `${intl.formatMessage({ id: 'marketingAbility.productID' })}`,
key: 'productId',
dataIndex: 'productId',
render: (text) => <Typography.Link target="_blank" href={`/memberCenter/commodityAbility/commodity/products/detail?id=${text}`}>{text}</Typography.Link>
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.commodityImages' })}`,
key: 'productImgUrl',
dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.nameOfCommodity' })}`,
key: 'productName',
dataIndex: 'productName'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.category' })}`,
key: 'category',
dataIndex: 'category'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.brand' })}`,
key: 'brand',
dataIndex: 'brand'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.unit' })}`,
key: 'unit',
dataIndex: 'unit'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.commodityPrices' })}`,
key: 'price',
dataIndex: 'price',
render: (text) => `¥${Number(text).toFixed(2)}`
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.individualPurchaseQuantity' })}`,
key: 'restrictNum',
dataIndex: 'restrictNum',
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.numberPurchasingActivities' })}`,
key: 'restrictTotalNum',
dataIndex: 'restrictTotalNum',
},
{
title: '参与客户数',
key: 'customerCount',
dataIndex: 'customerCount'
},
{
title: '实购数量',
key: 'salesNum',
dataIndex: 'salesNum'
},
{
title: '实购金额',
key: 'amount',
dataIndex: 'amount'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.operation' })}`,
key: 'operation',
dataIndex: 'operation',
render: (_text, _record) => (
<>
{(value === 6) && (
<Button type='link' onClick={() => handlCollocation(_record)}>{intl.formatMessage({ id: 'marketingAbility.viewTheGift' })}</Button>
)}
{(value === 13) && (
<Button type='link' onClick={() => handlCollocation(_record)}>{intl.formatMessage({ id: 'marketingAbility.checkForGoods' })}</Button>
)}
{(value === 15) && (
<Button type='link' onClick={() => handlCollocation(_record)}>{intl.formatMessage({ id: 'marketingAbility.viewTheCollocationOfGoods' })}</Button>
)}
{showExecution && <Button type='link' style={{ padding: 0 }} onClick={() => toggle(true, _record)}>执行明细</Button>}
</>
)
},
]
}
}, [value])
......@@ -166,7 +235,13 @@ const DetialLayout = () => {
{
title: '单据号',
key: 'orderId',
dataIndex: 'orderId'
dataIndex: 'orderId',
render: (_text, _r) => (
<>
{_r.recordType === 1 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${_r.skuId}`)}>{_r.skuId}</Button>}
{_r.recordType === 2 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${_text}`)}>{_r.orderNo}</Button>}
</>
)
},
{
title: '单据类型',
......@@ -373,7 +448,7 @@ const DetialLayout = () => {
'[startTime,endTime]': {
type: 'daterange',
'x-component-props': {
placeholder: [`${intl.formatMessage({ id: 'marketingAbility.kaopingkaishishijian' })}`, `${intl.formatMessage({ id: 'marketingAbility.kaopingwanchengshijian' })}`],
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime' })}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime' })}`],
allowClear: true,
style: {
width: 240,
......
import { useIntl } from 'umi';
import React, { Fragment, useCallback, useMemo, useState } from 'react';
import { Badge, Button } from 'antd';
import { Badge, Button, Typography, Image } from 'antd';
import { history } from 'umi';
import { Context } from '@/pages/transaction/components/detailLayout/components/context';
import PeripheralLayout from '@/pages/transaction/components/detailLayout';
......@@ -141,22 +141,91 @@ const DetialLayout = () => {
dataIndex: 'operation',
render: (_text, _record) => <Button type='link' style={{ padding: 0 }} onClick={() => toggle(true, _record)}>执行明细</Button>
}])
} else {
return columns.concat([{
title: '参与客户数',
key: 'customerCount',
dataIndex: 'customerCount'
},
{
title: '实购数量',
key: 'salesNum',
dataIndex: 'salesNum'
},
{
title: '实购金额',
key: 'amount',
dataIndex: 'amount'
}])
} else if (value === ACTIVITY_TYPE_6 || value === ACTIVITY_TYPE_13 || value === ACTIVITY_TYPE_15) {
return [
{
title: `${intl.formatMessage({ id: 'marketingAbility.productID' })}`,
key: 'productId',
dataIndex: 'productId',
render: (text) => <Typography.Link target="_blank" href={`/memberCenter/commodityAbility/commodity/products/detail?id=${text}`}>{text}</Typography.Link>
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.commodityImages' })}`,
key: 'productImgUrl',
dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.nameOfCommodity' })}`,
key: 'productName',
dataIndex: 'productName'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.category' })}`,
key: 'category',
dataIndex: 'category'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.brand' })}`,
key: 'brand',
dataIndex: 'brand'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.unit' })}`,
key: 'unit',
dataIndex: 'unit'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.commodityPrices' })}`,
key: 'price',
dataIndex: 'price',
render: (text) => `¥${Number(text).toFixed(2)}`
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.individualPurchaseQuantity' })}`,
key: 'restrictNum',
dataIndex: 'restrictNum',
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.numberPurchasingActivities' })}`,
key: 'restrictTotalNum',
dataIndex: 'restrictTotalNum',
},
{
title: '参与客户数',
key: 'customerCount',
dataIndex: 'customerCount'
},
{
title: '实购数量',
key: 'salesNum',
dataIndex: 'salesNum'
},
{
title: '实购金额',
key: 'amount',
dataIndex: 'amount'
},
{
title: `${intl.formatMessage({ id: 'marketingAbility.operation' })}`,
key: 'operation',
dataIndex: 'operation',
render: (_text, _record) => (
<>
{(value === 6) && (
<Button type='link' onClick={() => handlCollocation(_record)}>{intl.formatMessage({ id: 'marketingAbility.viewTheGift' })}</Button>
)}
{(value === 13) && (
<Button type='link' onClick={() => handlCollocation(_record)}>{intl.formatMessage({ id: 'marketingAbility.checkForGoods' })}</Button>
)}
{(value === 15) && (
<Button type='link' onClick={() => handlCollocation(_record)}>{intl.formatMessage({ id: 'marketingAbility.viewTheCollocationOfGoods' })}</Button>
)}
{showExecution && <Button type='link' style={{ padding: 0 }} onClick={() => toggle(true, _record)}>执行明细</Button>}
</>
)
},
]
}
}, [value])
......@@ -164,7 +233,13 @@ const DetialLayout = () => {
{
title: '单据号',
key: 'orderId',
dataIndex: 'orderId'
dataIndex: 'orderId',
render: (_text, _r) => (
<>
{_r.recordType === 1 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${_r.skuId}`)}>{_r.skuId}</Button>}
{_r.recordType === 2 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${_text}`)}>{_r.orderNo}</Button>}
</>
)
},
{
title: '单据类型',
......@@ -179,7 +254,7 @@ const DetialLayout = () => {
{
title: '客户名称',
key: 'memberName',
dataIndex: 'memberName'
dataIndex: 'memberName',
},
{
title: '单据时间',
......@@ -371,7 +446,7 @@ const DetialLayout = () => {
'[startTime,endTime]': {
type: 'daterange',
'x-component-props': {
placeholder: [`${intl.formatMessage({ id: 'marketingAbility.kaopingkaishishijian' })}`, `${intl.formatMessage({ id: 'marketingAbility.kaopingwanchengshijian' })}`],
placeholder: [`${intl.formatMessage({ id: 'paltformSign.theStartTime' })}`, `${intl.formatMessage({ id: 'paltformSign.theEndOfTime' })}`],
allowClear: true,
style: {
width: 240,
......
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