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