Commit 73c057a1 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修改采购询价按钮权限

parent 29440c18
......@@ -338,7 +338,7 @@ export const DEMANDPLANINTERNALSTATE = [
export enum BUTTONAUTHORITY {
/** 提交审核修改删除查看 */
OEN = 1,
ONE = 1,
/** 修改查看 */
TWO,
/** 报价查看 */
......
......@@ -5,13 +5,14 @@ import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment'
import { PublicApi } from '@/services/api';
import { Row, Col, Space, Button, Dropdown, Menu, Tag, Badge, Popconfirm, Typography } from 'antd';
import { DeleteOutlined, DownOutlined, PlusOutlined } from '@ant-design/icons';
import { Row, Col, Space, Button, Tag, Badge, Popconfirm, Typography } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import {
INQUIRY_EXTERNALSTATE_COLOR,
INQUIRY_INTERNALSTATE_COLOR,
OFFTER_EXTERNALSTATE_TYPE,
OFFTER_INTERNALSTATE_TYPE
OFFTER_INTERNALSTATE_TYPE,
BUTTONAUTHORITY
} from '../../constants';
const { Text } = Typography;
const AddInquiry = () => {
......@@ -61,25 +62,20 @@ const AddInquiry = () => {
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
{ (record.externalState !== OFFTER_EXTERNALSTATE_TYPE.WAITNOPASSINQUIRY_TYPE &&
(record.interiorState !== OFFTER_INTERNALSTATE_TYPE.AUDITNOPASS1_TYPE &&
record.interiorState !== OFFTER_INTERNALSTATE_TYPE.AUDITNOPASS2_TYPE))
&& (
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(record.id)}>
<Button type='link'>
提交
</Button>
</Popconfirm>
)}
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/purchaseInquiry/edit?id=${record.id}&number=${record.purchaseInquiryNo}`)}>修改</Button>
{ record.interiorState === OFFTER_INTERNALSTATE_TYPE.WAITSUBMITAUDIT_TYPE
&& (
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => fetchDeleteBatch(record.id)}>
<Button type='link'>
删除
</Button>
</Popconfirm>
)}
{(record.button === BUTTONAUTHORITY.ONE) &&
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(record.id)}>
<Button type='link'>
提交
</Button>
</Popconfirm>}
{(record.button === BUTTONAUTHORITY.ONE || record.button === BUTTONAUTHORITY.TWO) &&
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/purchaseInquiry/edit?id=${record.id}&number=${record.purchaseInquiryNo}`)}>修改</Button>}
{(record.button === BUTTONAUTHORITY.ONE) &&
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => fetchDeleteBatch(record.id)}>
<Button type='link'>
删除
</Button>
</Popconfirm>}
</>
)
}];
......
......@@ -12,9 +12,7 @@ import RecordLyout from '../../components/detail/components/recordLyout';
import moment from 'moment';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR
} from '../../constants';
import { CheckCircleOutlined, LinkOutlined, QuestionCircleOutlined } from '@ant-design/icons';
......@@ -61,8 +59,8 @@ const DemandDetailed = () => {
{
col: [
{ label: '需求单号', extra: data.purchaseInquiryNo },
{ label: '外部状态', extra: <Tag color={OFFTER_EXTERNALSTATE_COLOR[data.externalState]}>{OFFTER_EXTERNALSTATE[data.externalState]}</Tag> },
{ label: '内部状态', extra: <Badge status={OFFTER_INTERNALSTATE_COLOR[data.interiorState]} text={OFFTER_INTERNALSTATE[data.interiorState]} /> },
{ label: '外部状态', extra: <Tag color={OFFTER_EXTERNALSTATE_COLOR[data.externalState] || 'default'}>{data.externalStateName}</Tag> },
{ label: '内部状态', extra: <Badge status={OFFTER_INTERNALSTATE_COLOR[data.interiorState] || 'default'} text={data.interiorStateName} /> },
{ label: '单据时间', extra: format(data.createTime,) },
]
},
......
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