Commit c52bac5f authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 0de68f83 fd483c23
......@@ -106,7 +106,7 @@ const Details: React.FC<parmas> = (props) => {
console.log(data)
window.open(`/shop/commodity/detail?id=${data.commodityId}&shopId=${btoa(JSON.stringify({ roleId: data.memberRoleId, memberId: data.memberId }))}`)
}
const inquiryGoods: ColumnType<any>[] = [{
const column: ColumnType<any>[] = [{
title: 'ID',
key: 'productId',
dataIndex: 'productId',
......@@ -131,14 +131,52 @@ const Details: React.FC<parmas> = (props) => {
title: '采购数量',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
}]
const inquiryGoods: ColumnType<any>[] = [{
title: 'ID',
key: 'productId',
dataIndex: 'productId',
}, {
title: '报价商品名称',
key: 'productName',
dataIndex: 'productName',
render: (text: any, record: any) => <EyePreview type='button' handleClick={() => handleJump(record)}>{text}</EyePreview>
}, {
title: '品类',
key: 'category',
dataIndex: 'category',
}, {
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}, {
title: '单位',
key: 'unit',
dataIndex: 'unit',
}, {
title: '采购数量',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
{
title: '报价单价',
key: 'price',
dataIndex: 'price',
}, {
render: (text:any) => (
<>
{ text ? `¥${text.toFixed(2)}` : `¥0`}
</>
)
},
{
title: '金额',
key: 'money',
dataIndex: 'money',
render: (text:any) => (
<>
{ text ? `¥${text.toFixed(2)}` : `¥0`}
</>
)
}]
// 条件交易&其他报价说明
const infoTem = {
......@@ -488,8 +526,8 @@ const Details: React.FC<parmas> = (props) => {
</Tabs>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title} style={view === 2 ? { paddingBottom: '0px' } : { paddingBottom: '24px' }}>询价商品</div>
{view === 1 && <Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />}
<div className={style.mainCol_title} style={view === 2 ? { paddingBottom: '0px' } : { paddingBottom: '24px' }}>{view === 1 ? '商品询价' : '商品报价'}</div>
{view === 1 && <Table columns={column} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />}
{view === 2 &&
<StandardTable
currentRef={ref}
......
......@@ -136,6 +136,32 @@ const Details: React.FC<parmas> = (props) => {
console.log(data)
window.open(`/shop/commodity/detail?id=${data.productId}&type=2&shopId=${btoa(JSON.stringify({ roleId: data.memberRoleId, memberId: data.memberId }))}`)
}
const column: ColumnType<any>[] = [{
title: 'ID',
key: 'productId',
dataIndex: 'productId',
}, {
title: '报价商品名称',
key: 'productName',
dataIndex: 'productName',
render: (text: any, record: any) => <EyePreview type='button' handleClick={() => handleJump(record)}>{text}</EyePreview>
}, {
title: '品类',
key: 'category',
dataIndex: 'category',
}, {
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}, {
title: '单位',
key: 'unit',
dataIndex: 'unit',
}, {
title: '采购数量',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
}]
const inquiryGoods: ColumnType<any>[] = [{
title: 'ID',
key: 'productId',
......@@ -161,6 +187,26 @@ const Details: React.FC<parmas> = (props) => {
title: '采购数量',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
{
title: '报价单价',
key: 'price',
dataIndex: 'price',
render: (text:any) => (
<>
{ text ? `¥${text.toFixed(2)}` : `¥0`}
</>
)
},
{
title: '金额',
key: 'money',
dataIndex: 'money',
render: (text:any) => (
<>
{ text ? `¥${text.toFixed(2)}` : `¥0`}
</>
)
}]
// 条件交易&其他报价说明
const infoTem = {
......@@ -532,8 +578,8 @@ const Details: React.FC<parmas> = (props) => {
</Tabs>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title}>询价商品</div>
{view === 1 && <Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />}
<div className={style.mainCol_title}>{view === 1 ? '商品询价' : '商品报价'}</div>
{view === 1 && <Table columns={column} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />}
{view === 2 &&
<StandardTable
currentRef={ref}
......
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