Commit 70940a16 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理操作记录为显示角色

parent bdbfa980
......@@ -69,6 +69,7 @@
"crypto-js": "^4.0.0",
"god": "^0.2.9",
"lingxi-design-ui": "^2.0.6",
"lingxi-editor-core": "^2.0.5",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
......
......@@ -70,7 +70,7 @@ const viewProducts: React.FC<{}> = () => {
if (code === 1000) {
setPorductDetail(data)
renderDataByTab(data)
constructTableData(data.name, data.unitPriceAndPicList)
constructTableData(data, data.unitPriceAndPicList)
if (data.status === 1) setFixStep(0)
else if (data.status === 2) setFixStep(2)
else if (data.status === 3) setFixStep(3)
......@@ -250,7 +250,7 @@ const viewProducts: React.FC<{}> = () => {
}
/* 构建表格数据 */
const constructTableData = (productName: string, unitPriceAndPicList: GetProductCommodityGetCommodityResponse["unitPriceAndPicList"]) => {
const constructTableData = (product: string, unitPriceAndPicList: GetProductCommodityGetCommodityResponse["unitPriceAndPicList"]) => {
// 构建列
// console.log(productName, unitPriceAndPicList, '构建列')
let _col: any = [];
......@@ -283,13 +283,13 @@ const viewProducts: React.FC<{}> = () => {
}
}
_col.push({
title: productDetail?.priceType === 3 ? '所需积分' : '单价(元)',
title: product['priceType'] === 3 ? '所需积分' : '单价(元)',
dataIndex: '单价',
key: '单价',
render: (text, record) => {
if (JSON.stringify(text) === '{}') return null
return Object.keys(text).map((v, i) => {
return <><span key={i}>{v === '0-0' ? '' : `${v}:`} <span style={{ color: 'red' }}>{text[v]}</span></span><br /></>
return <><span key={i}>{v === '0-0' ? '' : `${v}:`} <span style={{ color: 'red' }}>{product?.priceType===3?'':'¥'}{text[v]}</span></span><br /></>
})
}
})
......@@ -315,7 +315,7 @@ const viewProducts: React.FC<{}> = () => {
_attributeArrByImageRender.push(attrWithObj)
let temp = {
"索引": index,
"商品名称": productName,
"商品名称": product['name'],
"对应货品": item.goods?.code + '/' + item.goods?.name + '/' + item.goods?.type,
...attrWithObj,
"单价": sortLadderPrice(item.unitPrice),
......@@ -566,7 +566,7 @@ const viewProducts: React.FC<{}> = () => {
<p>税率:</p>
</Col>
<Col span={20}>
<p>{productDetail?.taxRate}</p>
<p>{productDetail?.taxRate ? `${productDetail?.taxRate}%` : null}</p>
</Col>
</Row>
{
......
......@@ -132,7 +132,7 @@ const Products: React.FC<{}> = () => {
return (
<>
{/* btnCode="DevTest" */}
<AuthButton menuCode={MENU_NODE} >
<AuthButton menuCode={MENU_NODE}>
<Button type='link' onClick={() => history.push(`/commodity/productWillCheck/detail?id=${record.id}`)}>审核</Button>
</AuthButton>
......
......@@ -100,8 +100,8 @@ const viewProducts: React.FC<{}> = () => {
},
{
title: '角色',
dataIndex: 'MemberManageRoleName',
key: 'MemberManageRoleName',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
},
{
title: '状态',
......@@ -524,7 +524,7 @@ const viewProducts: React.FC<{}> = () => {
<p>税率:</p>
</Col>
<Col span={20}>
<p>{productDetail?.taxRate}</p>
<p>{productDetail?.taxRate ? `${productDetail?.taxRate}%` : null}</p>
</Col>
</Row>
{
......
......@@ -43,8 +43,8 @@ const CheckBrand: React.FC<{}> = () => {
},
{
title: '角色',
dataIndex: 'MemberManageRoleName',
key: 'MemberManageRoleName',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
},
{
title: '状态',
......
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