Commit 846e7365 authored by 前端-许佳敏's avatar 前端-许佳敏

update

parents 1e0318bd 3322415c
......@@ -56,12 +56,13 @@
"@formily/antd-components": "^1.2.11",
"@lingxi-disign/core": "^1.0.1",
"@lingxi-disign/react": "^1.0.3",
"@lingxi-disign/ui": "^1.0.1",
"@lingxi-disign/react-web": "^1.0.2",
"@lingxi-disign/ui": "^1.0.1",
"@types/crypto-js": "^4.0.1",
"@umijs/hooks": "^1.9.3",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"babel-plugin-import": "^1.13.3",
"bizcharts": "^4.1.10",
"braft-editor": "^2.3.9",
"caniuse-lite": "^1.0.30001245",
......@@ -70,6 +71,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",
......
......@@ -15,26 +15,31 @@ const AuthButton = (props: AuthButtonProps) => {
btnCode, // 按钮标识
menuCode, // 按钮页面标识
} = props
const userBtn = require('../../../config/router.config.json')
const path = menuCode.split(".")[0];
const AuthButton = userBtn.filter((item: any) => item.path === `/${path}`);
const AuthUrl = AuthButton[0].routes.filter((item: any) => item.path === "/commodity/productWillCheck")
AuthUrl[0].btn = [
{
btnCode: 'commodity.productWillCheck1',
const AuthRoutes = userBtn.filter((item: any) => item.path === `/${path}`);
const AuthButton = AuthRoutes[0].routes;
const AuthCode: any = [];
for (let i = 0; i < AuthButton.length; i++) {
if (AuthButton[i].btns.length != 0) {
for (let j = 0; j < AuthButton[i].btns.length; j++) {
if (AuthButton[i].btns[j].path === menuCode) {
AuthCode.push(AuthButton[i].btns[j]);
break;
}
}
}
]
console.log(AuthUrl)
const btns = AuthUrl[0].btn;
}
console.log(AuthCode, 'AuthCode');
const _authorityBtn = () => {
// 本地开发时传的特殊标识,直接开放权限
if (btnCode === 'DevTest') return true
for (let i = 0; i < btns.length; i++) {
for (let i = 0; i < AuthCode.length; i++) {
if (menuCode) {
// 是否有页面标识
// 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选
if (btns[i].btnCode === menuCode) {
if (AuthCode[i].path === menuCode) {
return true
}
}
......
commodity.productWillCheck 商品列表审核
......@@ -112,8 +112,8 @@ export enum LAYOUT_TYPE {
}
// 本地环境跳过权限校验
export const isDev = process.env.NODE_ENV === "development"
// export const isDev = false
// export const isDev = process.env.NODE_ENV === "development"
export const isDev = false
export const STATUS_ENUM = [
{
......
......@@ -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: '状态',
......
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