Commit 54043d96 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:价格显示处理

parent 4e5e2a47
......@@ -110,6 +110,7 @@ const Goods: React.FC<{}> = () => {
title: '成单价',
dataIndex: 'costPrice',
key: 'costPrice',
render: text => `¥${text}`
},
{
title: '导入批次',
......
......@@ -93,7 +93,25 @@ const DirectChannel: React.FC<{}> = () => {
title: '价格',
dataIndex: ['channelCommodity', 'commodity', 'min'],
key: 'id',
render: (text: any, record: any) => <>{text} ~ ¥{record.channelCommodity.commodity.max}</>
render: (text:any, reocrd:any) => {
let min = reocrd.channelCommodity.commodity.min
let type = reocrd.channelCommodity.commodity.priceType
let max = reocrd.channelCommodity.commodity.max
if(type === 1){
if(max === min)
return <>{min}</>
else
return <>{min} ~ ¥{max}</>
}
if(type === 3){
if(max === min)
return <>{min}</>
else
return <>{min} ~ {max}</>
}
if(type === 2)
return null
}
},
{
title: '渠道会员角色',
......@@ -101,7 +119,7 @@ const DirectChannel: React.FC<{}> = () => {
key: 'memberRoleName',
},
{
title: '适用会员',
title: '适用渠道',
dataIndex: 'memberName',
key: 'memberName',
},
......
......@@ -100,13 +100,13 @@ const FastModifyPrice: React.FC<{}> = () => {
key: 'min',
render: (text:any, reocrd:any) => {
if(reocrd.priceType === 1){
if(reocrd.min === reocrd.min)
if(reocrd.max === reocrd.min)
return <>{reocrd.min}</>
else
return <>{reocrd.min} ~ ¥{reocrd.max}</>
}
if(reocrd.priceType === 3){
if(reocrd.min === reocrd.min)
if(reocrd.max === reocrd.min)
return <>{reocrd.min}</>
else
return <>{reocrd.min} ~ {reocrd.max}</>
......
......@@ -143,13 +143,13 @@ const Products: React.FC<{}> = () => {
key: 'min',
render: (text:any, reocrd:any) => {
if(reocrd.priceType === 1){
if(reocrd.min === reocrd.min)
if(reocrd.max === reocrd.min)
return <>{reocrd.min}</>
else
return <>{reocrd.min} ~ ¥{reocrd.max}</>
}
if(reocrd.priceType === 3){
if(reocrd.min === reocrd.min)
if(reocrd.max === reocrd.min)
return <>{reocrd.min}</>
else
return <>{reocrd.min} ~ {reocrd.max}</>
......
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