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

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

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